don't click here

Rockman Megaworld

Discussion in 'Technical Discussion' started by Quickman, Apr 22, 2008.

  1. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    I've been poking around with the idea of disassembling Rockman Megaworld to see what makes it tick with a view to making a hack of it which improves its faithfulness to the NES originals and/or splitting the games off as independent games of their own.

    I've not got much, but I do know it has a ker-razy checksum routine. Dig this:
    Code (ASM):
    1. loc_354:
    2.                 lea     (ROM_Start).w,a0
    3.                 lea     (unk_200).w,a1
    4.                 moveq   #$F,d2          ; run checksum check sixteen times
    5.                 moveq   #$FFFFFFFF,d1
    6.  
    7. loc_360:
    8.                 moveq   #0,d0
    9.  
    10. loc_362:
    11.                 add.w   (a0)+,d0
    12.                 dbf     d1,loc_362
    13.                 cmp.w   (a1)+,d0
    14.                 bne.s   BadChecksum
    15.                 dbf     d2,loc_360
    At $200 there's a list of checksums:
    Code (ASM):
    1. unk_200:
    2.                 dc.w $5648
    3.                 dc.w $6B30
    4.                 dc.w $5F4A
    5.                 dc.w $D70C
    6.                 dc.w $256E
    7.                 dc.w $F9FE
    8.                 dc.w $C0AF
    9.                 dc.w $B38A
    10.                 dc.w $01B7
    11.                 dc.w $236D
    12.                 dc.w $10B2
    13.                 dc.w $0E51
    14.                 dc.w $A5EA
    15.                 dc.w $0EAF
    16.                 dc.w $6519
    17.                 dc.w $9C66
    18.                 dc.w $7A4D
    19.                 dc.w $4FF9
    20.                 dc.w $00FF
    21.                 dc.w $0414
    As far as I can tell this checksums everything from $0 to $FFFFF, but in sixteen chunks ($0 to $FFFF, $10000 to $1FFFF, $20000 to $2FFFF etc). BadChecksum writes to some VDP registers, then does the familiar red-screen-of-death.

    Does anyone have any work on this game, or know of anyone who's done any work on this game?
     
  2. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Good grief, that explains why I've been unable to hack the European ROM into playing in NTSC mode.
     
  3. Actually, since each add operation is word-sized, it'll actually check it from $0 to $1FFFF, then from $20000 to $3FFFF, up till $1FFFFF
     
  4. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    Ah, my bad. I have a tendency to miss things like that.
     
  5. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    I found a rom that does just that; it says "Cracked by Jarre" in the beginning, but runs the European rom in NTSC.
     
  6. GeneHF

    GeneHF

    SEGA-ier than you'll potentially ever be. Site Staff
    8,429
    59
    28
    Scenic Studiopolis
    Complete Global Conquest
    It'd be nice if you could crack the games into four separate entries. On the rom currently out, it's impossible to get to The Wily Tower sub-game without using a savestate floating around the web because of a bug in how the game handles save data.
     
  7. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Fixed. There is a ROM you can use to get saving working correctly, it's one of the alternate dumps of the Japanese version.
     
  8. GeneHF

    GeneHF

    SEGA-ier than you'll potentially ever be. Site Staff
    8,429
    59
    28
    Scenic Studiopolis
    Complete Global Conquest
    I've actually never found that copy of it. I only find the broken one.
     
  9. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    I really like this idea. I would have loved this game if it hadn't been for the screwed up controlls.
    Also, if this game is fully disassembled it might be possible to remake the other 3 games.
     
  10. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    Well, I tried to do a 'translation' (replacing the Japanese text with English), but I stopped due to annoying bugs and long weapon names... (I stopped at the Quick-Boomerang, funnily enough.) The text is just in SJIS, but I couldn't find a hex editor that supported it fully so I had to manually convert the weapon names... although English text showed up fine (lol ASCII).
     
  11. Vixy

    Vixy

    Kind & Generous Fluffy Pillow~ Member
    11
    0
    0
    Sweden
    I thought we already covered that on another forum, because I mentioned it.

    I originally found out that the [!](a1) version had SRAM working. It was just that everyone wasn't considering that dump to be as authentic as the good dump that had no extra markings on them. These things tend to be overlooked so easily. (a1) has pretty much always been the alternate version of a good/decent dumped ROM, but it tends to be misunderstood, because people tend to compare these kinds of dumps with bad dumps (b1), over-dumps (o1) and fixed dumps (f1). But give the (a1) version a try any ways.

    Use the code in that version and implement it into the (E) version, or try finding a alternate version of it that allows SRAM. Find the original cart and do proper ROM dumping if you have to, because there are a few that are still interested in a SRAM-enabled English ROM. With or without NTSC mode setting doesn't matter really, but that's the player's personal preference if they want it or not. Most emulators tend to have that feature already, but for Flash Cart users, it would be pretty neat to have this fix added. ^^;
     
  12. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    Doing anything with this game is going to be difficult as hell. It's written in C, so the code is all over the place and makes heavy use of the stack. (Compare how the Sonic games have really quite structured ASM with numerous devices to make the work of writing an object easier.)

    I've been pressing C diligently in IDA Pro for quite a while now, and am up to $40000. A large portion of the game is going to be data (graphics, other stuff like that) which I'm not going to touch. (Selecting thousands of bytes in IDA is not fun.)
     
  13. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
  14. ICEknight

    ICEknight

    Researcher Researcher
    -Replace 0x036A with "Nq".
    -Replace country code to "U".
    -For some reason, replace 0x0188 with "958E".
    -Profit!

    This is all according to "Mega Man - The Wily Wars (E) [f1]". I'd like to know why it works, though...

    EDIT: By the way, didn't Kega Fusion get rid of the saving bug already?
     
  15. Quickman

    Quickman

    be attitude for gains Tech Member
    5,595
    18
    18
    :x
    omg porjcet
    First change: disables checksum error.
    Second change: changes region to US.
    Third change: fixes checksum - kinda pointless given the first change. :P
     
  16. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    What the hell? They actually did that back then? Heh.
    Also, I'll need to look for that working version some time soon.
     
  17. Sintendo

    Sintendo

    Member
    249
    0
    16
    It wasn't as common back then, but it was used. Sonic Spinball was also written in C if I remember correctly.
     
  18. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    Oh right. Forgot about that one.

    In reference to the original topic, I guess this means even with a full disasm, working with the game would be hard work?