2022-10-16 16:05:58 +00:00
|
|
|
.include "macros.inc"
|
|
|
|
|
|
|
|
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_init
|
|
|
|
GKI_init:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800761C0 00072000 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 800761C4 00072004 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 800761C8 00072008 3C A0 00 03 */ lis r5, 0x3
|
|
|
|
/* 800761CC 0007200C 38 80 00 00 */ li r4, 0x0
|
|
|
|
/* 800761D0 00072010 90 01 00 14 */ stw r0, 0x14(r1)
|
|
|
|
/* 800761D4 00072014 38 A5 8A E0 */ addi r5, r5, -0x7520
|
|
|
|
/* 800761D8 00072018 93 E1 00 0C */ stw r31, 0xc(r1)
|
|
|
|
/* 800761DC 0007201C 93 C1 00 08 */ stw r30, 0x8(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 800761E0 00072020 3F C0 80 4D */ lis r30, gki_cb@ha
|
|
|
|
/* 800761E4 00072024 38 7E 96 A8 */ addi r3, r30, gki_cb@l
|
|
|
|
/* 800761E8 00072028 4B F8 E1 69 */ bl memset
|
|
|
|
/* 800761EC 0007202C 4B FF E7 C5 */ bl gki_buffer_init
|
|
|
|
/* 800761F0 00072030 4B FF FA 41 */ bl gki_timers_init
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800761F4 00072034 3B FE 96 A8 */ addi r31, r30, -0x6958
|
|
|
|
/* 800761F8 00072038 38 80 00 01 */ li r4, 0x1
|
|
|
|
/* 800761FC 0007203C 3C 7F 00 03 */ addis r3, r31, 0x3
|
|
|
|
/* 80076200 00072040 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 80076204 00072044 98 83 88 02 */ stb r4, -0x77fe(r3)
|
|
|
|
/* 80076208 00072048 90 03 87 E8 */ stw r0, -0x7818(r3)
|
|
|
|
/* 8007620C 0007204C 90 03 88 48 */ stw r0, -0x77b8(r3)
|
|
|
|
/* 80076210 00072050 B0 03 88 0C */ sth r0, -0x77f4(r3)
|
|
|
|
/* 80076214 00072054 98 1E 96 A8 */ stb r0, -0x6958(r30)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 80076218 00072058 4B FA B6 29 */ bl OSEnableInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8007621C 0007205C 88 1E 96 A8 */ lbz r0, -0x6958(r30)
|
|
|
|
/* 80076220 00072060 54 00 10 3A */ slwi r0, r0, 2
|
|
|
|
/* 80076224 00072064 7C 9F 02 14 */ add r4, r31, r0
|
|
|
|
/* 80076228 00072068 90 64 00 04 */ stw r3, 0x4(r4)
|
|
|
|
/* 8007622C 0007206C 88 7E 96 A8 */ lbz r3, -0x6958(r30)
|
|
|
|
/* 80076230 00072070 38 03 00 01 */ addi r0, r3, 0x1
|
|
|
|
/* 80076234 00072074 98 1E 96 A8 */ stb r0, -0x6958(r30)
|
|
|
|
/* 80076238 00072078 83 E1 00 0C */ lwz r31, 0xc(r1)
|
|
|
|
/* 8007623C 0007207C 83 C1 00 08 */ lwz r30, 0x8(r1)
|
|
|
|
/* 80076240 00072080 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 80076244 00072084 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 80076248 00072088 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 8007624C 0007208C 4E 80 00 20 */ blr
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_shutdown
|
|
|
|
GKI_shutdown:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076250 00072090 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 80076254 00072094 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 80076258 00072098 90 01 00 14 */ stw r0, 0x14(r1)
|
|
|
|
/* 8007625C 0007209C 93 E1 00 0C */ stw r31, 0xc(r1)
|
|
|
|
/* 80076260 000720A0 93 C1 00 08 */ stw r30, 0x8(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 80076264 000720A4 4B FA B5 BD */ bl OSDisableInterrupts
|
|
|
|
/* 80076268 000720A8 3F C0 80 4D */ lis r30, gki_cb@ha
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8007626C 000720AC 38 00 00 00 */ li r0, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 80076270 000720B0 88 BE 96 A8 */ lbz r5, gki_cb@l(r30)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076274 000720B4 3B FE 96 A8 */ addi r31, r30, -0x6958
|
|
|
|
/* 80076278 000720B8 3C 9F 00 03 */ addis r4, r31, 0x3
|
|
|
|
/* 8007627C 000720BC 54 A5 10 3A */ slwi r5, r5, 2
|
|
|
|
/* 80076280 000720C0 7C BF 2A 14 */ add r5, r31, r5
|
|
|
|
/* 80076284 000720C4 90 65 00 04 */ stw r3, 0x4(r5)
|
|
|
|
/* 80076288 000720C8 88 7E 96 A8 */ lbz r3, -0x6958(r30)
|
|
|
|
/* 8007628C 000720CC 38 63 00 01 */ addi r3, r3, 0x1
|
|
|
|
/* 80076290 000720D0 98 7E 96 A8 */ stb r3, -0x6958(r30)
|
|
|
|
/* 80076294 000720D4 98 04 88 02 */ stb r0, -0x77fe(r4)
|
|
|
|
/* 80076298 000720D8 88 7E 96 A8 */ lbz r3, -0x6958(r30)
|
|
|
|
/* 8007629C 000720DC 38 03 FF FF */ addi r0, r3, -0x1
|
|
|
|
/* 800762A0 000720E0 98 1E 96 A8 */ stb r0, -0x6958(r30)
|
|
|
|
/* 800762A4 000720E4 54 00 15 BA */ rlwinm r0, r0, 2, 22, 29
|
|
|
|
/* 800762A8 000720E8 7C 7F 02 14 */ add r3, r31, r0
|
|
|
|
/* 800762AC 000720EC 80 63 00 04 */ lwz r3, 0x4(r3)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 800762B0 000720F0 4B FA B5 B1 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800762B4 000720F4 48 00 00 20 */ b lbl_800762D4
|
|
|
|
.global lbl_800762B8
|
|
|
|
lbl_800762B8:
|
|
|
|
/* 800762B8 000720F8 88 7E 96 A8 */ lbz r3, -0x6958(r30)
|
|
|
|
/* 800762BC 000720FC 38 03 FF FF */ addi r0, r3, -0x1
|
|
|
|
/* 800762C0 00072100 98 1E 96 A8 */ stb r0, -0x6958(r30)
|
|
|
|
/* 800762C4 00072104 54 00 15 BA */ rlwinm r0, r0, 2, 22, 29
|
|
|
|
/* 800762C8 00072108 7C 7F 02 14 */ add r3, r31, r0
|
|
|
|
/* 800762CC 0007210C 80 63 00 04 */ lwz r3, 0x4(r3)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 800762D0 00072110 4B FA B5 91 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_800762D4
|
|
|
|
lbl_800762D4:
|
|
|
|
/* 800762D4 00072114 88 1E 96 A8 */ lbz r0, -0x6958(r30)
|
|
|
|
/* 800762D8 00072118 2C 00 00 00 */ cmpwi r0, 0x0
|
|
|
|
/* 800762DC 0007211C 40 82 FF DC */ bne lbl_800762B8
|
|
|
|
/* 800762E0 00072120 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 800762E4 00072124 83 E1 00 0C */ lwz r31, 0xc(r1)
|
|
|
|
/* 800762E8 00072128 83 C1 00 08 */ lwz r30, 0x8(r1)
|
|
|
|
/* 800762EC 0007212C 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 800762F0 00072130 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 800762F4 00072134 4E 80 00 20 */ blr
|
|
|
|
/* 800762F8 00072138 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 800762FC 0007213C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_send_event
|
|
|
|
GKI_send_event:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076300 00072140 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 80076304 00072144 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 80076308 00072148 28 03 00 08 */ cmplwi r3, 0x8
|
|
|
|
/* 8007630C 0007214C 90 01 00 14 */ stw r0, 0x14(r1)
|
|
|
|
/* 80076310 00072150 93 E1 00 0C */ stw r31, 0xc(r1)
|
|
|
|
/* 80076314 00072154 7C 9F 23 78 */ mr r31, r4
|
|
|
|
/* 80076318 00072158 93 C1 00 08 */ stw r30, 0x8(r1)
|
|
|
|
/* 8007631C 0007215C 7C 7E 1B 78 */ mr r30, r3
|
|
|
|
/* 80076320 00072160 41 80 00 0C */ blt lbl_8007632C
|
|
|
|
/* 80076324 00072164 38 60 00 01 */ li r3, 0x1
|
|
|
|
/* 80076328 00072168 48 00 00 64 */ b lbl_8007638C
|
|
|
|
.global lbl_8007632C
|
|
|
|
lbl_8007632C:
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8007632C 0007216C 4B FA B4 F5 */ bl OSDisableInterrupts
|
|
|
|
/* 80076330 00072170 3C E0 80 4D */ lis r7, gki_cb@ha
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076334 00072174 57 C0 0D FC */ rlwinm r0, r30, 1, 23, 30
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 80076338 00072178 88 A7 96 A8 */ lbz r5, gki_cb@l(r7)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8007633C 0007217C 38 C7 96 A8 */ addi r6, r7, -0x6958
|
|
|
|
/* 80076340 00072180 3C 86 00 03 */ addis r4, r6, 0x3
|
|
|
|
/* 80076344 00072184 54 A5 10 3A */ slwi r5, r5, 2
|
|
|
|
/* 80076348 00072188 7C A6 2A 14 */ add r5, r6, r5
|
|
|
|
/* 8007634C 0007218C 7C 84 02 14 */ add r4, r4, r0
|
|
|
|
/* 80076350 00072190 90 65 00 04 */ stw r3, 0x4(r5)
|
|
|
|
/* 80076354 00072194 88 67 96 A8 */ lbz r3, -0x6958(r7)
|
|
|
|
/* 80076358 00072198 38 03 00 01 */ addi r0, r3, 0x1
|
|
|
|
/* 8007635C 0007219C 98 07 96 A8 */ stb r0, -0x6958(r7)
|
|
|
|
/* 80076360 000721A0 A0 04 88 08 */ lhz r0, -0x77f8(r4)
|
|
|
|
/* 80076364 000721A4 7C 00 FB 78 */ or r0, r0, r31
|
|
|
|
/* 80076368 000721A8 B0 04 88 08 */ sth r0, -0x77f8(r4)
|
|
|
|
/* 8007636C 000721AC 88 67 96 A8 */ lbz r3, -0x6958(r7)
|
|
|
|
/* 80076370 000721B0 38 03 FF FF */ addi r0, r3, -0x1
|
|
|
|
/* 80076374 000721B4 98 07 96 A8 */ stb r0, -0x6958(r7)
|
|
|
|
/* 80076378 000721B8 54 00 15 BA */ rlwinm r0, r0, 2, 22, 29
|
|
|
|
/* 8007637C 000721BC 7C 66 02 14 */ add r3, r6, r0
|
|
|
|
/* 80076380 000721C0 80 63 00 04 */ lwz r3, 0x4(r3)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 80076384 000721C4 4B FA B4 DD */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076388 000721C8 38 60 00 00 */ li r3, 0x0
|
|
|
|
.global lbl_8007638C
|
|
|
|
lbl_8007638C:
|
|
|
|
/* 8007638C 000721CC 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 80076390 000721D0 83 E1 00 0C */ lwz r31, 0xc(r1)
|
|
|
|
/* 80076394 000721D4 83 C1 00 08 */ lwz r30, 0x8(r1)
|
|
|
|
/* 80076398 000721D8 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8007639C 000721DC 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 800763A0 000721E0 4E 80 00 20 */ blr
|
|
|
|
/* 800763A4 000721E4 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 800763A8 000721E8 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 800763AC 000721EC 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_enable
|
|
|
|
GKI_enable:
|
|
|
|
/* 800763B0 000721F0 3C A0 80 4D */ lis r5, gki_cb@ha
|
|
|
|
/* 800763B4 000721F4 88 85 96 A8 */ lbz r4, gki_cb@l(r5)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800763B8 000721F8 38 65 96 A8 */ addi r3, r5, -0x6958
|
|
|
|
/* 800763BC 000721FC 38 04 FF FF */ addi r0, r4, -0x1
|
|
|
|
/* 800763C0 00072200 98 05 96 A8 */ stb r0, -0x6958(r5)
|
|
|
|
/* 800763C4 00072204 54 00 15 BA */ rlwinm r0, r0, 2, 22, 29
|
|
|
|
/* 800763C8 00072208 7C 63 02 14 */ add r3, r3, r0
|
|
|
|
/* 800763CC 0007220C 80 63 00 04 */ lwz r3, 0x4(r3)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 800763D0 00072210 4B FA B4 90 */ b OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800763D4 00072214 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 800763D8 00072218 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 800763DC 0007221C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_disable
|
|
|
|
GKI_disable:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800763E0 00072220 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 800763E4 00072224 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 800763E8 00072228 90 01 00 14 */ stw r0, 0x14(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 800763EC 0007222C 4B FA B4 35 */ bl OSDisableInterrupts
|
|
|
|
/* 800763F0 00072230 3C A0 80 4D */ lis r5, gki_cb@ha
|
|
|
|
/* 800763F4 00072234 88 05 96 A8 */ lbz r0, gki_cb@l(r5)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 800763F8 00072238 38 85 96 A8 */ addi r4, r5, -0x6958
|
|
|
|
/* 800763FC 0007223C 54 00 10 3A */ slwi r0, r0, 2
|
|
|
|
/* 80076400 00072240 7C 84 02 14 */ add r4, r4, r0
|
|
|
|
/* 80076404 00072244 90 64 00 04 */ stw r3, 0x4(r4)
|
|
|
|
/* 80076408 00072248 88 65 96 A8 */ lbz r3, -0x6958(r5)
|
|
|
|
/* 8007640C 0007224C 38 03 00 01 */ addi r0, r3, 0x1
|
|
|
|
/* 80076410 00072250 98 05 96 A8 */ stb r0, -0x6958(r5)
|
|
|
|
/* 80076414 00072254 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 80076418 00072258 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8007641C 0007225C 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 80076420 00072260 4E 80 00 20 */ blr
|
|
|
|
/* 80076424 00072264 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 80076428 00072268 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8007642C 0007226C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_os_malloc
|
|
|
|
GKI_os_malloc:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076430 00072270 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 80076434 00072274 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 80076438 00072278 90 01 00 14 */ stw r0, 0x14(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8007643C 0007227C 4B FE F3 15 */ bl App_MEMalloc
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076440 00072280 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 80076444 00072284 40 82 00 08 */ bne lbl_8007644C
|
|
|
|
/* 80076448 00072288 38 60 00 00 */ li r3, 0x0
|
|
|
|
.global lbl_8007644C
|
|
|
|
lbl_8007644C:
|
|
|
|
/* 8007644C 0007228C 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 80076450 00072290 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 80076454 00072294 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 80076458 00072298 4E 80 00 20 */ blr
|
|
|
|
/* 8007645C 0007229C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global GKI_os_free
|
|
|
|
GKI_os_free:
|
|
|
|
/* 80076460 000722A0 4B FE F3 10 */ b App_MEMfree
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 80076464 000722A4 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 80076468 000722A8 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8007646C 000722AC 00 00 00 00 */ .4byte 0x00000000
|
2022-10-17 08:41:13 +00:00
|
|
|
.include "macros.inc"
|
|
|
|
|
|
|
|
.section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20
|
|
|
|
.global gki_cb
|
|
|
|
gki_cb:
|
|
|
|
.skip 0x26958
|
|
|
|
|
|
|
|
.global lbl_804F0000
|
|
|
|
lbl_804F0000:
|
|
|
|
.skip 0x2188
|