The loader binary format was reverseengieered by examining code example https://github.com/Hack-a-Day/2022-Supercon6-Badge-Tools/blob/main/examples/Hackaday-dice-roll/dice_roll.asm - later I found it is reasonably documented in the UserManual for the badge (almost as a footnote under the DIR/LOAD command):
- Header 6 bytes: 00 FF 00 FF A5 C3
- Program length 2 bytes (in 16-bit words, Low byte first): NN NN
- Program "NN 0N"×Program Length (Low first): NN 0N, NN 0N, ...
- 16-bit Checksum 2 bytes (items 2 and 3 only, Low first): NN NN
Problem 1, The code length is first known after the 1st pass (before generating the header), but I do not have that yet in these earlier bootstrap versions. Initial versions will therefore require the code length as the first 16bit HEX digits. (Ie the text filelength with a little scaling)
Problem 2: "Everyone" seems to know what the checksum algorithm is. But there are many such. I reverseengieered the one in the python cross assembler. It a simple 16 bit sum of 16bit words of the length and all codebytes.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.