Gaming The Last Ranker Null char

  • Thread starter K.F
  • Start date
  • Views 3,274
  • Replies 18
  • Likes 1

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
Hello everyone.

I am working on translating the Last Ranker, a PSP game. The game text is already translated by "Englishsubs4all", and I already found and extracted the text files and manually translated the intro and the tutorial and they work well. Now I am planning on writing a tool for the translation, but I am having trouble with the null character. The files are in utf-8 format and as with most PSP games, all strings are tailed by a null character. My problem is that when I shift the null character to make a string shorter while the adjacent string longer - the file size stay the same- the game does not allow that and it crashes when the shifted null string is reached to be displayed.

Is there a way to shift the null character to lengthen a string size that needs more space by reducing the other that doesn't? I can continue writing a tool that deals with constant size strings, but that would be a pain to change the translation just because the string is too small.

When I add a null in the middle of the string, the game display the first half the string, then jumps to the next string skipping the other half without crashing which rules out that game is using either using string length and displaying strings sequentially. It was suggested to me that the game may use offset for strings, but I cannot find their locations.

a sample of the files can be found here:

http://wikisend.com/download/169400/MAP_T_KAN_00
 
  • Like
Reactions: Majima

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
The past last Ranker translation threads are in here, so I put mine here too.

Mods can put it where it belongs.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
Not sure if you are asking about extracting the text files or extracting the text itself from the files. If you are asking about the former, the files are at "USRDIR\GAMEDATA\FLD\MAP", they are .BIN files compressed using GZIP so you can simply extract them with 7zip, modify them and compress them again with 7zip using GZIP format.

If you are asking about extracting the text itself, then that is my next objective. I haven't done anything yet until I can solve this problem that I created this thread for. For the intro, as I said, I edited the file manually. I can proceed with constant length strings, but I prefer not to.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,111
Country
France
Ok I wanted to be sure, I do know everything about that already, just wanted to ask if you knew what a pointer was since apparently you're asking about the NULL character which is irrelevant.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
NULL character which is irrelevant.

Why does the game crashes when I shift a null location then?

When I started, I thought -hoped?- that the game displayed strings sequentially with nulls indicating a string end, but after some tests, it is obviously not the case.

As I said, I can't find where the offsets are, nor how they are stored, or even if the games uses them in the first place.

just wanted to ask if you knew what a pointer was

I am not a professional programmer, but I know the basics. So yeah, I know what a pointer is.

Most of my programming background is for small engineering programs, so I haven't worked with a lot of strings or pointers before.
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Basically this means, that there is a list of offsets somewhere, pointing to the beginning of each line. So in order to edit that freely you must find that and correct for every phrase. Usually you write a small script which would extract that text into some CSV or Excel and after that make another script which will assemble all back. All you need is find the format. I am novice in this too, so it is just a guess.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
Yes, this is my understanding too. All what I need to do this is to find these offsets, and I have no Idea how, assuming that is how it works in the first place. Again, this is not necessary to finish the translation, but it would help ALOT and save us so much hassle.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,111
Country
France
Just wanted to say, I was about to do it too, then give that project to some people who lost interest, then Englishsubs4all did the translation so I might look at it again but it's not as simple as looking at the text and changing it, especially with that game. I have to change the way the game buffer the text too, I remember it being a dick and not drawing after like ~11 chars per line.

If it was that simple, believe me it would have been already done, by me. I like that game !
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
Thanks for the heads up. I already translated the intro section and tutorial and it is working for me. Of course that doesn't mean that there will be no problems for the rest of the game, and i'm not giving any promises other than that I will try.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,111
Country
France
That was my question, how did you translated the intro without any text extraction ? Hex editing ? That's just sounds messy to me.
 

K.F

Member
OP
Newcomer
Joined
Jan 10, 2015
Messages
7
Trophies
0
Age
37
XP
52
Country
Saudi Arabia
Yes, and of course it's messy, I just did it as a proof of concept. Now that I know it works without problems, I can write a tool to extract the text.
 

macaronron

Well-Known Member
Newcomer
Joined
Oct 24, 2013
Messages
94
Trophies
1
XP
237
Country
United States
My recommendation: If you figure out your end, get yourself a decent translation checker. Englishsubs4all admits that there may be gratuitous errors in their translation; hopefully having a fully extracted script to check against compared that giant playlist of videos will encourage someone to check for mistakes and fix them.
 

Verard

