This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

About the "good" versions of the ROMs

About the "good" versions of the ROMs
by on (#101576)
Is there a way to check if a certain ROM is the good one of a specific game?
Some time ago, I already had some issues with Cowering's GoodTools and now I found another curiosity:

Take the game "Soccer". The ROM that is declared as "Soccer (JU)" (i.e. the "real" version) in GoodNES 2.01 is declared as "Soccer (JU) [b1]" in GoodNES 3.14.
So far so good. But you know which one is the good ROM according to GoodNES 3.14? It's the one that in 2.01 was declared as "Soccer (GC)" (the Game Cube version).

How is this even possible? I mean, if 3.14 has it right, then how was it ever possible for 2.01 to declare it as the Game Cube rip? If I ripped a game from an actual original NES cartridge, then how on earth is it possible that anybody took my image and said: "That must be the ROM image from the Game Cube release"?
Besides, in 3.14, the Game Cube release is missing in the list.

So, how do these discrepancies come to be? And is there a way to actually, reliably check the version of the ROM?
Re: About the "good" versions of the ROMs
by on (#101580)
For reliable ROM information, see the NesCartDB.
http://bootgod.dyndns.org:7777

If you can split roms yourself, you can verify the CRC32s. There are also SHA1 hashes available.
Re: About the "good" versions of the ROMs
by on (#101589)
Yes, this site is very good. It once helped me to get the PRG0 versions of games on eBay. :lol:

But is there a way to determine the ROM if you only have it as a file? For example, in how far could I use the CRC32 from that site to check a ".nes" file? After all, in such a file, you can change the header information. Or sometimes, the first few bytes are overwritten with the word DiskDude. But it's still the same ROM and GoodNES would still recognize it as the same. So, what do I have to do with the ".nes" file to check it against the CRC32 value on that website?
By the way, what do you mean with splitting ROMs?
And where can I find the SHA1 value and what would I have to do with it?
Re: About the "good" versions of the ROMs
by on (#101594)
Step 1: Find the game on NesCartDb (It's like porn for NES nerds :D) http://bootgod.dyndns.org:7777/profile.php?id=737
Step 2: Find the ROM information table, which includes the CRC32 values (see attachment) and note the "Roms Combined" value.
Step 3: Install Python if you don't already have it (http://www.python.org/)
Step 4: Copy the below code section into a text document on your machine and name it combinedcrc32.py
Step 5: Run the program: combinedcrc32.py soccer.nes, and compare the output to the ROMs Combined value from the NesCartDb
Code:
import array
import sys
import os.path
import binascii

inf = open(sys.argv[1], "rb")
file = array.array('b')
file.fromfile(inf, os.path.getsize(sys.argv[1]))
inf.close()
print "%08X" % (long(binascii.crc32(file[16:])) & 0xffffffff)


I love python :D
Re: About the "good" versions of the ROMs
by on (#101629)
OK, thank you. Although downloading a program like the 411 KB big CheckCRC does the job as well. No need to install a whole compiler and runtime environment for a programming language.

Still, I don't know how it was ever possible that the ROM was declared as the Game Cube version.
Re: About the "good" versions of the ROMs
by on (#101641)
Does CheckCRC strip off the 16-byte header? That's why I used Python. There's no Windows command to do either unfortunately.
Re: About the "good" versions of the ROMs
by on (#101648)
GoodNES has no authenticity to it at all. GoodNES used to even change RBI Baseball into Mapper 4 (MMC3) with Horizontal Mirroring, because "we shouldn't have any defaults for mappers that have mapper-controlled mirroring, so leave it horizontal". Except RBI Baseball isn't MMC3, and it does have hardwired vertical mirroring.
Re: About the "good" versions of the ROMs
by on (#101654)
JimDaBim wrote:
No need to install a whole compiler and runtime environment for a programming language.

You and Kasumi would have a point if only one program ever made was written in Python. A user of a PC running a Linux operating system would have to install an entire runtime environment called Wine to run programs designed for Windows and another called Mono to run programs designed for the .NET Framework. But because a user ordinarily runs more than one Windows program, the effort in downloading Wine can be spread among all Windows programs that one uses. Likewise, the effort in downloading Python can be spread among all Python programs. And in either case, the effort is minimal, at least on anything resembling Debian connected to anything resembling broadband:
Code:
sudo apt-get install wine
sudo apt-get install python-imaging

Conversely, how hard is it to set up an environment to run programs designed for Linux on a PC running Windows?

Quote:
Still, I don't know how it was ever possible that the ROM was declared as the Game Cube version.

Nintendo releases an NES game. Years later, Nintendo releases the same version of the ROM as bonus content in Animal Crossing. One of the cart dumps is found to match the dump extracted from the Animal Crossing disk image, and one of the cart dumps is not. To be safe, whoever writes one version of the ROM database tags the dump that matches Animal Crossing as (GC). Later on, the (GC) dump is verified good by users of CopyNES or other ROM dumpers, and it becomes recognized for what it is.
Re: About the "good" versions of the ROMs
by on (#101707)
qbradq wrote:
Does CheckCRC strip off the 16-byte header?

No. But you can use a hex editor for it. Or Notepad++ because, even though it displays the files in text mode, it won't corrupt your data if you change anything.

tepples wrote:
You and Kasumi would have a point if only one program ever made was written in Python.

Well, I got my first PC in 1999 and I never had to use a Python program at all. In Windows, tools that you need are usually available as a Win32 binary.
Re: About the "good" versions of the ROMs
by on (#101714)
JimDaBim wrote:
In Windows, tools that you need are usually available as a Win32 binary.

So if somebody who uses something other than Windows wants to make a tool for you to use, how should he go about it? Must he buy a $200 operating system to run in a VM?
Re: About the "good" versions of the ROMs
by on (#101717)
I never had the situation where somebody specifically had to do a tool for me. And for generic tasks like hash calculation, you usually just need to tell people what to do: "Remove the first 16 bytes from the game with a hex editor and calculate the CRC32."
Re: About the "good" versions of the ROMs
by on (#101721)
The OP didn't seem to be able to get from those high-level instructions to a working solution. I provided an automated and platform-independent solution in a language I am familiar with and delivered it in a transparent way.

Also, I wouldn't advise running random binaries you get from people on forums :D
Re: About the "good" versions of the ROMs
by on (#101722)
If I knew how to calculate those check sums, I'd totally write a C tool to make that easy and release the source. It'd be an hour project.
Re: About the "good" versions of the ROMs
by on (#101727)
Calculating a CRC is quite easy. The wikipedia article shows it step by step how to do it by hand; then, you realise that you can achieve the same thing with a kind of modified "Galois" LFSR that shifts your data in the LFSR and XOR it with your polynomial.
Re: About the "good" versions of the ROMs
by on (#101729)
Hrm...

Sounds like we need to get the hash data from Nes Cart DB and make our own NES rom tool :D

And ya, for just about any algorithm you can find a pseudo-code implementation on Wikipedia :P

I'd also like to point out that most "windows binaries" also rely on a run-time of some sort. Every language has it's own run-time decadency unless it directly links against the kernel library. Even that's a run-time, it just happens to come with your OS. And for that matter, most Linux distros come with a few dozen run-times :D.
Re: About the "good" versions of the ROMs
by on (#101772)
Regarding stripping the header in win32:

http://gnuwin32.sourceforge.net/downlinks/coreutils.php

If you don't want everything, just keep tail.exe and use:

Code:
tail --bytes=+17 yourrom.nes > noheader.bin


It's an 86kbyte exe, so should be pretty painless.