News: 11 March 2016 - Forum Rules

Author Topic: Lufia Restored CRC - What am I missing?  (Read 1926 times)

pinecone

  • Newbie
  • *
  • Posts: 1
    • View Profile
Lufia Restored CRC - What am I missing?
« on: May 11, 2020, 03:11:30 am »
The CRC32 (087FCACF) on the page for this doesn't seem to actually match the rom, with or without header (https://www.romhacking.net/hacks/2744/)

ROM CRC32: 5E1AA1A6 (this matches the one in nointro data)
Headered CRC32: DCFF6D58 (obtained by using tush to add a header)
(Working) patched rom: CRC32: 6709AC00

NSRT also says that 5E1AA1A6 is a good dump of revision 1.0, were there other revisions of this game?

I got the patched rom via applying the patch to the headered rom with CRC32 DCFF6D58 and it at boots in bsnes - does that mean it's good? Why do none of these CRC32s match 087FCACF - is it wrong?

Edit: Mod move this to the newcomer board if it's better off there.
« Last Edit: May 11, 2020, 03:36:48 am by pinecone »

phonymike

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Lufia Restored CRC - What am I missing?
« Reply #1 on: May 13, 2020, 10:09:18 pm »
I have an old "Lufia (US).smc" that has the CRC32 of 087FCACF. With the header removed it is 5E1AA1A6. So it's the same game. If you add a header (so it's 1,049,088 bytes), then it's the correct file to patch. After patching and removing the header, I got CRC32 of 55FF8A59 for Restored 2.4.1 and 27E5A7A3 for Restored VANILLA FONT 2.4.1 which should match yours if you remove the header.

Here are the 512 bytes (0x200 hex) from the beginning of the file (the header). These bytes are not part of the game, they are settings for HiROM/LoROM, SRAM size etc that are used by an old copier device. They can safely be removed after patching. If your ROM is 1,049,088 bytes, overwrite the first 512 bytes with the following. If you have the nointro ROM with a size of 1,048,576 bytes and CRC32 5E1AA1A6, insert these 512 bytes at the beginning. Then you will have the CRC32 087FCACF file.

Spoiler:
Code: [Select]
00000000 80 00 00 00 00 00 00 00 AA BB 04 00 00 00 00 00 ................
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 ................

This is the problem with SNES ROMs and old copier/backup unit headers. The header is metadata from the copier saved along with the ROM data from the cartridge. Backup units could also dump the saveram to a separate file. Different units have different headers which result in different file checksums, even though the ROM data is the same in all of them. 512 is the sector size of the 3.5 inch floppy disk. So if you don't have a backup unit, you don't need the copier header.

If I find a patch that needs a headered ROM, I add a header, apply the patch, then remove the header, then rename to .sfc. If you do remove the header, make sure the ROM has a different filename than the .ips so your emulator doesn't auto-patch the ROM again and cause corruption. The patched ROM should show up as checksum OK in some emulators because the authors fixed the internal checksum (I use ucon64 for this).