[stella] Cartridge dumper again

Subject: [stella] Cartridge dumper again
From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx>
Date: Fri, 10 Jan 2003 23:21:24 -0800 (PST)
Ok, so far I have successfuly tested:
empty slot, 2K, 4K, F8, FA, F6, DPC, E0, E7, ramplus, superchip

I have code for, but not yet tested:
CV, F0, 3F, FE, F4

I've run in to a sort of bother, and thought I'd ask the community
their thoughts.

When dumping a cart with RAM, the cart RAM contents are essentially
random.  My dumper uses weak pullup resistors on the data bus, so when I
"read" from a RAM "write" address, I read $FF.  Hence when I write a dump,
I write $FF at these locations.

As far as I can tell, other cartridge dumpers do not do this.  As far
as I can tell from binaries I've scavenged from the 'net, other dumpers
write random data.

Take "Dig Dug" as an example.  It is an F6 cart with SuperChip RAM.
The binary image is 16K bytes.  The RAM is mapped in at addresses
$0000-$00ff, $1000-$10ff, $2000-$20ff, and $3000-$30ff.   ($0000 being
the start of the binary file).

In these areas, my dumper writes $FF.  The image I found on the net has
random data here.  Of course the two images have different checksums
and md5sums.

Not only that, but in the image I found on the net, the data at $0000
does NOT match the data at $1000, as you might expect from a dumper that
did a good job of reading the RAM only once.  The data is truly random.

And of course this will cause problems if people depend on checksums
and md5sums to autodetect cartridge type in their emulators.

Maybe I'm a purist, but I'm sort of bothered by this.  I imagine
the maintainers of Good2600 and stella.pro (not to mention avid image
collectors) cursing the powers that be as new images find their way out
to the 'net.

I'm also bothered by something else.  In my large collection, I have
only three binaries labelled "Dig Dug".  One is NTSC, and two are PAL.
If the data in RAM is random at power up, does that mean only one person
has ever dumped that NTSC cart?  Or maybe only that one image is the
only one that made it onto the net, and got pirated from there on out.

In reality I could produce 2^8192 possible binaries for that cart, all
of which would run the same.  I could easily modify this binary and pass
it off as a lost prototype to a naive image collector.

Ok, there's the problem, what's the solution?  Especially given that a
whole BUNCH of roms (over 2000) are floating around the net.

The simplest thing I can think of is a modified checksum algorithm for
images that takes into account things like random RAM data, overdumps,

The most complex solution would be a new binary image format, which
omits unnecessary bits (RAM banks, etc...) and maybe adds new information
(a-la various XML thoughts which have appeared here in the past).


Will code for food.       http://cuddlepuddle.org/~adam/resume.html

adam@xxxxxxxxxxxxxxxx        http://cuddlepuddle.org/~adam/pgp.html

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread