MMC5 and Retro City Rampage

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
MMC5 and Retro City Rampage
by on (#174555)
Hi,

Has anyone encountered any issues emulating Retro City Rampage? I'm getting garbled backgrounds in both the intro screen and gameplay. The nametables seem to be the correct ones, but the referenced CHR tiles are clearly wrong. The sprites seem to be rendering well. Apparently the game uses the 8x8 sprite mode in MMC5, so the bank registers used (A: $5120-$5127 or B: $5128-$512B) depend on the last set written to. The game seems to be assigning CHR banks to the B registers, but at no point did I detect setting of the CHR mode (which I assume is 0 by default). Writing to these 4 B registers leads me to think that the initial value for CHR mode should be 3 (1K banks) instead of 0, but all MMC5 implementations I have found seem to assume CHR mode 0 is the initial value.

Does anyone have any experience with Retro City Rampage?

Thanks
Re: MMC5 and Retro City Rampage
by on (#174595)
There's a basic implementation of MMC5 that runs, for example, CastleVania 3. A more complete thing will run Uncharted Waters and other Koei games (extended attribute mode, where each tile can take a specific CHR bank). Only Vertical Split Mode isn't required, as just ONE game uses it.

In my emulator (RockNES), it's added since 2012. I tested this game and seems to work fine.
Re: MMC5 and Retro City Rampage
by on (#174600)
Zepper wrote:
There's a basic implementation of MMC5 that runs, for example, CastleVania 3. A more complete thing will run Uncharted Waters and other Koei games (extended attribute mode, where each tile can take a specific CHR bank). Only Vertical Split Mode isn't required, as just ONE game uses it.

In my emulator (RockNES), it's added since 2012. I tested this game and seems to work fine.


I'm at the stage where Castlevania III works, except perhaps for the rising water level, which apparently uses Ex Ram Mode 1. Indeed, I suspect the problem with Retro City Rampage is that I have yet to implement this. From what I understand, the MMC5 Ex Ram Mode 1 is intended to go around the limitation of tile attributes being shared by 2x2 tile groups and instead specifying independent attributes for each tile.

Now that I think of it, the game does set the B registers without specifying CHR Bank Mode 3, but I suspect that since the game is using Ex Ram Mode 1, 1K CHR banks are assumed, regardless of CHR Bank mode.

Am I on the correct track here, or am I spewing nonsense? :)
Re: MMC5 and Retro City Rampage
by on (#174681)
I finally managed to implement Extended Ram Mode 1 graphics!

Retro City Rampage is working quite well. One notable glitch is that the character dialogue at the top on starting to play doesn't show up. It does show up however, when you get out of the car and your NPC ally tells you to get back inside the car. The glitch may be due to IRQ counting code, but I'm not sure as yet.

RCR Intro
Image

RCR Gameplay initial dialogue (glitch here)
Image

RCR gameplay - driving car
Image
Re: MMC5 and Retro City Rampage
by on (#174689)
Uh... same glitch here. ^_^;; It seems to be IRQ-timing related.
Re: MMC5 and Retro City Rampage
by on (#174693)
real machine video working fine?
Re: MMC5 and Retro City Rampage
by on (#174695)
zxbdragon wrote:
real machine video working fine?

Nintendulator also has that glitched tiles on the bottom of the screen.
Re: MMC5 and Retro City Rampage
by on (#174701)
Zepper wrote:
zxbdragon wrote:
real machine video working fine?

Nintendulator also has that glitched tiles on the bottom of the screen.

Thank you, I know ! but real machine not glitched?
Re: MMC5 and Retro City Rampage
by on (#174702)
It's likely never been tested on a real MMC5.
Re: MMC5 and Retro City Rampage
by on (#174703)
I don't have the means to test it on a real NES, but on Nestopia it doesn't glitch like this. Note that the issue isn't just the glitch tiles at the bottom, but also the blank panel at the top, which is supposed to contain dialogue between characters. Strangely enough, dialogue graphics do appear in mid gameplay, so perhaps it is due to some initialisation/IRQ issue.
Re: MMC5 and Retro City Rampage
by on (#174704)
rainwarrior wrote:
It's likely never been tested on a real MMC5.

I would not be surprised if Brian tested it on a real MMC5. He was showing some kind of custom hardware development setup on his (now gone) website.
Re: MMC5 and Retro City Rampage
by on (#174732)
Can anyone provide a link to the ROM?
Re: MMC5 and Retro City Rampage
by on (#174733)
zeroone wrote:
Can anyone provide a link to the ROM?


Probably not, because it's included with the commercial game as a bonus, but it is really cheap to buy, I think it was just $1 or $2 when I bought it on sale through Steam. If you want to look around for it anyways though, the NES version was called "ROM City Rampage".
Re: MMC5 and Retro City Rampage
by on (#174749)
zeroone wrote:
Can anyone provide a link to the ROM?
Memblers wrote:
Probably not, because it's included with the commercial game as a bonus, but it is really cheap to buy, I think it was just $1 or $2 when I bought it on sale through Steam. If you want to look around for it anyways though, the NES version was called "ROM City Rampage".

Retro City Rampage is the full game available for PC and modern consoles. The prototype NES version is called ROM City Rampage.

In the full game, you can go to one of the arcades and play the prototype NES version as an Easter egg. The NES ROM isn't directly distributed with the game, but you can extract the needed PRG and CHR data and add an appropriate header to make a usable NES ROM. The steps are available in:
Be aware that the NES version is not the complete game, it's just a demo. You can walk around the overworld or get in a car and bump people around, but there are no goals or other game levels. There is no audio.

Edit: Removed session ID from romhacking.net link.
Re: MMC5 and Retro City Rampage
by on (#174753)
thefox wrote:
rainwarrior wrote:
It's likely never been tested on a real MMC5.

I would not be surprised if Brian tested it on a real MMC5. He was showing some kind of custom hardware development setup on his (now gone) website.

I would.

The ROM doesn't even initialize OAM properly before the title screen comes up. If you run it on a PowerPak you'll see random sprite tiles on the screen at startup. (OAM decay issue, I think.)

(Otherwise, PowerPak with Loopy's partial MMC5 does pretty much the same thing as discussed w.r.t. flickering text window, etc.)

This game runs "correctly" only in the emulator that ships with Retro City Rampage. Don't take it as something a correct MMC5 emulation should run glitch-free.

I'm not trying to diminish the value of his work, it's a fantastic proof of concept, but it is NOT a suitable test for emulation accuracy.