News: 11 March 2016 - Forum Rules

Author Topic: Kanji array supporting dumper  (Read 880 times)

yugisokubodai

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • Assembly
Kanji array supporting dumper
« on: November 04, 2021, 09:42:38 am »
I wonder is there any dumper out there which supports Kanji array?
Say, the game uses the Kanji trigger bytes as

0A=<kanji1>
0B=<kanji2>

Then we have
0A5E=王
0A5F=子

Then the Rom has this string: 0A5E5F
I'd like to dump it out as 王子, not 王<$5F>

It seems that Romjuice has this function, but it sucks.

mziab

  • Sr. Member
  • ****
  • Posts: 330
    • View Profile
    • mteam
Re: Kanji array supporting dumper
« Reply #1 on: November 04, 2021, 02:13:19 pm »
Maybe you should give abcde a spin. AFAIR it supports everything romjuice does and more.

FAST6191

  • Hero Member
  • *****
  • Posts: 3348
    • View Profile
Re: Kanji array supporting dumper
« Reply #2 on: November 04, 2021, 05:37:42 pm »
Personally I would replace the flag, dump it twice with the differing tables and then merge relevant parts.

yugisokubodai

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • Assembly
Re: Kanji array supporting dumper
« Reply #3 on: November 04, 2021, 07:37:42 pm »
Maybe you should give abcde a spin. AFAIR it supports everything romjuice does and more.
Thank you mziab. I gave it a try but I didn't find any Kanji array support in the document.
Btw I've coded the game to force write Kanji array to normal Kanji table, like 0A1234 will be force written to 0A12 and 0A34. This way I can dump the text correctly from Ram memory.

Vehek

  • Full Member
  • ***
  • Posts: 217
    • View Profile
Re: Kanji array supporting dumper
« Reply #4 on: November 04, 2021, 10:02:52 pm »
It doesn't work the same way as romjuice's kanji arrays, but I think you'd use the table switching function.
In this, alternate table entries don't include the trigger byte. Instead of 0A5E=王, the entry in the kanji table would be just 5E=王.

abw

  • Hero Member
  • *****
  • Posts: 589
    • View Profile
Re: Kanji array supporting dumper
« Reply #5 on: November 06, 2021, 05:05:02 pm »
Thank you mziab. I gave it a try but I didn't find any Kanji array support in the document.
abcde's documentation refers to this as table switching rather than kanji arrays (since in general it has nothing to do with kanji, even though that's what some specific games might happen to use it for). It's not clear from your example how your game decides to switch from kanji back to the original table, but if it just keeps going until it can't match another byte, then using 2 table files should work:

Code: [Select]
@main
!0A=,<@kanji>:0

Code: [Select]
@kanji
5E=王
5F=子

yugisokubodai

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • Assembly
Re: Kanji array supporting dumper
« Reply #6 on: November 06, 2021, 10:49:47 pm »
This game uses multi Kanji tables, which triggers by 0A, 0B, 0C....
For example

0A00 = kanji table 1 entry 1
0A01 = kanji table 1 entry 2
0A02 = kanji table 1 entry 3
...
0B00 = kanji table 2 entry 1
0B01 = kanji table 2 entry 2

In Rom, if 2 or more Kanjis are the same table, the table trigger byte is stored once only. For example, 0B0400506 is equivalent to 0B04 0B05 0B06

Abcd is frustrating. I alread coded my own thing though.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7255
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Kanji array supporting dumper
« Reply #7 on: November 23, 2021, 02:15:03 am »
Per game coding issues why I long ago just began making my own dumper/inserter programs, so they can do EXACTLY what they need to do.

But I realize that's not an option for a lot of people.
"My watch says 30 chickens" Google, 2018