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

Author Topic: Help with translating Mega Man VII (SNES)  (Read 1003 times)

4lorn

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Help with translating Mega Man VII (SNES)
« on: May 04, 2019, 08:36:06 am »
Hello, everyone.

SCD suggested I post my issue in the Programming forum, so here goes...

I'm in the process of translating Mega Man VII (Snes). I'm currently using the Restoration patch from SCD and rainponcho for the extra dialogues between Auto and Roll, and the Boss pre-text. So far I've managed to map out on my own everything I needed in order to go ahead with the translation, including the offsets and order of the intro text, offsets for weapons names in the item menu, and offsets for the Boss pre-text as well. The dialogue and shop text only needs one more revision, and graphic editing is done and waiting insertion. However...

First, I found out that for some reason, the intro and the Boss pre-text are written backwards. Which is strange but fine, I guess? I only need to be careful to change the text backwards as well. But the main issue I'm having is with the Boss pre-text. Here's what I mean:



This is a picture of Geiger'd debugger running a small table file I made. In the middle, you'll see Slash Man's intro text.You'll note it's written in reverse and with a mistake: it spells out "URJASSIC JUNGLE", whereas in game it's spelled properly. There are other examples: AWTCH YOUR STEP (Cloud Man), BOYOOYN PRAADIES (Spring Man's "BOYOYON PARADISE"), etc. I also noticed that of all the Bosses, Turbo Man is actually written Man Turbo but the game prints out the name correctly.

I could live with that but if you look closely, in these text intros, there is no byte for an empty space used to separate the text. In other words, for instance, I couldn't edit Freeze Man's intro to be one single word because the game would split it up (like it does with DON'T SLIP!). For this text, the game follows a 3 byte for formatting + 1 byte for letter method, but I have yet to find anything along those 3 bytes that would count as spaces. The intros also include bytes for apostrophes and exclamations, but none for an empty space. I can only assume there's some table and instruction, somewhere, telling it to print out that way but... I've been prodding at poking at the ROM close to a month now, and can't find it.

I ran a comparison between a clean US ROM and one with the Restoration patch applied, and one with other patches that only bring back the intros. I've found some different sequences, of course, but I can't make heads nor tails of these either, and I'm not sure they're actually changing how the text is printed. So far messing with them only seems to trigger flashing text, the text or the Boss not appearing, crashing, or a combination of all. And I'm terrible at debugging - at least I have been with this game -_-

I have thought about taking advantage of the existing spaces but I've checked and checked, and it would turn out to be a terrible or nearly impossible translation. Ideally, I'd need the game to not force an empty space, or at least understand *how* it forces them so I could manipulate it into allowing me to place another character there...

Other than graphic insertion and text revision (and playtesting, of course), this really is the only thing that's missing... Hopefully someone can kindly help me out... :) Thanks in advance!


PS: I've included below a picture that shows how and where the Pre-texts and Boss names appear (just right-click and choose to see the picture, it'll be full size). Once again, please note they're in reverse. I'm sorry the picture is a bit messy but in short, the text highlighted in light blue is the Pre-text, while the red dots are the upper and lower bytes for Boss names - their names aren't entirely mapped out in the pic because I am not changing those, but they're easy to understand.



Edit: Solved, thanks to KingMike and especially DarkSamus993! :) Translation's already uploaded to RHDN, too!

« Last Edit: June 15, 2019, 05:06:28 am by 4lorn »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6885
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #1 on: May 04, 2019, 12:22:57 pm »
Maybe the mixed up text is sprite data.
You can check if it is sprites by disabling layers.

If it is sprites, then it doesn't really matter to the game if it is in order since each tile has its coordinates defined anyways.
"My watch says 30 chickens" Google, 2018

DarkSamus993

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #2 on: May 04, 2019, 01:32:17 pm »
the text is indeed comprised of sprites, and for each tile have x/y positions defined.

here is an example:
Code: [Select]
$C75F71 = ptr ($C9E976) "FREEZE MAN"
$C75F74 = ptr ($C9E9BF) "DON'T SLIP!"


$C9E976 = sprite text ($49 bytes) "FREEZE MAN"
[12] = number of sprites
[28 00 1D 0E]
[28 F8 0D 0E]
[20 00 10 0E]
[20 F8 00 0E]
[17 00 1C 0E]
[17 F8 0C 0E]
[08 00 14 0E]
[08 F8 04 0E]
[00 00 34 0E]
[00 F8 24 0E]
[F8 00 14 0E]
[F8 F8 04 0E]
[F0 00 14 0E]
[F0 F8 04 0E]
[E8 00 30 0E]
[E8 F8 20 0E]
[E0 00 15 0E]
[E0 F8 05 0E]


$C9E9BF = sprite text ($29 bytes) "DON'T SLIP!"
[0A] = number of sprites
[25 FC 61 0E]
[1F FC 39 0E]
[19 FC 2D 0E]
[13 FC 35 0E]
[0B FC 3C 0E]
[FC FC 3D 0E]
[F8 FC 63 0E]
[F0 FC 37 0E]
[E8 FC 38 0E]
[E0 FC 28 0E]

sprite assembly format:
Code: [Select]
byte-1 = xPos
byte-2 = yPos
byte-3 = tile index
byte-4 = tile properties (tile size, vert/horiz flip)

4lorn

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #3 on: May 04, 2019, 04:36:12 pm »
Thank you both! :)

@DarkSamus993: I now understand what I was doing wrong. For one, I wasn't taking into account that extra byte for the number of sprites, which also explains why I couldn't find the pointers - I was searching where the Pre-text started and ended, not the full string. And I really thought there was something elsewhere determining there was a space between the words...

