512KB mapper 7 issue

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
mightydidz
Posts: 99
Joined: Wed Jan 24, 2018 12:04 pm

512KB mapper 7 issue

Post by mightydidz »

Hi guys,

I want to make myself a cartridge of this hack:
http://www.romhacking.net/hacks/3441/

It pushes PRG beyond the normal 256KB capacity.
But reading https://wiki.nesdev.org/w/index.php?title=AxROM
It seems adding bit 3 to the 74'377 I could make it.

I did this but I'm having issue, on the console I'm missing sprites and cannot play the game pass the intro.
https://youtu.be/YwsTQgliauI

Here is my schematic.

Do you guys have any idea?
Attachments
mapper7.JPG
mightydidz
Posts: 99
Joined: Wed Jan 24, 2018 12:04 pm

Re: 512KB mapper 7 issue

Post by mightydidz »

I tried with original rom and it works. Even when padding it to 512kb.

Anything related to bus conflict or is the rom not compatible with real hardware?
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: 512KB mapper 7 issue

Post by Ben Boldt »

Boy I don’t know, it does look like you added bit 3 of the register correctly in the schematic

Not sure what equipment you have, but here is what I would do. Write a very simple program that writes an incrementing value to $8000, infinite loop. This will need to be copied in the ROM each 32k so your test program will be there regardless of the PRG bank selected.

Then with it running, probe your EPROM’s A15, A16, A17, A18. A15 should be toggling at some fast rate. A16 should be toggling at half of that rate. A17 half again and A18 half again. If that all works, combined with your observation that the original ROM works, you know that your PCB layout and register works correctly. If all of that works, all that is left is the EPROM chip itself or maybe you’re right that it won’t work on real hardware. Someone here with an everdrive might be able to try it and confirm for you.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: 512KB mapper 7 issue

Post by lidnariq »

Just a guess: maybe they didn't extend the bus conflict prevention table from the original game, and so you can't switch out of the lower 8 banks predictably. (To find out, load the game in FCEUX or Mesen and check for writes to PRG where the value written isn't the same as the value at that address)

Alternatively, try adding an inverter from R/W to PRG /OE.
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: 512KB mapper 7 issue

Post by Ben Boldt »

Great idea lidnariq. I didn’t even think about that with my test program suggestion either. There would have been a bus conflict for all but 1/256 writes to $8000…

Probably want that inverter anyway just to be safe.
mightydidz
Posts: 99
Joined: Wed Jan 24, 2018 12:04 pm

Re: 512KB mapper 7 issue

Post by mightydidz »

Hi guys, I lifted PRG /OE from GND and added an inverter (1g04) from R/W to PRG /OE
I didn't do anything to PRG /CE, its still connected to /ROMSEL.

I get same behavior. I'm missing sprites and game freezes on the playfield.
Any other idea to test?

Thanks for your help.
mightydidz
Posts: 99
Joined: Wed Jan 24, 2018 12:04 pm

Re: 512KB mapper 7 issue

Post by mightydidz »

I tried another romhack thinking it was maybe the hack itself.
I tried http://www.romhacking.net/hacks/1653/
Its also a 512KB.

It work perfectly with my board.
Conclusion, its the hack itself.

Thank you for the help.
If one of you have an Everdrive and would like to give it a try, I'm curious.
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: 512KB mapper 7 issue

Post by Ben Boldt »

Well I wonder what could be wrong? It’s not a complicated mapper or anything. You have all the SRAM an emulator could expect. Seems likely there should be a simple bug fix if the problem is the ROM as it appears.

Our first clue is that there are no sprites. That is strange. Maybe it doesn’t wait properly before initializing the PPU?
Joe
Posts: 650
Joined: Mon Apr 01, 2013 11:17 pm

Re: 512KB mapper 7 issue

Post by Joe »

I tried the hack in an emulator, and it behaved very oddly (including sometimes freezing) until I configured the emulator to include a four score adapter.

Maybe it doesn't work without a four score?
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: 512KB mapper 7 issue

Post by Ben Boldt »

I am looking at this finally in FCEUx. For me, I get to a black screen directly after "Licensed by Nintendo of America, Inc." I attached the 4-score and it still crashes the same. Is this what you are seeing in an emulator?

The crash occurs at address $0C:9225, where it does STA $6001, where A = $92. #$92 is an immediate value that was loaded; it seemed intentional. It is strange because this write changes the PRG page to 04, however, mapper 7's only register is in the range $8000-FFFF, so I am not sure why it would do that. This write should only have written to the cartridge's PRG-RAM. Proceeding to execute at $04:9228, there is non-program data there and it crashes.

I verified that the SHA-1 checksums matched RHDN before and after applying the patch. I also verified that the patched file has the mapper set to 07 in the ines header. I am using FCEUX 2.2.3.
Joe
Posts: 650
Joined: Mon Apr 01, 2013 11:17 pm

Re: 512KB mapper 7 issue

Post by Joe »

I was using Mesen. I didn't try FCEUX, but that sounds like an emulator bug.
rethunter3000
Posts: 28
Joined: Sat Jan 22, 2022 1:25 pm
Location: UA Ukraine, Dnipro

Re: 512KB mapper 7 issue

Post by rethunter3000 »

This hack (Battletoads 4 players) don't work on real hardware. I talked to the developer (Corpsegrinder), he made a hack immediately only for the emulator.
User avatar
Ben Boldt
Posts: 1149
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: 512KB mapper 7 issue

Post by Ben Boldt »

How bad do you want it? Why doesn't it work on real hardware? (Do we know?)

It sounds like a pretty cool hack and might be worth poking at to get it going.
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: 512KB mapper 7 issue

Post by Quietust »

Ben Boldt wrote: Wed Jan 26, 2022 1:12 pm I am looking at this finally in FCEUx. For me, I get to a black screen directly after "Licensed by Nintendo of America, Inc." I attached the 4-score and it still crashes the same. Is this what you are seeing in an emulator?
I see the exact same thing in Nintendulator, and it's plainly obvious why - see below.
Ben Boldt wrote: Wed Jan 26, 2022 1:12 pm The crash occurs at address $0C:9225, where it does STA $6001, where A = $92. #$92 is an immediate value that was loaded; it seemed intentional. It is strange because this write changes the PRG page to 04, however, mapper 7's only register is in the range $8000-FFFF, so I am not sure why it would do that. This write should only have written to the cartridge's PRG-RAM.
But there isn't any PRG-RAM on the cartridge - $6000-$7FFF contains nothing but open bus, and yet this hack seems to be trying to use it to store code and/or data, so I'm not surprised at all that it doesn't work.

Once I altered my mapper 7 code to support 512KB PRG and also add PRG RAM at $6000-$7FFF, the hack started working just fine, but at that point it's not really "mapper 7" anymore.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 512KB mapper 7 issue

Post by tepples »

Could it be described as mapper 7 plus the same thing that Family BASIC adds to mapper 0?
Post Reply