Trying to make a region-free Korean Mega Drive patch

Started by dire51, May 30, 2022, 08:06:38 PM

Previous topic - Next topic

dire51

First time poster, long time lurker here.

I'm trying to find a way to make the Korean version of Mystic Defender/Kujaku Ou 2, On Dal Jang Goon, region free. As you can see here, on an NTSC-U MD, the game will get to the Samsung logo and just hang there. Music keeps playing, but after that logo, it's just a black screen.

I would love to play this on actual hardware (without shelling out for an actual NTSC-J MD or Samsung Super Gamboy), but the problem is, I have no idea how to create a region-free patch. There's no Game Genie codes for the games, aside from your standard invincibility/etc. Is there anyone here who might be able to at least point me in the right direction toward making this patch?

Jorpho

The first thing that springs to mind is an informative Gamehut video.
https://www.youtube.com/watch?v=kgjQzD8NI48

Of course, in that case he's working from the actual commented source code of the game, but that should "point you in the right direction".
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

dire51

Thanks, that is a good starting point. I'll see if there's anything I can do with it. If anyone else has any suggestions as well, please let me know.

KingMike

Is it generally as simple as using a debugger to look for reads from $A10001 (I think that was the region register) which should return 00/40/80/C0 (the top two bits) dependent on the region found, and then adjusting the following ASM as necessary?

I think I did that when I figured out a Golden Axe III code because then existing code didn't seem to work for me, until I realized I had forgotten about the enable switch on Game Genie when playing on real hardware.
The only other code I remember bothering with was Rolling Thunder 2 (after I bought a CIB JP copy, was surprised a 1991 game had lockout, I thought lockout on Gen/MD games wasn't common until about 1993.) Make the game no longer APPLICABLE TO JAPAN ONLY!!  ;D
"My watch says 30 chickens" Google, 2018

Tony H

This game does the region check differently than most.  It checks the region of the console and loads that value into RAM address FFFE48.  It then checks that RAM address frequently when the game is running, and will only run if it's the correct region.  There are a few different ways to get the game to run on a USA Genesis console.  Keep in mind I don't have actual hardware to test this on.

The easiest way is to use this PAR code so the game thinks it's a Japanese console:

FFFE48:20

Another way is to use a bunch of Game Genie codes for every occurrence of that region check while playing.  I tried 3 Game Genie codes and got it to run for about 5 seconds into the game.  It looks like every time it is getting ready to display some text on the screen, it does a region check.  Would probably take a ton of codes to get it to work for the entire game this way.

The third way will probably work best in your case.  It only takes 3 Game Genie codes (or you can patch them into your ROM), and should work throughout the entire game.

RAW codes       Game Genie codes

00025C:4E71 = REBA-A6W6
00025E:11FC = 9TBA-BCC8
000260:0020 = EABA-AADA

You'll need to reset/start a new game for these codes to work. 

When the game first boots and is checking the console to see what region it is and moving that region code to RAM address FFFE48, these codes change it so that it is moving the region code for Japan (20) straight into the RAM address, instead of it checking the console.  This should make it run on any console.  Let me know if these codes work.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

dire51

Quote from: Tony H on June 01, 2022, 10:53:02 AMThe third way will probably work best in your case.  It only takes 3 Game Genie codes (or you can patch them into your ROM), and should work throughout the entire game.
That did the trick! I patched the ROM I have with those codes, and the game loaded just fine on my Genesis. I'm going to do a playthrough later, see if there are any issues.

I did create an IPS patch for the game, if anyone else is interested. You can download it here.

Thanks to everyone that helped out!

KingMike

Was the game localized into Korean?

I believe the original game was one of the early MD games which had multiple localizations baked into a single ROM.
If they did localize the game into Korean, it would make sense for them to replace just one (Japanese) and not worry about what effect it has on the coding for other regions.
"My watch says 30 chickens" Google, 2018

dire51

It was. They replaced a lot of the Japanese clothing with traditional Korean garb and translated all the text into Korean, not to mention that they used a combination of different graphics from both the US and Japanese versions in the game itself.

And yeah, it's a dual language ROM. I played around with it using my old Magic Key III ages ago and found that you could switch between them.

Tony H

Quote from: dire51 on June 01, 2022, 01:59:32 PM
That did the trick! I patched the ROM I have with those codes, and the game loaded just fine on my Genesis. I'm going to do a playthrough later, see if there are any issues.

I've been working on a region bypass tool and I tried your Korean ROM with the tool, but it failed to fix it.  I've updated the tool so that it will now work on any game that uses that type of region check, and will make it work in any region.

If you have any other region locked ROMs, this tool might be able to make it region free.

Link to the region bypass tool post: https://www.romhacking.net/forum/index.php?topic=35066.0
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

dire51

Quote from: Tony H on June 09, 2022, 01:23:51 PM
I've been working on a region bypass tool and I tried your Korean ROM with the tool, but it failed to fix it.  I've updated the tool so that it will now work on any game that uses that type of region check, and will make it work in any region.

If you have any other region locked ROMs, this tool might be able to make it region free.

Link to the region bypass tool post: https://www.romhacking.net/forum/index.php?topic=35066.0
Nice! That'll come in handy. Thanks for adding the Korean region check.