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
36
XP
93
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
42
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
36
XP
93
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
42
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,284
Trophies
1
XP
2,808
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
  • No one is chatting at the moment.
  • sombrerosonic @ sombrerosonic:
    Especially the salty ones
  • BigOnYa @ BigOnYa:
    Well he's/we bout to be rode hard n dry. If Trumps tariffs go into effect as he wants, a $500 PS5/XBX will now cost $800.
    +1
  • K3Nv2 @ K3Nv2:
    Ps portable $800
  • sombrerosonic @ sombrerosonic:
    Both have no games though
  • K3Nv2 @ K3Nv2:
    Sorry PSPXL
  • sombrerosonic @ sombrerosonic:
    just buy a PC and enjoy the the shit avalable
  • sombrerosonic @ sombrerosonic:
    Tbh, I like PC gaming so much more
  • BigOnYa @ BigOnYa:
    PC and parts cost are gonna skyrocket also.
  • sombrerosonic @ sombrerosonic:
    Oh well, good ol Ebay and facebook marketplace
  • sombrerosonic @ sombrerosonic:
    My first system was a Core 2 Quad I made from spare parts when I was a broke highschooler
    +1
  • sombrerosonic @ sombrerosonic:
    It ran modded minecraft just fine
  • BigOnYa @ BigOnYa:
    Lol, my first pc was a single core pentium 1, 600mhz. 128mb ram.
    +1
  • sombrerosonic @ sombrerosonic:
    Neat, Recently I revieved the boy and put some new hardware in her
    +1
  • sombrerosonic @ sombrerosonic:
    She has a SSD, some Nvidia GPU, and 4 GBs of ram
  • sombrerosonic @ sombrerosonic:
    Perfect for 3D printing and old gaming
  • K3Nv2 @ K3Nv2:
    eMachine all theway
    +2
  • sombrerosonic @ sombrerosonic:
    It has a eMachine case
  • BigOnYa @ BigOnYa:
    I have about 30 old sata HD from xbox360's 120-256gb that don't know what to do with. Tried giving them away on FB marketplace but nobody wants them.
  • sombrerosonic @ sombrerosonic:
    Backups?
  • K3Nv2 @ K3Nv2:
    Back up Diddys records so when trump tries to clear him
  • sombrerosonic @ sombrerosonic:
    I can't believe Squidward was in the Diddy parties...
  • BigOnYa @ BigOnYa:
    I want one, be fun. Only $100k.
  • K3Nv2 @ K3Nv2:
    This Carmel apple cotton candy disgusting tasted like Psis seconds
  • S @ salazarcosplay:
    @BigOnYa bestbuy had a recycling program, you turn in a old hard drive and get 10% off a WD or Sandisk hard drive/SSD
    +1
    SylverReZ @ SylverReZ: https://youtu.be/OtsIO3j3wuw +1