Ok, have Chromatix exact suggestion up and running. Definite improvement. Still some garbage, but way less. The remaining garbage kinda looks like software issues to me. It's mostly snippets of good data in strange places. I had that before, but also a ton of random characters. Now I have occasional random characters, but not near like before.
I have enough of a monitor working that I can read memory. If I read the address in VRAM that has displayed a stray character, it shows that character to be there. That's not unexpected of course.
But when I read the corresponding address in the off screen buffer in SRAM, I also see that garbage character. Correct me if I'm wrong, but doesn't that suggest my code is the problem? It's mostly snippets of correct display data that, along with appearing where it should, appears in strange places. The garbage snippets are predictable (if I do the same things, I get the same, seemingly random, results).
My screen write code is fairly complex unfortunately. It implements scrolling (kinda works right now. Kinda). Thus, there is alot going on as far as managing where in the buffer to write, and where in the buffer to start drawing. I can easily imagine mishandling a 16 bit address in there somewhere. I should count how many characters away from the good stuff the garbage is, see if its a suspicious number like 256...
Anyway, things ARE better than they were, and I gained almost 8k of RAM at no cost. I'll keep you posted.
|