News: 11 March 2016 - Forum Rules

Author Topic: FCEUX Text Hooker, .tht table format  (Read 2565 times)

Ben Boldt

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
    • Fun Projects
FCEUX Text Hooker, .tht table format
« on: February 02, 2020, 03:49:29 pm »
I was playing with Text Hooker for the first time, trying to get it to make some sense of the game "Jarinko Chie - Bakudan Musume no Shiawase Sagashi".  I have not used Text Hooker before so I googled info on it, and it seems the first thing I have to do is build a THT table.  From what I gather, this is a text file, where each line is like this:

00=A
01=B
02=C
etc.

The first 2 digits are a hex code corresponding to the NES PPU's background pattern table, which would correspond to the right side of the window in FCEUX's PPU Viewer.  So, I built up a text file with all 256 hex codes, and filled in the corresponding Japanese Hiragana and Katakana characters, the special tenten and maru keywords per FCEUX help docs, and backfilling the graphics and ones I didn't know with @ symbols:

Code: [Select]
00=
01=あ
02=い
03=う
04=え
05=お
06=か
07=き
08=く
09=け
0A=こ
0B=さ
0C=し
0D=す
0E=せ
0F=そ
10=た
11=ち
12=つ
13=て
14=と
15=な
16=に
17=ぬ
18=ね
19=の
1A=は
1B=ひ
1C=ふ
1D=へ
1E=ほ
1F=ま
20=み
21=む
22=め
23=も
24=や
25=ゆ
26=よ
27=ら
28=り
29=る
2A=れ
2B=ろ
2C=わ
2D=を
2E=ん
2F=ア
30=イ
31=ウ
32=エ
33=オ
34=カ
35=キ
36=ク
37=ケ
38=コ
39=サ
3A=シ
3B=ス
3C=セ
3D=ソ
3E=タ
3F=チ
40=ツ
41=テ
42=ト
43=ナ
44=ニ
45=ヌ
46=ネ
47=ノ
48=ハ
49=ヒ
4A=フ
4B=ヘ
4C=ホ
4D=マ
4E=ミ
4F=ム
50=メ
51=モ
52=ヤ
53=ユ
54=ヨ
55=ラ
56=リ
57=ル
58=レ
59=ロ
5A=ワ
5B=1
5C=ン
5D=@
5E=@
5F=@
60=@
61=@
62=@
63=@
64=@
65=tenten
66=maru
67=2
68=@
69=?
6A=!
6B=3
6C=.
6D=@
6E=@
6F=@
70=@
71=@
72=@
73=@
74=@
75=@
76=@
77=@
78=8
79=@
7A=@
7B=@
7C=@
7D=@
7E=@
7F=@
80=@
81=@
82=@
83=@
84=@
85=@
86=@
87=@
88=@
89=@
8A=@
8B=@
8C=@
8D=@
8E=@
8F=@
90=@
91=@
92=@
93=@
94=@
95=@
96=@
97=@
98=@
99=@
9A=@
9B=@
9C=@
9D=@
9E=@
9F=@
A0=@
A1=@
A2=@
A3=@
A4=@
A5=@
A6=@
A7=@
A8=@
A9=@
AA=@
AB=@
AC=@
AD=@
AE=@
AF=@
B0=@
B1=@
B2=@
B3=@
B4=@
B5=@
B6=@
B7=@
B8=@
B9=@
BA=@
BB=@
BC=@
BD=@
BE=@
BF=@
C0=@
C1=@
C2=@
C3=@
C4=@
C5=@
C6=@
C7=@
C8=@
C9=@
CA=@
CB=@
CC=@
CD=@
CE=@
CF=@
D0=@
D1=@
D2=@
D3=@
D4=@
D5=@
D6=@
D7=@
D8=@
D9=@
DA=@
DB=@
DC=@
DD=@
DE=@
DF=@
E0=@
E1=@
E2=@
E3=@
E4=@
E5=@
E6=@
E7=@
E8=@
E9=@
EA=@
EB=@
EC=@
ED=@
EE=@
EF=@
F0=@
F1=@
F2=@
F3=@
F4=@
F5=@
F6=@
F7=@
F8=@
F9=@
FA=@
FB=@
FC=@
FD=@
FE=@
FF=@

I saved this with Notepad++ with UTF-8 encoding and when I open it in FCEUX, make a selection, and press snap, I get garbage in the "Hooked Text" window.  Going back to Notepad++ and converting it to ANSI encoding, the garbage then corresponds to the ANSI shown in Notepad++.  I also tried saving another .THT file using Japanese Shift-JIS encoding in Notepad++, and it just has a different garbage.

Does anyone know how to correctly encode FCEUX .THT files for Japanese?  Or should I be using something other than FCEUX for this?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 708
  • I am the baldest romhacker
    • View Profile
Re: FCEUX Text Hooker, .tht table format
« Reply #1 on: February 02, 2020, 10:07:20 pm »
It's not meant to output japanese symbols. Its purpose is english pronounce of those symbols like you did with 65 and 66.

You can use Translhextion as an alternative.

supremacy

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: FCEUX Text Hooker, .tht table format
« Reply #2 on: September 05, 2021, 09:05:02 am »
Actually FCEUX should by run with Japanese locale to work with .tht files in Shift-JIS encoding.
You can install https://github.com/xupefei/Locale-Emulator and choose "Locale Emulator -> Run in Japanese" in context menu for fceux.exe
Then it will work as expected.