MMC3 with CHR-RAM on specific device.

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

gutomaia
Posts: 31
Joined: Fri Jun 15, 2012 10:12 am

Re: MMC3 with CHR-RAM on specific device.

Post by gutomaia »

rainwarrior wrote: Mon May 24, 2021 1:32 pm So you've verified that the ROM works and runs some code. It's clear that it's setting the nametable data.

Try reducing your main() to just the minimum needed. Maybe just clear the nametable to 0 and try to write some simple pattern to CHR tile 0. Don't do any PRG switching, just verify that you can write to CHR-RAM first.

If CHR-RAM writes are working, then my next guess would be maybe there's something weird about switching to the PRG bank where CHR is contained?
Thanks, although. I testing the capabilities of the device as demo was evolving. Bankswitch wasn't an issue. Most of the problems came when I try to use CHR-RAM.

I've also used CHR-RAM with another mapper, with kind of similar results (what means, it didn't work).

Although, I've tested every single suggestion.
- Changing the mirror from vertical to horizontal, show no improvement.
- Avoid changing the bank and just load a tile on the first CHR also, didn't show any good. It does load something, but not the tile expected.

Didn't notice also anything different between Megaman 4 game and my demo.

What am I thinking now? On changing the order of banks or something like that. But much is a try and error effort. All suggestions are welcome.
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: MMC3 with CHR-RAM on specific device.

Post by Dwedit »

The basics: MMC3 initialization
Need to ensure that latches and registers on the MMC3 itself are initialized. Assume any possible uninitialized value is wrong and needs to be set.
This includes mapping out CHR to banks 01234567, setting PRG banks to the correct values, setting mirroring, setting the correct CHR mode, etc.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: MMC3 with CHR-RAM on specific device.

Post by rainwarrior »

Dwedit wrote: Tue May 25, 2021 5:37 pmThe basics: MMC3 initialization
That's already happening, as mentioned earlier. Everything relevant is initialized, and it runs correctly on Mesen with register-randomization, as well as every other emulator tested, PowerPak and Everdrive. There's a link to the ROM build in that post, and you can verify that the relevant init code is being run.

So the basics should be covered. Can you spot an omission in the init code?

If not the question is either whether something else was missed, or whether there is some nonstandard MMC3/other behaviour going on from the specific device being used, and how to discover what that is.
gutomaia
Posts: 31
Joined: Fri Jun 15, 2012 10:12 am

Re: MMC3 with CHR-RAM on specific device.

Post by gutomaia »

Dwedit wrote: Tue May 25, 2021 5:37 pm The basics: MMC3 initialization
Need to ensure that latches and registers on the MMC3 itself are initialized. Assume any possible uninitialized value is wrong and needs to be set.
This includes mapping out CHR to banks 01234567, setting PRG banks to the correct values, setting mirroring, setting the correct CHR mode, etc.
Thanks for helping out Dwedit. Although, as rainwarrior was saying. It isn't a problem with the mapper itself. I know that it is something related to the CHR-RAM.

I tested other DEMO using another mapper with CHR-RAM. Got some similar results. Although, all game rooms (not demos made by me), worked perfectly.

One thing that I was considering. If there is something related to the write routines to the CHR-RAM. I know, does not make much sense. But I'm getting out of cards here. Well, let me explain.

All commands for put data on CHR-RAM, give some random graphs, although, it's the wrong result, all the results were consistent (always the same result on the screen). Therefore, it is copping some data that is not the intended one to the CHR-RAM. Therefore, I was revising the databanks and orders cart, without any success.

Any ideas?
Post Reply