Now it looks doable. Not entirely easy, but certainly doable. Thank you - I owe you one  :thumbsup:


4lorn

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #4 on: May 13, 2019, 10:13:26 am »
Hi! Hopefully someone will still read this post!

I thought I was very close to a release (though it really is close since the Intro, Boss Pre-text, Password Screen and Versus Mode are all done too, and revision's going fast), but turns out I'd just forgotten about one thing - the "READY" message at the start of each level.

I settled on a replacement word ("VAMOS"), then preceeded to edit the graphics. I knew just by looking at the tileset that it wouldn't simply be a matter of tile editing - READY has 5 letters, but there are 4 tiles for the very top of the letters, which are used 5 times. The top of the R is also repeated as the top of the D.

I figured out the offset and data:

Code: [Select]
                  Y                       D                       A                       E                       R
0077100: 0A 1C F4 08 0E 1C FC 04 0E 0C F4 05 0E 0C FC 03 0E FC F4 07 0E FC FC 02 0E EC F4 06 0E EC FC 01 0E DC F4 05 0E DC FC 00
                              Y                       D                       A                       E                       R

And other than replacing "READY" on the tileset with another word of my choosing, I replaced the top of the D (Sequence 0E 0C F4 05) with the same value for the top of the A (06, because it matches the top of the letters in the way I've edited them), so (Value 0E 0C F4 06). However, here's the result:



(I marked the tiles with numerals to understand the tile order) Now, even after the change, it *still* uses the same tile, but then quickly updates to the next one. Now, from KingMike and DarkSamus993 previous answers, I understand the sequences in the string handle x and y positions, but this one I can't figure out.

My guess is that the game is giving off some added instruction for this. Based on that hunch, I messed with the surrounding code. After 007710e it seems to deal with MM's teleporting graphics; however, the code preeceding 0077103 seems to be an extension of "READY" being printed (notice the same byte pattern and values):

Code: [Select]
                  Y                       D                       A                       E                       R
00770D8: 0A 1C 02 0E 0E 1C FA 0D 0E 0C F4 05 0E 0C FC 03 0E FC F4 07 0E FC FC 02 0E EC F4 06 0E EC FC 01 0E DC F4 05 0E DC FC 00
                              Y                       D                       A                       E                       R

However, changing what would be the same value in this sequence doesn't seem to do anything.

Thoughts? Thanks in advance!


« Last Edit: May 13, 2019, 10:35:20 am by 4lorn »

DarkSamus993

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #5 on: May 13, 2019, 11:53:48 am »
There are 14 frames in the "READY" text animation. It sounds like you still need to update some of the sprite assembly to match your new tiles.



Code: [Select]
$C76FA3 = frame #1
[02] = number of sprites
[DC FA 1C 0E]
[DC FC 1C 0E]


$C76FAC = frame #2
[02] = number of sprites
[DC FC 1C 0E]
[DC FA 16 0E]


$C76FB5 = frame #3
[04] = number of sprites
[EC FA 1C 0E]
[EC FC 1C 0E]
[DC FA 16 0E]
[DC FC 1C 0E]


$C76FC6 = frame #4
[04] = number of sprites
[EC FC 1C 0E]
[EC FA 17 0E]
[DC FA 10 0E]
[DC FC 1C 0E]


$C76FD7 = frame #5
[06] = number of sprites
[DC FA 09 0E]
[FC FC 1D 0E]
[FC FA 18 0E]
[EC FA 17 0E]
[EC FC 1C 0E]
[DC FC 1C 0E]


$C76FF0 = frame #6
[06] = number of sprites
[FC FA 18 0E]
[FC FC 1C 0E]
[EC FA 11 0E]
[EC FC 1C 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77009 = frame #7
[06] = number of sprites
[FC FA 12 0E]
[FC FC 1C 0E]
[EC FA 0A 0E]
[EC FC 1C 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77022 = frame #8
[08] = number of sprites
[0C FC 1D 0E]
[0C FA 19 0E]
[FC FA 0B 0E]
[FC FC 1D 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77043 = frame #9
[08] = number of sprites
[0C FA 19 0E]
[0C FC 1D 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77064 = frame #10
[08] = number of sprites
[0C FA 13 0E]
[0C FC 1D 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77085 = frame #11
[0A] = number of sprites
[0C 02 0F 0E]
[1C F4 1A 0E]
[1C FC 1B 0E]
[0C FA 0C 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C770AE = frame #12
[0A] = number of sprites
[1C F4 14 0E]
[1C FC 15 0E]
[0C F4 05 0E]
[0C FC 03 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C770D7 = frame #13
[0A] = number of sprites
[1C 02 0E 0E]
[1C FA 0D 0E]
[0C F4 05 0E]
[0C FC 03 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]


$C77100 = frame #14
[0A] = number of sprites
[1C F4 08 0E]
[1C FC 04 0E]
[0C F4 05 0E]
[0C FC 03 0E]
[FC F4 07 0E]
[FC FC 02 0E]
[EC F4 06 0E]
[EC FC 01 0E]
[DC F4 05 0E]
[DC FC 00 0E]

4lorn

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Help with translating Mega Man VII (SNES)
« Reply #6 on: May 13, 2019, 02:27:22 pm »
Just got home and tested this. It's working now :)

DarkSamus993, you're a life saver. Thank you for your patience and patronage :) I don't think I would've guessed this, even if I did realize there was a follow up to that earlier string. It just didn't occur to me this was for the entire animation (and in reverse, as a lot of things in this game).

Thank you! :thumbsup: