Rockman 4 MI re-translation project

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Rockman 4 MI re-translation project

Post by Dwedit »

SatoshiMatrix wrote:Here's what I'm up against. Here's an example of the text in the original.
First picture is unreadable, find a different host that doesn't resize the image.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
SatoshiMatrix
Posts: 287
Joined: Sun Feb 14, 2010 8:38 pm

Re: Rockman 4 MI re-translation project

Post by SatoshiMatrix »

Whoops, that was my fault. Tumblr is the best image sharing site out there since it's free and unlimited, but it does resize images that are wider than 1024 pixels. It doesn't care how long they are though. So with some adjusting:

Image

Still need someone to post ALL the text blocks in the game! The ones posted on the first place are incomplete since they are missing the ( and ) characters, plus the get weapon font, and probably more!
3gengames
Formerly 65024U
Posts: 2281
Joined: Sat Mar 27, 2010 12:57 pm

Re: Rockman 4 MI re-translation project

Post by 3gengames »

SatoshiMatrix wrote:Imgur is the best image sharing site out there since it's free and unlimited
Fixed, oh so ever fixed.
User avatar
SatoshiMatrix
Posts: 287
Joined: Sun Feb 14, 2010 8:38 pm

Re: Rockman 4 MI re-translation project

Post by SatoshiMatrix »

Could someone with hacking skills please look through the Rockman 4 MI rom for all of the text characters?

Tokumaru posted some of them, but what he posted clearly isn't everything as it's missing the lowercase r (as in, Dr. WILY, etc) as well as the brackets ( and ) and other characters that I know are present as well, such as another large font used for the "get weapon" screens. There's probably even more. This hack is pretty nuts.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Rockman 4 MI re-translation project

Post by koitsu »

It's very possible that the pattern table animation tokumaru made was only from a couple spots in the game, and that more (read: different) data is shoved into the pattern table when needed (may differ between chat scenes, e.g. when Dr. Light is there vs. when he isn't). This would explain the missing "r.". I believe it's just a capital D followed by a unique/special tile that shows "r.".

It's also possible that the game uses CHR-RAM (I didn't look) and that there is a special one-off for certain graphics/tiles, and the "r." one is one such tile (drawn entirely by code, rather than an obvious tile somewhere in the ROM). This is extremely common if tile graphics are compressed.

Likewise, it's just as possible the game uses CHR-RAM and manipulates the pattern table per-scanline or "per tile line" (see my prevoious post).

I really don't want to write up a long explanation of how to debug this in FCEUX. I started to, and it just got longer and longer with a bazillion edge cases.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Rockman 4 MI re-translation project

Post by koitsu »

ROM information according to FCEUX (this is from the .zip you provided from mediafire)

Code: Select all

D:\downloads\rockman4_mi_MMC5_patched.nes...

 PRG ROM:   64 x 16KiB
 CHR ROM:    0 x  8KiB
 ROM CRC32:  0x605993fe
 ROM MD5:  0x301a45b6704fc30e53eb690c112dfeb1
 Mapper #:  5
 Mapper name: MMC5
 Mirroring: Vertical
 Battery-backed: Yes
 Trained: No
The ROM image I have for the original US release of Megaman 4 says it's MMC3:

Code: Select all

 PRG ROM:   32 x 16KiB
 CHR ROM:    0 x  8KiB
 ROM CRC32:  0x2bc67aa8
 ROM MD5:  0xdb45eb9413964295adb8d1da961807cc
 Mapper #:  4
 Mapper name: MMC3
 Mirroring: Horizontal
 Battery-backed: No
 Trained: No
So if romhackers did some translation work already and turned this into MMC5, then that explains that.

The first 2 screenshots are from Megaman 4 (US release), in the intro. Note the pattern table contents.

The last 2 screenshots are from the MMC5 version you uploaded to mediafire, same spot in the intro. Note the pattern table contents / differences.

As for your "r.", it's there in the Japanese version -- pattern table #0, top row, 5th tile from the left -- here's a screenshot from the intro (with FCEUX paused) along with the pattern table contents at that time -- but when it gets swapped in/out of the pattern table is entirely dependent upon the code of the game. For example, each "scene" during the intro changes pattern table contents. Not to mention, the code defines how much gets swapped/in out, and where (within PPU RAM / pattern tables). It probably varies all over the place.

While in the US version, the text in the intro actually says "DR.LIGHT" -- a separate tile for D, R, period, L, etc... There is no "r." tile. I have no idea if such is present in the original Japanese release (I only have the MMC5 ROM you provided).

