Add missing LYC=LY interrupt check when LYC register is set. Fixes vibrations due to pallette chanes hooked to LYC interrupt in Donkey Kong demo animations (and maybe some other roms).
Details
In Donkey Kong when no keys are pressed the intro screen is followed by demo animations (eg mario gym sequence). This is drawing the screen with timed palette changes mapped to LYC (00 / 01 / 67). LYC is however set when LY is already at that value.
I'm not 100% sure, however I suspect LYC set needs to include an interrupt check. It also enforces my hunch that this emulator has passes the popular cpu instruction and instruction timing tests - so I assume the error is not in timing but the set of LYC.
Thank you! :+1:
Upon inspection, I agree that an interrupt check should occur on both a line change as well as an LYC change.
I have merged your commit.
Tl;dr
Add missing LYC=LY interrupt check when LYC register is set. Fixes vibrations due to pallette chanes hooked to LYC interrupt in Donkey Kong demo animations (and maybe some other roms).
Details
In Donkey Kong when no keys are pressed the intro screen is followed by demo animations (eg mario gym sequence). This is drawing the screen with timed palette changes mapped to LYC (00 / 01 / 67). LYC is however set when LY is already at that value.
I'm not 100% sure, however I suspect LYC set needs to include an interrupt check. It also enforces my hunch that this emulator has passes the popular cpu instruction and instruction timing tests - so I assume the error is not in timing but the set of LYC.