White flickering lines...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

White flickering lines...

moobles
My fill program works except when a key is held down there are some white lines that kinda flicker down the screen.  I have made sure that the only block where I set a screen address content to zero is absolutely unreachable when RAM[KBD]!=0... ie the line directly preceding is an unconditional jump and the only jump getting there is contingent on RAM[KBD]=0.  

So I commented out the 'setting to white' part and the behavior is that once you press a key the screen blackens perfectly.  

In any event here is the logic:
@KBD
D=M
@white
D;JEQ           //this is only place where there is a jump to (white)

@PLACE                    //PLACE is index for screen mem map addressess
A=M
M=-1            
@continue
0; JMP      //unconditional.  can't get to (white) from here

(white)
@PLACE       //this is the only place where i set anything on screen to any thing other than -1
A=M            //when i comment out this block i get perfect blackness.  yet this block is only reachable
M=0         //when RAM[KBD]=0

I would have assumed this was just glitchyness, but I've tried other peoples solutions and they work well.
Anybody have any insight please?
Reply | Threaded
Open this post in threaded view
|

Re: White flickering lines...

cadet1620
Administrator
One thing that I've seen that can cause strange behavior is if you have an off-by-one error and are writing to the keyboard address.  The CPU simulator sometimes feeds the data you wrote back to you as keyboard input!

If you want to, you can e-mail me your program and I'll take a look at it.


--Mark