Rockman 4 was released in December 1991, which makes it one of the more advanced/complex games to deal with. Every game is different, but ones which use CHR-RAM (like this) tend to be more painful because a lot of the time the graphics are compressed (to keep ROM size down / saved a lot of money), and because you have to figure out where in the game (and there are usually multiple spots/parts) where the graphics are moved in/out of the pattern table and if there are "one-offs".

Starting to get an idea of how painful this is, and how just asking someone to "quickly look it over" isn't really accurate/effective in cases like this? No offence intended of course, just pointing out that you basically need a dedicated programmer who can work on this for you, and he/she will need to spend a lot of time with the code.
Attachments
3.png
2.png
1.png
0.png
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Rockman 4 MI re-translation project

Post by tokumaru »

SatoshiMatrix wrote:Could someone with hacking skills please look through the Rockman 4 MI rom for all of the text characters?
I took a quick look at the ROM in a tile editor, and a lot of the graphics are uncompressed. At first glance, I didn't find any of the extra characters, but since they are obviously used in the game I'm assuming they are compressed, meaning that the program itself needs to be examined. The program needs to be debugged at the specific parts where these texts appear, so that the routines that load the patterns to CHR-RAM can be examined. Unfortunately, I don't have the time for this, but if you provided save states right before these text screens, that would surely help whoever decides to analyze this.
it's missing the lowercase r (as in, Dr. WILY, etc) as well as the brackets ( and )
These are the ones I couldn't find uncompressed. Maybe they are there and I just didn't see them, but maybe they are compressed, like I said above.
such as another large font used for the "get weapon" screens.
This one can be easily found in a tile editor.
There's probably even more. This hack is pretty nuts.
The only other font I remember seeing has a drop shadow or bevel under it, I don't know where it's used.

Anyway, finding out what characters are already there is the least important thing here, because you can easily add more characters to unused parts of the ROM (there seems to be a lot o blank space in there). The actual work is looking at the pattern tables when each text screen is displayed (again, save states would help), and if there are characters you need that are not available at those specific moments, you need to find characters you can overwrite (such as the Japanese characters, which are useless when English is selected), and hack the routine that loads characters to do just that. After that, all that's left is figuring out the format in which the actual text is stored, so you can write your own text over it. When I say "you" I mean the person who's doing all the hacking, not necessarily you SatoshiMatrix.
User avatar
SatoshiMatrix
Posts: 287
Joined: Sun Feb 14, 2010 8:38 pm

Re: Rockman 4 MI re-translation project

Post by SatoshiMatrix »

Hm, thank you both.

So in the case of Dr. Light, Dr. Cossack etc, the r. is one single character and not treated as two?


given what you guys said, I guess the idea of adding in the lowercase a-z characters from the Megaman 9 font is out of the question as it would be far too difficult for the average rom hacker?

If that's the case, it's kind of a shame. It means I'll have to continue to rewrite the script in CAPSLOCK IS CRUSE CONTROL FOR COOL mode.

would savestates help you guys with stuff? I use NESTERJ for the PSP, and it renders the battery backed sram saves (SAVE) in .zsv format and savestates (STATE) in .zs[number of state] format.

So in this case, it's

Rockman_4_MI_MMC5.zsv

and

Rockman_4_MI_MMC5.zs1
Rockman_4_MI_MMC5.zs2

and so on.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Rockman 4 MI re-translation project

Post by koitsu »

Using YY-CHR in "2BPP NES" mode and "Pattern 通常表示" (Pattern Standard Display), the "r." tile is located at offset 0x48e10, in the MMC5 ROM at mediafire, by the way.

In the official US release (MMC3), you can find the same tile at offset 0x49710, along with lots of Japanese characters. There are also multiple Japanese character sets used (one looks partial, the other looks full) as well as English characters (capitals only of course) a little further down.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Rockman 4 MI re-translation project

Post by koitsu »

SatoshiMatrix wrote:So in the case of Dr. Light, Dr. Cossack etc, the r. is one single character and not treated as two?
Correct, it's a single tile (8x8 pixels), like any other character, just that visually it shows up as "r.". Since there is no single-character/letter on a keyboard that represents it, chances are the text/string parsing code has a special value when using it (possibly they used a special value like $FF to represent it, or possibly the texts are 2-bytes-per-character and it has its own unique code).

For example in the MMC5 Japanese intro (see screenshot), the tile offset/value is $04, but in other areas of the game it might be something different.

