|
Post by moodswing on Nov 24, 2008 16:47:54 GMT -5
Has anyone run into this problem?  I am using a split-screen, with a bitmap at the top and text at the bottom. My problem is that on occasion, the SCPU incorrectly reads a VIC register. As in the following: ... stx $d021 lda $d016 ora #$10 sta $d016 ;occasionally becomes 38 columns lda $d011 ora #$20 sta $d011 ;occasionally blanks the screen ... The problem goes away if I slow down to 1 MHz. It also goes away if I read $d016 or $d011 twice ... stx $d021 lda $d016 lda $d016 ;read twice ora #$10 sta $d016 ;stays 40 columns lda $d011 lda $d011 ;read twice ora #$20 sta $d011 ;no longer blanks ... or possibly wait in a loop ... stx $d021 lda $d016 cmp $d016 ;debounce bne *-6 ora #$10 sta $d016 ;stays 40 columns lda $d011 cmp $d011 ;debounce bne *-6 ora #$20 sta $d011 ;no longer blanks ... The faster my SCPU runs, the more likely the bug occurs. That is, if I mirror all memory, it doesn't occur as often as when I mirror one VIC bank and turn zero-page mirroring off. I've had my SCPU for years and years and don't seem to have run into this problem before. Is my SCPU becoming faulty? Is my VIC becoming unreliable? Is there some SCPU timing issue I'm not aware of--following a VIC write immediately with a VIC read? I don't play games often, but when I have, I haven't noticed any problems, though I usually switch to 1 MHz.
|
|