Parses the /rtl/core/rom/microcode.asm
file and produces a binary microcode. Very simple and has very few features. #102
starts instruction at position 102 * 4
, and these values (102) map to the instruction decoder. Jumps inside the microcode (which are rare) also use these functions.
Intel's tools have a strange concept of hex
and stipulate the number of bits that can appear on a line. This tool lets you convert a binary file into hex, while specifying the number of nibbles per line.
node modelsim.js input.bin output.hex 4
The trailing 4 specifies 4 nibbles per line, or 16 bits.
The core uses two image formats:
- Background: 16 bit RGB565
- Sprites: 8 bit alphas
This tool converts PNGs to either of those, using the input image dimentions. Expected dimensions are 360x360 for the background, and 400x50 for the spritesheet.
To convert a background:
node prepare_image.js input.png background.bin background
And sprites:
node prepare_image.js input.png sprite.bin sprites
I also built a 6200 assembler and disassembler, but those tools have now been relocated to the tamagotchi-disassembled project.