Whether or not these tile offsets/values match 1:1 with the actual text in the ROM is unknown to me -- sometimes they don't, sometimes they do, it all depends on the game. Sometimes they even mix-and-match depending on the part of the game/scene (which is very common in games of this complexity (so many scenes, multiple "batches" of character sets, etc.). For example, the English characters of the ASCII table start at offset $20, rather than $00; normally a string like "DOGS" would be represented as bytes $444f4753, but if the programmer of the game chose to stick the base offset for the English set at $60, "DOGS" would be represented by bytes $a4afa7b3.
SatoshiMatrix wrote:given what you guys said, I guess the idea of adding in the lowercase a-z characters from the Megaman 9 font is out of the question as it would be far too difficult for the average rom hacker?
Given that someone already romhacked this thing to move it from MMC3 to MMC5 -- note, I'm ASSUMING the original Japanese release is MMC3, I don't have the ROM so I can't verify -- I would recommend you get in contact with that someone. That's honestly the easiest thing to do.

Is it doable? Yes, but there's a lot of work that has to go into the code part of things; specifically new CHR data needs to be shoved into the pattern table and then used, and whether or not there's actually room in the pattern table is unknown to me (it probably varies per scene). Like with any decent romhack, it all boils down to the code, and very rarely (particularly on complex games) can just be a "graphics hack". TL;DR -- it's not just a simple graphics edit.
SatoshiMatrix wrote:would savestates help you guys with stuff? I use NESTERJ for the PSP, and it renders the battery backed sram saves (SAVE) in .zsv format and savestates (STATE) in .zs[number of state] format.
They would not help me, no. But then again who said any of us are taking on this project? I can't speak for tokumaru, but I know I'm not. I'm just helping with the "technical education" bits. The only "romhack" things I do these days are things that I personally find fun/enjoyable, and I tend to act solo since I "don't work well with others". :-)
Attachments
4.png
User avatar
SatoshiMatrix
Posts: 287
Joined: Sun Feb 14, 2010 8:38 pm

Re: Rockman 4 MI re-translation project

Post by SatoshiMatrix »

The original Rockman 4 uses a varient of the common mmc3.

It's TGROM, MMC3-C (mapper 4) with a 512K combined PRG/CHR, 8K CHR-RAM and a password progress save system.

http://bootgod.dyndns.org:7777/profile.php?id=1489

The North American Mega Man IV is identical, except it uses MMC3-B and has a NES-10.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Rockman 4 MI re-translation project

Post by tepples »

koitsu wrote:Correct, it's a single tile (8x8 pixels), like any other character, just that visually it shows up as "r.". Since there is no single-character/letter on a keyboard that represents it, chances are the text/string parsing code has a special value when using it (possibly they used a special value like $FF to represent it, or possibly the texts are 2-bytes-per-character and it has its own unique code).
The general term for a tile like the "r." in Mega Man series, as seen in the '\' position in Mega Man's block in my 8x8 font collection, is a "ligature". The "Mac OS Roman" character encoding in classic Mac OS had special codes for "fi" (0xDE) and "fl" (0xDF). The "il" in Thwaite, which appears in words like "rebuilt missile silo", "still", "Tilda", and "Milo", has its own character code as well: 0xAF
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Rockman 4 MI re-translation project

Post by tokumaru »

SatoshiMatrix wrote:I guess the idea of adding in the lowercase a-z characters from the Megaman 9 font is out of the question as it would be far too difficult for the average rom hacker?
Not difficult, just time consuming. Like koitsu said, each game is different, there's not any kind of standard defining how patterns are loaded and how text is written to the screen, so each game has to be analyzed in detail before being modified.
would savestates help you guys with stuff?
They would certainly make things quicker for whoever is willing to analyze how the pattern loading and text writing works, because they won't have to play up to the points where the texts appear, they can jump right to analyzing the code.
I use NESTERJ for the PSP, and it renders the battery backed sram saves (SAVE) in .zsv format and savestates (STATE) in .zs[number of state] format.
I'm not sure this format would be useful... the states have to be loaded in an emulator that can debug graphics and code (Nintendulator, FCEUX, etc.) so unless there's a NESTERJ version with these features, or a program that will convert the save states, these won't help.
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Rockman 4 MI re-translation project

Post by koitsu »

tepples wrote:The general term ... is a "ligature". {snipping other stuff, for brevity}
Did not know this -- thank you for the lesson! (Sincerely, not being sarcastic)
User avatar
SatoshiMatrix
Posts: 287
Joined: Sun Feb 14, 2010 8:38 pm

Re: Rockman 4 MI re-translation project

Post by SatoshiMatrix »

I got in touch with the Japanese hacker though email today, and hopefully he'll be able to tell some new info that will help with this. Apparently, all weapon and item screens have been already translated by one of his friends with a better understanding of English, but even so many of them are poorly worded and still somewhat Engrishy.

I've asked him about the possibility of adding the lowercase english alphabet to the hack. I'll see what he says about that and let you guys now. For now, I continue my CAPSLOCK IS CRUSE CONTROL FOR COOL translation.

I used this as a proof of concept.
ImageImage
Post Reply