I went digging on the old boards to see if there was a solution to my current problems. Does anyone know which cycles the H and V scroll values are updated? I dug up this old thread which has some info:
http://nesdev.com/cgi-bin/wwwt ... =#Post1453
What I'm doing now... is I'm counting up H scroll after every 4th cycle in the scanline (4, 12, 20, 28, ... 252). I'm counting up the V scroll on the 252nd cycle on the scanline... and resetting the H scroll ( Loopy_V = (Loopy_V & 0x7BE0) | (Loopy_T & 0x041F) ) on cycle 256. I also run a few cycles into VBlank before actually triggering an NMI.
This seems to solve all my Battletoads problems... but seems to cause Rad Racer problems... I get scanlines which go astray in the road, which look pretty fugly. I checked an old version of my emu... where I did H scroll updates on 0, 8, 16, 24 ... 248 (I know this isn't right), updated V scroll on 256, and reset H scroll on 256. This runs Rad Racer perfectly, but of course Battletoads then has problems.
So I guess what I'm asking is.... does anyone have a "final word" on when the scroll values are actually updated? Anyone have both these games running right and can give me a heads up?
Thanks in advance.
EDIT - hmm... perhaps my problems with Rad Racer aren't really problems? Does the game normally screw up a bit if you drive all the way on the left side of the road?
EDIT again - Yeah... nevermind. After messing with things, I went back to what I stated the first time (update H on 4th cycle, update Y on 252, reset H on 256), and both Battletoads and Rad Racer seem to be working (aside from Rad Racer's slight weirdness when you drive all the way on the left side of a straight road... but I'm willing to bet that's a game glitch)
http://nesdev.com/cgi-bin/wwwt ... =#Post1453
What I'm doing now... is I'm counting up H scroll after every 4th cycle in the scanline (4, 12, 20, 28, ... 252). I'm counting up the V scroll on the 252nd cycle on the scanline... and resetting the H scroll ( Loopy_V = (Loopy_V & 0x7BE0) | (Loopy_T & 0x041F) ) on cycle 256. I also run a few cycles into VBlank before actually triggering an NMI.
This seems to solve all my Battletoads problems... but seems to cause Rad Racer problems... I get scanlines which go astray in the road, which look pretty fugly. I checked an old version of my emu... where I did H scroll updates on 0, 8, 16, 24 ... 248 (I know this isn't right), updated V scroll on 256, and reset H scroll on 256. This runs Rad Racer perfectly, but of course Battletoads then has problems.
So I guess what I'm asking is.... does anyone have a "final word" on when the scroll values are actually updated? Anyone have both these games running right and can give me a heads up?
Thanks in advance.
EDIT - hmm... perhaps my problems with Rad Racer aren't really problems? Does the game normally screw up a bit if you drive all the way on the left side of the road?
EDIT again - Yeah... nevermind. After messing with things, I went back to what I stated the first time (update H on 4th cycle, update Y on 252, reset H on 256), and both Battletoads and Rad Racer seem to be working (aside from Rad Racer's slight weirdness when you drive all the way on the left side of a straight road... but I'm willing to bet that's a game glitch)