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

Author Topic: [help] Dragon Warrior I Nes - Reverse text flow to RTL [general dialog] ?  (Read 3701 times)

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Hello, i plan to Translation Dragon Warrior I on Nes to Arabic langue. everything are going well,
But is it possible to reverse the flow of text [general dialog] from instead of left to right and make it right to left? Or is this impossible?



thanks...

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
This is certainly possible but requires some ASM work. I'd suggest contacting FARID, he has experience translating games in Perisan, facing the same problem.

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
thx for your replay yes u right some ASM will make this work, so I found the correct value, but the text comes from below.

my goal is right to left...

if anyone want try just

find value
E6D260A508

change it to
C6D260A508



KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6918
  • *sigh* A changed avatar. Big deal.
    • View Profile
You could print right to left with ASM hacking, though it could be a bit slower, as the NES PPU is optimized for either left-to-right (horizontal) or top-to-bottom (vertical) printing direction.
"My watch says 30 chickens" Google, 2018

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
You could print right to left with ASM hacking, though it could be a bit slower, as the NES PPU is optimized for either left-to-right (horizontal) or top-to-bottom (vertical) printing direction.
No, just no. What you mention is for accessing data directly during the same VBlank. What Dragon Warrior does is print letters one by one with a long multi-frame pause between each letter, so the direction in which the PPU automatically increases is irrelevant.

Other text (which is displayed in a single frame) can either be ASM hacked to be backwards (with the potential problem that KingMike mentionned) or be hardcoded backwards in the ROM (much simpler !).

Quote
if anyone want try just

find value
E6D260A508

change it to
C6D260A508
How did you find this trick ?

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
You could print right to left with ASM hacking, though it could be a bit slower, as the NES PPU is optimized for either left-to-right (horizontal) or top-to-bottom (vertical) printing direction.

the problem here, how I do it I have no programming experience i just play in ASM using Debugger to change INC to DEC so i found this code.  :'(

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
Well, as you can see you actually reversed the text direction, but the problem is that the text starts at the left side of the dialog box, so the game detects that the text overflows from the dialog box and goes to the next line after printing 2 letters (you're quite lucky it goes like that - it could have not detected it due to it being already out of range and produce more garbage results !).

So probably you need to keep this change, but also somehow change the initial cursor position so that it starts at the topright of the dialog box.

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Well, as you can see you actually reversed the text direction, but the problem is that the text starts at the left side of the dialog box, so the game detects that the text overflows from the dialog box and goes to the next line after printing 2 letters (you're quite lucky it goes like that - it could have not detected it due to it being already out of range and produce more garbage results !).

So probably you need to keep this change, but also somehow change the initial cursor position so that it starts at the topright of the dialog box.

so after many many try  i found the cursor text for the game, and maybe with luck can make text to right. But so far I have not found the solution.

anywany if any want try just find

85D21860

this code cursor for the text I think..

for example change code to

96D21860



March 27, 2017, 09:21:40 am - (Auto Merged - Double Posts are not allowed before 7 days.)
here some results about RTL text

this code is incomplete

find C6D260A508 change to C6D260A508

find 85D21860 to 4FD21860

you will get RTL text like this >>>



so i need help to find the right the correct value.

any tips notes will Be a good help,

 thx...
« Last Edit: March 27, 2017, 09:24:13 am by q8fft »

FAST6191

  • Hero Member
  • *****
  • Posts: 2610
    • View Profile
For the NES it will probably be a nightmare but many that have sought to translate games to RTL languages before have taken the cowboy method. That being use the left to right engine but stick enough spaces in there that you end up on the right hand side. Functionally it is not a lot different to manual line breaks.

It requires a lot of space, and some engines face memory issues, so hopefully that does not trouble you but it is one that works.

Super cowboy method is mirror. Treat the game and LTR but mirror the glyphs. Mirror the whole screen in the emulator and you have your hack.

That said it looks like you have a start on actually rendering RTL so carry on with that, it looks like a fair bit of the harder stuff is already done or able to fall into place now.

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
For the NES it will probably be a nightmare but many that have sought to translate games to RTL languages before have taken the cowboy method. That being use the left to right engine but stick enough spaces in there that you end up on the right hand side. Functionally it is not a lot different to manual line breaks.

It requires a lot of space, and some engines face memory issues, so hopefully that does not trouble you but it is one that works.

Super cowboy method is mirror. Treat the game and LTR but mirror the glyphs. Mirror the whole screen in the emulator and you have your hack.

That said it looks like you have a start on actually rendering RTL so carry on with that, it looks like a fair bit of the harder stuff is already done or able to fall into place now.
I really appreciate all the previous replies.
I do not know that you will use the same cowboy method or not but what is the cowboy method anywany ?

and what is Super cowboy method is mirror is there any info about ? Or can you explain a little about this method?

According to the research that I have done with many failed attempts I feel close to solving the problem but I said the programming experience is the one that stands in my way.

So I feel I can not understand how to solve this problem, so help will be a great thing for me and I really appreciate this thing

After all, this is what I have reached at the moment, so I am happy to sharing what i got, Although it seems like a nightmare, I am happy at the moment with the results ^^
--------
#1
to make text Vertical appears

find E6D260A508 to C6D260A508
--------
#2
to make text right appears (RTL) [incomplete code]
find E6D260A508 to C6D260A508
find 85D21860 to 4FD21860
-------
#2
RTL [incomplete code]
find E6D260A508 to C6D260A508
find 86D21860 to 4FD21860

------
#3
Increase dialog box capacity more space
find EEE06420 to ECE06420
------
#joke
to go last boss
find 85D21860 to 4CC21860


FAST6191

  • Hero Member
  • *****
  • Posts: 2610
    • View Profile
It sounds like you already have much of the stuff needed to do this properly so continue with that.

Cowboy in UK English is slang for fast and loose, crude but gets it done and not in a good way. If you call a builder a cowboy builder you will be insulting them, and probably get punched. While I am all for doing hacks properly I do occasionally have to pop into threads like these and say "there are easy, if crude, ways to do what you want".

The cowboy method is much as I said. You literally put enough spaces in there that the text ends up on the right hand side. In your case I see those menus. As they are all single words then rather than try to render those right to left you could just write them left to right but in "front" of the word put a few extra space characters. For full in game text it is not good, though the people doing Zelda 64 did that (it is why it is based on the French version and not something more common) and several others doing RTL language hacks have done that before.

For instance the following will probably not work very well, and might depend what font your computer is using but
        One
         day
I walked
     down
         the
    street

None of that uses any justification type formatting, it is just spaces putting it on the right hand side.

Super cowboy is some emulators allow you to mirror the output, some do it for fun, some do it for people with projectors, some do it for other reasons. If you mirror a normal game it ends up mirrored, however if you have your Arabic in left to right but the glyphs that make it up were mirrored before they were injected into the font they will appear the proper way around (mirror of a mirror being back to normal after all) and being written from right to left. Where the spaces method would allow hopefully any flash cart or emulator to do it this would require an emulator with that mode. Fine for PC but not fine if you want people to play on mobile phones, consoles and whatever else.
If you just need a proof of concept though, or a demo shot, or a way for someone to do something before starting it in earnest then it will get it done.

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
I looked into doing it quick and dirty but that doesn't seem to be feasible. The only way is to disassemble the whole part who deals with dialogue box and reverse-engineer how those routines work. Once you have done that, adapt them to display text right to left. There's really no way arround it.

I was able to change where the text initially displays, but then when the text scrolled it would go back to normal. So this definitely requires multiple changes at different locations.

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
i found tutorial about Reverse text direction but in Arabic sorry for that. :thumbsup:

#1
https://www.youtube.com/watch?v=9LBUW2ZLlpA

#2
https://www.youtube.com/watch?v=HOYBzDseVU4

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
thanks to all , We did it Game now Translate and Full RTL Supprted  :thumbsup: ..

you find here
http://www.romhacking.net/translations/2967/

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
Wow, that was quick. Congratulations !

q8fft

  • Jr. Member
  • **
  • Posts: 36
    • View Profile
Wow, that was quick. Congratulations !

thanks i'm glad you like it ;)...

Not fast enough, the project took two months. Because I'm slow to learn... :'(

Bregalad

  • Hero Member
  • *****
  • Posts: 2641
    • View Profile
Well it only took one month based on the date of your original post (although you might have already worting on the translation for another months I don't know).
Even 2 months is very quick, when it's common to spend years on hacks and/or translations here. If you only work on it during weekends that makes it done in only a dozen of days, which is quite short.