Hacking PS1/2 Trying to replace font in PS1 game, but can't find the font images in TIM files

Josh1billion

New Member
OP
Newbie
Joined
Apr 1, 2014
Messages
3
Trophies
1
Age
35
XP
71
Country
United States
Hi all,

I want to translate a game ("Oz No Mahoutsukai: Another World-Rung Rung") from Japanese into English.

This is my first attempt at ROM hacking, but so far, I've been successful in writing some CLI tools (in Node.js) that's gotten me up to a point where I have a complete dump of the game's script and can modify it, and verify that the new text is in place when I play the game in an emulator.

But - the problem I'm facing is that reinserting the text only works if I'm reinserting Japanese text. The text just fails to appear (i.e., is invisible) if I insert English text (which, of course, is the point :)) into the game's script - despite attempts with various encodings (UTF, ascii, some form of ISO, and even ShiftJIS for kicks).

From what I've read, it sounds like the issue is that the game probably doesn't have an English font embedded in it.

So, I'm currently at a spot where I'm currently trying to find where the Japanese font lives so that I can replace it (after which, I figure I can have my CLI tool map English characters to individual ShiftJIS-encoded kana/kanji before inserting them into the binary). My first attempt was to load the game's binary files up in TIMViewer to look for images. I was able to dump all the images out of all the binary files and convert them to .bmp files (and replaced the "New Game" and "Continue" images with English translations as a start). But after browsing through all the thousands of bmp files, I couldn't find any that contained kana or kanji. Small chance I might have overlooked them, because there are so many image files, but I did look multiple times, so I doubt it.

Doing some reading online, the next step seemed to be to load the game up in No$psx and examine the VRAM. So I did that, and can see the kana (screenshot below). I see memory addresses associated with them.

But that's about all I can understand here. I'm having a hard time figuring out exactly what this means and what my next step should be.


ps1-emulator-vram.png
 

Solidsnake777

Member
Newcomer
Joined
Sep 22, 2021
Messages
14
Trophies
0
Age
31
XP
41
Country
United States
Hi all,

I want to translate a game ("Oz No Mahoutsukai: Another World-Rung Rung") from Japanese into English.

This is my first attempt at ROM hacking, but so far, I've been successful in writing some CLI tools (in Node.js) that's gotten me up to a point where I have a complete dump of the game's script and can modify it, and verify that the new text is in place when I play the game in an emulator.

But - the problem I'm facing is that reinserting the text only works if I'm reinserting Japanese text. The text just fails to appear (i.e., is invisible) if I insert English text (which, of course, is the point :)) into the game's script - despite attempts with various encodings (UTF, ascii, some form of ISO, and even ShiftJIS for kicks).

From what I've read, it sounds like the issue is that the game probably doesn't have an English font embedded in it.

So, I'm currently at a spot where I'm currently trying to find where the Japanese font lives so that I can replace it (after which, I figure I can have my CLI tool map English characters to individual ShiftJIS-encoded kana/kanji before inserting them into the binary). My first attempt was to load the game's binary files up in TIMViewer to look for images. I was able to dump all the images out of all the binary files and convert them to .bmp files (and replaced the "New Game" and "Continue" images with English translations as a start). But after browsing through all the thousands of bmp files, I couldn't find any that contained kana or kanji. Small chance I might have overlooked them, because there are so many image files, but I did look multiple times, so I doubt it.

Doing some reading online, the next step seemed to be to load the game up in No$psx and examine the VRAM. So I did that, and can see the kana (screenshot below). I see memory addresses associated with them.

But that's about all I can understand here. I'm having a hard time figuring out exactly what this means and what my next step should be.


View attachment 460154
Man, I could use some help getting the party avatars changed in ff7 😆 🤣
 

Josh1billion

New Member
OP
Newbie
Joined
Apr 1, 2014
Messages
3
Trophies
1
Age
35
XP
71
Country
United States
I've poked at this game a long time ago.

It uses the PS1 BIOS font and not an embedded font file.
Thanks, this is helpful. I did some digging with Ghidra after reading your message, and I found the calls to Krom2RawAdd() (the PSX SDK's function for converting from "ShiftJIS byte" to "location in the BIOS font that represents that character") for kanji (and maybe kana? not sure, documentation just says kanji), so I must be pretty close to the draw text routine. Bit difficult understanding all this assembly code. I'm considering just patching the Krom2RawAdd() function itself, so that it will consider the incoming parameters to be ShiftJIS-encoded English alphabet characters (instead of ShiftJIS-encoded ASCII) and point to the appropriate place in the BIOS font that way.. maybe not ideal but seems like maybe the easiest solution?

Man, I could use some help getting the party avatars changed in ff7 😆 🤣
I could probably help with that after I figure this stuff out. :)
 

