fonts
mft improvements
more descriptive pointer names
Tools for assembling and disassembling Boktai bytecode.
Full support:
Partial support:
No support:
Extract all scripts from a ROM:
# This will extract everything into a GAMEID_data/ directory:
python3 -m bokasm.extract boktai_1_j.gba
# Add extra information to the disassembly:
python3 -m bokasm.extract boktai_1_j.gba --verbose --hexdump
Disassemble a single script:
python3 -m bokasm.disasm boktai_1_j.gba 0xe68e36
Assembling a single script:
# Create "script.bin" from "script.asm":
python3 -m bokasm.asm script.asm
# Assemble from stdin to stdout:
printf "return\ni32 0x777\nend" | python3 -m bokasm.asm | xxd
Injecting a modified script into a ROM. If you know what's good for you, the modified script should be the same size or smaller as the original script when assembled. Otherwise you'll corrupt the following script(s).
$EDITOR U3IE_data/scripts/1234.asm
# Create output.gba from original.gba
python3 -m tools.splice \
--input path/to/original.gba \
path/to/output.gba \
U3IE_data \
# Script ID to inject. You can also specify multiple IDs.
1234
TODO better documentation, for now...
; Semicolons start single-line comments
; General instruction syntax
mnemonic arg1, arg2, named_arg=value1, named_arg2=value2
; Strings are enclosed in double-quotes. You must manually add a null
terminator if you want one. The supported escape sequences are \x and \".
string "hello world\x00"
; Single quotes are equivalent to a u8 immediate. The following instructions
are all equal.
keyword 'i'
keyword 105
keyword 0x69
MIT