sup39
23e5c658ad
- GCI Loader: gecko-gosub + 06 bin + 04 bl to onReadOptionBlock - place GCI Loader code at 817FE800 since [817FEEA0, 81800000) is used by system - place buffer at 817F1800 (instead of 817F1000+4) since there seems to be some alignment issue - Assume file size == 0x2000*6 since fileInfo->length seems to be 0
15 lines
319 B
ArmAsm
15 lines
319 B
ArmAsm
## check status
|
|
### r3 = GCTDST
|
|
lis r3, GCTDST@ha
|
|
lwzu r0, GCTDST@l(r3)
|
|
### return if not DONE(2)
|
|
cmpwi r0, 2
|
|
bnelr
|
|
|
|
## backup r15 (pointer to current gecko instruction)
|
|
add r0, r15, r4
|
|
stw r0, 4(r3)
|
|
## update r15 = dst + 8(GCTDST.code-r3) - r4(this C0 code size)
|
|
addi r15, r3, 8
|
|
sub r15, r15, r4
|
|
blr
|