sarospa / arachNES

"Average NES emulator contains 3 spiders" factoid actually just statistical error...
GNU Affero General Public License v3.0
0 stars 1 forks source link

Crystalis: Background tiles misalign when text boxes appear #27

Closed sarospa closed 7 years ago

sarospa commented 7 years ago

Whenever a text box appears, it seems to cause some sort of misalignment of scanlines, skipping over a couple lines and causing the background to look slightly scrunched. Most likely something is going wrong with the scanline IRQ.

sarospa commented 7 years ago

It seems that this error stems from two different issues: not clocking the scanline counter on the prerender scanline, and incorrectly decrementing the scanline counter on the same clock that it's reloaded. These two things happen to cancel out in, say, SMB3, but not in Crystalis, since it uses multiple IRQs within a single frame.

It's hard to say for sure if there are any other IRQ timing issues still lurking in other games (it's entirely possible) but I'm going to tentatively say that this particular type of problem is taken care of now.