Member
Newcomer
Joined
Oct 3, 2014
Messages
9
Trophies
0
XP
76
Country
Italy
I'm rooting for her , after all I asked the game XD I have not unfortunately able to help you , but you have all my support u.u
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Just wanted to say, I was about to do it too, then give that project to some people who lost interest, then Englishsubs4all did the translation so I might look at it again but it's not as simple as looking at the text and changing it, especially with that game. I have to change the way the game buffer the text too, I remember it being a dick and not drawing after like ~11 chars per line.

If it was that simple, believe me it would have been already done, by me. I like that game !

Does it really that hard? From what you told all looks quite simple... Normal format for text. normal lookup tables... Find the limiter is not hard too, by me...
 

Scorp

Well-Known Member
Member
Joined
Sep 23, 2010
Messages
248
Trophies
0
XP
296
Country
Kazakhstan
Yes, this is my understanding too. All what I need to do this is to find these offsets, and I have no Idea how, assuming that is how it works in the first place. Again, this is not necessary to finish the translation, but it would help ALOT and save us so much hassle.

If I were you (lol :)), I would just go in debugger, find the address in the memory with text, put a breakpoint on read there, and after check how the routine where you fall back works... MIPS assembler is the dumbest thing I ever saw (comparing with PC or even Z80), this could save you some time in understand it (as there is really 10 different operationgs in max), but as all got compiled from C++, it not straightforward at all to understand what human logic was behind that assembler code...

I think it only on my small experience (I digged max 2 games), so I could be wrong.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,111
Country
France
Does it really that hard? From what you told all looks quite simple... Normal format for text. normal lookup tables... Find the limiter is not hard too, by me...
could be simple, could be not, I've just handed over the project to someone some time ago and they didn't finish the job, I guess I could try to look at it again one day...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Is that a 7950 FX gpu u have? It says it is Vulcan capable. 7800/7900 series both are capable.
  • K3Nv2 @ K3Nv2:
    Pretty sure it's a GIGABYTE GV R795WF3 3GD Radeon HD 7950 3GB 384-bit
    +1
  • K3Nv2 @ K3Nv2:
    I'm hoping the wasps and spiders haven't mated on it
  • BigOnYa @ BigOnYa:
    Should be fine, blow it real good....(not with mouth) and can even take apart and rubbing alcohol clean.
  • K3Nv2 @ K3Nv2:
    For a nas system and emulation 6c should be plenty
  • K3Nv2 @ K3Nv2:
    My movie app updated I,robot for a second I was like did they really remake it
  • BigOnYa @ BigOnYa:
    Why not just use your new main pc, and just get a 50 foot HDMI cable to your TV.
  • K3Nv2 @ K3Nv2:
    Not all of us like long cords up our arse
    +1
  • K3Nv2 @ K3Nv2:
    And I like getting use out of hardware I own or it just becomes dust
    +1
  • BigOnYa @ BigOnYa:
    Not like you have a woman in house to bitch bout the cords. That's true, may as well use what you have.
  • K3Nv2 @ K3Nv2:
    Be a man and use your cord on her
  • K3Nv2 @ K3Nv2:
    Might think about getting a storage unit brand new one opened 5×5 for like $15 a month
  • BigOnYa @ BigOnYa:
    Where you gonna shower tho?
  • K3Nv2 @ K3Nv2:
    Your wife said I could shower with her
    +1
  • K3Nv2 @ K3Nv2:
    Ribs actually turned out decent bit confused everyone said 200F is internal temp but fell off bone anyway at 165
    +1
  • BigOnYa @ BigOnYa:
    I usually just cook ribs till they start to fall off, I don't measure temp.
  • K3Nv2 @ K3Nv2:
    Diarrhea already Have it
  • FluffyLunamoth @ FluffyLunamoth:
    Haven't been back in a long while, whatever happened to the for sale forum?
  • BigOnYa @ BigOnYa:
    They sold it off. Just kidding. https://gbatemp.net/forums/trading-area.160/
  • FluffyLunamoth @ FluffyLunamoth:
    Oh thanks. Now to find it for myself, weird that I missed it...
  • FluffyLunamoth @ FluffyLunamoth:
    Oh I'm dumb lmao
  • SylverReZ @ SylverReZ:
    It's the trading forum, you need about 100 posts for that.
  • K3Nv2 @ K3Nv2:
    That's your man
    +1
    K3Nv2 @ K3Nv2: That's your man +1