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

Author Topic: FF7 NES Chinese Translation  (Read 141327 times)

Alex

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #40 on: August 24, 2008, 03:27:04 pm »
Quote
I'd prefer to see a FF6-style Chicago font, seeing as it's a 8x16 font engine already.
I don't know the text engine deep enough yet to tell how to use the blank tile above each letter.  Even if I did, there aren't enough free tiles in the English tileset.  I can use the Chinese character set space, but so far I only know how to extract 16x16 characters from there. 
Quote
I also took a little fork in the road near the beginning and saw some Chinese text.
That's why I call it a "90%" translation and not a "10000%" translation.  There is an entire block of text that doesn't exist in the original game, so I can't cross-reference it to game transcripts, and they're arranged without context.  If you're going to tell me that I have translation gaps I'd appreciate it if you would help by saying WHERE. 
:) Lindblum great job at releasing a 90% translation patch,but what is left to be done to make it to 100%.

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #41 on: August 24, 2008, 03:37:21 pm »
Hold on, I made a naive move to replace instances of "No." with "#", resulting in stupid text.  I've just replaced the link.
Oh hell, do I have that animated BG bug again?  I don't know what that is, I don't believe I'm overwriting anything I shouldn't...

Quote
what is left to be done to make it to 100%.
By the syntax I can't tell if that was intended to be a question.  I'll address it as one just in case. 
1: I mentioned the non-contexed text.  Not only don't I know where half of it goes, I can't translate it to anything that makes sense to me. 
2: Spell names are not finished, because I don't know what they do.  I'd like to cheat my materia inventory and levels to find out, but haven't succeeded.  Save state hacking was always so easy, what's going on?  I wouldn't trust all their names just yet. 
3: A couple of boss names could be off, because I don't know who they're supposed to be for.  They combined Palmer and Scarlet into someone called Blair (布莱尔).  I haven't seen its map sprite, yet I always assumed it was Palmer (Cid uses the "fat" line), yet its battle sprite is a kunoichi.  I named the enemy Scarlet as if Palmer sent her to attack for him. 
4: I gave spells elemental icons.  These are liable to change. 
5: Armor names are not translated yet. 
6: I don't know what the 板,锁,皮,布 stats refer to.
7: I'd love to fix the punctuation spacing and improve text-wrapping, but (and I've said this many times before) they give me limited memory for each block, and English is not as memory-efficient as Chinese.  I've had to shave a lot of fluff text and minimize punctuation, by deleting spaces after punctuation, and using single-tile characters for interrobang and ellipsis.  I plan to keep looking for ways to save memory, so that I can restore some of the shaved text. 
8: I want to add a couple more credits to the title screen. 

Now that I'm at 90% the rest of my work seems asymptotically greater since it requires more work and investigation.  Honestly I'm a bit exhausted right now. 
« Last Edit: August 24, 2008, 04:37:53 pm by Lindblum »
Confidence is the feeling you have before you understand the situation.

Dwedit

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Dwedit's Website
Re: FF7 NES Chinese Translation
« Reply #42 on: August 24, 2008, 05:32:01 pm »
Running fceux...
Code at 0x145 reads bytes from the script...
Any reason why it first reads an invalid page, then reads the correct value the next time?
yeah, stepping through the rom, these chinese guys can't code!
I see it checks if it's less than B0, would that indicate ASCII?

93B3: reads character byte, multiplies by 16
040E: Code that fills the top half of ascii with 00's

There's a small buffer at 070C-072C that holds the character it will draw into VRAM.

okay... here we go...
At 91B7 it tests if it's ASCII or not, branches ahead to 9199
Sets 0053 with 01 to indicate it's ascii
At 0408, it checks if 0053 is 01, then if it is, it fills the top character with a solid blank.
 (at this point if you change 0053 to 00, it draws it as a 16x16 chinese character...)
If you nop out the part where it blanks out the top half, then change the next byte to tell it to copy two characters instead of one, you get this:
"C'mon newco-"
"D(npo!ofxdp."
I think I'm getting closer.
042C - code which copies the character


(post being edited...)

DISASSEMBLY of code that copies the text character
Code: [Select]
.org $0408
       LDA $0053
       BEQ l0428
       LDY #$08
       LDA #$FF
l0410: INX
       STA $0700,X
       DEY
       BNE l0410
       LDY #$08
       LDA #$00
l041B: INX
       STA $0700,X
       DEY
       BNE l041B
       LDA #$01
       STA $000D
       BNE l042C
l0428: LDA #$04
       STA $000D
l042C: LDY #$00
l042E: LDA ($04),Y
       EOR #$FF
       INX
       STA $0700,X
       INY
       CPY #$08
       BNE l042E
       LDA #$00
l043D: INX
       STA $0700,X
       INY
       CPY #$10
       BNE l043D
       LDA $0004
       CLC
       ADC #$10
       STA $0004
       LDA $0005
       ADC #$00
       STA $0005
       DEC $000D
       BNE l042C
       LDA #$03
       STA $5000
       LDA #$00
       STA $5200
       RTS
« Last Edit: August 24, 2008, 06:39:29 pm by Dwedit »
"We are merely sprites that dance at the beck and call of our button-pressing overlord."

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #43 on: August 24, 2008, 05:50:26 pm »
Quote
I see it checks if it's less than B0, would that indicate ASCII?
I don't know if this is related, but it definitely sounds like it.  In the game's text blocks it uses ASCII values for alphanumeric and punctuation, but when it uses Chinese hanzi it uses a 2-byte code.  An earlier page in this thread shows the game's entire Chinese character set.  It starts with value 0xB0A1.  I guess when it strikes a value of B0 or higher it knows that byte and the next are a hanzi reference.  Notice how the A0 and FF second-bytes don't really seem to point to any character?  I wonder what that's all about.  Thanks for taking a look, by the way. 
Confidence is the feeling you have before you understand the situation.

Dwedit

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Dwedit's Website
Re: FF7 NES Chinese Translation
« Reply #44 on: August 24, 2008, 07:06:27 pm »
Inject replacement code at 0x19361 in file

Replacement ASM code:
Code: [Select]
;Inject into ROM at 0x19361 in file
.org $0408
       LDA $0053
       BEQ not_ascii
       LDA #$02
       BNE skip
not_ascii:
LDA #$04
skip:
       STA $0D
l042C: LDY #$00
l042E: LDA ($04),Y
       EOR #$FF
       INX
       STA $0700,X
       INY
       CPY #$08
       BNE l042E
       LDA #$00
l043D: INX
       STA $0700,X
       INY
       CPY #$10
       BNE l043D
       LDA $0053
       BNE addeight
       LDA $0004
       CLC
       ADC #$10
back:
       STA $0004
       LDA $0005
       ADC #$00
       STA $0005

       DEC $000D
       BNE l042C
       LDA #$03
       STA $5000
       LDA #$00
       STA $5200
       RTS
addeight:
       LDA $0004
       CLC
       ADC #$08
       BNE back
       BEQ back
.end

Replacement Binary:
Code: [Select]
A5 53 F0 04 A9 02 D0 02 A9 04 85 0D A0 00 B1 04
49 FF E8 9D 00 07 C8 C0 08 D0 F3 A9 00 E8 9D 00
07 C8 C0 10 D0 F7 A5 53 D0 1C A5 04 18 69 10 85
04 A5 05 69 00 85 05 C6 0D D0 D1 A9 03 8D 00 50
A9 00 8D 00 52 60 A5 04 18 69 08 D0 E2 F0 E0  

This makes the main dialog use a 8x16 font.  Does not affect battles or the main menu.

List of other routine that may or may not need separate modifications:
19338
19361
193DD
20BE9
20CC8
20D70
20DC1
20E04
20FD8
70BF8
70CD7
70D7F
70DD0
70E13
70FE7
« Last Edit: August 24, 2008, 08:19:57 pm by Dwedit »
"We are merely sprites that dance at the beck and call of our button-pressing overlord."

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #45 on: August 24, 2008, 08:06:41 pm »
You've impressed me again.  Personally, I'm fine with the font, it helps the game look like it's from the 8-bit age (unless people beg me to change it).  My most pressing concern is dialog memory.  I can think of 2 things that would help:
1: A sort of new-line character that tells the text to move to the next line.  This way I can tell text to wrap to the next line without having to write hyphens and padding spaces into the script. 
FYI, each line can hold 19 chars, but a hanzi's right side can reach to the 20th spot. 
FYI, each text string ends with 0D0A ("\r\n"), so obviously I can't use those as return characters. 
2: A way to use 1 or 2 bytes to reference names or words from a word bank.  This alone could do wonders. 
Solve either of these and you get a name on the title screen. 

Caveat: There are times when the game gives you 2 choices in the text box (e.g. at an inn).  I have to make the top line 16 chars long in this case. 
In battle mode when a command is selected it displays over the person's max HP.  It would be nice if it would display right, or not at all. 

I can definitely change "Atk " to "Fight" with improvised tiles if you'd like.  It's impossible to make "Attack" look good in that space.
« Last Edit: August 24, 2008, 08:28:05 pm by Lindblum »
Confidence is the feeling you have before you understand the situation.

RedComet

  • Hero Member
  • *****
  • Posts: 3163
    • View Profile
    • Twilight Translations
Re: FF7 NES Chinese Translation
« Reply #46 on: August 24, 2008, 09:48:37 pm »
Most of that would be pretty simple to implement. I took a look at the game last week and the code is really easy to follow. If someone had the time to play with it a little, they could easily make the mods necessary for a high quality patch.
Twilight Translations - More than just Dragonball Z. :P

Dwedit

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Dwedit's Website
Re: FF7 NES Chinese Translation
« Reply #47 on: August 24, 2008, 10:22:06 pm »
I bet DTE would be really easy to hack in there, seeing as the game is basically designed to draw plot 4x4 tile squares into VRAM for its text drawing.

Or maybe just change it to 4 lines of text with autowordwrap and dictionary compression?

I'm just wondering where we could find a free RAM block to store a line of text?  Maybe the stack top?
« Last Edit: August 24, 2008, 10:34:24 pm by Dwedit »
"We are merely sprites that dance at the beck and call of our button-pressing overlord."

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #48 on: August 24, 2008, 11:05:16 pm »
I've never been ambitious for asm, but I'm starting to want to.  4-line text is probably best for everyone.  It may also mean that I can't use my 16x16 icons anymore for equipment and spell names.  I'll miss them.  Even if you don't code autowordwrap I can wrap the text before writing it into the ROM.  The extra spaces would make the job awkward for the next guy who'll want to play with the text.  Allowing the text to go out to 20 rather than 19 is one nice little thing to do. 

Good night.  Here comes the work week.   
Confidence is the feeling you have before you understand the situation.

maxzhou88

  • Guest
Re: FF7 NES Chinese Translation
« Reply #49 on: August 25, 2008, 10:31:18 am »

szczuru

  • Jr. Member
  • **
  • Posts: 10
  • eLDeZet Ma(j)ster
    • View Profile
    • PSXPL-Team
Re: FF7 NES Chinese Translation
« Reply #50 on: September 05, 2008, 07:46:48 pm »
Great work m8 :)

Do you plan to change the character's avatars or other things?
by szczuru(R) 2006

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #51 on: September 05, 2008, 10:21:06 pm »
I don't think I'm going to get involved in a graphics patch.  The memory is retarded in how it has the same tilesets appear 20 times throughout the ROM.  Annoyance.  I might do some kind of battle improvement, for my own sake at least.  Even though most of the text is translated, I'm not so close to being finished.  I have to study and alter the text engine before I can make this patch become what it's supposed to be.  I have much to learn, and I simply haven't had so much time for that lately. 
Confidence is the feeling you have before you understand the situation.

KungFuFurby

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #52 on: September 07, 2008, 10:41:16 am »
Would you like to do two versions? One of them without modified gameplay execpt for a translation, one with...

