News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Need help on my hack for The Revenge of Shinobi.  (Read 456 times)

SCD

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 460
  • SPOOOOON!
    • View Profile
Need help on my hack for The Revenge of Shinobi.
« on: September 24, 2017, 12:35:35 pm »
Hi everyone,

I just released a hack for The Revenge of Shinobi that gives the Batman & Spider-Man bosses their original colors from the Beta version to the Final version.

You can check it out here: http://www.romhacking.net/hacks/3679/

There's one more thing that I want to add to my hack, but I don't have the skills to restore it.

That's why I'm looking for someone that's really good on hacking Genesis games to help me restore the missing Staff Roll that only appears in the Good Ending on the Japanese side of the American ROM, I want it to appear on the American side of the ROM:

https://tcrf.net/The_Revenge_of_Shinobi_(Genesis)#Staff

If someone can help me on this, that would be great.
« Last Edit: October 23, 2017, 04:23:59 am by SCD »

Psyklax

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
    • Psyklax Translations
Re: Need help on my hack for The Revenge of Shinobi.
« Reply #1 on: October 22, 2017, 11:14:53 am »
Okay, I'm gonna take a break now, but I've made some progress, given that I had almost no experience with Genesis hacking before today.

I figured that the region of the console was kept in a register, and the contents of that register were then put somewhere in RAM to refer to during the game. After playing with some region unlocking Game Genie codes for other games, and reading some documentation on the memory map, I figured out that the register for the region is at $A10001 in the 68K bus. So I looked in the ROM for references to that address, and this game has one right at the very beginning: it stores the contents of the register in the D0 register, copies it to D7, and eventually stores it at $FF81 of the RAM. If you change the region in your emulator and check $FF81, you'll see that US is $A0, Europe is $E0, Japan NTSC is $20 and Japan PAL is $60.

So the game looks to $FF81 whenever something happens which is relevant to the region. I tested this by changing all the branching commands I could find so that they would branch if NOT equal rather than if it's equal. The result? Whatever region you selected, the title would always be "The Super Shinobi". I'm onto the right path. :)

I'm gonna take a break, but suffice to say, somewhere in the code is an instruction that checks $FF81 to see if it's set to Japan, and plays the credits if so. It's just a case of finding it and checking it.

EDIT: so much for my break... I've been finding out some more information.

So as far as I can guess, the region code works like this: bit 7 decides if it's English (off = Japanese), bit 6 decides if it's 50hz (off = 60hz) and bit 5 is always on. This game (I can't speak for other games as I haven't checked any) uses a BTST operation on the region code to check if a bit is on or off.

At $8EEC is a check for bit 6, to see if it should run at 50 or 60hz. At $9DD4 is a check for bit 7, to see if the title should be Revenge of Shinobi or The Super Shinobi. There is just one more reference to the region code, at $FBBA. Is this the check for whether to show the credits? Only one way to find out...

EDIT2: God damn it, I just want to beat the boss quick enough to get the good ending! I have infinite energy and shurikens and clearly I need a different weapon. I've tried searching for the boss's health in RAM and just can't find it. If I could just get the good ending then I'll know if my hack works for you.

EDIT3: I've cracked it. :)

After a lot of RAM searching I discovered that $E00C is where your Power Up state is kept, so by fixing that along with infinite energy, the last boss is a pushover. So, the credits...

There's an instruction at $FBC0 that branches if the region is English rather than Japanese, thus bypassing the credits. So, I just replaced it with $4E71 (a NOP, or no operation instruction, that does nothing) so that it doesn't branch regardless of which region you're in. Now the credits work. 8)
« Last Edit: October 22, 2017, 04:49:29 pm by Psyklax »

SCD

  • RHDN Patreon Supporter!
  • Sr. Member
  • *****
  • Posts: 460
  • SPOOOOON!
    • View Profile
Re: Need help on my hack for The Revenge of Shinobi.
« Reply #2 on: October 23, 2017, 04:22:24 am »
I tested it, it works perfectly.

Thank you very much for helping me on this, you're the best.

I credited you for helping me on my hack in the description of it, I also changed it to "The Revenge of Shinobi Restoration" as well.

I don't know why Sega decided to have the Staff Roll only appear on the Japanese side of the ROM in first place, it doesn't make any sense.

I got the help that I need for this hack, so someone can lock this thread up because this hack is done.
« Last Edit: October 23, 2017, 12:57:56 pm by SCD »

Commundert

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Need help on my hack for The Revenge of Shinobi.
« Reply #3 on: November 01, 2017, 05:53:13 am »
ck enough to get the good ending! I have infinite energy and shurikens and clearly I need a different weapon. I've tried searching for the