Megaman - The Wily Wars (USA) - Recovery & Restoration

Started by Runex, May 26, 2021, 06:24:11 PM

Previous topic - Next topic


A bit of a read, but hopefully worth the extra detail in this case.
Also, I don't know if it would violate the rules to post a patch for this since the only modifications are just original ROM data (though with no more than 2 consecutive bytes in any one place), but if I get a proper go ahead I'll provide the patch. Otherwise just refer to the small bit of hacking info below.

As a lot of people know 'Megaman - The Wily Wars' was only released on Cartridge (or physical release) in Japan and Europe, so we've only had those two regional releases for the game.
The North American version was only available on the Sega Channel service, way back in the 90s. The game data was downloaded to RAM from the Sega Channel, therefore it was lost every time the Genesis console was powered down, so no one's system stored a copy.

The AtGames Sega Genesis Ultimate Portable Game Player's (released November 13th, 2012) copy of Wily Wars was just the European ROM, so just false hopes there...
but the Sega Genesis Mini that was released to most the world September 19, 2019 did come with a promising looking copy of Wily Wars as being the lost North American version.

I believe there's enough evidence to say that IT MUST indeed be that ROM.
However, there are a couple hacked in modifications I've observed with it, but I've found it to be easily restorable to an untampered-with, original ROM.
As I've read, the company M2 was officially hired to "port" all the games for the Genesis Mini, so these couple hacks would most likely have been done by them.

- Explanation of the USA ROM from the Mini -
The changes hacked to the game appear to solely focus on an anti-seizure measure when selecting a Robot Master from the Stage Select, where originally the screen flashes rapidly, but now only a few slow blinks, and they simply disabled the Security Checksum routine so the game would boot with that change in place (otherwise Red Screen of Death).
Those modifications were made to it in exactly the same ways- byte for byte, as the Jap ROM that also came on the Mini, except this English ROM has a different Address space unique to itself, so it must be a different build of the game that's never been seen before.

In its hacked state neither Checksums are correct, the Genesis Header's Checksum nor the game's internal set of Security Checksums (and the function to utilize them is disabled); however when I revert all the hacked changes made to this unique English ROM, gathered using the differences between the Mini's Jap ROM vs an original unmodified Jap ROM (from Cartridge), all Checksums now match the ROM's data and all the game's Security Checksums are once again in use and properly functional. So from that point on if a single byte of the ROM is changed it'll boot to a red screen of death (as it should), but otherwise boots up normally.

One odd thing however is this USA ROM has the same Company Serial # (in the Genesis Header) as the Jap ROM, though more fitting than having the European Serial # as the Japanese region's came 1st, USA 2nd, & European 3rd, but I'd imagine it's because it never had a physical release...
However even regardless of this, I looked at the Serial # of other Capcom Genesis / Mega Drive games, and for many of them different regions actually do share the same Serial #.

The Serial code is at Address 0x180, and for it and the Jap ROM it reads [GM T-12053 -00], for the European ROM [GM T-12046 -00].

Other Signs of its Legitimacy:
This ROM also has a proper looking USA License screen in similar & same formats of how its done in the USA region of the NES games (there's some differences in each NES game); a good sign to see.
Although yes the European ROM could have been adjusted to make a USA License Screen for release on the Genesis Mini, but doesn't seem to have been nor did they seem to go to those kinds of efforts, nor was there any data to revert involving the License Screen & for the Checksums to match (absolutely no differences with the License Screen between the two Jap ROMs either).

Another sign of legitimacy is the construction hardhat/met enemy turns around before the edge of the screen exactly the same in both the Jap ROMs and this very apparent USA ROM, making for some odd behavior where they flip back and forth rapidly the more the screen edge is closed in on them, but in the European ROM it's fixed so they turn around after halfway leaving the screen, making for much more stable behavior. The order of this fix in the European ver. fits with the order in which the games were released (again Jap, USA, then Europe).

When defeating Wily in MM1 in this USA ROM, at the height of being ejected out of his machine the game awkwardly pauses for a second, same as in both Jap ROMs (from the Mini and the original from Cartridge), but fixed nicely in the European version.

Note: The European ROM is essentially a later revision of the USA ROM, but with its own license screen.

All in all when I consider these major factors, this Sega Genesis Mini ROM legitimately looks like it's the lost USA / North American ROM.


- Other Info surrounding the USA ROM -

Genesis Header Checksums of the Megaman ROMs from the Sega Genesis Mini:
USA ROM's Sega Genesis Header Checksum that's written ~ CB82 (matches a calculated checksum once the modifications are reverted)
(Calculated Checksum value before reverting the changes ~ 23AD)

Jap ROM Sega Genesis Header Checksum that's written ~ EA80 (same as the Original 'Mega World' (Jap) ROM's, and once reverted also matches a calculated checksum)
(Calculated Checksum value before reverting the changes ~ 42AB)

