Rad Racer 2 [MMC3]

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Rad Racer 2 [MMC3]

Post by Zepper »

- What's required to get this game working on MMC3? Does it use a different revision than SMB3 or MegaMan3 as examples?
User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

Rad Racer 2 uses four-screen mirroring. Some of the roms floating around don't have this correctly marked in the header, so check for that first. Since the cart is hard wired in four-screen mode, writes to the MMC3 mirroring register should be ignored.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- Great, thank you. ^_^;;

- Next, see something wrong?
Image

- The right side is glitched, part of the road appears. Any ideas?
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

FCEUX also has it screwed up:
Image

Nestopia and Nintendulator have no problem though.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- I wonder if this game uses a different MMC board revision, implying a different IRQ setup (A or B).
User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

It uses the TVROM board: http://wiki.nesdev.com/w/index.php/TVROM

I don't think it relies on any 'special' behavior. My MMC3 code is pretty dumb (no accounting for different IRQ setups, doesn't deal with manually clocking A12, etc), and I don't see these glitches.
get nemulator
http://nemulator.com
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- I have no clue (yet). Just double checking: the nametables are update through writes to $2000-$3EFF, right? Here's my write code:

Code: Select all

_ppubank_name_write((tempaddr>>10)&3,tempaddr&0x3FF,data);
(bank 0..3, address 0..3FF, value)
User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

looks ok to me.
get nemulator
http://nemulator.com
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- If I pull back the PPU x scroll update to a lower value (<257), it fixes partially; less then 245 causes the IRQ to malfunction. Of course, this was just an hack to look for the problem.
User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

I don't know... I guess I still suspect cpu timing (as mentioned in the Battletoads thread) or perhaps even a cpu bug. The reason I say this is because I tested Rad Racer (1, not 2) w/ RockNES and saw glitches similar to ones I saw in my emulator when I had some cpu timings wrong.

I tried recreating the Rad Racer 2 issue by 'breaking' some of my cpu code, but didn't have any luck.
get nemulator
http://nemulator.com
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

James wrote:I don't know... I guess I still suspect cpu timing (as mentioned in the Battletoads thread) or perhaps even a cpu bug. The reason I say this is because I tested Rad Racer (1, not 2) w/ RockNES and saw glitches similar to ones I saw in my emulator when I had some cpu timings wrong.

I tried recreating the Rad Racer 2 issue by 'breaking' some of my cpu code, but didn't have any luck.
- Forget the last public version, it's broken. Heh, the last public version of your emu doesn't recognize the 4-screen mirroring as it seems.

- Here my latest RockNES binary anyway. If you want to look the source code, just let me know.
User avatar
James
Posts: 429
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Post by James »

Zepper wrote:Heh, the last public version of your emu doesn't recognize the 4-screen mirroring as it seems.
Yeah, I just fixed it a couple of weeks ago (which is why I could respond so quickly :lol:). I have some other changes that need to be wrapped up before I release a new version.
Zepper wrote:If you want to look the source code, just let me know.
I'd be happy to take a look at it, if you want me to. I sent you a PM with my email address -- we can discuss off-line.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Usually, whenever I get a situation like this, I use Nintendulator Debug and put breakpoints at PPU writes, to see if the timing is correct and matches what the other emulator does.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

- It seems the same problem with this demo by Bregalad. Uh, could someone test it with PowerPak?

Image

- Of course, this glitch isn't "static". It disappears from left to right, then restarts. Just try it in my latest binary to see what I mean.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Which PPU pixel does the bankswitch/pattern table change instruction end on?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Post Reply