Skip to content

Commit 04c8b9f

Browse files
authored
Update
1 parent a2ec15d commit 04c8b9f

10 files changed

Lines changed: 704 additions & 205 deletions

File tree

README.txt

Lines changed: 89 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
------------------------------------------------------
22

3-
Nombre: HexString
4-
Autor: koda
5-
Latest Version: 1.0
3+
Nombre: HexString
4+
Autor: koda
5+
Latest Version: 1.1.0
66
URL: https://traduccioneskoda.blogspot.com/
7-
Last Update: 23/11/2024
7+
https://github.com/KodingBTW/hexstring
8+
Last Update: 03/12/2024
89

910
------------------------------------------------------
1011
1 - WHAT'S THIS?
@@ -20,8 +21,55 @@ focus on translating.
2021
------------------------------------------------------
2122
2 - WHAT'S NEW
2223
------------------------------------------------------
23-
24-
V1.0
24+
V1.1.0
25+
26+
Bugs Fixed:
27+
- If you split the text when editing, it was
28+
misinterpreted by the encoder as a new pointer.
29+
(Thanks to Wave).
30+
31+
- The text block counter function is now smarter.
32+
If two pointers point to the same text it will be
33+
counted only once.
34+
35+
New features:
36+
- Added text comments, use ";" at begining of a new
37+
line. (it still can be used at character)
38+
39+
- line with @ or | will be ignore too
40+
41+
- Now more exceptions are handled, and an error
42+
text will be displayed giving more information.
43+
44+
- Characters not found in the .tbl file will now be
45+
printed in the following ~hex~ format. (The "~" symbol
46+
is reserved, and will be ignored if used in the
47+
tbl).
48+
49+
-In the same way when encoding, if ~hex~ is found
50+
it will be encoded with its corresponding hex form.
51+
If any character in the text is not assigned to the
52+
dictionary, it will be copied into its ASCCI format.
53+
54+
- Added support for pointers of other formats and
55+
lengths.
56+
2bytes little endian
57+
2bytes big endian
58+
2bytes splitted (lsb-msb)
59+
3bytes (gba format)
60+
4bytes (mega drive - big endian)
61+
62+
- Now when decoding the text, a comment will be
63+
automatically created that contains: the address of
64+
the line, a copy of the text, character length.
65+
66+
- Added previous pointer copy functionality, just
67+
deletes the line and adds the "&" character to the
68+
start of the line, then add his line breaker. The
69+
pointer will be the same as the previous one, very
70+
useful if several pointers point to the same line.
71+
72+
V1.0.0
2573
- Decoding ROM Data.
2674
- Encoding binary files.
2775
- Automatic updates pointers table (Only 2 bytes).
@@ -38,16 +86,31 @@ To decode:
3886
Use the Windows console and type -d, then fill in the
3987
arguments:
4088

89+
- pointersFormat:
90+
91+
-2b --2bytes "little endian"
92+
-2bb --2bytes "big endian"
93+
-2bs --2bytes "splitted lsb-msb"
94+
-3b --3bytes "(bank/2bytespointer) gba format"
95+
-4b --4bytes "Mega drive games little endian"
96+
4197
- romFile: ROM file name.
4298

4399
- pointersStartAddress: Address where the pointer table
44100
begins.
45101

46102
- pointerTableSize: Size of the pointers, in hexadecimal.
47103

48-
- headerSize: The size of the header (Formula: take the
49-
first pointer in the table, reverse it, and subtract
50-
the address where the text begins) in hexadecimal.
104+
- headerSize: The size of the header
105+
106+
Formula: Text Address for the pointer - pointer inverted
107+
(little endian case)
108+
109+
Example: for Goof Troop (U).snes
110+
111+
The pointer format are 2bytes little endian, so the
112+
pointer is "81 E8", the text address is "0x05E881", so
113+
if you use the formula: 5E881 - E881 = 0x50000
51114

