Text encoding: Difference between revisions

From Boktai Hacking Wiki
(Update Boktai 1 (U) encoding table)
(Add encoding table for Boktai 2 (U))
 
Line 9: Line 9:


= Encoding tables =
= Encoding tables =
* [https://git.sr.ht/~raphi/bokmagic/tree/master/item/resources/U3IE/encoding.tbl Boktai 1 (U)]
* [https://git.sr.ht/~raphi/bokmagic/tree/master/item/lib/resources/U3IE/encoding.tbl Boktai 1 (U)]
* [https://git.sr.ht/~raphi/bokasm/tree/master/item/bokasm/wh.sjs.tbl Boktai 3 (J)]
* [https://git.sr.ht/~raphi/bokmagic/tree/master/item/lib/resources/U32E/encoding.tbl Boktai 2 (U)]
* [https://git.sr.ht/~raphi/bokmagic/tree/master/item/lib/resources/U33J/encoding.tbl Boktai 3 (J)]
* Others: ''TODO''
* Others: ''TODO''


[[Category:Documentation]] [[Category:File formats]]
[[Category:Documentation]] [[Category:File formats]]
[[Category:Boktai 1]] [[Category:Boktai 2]] [[Category:Boktai 3]]
[[Category:Boktai 1]] [[Category:Boktai 2]] [[Category:Boktai 3]]

Latest revision as of 08:21, 23 November 2024

Text is stored uncompressed in the Script directory. Each character is encoded as either 1 or 2 bytes.

  • 1 byte: Used for ASCII characters with a code <= 127 (but there are a few exceptions where some ASCII codes have been replaced, see the encoding tables below).
  • 2 bytes: Used for special characters (e.g. arrows) and for non-English characters (e.g. Japanese). The 1st byte will be between 0x80 and 0x85.

In other words, if the top bit of a byte is set, that means it's the 1st byte of a 2-byte character. Otherwise, it's a 1-byte ASCII character.

Example: 0x41, 0x80, 0x25 encodes the two characters A★ in Boktai 1 (U).

Encoding tables