bobbimanners / Applecorn

Allows Acorn BBC Microcomputer language ROMs to run on Apple //e enhanced, //c and IIGS.
GNU General Public License v3.0
47 stars 8 forks source link

Occasional screen corruption when scrolling in MODE 1 #199

Closed bobbimanners closed 1 year ago

bobbimanners commented 1 year ago

Noted that occasionally we get a bad line of pixels when scrolling MODE 1. Have seen this with LIST and *EX.

My guess is it is something to do with interrupts. Maybe disable the Ensoniq ISR and see if this goes away.

EDIT: Was observed on Apple IIGS.

bobbimanners commented 1 year ago

Having trouble reproducing this though.

bobbimanners commented 1 year ago

I can reproduce it. Scrolling HGR-mode screen while music is playing!

Edit the song "DEER" to set the mode (eg: 22 MODE 2) and you will the corruption when scrolling.

bobbimanners commented 1 year ago

Disabiling interrupts during routine HGRSCR1L in mainmem.hgr.s fixes the corruption. I am not quite sure what is going on here though - perhaps the ISR is corrupting one of the zero page locations used in the scroll routine.

bobbimanners commented 1 year ago

Going to re-open this and suggest a proper fix. The problem is the code in mainmem.audio.s uses A1L and A1H in an interrupt context. Ooops.

bobbimanners commented 1 year ago

OK fixed properly now. The ISR has exclusive use of the ZP locations A3L and A3H and no longer stamps all over A1L / A1H.