52115
- lineBreaker: Code used in the ROM to break the text
53116
strings, e.g., 0x00 or 0xFF. (If there is more than
@@ -67,6 +130,14 @@ To encode:
67130
Use the Windows console and type -e, then fill in the
68131
arguments:
69132

133+
- pointersFormat:
134+
135+
-2b --2bytes "little endian"
136+
-2bb --2bytes "big endian"
137+
-2bs --2bytes "splitted lsb-msb"
138+
-3b --3bytes "(bank/2bytespointer) gba format"
139+
-4b --4bytes "Mega drive games little endian"
140+
70141
- textFile: File with the text.
71142

72143
- textStartAddress: Address where the text block begins.
@@ -76,9 +147,7 @@ arguments:
76147
- pointersStartAddress: Address where the pointer table
77148
begins.
78149

79-
- headerSize: The size of the header (Formula: take the
80-
first pointer in the table, reverse it, and subtract the
81-
address where the text begins) in hexadecimal.
150+
- headerSize: The same decoder formula.
82151

83152
- romFile: ROM file name.
84153

@@ -93,20 +162,20 @@ creating a .bat file for quicker operation.
93162
-Before you begin, it's recommended to make a copy of the
94163
ROM and back up any progress you have.
95164

96-
-You can dump the text and then reinsert it. Use a
97-
hexadecimal comparator to check for discrepancies.
98-
99-
-If you notice that the text size exceeds the available
100-
space in the text block when reinserting, you can search
101-
for empty space in the ROM or simply increase the ROM size.
165+
-Before starting to translate, once the text has been
166+
extracted, reinsert it again. This will help you know
167+
if you are giving the right arguments. You can also use
168+
a hexagecimal comparator and compare it with a made copy.
102169

170+
- If when inserting the text you enter it is greater
171+
than the block. You have three options, reduce the text,
172+
find an empty space, or expand the rom.
103173

104174
------------------------------------------------------
105175
4 - TO DO:
106176
------------------------------------------------------
107177

108-
- I assume at some point I’ll add support for 3-byte
109-
pointers.
178+
- Possibly add new algorithms for new pointer formats.
110179

111180
- A graphical interface—unlikely, as it requires a
112181
lot of work, which I don't have time for right now.

build/HexString/EXE-00.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
[],
9595
False,
9696
False,
97-
1732336836,
97+
1733195104,
9898
[('run.exe',
9999
'C:\\Users\\RODRIGO\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\PyInstaller\\bootloader\\Windows-64bit-intel\\run.exe',
100100
'EXECUTABLE')],

build/HexString/HexString.pkg

5.47 KB
Binary file not shown.

build/HexString/PYZ-00.pyz

4.02 KB
Binary file not shown.

build/HexString/warn-HexString.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Types if import:
1414
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
1515
tracking down the missing module yourself. Thanks!
1616

17-
missing module named org - imported by copy (optional)
18-
missing module named 'org.python' - imported by pickle (optional)
17+
missing module named 'org.python' - imported by copy (optional)
18+
missing module named org - imported by pickle (optional)
1919
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
2020
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
21-
missing module named posix - imported by os (conditional, optional), shutil (conditional), importlib._bootstrap_external (conditional), posixpath (optional)
21+
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional)
2222
missing module named resource - imported by posix (top-level)
2323
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional)
2424
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional)

build/HexString/xref-HexString.html

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
205205
<a target="code" href="" type="text/plain"><tt>'org.python'</tt></a>
206206
<span class="moduletype">MissingModule</span> <div class="import">
207207
imported by:
208-
<a href="#pickle">pickle</a>
208+
<a href="#copy">copy</a>
209209

210210
</div>
211211

@@ -1463,8 +1463,8 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
14631463
<a target="code" href="///C:/Users/RODRIGO/AppData/Local/Programs/Python/Python311/Lib/copy.py" type="text/plain"><tt>copy</tt></a>
14641464
<span class="moduletype">SourceModule</span> <div class="import">
14651465
imports:
1466-
<a href="#copyreg">copyreg</a>
1467-
&#8226; <a href="#org">org</a>
1466+
<a href="#'org.python'">'org.python'</a>
1467+
&#8226; <a href="#copyreg">copyreg</a>
14681468
&#8226; <a href="#types">types</a>
14691469
&#8226; <a href="#weakref">weakref</a>
14701470

@@ -1594,12 +1594,6 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
15941594
<a name="decoder"></a>
15951595
<a target="code" href="///C:/Users/RODRIGO/Desktop/ToolsRomHack/HexString/decoder.py" type="text/plain"><tt>decoder</tt></a>
15961596
<span class="moduletype">SourceModule</span> <div class="import">
1597-
imports:
1598-
<a href="#os">os</a>
1599-
&#8226; <a href="#sys">sys</a>
1600-
1601-
</div>
1602-
<div class="import">
16031597
imported by:
16041598
<a href="#main.py">main.py</a>
16051599

@@ -2098,7 +2092,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
20982092
<a target="code" href="///C:/Users/RODRIGO/Desktop/ToolsRomHack/HexString/encoder.py" type="text/plain"><tt>encoder</tt></a>
20992093
<span class="moduletype">SourceModule</span> <div class="import">
21002094
imports:
2101-
<a href="#sys">sys</a>
2095+
<a href="#re">re</a>
21022096

