News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Script dumping/hex editing a table with a katakana switch?  (Read 2365 times)

burn_654

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Script dumping/hex editing a table with a katakana switch?
« on: December 21, 2011, 11:41:48 pm »
Hi there, I'm almost done with a hiragana table for a game (through WindHex) and making steady progress.

I have a question before I start the katakana table.

My game uses control codes for special characters (dakuten and handakuten). For instance - B9= け while B9DE= げ
This is well and good and seems to work inside of a table.

The problem:
The control code '5C' seems to switch from hiragana to katakana, and then is used at the end of however many katakana again to switch it back.

Default behavior seems to start as hiragana. How can I teach my table to pick up on this control code? It uses (as far as I can tell) the same data values as hiragana, the switch just tells it to look at the katakana characters. For instance 44 44 44 will show up as 3 hiragana and 5C 44 44 5C 44 will show up as 2 katakana and a hiragana.

Or if I'm reaching a point where I should dump this portion of the script, how can I instruct the dumper to follow this switch? I don't want to split it into different files if it's not necessary. I hear Cartographer might be able to do this for me?

Thanks for any assistance!

« Last Edit: December 22, 2011, 11:17:11 am by burn_654 »

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Script dumping/hex editing a table with a katakana switch?
« Reply #1 on: December 22, 2011, 12:25:30 am »
Ask Gideon Zhi. Super Robot Wars for Game Boy used that same method.
In the event of a firestorm, the salad bar will remain open.

burn_654

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: Script dumping/hex editing a table with a katakana switch?
« Reply #2 on: December 22, 2011, 01:05:06 am »
Okay, I seem to have made a little headway. Using two table files with switching seems to work with romjuice.

!5C
B1=ァ

Is in my kata.tbl

I put !5C in both of the tables and told romjuice to use hira.tbl and additionally use kata.tbl with -t. I still have a bunch of values unfinished (I tested with only one katakana for kicks) but

<$05>ァ<$B8><$BC><$AE><$DD><$3D><$B9><$DE><$B0><$D1>が<$3C><$CD><$C0>な<$3C>ひと<$00>こんにちは!

Is just what I expected.
Guess what was my first discovered relative string :P

Now I have to figure out how I could reinsert that switch. I know I might not need the katakana space but I'd like to know how to use it, maybe investigate if upper and lower case is possible here using that tile space.