Add practical boot-sequence analysis example

This commit is contained in:
Siggi
2026-04-12 13:58:44 +00:00
parent 631dcfc094
commit 88337dfdf3
2 changed files with 61 additions and 4 deletions

View File

@@ -14,10 +14,13 @@ def create_rom(filename, format=3):
"""
os.makedirs(os.path.dirname(filename), exist_ok=True)
instructions = [
TYPE30_NOP, # 0x0000: NOP
TYPE6_AX0 | (0x1234 << 4), # 0x0001: AX0 = 0x1234
TYPE10_JUMP_ALWAYS | (0x0100 << 4), # 0x0002: JUMP 0x0100
# ... add more test patterns ...
0x000000, # 0x0000: NOP
0x401230 | 0x0, # 0x0001: AX0 = 0x1234 (Type 6, simplified field)
0x502000 | 0x0, # 0x0002: I0 = 0x2000 (Type 7)
0x500010 | 0x4, # 0x0003: M0 = 1 (Type 7)
0xC00000 | (0x13<<13) | (0x0<<11) | (0x0<<8) | (0x0<<2) | (0x0),
# 0x0004: X+Y, AX0=DM(I0+=M0), AY0=PM(I4+=M4)
0x18010F, # 0x0005: JUMP 0x0100
]
with open(filename, "wb") as f: