+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Extracting translation patch from an embedded emulator?
Pages: [1]
Author Topic: Extracting translation patch from an embedded emulator?  (Read 2 times)
dynoma5
Guest
« on: May 03, 2008, 11:06:39 pm »

Hello, I recently found a vba emulator that specifically automatically translate gyakuten saiban to korean. if i use a regular vba emulator it comes in japanese but when i use the other one it automatically translate to korean. It's called vba4hanmaru and there's even an option to turn on and off the patch. Now is it possible to extract the patch from the program and if so how do i do it?
If needed i could post a link to the vba4hanmaru if you guys want to take a look at it. Err I guess it's impossible to do?
« Last Edit: May 04, 2008, 02:27:47 pm by dynoma5 »
HyperHacker
Guest
« Reply #1 on: May 06, 2008, 07:27:44 pm »

Probably the easiest way would be to write a program that reads the process' memory, finds the ROM (look for its header), and reads it out. Then you'd have the patched ROM and could make a patch. First, though, see if source is available or if the author will simply give the patch to you. Smiley
BRPXQZME
Guest
« Reply #2 on: May 06, 2008, 07:38:48 pm »

I seriously doubt they released an emulator for only translating one game unless they couldn’t be bothered to do a patch proper (that is, they probably use the emulator to translate the game rather than the underlying hardware).

And seeing as to how the language is Korean, I can understand why. Hangeul is just not a winner when it comes to low-end video game systems; unless the Japanese version runs the gamut for kanji, you could easily end up running out of glyph space, probably even with compression.

I mean, shame on them for being lazy, but it’s kind of hard to blame them for taking the easy way out instead of having no translation at all.
dormento
Guest
« Reply #3 on: May 06, 2008, 09:23:51 pm »

You could look into the emulator executable with a resource editor, such as Reshacker. I think it is the easiest way. That, of course, assuming they added the ips into the executable as a resource. barring that, you may want to do what HyperHacker said. CurrProcess (hxxp://www.nirsoft.net/utils/cprocess.html) allows you to dump the whole process memory into a file, for example.
Hope it helps.
dynoma5
Guest
« Reply #4 on: May 07, 2008, 06:46:25 pm »

Yeah i found out there were two different version of vba4hanmaru. One of them translate gyakuten saiban 1 only and even have a enable patch option. the other version i found doesn't have that option but translate both gyakuten saiban 1 and 2. I was able to find the patch for 2 but no luck for one. i've been using tiny hex editor to compare both hex of vba4hanmaru and the regular vba emulator. there were some things i found that seemed to be the patch but im not sure how to extract it. should i post a screenshot or something?
Karatorian
Guest
« Reply #5 on: May 08, 2008, 08:48:33 pm »

Is vba an open source (or source availble) emulator? If it is, looking into the source code could shed some light on the modifications present in the vba4hanmaru version. You may also want to find a PC dissasembler and compare the results (using a tool such as diff), however, in that case, you'd only get useful information if the unmodified version you where comparing against was compiled with the same compiler as the modified one.

If you've located what appears to the patch, you can extract it using a tool that reads and writes binary data from within files. (On un*x, I'd suggest dd, but I don't know what to recommend on other platforms.) You could also extract it with a fairly easy to write program if you know how to code. In Python you could use something like this:

Code:
f1 = file('vba4hanmaru.exe', 'rb')
f2 = file('patch.ips', 'wb')
f1.seek(0xDEADBEEF) # Use the proper offset, of course.
data = f1.read(42) # Ditto for size.
f2.write(data)

What format does the patch appear to be in? Does it have a recognizable header? If it starts with "IPS", then it may have the "EOF" marker at the end which would tell you how much data to extract. (Although, the IPS standard isn't very standard, so it may not.)

I'm sure it can be done, so keep at it.

Spikeman
Guest
« Reply #6 on: May 09, 2008, 02:21:27 am »

In the customized VBA can you access the memory viewer? If so you can just dump the memory space from 8000000-9FFFFFF to get the ROM.
Karatorian
Guest
« Reply #7 on: May 09, 2008, 02:51:10 am »

Hey spikeman, you really know your sh*t. I'd have never thought of that.

Why do people do stuff like this? I really don't get it. I'm remind of some poor fool a while back that wanted to create a Zelda hack involving a custome emu packaged in a standalone exe. It's sad really. Some people are so into these games, ad yet, they have no grasp of the spirit of the community. I'm not sure wether I should cry, be sick to my stomach, or be royally p*ssed.

Some people need to get a clue.
BRPXQZME
Guest
« Reply #8 on: May 09, 2008, 10:28:24 am »

For reasons explained in my previous post, it might not be so simple as that. Korean takes a lot of glyph space.
dynoma5
Guest
« Reply #9 on: May 11, 2008, 08:54:39 am »

Haha the vba4hanmaru doesnt have the memory viewer. The ppl who modded it took that option out so I'm trying to use a hex editor. But i have no idea how it works so I'm kind of asking around to try to find out how to work it out.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC