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

Author Topic: [JPN Translators] [PSX] Gunnm - Martian Memory  (Read 1887 times)

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
[JPN Translators] [PSX] Gunnm - Martian Memory
« on: June 09, 2019, 07:59:44 am »
Hello everyone.

My name is ^Ripper from rippersanime.info.
For some time we have been working on the PSX rom "Gunnm - Martian Memory" to be fully translated into English.
The time already spent on the project has been used to make tools to decode -> extract -> recode -> insert texts into the game.
As of writing, most on this work has been done and the game scripts can be modified to display English texts.

Now we are a bit stuck on the translation part.
There were some fan translations out there, but they only covered a small part.
Also the one person who started the full translations has dissapeared for quite some time.

I've had people wanting to help, but none of them know Japanese well, and the machine translation route is far from ideal.

So i'm currently in need of people wanting to help out with translating the game texts.

For a working DEMO of the editing tools i made, please go to https://www.rippersanime.info/Gunnm_DEMO/GUNNM_PSX_Script_DEMO.php?file=MP007_0.LDP

For the forum itself: https://forum.rippersanime.info/viewforum.php?f=10

I hope someone is willing to help out!

^Ripper

[edit]
We have one translator who replied to the ad.
However we can always use more translators to speed things up!
Feel free to contact me if you wish to assist in the project!

Thanks for reading.
[/edit]

« Last Edit: November 10, 2019, 02:06:46 pm by Ripper5555 »

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #1 on: August 01, 2019, 03:53:06 pm »
Additional help is required I'm afraid.
While i can manage the basic hacking of the ROM (being a total noob), i have problems finding a specific piece of code.
And it is driving me up the wall for days.
The problem is this image:

All 7 items in the menu have a different start coordinate or left margin.
And to make matters worse, the text itself has a different margin.
I need that removed to add more text.

Ok for a bit of backstory on text formatting, for more see the links above.
The game uses 2 bytes for each character (Shift-JIS) see: http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml.
The translation also has to use the 2 byte variant for Latin text.

However it also has control characters to define the text formatting.
If the first byte is < 80 hex then the 2 single bytes become control characters (all lower ascii < 128 dec)

WP+xxx-yyy = Window Position, positive/negative xxx offset, positive/negative yyy offset from the center.
BL1616 = Character image size. The character image is 13x13 from a text image library, the rest margins that are defined by this tag. There is NO font, only images!
g0 = Margin-left for the following character.

Original Text   : アイテム
Translated Text : Items
Original HEX    : 83418343836583800000
Translated Hex  : 826882948285828D8293
Max SJIS space  : 5 characters!
Location in file: 7d3e0
Pointer in file: 7D478
Pointer data: E0EB0880
Offset: 11800

What i know:
- Location of the text.
- Pointer of the text.
- Location data of the box.
- Size data of the box.
- Borders of the box.

- Changing the text to include the above control characters works!
This means i can set the start position of the text at any place of the screen and i can set the margins of the text, no problem.
WP+xxx+yyyBL1216 = 16 bytes long and then the actual text has to get placed as well.
But this EATS valuable space i don't have.

So it is overriding previous set parameters.
- Moving the box position moves the text as well.
- Each menu item has it own dedicated line, if i add a newline control character "\\" it overflows on top of the next line.
- Changing the pointer data only changes the text, formatting remains unchanged.

So...

Somewhere in the main executable there is probably something like this.

<box 1 id>
 <menu item 1><Box offset from the left><text margin like BL1616><pointer to text>
 <menu item 2><Box offset from the left><text margin like BL1616><pointer to text>
 etc
 
Due to my lack of knowledge i can't seem to find what is happening before the debugger hits the breakpoint of the text.
I can see it parsing WP, XP, BK, BL tags and finish, but i can't find what is causing the left margin and set the BLxxyy margin tag.

So what i would like is if someone could point to me what code is responsible and if/where in the main executable a value has to get changed to make it happen.
I'm sure the location/margin data has to be stored and referenced somewhere.

If anyone is willing to help that would be great!

^Ripper
« Last Edit: August 02, 2019, 09:56:32 am by Ripper5555 »

slowbeef

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #2 on: August 06, 2019, 03:52:45 pm »
I can give it a shot, but one trick is if you set a breakpoint at the code getting executed, r31 should hold onto the the last function it was called from - if you go back to that and set another breakpoint there, you should be able to trace it back to what called the function you're looking at.

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #3 on: August 06, 2019, 04:28:04 pm »
Thanks, taking a look now.
Also, what would be a good easy psx debugger?
I'm using pSX v1.13 and/or no$psx

Mostly for memory searches i just use Cheat Engine with the ePSXe emulator...i know, don't debug the emulator, but it provides insights i can translate back.

[edit2]
Ok post got accepted.
Atm Arc Impulse is looking at the code :)

Some execution code was found to bypass the left menu margin supplied and make it a fixed number for around the characters.
However the initial position value and the initial margin values that reside in the main executable are not found yet.
[/edit2]
« Last Edit: August 08, 2019, 11:46:18 am by Ripper5555 »

slowbeef

  • Jr. Member
  • **
  • Posts: 44
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #4 on: August 07, 2019, 11:56:32 pm »
I always used PSX truthfully.

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #5 on: August 08, 2019, 11:27:30 am »
No$psx vram viewer shows this:
There are coordinates for the text box.
But i can't seem to find relevant values in the executable.
I do understand that every element is stored seperatly in the executable.
The border, the green semi transparent box where the text is placed uppon, the purple bar.
All found with dimension numbers.
They are stored the other way around, little/big endian, but i can't seem to find the text start coordinates.

Anyone ever reversed using the No$psx vram viewer?



paul_met

  • Full Member
  • ***
  • Posts: 197
    • View Profile
    • Meduza Team
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #6 on: August 08, 2019, 03:21:57 pm »
Dump the RAM and find the sequence of bytes described in "QuadTex" (fifth line of values). The inscription highlighted in red in the first screenshot from No$PSX has the initial coordinates X, Y - "FF23" and "FFEF", respectively. You have to put a breakpoint on writing the value of the X coordinate at the address you found in RAM.

Code: [Select]
"Items"
-------
Symbols step: 800124E4
X string coordinate: 800124D4

« Last Edit: August 08, 2019, 05:01:04 pm by paul_met »

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators | Technical] [PSX] Gunnm - Martian Memory
« Reply #7 on: August 08, 2019, 07:38:38 pm »
Many thanks for the solution :thumbsup:

I was stuck at where it took the base value of the window FF10 (-240) and increased it by 13 to FF23 (-221).
Then i was going through the code where that 13 came from and then you posted :)
If only i knew of that VRAM coordinates thing before, it could have saved me a lot of headaches.

Let me try to track it down further for learning purposes.

One thing is... i was in this code region before...Zeroing out stuff, trying if something stuck to the wall... :banghead:
Oh well...

Many thanks again for the solution.

^Ripper

[edit]
Also found where the values are for the lines other then the left menu :)
There were part of the code itself instead of a pointer or list.
[/edit]
« Last Edit: August 09, 2019, 09:19:53 am by Ripper5555 »

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators] [PSX] Gunnm - Martian Memory
« Reply #8 on: November 10, 2019, 02:09:26 pm »
Our main translator has resigned.
So we are again desperately looking for translators.

Even if you only have 5 minutes a day, we'll take it!
The tools are ready and easy to use.
So if you can spare a little time then please contact me.

Thanks!

^Ripper

( www.rippersanime.info )

kumori

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [JPN Translators] [PSX] Gunnm - Martian Memory
« Reply #9 on: November 11, 2019, 08:28:35 pm »
I could spare some time to work on translations if you're still looking for help  :)

Ripper5555

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: [JPN Translators] [PSX] Gunnm - Martian Memory
« Reply #10 on: November 12, 2019, 05:56:52 pm »
Thanks for the help, see the reply email for more :)