Gradius scrolling

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Gradius scrolling
by on (#43297)
Hi!

After writing mapper #3 emulation, I got gradius working fine, except for one thing. The game background doesnt scroll..
Sprites are OK, they scroll as they should..

I've traced my code, and the game seems to not increase any scrolling registers during gameplay. How does this game works?

PS: the intro scroll works perfectly.

Thanks!

by on (#43298)
Humm, post edited....

Here is what happens when running gradius..

this is an output dump from my emu

Code:
vscroll: 0x0000, hscroll: 0x0000
H-SCROLL write: 0xd1
V-SCROLL write: 0x0c
H-SCROLL write: 0x00
V-SCROLL write: 0x00
vscroll: 0x0000, hscroll: 0x0000
H-SCROLL write: 0xd2
V-SCROLL write: 0x0c
H-SCROLL write: 0x00
V-SCROLL write: 0x00
vscroll: 0x0000, hscroll: 0x0000
H-SCROLL write: 0xd2
V-SCROLL write: 0x0c
H-SCROLL write: 0x00
V-SCROLL write: 0x00
vscroll: 0x0000, hscroll: 0x0000
command wrote to queue: cpu stop
command received from queue: cpu stop


Look, it write four times the registers, is this right?
does this game use some hacks to update the screen?

by on (#43305)
At what scanline, or at what CPU cycle, does it write to the scroll registers? Does SMB1 scroll properly?

by on (#43308)
Gradius scrolls the top of the screen, and after the split on the status bar, writes $00 to cancel the scrolling. The opposite of what SMB does. You could check that if you're bored.

by on (#43310)
Mario works ok, the scroll is fine.

As I can see, this game doesnt use sprite #0 hit as trigger to stop scrolling. I havent looked at its code but I think it uses another way to sync
with the PPU to stop the scrolling.

when I'm at home I'll take a deeper look at that.

Quote:
Gradius scrolls the top of the screen, and after the split on the status bar, writes $00 to cancel the scrolling. The opposite of what SMB does. You could check that if you're bored.


Thanks for the info! helped me to clarify some things![/quote]

by on (#43372)
I got it to work now. My engine wasnt considering scroll registers changes
in the rendering time.

tepples, SMB1 now works perfectly.

Thanks you all for the attention :D :D