When to do scroll updates

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Posts: 1849
Joined: Wed Nov 10, 2004 6:47 pm

When to do scroll updates

Post by Disch » Mon Jan 10, 2005 5:30 pm

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/wwwthreads/sh ... =#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)

User avatar
Posts: 41
Joined: Wed Nov 17, 2004 12:34 pm


Post by laughy » Mon Jan 10, 2005 7:10 pm

http://nesdev.com/cgi-bin/wwwthreads/sh ... =5#Post901

I don't see why they wouldn't update both at the same time.

Posts: 101
Joined: Mon Sep 27, 2004 11:51 pm

Post by Hyde » Mon Jan 10, 2005 8:11 pm

Posts: 22284
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Re: :)

Post by tepples » Mon Jan 10, 2005 10:24 pm

laughy wrote:I don't see why they wouldn't update both at the same time.
Not enough ALUs, perhaps?

Post Reply