mamedev / mame

MAME
https://www.mamedev.org/
Other
7.96k stars 1.98k forks source link

snes game astobelx wrong internal checksum [MAME 0.227] #7647

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi

The game astobelx from software list snes has 2 files, but both files have a wrong internal checksum. Why was this game added to the snes software list, since it makes no sense to run the emulator on a corrupted/wrong ROM?

Below is the output of UCON64, and the XML entry of astobelx for the file names:

<software name="astobelx">
            <description>Astérix &amp; Obélix (Euro)</description>
            <year>1995</year>
            <publisher>Infogrames</publisher>
            <info name="serial" value="SNSP-AXOP-FAH, SNSP-AXOP-NOE" />
            <part name="cart" interface="snes_cart">
                <feature name="pcb" value="SHVC-2A0N-20" />
                <feature name="u1" value="U1 P0" />
                <feature name="u2" value="U2 P1" />
                <feature name="u3" value="U3 74LS00" />
                <feature name="u4" value="U4 CIC" />
                <feature name="lockout" value="" />
                <feature name="cart_model" value="SNSP-006" />
                <feature name="cart_back_label" value="SNSP-FAH, SNSP-NOE" />
                <feature name="slot" value="lorom" />
                <dataarea name="rom" size="1572864">
                    <rom name="spal-axop-0 p0.u1" size="1048576" crc="2131d946" sha1="0446176192536b72c77a7783a4f374af6bdb44d6" />
                    <rom name="spal-axop-0 p1.u2" size="524288" crc="2383509b" sha1="a4a01278572a9ebf543f6d6e19fabe7d123f4688" />
                </dataarea>
            </part>
        </software>

file: spal-axop-0 p0.u1

Multi Game Doctor 2/MGD2/Multi Game Hunter/MGH

00007fb0 37 30 41 58 4f 50 00 00 00 00 00 00 00 00 00 00 70AXOP.......... 00007fc0 4f 42 45 4c 49 58 20 20 20 20 20 20 20 20 20 20 OBELIX
00007fd0 20 20 20 20 20 30 00 0b 00 02 33 00 ca 9b 35 64 0....3...5d

Super Nintendo Entertainment System/SNES/Super Famicom OBELIX
Infogrames Europe, Oceania and Asia 1048576 Bytes (8.0000 Mb)

Padded: No Interleaved/Swapped: No Backup unit/emulator header: No HiROM: No Internal size: 16 Mb ROM type: (0) ROM ROM speed: 120 ns (FastROM) SRAM: No Version: 1.0 Checksum: Bad, 0xee32 (calculated) != 0x6435 (internal) Inverse checksum: Bad, 0x11cd (calculated) != 0x9bca (internal) Checksum (CRC32): 0x2131d946

file: spal-axop-0 p1.u2

Multi Game Doctor 2/MGD2/Multi Game Hunter/MGH

00007fb0 44 39 48 01 ce 11 19 43 2a cf 21 63 11 31 a5 8a D9H....C*.!c.1.. 00007fc0 f4 da ed d8 2e 38 28 1f bc 24 38 03 b0 3f 87 40 .....8(..$8..?.@ 00007fd0 08 c4 ec 3f 00 3f f1 0b 05 67 3f 11 f8 e7 14 3f ...?.?...g?....?

Super Nintendo Entertainment System/SNES/Super Famicom .....8(..$8..?.@...? Unknown South Korea 524288 Bytes (4.0000 Mb)

Padded: Maybe, 6720 Bytes (0.0513 Mb) Interleaved/Swapped: No Backup unit/emulator header: No HiROM: No Internal size: 16 Mb ROM type: (f1) ROM + SRAM ROM speed: 120 ns (FastROM) SRAM: Yes, 32 kBytes Version: 1.17 Checksum: Bad, 0xf68e (calculated) != 0x3f14 (internal) Inverse checksum: Bad, 0x0971 (calculated) != 0xe7f8 (internal) Checksum (CRC32): 0x2383509b

ghost commented 3 years ago

Since it's illegal to link to ROM files, I want to ask why not the original sfc ROM file is used with correct internal checksum? For preservation purposes it's the best to use the original ROM dump with correct internal checksum, since this ROM can be used by other SNES emulators too. It's also possible then to check its integrity using tools like UCON64.

The 2 files used in MAME are extracted from this SFC file I think (you see 8MB + 4 MB = 12 MB for the full SFC file)? In either case, the 2 files used by MAME can't be used by any other emulator and also fail for internal checksum verification.

Why is this approach used? I see for example other games in MAME that DO use the SFC format. Why is the original ROM file splitted in 2 files here (so the internal checksum fails)?

UCON64 output on that file shows verified internal checksum on the full SFC file:

Asterix & Obelix (Europe) (En,Fr,De,Es).sfc

Multi Game Doctor 2/MGD2/Multi Game Hunter/MGH

00007fb0 37 30 41 58 4f 50 00 00 00 00 00 00 00 00 00 00 70AXOP.......... 00007fc0 4f 42 45 4c 49 58 20 20 20 20 20 20 20 20 20 20 OBELIX
00007fd0 20 20 20 20 20 30 00 0b 00 02 33 00 ca 9b 35 64 0....3...5d

Super Nintendo Entertainment System/SNES/Super Famicom OBELIX
Infogrames Europe, Oceania and Asia 1572864 Bytes (12.0000 Mb)

Padded: Maybe, 6720 Bytes (0.0513 Mb) Interleaved/Swapped: No Backup unit/emulator header: No HiROM: No Internal size: 16 Mb ROM type: (0) ROM ROM speed: 120 ns (FastROM) SRAM: No Version: 1.0 Checksum: OK, 0x6435 (calculated) == 0x6435 (internal) Inverse checksum: OK, 0x9bca (calculated) == 0x9bca (internal) Checksum (CRC32): 0x83af6152