Hello,
New to rom hacking but been trying to tackle the translation of "Little Princess: Marl Ōkoku no Ningyō Hime 2", since the translated dialogues already exist. I'm aware someone from this forum was doing it some time ago but I guess the project was abandoned.
So, working on it I found where the dialogue is read from the file, it reads 2 bytes, and looks for them on the
Kernel.pak file, and saves the offset to display the characters later, and then goes to the next 2 bytes. Using what I guess is shift-jis.
I decided to make it read 1 byte at a time, to get more space, and write a function to translate the ascii byte into what the
Kernel.pak is using as reference(since it already has latin characters in there), it worked well for the uppercase, lowercase letters and numbers, since they have the same order as in ascii.
The problem is that punctuation marks are unordered, so I had to write what I think is a crude "if-else" using armips.
Here is the script I'm currently trying to use:
; Little princess of Marl Kingdom 2 - Dialogue fix 2bytes to 1 byte
.psx ; Set the architecture to PSX
.open "FIELD.OVL",0x001C0000 ; Open file for output
; 256e in file 6e25 in memory
; 1 means line feed
; 2 or 3 means continues on next window
; Apparently we can't use 0a
; we'll use carriage return 0xd
.org 0x001d48e0 ; Some new code
shift_jis_fix:
lbu r3,0x0(r16)
addiu r5,r0,0x61 ; lowercase limit
bge r3,r5, lower_case
addiu r5,r0,0xd ; New line / new window
beq r3,r5, new_line
addiu r5,r0,0x21
;beq r3,r5, exclamation ; exclamation mark
nop
sll r3,r3,0x8
addiu r3,r3,0x1f82
j return
.org 0x001d48d4
return:
addiu r16,r16,0x1
j 0x001c4ef0
.org 0x001d4910
lower_case:
sll r3,r3,0x8
addiu r3,r3,0x2082
j return
.org 0x001d4920
new_line:
sll r3,r3,0x8
addiu r3,r3,0x6125
j return
.org 0x001d4930
exclamation:
sll r3,r3,0x8
addiu r3,r3,0x2881
j return
.org 0x001c4ed8 ; here, a branch to the new code
addiu r18,r18,0xffff
j shift_jis_fix
.close
Notice that the ";beq r3,r5, exclamation" is commented, this is how it looks without that line:

But if I uncomment the line:

I know it isn't actually a problem with the jump to
exclamation nor that code section since it works with the exclamation marks if I remove the branch to
new_line:
I've been thinking it could be that something is overwriting certain part of the code, but checking that block of memory with pSX's debugger just shows that it is always 00.
Also, I've tried to debug the patched game but no debbuger is working.
No$psx, PCSX 1.5 with Debugger, PCSX Agemo, PCSXTrace, they all freeze at the start of the rom ("NIPPON ICHI SOFTWARE presents"), only pSX has worked but it only works with the unmodified rom (been using psxImager to rebuild the rom). The modified rom is only running with ePSXe.
Any tips on how to continue would be appreciated, and sorry for the lengthy post, I hope I explained the problem well.
Also, I'm sorry if I didn't post on the correct section.