; mailbox.inc - fixed test mailbox shared by the compiler, generated ; programs, and the x128 harness. Protocol: docs/memory-map.md. ; ; The mailbox is in bank 0 inside bottom common RAM, so it is readable and ; writable from every Nova128 mapping and from the VICE monitor after exit. .ifndef MAILBOX_INC MAILBOX_INC = 1 MB_BASE = $1BF0 MB_MAGIC0 = MB_BASE + 0 ; 'N' ($4E) once the mailbox is initialized MB_MAGIC1 = MB_BASE + 1 ; '8' ($38) MB_PRODUCER = MB_BASE + 2 ; who wrote it (MB_PROD_*) MB_STATUS = MB_BASE + 3 ; MB_ST_* MB_CODE = MB_BASE + 4 ; 2 bytes LE: diagnostic/fault/check code MB_ADDR = MB_BASE + 6 ; 2 bytes LE: fault or check address MB_DATA = MB_BASE + 8 ; 8 bytes producer-defined payload MB_SIZE = 16 MB_MAGIC0_VALUE = $4E MB_MAGIC1_VALUE = $38 MB_PROD_PLATFORM = $01 ; platform probe/skeleton MB_PROD_COMPILER = $02 ; N128C MB_PROD_PROGRAM = $03 ; generated Nova128 program MB_ST_RUNNING = $01 ; written first; still set => hung or crashed MB_ST_PASS = $A5 MB_ST_FAIL = $FA .endif