Solidsnake777

Member
Newcomer
Joined
Sep 22, 2021
Messages
14
Trophies
0
Age
31
XP
41
Country
United States
Thanks, this is helpful. I did some digging with Ghidra after reading your message, and I found the calls to Krom2RawAdd() (the PSX SDK's function for converting from "ShiftJIS byte" to "location in the BIOS font that represents that character") for kanji (and maybe kana? not sure, documentation just says kanji), so I must be pretty close to the draw text routine. Bit difficult understanding all this assembly code. I'm considering just patching the Krom2RawAdd() function itself, so that it will consider the incoming parameters to be ShiftJIS-encoded English alphabet characters (instead of ShiftJIS-encoded ASCII) and point to the appropriate place in the BIOS font that way.. maybe not ideal but seems like maybe the easiest solution?


I could probably help with that after I figure this stuff out. :)
Well, I got them into the game and know how to do it. Now I'm running into color pallette issues and that's where I am now stuck yay
 
Last edited by Solidsnake777,

master801

Well-Known Member
Member
Joined
Feb 24, 2011
Messages
1,246
Trophies
1
XP
2,712
Country
United States
Thanks, this is helpful. I did some digging with Ghidra after reading your message, and I found the calls to Krom2RawAdd() (the PSX SDK's function for converting from "ShiftJIS byte" to "location in the BIOS font that represents that character") for kanji (and maybe kana? not sure, documentation just says kanji), so I must be pretty close to the draw text routine. Bit difficult understanding all this assembly code. I'm considering just patching the Krom2RawAdd() function itself, so that it will consider the incoming parameters to be ShiftJIS-encoded English alphabet characters (instead of ShiftJIS-encoded ASCII) and point to the appropriate place in the BIOS font that way.. maybe not ideal but seems like maybe the easiest solution?


I could probably help with that after I figure this stuff out. :)
iirc the "Krom2RawAdd" function is an actual BIOS call.

I was talking to some PS1 developers (who are waaay more knowledgeable than me) that were basically saying to "shift" the characters.
 
  • Like
Reactions: Josh1billion

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    His organs are a straight ticket to hell
  • BigOnYa @ BigOnYa:
    Esp my biggest one B-)
  • chrisrlink @ chrisrlink:
    no if i was already
    I'd be working for NOA's legal team XD
    +1
  • Xdqwerty @ Xdqwerty:
    btw I like reading but I dont have any good books, idk where the library is nor if there is one here at all and I only like physical books
  • K3Nv2 @ K3Nv2:
    Her opinion differs on big
  • chrisrlink @ chrisrlink:
    working any corp's legal team is like being satan's b*tch
    +1
  • Kirbydogs @ Kirbydogs:
    @BigOnYa Yea, I agree. Skin is good.
    +1
  • Kirbydogs @ Kirbydogs:
    @Xdqwerty hmmmmmmmm........... find a book ordering site?
  • BigOnYa @ BigOnYa:
    @Xdqwerty what's the difference from reading a book online or a physical book? I mean other than the obvious.
  • Kirbydogs @ Kirbydogs:
    eReaders don't provide blue light
  • K3Nv2 @ K3Nv2:
    I know some book nerds that still love physical books some of them are actually collectable
  • BigOnYa @ BigOnYa:
    Tbh I have not read a whole book since high school, 30+ years ago.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, reading one online feels more like reading a document or smh
    +1
  • Xdqwerty @ Xdqwerty:
    @Kirbydogs, How many times I have to tell y'all that we cant buy stuff online here???
  • K3Nv2 @ K3Nv2:
    Have you tried Amazon
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, thats buying online
  • K3Nv2 @ K3Nv2:
    What about ebay
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, *facepalms*
  • K3Nv2 @ K3Nv2:
    Aliexpress?
  • BigOnYa @ BigOnYa:
    I do read Hustler magazine tho, for the informative articles.
  • K3Nv2 @ K3Nv2:
    It has big enough pictures bigonya can understand
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, thats another online store
  • BigOnYa @ BigOnYa:
    Some pics in there take up 2 pages also.
  • Xdqwerty @ Xdqwerty:
    we still cant buy stuff online
  • Xdqwerty @ Xdqwerty:
    rez said we can use credit cards tho but everyone in my country only uses debit cards
    Xdqwerty @ Xdqwerty: rez said we can use credit cards tho but everyone in my country only uses debit cards