Gradius scrolling

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
polaco
Posts: 19
Joined: Sat Feb 07, 2009 7:04 pm
Location: Brazil
Contact:

Gradius scrolling

Post by polaco »

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!
User avatar
polaco
Posts: 19
Joined: Sat Feb 07, 2009 7:04 pm
Location: Brazil
Contact:

Post by polaco »

Humm, post edited....

Here is what happens when running gradius..

this is an output dump from my emu

Code: Select all

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?
tepples
Posts: 22853
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

At what scanline, or at what CPU cycle, does it write to the scroll registers? Does SMB1 scroll properly?
User avatar
Bregalad
Posts: 8100
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

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.
Useless, lumbering half-wits don't scare us.
User avatar
polaco
Posts: 19
Joined: Sat Feb 07, 2009 7:04 pm
Location: Brazil
Contact:

Post by polaco »

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.
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]
User avatar
polaco
Posts: 19
Joined: Sat Feb 07, 2009 7:04 pm
Location: Brazil
Contact:

Post by polaco »

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
Post Reply