Psychlonic

  • Sr. Member
  • ****
  • Posts: 403
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #53 on: September 07, 2008, 03:30:47 pm »
He said he's not interested. Some other people are though. Best case scenario for everyone asking is to wait until the translation is finished and someone else might release secondary patches that pretty the game up. Maybe someone will change the music even. Translation comes first.  :thumbsup:
Just another old and grumpy gamer. Don't mind me.

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #54 on: September 07, 2008, 03:55:31 pm »
Thank you Psychlonic, but I also said that getting to a complete translation will take time, and that graphics, music, and battle improvements use different memory areas, so the world doesn't have to wait for me.  My unfinished patch can be used to help them in the meantime, as long as the romhacker knows how to isolate their changes from my translation in their patch releases.  It still stands that 90% of the main text is translated, but 5% of that is omitted.
« Last Edit: October 16, 2008, 07:45:10 pm by Lindblum »
Confidence is the feeling you have before you understand the situation.

Gilgamesh

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #55 on: September 08, 2008, 02:56:06 pm »
I'm incredibly excited for this, you are the man of year. YOU CAN DO IT!!! /waterboy

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #56 on: October 06, 2008, 01:03:19 pm »
In case anyone was worried that I stopped working on this, well you're just crazy.
The new patch includes armor names, spell names, more text, improved text-wrapping, and...I forget what else.
I translated the armor as best I could, yet I defend the stranger translations such as the Cortex Gauntlet, the Puppet Shinguards, and the Shroom Armor.  (The Gauntlets are supposed to be Capes, but who wears a cape other than Seph (or Vincent (who isn't in this game))? Maybe CaitSith.  Yeah, no one is supposed to wear helmets.  Let it go!)

It's on MediaFire...
http://www.mediafire.com/?wgbznmnxwo3
FF7NES-CH2EN-93%.ips

If you have any intel to contribute, the easytype patch project is on this thread:
http://www.romhacking.net/forum/index.php/topic,7137.0.html
« Last Edit: October 06, 2008, 02:00:09 pm by Lindblum »
Confidence is the feeling you have before you understand the situation.

Googie

  • Hero Member
  • *****
  • Posts: 827
  • I'd like to solve the puzzle... Jiggers!
    • View Profile
    • My work in progress ROM Hacking site
Re: FF7 NES Chinese Translation
« Reply #57 on: October 06, 2008, 04:25:19 pm »
I'm gonna have to try this out right now! Thanks Lindblum, I really appreciate it!  :thumbsup:

Vanya

  • Hero Member
  • *****
  • Posts: 1489
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #58 on: October 07, 2008, 12:45:22 pm »
Sweet! excellent job so far! =)

Lindblum

  • Sr. Member
  • ****
  • Posts: 445
  • Sometimes... Sometimes the diaper leaks.
    • View Profile
Re: FF7 NES Chinese Translation
« Reply #59 on: October 07, 2008, 02:08:23 pm »
My life finally has meaning :D

I believe I might have figured out what may be screwing up the animated BGs.  The 6th Dialog block starts at 0x79011. 
In the original file it ends at 0x7EF7C.  With my patch, since English eats more script space, it ends at 0x7FF31. 
The limit is the start of a graphics block at 0x7FFD0. 
It turns out there was a block hiding from 0x7F110-0x7F724.  This is bad, but the consequences have been mercifully minor. 
I could move some text to the empty space after the block, but even ignoring it I am tight on space (and there are still a few lines left to translate there). 
Should I find myself unable to compress the text to these constraints, I may have to get greedy and corrupt that block. 

About the 4 armor categories, the original translates to Helmet/Armor/Shinguards/Cape.  Since this is unfaithful to the PSX game, I have no need to be faithful to this. 
I settled for translating it to Helmet/Armor/Shinguards/Gauntlet (with icons), since Gauntlets best substitute for Bangles from the PSX game.  I'll probably change it around to Helmet/Armor/Gauntlet/Cape in light of new information on Plate/Mail/Leather/Cloth classes. 

Though it pains me to give up the 16x16 icons, I plan to trade them in for the classic 8x8 icons, which will allow me to fit one more letter into Weapon/Armor/Spell names. 
Confidence is the feeling you have before you understand the situation.