User:Andlabs/Rolling Thunder 3

this section will stay away from the final article because blah I don't even know if this is for hblank effects anymore

Unused Horizontal Interrupt Routine
Rolling Thunder 3 does not use horizontal interrupts, and the game -- as well as the previous three Now Production Genesis games, Quad Challenge, Splatterhouse 2, and Splatterhouse 3 -- is programmed such that raster effects are coded in through the horizontal interrupt. However, the framework is in place for Rolling Thunder 3 to use the horizontal interrupt, so the question is: does Rolling Thunder 3 have unused raster effects?

Quad Challenge and Splatterhouse 2 have a horizontal interrupt routine. Spllatterhouse 3, the other previous routine, completely removes this routine, however Rolling Thunder 3 seems to place it back. However, unlike the other three games, Rolling Thunder 3 accesses both RAM and the VDP via registers -- RAM via a6, the VDP via a5 -- and the horizontal interrupt routine was changed to suit.

The strange thing here, however, is that the VDP access to grab the H/V Counter, which is used to determine if we should run the horizontal interrupt routine, was changed from 8(a5) ($C00008) to (8).w (access ROM address $8, which is zero as a byte, as a word, and as a longword). This changes the addressing mode, but not the number of bytes to encode the instruction (so was this change made to the final binary?). This means that by merely changing the opcode portion of the instruction encoding, and the patch codes to do so are B64:0C6D and B8C:302D.

However, the horizontal interrupt routine is still never called because the VDP flag that enables horizontal interrupts is never set. We can force it on, however, with patch code 7BE6:8014 on startup. However, I noticed now the screen has random corruption issues; I have to figure out why...