Merge pull request #3 from neuschaefer/dev

Add new ROM function: poweroff
This commit is contained in:
Ry 2023-01-30 13:05:52 -08:00 committed by GitHub
commit 0603179547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

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

View File

@ -169,6 +169,13 @@ get_rom_version:
mov r2, FOX32ROM_VERSION_PATCH mov r2, FOX32ROM_VERSION_PATCH
ret ret
poweroff:
mov r0, 0x80010000
mov r1, 0
out r0, r1
poweroff_wait:
jmp poweroff_wait
; code ; code
#include "audio.asm" #include "audio.asm"
#include "background.asm" #include "background.asm"
@ -216,6 +223,7 @@ get_rom_version:
data.32 shift_pressed data.32 shift_pressed
data.32 shift_released data.32 shift_released
data.32 caps_pressed data.32 caps_pressed
data.32 poweroff
; generic drawing jump table ; generic drawing jump table
org.pad 0xF0041000 org.pad 0xF0041000