Dumping and compiling prototype chips

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

Post Reply
the_wizard_666
Posts: 73
Joined: Thu Feb 25, 2021 6:52 am

Dumping and compiling prototype chips

Post by the_wizard_666 »

So a friend of mine came into a supply of prototype NES eproms from a reputable source, and because I have the equipment, I volunteered to dump them for him, and compile them into working ROMs. So far they've mostly been NROM games, or titles that would boot up using an NROM configuration, however I have one set that's proving to be contentious for me. Per his request I can't give out the .bin files until he's ready to release them (not that they're anything special or anything), so because of that I have to simply ask for help instead of finding someone to compile for me. I have two PRG chips and one CHR, but when compiled, regardless of mapper used, I can't get the ROM to boot up. Looking up the released version of the game in question (Time Lord, if hit helps), it should have only 1 PRG of 128KB (combined the two chips equal 256), and no CHR. I'm attributing the extra data to it being a prototype and not the final cut. I've tried using all three ROMs separately, and only using a single PRG with the CHR instead of both, but no dice. Also switched between the released mapper (7) and several others (0, 1, and 3), with no luck. The chips did NOT come on a board, so I have no frame of reference as far as how they should be configured. I even switched between NTSC and PAL, but no dice. So far this is the only compiled ROM out of half a dozen dumped to cause me issues, and I'd like to figure it out before I dump more chips and end up with more issues :P Any help, suggested tools, etc, would be great, as I'm just using FamiROM for the purpose as it's what I had on hand. I don't usually do this kind of work, just wanted to help a friend out, and would like to figure out what I did wrong before I come across the same issue again :P
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Dumping and compiling prototype chips

Post by Controllerhead »

Curious: have you DIF'd the dumps to the retail game? HxD would work for that.
Image
the_wizard_666
Posts: 73
Joined: Thu Feb 25, 2021 6:52 am

Re: Dumping and compiling prototype chips

Post by the_wizard_666 »

Controllerhead wrote: Fri Apr 16, 2021 11:17 pm Curious: have you DIF'd the dumps to the retail game? HxD would work for that.
Pretend you're talking to a complete noob here ;) I've been a collector for over two decades, but the dev side is completely new to me.

I'm assuming DIF is to compare the retail to the dumps, which I have no idea how to do. HxD I'm assuming is a program I can get for that?
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Dumping and compiling prototype chips

Post by lidnariq »

DIF should probably be "diff" as in short for "difference" as in "diff" the program that tells you about differences between two files...

I was gonna ask for so-called "hashes" of the ROM dumps that you have but I'm not certain how to give you instructions that given that I'm a pretentious linux user :mrgreen:
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Dumping and compiling prototype chips

Post by Controllerhead »

the_wizard_666 wrote: Fri Apr 16, 2021 11:43 pm I'm assuming DIF is to compare the retail to the dumps
That's the idea. The hope is that some the data matches the retail game, and provides clues on where the data might go to successfully build it. Just an idea... anyway:

You can download a program like VBinDiff:
https://www.cjmweb.net/vbindiff

Extract the zip into a folder, and copy the retail game and your .bin dump in there. If you're on Windows, type CMD into the search bar, type CD and paste the directory in there. The command will be like "VBinDiff file1.bin file2.bin".

The program will highlight all of the differences in red. Press enter to cycle through them. Here, we have retail Tetris vs. my romhack. There aren't many differences: this is what you are hoping to see. Perhaps you can piece together which parts of the dump connect to the retail game in order to build it properly.

Image

Anyway, this is just an idea, so i hope it provides some insight... I hope this makes sense!
Image
the_wizard_666
Posts: 73
Joined: Thu Feb 25, 2021 6:52 am

Re: Dumping and compiling prototype chips

Post by the_wizard_666 »

Well, I've had limited time today, and am jumping off quickly, but I wanted to say thanks. While I haven't compared the ROMs, I did compare the two PRG .bin files and they're completely identical. I'm not sure if I screwed up on the dump and saved the exact same file twice, so when I return the rest of the chips I will try redumping the PRG chips and see if that's the problem. The compiling issue may have come down to simple human error :lol: What this does allow for though is for me to compare the various releases and builds, to see if there are differences between them, and also compare them to the retail releases to see if there's anything of note there too. It also looks like it doubles as a regular hex editor, which will be useful in it's own right, so thanks! I suppose the only other thing to ask in advance is if there's any way to automatically detect the mapper used in the proto builds, or if it's gonna just be straight guesswork. I haven't needed anything beyond mapper 0 so far, but there's a LOT of chips here, and the issue may very well come up later :P
User avatar
Ben Boldt
Posts: 1148
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Dumping and compiling prototype chips

Post by Ben Boldt »

There are a small number of mappers that account for the vast majority of games, try these ones first.
mapper_distribution.png
mapper_distribution.png (11.03 KiB) Viewed 4617 times
the_wizard_666
Posts: 73
Joined: Thu Feb 25, 2021 6:52 am

Re: Dumping and compiling prototype chips

Post by the_wizard_666 »

That was my thinking. I tested out a few by splitting different ones and recompiling as NROM and most at least boot up, albeit with issues of various degrees. And with most being various builds of previously released games, I'm hoping it's a safe assumption that if it doesn't work with one of the basics, it'll probably work with whatever mapper it was released with...the hard part comes if I stumble on another unreleased game (the one I found seems to be an NROM game, so I have no issues so far). Just figured there might be a way to figure it out without the guesswork. But if not, it's only a few minutes or so to try different ones out anyway.
User avatar
Ben Boldt
Posts: 1148
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: Dumping and compiling prototype chips

Post by Ben Boldt »

Yes, there are ways to figure out the mapper using a debugger if guessing doesn't work, but it will probably take longer. Any time that a game writes to an address >= $8000 is typically a write to the mapper. Depending what it wrote can give some clues. Some games will expect the cartridge to contain RAM at $6000-7FFF. If you see reads and writes in this range, it must use a mapper that supports RAM. Basically you would be gathering clues like that. You might even find a strange prototype that has its own never-before-seen unique mapper. I would say, set the hard ones aside and come back to them at the end.

Are these normal EPROMs? If so, there could be degradation that causes a crash regardless if you got the mapper right, especially if the window had been left uncovered. That would also be something a debugger can help figure out and maybe fix. If they are not normal EPROMs, how are you figuring out the pinouts?
the_wizard_666
Posts: 73
Joined: Thu Feb 25, 2021 6:52 am

Re: Dumping and compiling prototype chips

Post by the_wizard_666 »

They're normal eproms. No issue there. Many of them have been identifiable from the labels on the chips, at least vaguely, so that's been helpful.

Anyway, I'm pretty much doing as you suggested - I'm setting aside everything I can't get to work, and am gonna debug them later on, once I have a bit more information to go with. There's a few odd ones - like one batch of tiny chips that likely need to be combined together, but have no PRG or CHR designation and no way to guarantee all the needed chips are even there.

Another interesting piece I just found was a chip with no identifying markers, and no window, making it obviously not an eprom. All I know about it is that it's a DIP-40 chip, and has a sticker on it labelled "Original T-11" that I'm presuming was a mapper chip (it's part of a huge batch of Tengen chips, so I'm guessing it's the RAMBO-1, but I could be wrong). I'm not sure how to identify it and dump it, although I'm also not sure if that's even necessary with that type of chip anyway.

But yeah, for the time being, I'm gonna focus on getting them dumped, getting what I can figured out, and I'll worry about the rest later - likely when I get clearance from the owner to share the code and whatnot so I can get more direct help :P
Post Reply