--- How to restore the Data in the USA ROM to be Original ---
Below are all the Addresses for the Data that's different between the Edited Jap ROM found on the Genesis Mini and the Original Jap ROM.
- Use the Data at the below Addresses from the Original Jap ROM (as the source for restoring), and copy the appropriate # of Bytes to the USA ROM (from the Mini) but shifted to its Address space, as shown.
  So to clarify again, the differences between these Jap ROMs (the addresses of hacked data to revert) both exist under "(Jap)" label, so then write that Data from the Original Jap ROM  to  the USA ROM at the Addresses under "(USA - Address differences)" label.

(In Hex)
# of Bytes,  Addresses

     (Jap)  -  (USA - Address differences)
02: 33C   |   33C
01: 5513  |   5513

01: 1824F | 18265
01: 18257 | 1826D
01: 1825D | 18273

01: 18991 | 189A5
01: 18999 | 189AD
01: 1899F | 189B3

01: 1919D | 191AF
01: 191A5 | 191B7
01: 191AB | 191BD

01: 19E93 | 19EA7
01: 19E9B | 19EAF
01: 19EA1 | 19EB5

01: 1F4FD | 1F513
01: 1F52F | 1F545
01: 23BFB | 23C11
01: 24C25 | 24C3B
01: 24C6B | 24C81
01: 24EB9 | 24ECF
01: 24EF1 | 24F07

01: 2547F | 25495
01: 25491 | 254A7

As the USA ROM came on the Sega Genesis Mini the ROM hashes are:
ROM SHA-1      26AD72719991E94DBE477C78E65D68F4A4FE51E6
ROM MD5         8E860E4F7C7EE5FEBAD9134A56766112
ROM CRC32      0CD405DB

After undoing their hacks to it (in its Restored form), the hashes become:
ROM SHA-1      9D91EB73394EB3EBDA7994C8F17B17CB99251B91
ROM MD5         8ED8CECF0939D08521543B9B13F03A61
ROM CRC32      B41EA524

Note:  About the Original 'Rockman - Mega World' ROM
            (the one with EEPROM saving is official, the SRAM "version" is a Hack)

There's been this idea floating around the internet that there was an official Rockman - Mega World ROM with SRAM saving, in addition to the known official EEPROM version.
-   What's often labeled as the "Rockman - Mega World (Japan) (Alt 1)" version of the ROM (in some No-Intro libraries), data-wise shows itself as the legit ROM (with EEPROM saving).
      The other one that many people believe is an official SRAM alternate version to the EEPROM one that typically gets labled "Rockman - Mega World (Japan)" (in those same No-Intro libraries) has
       very clear signs of being a hack, and steals the title from the legit ROM!

1)  This "SRAM version" includes an incorrect Mega Drive Header Checksum (written as 0x7B91 but calculates to 0x63FC), where as the ROM with EEPROM saving has a correct checksum written as 0xEA80.
2)  And the SRAM ROM's internal Security Checksum Sub Routine is disabled using a bunch of 'nop'ed out code which Byte for Byte matches the code changes from MottZilla's SRAM Patch
        (a patch for the European ROM) but shifted to the correct address space for the Jap ROM.
3)  It also has a Region of "1" instead of "J", which isn't necessarily wrong as some games have unusual mysterious Region Codes, but is very strange for this game
        as the others use J for the Japanese ROM (EEPROM saving) both from Cartridge & form the Mini, E for the European ROM, and U for the USA ROM recovered from the Sega Genesis Mini.