21032097
</div>
21042098
<div class="import">
@@ -4931,6 +4925,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
49314925
&#8226; <a href="#importlib">importlib</a>
49324926
&#8226; <a href="#importlib._bootstrap">importlib._bootstrap</a>
49334927
&#8226; <a href="#importlib._bootstrap_external">importlib._bootstrap_external</a>
4928+
&#8226; <a href="#importlib.machinery">importlib.machinery</a>
49344929
&#8226; <a href="#sys">sys</a>
49354930
&#8226; <a href="#warnings">warnings</a>
49364931

@@ -5061,7 +5056,8 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
50615056
</div>
50625057
<div class="import">
50635058
imported by:
5064-
<a href="#importlib.abc">importlib.abc</a>
5059+
<a href="#importlib">importlib</a>
5060+
&#8226; <a href="#importlib.abc">importlib.abc</a>
50655061
&#8226; <a href="#inspect">inspect</a>
50665062
&#8226; <a href="#py_compile">py_compile</a>
50675063

@@ -5813,7 +5809,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
58135809
<a target="code" href="" type="text/plain"><tt>org</tt></a>
58145810
<span class="moduletype">MissingModule</span> <div class="import">
58155811
imported by:
5816-
<a href="#copy">copy</a>
5812+
<a href="#pickle">pickle</a>
58175813

58185814
</div>
58195815

@@ -5843,7 +5839,6 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
58435839
<a href="#argparse">argparse</a>
58445840
&#8226; <a href="#bz2">bz2</a>
58455841
&#8226; <a href="#contextlib">contextlib</a>
5846-
&#8226; <a href="#decoder">decoder</a>
58475842
&#8226; <a href="#email.utils">email.utils</a>
58485843
&#8226; <a href="#fnmatch">fnmatch</a>
58495844
&#8226; <a href="#genericpath">genericpath</a>
@@ -5938,14 +5933,14 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
59385933
<a target="code" href="///C:/Users/RODRIGO/AppData/Local/Programs/Python/Python311/Lib/pickle.py" type="text/plain"><tt>pickle</tt></a>
59395934
<span class="moduletype">SourceModule</span> <div class="import">
59405935
imports:
5941-
<a href="#'org.python'">'org.python'</a>
5942-
&#8226; <a href="#_compat_pickle">_compat_pickle</a>
5936+
<a href="#_compat_pickle">_compat_pickle</a>
59435937
&#8226; <a href="#_pickle">_pickle</a>
59445938
&#8226; <a href="#codecs">codecs</a>
59455939
&#8226; <a href="#copyreg">copyreg</a>
59465940
&#8226; <a href="#functools">functools</a>
59475941
&#8226; <a href="#io">io</a>
59485942
&#8226; <a href="#itertools">itertools</a>
5943+
&#8226; <a href="#org">org</a>
59495944
&#8226; <a href="#pprint">pprint</a>
59505945
&#8226; <a href="#re">re</a>
59515946
&#8226; <a href="#struct">struct</a>
@@ -6153,6 +6148,7 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
61536148
&#8226; <a href="#email.policy">email.policy</a>
61546149
&#8226; <a href="#email.quoprimime">email.quoprimime</a>
61556150
&#8226; <a href="#email.utils">email.utils</a>
6151+
&#8226; <a href="#encoder">encoder</a>
61566152
&#8226; <a href="#encodings.idna">encodings.idna</a>
61576153
&#8226; <a href="#fnmatch">fnmatch</a>
61586154
&#8226; <a href="#fractions">fractions</a>
@@ -6624,13 +6620,11 @@ <h1>modulegraph cross reference for main.py, pyi_rth_inspect.py</h1>
66246620
&#8226; <a href="#contextlib">contextlib</a>
66256621
&#8226; <a href="#dataclasses">dataclasses</a>
66266622
&#8226; <a href="#datetime">datetime</a>
6627-
&#8226; <a href="#decoder">decoder</a>
66286623
&#8226; <a href="#dis">dis</a>
66296624
&#8226; <a href="#email._header_value_parser">email._header_value_parser</a>
66306625
&#8226; <a href="#email.generator">email.generator</a>
66316626
&#8226; <a href="#email.iterators">email.iterators</a>
66326627
&#8226; <a href="#email.policy">email.policy</a>
6633-
&#8226; <a href="#encoder">encoder</a>
66346628
&#8226; <a href="#encodings">encodings</a>
66356629
&#8226; <a href="#encodings.rot_13">encodings.rot_13</a>
66366630
&#8226; <a href="#encodings.utf_16">encodings.utf_16</a>

0 commit comments

Comments
 (0)