shawngmc / game-extraction-toolbox

Python tools for extracting ROMs from games and investigating files
MIT License
66 stars 7 forks source link

Adds alternate revisions to Mega Man X Legacy Collection #74

Open shloop opened 4 months ago

shloop commented 4 months ago

The rev. 1 versions of Mega Man X and Rockman X appear to be contained as well, but it's a bit tricky. Only the part of each ROM different from the respective rev. 0 version is stored. This change grabs the starting 0x80000 byte chunks of each rev. 1 version and then fills them in with the remaining 0x100000 bytes from the rev. 0 versions. I'm not positive, but I expect the latter 0x100000 byte chunk is all graphics data which was not changed between revisions. When I tried to extract the whole ROM sequentially it still loaded in an emulator but with garbled graphics. I have verified that the resulting rev. 1 version of Rockman X matches the hash for "Rockman X (Japan) (Rev 1)" in the No-Intro database.

Notably, the rev. 1 version of Mega Man X still contains the text "LICENSED BY NINTENDO" which was removed from the other version.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Feilakas commented 4 months ago

Here's something interesting:

Regarding the "Mega Man X r1.sfc" both this commit and your original script seem to be creating an non-standard ROM file.

The "correct" Mega Man X (USA) (Rev 1).sfc should have a CRC32 hash of "DED53C64" whereas the ROM created here has a CRC32 hash of "0D9BE382"

The two files differ in only 11 bytes at offset 0x03156C through 0x031576 and are actually just the TITLE for the game's controls settings in the Options menu.

Both the original version of Mega Man X and the ROM created here read " CONTROLS " whereas in the "real" Mega Man X (USA) (Rev 1).sfc those bytes read "KEY CONFIG."

I wonder if it is a matter of your code simply failing to replace these 11 bytes (and hence they remain as they were in the original version of the game) or if it was Capcom intentionally choosing to keep the original name of the control settings.

shloop commented 4 months ago

Interesting. I don’t think I have the common r1 dump to compare it to, but I think noticed that text was different between the standard and r1 versions created by the script. I also am not sure if the r1 version was meant to be accessible, since I found out about it by doing searches in a hex editor rather than playing the game.

Also, of all the games produced by this script, none of them matched the no-intro dumps except for Rockman r1. I know Capcom made some changes for the collection since they removed Nintendo’s name from it, and there may be more beyond that.

On Fri, Feb 23, 2024 at 12:33 Feilakas @.***> wrote:

Here's something interesting:

Regarding the "Mega Man X r1.sfc" both this commit and your original script https://github.com/shloop/MMXLC1-Rom-Extractor/blob/master/mmxlc_rom_extract.py seem to be creating an non-standard ROM file.

The "correct" Mega Man X (USA) (Rev 1).sfc should have a CRC32 hash of "DED53C64" whereas the ROM created here has a CRC32 hash of "0D9BE382"

The two files differ in only 11 bytes at offset 0x03156C through 0x031576 and are actually just the TITLE for the game's controls settings in the Options menu.

Both the original version of Mega Man X and the ROM created here read " CONTROLS " whereas in the "real" Mega Man X (USA) (Rev 1).sfc those bytes read "KEY CONFIG."

I wonder if it is a matter of your code simply failing to replace these 11 bytes (and hence they remain as they were in the original version of the game) or if it was Capcom intentionally choosing to keep the original name of the control settings.

— Reply to this email directly, view it on GitHub https://github.com/shawngmc/game-extraction-toolbox/pull/74#issuecomment-1961953831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIWC7XO7OLZLFHQSD7ERDYVD4JHAVCNFSM6AAAAABDR5IISCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRHE2TGOBTGE . You are receiving this because you authored the thread.Message ID: @.***>

Feilakas commented 4 months ago

If you replace the HEX equivalent of CONTROLS (including spaces) with KEY CONFIG. using a hex editor, you will produce a 100% matching file (compare the new CRC32 hash against No-Intro's database).

Speaking of which, after posting this I checked the "original" (r0) version of the ROM and this, too, describes this setting as "KEY CONFIG." so this is definitely an intentional change by Capcom.

shloop commented 4 months ago

Gotcha. I think it's worth keeping as-is for the sake of preservation as this is an official release.