-
Notifications
You must be signed in to change notification settings - Fork 3
/
fox32rom.def.jkl
133 lines (118 loc) · 2.84 KB
/
fox32rom.def.jkl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// fox32rom routine definitions for Jackal
#ASM [
// fox32rom routine definitions
// system jump table
scancode_to_ascii: jmp [0xF0040020]
shift_pressed: jmp [0xF0040024]
shift_released: jmp [0xF0040028]
caps_pressed: jmp [0xF004002C]
// overlay jump table
fill_overlay: jmp [0xF0043000]
draw_str_to_overlay: jmp [0xF0043004]
// menu bar jump table
menu_bar_click_event: jmp [0xF0044008]
close_menu: jmp [0xF0044018]
menu_update_event: jmp [0xF004401C]
// disk jump table
is_romdisk_available: jmp [0xF0045028]
is_ramdisk_formatted: jmp [0xF0045038]
// memory copy/compare jump table
copy_memory_bytes: jmp [0xF0046000]
copy_string: jmp [0xF0046008]
compare_memory_bytes: jmp [0xF004600C]
compare_string: jmp [0xF0046014]
string_length: jmp [0xF0046018]
// integer jump table
string_to_int: jmp [0xF0047000]
// implmentations
ScancodeToAscii:
.global ScancodeToAscii
mov r0, a0
call scancode_to_ascii
mov a3, r0
ret
ShiftPressed:
.global ShiftPressed
jmp shift_pressed
ShiftReleased:
.global ShiftReleased
jmp shift_released
CapsPressed:
.global CapsPressed
jmp caps_pressed
FillOverlay:
.global FillOverlay
mov r0, a0
mov r1, a1
jmp fill_overlay
DrawStrToOverlay:
.global DrawStrToOverlay
mov r0, a0
mov r1, a1
mov r2, a2
mov r3, a3
mov r4, [rsp+4]
mov r5, [rsp+8]
jmp draw_str_to_overlay
MenuBarClickEvent:
.global MenuBarClickEvent
mov r0, a0
mov r1, a1
jmp menu_bar_click_event
CloseMenu:
.global CloseMenu
mov r0, a0
jmp close_menu
MenuUpdateEvent:
.global MenuUpdateEvent
mov r0, a0
mov r1, a1
mov r2, a2
jmp menu_update_event
IsRomDiskAvailable:
.global IsRomDiskAvailable
call is_romdisk_available
ifz movz.8 a3, 1
ifnz movz.8 a3, 0
ret
IsRamDiskFormatted:
.global IsRamDiskFormatted
call is_ramdisk_formatted
ifz movz.8 a3, 1
ifnz movz.8 a3, 0
ret
CopyMemory:
.global CopyMemory
mov r0, a0
mov r1, a1
mov r2, a2
jmp copy_memory_bytes
CopyString:
.global CopyString
mov r0, a0
mov r1, a1
jmp copy_string
CompareMemory:
.global CompareMemory
mov r0, a0
mov r1, a1
mov r2, a2
call compare_memory_bytes
ifz movz.8 a3, 1
ifnz movz.8 a3, 0
ret
CompareString:
.global CompareString
mov r0, a0
mov r1, a1
call compare_string
ifz movz.8 a3, 1
ifnz movz.8 a3, 0
ret
StringLength:
.global StringLength
mov r0, a0
call string_length
mov a3, r0
ret
]