Add an API version

This commit is contained in:
Ry 2023-03-06 17:28:10 -08:00
parent 14bc2afadc
commit 0013a9dffc
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,7 @@ shift_pressed: jmp [0xF0040024]
shift_released: jmp [0xF0040028]
caps_pressed: jmp [0xF004002C]
poweroff: jmp [0xF0040030]
get_rom_api_version: jmp [0xF0040034]
; generic drawing jump table
draw_str_generic: jmp [0xF0041000]

View File

@ -6,6 +6,8 @@ const FOX32ROM_VERSION_MAJOR: 0
const FOX32ROM_VERSION_MINOR: 7
const FOX32ROM_VERSION_PATCH: 0
const FOX32ROM_API_VERSION: 1
const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF674764
const TEXT_COLOR: 0xFFFFFFFF
@ -172,6 +174,10 @@ get_rom_version:
mov r2, FOX32ROM_VERSION_PATCH
ret
get_rom_api_version:
mov r0, FOX32ROM_API_VERSION
ret
poweroff:
mov r0, 0x80010000
mov r1, 0
@ -227,6 +233,7 @@ poweroff_wait:
data.32 shift_released
data.32 caps_pressed
data.32 poweroff
data.32 get_rom_api_version
; generic drawing jump table
org.pad 0xF0041000