diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-02 17:29:19 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-03 13:27:06 -0400 |
commit | f2eabdb6257c09cf2890dac5e9737912728542af (patch) | |
tree | 3b46f6787185d65605651a0f48776dc9779ce648 /asm/Dolphin/vi | |
parent | eef1dd840b7cecac28c2e6b0574707b90a37d4e7 (diff) |
global: Add rest of Dolphin SDK proper, add MSL, and MetroTRK
Finally, it links properly.
Diffstat (limited to 'asm/Dolphin/vi')
-rw-r--r-- | asm/Dolphin/vi/vi.s | 2054 |
1 files changed, 2054 insertions, 0 deletions
diff --git a/asm/Dolphin/vi/vi.s b/asm/Dolphin/vi/vi.s new file mode 100644 index 0000000..c3d120c --- /dev/null +++ b/asm/Dolphin/vi/vi.s @@ -0,0 +1,2054 @@ +.include "macros.inc" + +.section .text, "ax" # 0x80005600 - 0x8036FBA0 +.global __VIRetraceHandler +__VIRetraceHandler: +/* 80099638 00096578 7C 08 02 A6 */ mflr r0 +/* 8009963C 0009657C 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099640 00096580 90 01 00 04 */ stw r0, 4(r1) +/* 80099644 00096584 38 A3 20 00 */ addi r5, r3, 0xCC002000@l +/* 80099648 00096588 3C 60 80 3F */ lis r3, regs@ha +/* 8009964C 0009658C 94 21 FD 08 */ stwu r1, -0x2f8(r1) +/* 80099650 00096590 38 E0 00 00 */ li r7, 0 +/* 80099654 00096594 BF 61 02 E4 */ stmw r27, 0x2e4(r1) +/* 80099658 00096598 3B C4 00 00 */ addi r30, r4, 0 +/* 8009965C 0009659C 3B E3 BD C8 */ addi r31, r3, regs@l +/* 80099660 000965A0 A4 C5 00 30 */ lhzu r6, 0x30(r5) +/* 80099664 000965A4 54 C0 04 21 */ rlwinm. r0, r6, 0, 0x10, 0x10 +/* 80099668 000965A8 41 82 00 10 */ beq lbl_80099678 +/* 8009966C 000965AC 54 C0 04 5E */ rlwinm r0, r6, 0, 0x11, 0xf +/* 80099670 000965B0 B0 05 00 00 */ sth r0, 0(r5) +/* 80099674 000965B4 60 E7 00 01 */ ori r7, r7, 1 +lbl_80099678: +/* 80099678 000965B8 3C 60 CC 00 */ lis r3, 0xCC002034@ha +/* 8009967C 000965BC A4 83 20 34 */ lhzu r4, 0xCC002034@l(r3) +/* 80099680 000965C0 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 80099684 000965C4 41 82 00 10 */ beq lbl_80099694 +/* 80099688 000965C8 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 8009968C 000965CC B0 03 00 00 */ sth r0, 0(r3) +/* 80099690 000965D0 60 E7 00 02 */ ori r7, r7, 2 +lbl_80099694: +/* 80099694 000965D4 3C 60 CC 00 */ lis r3, 0xCC002038@ha +/* 80099698 000965D8 A4 83 20 38 */ lhzu r4, 0xCC002038@l(r3) +/* 8009969C 000965DC 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 800996A0 000965E0 41 82 00 10 */ beq lbl_800996B0 +/* 800996A4 000965E4 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 800996A8 000965E8 B0 03 00 00 */ sth r0, 0(r3) +/* 800996AC 000965EC 60 E7 00 04 */ ori r7, r7, 4 +lbl_800996B0: +/* 800996B0 000965F0 3C 60 CC 00 */ lis r3, 0xCC00203C@ha +/* 800996B4 000965F4 A4 83 20 3C */ lhzu r4, 0xCC00203C@l(r3) +/* 800996B8 000965F8 54 80 04 21 */ rlwinm. r0, r4, 0, 0x10, 0x10 +/* 800996BC 000965FC 41 82 00 10 */ beq lbl_800996CC +/* 800996C0 00096600 54 80 04 5E */ rlwinm r0, r4, 0, 0x11, 0xf +/* 800996C4 00096604 B0 03 00 00 */ sth r0, 0(r3) +/* 800996C8 00096608 60 E7 00 08 */ ori r7, r7, 8 +lbl_800996CC: +/* 800996CC 0009660C 54 E0 07 7B */ rlwinm. r0, r7, 0, 0x1d, 0x1d +/* 800996D0 00096610 40 82 00 0C */ bne lbl_800996DC +/* 800996D4 00096614 54 E0 07 39 */ rlwinm. r0, r7, 0, 0x1c, 0x1c +/* 800996D8 00096618 41 82 00 10 */ beq lbl_800996E8 +lbl_800996DC: +/* 800996DC 0009661C 7F C3 F3 78 */ mr r3, r30 +/* 800996E0 00096620 4B FF 51 3D */ bl OSSetCurrentContext +/* 800996E4 00096624 48 00 01 68 */ b lbl_8009984C +lbl_800996E8: +/* 800996E8 00096628 80 8D 94 40 */ lwz r4, retraceCount@sda21(r13) +/* 800996EC 0009662C 38 61 00 18 */ addi r3, r1, 0x18 +/* 800996F0 00096630 38 04 00 01 */ addi r0, r4, 1 +/* 800996F4 00096634 90 0D 94 40 */ stw r0, retraceCount@sda21(r13) +/* 800996F8 00096638 4B FF 52 ED */ bl OSClearContext +/* 800996FC 0009663C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099700 00096640 4B FF 51 1D */ bl OSSetCurrentContext +/* 80099704 00096644 81 8D 94 50 */ lwz r12, PreCB@sda21(r13) +/* 80099708 00096648 28 0C 00 00 */ cmplwi r12, 0 +/* 8009970C 0009664C 41 82 00 10 */ beq lbl_8009971C +/* 80099710 00096650 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 80099714 00096654 7D 88 03 A6 */ mtlr r12 +/* 80099718 00096658 4E 80 00 21 */ blrl +lbl_8009971C: +/* 8009971C 0009665C 80 0D 94 44 */ lwz r0, flushFlag@sda21(r13) +/* 80099720 00096660 28 00 00 00 */ cmplwi r0, 0 +/* 80099724 00096664 41 82 00 EC */ beq lbl_80099810 +/* 80099728 00096668 80 0D 94 70 */ lwz r0, shdwChangeMode@sda21(r13) +/* 8009972C 0009666C 28 00 00 01 */ cmplwi r0, 1 +/* 80099730 00096670 40 82 00 10 */ bne lbl_80099740 +/* 80099734 00096674 48 00 16 E1 */ bl getCurrentFieldEvenOdd +/* 80099738 00096678 28 03 00 00 */ cmplwi r3, 0 +/* 8009973C 0009667C 41 82 00 BC */ beq lbl_800997F8 +lbl_80099740: +/* 80099740 00096680 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099744 00096684 3B A3 20 00 */ addi r29, r3, 0xCC002000@l +/* 80099748 00096688 48 00 00 78 */ b lbl_800997C0 +lbl_8009974C: +/* 8009974C 0009668C 80 6D 94 78 */ lwz r3, shdwChanged@sda21(r13) +/* 80099750 00096690 38 A0 00 20 */ li r5, 0x20 +/* 80099754 00096694 83 6D 94 7C */ lwz r27, lbl_80409F3C@sda21(r13) +/* 80099758 00096698 38 9B 00 00 */ addi r4, r27, 0 +/* 8009975C 0009669C 4B FE 98 F5 */ bl __shr2u +/* 80099760 000966A0 7C 84 00 34 */ cntlzw r4, r4 +/* 80099764 000966A4 2C 04 00 20 */ cmpwi r4, 0x20 +/* 80099768 000966A8 38 00 FF FF */ li r0, -1 +/* 8009976C 000966AC 7F 60 00 38 */ and r0, r27, r0 +/* 80099770 000966B0 40 80 00 08 */ bge lbl_80099778 +/* 80099774 000966B4 48 00 00 0C */ b lbl_80099780 +lbl_80099778: +/* 80099778 000966B8 7C 03 00 34 */ cntlzw r3, r0 +/* 8009977C 000966BC 38 83 00 20 */ addi r4, r3, 0x20 +lbl_80099780: +/* 80099780 000966C0 54 86 08 3C */ slwi r6, r4, 1 +/* 80099784 000966C4 7C 7F 32 14 */ add r3, r31, r6 +/* 80099788 000966C8 A0 03 00 78 */ lhz r0, 0x78(r3) +/* 8009978C 000966CC 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 80099790 000966D0 38 60 00 00 */ li r3, 0 +/* 80099794 000966D4 7C 1D 33 2E */ sthx r0, r29, r6 +/* 80099798 000966D8 38 80 00 01 */ li r4, 1 +/* 8009979C 000966DC 4B FE 98 91 */ bl __shl2i +/* 800997A0 000966E0 80 0D 94 78 */ lwz r0, shdwChanged@sda21(r13) +/* 800997A4 000966E4 7C 65 18 F8 */ nor r5, r3, r3 +/* 800997A8 000966E8 7C 84 20 F8 */ nor r4, r4, r4 +/* 800997AC 000966EC 80 6D 94 7C */ lwz r3, lbl_80409F3C@sda21(r13) +/* 800997B0 000966F0 7C 00 28 38 */ and r0, r0, r5 +/* 800997B4 000966F4 7C 63 20 38 */ and r3, r3, r4 +/* 800997B8 000966F8 90 6D 94 7C */ stw r3, lbl_80409F3C@sda21(r13) +/* 800997BC 000966FC 90 0D 94 78 */ stw r0, shdwChanged@sda21(r13) +lbl_800997C0: +/* 800997C0 00096700 80 0D 94 78 */ lwz r0, shdwChanged@sda21(r13) +/* 800997C4 00096704 38 80 00 00 */ li r4, 0 +/* 800997C8 00096708 80 6D 94 7C */ lwz r3, lbl_80409F3C@sda21(r13) +/* 800997CC 0009670C 7C 00 22 78 */ xor r0, r0, r4 +/* 800997D0 00096710 7C 63 22 78 */ xor r3, r3, r4 +/* 800997D4 00096714 7C 60 03 79 */ or. r0, r3, r0 +/* 800997D8 00096718 40 82 FF 74 */ bne lbl_8009974C +/* 800997DC 0009671C 90 8D 94 70 */ stw r4, shdwChangeMode@sda21(r13) +/* 800997E0 00096720 38 60 00 01 */ li r3, 1 +/* 800997E4 00096724 80 1F 01 44 */ lwz r0, 0x144(r31) +/* 800997E8 00096728 90 0D 94 80 */ stw r0, CurrTiming@sda21(r13) +/* 800997EC 0009672C 80 1F 01 18 */ lwz r0, 0x118(r31) +/* 800997F0 00096730 90 0D 94 84 */ stw r0, CurrTvMode@sda21(r13) +/* 800997F4 00096734 48 00 00 08 */ b lbl_800997FC +lbl_800997F8: +/* 800997F8 00096738 38 60 00 00 */ li r3, 0 +lbl_800997FC: +/* 800997FC 0009673C 2C 03 00 00 */ cmpwi r3, 0 +/* 80099800 00096740 41 82 00 10 */ beq lbl_80099810 +/* 80099804 00096744 38 00 00 00 */ li r0, 0 +/* 80099808 00096748 90 0D 94 44 */ stw r0, flushFlag@sda21(r13) +/* 8009980C 0009674C 48 01 AB F1 */ bl SIRefreshSamplingRate +lbl_80099810: +/* 80099810 00096750 80 0D 94 54 */ lwz r0, PostCB@sda21(r13) +/* 80099814 00096754 28 00 00 00 */ cmplwi r0, 0 +/* 80099818 00096758 41 82 00 1C */ beq lbl_80099834 +/* 8009981C 0009675C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099820 00096760 4B FF 51 C5 */ bl OSClearContext +/* 80099824 00096764 81 8D 94 54 */ lwz r12, PostCB@sda21(r13) +/* 80099828 00096768 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 8009982C 0009676C 7D 88 03 A6 */ mtlr r12 +/* 80099830 00096770 4E 80 00 21 */ blrl +lbl_80099834: +/* 80099834 00096774 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099838 00096778 4B FF A4 B5 */ bl OSWakeupThread +/* 8009983C 0009677C 38 61 00 18 */ addi r3, r1, 0x18 +/* 80099840 00096780 4B FF 51 A5 */ bl OSClearContext +/* 80099844 00096784 7F C3 F3 78 */ mr r3, r30 +/* 80099848 00096788 4B FF 4F D5 */ bl OSSetCurrentContext +lbl_8009984C: +/* 8009984C 0009678C BB 61 02 E4 */ lmw r27, 0x2e4(r1) +/* 80099850 00096790 80 01 02 FC */ lwz r0, 0x2fc(r1) +/* 80099854 00096794 38 21 02 F8 */ addi r1, r1, 0x2f8 +/* 80099858 00096798 7C 08 03 A6 */ mtlr r0 +/* 8009985C 0009679C 4E 80 00 20 */ blr + +.global VISetPostRetraceCallback +VISetPostRetraceCallback: +/* 80099860 000967A0 7C 08 02 A6 */ mflr r0 +/* 80099864 000967A4 90 01 00 04 */ stw r0, 4(r1) +/* 80099868 000967A8 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8009986C 000967AC 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80099870 000967B0 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80099874 000967B4 7C 7E 1B 78 */ mr r30, r3 +/* 80099878 000967B8 83 ED 94 54 */ lwz r31, PostCB@sda21(r13) +/* 8009987C 000967BC 4B FF 69 51 */ bl OSDisableInterrupts +/* 80099880 000967C0 93 CD 94 54 */ stw r30, PostCB@sda21(r13) +/* 80099884 000967C4 4B FF 69 71 */ bl OSRestoreInterrupts +/* 80099888 000967C8 7F E3 FB 78 */ mr r3, r31 +/* 8009988C 000967CC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099890 000967D0 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80099894 000967D4 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80099898 000967D8 38 21 00 18 */ addi r1, r1, 0x18 +/* 8009989C 000967DC 7C 08 03 A6 */ mtlr r0 +/* 800998A0 000967E0 4E 80 00 20 */ blr + +.global getTiming +getTiming: +/* 800998A4 000967E4 28 03 00 15 */ cmplwi r3, 0x15 +/* 800998A8 000967E8 3C 80 80 3B */ lis r4, timing@ha +/* 800998AC 000967EC 38 A4 0F 30 */ addi r5, r4, timing@l +/* 800998B0 000967F0 41 81 00 7C */ bgt lbl_8009992C +/* 800998B4 000967F4 3C 80 80 3B */ lis r4, "@92"@ha +/* 800998B8 000967F8 38 84 10 94 */ addi r4, r4, "@92"@l +/* 800998BC 000967FC 54 60 10 3A */ slwi r0, r3, 2 +/* 800998C0 00096800 7C 04 00 2E */ lwzx r0, r4, r0 +/* 800998C4 00096804 7C 09 03 A6 */ mtctr r0 +/* 800998C8 00096808 4E 80 04 20 */ bctr +lbl_800998CC: +/* 800998CC 0009680C 7C A3 2B 78 */ mr r3, r5 +/* 800998D0 00096810 4E 80 00 20 */ blr +lbl_800998D4: +/* 800998D4 00096814 38 65 00 26 */ addi r3, r5, 0x26 +/* 800998D8 00096818 4E 80 00 20 */ blr +lbl_800998DC: +/* 800998DC 0009681C 38 65 00 4C */ addi r3, r5, 0x4c +/* 800998E0 00096820 4E 80 00 20 */ blr +lbl_800998E4: +/* 800998E4 00096824 38 65 00 72 */ addi r3, r5, 0x72 +/* 800998E8 00096828 4E 80 00 20 */ blr +lbl_800998EC: +/* 800998EC 0009682C 7C A3 2B 78 */ mr r3, r5 +/* 800998F0 00096830 4E 80 00 20 */ blr +lbl_800998F4: +/* 800998F4 00096834 38 65 00 26 */ addi r3, r5, 0x26 +/* 800998F8 00096838 4E 80 00 20 */ blr +lbl_800998FC: +/* 800998FC 0009683C 38 65 00 98 */ addi r3, r5, 0x98 +/* 80099900 00096840 4E 80 00 20 */ blr +lbl_80099904: +/* 80099904 00096844 38 65 00 BE */ addi r3, r5, 0xbe +/* 80099908 00096848 4E 80 00 20 */ blr +lbl_8009990C: +/* 8009990C 0009684C 38 65 00 E4 */ addi r3, r5, 0xe4 +/* 80099910 00096850 4E 80 00 20 */ blr +lbl_80099914: +/* 80099914 00096854 38 65 01 0A */ addi r3, r5, 0x10a +/* 80099918 00096858 4E 80 00 20 */ blr +lbl_8009991C: +/* 8009991C 0009685C 38 65 00 4C */ addi r3, r5, 0x4c +/* 80099920 00096860 4E 80 00 20 */ blr +lbl_80099924: +/* 80099924 00096864 38 65 00 72 */ addi r3, r5, 0x72 +/* 80099928 00096868 4E 80 00 20 */ blr +lbl_8009992C: +/* 8009992C 0009686C 38 60 00 00 */ li r3, 0 +/* 80099930 00096870 4E 80 00 20 */ blr + +.global __VIInit +__VIInit: +/* 80099934 00096874 7C 08 02 A6 */ mflr r0 +/* 80099938 00096878 90 01 00 04 */ stw r0, 4(r1) +/* 8009993C 0009687C 94 21 FF D0 */ stwu r1, -0x30(r1) +/* 80099940 00096880 93 E1 00 2C */ stw r31, 0x2c(r1) +/* 80099944 00096884 54 7F F0 BE */ srwi r31, r3, 2 +/* 80099948 00096888 93 C1 00 28 */ stw r30, 0x28(r1) +/* 8009994C 0009688C 93 A1 00 24 */ stw r29, 0x24(r1) +/* 80099950 00096890 3B A3 00 00 */ addi r29, r3, 0 +/* 80099954 00096894 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 80099958 00096898 93 E3 00 CC */ stw r31, 0x800000CC@l(r3) +/* 8009995C 0009689C 38 7D 00 00 */ addi r3, r29, 0 +/* 80099960 000968A0 57 BE 07 BC */ rlwinm r30, r29, 0, 0x1e, 0x1e +/* 80099964 000968A4 4B FF FF 41 */ bl getTiming +/* 80099968 000968A8 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009996C 000968AC 38 00 00 02 */ li r0, 2 +/* 80099970 000968B0 38 A4 20 00 */ addi r5, r4, 0xCC002000@l +/* 80099974 000968B4 B4 05 00 02 */ sthu r0, 2(r5) +/* 80099978 000968B8 38 00 00 00 */ li r0, 0 +/* 8009997C 000968BC 90 01 00 1C */ stw r0, 0x1c(r1) +/* 80099980 000968C0 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099984 000968C4 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 80099988 000968C8 40 80 00 20 */ bge lbl_800999A8 +/* 8009998C 000968CC 48 00 00 10 */ b lbl_8009999C +lbl_80099990: +/* 80099990 000968D0 80 81 00 1C */ lwz r4, 0x1c(r1) +/* 80099994 000968D4 38 04 00 08 */ addi r0, r4, 8 +/* 80099998 000968D8 90 01 00 1C */ stw r0, 0x1c(r1) +lbl_8009999C: +/* 8009999C 000968DC 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 800999A0 000968E0 28 00 03 E8 */ cmplwi r0, 0x3e8 +/* 800999A4 000968E4 41 80 FF EC */ blt lbl_80099990 +lbl_800999A8: +/* 800999A8 000968E8 38 00 00 00 */ li r0, 0 +/* 800999AC 000968EC B0 05 00 00 */ sth r0, 0(r5) +/* 800999B0 000968F0 3D 80 CC 00 */ lis r12, 0xCC002006@ha +/* 800999B4 000968F4 39 00 28 28 */ li r8, 0x2828 +/* 800999B8 000968F8 A0 C3 00 1A */ lhz r6, 0x1a(r3) +/* 800999BC 000968FC 38 E0 00 01 */ li r7, 1 +/* 800999C0 00096900 2C 1D 00 02 */ cmpwi r29, 2 +/* 800999C4 00096904 B0 CC 20 06 */ sth r6, 0xCC002006@l(r12) +/* 800999C8 00096908 38 C0 10 01 */ li r6, 0x1001 +/* 800999CC 0009690C 38 8C 20 00 */ addi r4, r12, 0x2000 +/* 800999D0 00096910 89 23 00 1D */ lbz r9, 0x1d(r3) +/* 800999D4 00096914 89 43 00 1E */ lbz r10, 0x1e(r3) +/* 800999D8 00096918 51 2A 44 2E */ rlwimi r10, r9, 8, 0x10, 0x17 +/* 800999DC 0009691C B1 4C 20 04 */ sth r10, 0x2004(r12) +/* 800999E0 00096920 89 23 00 1F */ lbz r9, 0x1f(r3) +/* 800999E4 00096924 89 43 00 1C */ lbz r10, 0x1c(r3) +/* 800999E8 00096928 55 29 38 30 */ slwi r9, r9, 7 +/* 800999EC 0009692C 7D 49 4B 78 */ or r9, r10, r9 +/* 800999F0 00096930 B1 2C 20 0A */ sth r9, 0x200a(r12) +/* 800999F4 00096934 A1 23 00 20 */ lhz r9, 0x20(r3) +/* 800999F8 00096938 55 29 0C 3C */ rlwinm r9, r9, 1, 0x10, 0x1e +/* 800999FC 0009693C B1 2C 20 08 */ sth r9, 0x2008(r12) +/* 80099A00 00096940 A1 23 00 02 */ lhz r9, 2(r3) +/* 80099A04 00096944 89 63 00 00 */ lbz r11, 0(r3) +/* 80099A08 00096948 55 29 08 3C */ slwi r9, r9, 1 +/* 80099A0C 0009694C A1 43 00 04 */ lhz r10, 4(r3) +/* 80099A10 00096950 39 29 FF FE */ addi r9, r9, -2 +/* 80099A14 00096954 B1 6C 20 00 */ sth r11, 0x2000(r12) +/* 80099A18 00096958 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099A1C 0009695C B1 2C 20 0E */ sth r9, 0x200e(r12) +/* 80099A20 00096960 A1 23 00 08 */ lhz r9, 8(r3) +/* 80099A24 00096964 39 29 00 02 */ addi r9, r9, 2 +/* 80099A28 00096968 B1 2C 20 0C */ sth r9, 0x200c(r12) +/* 80099A2C 0009696C A1 23 00 02 */ lhz r9, 2(r3) +/* 80099A30 00096970 A1 43 00 06 */ lhz r10, 6(r3) +/* 80099A34 00096974 55 29 08 3C */ slwi r9, r9, 1 +/* 80099A38 00096978 39 29 FF FE */ addi r9, r9, -2 +/* 80099A3C 0009697C 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099A40 00096980 B1 2C 20 12 */ sth r9, 0x2012(r12) +/* 80099A44 00096984 A1 23 00 0A */ lhz r9, 0xa(r3) +/* 80099A48 00096988 39 29 00 02 */ addi r9, r9, 2 +/* 80099A4C 0009698C B1 2C 20 10 */ sth r9, 0x2010(r12) +/* 80099A50 00096990 A1 23 00 10 */ lhz r9, 0x10(r3) +/* 80099A54 00096994 89 43 00 0C */ lbz r10, 0xc(r3) +/* 80099A58 00096998 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A5C 0009699C 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A60 000969A0 B1 2C 20 16 */ sth r9, 0x2016(r12) +/* 80099A64 000969A4 A1 23 00 14 */ lhz r9, 0x14(r3) +/* 80099A68 000969A8 89 43 00 0E */ lbz r10, 0xe(r3) +/* 80099A6C 000969AC 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A70 000969B0 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A74 000969B4 B1 2C 20 14 */ sth r9, 0x2014(r12) +/* 80099A78 000969B8 A1 23 00 12 */ lhz r9, 0x12(r3) +/* 80099A7C 000969BC 89 43 00 0D */ lbz r10, 0xd(r3) +/* 80099A80 000969C0 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A84 000969C4 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A88 000969C8 B1 2C 20 1A */ sth r9, 0x201a(r12) +/* 80099A8C 000969CC A1 23 00 16 */ lhz r9, 0x16(r3) +/* 80099A90 000969D0 89 43 00 0F */ lbz r10, 0xf(r3) +/* 80099A94 000969D4 55 29 28 34 */ slwi r9, r9, 5 +/* 80099A98 000969D8 7D 49 4B 78 */ or r9, r10, r9 +/* 80099A9C 000969DC B1 2C 20 18 */ sth r9, 0x2018(r12) +/* 80099AA0 000969E0 B1 0C 20 48 */ sth r8, 0x2048(r12) +/* 80099AA4 000969E4 B0 EC 20 36 */ sth r7, 0x2036(r12) +/* 80099AA8 000969E8 B0 CC 20 34 */ sth r6, 0x2034(r12) +/* 80099AAC 000969EC A0 C3 00 18 */ lhz r6, 0x18(r3) +/* 80099AB0 000969F0 A0 63 00 1A */ lhz r3, 0x1a(r3) +/* 80099AB4 000969F4 7C C6 0E 70 */ srawi r6, r6, 1 +/* 80099AB8 000969F8 38 63 00 01 */ addi r3, r3, 1 +/* 80099ABC 000969FC 7C C6 01 94 */ addze r6, r6 +/* 80099AC0 00096A00 B0 6C 20 32 */ sth r3, 0x2032(r12) +/* 80099AC4 00096A04 38 C6 00 01 */ addi r6, r6, 1 +/* 80099AC8 00096A08 60 C3 10 00 */ ori r3, r6, 0x1000 +/* 80099ACC 00096A0C B0 6C 20 30 */ sth r3, 0x2030(r12) +/* 80099AD0 00096A10 41 82 00 28 */ beq lbl_80099AF8 +/* 80099AD4 00096A14 2C 1D 00 03 */ cmpwi r29, 3 +/* 80099AD8 00096A18 41 82 00 20 */ beq lbl_80099AF8 +/* 80099ADC 00096A1C 57 C3 10 3A */ slwi r3, r30, 2 +/* 80099AE0 00096A20 60 66 00 01 */ ori r6, r3, 1 +/* 80099AE4 00096A24 57 E3 40 2E */ slwi r3, r31, 8 +/* 80099AE8 00096A28 7C C3 1B 78 */ or r3, r6, r3 +/* 80099AEC 00096A2C B0 65 00 00 */ sth r3, 0(r5) +/* 80099AF0 00096A30 B0 04 00 6C */ sth r0, 0x6c(r4) +/* 80099AF4 00096A34 48 00 00 1C */ b lbl_80099B10 +lbl_80099AF8: +/* 80099AF8 00096A38 57 E0 40 2E */ slwi r0, r31, 8 +/* 80099AFC 00096A3C 60 00 00 05 */ ori r0, r0, 5 +/* 80099B00 00096A40 B0 05 00 00 */ sth r0, 0(r5) +/* 80099B04 00096A44 3C 60 CC 00 */ lis r3, 0xCC00206C@ha +/* 80099B08 00096A48 38 00 00 01 */ li r0, 1 +/* 80099B0C 00096A4C B0 03 20 6C */ sth r0, 0xCC00206C@l(r3) +lbl_80099B10: +/* 80099B10 00096A50 80 01 00 34 */ lwz r0, 0x34(r1) +/* 80099B14 00096A54 83 E1 00 2C */ lwz r31, 0x2c(r1) +/* 80099B18 00096A58 83 C1 00 28 */ lwz r30, 0x28(r1) +/* 80099B1C 00096A5C 83 A1 00 24 */ lwz r29, 0x24(r1) +/* 80099B20 00096A60 38 21 00 30 */ addi r1, r1, 0x30 +/* 80099B24 00096A64 7C 08 03 A6 */ mtlr r0 +/* 80099B28 00096A68 4E 80 00 20 */ blr + +.global VIInit +VIInit: +/* 80099B2C 00096A6C 7C 08 02 A6 */ mflr r0 +/* 80099B30 00096A70 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099B34 00096A74 90 01 00 04 */ stw r0, 4(r1) +/* 80099B38 00096A78 38 00 00 01 */ li r0, 1 +/* 80099B3C 00096A7C 3C 80 80 3B */ lis r4, timing@ha +/* 80099B40 00096A80 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 80099B44 00096A84 93 E1 00 14 */ stw r31, 0x14(r1) +/* 80099B48 00096A88 93 C1 00 10 */ stw r30, 0x10(r1) +/* 80099B4C 00096A8C 3B C4 0F 30 */ addi r30, r4, timing@l +/* 80099B50 00096A90 93 A1 00 0C */ stw r29, 0xc(r1) +/* 80099B54 00096A94 93 81 00 08 */ stw r28, 8(r1) +/* 80099B58 00096A98 3B 83 20 00 */ addi r28, r3, 0xCC002000@l +/* 80099B5C 00096A9C 3C 60 80 3F */ lis r3, regs@ha +/* 80099B60 00096AA0 90 0D 94 58 */ stw r0, encoderType@sda21(r13) +/* 80099B64 00096AA4 3B E3 BD C8 */ addi r31, r3, regs@l +/* 80099B68 00096AA8 A4 1C 00 02 */ lhzu r0, 2(r28) +/* 80099B6C 00096AAC 54 00 07 FF */ clrlwi. r0, r0, 0x1f +/* 80099B70 00096AB0 40 82 00 0C */ bne lbl_80099B7C +/* 80099B74 00096AB4 38 60 00 00 */ li r3, 0 +/* 80099B78 00096AB8 4B FF FD BD */ bl __VIInit +lbl_80099B7C: +/* 80099B7C 00096ABC 3B A0 00 00 */ li r29, 0 +/* 80099B80 00096AC0 93 AD 94 40 */ stw r29, retraceCount@sda21(r13) +/* 80099B84 00096AC4 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 80099B88 00096AC8 38 63 20 00 */ addi r3, r3, 0xCC002000@l +/* 80099B8C 00096ACC 93 AD 94 6C */ stw r29, lbl_80409F2C@sda21(r13) +/* 80099B90 00096AD0 38 00 02 80 */ li r0, 0x280 +/* 80099B94 00096AD4 93 AD 94 68 */ stw r29, changed@sda21(r13) +/* 80099B98 00096AD8 93 AD 94 7C */ stw r29, lbl_80409F3C@sda21(r13) +/* 80099B9C 00096ADC 93 AD 94 78 */ stw r29, shdwChanged@sda21(r13) +/* 80099BA0 00096AE0 93 AD 94 60 */ stw r29, changeMode@sda21(r13) +/* 80099BA4 00096AE4 93 AD 94 70 */ stw r29, shdwChangeMode@sda21(r13) +/* 80099BA8 00096AE8 93 AD 94 44 */ stw r29, flushFlag@sda21(r13) +/* 80099BAC 00096AEC A0 BE 01 32 */ lhz r5, 0x132(r30) +/* 80099BB0 00096AF0 A0 DE 01 30 */ lhz r6, 0x130(r30) +/* 80099BB4 00096AF4 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099BB8 00096AF8 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BBC 00096AFC B0 A3 00 4E */ sth r5, 0x4e(r3) +/* 80099BC0 00096B00 A0 DE 01 32 */ lhz r6, 0x132(r30) +/* 80099BC4 00096B04 A0 BE 01 34 */ lhz r5, 0x134(r30) +/* 80099BC8 00096B08 7C C6 36 70 */ srawi r6, r6, 6 +/* 80099BCC 00096B0C 54 A5 20 36 */ slwi r5, r5, 4 +/* 80099BD0 00096B10 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BD4 00096B14 B0 A3 00 4C */ sth r5, 0x4c(r3) +/* 80099BD8 00096B18 A0 BE 01 38 */ lhz r5, 0x138(r30) +/* 80099BDC 00096B1C A0 DE 01 36 */ lhz r6, 0x136(r30) +/* 80099BE0 00096B20 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099BE4 00096B24 7C C5 2B 78 */ or r5, r6, r5 +/* 80099BE8 00096B28 B0 A3 00 52 */ sth r5, 0x52(r3) +/* 80099BEC 00096B2C A0 DE 01 38 */ lhz r6, 0x138(r30) +/* 80099BF0 00096B30 A0 BE 01 3A */ lhz r5, 0x13a(r30) +/* 80099BF4 00096B34 7C C6 36 70 */ srawi r6, r6, 6 +/* 80099BF8 00096B38 54 A5 20 36 */ slwi r5, r5, 4 +/* 80099BFC 00096B3C 7C C5 2B 78 */ or r5, r6, r5 +/* 80099C00 00096B40 B0 A3 00 50 */ sth r5, 0x50(r3) +/* 80099C04 00096B44 A0 BE 01 3E */ lhz r5, 0x13e(r30) +/* 80099C08 00096B48 A0 DE 01 3C */ lhz r6, 0x13c(r30) +/* 80099C0C 00096B4C 54 A5 54 2A */ rlwinm r5, r5, 0xa, 0x10, 0x15 +/* 80099C10 00096B50 7C C5 2B 78 */ or r5, r6, r5 +/* 80099C14 00096B54 B0 A3 00 56 */ sth r5, 0x56(r3) +/* 80099C18 00096B58 A0 BE 01 3E */ lhz r5, 0x13e(r30) +/* 80099C1C 00096B5C A0 9E 01 40 */ lhz r4, 0x140(r30) +/* 80099C20 00096B60 7C A5 36 70 */ srawi r5, r5, 6 +/* 80099C24 00096B64 54 84 20 36 */ slwi r4, r4, 4 +/* 80099C28 00096B68 7C A4 23 78 */ or r4, r5, r4 +/* 80099C2C 00096B6C B0 83 00 54 */ sth r4, 0x54(r3) +/* 80099C30 00096B70 A0 9E 01 44 */ lhz r4, 0x144(r30) +/* 80099C34 00096B74 A0 BE 01 42 */ lhz r5, 0x142(r30) +/* 80099C38 00096B78 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C3C 00096B7C 7C A4 23 78 */ or r4, r5, r4 +/* 80099C40 00096B80 B0 83 00 5A */ sth r4, 0x5a(r3) +/* 80099C44 00096B84 A0 9E 01 48 */ lhz r4, 0x148(r30) +/* 80099C48 00096B88 A0 BE 01 46 */ lhz r5, 0x146(r30) +/* 80099C4C 00096B8C 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C50 00096B90 7C A4 23 78 */ or r4, r5, r4 +/* 80099C54 00096B94 B0 83 00 58 */ sth r4, 0x58(r3) +/* 80099C58 00096B98 A0 9E 01 4C */ lhz r4, 0x14c(r30) +/* 80099C5C 00096B9C A0 BE 01 4A */ lhz r5, 0x14a(r30) +/* 80099C60 00096BA0 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C64 00096BA4 7C A4 23 78 */ or r4, r5, r4 +/* 80099C68 00096BA8 B0 83 00 5E */ sth r4, 0x5e(r3) +/* 80099C6C 00096BAC A0 9E 01 50 */ lhz r4, 0x150(r30) +/* 80099C70 00096BB0 A0 BE 01 4E */ lhz r5, 0x14e(r30) +/* 80099C74 00096BB4 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C78 00096BB8 7C A4 23 78 */ or r4, r5, r4 +/* 80099C7C 00096BBC B0 83 00 5C */ sth r4, 0x5c(r3) +/* 80099C80 00096BC0 A0 9E 01 54 */ lhz r4, 0x154(r30) +/* 80099C84 00096BC4 A0 BE 01 52 */ lhz r5, 0x152(r30) +/* 80099C88 00096BC8 54 84 40 2E */ slwi r4, r4, 8 +/* 80099C8C 00096BCC 7C A4 23 78 */ or r4, r5, r4 +/* 80099C90 00096BD0 B0 83 00 62 */ sth r4, 0x62(r3) +/* 80099C94 00096BD4 A0 9E 01 58 */ lhz r4, 0x158(r30) +/* 80099C98 00096BD8 A0 BE 01 56 */ lhz r5, 0x156(r30) +/* 80099C9C 00096BDC 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CA0 00096BE0 7C A4 23 78 */ or r4, r5, r4 +/* 80099CA4 00096BE4 B0 83 00 60 */ sth r4, 0x60(r3) +/* 80099CA8 00096BE8 A0 9E 01 5C */ lhz r4, 0x15c(r30) +/* 80099CAC 00096BEC A0 BE 01 5A */ lhz r5, 0x15a(r30) +/* 80099CB0 00096BF0 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CB4 00096BF4 7C A4 23 78 */ or r4, r5, r4 +/* 80099CB8 00096BF8 B0 83 00 66 */ sth r4, 0x66(r3) +/* 80099CBC 00096BFC A0 9E 01 60 */ lhz r4, 0x160(r30) +/* 80099CC0 00096C00 A0 BE 01 5E */ lhz r5, 0x15e(r30) +/* 80099CC4 00096C04 54 84 40 2E */ slwi r4, r4, 8 +/* 80099CC8 00096C08 7C A4 23 78 */ or r4, r5, r4 +/* 80099CCC 00096C0C B0 83 00 64 */ sth r4, 0x64(r3) +/* 80099CD0 00096C10 B0 03 00 70 */ sth r0, 0x70(r3) +/* 80099CD4 00096C14 4B FF 83 89 */ bl __OSLockSram +/* 80099CD8 00096C18 88 03 00 10 */ lbz r0, 0x10(r3) +/* 80099CDC 00096C1C 38 60 00 00 */ li r3, 0 +/* 80099CE0 00096C20 7C 00 07 74 */ extsb r0, r0 +/* 80099CE4 00096C24 B3 AD 94 5E */ sth r29, displayOffsetV@sda21(r13) +/* 80099CE8 00096C28 B0 0D 94 5C */ sth r0, displayOffsetH@sda21(r13) +/* 80099CEC 00096C2C 4B FF 87 31 */ bl __OSUnlockSram +/* 80099CF0 00096C30 A3 DC 00 00 */ lhz r30, 0(r28) +/* 80099CF4 00096C34 38 7F 01 14 */ addi r3, r31, 0x114 +/* 80099CF8 00096C38 3B 9F 01 18 */ addi r28, r31, 0x118 +/* 80099CFC 00096C3C 57 C0 F7 FE */ rlwinm r0, r30, 0x1e, 0x1f, 0x1f +/* 80099D00 00096C40 90 1F 01 14 */ stw r0, 0x114(r31) +/* 80099D04 00096C44 57 C0 C7 BE */ rlwinm r0, r30, 0x18, 0x1e, 0x1f +/* 80099D08 00096C48 90 1F 01 18 */ stw r0, 0x118(r31) +/* 80099D0C 00096C4C 80 1F 01 18 */ lwz r0, 0x118(r31) +/* 80099D10 00096C50 28 00 00 03 */ cmplwi r0, 3 +/* 80099D14 00096C54 40 82 00 08 */ bne lbl_80099D1C +/* 80099D18 00096C58 48 00 00 08 */ b lbl_80099D20 +lbl_80099D1C: +/* 80099D1C 00096C5C 7C 1D 03 78 */ mr r29, r0 +lbl_80099D20: +/* 80099D20 00096C60 80 03 00 00 */ lwz r0, 0(r3) +/* 80099D24 00096C64 57 A3 10 3A */ slwi r3, r29, 2 +/* 80099D28 00096C68 7C 63 02 14 */ add r3, r3, r0 +/* 80099D2C 00096C6C 4B FF FB 79 */ bl getTiming +/* 80099D30 00096C70 90 7F 01 44 */ stw r3, 0x144(r31) +/* 80099D34 00096C74 38 9F 01 44 */ addi r4, r31, 0x144 +/* 80099D38 00096C78 38 00 02 80 */ li r0, 0x280 +/* 80099D3C 00096C7C B3 DF 00 02 */ sth r30, 2(r31) +/* 80099D40 00096C80 39 00 00 00 */ li r8, 0 +/* 80099D44 00096C84 38 DF 00 F6 */ addi r6, r31, 0xf6 +/* 80099D48 00096C88 80 84 00 00 */ lwz r4, 0(r4) +/* 80099D4C 00096C8C 38 7F 00 F2 */ addi r3, r31, 0xf2 +/* 80099D50 00096C90 90 8D 94 80 */ stw r4, CurrTiming@sda21(r13) +/* 80099D54 00096C94 80 9C 00 00 */ lwz r4, 0(r28) +/* 80099D58 00096C98 90 8D 94 84 */ stw r4, CurrTvMode@sda21(r13) +/* 80099D5C 00096C9C B0 1F 00 F4 */ sth r0, 0xf4(r31) +/* 80099D60 00096CA0 80 8D 94 80 */ lwz r4, CurrTiming@sda21(r13) +/* 80099D64 00096CA4 A4 04 00 02 */ lhzu r0, 2(r4) +/* 80099D68 00096CA8 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 80099D6C 00096CAC B0 1F 00 F6 */ sth r0, 0xf6(r31) +/* 80099D70 00096CB0 A0 1F 00 F4 */ lhz r0, 0xf4(r31) +/* 80099D74 00096CB4 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80099D78 00096CB8 7C 00 0E 70 */ srawi r0, r0, 1 +/* 80099D7C 00096CBC 7C 00 01 94 */ addze r0, r0 +/* 80099D80 00096CC0 B0 1F 00 F0 */ sth r0, 0xf0(r31) +/* 80099D84 00096CC4 B1 1F 00 F2 */ sth r8, 0xf2(r31) +/* 80099D88 00096CC8 A0 1F 00 F4 */ lhz r0, 0xf4(r31) +/* 80099D8C 00096CCC A8 FF 00 F0 */ lha r7, 0xf0(r31) +/* 80099D90 00096CD0 A8 AD 94 5C */ lha r5, displayOffsetH@sda21(r13) +/* 80099D94 00096CD4 20 00 02 D0 */ subfic r0, r0, 0x2d0 +/* 80099D98 00096CD8 A1 24 00 00 */ lhz r9, 0(r4) +/* 80099D9C 00096CDC 7C A7 2A 14 */ add r5, r7, r5 +/* 80099DA0 00096CE0 7C 05 00 00 */ cmpw r5, r0 +/* 80099DA4 00096CE4 40 81 00 08 */ ble lbl_80099DAC +/* 80099DA8 00096CE8 48 00 00 18 */ b lbl_80099DC0 +lbl_80099DAC: +/* 80099DAC 00096CEC 2C 05 00 00 */ cmpwi r5, 0 +/* 80099DB0 00096CF0 40 80 00 08 */ bge lbl_80099DB8 +/* 80099DB4 00096CF4 48 00 00 08 */ b lbl_80099DBC +lbl_80099DB8: +/* 80099DB8 00096CF8 7C A8 2B 78 */ mr r8, r5 +lbl_80099DBC: +/* 80099DBC 00096CFC 7D 00 43 78 */ mr r0, r8 +lbl_80099DC0: +/* 80099DC0 00096D00 B0 1F 00 F8 */ sth r0, 0xf8(r31) +/* 80099DC4 00096D04 39 1F 01 10 */ addi r8, r31, 0x110 +/* 80099DC8 00096D08 80 1F 01 10 */ lwz r0, 0x110(r31) +/* 80099DCC 00096D0C 2C 00 00 00 */ cmpwi r0, 0 +/* 80099DD0 00096D10 40 82 00 0C */ bne lbl_80099DDC +/* 80099DD4 00096D14 39 60 00 02 */ li r11, 2 +/* 80099DD8 00096D18 48 00 00 08 */ b lbl_80099DE0 +lbl_80099DDC: +/* 80099DDC 00096D1C 39 60 00 01 */ li r11, 1 +lbl_80099DE0: +/* 80099DE0 00096D20 A0 03 00 00 */ lhz r0, 0(r3) +/* 80099DE4 00096D24 A8 AD 94 5E */ lha r5, displayOffsetV@sda21(r13) +/* 80099DE8 00096D28 7C 07 07 34 */ extsh r7, r0 +/* 80099DEC 00096D2C 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 80099DF0 00096D30 7C E7 2A 14 */ add r7, r7, r5 +/* 80099DF4 00096D34 7C 07 00 00 */ cmpw r7, r0 +/* 80099DF8 00096D38 40 81 00 08 */ ble lbl_80099E00 +/* 80099DFC 00096D3C 48 00 00 08 */ b lbl_80099E04 +lbl_80099E00: +/* 80099E00 00096D40 7C 07 03 78 */ mr r7, r0 +lbl_80099E04: +/* 80099E04 00096D44 B0 FF 00 FA */ sth r7, 0xfa(r31) +/* 80099E08 00096D48 7D 27 07 34 */ extsh r7, r9 +/* 80099E0C 00096D4C 54 E7 08 3C */ slwi r7, r7, 1 +/* 80099E10 00096D50 A3 86 00 00 */ lhz r28, 0(r6) +/* 80099E14 00096D54 7D 80 38 50 */ subf r12, r0, r7 +/* 80099E18 00096D58 A9 43 00 00 */ lha r10, 0(r3) +/* 80099E1C 00096D5C 7F 87 07 34 */ extsh r7, r28 +/* 80099E20 00096D60 7D 27 2A 14 */ add r9, r7, r5 +/* 80099E24 00096D64 7D 2A 4A 14 */ add r9, r10, r9 +/* 80099E28 00096D68 7C EC 48 51 */ subf. r7, r12, r9 +/* 80099E2C 00096D6C 40 81 00 0C */ ble lbl_80099E38 +/* 80099E30 00096D70 7D 2C 48 50 */ subf r9, r12, r9 +/* 80099E34 00096D74 48 00 00 08 */ b lbl_80099E3C +lbl_80099E38: +/* 80099E38 00096D78 39 20 00 00 */ li r9, 0 +lbl_80099E3C: +/* 80099E3C 00096D7C 7D 4A 2A 14 */ add r10, r10, r5 +/* 80099E40 00096D80 7C E0 50 51 */ subf. r7, r0, r10 +/* 80099E44 00096D84 40 80 00 0C */ bge lbl_80099E50 +/* 80099E48 00096D88 7C E0 50 50 */ subf r7, r0, r10 +/* 80099E4C 00096D8C 48 00 00 08 */ b lbl_80099E54 +lbl_80099E50: +/* 80099E50 00096D90 38 E0 00 00 */ li r7, 0 +lbl_80099E54: +/* 80099E54 00096D94 7C FC 3A 14 */ add r7, r28, r7 +/* 80099E58 00096D98 7C E9 38 50 */ subf r7, r9, r7 +/* 80099E5C 00096D9C B0 FF 00 FC */ sth r7, 0xfc(r31) +/* 80099E60 00096DA0 A8 E3 00 00 */ lha r7, 0(r3) +/* 80099E64 00096DA4 7D 27 2A 14 */ add r9, r7, r5 +/* 80099E68 00096DA8 7C E0 48 51 */ subf. r7, r0, r9 +/* 80099E6C 00096DAC 40 80 00 0C */ bge lbl_80099E78 +/* 80099E70 00096DB0 7C E0 48 50 */ subf r7, r0, r9 +/* 80099E74 00096DB4 48 00 00 08 */ b lbl_80099E7C +lbl_80099E78: +/* 80099E78 00096DB8 38 E0 00 00 */ li r7, 0 +lbl_80099E7C: +/* 80099E7C 00096DBC 7D 47 5B D6 */ divw r10, r7, r11 +/* 80099E80 00096DC0 38 FF 01 08 */ addi r7, r31, 0x108 +/* 80099E84 00096DC4 A1 3F 01 08 */ lhz r9, 0x108(r31) +/* 80099E88 00096DC8 7D 2A 48 50 */ subf r9, r10, r9 +/* 80099E8C 00096DCC B1 3F 00 FE */ sth r9, 0xfe(r31) +/* 80099E90 00096DD0 A8 C6 00 00 */ lha r6, 0(r6) +/* 80099E94 00096DD4 A9 23 00 00 */ lha r9, 0(r3) +/* 80099E98 00096DD8 7C C6 2A 14 */ add r6, r6, r5 +/* 80099E9C 00096DDC 7C C9 32 14 */ add r6, r9, r6 +/* 80099EA0 00096DE0 7C 6C 30 51 */ subf. r3, r12, r6 +/* 80099EA4 00096DE4 40 81 00 0C */ ble lbl_80099EB0 +/* 80099EA8 00096DE8 7C CC 30 50 */ subf r6, r12, r6 +/* 80099EAC 00096DEC 48 00 00 08 */ b lbl_80099EB4 +lbl_80099EB0: +/* 80099EB0 00096DF0 38 C0 00 00 */ li r6, 0 +lbl_80099EB4: +/* 80099EB4 00096DF4 7C A9 2A 14 */ add r5, r9, r5 +/* 80099EB8 00096DF8 7C 60 28 51 */ subf. r3, r0, r5 +/* 80099EBC 00096DFC 40 80 00 0C */ bge lbl_80099EC8 +/* 80099EC0 00096E00 7C 00 28 50 */ subf r0, r0, r5 +/* 80099EC4 00096E04 48 00 00 08 */ b lbl_80099ECC +lbl_80099EC8: +/* 80099EC8 00096E08 38 00 00 00 */ li r0, 0 +lbl_80099ECC: +/* 80099ECC 00096E0C 7C 00 5B D6 */ divw r0, r0, r11 +/* 80099ED0 00096E10 A0 7F 01 0C */ lhz r3, 0x10c(r31) +/* 80099ED4 00096E14 7C 03 02 14 */ add r0, r3, r0 +/* 80099ED8 00096E18 7C A6 5B D6 */ divw r5, r6, r11 +/* 80099EDC 00096E1C 7C 05 00 50 */ subf r0, r5, r0 +/* 80099EE0 00096E20 B0 1F 01 00 */ sth r0, 0x100(r31) +/* 80099EE4 00096E24 39 20 02 80 */ li r9, 0x280 +/* 80099EE8 00096E28 3B 80 00 00 */ li r28, 0 +/* 80099EEC 00096E2C B1 3F 01 02 */ sth r9, 0x102(r31) +/* 80099EF0 00096E30 38 A0 00 28 */ li r5, 0x28 +/* 80099EF4 00096E34 38 00 00 01 */ li r0, 1 +/* 80099EF8 00096E38 A0 C4 00 00 */ lhz r6, 0(r4) +/* 80099EFC 00096E3C 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099F00 00096E40 54 C6 0C 3C */ rlwinm r6, r6, 1, 0x10, 0x1e +/* 80099F04 00096E44 B0 DF 01 04 */ sth r6, 0x104(r31) +/* 80099F08 00096E48 B3 9F 01 06 */ sth r28, 0x106(r31) +/* 80099F0C 00096E4C B3 87 00 00 */ sth r28, 0(r7) +/* 80099F10 00096E50 B1 3F 01 0A */ sth r9, 0x10a(r31) +/* 80099F14 00096E54 A0 84 00 00 */ lhz r4, 0(r4) +/* 80099F18 00096E58 54 84 0C 3C */ rlwinm r4, r4, 1, 0x10, 0x1e +/* 80099F1C 00096E5C B0 9F 01 0C */ sth r4, 0x10c(r31) +/* 80099F20 00096E60 93 88 00 00 */ stw r28, 0(r8) +/* 80099F24 00096E64 98 BF 01 1C */ stb r5, 0x11c(r31) +/* 80099F28 00096E68 98 BF 01 1D */ stb r5, 0x11d(r31) +/* 80099F2C 00096E6C 98 BF 01 1E */ stb r5, 0x11e(r31) +/* 80099F30 00096E70 9B 9F 01 2C */ stb r28, 0x12c(r31) +/* 80099F34 00096E74 90 1F 01 30 */ stw r0, 0x130(r31) +/* 80099F38 00096E78 93 9F 01 34 */ stw r28, 0x134(r31) +/* 80099F3C 00096E7C 4B FF 8D 3D */ bl OSInitThreadQueue +/* 80099F40 00096E80 3C 60 CC 00 */ lis r3, 0xCC002030@ha +/* 80099F44 00096E84 A0 03 20 30 */ lhz r0, 0xCC002030@l(r3) +/* 80099F48 00096E88 38 83 20 00 */ addi r4, r3, 0x2000 +/* 80099F4C 00096E8C 38 A3 20 00 */ addi r5, r3, 0x2000 +/* 80099F50 00096E90 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 80099F54 00096E94 B0 04 00 30 */ sth r0, 0x30(r4) +/* 80099F58 00096E98 3C 60 80 0A */ lis r3, __VIRetraceHandler@ha +/* 80099F5C 00096E9C 38 83 96 38 */ addi r4, r3, __VIRetraceHandler@l +/* 80099F60 00096EA0 A0 05 00 34 */ lhz r0, 0x34(r5) +/* 80099F64 00096EA4 38 60 00 18 */ li r3, 0x18 +/* 80099F68 00096EA8 54 00 04 7E */ clrlwi r0, r0, 0x11 +/* 80099F6C 00096EAC B0 05 00 34 */ sth r0, 0x34(r5) +/* 80099F70 00096EB0 93 8D 94 50 */ stw r28, PreCB@sda21(r13) +/* 80099F74 00096EB4 93 8D 94 54 */ stw r28, PostCB@sda21(r13) +/* 80099F78 00096EB8 4B FF 62 A1 */ bl __OSSetInterruptHandler +/* 80099F7C 00096EBC 38 60 00 80 */ li r3, 0x80 +/* 80099F80 00096EC0 4B FF 66 9D */ bl __OSUnmaskInterrupts +/* 80099F84 00096EC4 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 80099F88 00096EC8 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 80099F8C 00096ECC 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 80099F90 00096ED0 83 A1 00 0C */ lwz r29, 0xc(r1) +/* 80099F94 00096ED4 83 81 00 08 */ lwz r28, 8(r1) +/* 80099F98 00096ED8 38 21 00 18 */ addi r1, r1, 0x18 +/* 80099F9C 00096EDC 7C 08 03 A6 */ mtlr r0 +/* 80099FA0 00096EE0 4E 80 00 20 */ blr + +.global VIWaitForRetrace +VIWaitForRetrace: +/* 80099FA4 00096EE4 7C 08 02 A6 */ mflr r0 +/* 80099FA8 00096EE8 90 01 00 04 */ stw r0, 4(r1) +/* 80099FAC 00096EEC 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 80099FB0 00096EF0 93 E1 00 0C */ stw r31, 0xc(r1) +/* 80099FB4 00096EF4 93 C1 00 08 */ stw r30, 8(r1) +/* 80099FB8 00096EF8 4B FF 62 15 */ bl OSDisableInterrupts +/* 80099FBC 00096EFC 83 CD 94 40 */ lwz r30, retraceCount@sda21(r13) +/* 80099FC0 00096F00 7C 7F 1B 78 */ mr r31, r3 +lbl_80099FC4: +/* 80099FC4 00096F04 38 6D 94 48 */ addi r3, r13, retraceQueue@sda21 +/* 80099FC8 00096F08 4B FF 9C 39 */ bl OSSleepThread +/* 80099FCC 00096F0C 80 0D 94 40 */ lwz r0, retraceCount@sda21(r13) +/* 80099FD0 00096F10 7C 1E 00 40 */ cmplw r30, r0 +/* 80099FD4 00096F14 41 82 FF F0 */ beq lbl_80099FC4 +/* 80099FD8 00096F18 7F E3 FB 78 */ mr r3, r31 +/* 80099FDC 00096F1C 4B FF 62 19 */ bl OSRestoreInterrupts +/* 80099FE0 00096F20 80 01 00 14 */ lwz r0, 0x14(r1) +/* 80099FE4 00096F24 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 80099FE8 00096F28 83 C1 00 08 */ lwz r30, 8(r1) +/* 80099FEC 00096F2C 38 21 00 10 */ addi r1, r1, 0x10 +/* 80099FF0 00096F30 7C 08 03 A6 */ mtlr r0 +/* 80099FF4 00096F34 4E 80 00 20 */ blr + +.global setFbbRegs +setFbbRegs: +/* 80099FF8 00096F38 94 21 FF B8 */ stwu r1, -0x48(r1) +/* 80099FFC 00096F3C 3D 20 80 3F */ lis r9, regs@ha +/* 8009A000 00096F40 39 29 BD C8 */ addi r9, r9, regs@l +/* 8009A004 00096F44 93 E1 00 44 */ stw r31, 0x44(r1) +/* 8009A008 00096F48 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 8009A00C 00096F4C A0 03 00 0E */ lhz r0, 0xe(r3) +/* 8009A010 00096F50 55 1F 28 34 */ slwi r31, r8, 5 +/* 8009A014 00096F54 A1 03 00 16 */ lhz r8, 0x16(r3) +/* 8009A018 00096F58 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 8009A01C 00096F5C 81 63 00 20 */ lwz r11, 0x20(r3) +/* 8009A020 00096F60 81 43 00 30 */ lwz r10, 0x30(r3) +/* 8009A024 00096F64 A1 83 00 0A */ lhz r12, 0xa(r3) +/* 8009A028 00096F68 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 8009A02C 00096F6C 7C 08 02 14 */ add r0, r8, r0 +/* 8009A030 00096F70 7C 0A 02 14 */ add r0, r10, r0 +/* 8009A034 00096F74 2C 0B 00 00 */ cmpwi r11, 0 +/* 8009A038 00096F78 90 04 00 00 */ stw r0, 0(r4) +/* 8009A03C 00096F7C 40 82 00 0C */ bne lbl_8009A048 +/* 8009A040 00096F80 81 04 00 00 */ lwz r8, 0(r4) +/* 8009A044 00096F84 48 00 00 0C */ b lbl_8009A050 +lbl_8009A048: +/* 8009A048 00096F88 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A04C 00096F8C 7D 00 FA 14 */ add r8, r0, r31 +lbl_8009A050: +/* 8009A050 00096F90 7D 80 0E 70 */ srawi r0, r12, 1 +/* 8009A054 00096F94 91 05 00 00 */ stw r8, 0(r5) +/* 8009A058 00096F98 7C 00 01 94 */ addze r0, r0 +/* 8009A05C 00096F9C 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A060 00096FA0 7C 00 60 10 */ subfc r0, r0, r12 +/* 8009A064 00096FA4 2C 00 00 01 */ cmpwi r0, 1 +/* 8009A068 00096FA8 40 82 00 14 */ bne lbl_8009A07C +/* 8009A06C 00096FAC 81 04 00 00 */ lwz r8, 0(r4) +/* 8009A070 00096FB0 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A074 00096FB4 90 04 00 00 */ stw r0, 0(r4) +/* 8009A078 00096FB8 91 05 00 00 */ stw r8, 0(r5) +lbl_8009A07C: +/* 8009A07C 00096FBC 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A080 00096FC0 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A084 00096FC4 90 04 00 00 */ stw r0, 0(r4) +/* 8009A088 00096FC8 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A08C 00096FCC 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A090 00096FD0 90 05 00 00 */ stw r0, 0(r5) +/* 8009A094 00096FD4 80 03 00 44 */ lwz r0, 0x44(r3) +/* 8009A098 00096FD8 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A09C 00096FDC 41 82 00 90 */ beq lbl_8009A12C +/* 8009A0A0 00096FE0 89 03 00 2C */ lbz r8, 0x2c(r3) +/* 8009A0A4 00096FE4 A0 03 00 0E */ lhz r0, 0xe(r3) +/* 8009A0A8 00096FE8 55 1F 28 34 */ slwi r31, r8, 5 +/* 8009A0AC 00096FEC A1 03 00 16 */ lhz r8, 0x16(r3) +/* 8009A0B0 00096FF0 7C 1F 01 D6 */ mullw r0, r31, r0 +/* 8009A0B4 00096FF4 81 63 00 20 */ lwz r11, 0x20(r3) +/* 8009A0B8 00096FF8 81 43 00 48 */ lwz r10, 0x48(r3) +/* 8009A0BC 00096FFC A1 83 00 0A */ lhz r12, 0xa(r3) +/* 8009A0C0 00097000 55 08 08 34 */ rlwinm r8, r8, 1, 0, 0x1a +/* 8009A0C4 00097004 7C 08 02 14 */ add r0, r8, r0 +/* 8009A0C8 00097008 7C 0A 02 14 */ add r0, r10, r0 +/* 8009A0CC 0009700C 2C 0B 00 00 */ cmpwi r11, 0 +/* 8009A0D0 00097010 90 06 00 00 */ stw r0, 0(r6) +/* 8009A0D4 00097014 40 82 00 0C */ bne lbl_8009A0E0 +/* 8009A0D8 00097018 81 06 00 00 */ lwz r8, 0(r6) +/* 8009A0DC 0009701C 48 00 00 0C */ b lbl_8009A0E8 +lbl_8009A0E0: +/* 8009A0E0 00097020 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A0E4 00097024 7D 00 FA 14 */ add r8, r0, r31 +lbl_8009A0E8: +/* 8009A0E8 00097028 7D 80 0E 70 */ srawi r0, r12, 1 +/* 8009A0EC 0009702C 91 07 00 00 */ stw r8, 0(r7) +/* 8009A0F0 00097030 7C 00 01 94 */ addze r0, r0 +/* 8009A0F4 00097034 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A0F8 00097038 7C 00 60 10 */ subfc r0, r0, r12 +/* 8009A0FC 0009703C 2C 00 00 01 */ cmpwi r0, 1 +/* 8009A100 00097040 40 82 00 14 */ bne lbl_8009A114 +/* 8009A104 00097044 81 06 00 00 */ lwz r8, 0(r6) +/* 8009A108 00097048 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A10C 0009704C 90 06 00 00 */ stw r0, 0(r6) +/* 8009A110 00097050 91 07 00 00 */ stw r8, 0(r7) +lbl_8009A114: +/* 8009A114 00097054 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A118 00097058 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A11C 0009705C 90 06 00 00 */ stw r0, 0(r6) +/* 8009A120 00097060 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A124 00097064 54 00 00 BE */ clrlwi r0, r0, 2 +/* 8009A128 00097068 90 07 00 00 */ stw r0, 0(r7) +lbl_8009A12C: +/* 8009A12C 0009706C 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A130 00097070 3D 00 01 00 */ lis r8, 0x100 +/* 8009A134 00097074 7C 00 40 40 */ cmplw r0, r8 +/* 8009A138 00097078 40 80 00 30 */ bge lbl_8009A168 +/* 8009A13C 0009707C 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A140 00097080 7C 00 40 40 */ cmplw r0, r8 +/* 8009A144 00097084 40 80 00 24 */ bge lbl_8009A168 +/* 8009A148 00097088 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A14C 0009708C 7C 00 40 40 */ cmplw r0, r8 +/* 8009A150 00097090 40 80 00 18 */ bge lbl_8009A168 +/* 8009A154 00097094 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A158 00097098 7C 00 40 40 */ cmplw r0, r8 +/* 8009A15C 0009709C 40 80 00 0C */ bge lbl_8009A168 +/* 8009A160 000970A0 39 40 00 00 */ li r10, 0 +/* 8009A164 000970A4 48 00 00 08 */ b lbl_8009A16C +lbl_8009A168: +/* 8009A168 000970A8 39 40 00 01 */ li r10, 1 +lbl_8009A16C: +/* 8009A16C 000970AC 28 0A 00 00 */ cmplwi r10, 0 +/* 8009A170 000970B0 41 82 00 34 */ beq lbl_8009A1A4 +/* 8009A174 000970B4 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A178 000970B8 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A17C 000970BC 90 04 00 00 */ stw r0, 0(r4) +/* 8009A180 000970C0 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A184 000970C4 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A188 000970C8 90 05 00 00 */ stw r0, 0(r5) +/* 8009A18C 000970CC 80 06 00 00 */ lwz r0, 0(r6) +/* 8009A190 000970D0 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A194 000970D4 90 06 00 00 */ stw r0, 0(r6) +/* 8009A198 000970D8 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A19C 000970DC 54 00 D9 7E */ srwi r0, r0, 5 +/* 8009A1A0 000970E0 90 07 00 00 */ stw r0, 0(r7) +lbl_8009A1A4: +/* 8009A1A4 000970E4 80 04 00 00 */ lwz r0, 0(r4) +/* 8009A1A8 000970E8 55 4B 60 26 */ slwi r11, r10, 0xc +/* 8009A1AC 000970EC 3D 00 00 01 */ lis r8, 1 +/* 8009A1B0 000970F0 B0 09 00 1E */ sth r0, 0x1e(r9) +/* 8009A1B4 000970F4 3C 00 00 02 */ lis r0, 2 +/* 8009A1B8 000970F8 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A1BC 000970FC 81 8D 94 6C */ lwz r12, lbl_80409F2C@sda21(r13) +/* 8009A1C0 00097100 7D 4A 43 78 */ or r10, r10, r8 +/* 8009A1C4 00097104 91 8D 94 6C */ stw r12, lbl_80409F2C@sda21(r13) +/* 8009A1C8 00097108 91 4D 94 68 */ stw r10, changed@sda21(r13) +/* 8009A1CC 0009710C 81 44 00 00 */ lwz r10, 0(r4) +/* 8009A1D0 00097110 88 83 00 3C */ lbz r4, 0x3c(r3) +/* 8009A1D4 00097114 55 4A 84 3E */ srwi r10, r10, 0x10 +/* 8009A1D8 00097118 54 84 40 2E */ slwi r4, r4, 8 +/* 8009A1DC 0009711C 7D 44 23 78 */ or r4, r10, r4 +/* 8009A1E0 00097120 7D 64 23 78 */ or r4, r11, r4 +/* 8009A1E4 00097124 B0 89 00 1C */ sth r4, 0x1c(r9) +/* 8009A1E8 00097128 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A1EC 0009712C 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A1F0 00097130 7C 80 03 78 */ or r0, r4, r0 +/* 8009A1F4 00097134 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A1F8 00097138 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A1FC 0009713C 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A200 00097140 B0 09 00 26 */ sth r0, 0x26(r9) +/* 8009A204 00097144 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A208 00097148 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A20C 0009714C 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A210 00097150 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A214 00097154 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A218 00097158 80 05 00 00 */ lwz r0, 0(r5) +/* 8009A21C 0009715C 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8009A220 00097160 B0 09 00 24 */ sth r0, 0x24(r9) +/* 8009A224 00097164 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A228 00097168 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A22C 0009716C 60 00 20 00 */ ori r0, r0, 0x2000 +/* 8009A230 00097170 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A234 00097174 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A238 00097178 80 03 00 44 */ lwz r0, 0x44(r3) +/* 8009A23C 0009717C 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A240 00097180 41 82 00 80 */ beq lbl_8009A2C0 +/* 8009A244 00097184 80 66 00 00 */ lwz r3, 0(r6) +/* 8009A248 00097188 38 08 80 00 */ addi r0, r8, -32768 +/* 8009A24C 0009718C B0 69 00 22 */ sth r3, 0x22(r9) +/* 8009A250 00097190 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009A254 00097194 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A258 00097198 60 63 40 00 */ ori r3, r3, 0x4000 +/* 8009A25C 0009719C 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A260 000971A0 90 6D 94 68 */ stw r3, changed@sda21(r13) +/* 8009A264 000971A4 80 66 00 00 */ lwz r3, 0(r6) +/* 8009A268 000971A8 54 63 84 3E */ srwi r3, r3, 0x10 +/* 8009A26C 000971AC B0 69 00 20 */ sth r3, 0x20(r9) +/* 8009A270 000971B0 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009A274 000971B4 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009A278 000971B8 7C 60 03 78 */ or r0, r3, r0 +/* 8009A27C 000971BC 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009A280 000971C0 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A284 000971C4 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A288 000971C8 B0 09 00 2A */ sth r0, 0x2a(r9) +/* 8009A28C 000971CC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A290 000971D0 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A294 000971D4 60 00 04 00 */ ori r0, r0, 0x400 +/* 8009A298 000971D8 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A29C 000971DC 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A2A0 000971E0 80 07 00 00 */ lwz r0, 0(r7) +/* 8009A2A4 000971E4 54 00 84 3E */ srwi r0, r0, 0x10 +/* 8009A2A8 000971E8 B0 09 00 28 */ sth r0, 0x28(r9) +/* 8009A2AC 000971EC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A2B0 000971F0 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A2B4 000971F4 60 00 08 00 */ ori r0, r0, 0x800 +/* 8009A2B8 000971F8 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A2BC 000971FC 90 0D 94 68 */ stw r0, changed@sda21(r13) +lbl_8009A2C0: +/* 8009A2C0 00097200 83 E1 00 44 */ lwz r31, 0x44(r1) +/* 8009A2C4 00097204 38 21 00 48 */ addi r1, r1, 0x48 +/* 8009A2C8 00097208 4E 80 00 20 */ blr + +.global setVerticalRegs +setVerticalRegs: +/* 8009A2CC 0009720C 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8009A2D0 00097210 54 A0 06 3E */ clrlwi r0, r5, 0x18 +/* 8009A2D4 00097214 3D 60 80 3F */ lis r11, regs@ha +/* 8009A2D8 00097218 93 E1 00 24 */ stw r31, 0x24(r1) +/* 8009A2DC 0009721C 28 00 00 0A */ cmplwi r0, 0xa +/* 8009A2E0 00097220 83 E1 00 30 */ lwz r31, 0x30(r1) +/* 8009A2E4 00097224 39 6B BD C8 */ addi r11, r11, regs@l +/* 8009A2E8 00097228 93 C1 00 20 */ stw r30, 0x20(r1) +/* 8009A2EC 0009722C 93 A1 00 1C */ stw r29, 0x1c(r1) +/* 8009A2F0 00097230 41 80 00 10 */ blt lbl_8009A300 +/* 8009A2F4 00097234 39 80 00 01 */ li r12, 1 +/* 8009A2F8 00097238 3B A0 00 02 */ li r29, 2 +/* 8009A2FC 0009723C 48 00 00 0C */ b lbl_8009A308 +lbl_8009A300: +/* 8009A300 00097240 39 80 00 02 */ li r12, 2 +/* 8009A304 00097244 3B A0 00 01 */ li r29, 1 +lbl_8009A308: +/* 8009A308 00097248 54 7E 04 3E */ clrlwi r30, r3, 0x10 +/* 8009A30C 0009724C 7F C0 0E 70 */ srawi r0, r30, 1 +/* 8009A310 00097250 7C 00 01 94 */ addze r0, r0 +/* 8009A314 00097254 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A318 00097258 7C 00 F0 11 */ subfc. r0, r0, r30 +/* 8009A31C 0009725C 40 82 00 3C */ bne lbl_8009A358 +/* 8009A320 00097260 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 8009A324 00097264 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 8009A328 00097268 7C 03 01 D6 */ mullw r0, r3, r0 +/* 8009A32C 0009726C 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 8009A330 00097270 7C 03 00 50 */ subf r0, r3, r0 +/* 8009A334 00097274 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 8009A338 00097278 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 8009A33C 0009727C 7C 1E 00 50 */ subf r0, r30, r0 +/* 8009A340 00097280 7F C3 01 D6 */ mullw r30, r3, r0 +/* 8009A344 00097284 7C 07 EA 14 */ add r0, r7, r29 +/* 8009A348 00097288 7C C9 F2 14 */ add r6, r9, r30 +/* 8009A34C 0009728C 7C 68 EA 14 */ add r3, r8, r29 +/* 8009A350 00097290 7C EA F2 14 */ add r7, r10, r30 +/* 8009A354 00097294 48 00 00 38 */ b lbl_8009A38C +lbl_8009A358: +/* 8009A358 00097298 55 83 04 3E */ clrlwi r3, r12, 0x10 +/* 8009A35C 0009729C 54 C0 04 3E */ clrlwi r0, r6, 0x10 +/* 8009A360 000972A0 7C 03 01 D6 */ mullw r0, r3, r0 +/* 8009A364 000972A4 54 83 04 3E */ clrlwi r3, r4, 0x10 +/* 8009A368 000972A8 7C 03 00 50 */ subf r0, r3, r0 +/* 8009A36C 000972AC 57 A3 04 3E */ clrlwi r3, r29, 0x10 +/* 8009A370 000972B0 7F A3 F1 D6 */ mullw r29, r3, r30 +/* 8009A374 000972B4 7C 1E 00 50 */ subf r0, r30, r0 +/* 8009A378 000972B8 7F C3 01 D6 */ mullw r30, r3, r0 +/* 8009A37C 000972BC 7C 08 EA 14 */ add r0, r8, r29 +/* 8009A380 000972C0 7C CA F2 14 */ add r6, r10, r30 +/* 8009A384 000972C4 7C 67 EA 14 */ add r3, r7, r29 +/* 8009A388 000972C8 7C E9 F2 14 */ add r7, r9, r30 +lbl_8009A38C: +/* 8009A38C 000972CC 54 88 04 3E */ clrlwi r8, r4, 0x10 +/* 8009A390 000972D0 55 84 04 3E */ clrlwi r4, r12, 0x10 +/* 8009A394 000972D4 7C 88 23 D6 */ divw r4, r8, r4 +/* 8009A398 000972D8 2C 1F 00 00 */ cmpwi r31, 0 +/* 8009A39C 000972DC 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 8009A3A0 000972E0 41 82 00 20 */ beq lbl_8009A3C0 +/* 8009A3A4 000972E4 54 84 08 3C */ slwi r4, r4, 1 +/* 8009A3A8 000972E8 38 84 FF FE */ addi r4, r4, -2 +/* 8009A3AC 000972EC 7C 00 22 14 */ add r0, r0, r4 +/* 8009A3B0 000972F0 7C 63 22 14 */ add r3, r3, r4 +/* 8009A3B4 000972F4 38 80 00 00 */ li r4, 0 +/* 8009A3B8 000972F8 38 C6 00 02 */ addi r6, r6, 2 +/* 8009A3BC 000972FC 38 E7 00 02 */ addi r7, r7, 2 +lbl_8009A3C0: +/* 8009A3C0 00097300 54 A5 06 3E */ clrlwi r5, r5, 0x18 +/* 8009A3C4 00097304 54 84 23 36 */ rlwinm r4, r4, 4, 0xc, 0x1b +/* 8009A3C8 00097308 7C A4 23 78 */ or r4, r5, r4 +/* 8009A3CC 0009730C B0 8B 00 00 */ sth r4, 0(r11) +/* 8009A3D0 00097310 3C 80 80 00 */ lis r4, 0x8000 +/* 8009A3D4 00097314 3D 20 01 00 */ lis r9, 0x100 +/* 8009A3D8 00097318 80 AD 94 68 */ lwz r5, changed@sda21(r13) +/* 8009A3DC 0009731C 3D 00 02 00 */ lis r8, 0x200 +/* 8009A3E0 00097320 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A3E4 00097324 7C A4 23 78 */ or r4, r5, r4 +/* 8009A3E8 00097328 3C A0 00 40 */ lis r5, 0x40 +/* 8009A3EC 0009732C 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A3F0 00097330 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009A3F4 00097334 3C 80 00 80 */ lis r4, 0x80 +/* 8009A3F8 00097338 B0 0B 00 0E */ sth r0, 0xe(r11) +/* 8009A3FC 0009733C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A400 00097340 81 4D 94 6C */ lwz r10, lbl_80409F2C@sda21(r13) +/* 8009A404 00097344 7C 00 4B 78 */ or r0, r0, r9 +/* 8009A408 00097348 91 4D 94 6C */ stw r10, lbl_80409F2C@sda21(r13) +/* 8009A40C 0009734C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A410 00097350 B0 CB 00 0C */ sth r6, 0xc(r11) +/* 8009A414 00097354 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A418 00097358 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009A41C 0009735C 7C 00 43 78 */ or r0, r0, r8 +/* 8009A420 00097360 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009A424 00097364 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A428 00097368 B0 6B 00 12 */ sth r3, 0x12(r11) +/* 8009A42C 0009736C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A430 00097370 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A434 00097374 7C 00 2B 78 */ or r0, r0, r5 +/* 8009A438 00097378 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A43C 0009737C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A440 00097380 B0 EB 00 10 */ sth r7, 0x10(r11) +/* 8009A444 00097384 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A448 00097388 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009A44C 0009738C 7C 00 23 78 */ or r0, r0, r4 +/* 8009A450 00097390 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009A454 00097394 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A458 00097398 83 E1 00 24 */ lwz r31, 0x24(r1) +/* 8009A45C 0009739C 83 C1 00 20 */ lwz r30, 0x20(r1) +/* 8009A460 000973A0 83 A1 00 1C */ lwz r29, 0x1c(r1) +/* 8009A464 000973A4 38 21 00 28 */ addi r1, r1, 0x28 +/* 8009A468 000973A8 4E 80 00 20 */ blr + +.global VIConfigure +VIConfigure: +/* 8009A46C 000973AC 7C 08 02 A6 */ mflr r0 +/* 8009A470 000973B0 3C A0 80 3B */ lis r5, timing@ha +/* 8009A474 000973B4 90 01 00 04 */ stw r0, 4(r1) +/* 8009A478 000973B8 3C 80 80 3F */ lis r4, regs@ha +/* 8009A47C 000973BC 94 21 FF 88 */ stwu r1, -0x78(r1) +/* 8009A480 000973C0 BD C1 00 30 */ stmw r14, 0x30(r1) +/* 8009A484 000973C4 3B E3 00 00 */ addi r31, r3, 0 +/* 8009A488 000973C8 39 E5 0F 30 */ addi r15, r5, timing@l +/* 8009A48C 000973CC 3B A4 BD C8 */ addi r29, r4, regs@l +/* 8009A490 000973D0 4B FF 5D 3D */ bl OSDisableInterrupts +/* 8009A494 000973D4 80 9F 00 00 */ lwz r4, 0(r31) +/* 8009A498 000973D8 3B 9D 01 14 */ addi r28, r29, 0x114 +/* 8009A49C 000973DC 80 1D 01 14 */ lwz r0, 0x114(r29) +/* 8009A4A0 000973E0 39 C3 00 00 */ addi r14, r3, 0 +/* 8009A4A4 000973E4 54 84 07 BE */ clrlwi r4, r4, 0x1e +/* 8009A4A8 000973E8 7C 00 20 40 */ cmplw r0, r4 +/* 8009A4AC 000973EC 41 82 00 10 */ beq lbl_8009A4BC +/* 8009A4B0 000973F0 38 00 00 01 */ li r0, 1 +/* 8009A4B4 000973F4 90 0D 94 60 */ stw r0, changeMode@sda21(r13) +/* 8009A4B8 000973F8 90 9C 00 00 */ stw r4, 0(r28) +lbl_8009A4BC: +/* 8009A4BC 000973FC 80 1F 00 00 */ lwz r0, 0(r31) +/* 8009A4C0 00097400 3C 60 80 00 */ lis r3, 0x800000CC@ha +/* 8009A4C4 00097404 82 23 00 CC */ lwz r17, 0x800000CC@l(r3) +/* 8009A4C8 00097408 54 10 F0 BE */ srwi r16, r0, 2 +/* 8009A4CC 0009740C 28 10 00 04 */ cmplwi r16, 4 +/* 8009A4D0 00097410 40 82 00 6C */ bne lbl_8009A53C +/* 8009A4D4 00097414 80 0D 94 8C */ lwz r0, message$332@sda21(r13) +/* 8009A4D8 00097418 28 00 00 00 */ cmplwi r0, 0 +/* 8009A4DC 0009741C 40 82 00 60 */ bne lbl_8009A53C +/* 8009A4E0 00097420 38 00 00 01 */ li r0, 1 +/* 8009A4E4 00097424 4C C6 31 82 */ crclr 6 +/* 8009A4E8 00097428 90 0D 94 8C */ stw r0, message$332@sda21(r13) +/* 8009A4EC 0009742C 38 6F 01 BC */ addi r3, r15, 0x1bc +/* 8009A4F0 00097430 4B FF 4A 75 */ bl OSReport +/* 8009A4F4 00097434 38 6F 01 E8 */ addi r3, r15, 0x1e8 +/* 8009A4F8 00097438 4C C6 31 82 */ crclr 6 +/* 8009A4FC 0009743C 4B FF 4A 69 */ bl OSReport +/* 8009A500 00097440 38 6F 02 14 */ addi r3, r15, 0x214 +/* 8009A504 00097444 4C C6 31 82 */ crclr 6 +/* 8009A508 00097448 4B FF 4A 5D */ bl OSReport +/* 8009A50C 0009744C 38 6F 02 40 */ addi r3, r15, 0x240 +/* 8009A510 00097450 4C C6 31 82 */ crclr 6 +/* 8009A514 00097454 4B FF 4A 51 */ bl OSReport +/* 8009A518 00097458 38 6F 02 6C */ addi r3, r15, 0x26c +/* 8009A51C 0009745C 4C C6 31 82 */ crclr 6 +/* 8009A520 00097460 4B FF 4A 45 */ bl OSReport +/* 8009A524 00097464 38 6F 02 98 */ addi r3, r15, 0x298 +/* 8009A528 00097468 4C C6 31 82 */ crclr 6 +/* 8009A52C 0009746C 4B FF 4A 39 */ bl OSReport +/* 8009A530 00097470 38 6F 01 BC */ addi r3, r15, 0x1bc +/* 8009A534 00097474 4C C6 31 82 */ crclr 6 +/* 8009A538 00097478 4B FF 4A 2D */ bl OSReport +lbl_8009A53C: +/* 8009A53C 0009747C 28 10 00 00 */ cmplwi r16, 0 +/* 8009A540 00097480 41 82 00 0C */ beq lbl_8009A54C +/* 8009A544 00097484 28 10 00 02 */ cmplwi r16, 2 +/* 8009A548 00097488 40 82 00 0C */ bne lbl_8009A554 +lbl_8009A54C: +/* 8009A54C 0009748C 92 3D 01 18 */ stw r17, 0x118(r29) +/* 8009A550 00097490 48 00 00 08 */ b lbl_8009A558 +lbl_8009A554: +/* 8009A554 00097494 92 1D 01 18 */ stw r16, 0x118(r29) +lbl_8009A558: +/* 8009A558 00097498 A0 1F 00 0A */ lhz r0, 0xa(r31) +/* 8009A55C 0009749C B0 1D 00 F0 */ sth r0, 0xf0(r29) +/* 8009A560 000974A0 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A564 000974A4 28 00 00 01 */ cmplwi r0, 1 +/* 8009A568 000974A8 40 82 00 10 */ bne lbl_8009A578 +/* 8009A56C 000974AC A0 1F 00 0C */ lhz r0, 0xc(r31) +/* 8009A570 000974B0 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 8009A574 000974B4 48 00 00 08 */ b lbl_8009A57C +lbl_8009A578: +/* 8009A578 000974B8 A0 1F 00 0C */ lhz r0, 0xc(r31) +lbl_8009A57C: +/* 8009A57C 000974BC B0 1D 00 F2 */ sth r0, 0xf2(r29) +/* 8009A580 000974C0 3A FD 00 F2 */ addi r23, r29, 0xf2 +/* 8009A584 000974C4 3B 1D 00 F4 */ addi r24, r29, 0xf4 +/* 8009A588 000974C8 A0 1F 00 0E */ lhz r0, 0xe(r31) +/* 8009A58C 000974CC 3B 7D 01 02 */ addi r27, r29, 0x102 +/* 8009A590 000974D0 3B 3D 01 10 */ addi r25, r29, 0x110 +/* 8009A594 000974D4 B0 1D 00 F4 */ sth r0, 0xf4(r29) +/* 8009A598 000974D8 38 00 00 00 */ li r0, 0 +/* 8009A59C 000974DC 3A 1D 01 0A */ addi r16, r29, 0x10a +/* 8009A5A0 000974E0 A0 7F 00 04 */ lhz r3, 4(r31) +/* 8009A5A4 000974E4 3B 5D 01 0C */ addi r26, r29, 0x10c +/* 8009A5A8 000974E8 39 FD 01 06 */ addi r15, r29, 0x106 +/* 8009A5AC 000974EC B0 7D 01 02 */ sth r3, 0x102(r29) +/* 8009A5B0 000974F0 3A 3D 01 08 */ addi r17, r29, 0x108 +/* 8009A5B4 000974F4 A0 7F 00 08 */ lhz r3, 8(r31) +/* 8009A5B8 000974F8 B0 7D 01 04 */ sth r3, 0x104(r29) +/* 8009A5BC 000974FC 80 7F 00 14 */ lwz r3, 0x14(r31) +/* 8009A5C0 00097500 90 7D 01 10 */ stw r3, 0x110(r29) +/* 8009A5C4 00097504 A0 7D 01 02 */ lhz r3, 0x102(r29) +/* 8009A5C8 00097508 B0 7D 01 0A */ sth r3, 0x10a(r29) +/* 8009A5CC 0009750C A0 7D 01 04 */ lhz r3, 0x104(r29) +/* 8009A5D0 00097510 B0 7D 01 0C */ sth r3, 0x10c(r29) +/* 8009A5D4 00097514 B0 1D 01 06 */ sth r0, 0x106(r29) +/* 8009A5D8 00097518 B0 1D 01 08 */ sth r0, 0x108(r29) +/* 8009A5DC 0009751C 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A5E0 00097520 28 00 00 02 */ cmplwi r0, 2 +/* 8009A5E4 00097524 40 82 00 0C */ bne lbl_8009A5F0 +/* 8009A5E8 00097528 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A5EC 0009752C 48 00 00 30 */ b lbl_8009A61C +lbl_8009A5F0: +/* 8009A5F0 00097530 28 00 00 03 */ cmplwi r0, 3 +/* 8009A5F4 00097534 40 82 00 0C */ bne lbl_8009A600 +/* 8009A5F8 00097538 A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A5FC 0009753C 48 00 00 20 */ b lbl_8009A61C +lbl_8009A600: +/* 8009A600 00097540 80 19 00 00 */ lwz r0, 0(r25) +/* 8009A604 00097544 2C 00 00 00 */ cmpwi r0, 0 +/* 8009A608 00097548 40 82 00 10 */ bne lbl_8009A618 +/* 8009A60C 0009754C A0 1A 00 00 */ lhz r0, 0(r26) +/* 8009A610 00097550 54 00 0C 3C */ rlwinm r0, r0, 1, 0x10, 0x1e +/* 8009A614 00097554 48 00 00 08 */ b lbl_8009A61C +lbl_8009A618: +/* 8009A618 00097558 A0 1A 00 00 */ lhz r0, 0(r26) +lbl_8009A61C: +/* 8009A61C 0009755C 3A DD 00 F6 */ addi r22, r29, 0xf6 +/* 8009A620 00097560 B0 1D 00 F6 */ sth r0, 0xf6(r29) +/* 8009A624 00097564 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A628 00097568 28 00 00 03 */ cmplwi r0, 3 +/* 8009A62C 0009756C 40 82 00 0C */ bne lbl_8009A638 +/* 8009A630 00097570 38 00 00 01 */ li r0, 1 +/* 8009A634 00097574 48 00 00 08 */ b lbl_8009A63C +lbl_8009A638: +/* 8009A638 00097578 38 00 00 00 */ li r0, 0 +lbl_8009A63C: +/* 8009A63C 0009757C 3A 5D 01 34 */ addi r18, r29, 0x134 +/* 8009A640 00097580 90 1D 01 34 */ stw r0, 0x134(r29) +/* 8009A644 00097584 3A BD 01 18 */ addi r21, r29, 0x118 +/* 8009A648 00097588 80 7D 01 18 */ lwz r3, 0x118(r29) +/* 8009A64C 0009758C 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A650 00097590 54 63 10 3A */ slwi r3, r3, 2 +/* 8009A654 00097594 7C 63 02 14 */ add r3, r3, r0 +/* 8009A658 00097598 4B FF F2 4D */ bl getTiming +/* 8009A65C 0009759C 7C 7E 1B 78 */ mr r30, r3 +/* 8009A660 000975A0 93 DD 01 44 */ stw r30, 0x144(r29) +/* 8009A664 000975A4 A0 18 00 00 */ lhz r0, 0(r24) +/* 8009A668 000975A8 A8 9D 00 F0 */ lha r4, 0xf0(r29) +/* 8009A66C 000975AC A8 6D 94 5C */ lha r3, displayOffsetH@sda21(r13) +/* 8009A670 000975B0 20 A0 02 D0 */ subfic r5, r0, 0x2d0 +/* 8009A674 000975B4 A0 1E 00 02 */ lhz r0, 2(r30) +/* 8009A678 000975B8 7C 64 1A 14 */ add r3, r4, r3 +/* 8009A67C 000975BC 7C 03 28 00 */ cmpw r3, r5 +/* 8009A680 000975C0 40 81 00 08 */ ble lbl_8009A688 +/* 8009A684 000975C4 48 00 00 14 */ b lbl_8009A698 +lbl_8009A688: +/* 8009A688 000975C8 2C 03 00 00 */ cmpwi r3, 0 +/* 8009A68C 000975CC 40 80 00 08 */ bge lbl_8009A694 +/* 8009A690 000975D0 38 60 00 00 */ li r3, 0 +lbl_8009A694: +/* 8009A694 000975D4 7C 65 1B 78 */ mr r5, r3 +lbl_8009A698: +/* 8009A698 000975D8 B0 BD 00 F8 */ sth r5, 0xf8(r29) +/* 8009A69C 000975DC 38 7D 00 F8 */ addi r3, r29, 0xf8 +/* 8009A6A0 000975E0 80 99 00 00 */ lwz r4, 0(r25) +/* 8009A6A4 000975E4 2C 04 00 00 */ cmpwi r4, 0 +/* 8009A6A8 000975E8 40 82 00 0C */ bne lbl_8009A6B4 +/* 8009A6AC 000975EC 38 80 00 02 */ li r4, 2 +/* 8009A6B0 000975F0 48 00 00 08 */ b lbl_8009A6B8 +lbl_8009A6B4: +/* 8009A6B4 000975F4 38 80 00 01 */ li r4, 1 +lbl_8009A6B8: +/* 8009A6B8 000975F8 A0 B7 00 00 */ lhz r5, 0(r23) +/* 8009A6BC 000975FC A8 CD 94 5E */ lha r6, displayOffsetV@sda21(r13) +/* 8009A6C0 00097600 7C A7 07 34 */ extsh r7, r5 +/* 8009A6C4 00097604 54 A5 07 FE */ clrlwi r5, r5, 0x1f +/* 8009A6C8 00097608 7C E7 32 14 */ add r7, r7, r6 +/* 8009A6CC 0009760C 7C 07 28 00 */ cmpw r7, r5 +/* 8009A6D0 00097610 40 81 00 08 */ ble lbl_8009A6D8 +/* 8009A6D4 00097614 48 00 00 08 */ b lbl_8009A6DC +lbl_8009A6D8: +/* 8009A6D8 00097618 7C A7 2B 78 */ mr r7, r5 +lbl_8009A6DC: +/* 8009A6DC 0009761C B0 FD 00 FA */ sth r7, 0xfa(r29) +/* 8009A6E0 00097620 7C 00 07 34 */ extsh r0, r0 +/* 8009A6E4 00097624 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A6E8 00097628 A1 16 00 00 */ lhz r8, 0(r22) +/* 8009A6EC 0009762C 7C 05 00 50 */ subf r0, r5, r0 +/* 8009A6F0 00097630 A8 F7 00 00 */ lha r7, 0(r23) +/* 8009A6F4 00097634 3A 7D 00 FA */ addi r19, r29, 0xfa +/* 8009A6F8 00097638 7D 09 07 34 */ extsh r9, r8 +/* 8009A6FC 0009763C 7D 49 32 14 */ add r10, r9, r6 +/* 8009A700 00097640 7D 47 52 14 */ add r10, r7, r10 +/* 8009A704 00097644 7D 20 50 51 */ subf. r9, r0, r10 +/* 8009A708 00097648 40 81 00 0C */ ble lbl_8009A714 +/* 8009A70C 0009764C 7D 20 50 50 */ subf r9, r0, r10 +/* 8009A710 00097650 48 00 00 08 */ b lbl_8009A718 +lbl_8009A714: +/* 8009A714 00097654 39 20 00 00 */ li r9, 0 +lbl_8009A718: +/* 8009A718 00097658 7D 47 32 14 */ add r10, r7, r6 +/* 8009A71C 0009765C 7C E5 50 51 */ subf. r7, r5, r10 +/* 8009A720 00097660 40 80 00 0C */ bge lbl_8009A72C +/* 8009A724 00097664 7C E5 50 50 */ subf r7, r5, r10 +/* 8009A728 00097668 48 00 00 08 */ b lbl_8009A730 +lbl_8009A72C: +/* 8009A72C 0009766C 38 E0 00 00 */ li r7, 0 +lbl_8009A730: +/* 8009A730 00097670 7C E8 3A 14 */ add r7, r8, r7 +/* 8009A734 00097674 7C E9 38 50 */ subf r7, r9, r7 +/* 8009A738 00097678 3A 9D 00 FC */ addi r20, r29, 0xfc +/* 8009A73C 0009767C B0 FD 00 FC */ sth r7, 0xfc(r29) +/* 8009A740 00097680 A8 F7 00 00 */ lha r7, 0(r23) +/* 8009A744 00097684 7D 07 32 14 */ add r8, r7, r6 +/* 8009A748 00097688 7C E5 40 51 */ subf. r7, r5, r8 +/* 8009A74C 0009768C 40 80 00 0C */ bge lbl_8009A758 +/* 8009A750 00097690 7C E5 40 50 */ subf r7, r5, r8 +/* 8009A754 00097694 48 00 00 08 */ b lbl_8009A75C +lbl_8009A758: +/* 8009A758 00097698 38 E0 00 00 */ li r7, 0 +lbl_8009A75C: +/* 8009A75C 0009769C 7D 07 23 D6 */ divw r8, r7, r4 +/* 8009A760 000976A0 A0 F1 00 00 */ lhz r7, 0(r17) +/* 8009A764 000976A4 7C E8 38 50 */ subf r7, r8, r7 +/* 8009A768 000976A8 B0 FD 00 FE */ sth r7, 0xfe(r29) +/* 8009A76C 000976AC A8 F6 00 00 */ lha r7, 0(r22) +/* 8009A770 000976B0 A9 37 00 00 */ lha r9, 0(r23) +/* 8009A774 000976B4 7D 07 32 14 */ add r8, r7, r6 +/* 8009A778 000976B8 7D 09 42 14 */ add r8, r9, r8 +/* 8009A77C 000976BC 7C E0 40 51 */ subf. r7, r0, r8 +/* 8009A780 000976C0 40 81 00 0C */ ble lbl_8009A78C +/* 8009A784 000976C4 7C E0 40 50 */ subf r7, r0, r8 +/* 8009A788 000976C8 48 00 00 08 */ b lbl_8009A790 +lbl_8009A78C: +/* 8009A78C 000976CC 38 E0 00 00 */ li r7, 0 +lbl_8009A790: +/* 8009A790 000976D0 7C C9 32 14 */ add r6, r9, r6 +/* 8009A794 000976D4 7C 05 30 51 */ subf. r0, r5, r6 +/* 8009A798 000976D8 40 80 00 0C */ bge lbl_8009A7A4 +/* 8009A79C 000976DC 7C 05 30 50 */ subf r0, r5, r6 +/* 8009A7A0 000976E0 48 00 00 08 */ b lbl_8009A7A8 +lbl_8009A7A4: +/* 8009A7A4 000976E4 38 00 00 00 */ li r0, 0 +lbl_8009A7A8: +/* 8009A7A8 000976E8 7C 00 23 D6 */ divw r0, r0, r4 +/* 8009A7AC 000976EC A0 BA 00 00 */ lhz r5, 0(r26) +/* 8009A7B0 000976F0 7C 87 23 D6 */ divw r4, r7, r4 +/* 8009A7B4 000976F4 7C 05 02 14 */ add r0, r5, r0 +/* 8009A7B8 000976F8 7C 04 00 50 */ subf r0, r4, r0 +/* 8009A7BC 000976FC B0 1D 01 00 */ sth r0, 0x100(r29) +/* 8009A7C0 00097700 80 0D 94 58 */ lwz r0, encoderType@sda21(r13) +/* 8009A7C4 00097704 28 00 00 00 */ cmplwi r0, 0 +/* 8009A7C8 00097708 40 82 00 0C */ bne lbl_8009A7D4 +/* 8009A7CC 0009770C 38 00 00 03 */ li r0, 3 +/* 8009A7D0 00097710 90 15 00 00 */ stw r0, 0(r21) +lbl_8009A7D4: +/* 8009A7D4 00097714 A0 BE 00 18 */ lhz r5, 0x18(r30) +/* 8009A7D8 00097718 7C A4 0E 70 */ srawi r4, r5, 1 +/* 8009A7DC 0009771C 7C 84 01 94 */ addze r4, r4 +/* 8009A7E0 00097720 7C A0 0E 70 */ srawi r0, r5, 1 +/* 8009A7E4 00097724 7C 00 01 94 */ addze r0, r0 +/* 8009A7E8 00097728 54 00 08 3C */ slwi r0, r0, 1 +/* 8009A7EC 0009772C 7C 00 28 10 */ subfc r0, r0, r5 +/* 8009A7F0 00097730 54 00 04 3F */ clrlwi. r0, r0, 0x10 +/* 8009A7F4 00097734 54 84 04 3E */ clrlwi r4, r4, 0x10 +/* 8009A7F8 00097738 41 82 00 0C */ beq lbl_8009A804 +/* 8009A7FC 0009773C A0 BE 00 1A */ lhz r5, 0x1a(r30) +/* 8009A800 00097740 48 00 00 08 */ b lbl_8009A808 +lbl_8009A804: +/* 8009A804 00097744 38 A0 00 00 */ li r5, 0 +lbl_8009A808: +/* 8009A808 00097748 38 05 00 01 */ addi r0, r5, 1 +/* 8009A80C 0009774C B0 1D 00 32 */ sth r0, 0x32(r29) +/* 8009A810 00097750 38 04 00 01 */ addi r0, r4, 1 +/* 8009A814 00097754 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A818 00097758 80 AD 94 68 */ lwz r5, changed@sda21(r13) +/* 8009A81C 0009775C 38 9D 00 02 */ addi r4, r29, 2 +/* 8009A820 00097760 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009A824 00097764 60 A5 00 40 */ ori r5, r5, 0x40 +/* 8009A828 00097768 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009A82C 0009776C 90 AD 94 68 */ stw r5, changed@sda21(r13) +/* 8009A830 00097770 B0 1D 00 30 */ sth r0, 0x30(r29) +/* 8009A834 00097774 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009A838 00097778 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009A83C 0009777C 60 00 00 80 */ ori r0, r0, 0x80 +/* 8009A840 00097780 90 AD 94 6C */ stw r5, lbl_80409F2C@sda21(r13) +/* 8009A844 00097784 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A848 00097788 80 1C 00 00 */ lwz r0, 0(r28) +/* 8009A84C 0009778C A0 BD 00 02 */ lhz r5, 2(r29) +/* 8009A850 00097790 28 00 00 02 */ cmplwi r0, 2 +/* 8009A854 00097794 41 82 00 0C */ beq lbl_8009A860 +/* 8009A858 00097798 28 00 00 03 */ cmplwi r0, 3 +/* 8009A85C 0009779C 40 82 00 10 */ bne lbl_8009A86C +lbl_8009A860: +/* 8009A860 000977A0 54 A0 07 B8 */ rlwinm r0, r5, 0, 0x1e, 0x1c +/* 8009A864 000977A4 60 05 00 04 */ ori r5, r0, 4 +/* 8009A868 000977A8 48 00 00 0C */ b lbl_8009A874 +lbl_8009A86C: +/* 8009A86C 000977AC 54 A5 07 B8 */ rlwinm r5, r5, 0, 0x1e, 0x1c +/* 8009A870 000977B0 50 05 17 7A */ rlwimi r5, r0, 2, 0x1d, 0x1d +lbl_8009A874: +/* 8009A874 000977B4 80 D5 00 00 */ lwz r6, 0(r21) +/* 8009A878 000977B8 54 A5 07 76 */ rlwinm r5, r5, 0, 0x1d, 0x1b +/* 8009A87C 000977BC 80 F2 00 00 */ lwz r7, 0(r18) +/* 8009A880 000977C0 28 06 00 04 */ cmplwi r6, 4 +/* 8009A884 000977C4 54 E0 18 38 */ slwi r0, r7, 3 +/* 8009A888 000977C8 7C A0 03 78 */ or r0, r5, r0 +/* 8009A88C 000977CC 41 82 00 0C */ beq lbl_8009A898 +/* 8009A890 000977D0 28 06 00 05 */ cmplwi r6, 5 +/* 8009A894 000977D4 40 82 00 0C */ bne lbl_8009A8A0 +lbl_8009A898: +/* 8009A898 000977D8 54 00 06 2A */ rlwinm r0, r0, 0, 0x18, 0x15 +/* 8009A89C 000977DC 48 00 00 10 */ b lbl_8009A8AC +lbl_8009A8A0: +/* 8009A8A0 000977E0 54 05 06 2A */ rlwinm r5, r0, 0, 0x18, 0x15 +/* 8009A8A4 000977E4 54 C0 40 2E */ slwi r0, r6, 8 +/* 8009A8A8 000977E8 7C A0 03 78 */ or r0, r5, r0 +lbl_8009A8AC: +/* 8009A8AC 000977EC B0 04 00 00 */ sth r0, 0(r4) +/* 8009A8B0 000977F0 3C 00 40 00 */ lis r0, 0x4000 +/* 8009A8B4 000977F4 38 DD 00 6C */ addi r6, r29, 0x6c +/* 8009A8B8 000977F8 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A8BC 000977FC 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009A8C0 00097800 7C 80 03 78 */ or r0, r4, r0 +/* 8009A8C4 00097804 90 AD 94 6C */ stw r5, lbl_80409F2C@sda21(r13) +/* 8009A8C8 00097808 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009A8CC 0009780C 80 1F 00 00 */ lwz r0, 0(r31) +/* 8009A8D0 00097810 A0 9D 00 6C */ lhz r4, 0x6c(r29) +/* 8009A8D4 00097814 2C 00 00 02 */ cmpwi r0, 2 +/* 8009A8D8 00097818 41 82 00 0C */ beq lbl_8009A8E4 +/* 8009A8DC 0009781C 2C 00 00 03 */ cmpwi r0, 3 +/* 8009A8E0 00097820 40 82 00 10 */ bne lbl_8009A8F0 +lbl_8009A8E4: +/* 8009A8E4 00097824 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +/* 8009A8E8 00097828 60 00 00 01 */ ori r0, r0, 1 +/* 8009A8EC 0009782C 48 00 00 08 */ b lbl_8009A8F4 +lbl_8009A8F0: +/* 8009A8F0 00097830 54 80 00 3C */ rlwinm r0, r4, 0, 0, 0x1e +lbl_8009A8F4: +/* 8009A8F4 00097834 B0 06 00 00 */ sth r0, 0(r6) +/* 8009A8F8 00097838 2C 07 00 00 */ cmpwi r7, 0 +/* 8009A8FC 0009783C 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009A900 00097840 80 0D 94 6C */ lwz r0, lbl_80409F2C@sda21(r13) +/* 8009A904 00097844 60 00 02 00 */ ori r0, r0, 0x200 +/* 8009A908 00097848 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A90C 0009784C 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009A910 00097850 A0 98 00 00 */ lhz r4, 0(r24) +/* 8009A914 00097854 A0 B0 00 00 */ lhz r5, 0(r16) +/* 8009A918 00097858 41 82 00 0C */ beq lbl_8009A924 +/* 8009A91C 0009785C 54 A0 08 3C */ slwi r0, r5, 1 +/* 8009A920 00097860 48 00 00 08 */ b lbl_8009A928 +lbl_8009A924: +/* 8009A924 00097864 7C A0 2B 78 */ mr r0, r5 +lbl_8009A928: +/* 8009A928 00097868 54 08 04 3E */ clrlwi r8, r0, 0x10 +/* 8009A92C 0009786C 7C 08 20 40 */ cmplw r8, r4 +/* 8009A930 00097870 40 80 00 50 */ bge lbl_8009A980 +/* 8009A934 00097874 55 06 40 2E */ slwi r6, r8, 8 +/* 8009A938 00097878 38 06 FF FF */ addi r0, r6, -1 +/* 8009A93C 0009787C 7C 04 02 14 */ add r0, r4, r0 +/* 8009A940 00097880 7C 00 23 96 */ divwu r0, r0, r4 +/* 8009A944 00097884 60 00 10 00 */ ori r0, r0, 0x1000 +/* 8009A948 00097888 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 8009A94C 0009788C 3C 00 04 00 */ lis r0, 0x400 +/* 8009A950 00097890 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A954 00097894 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009A958 00097898 7C E0 03 78 */ or r0, r7, r0 +/* 8009A95C 0009789C 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A960 000978A0 90 CD 94 68 */ stw r6, changed@sda21(r13) +/* 8009A964 000978A4 B1 1D 00 70 */ sth r8, 0x70(r29) +/* 8009A968 000978A8 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A96C 000978AC 80 0D 94 6C */ lwz r0, lbl_80409F2C@sda21(r13) +/* 8009A970 000978B0 60 00 00 80 */ ori r0, r0, 0x80 +/* 8009A974 000978B4 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A978 000978B8 90 CD 94 68 */ stw r6, changed@sda21(r13) +/* 8009A97C 000978BC 48 00 00 24 */ b lbl_8009A9A0 +lbl_8009A980: +/* 8009A980 000978C0 38 00 01 00 */ li r0, 0x100 +/* 8009A984 000978C4 B0 1D 00 4A */ sth r0, 0x4a(r29) +/* 8009A988 000978C8 3C 00 04 00 */ lis r0, 0x400 +/* 8009A98C 000978CC 80 CD 94 68 */ lwz r6, changed@sda21(r13) +/* 8009A990 000978D0 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009A994 000978D4 7C E0 03 78 */ or r0, r7, r0 +/* 8009A998 000978D8 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009A99C 000978DC 90 CD 94 68 */ stw r6, changed@sda21(r13) +lbl_8009A9A0: +/* 8009A9A0 000978E0 A0 03 00 00 */ lhz r0, 0(r3) +/* 8009A9A4 000978E4 21 84 02 D0 */ subfic r12, r4, 0x2d0 +/* 8009A9A8 000978E8 A0 DE 00 1A */ lhz r6, 0x1a(r30) +/* 8009A9AC 000978EC 3C 60 10 00 */ lis r3, 0x1000 +/* 8009A9B0 000978F0 3D 00 20 00 */ lis r8, 0x2000 +/* 8009A9B4 000978F4 B0 DD 00 06 */ sth r6, 6(r29) +/* 8009A9B8 000978F8 3D 20 04 00 */ lis r9, 0x400 +/* 8009A9BC 000978FC 3C E0 08 00 */ lis r7, 0x800 +/* 8009A9C0 00097900 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A9C4 00097904 3C C0 00 10 */ lis r6, 0x10 +/* 8009A9C8 00097908 3C 80 00 20 */ lis r4, 0x20 +/* 8009A9CC 0009790C 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009A9D0 00097910 7D 4A 1B 78 */ or r10, r10, r3 +/* 8009A9D4 00097914 3C 60 00 04 */ lis r3, 4 +/* 8009A9D8 00097918 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009A9DC 0009791C 91 4D 94 68 */ stw r10, changed@sda21(r13) +/* 8009A9E0 00097920 89 5E 00 1D */ lbz r10, 0x1d(r30) +/* 8009A9E4 00097924 89 7E 00 1E */ lbz r11, 0x1e(r30) +/* 8009A9E8 00097928 51 4B 44 2E */ rlwimi r11, r10, 8, 0x10, 0x17 +/* 8009A9EC 0009792C B1 7D 00 04 */ sth r11, 4(r29) +/* 8009A9F0 00097930 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009A9F4 00097934 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009A9F8 00097938 7D 48 43 78 */ or r8, r10, r8 +/* 8009A9FC 0009793C 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009AA00 00097940 91 0D 94 68 */ stw r8, changed@sda21(r13) +/* 8009AA04 00097944 89 1E 00 1F */ lbz r8, 0x1f(r30) +/* 8009AA08 00097948 89 5E 00 1C */ lbz r10, 0x1c(r30) +/* 8009AA0C 0009794C 7E 08 02 14 */ add r16, r8, r0 +/* 8009AA10 00097950 A1 7E 00 20 */ lhz r11, 0x20(r30) +/* 8009AA14 00097954 3A 10 FF D8 */ addi r16, r16, -40 +/* 8009AA18 00097958 56 08 3C 30 */ rlwinm r8, r16, 7, 0x10, 0x18 +/* 8009AA1C 0009795C 7D 48 43 78 */ or r8, r10, r8 +/* 8009AA20 00097960 B1 1D 00 0A */ sth r8, 0xa(r29) +/* 8009AA24 00097964 7D 0B 02 14 */ add r8, r11, r0 +/* 8009AA28 00097968 38 08 00 28 */ addi r0, r8, 0x28 +/* 8009AA2C 0009796C 81 4D 94 68 */ lwz r10, changed@sda21(r13) +/* 8009AA30 00097970 7C 0C 00 50 */ subf r0, r12, r0 +/* 8009AA34 00097974 56 08 BA 7E */ srwi r8, r16, 9 +/* 8009AA38 00097978 81 6D 94 6C */ lwz r11, lbl_80409F2C@sda21(r13) +/* 8009AA3C 0009797C 54 00 08 3C */ slwi r0, r0, 1 +/* 8009AA40 00097980 7D 49 4B 78 */ or r9, r10, r9 +/* 8009AA44 00097984 91 6D 94 6C */ stw r11, lbl_80409F2C@sda21(r13) +/* 8009AA48 00097988 7D 00 03 78 */ or r0, r8, r0 +/* 8009AA4C 0009798C 91 2D 94 68 */ stw r9, changed@sda21(r13) +/* 8009AA50 00097990 B0 1D 00 08 */ sth r0, 8(r29) +/* 8009AA54 00097994 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AA58 00097998 81 0D 94 6C */ lwz r8, lbl_80409F2C@sda21(r13) +/* 8009AA5C 0009799C 7C 00 3B 78 */ or r0, r0, r7 +/* 8009AA60 000979A0 91 0D 94 6C */ stw r8, lbl_80409F2C@sda21(r13) +/* 8009AA64 000979A4 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AA68 000979A8 A0 1E 00 10 */ lhz r0, 0x10(r30) +/* 8009AA6C 000979AC 88 FE 00 0C */ lbz r7, 0xc(r30) +/* 8009AA70 000979B0 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AA74 000979B4 7C E0 03 78 */ or r0, r7, r0 +/* 8009AA78 000979B8 B0 1D 00 16 */ sth r0, 0x16(r29) +/* 8009AA7C 000979BC 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AA80 000979C0 80 ED 94 6C */ lwz r7, lbl_80409F2C@sda21(r13) +/* 8009AA84 000979C4 7C 00 33 78 */ or r0, r0, r6 +/* 8009AA88 000979C8 90 ED 94 6C */ stw r7, lbl_80409F2C@sda21(r13) +/* 8009AA8C 000979CC 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AA90 000979D0 A0 1E 00 14 */ lhz r0, 0x14(r30) +/* 8009AA94 000979D4 88 DE 00 0E */ lbz r6, 0xe(r30) +/* 8009AA98 000979D8 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AA9C 000979DC 7C C0 03 78 */ or r0, r6, r0 +/* 8009AAA0 000979E0 B0 1D 00 14 */ sth r0, 0x14(r29) +/* 8009AAA4 000979E4 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AAA8 000979E8 80 CD 94 6C */ lwz r6, lbl_80409F2C@sda21(r13) +/* 8009AAAC 000979EC 7C 00 23 78 */ or r0, r0, r4 +/* 8009AAB0 000979F0 90 CD 94 6C */ stw r6, lbl_80409F2C@sda21(r13) +/* 8009AAB4 000979F4 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AAB8 000979F8 A0 1E 00 12 */ lhz r0, 0x12(r30) +/* 8009AABC 000979FC 88 9E 00 0D */ lbz r4, 0xd(r30) +/* 8009AAC0 00097A00 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AAC4 00097A04 7C 80 03 78 */ or r0, r4, r0 +/* 8009AAC8 00097A08 B0 1D 00 1A */ sth r0, 0x1a(r29) +/* 8009AACC 00097A0C 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AAD0 00097A10 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009AAD4 00097A14 7C 00 1B 78 */ or r0, r0, r3 +/* 8009AAD8 00097A18 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009AADC 00097A1C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AAE0 00097A20 A0 1E 00 16 */ lhz r0, 0x16(r30) +/* 8009AAE4 00097A24 88 7E 00 0F */ lbz r3, 0xf(r30) +/* 8009AAE8 00097A28 54 00 28 34 */ slwi r0, r0, 5 +/* 8009AAEC 00097A2C 7C 60 03 78 */ or r0, r3, r0 +/* 8009AAF0 00097A30 B0 1D 00 18 */ sth r0, 0x18(r29) +/* 8009AAF4 00097A34 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009AAF8 00097A38 3C 00 00 08 */ lis r0, 8 +/* 8009AAFC 00097A3C 38 DD 01 1C */ addi r6, r29, 0x11c +/* 8009AB00 00097A40 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009AB04 00097A44 7C 60 03 78 */ or r0, r3, r0 +/* 8009AB08 00097A48 90 8D 94 6C */ stw r4, lbl_80409F2C@sda21(r13) +/* 8009AB0C 00097A4C 90 0D 94 68 */ stw r0, changed@sda21(r13) +/* 8009AB10 00097A50 A0 7B 00 00 */ lhz r3, 0(r27) +/* 8009AB14 00097A54 80 99 00 00 */ lwz r4, 0(r25) +/* 8009AB18 00097A58 38 03 00 0F */ addi r0, r3, 0xf +/* 8009AB1C 00097A5C A0 6F 00 00 */ lhz r3, 0(r15) +/* 8009AB20 00097A60 7C 00 26 70 */ srawi r0, r0, 4 +/* 8009AB24 00097A64 7C 00 01 94 */ addze r0, r0 +/* 8009AB28 00097A68 2C 04 00 00 */ cmpwi r4, 0 +/* 8009AB2C 00097A6C 98 1D 01 1C */ stb r0, 0x11c(r29) +/* 8009AB30 00097A70 40 82 00 0C */ bne lbl_8009AB3C +/* 8009AB34 00097A74 88 86 00 00 */ lbz r4, 0(r6) +/* 8009AB38 00097A78 48 00 00 0C */ b lbl_8009AB44 +lbl_8009AB3C: +/* 8009AB3C 00097A7C 88 06 00 00 */ lbz r0, 0(r6) +/* 8009AB40 00097A80 54 04 0E 3C */ rlwinm r4, r0, 1, 0x18, 0x1e +lbl_8009AB44: +/* 8009AB44 00097A84 7C 60 26 70 */ srawi r0, r3, 4 +/* 8009AB48 00097A88 98 9D 01 1D */ stb r4, 0x11d(r29) +/* 8009AB4C 00097A8C 7C 00 01 94 */ addze r0, r0 +/* 8009AB50 00097A90 54 00 20 36 */ slwi r0, r0, 4 +/* 8009AB54 00097A94 7C 00 18 10 */ subfc r0, r0, r3 +/* 8009AB58 00097A98 98 1D 01 2C */ stb r0, 0x12c(r29) +/* 8009AB5C 00097A9C 38 05 00 0F */ addi r0, r5, 0xf +/* 8009AB60 00097AA0 3C 60 08 00 */ lis r3, 0x800 +/* 8009AB64 00097AA4 88 9D 01 2C */ lbz r4, 0x12c(r29) +/* 8009AB68 00097AA8 7C 04 02 14 */ add r0, r4, r0 +/* 8009AB6C 00097AAC 7C 00 26 70 */ srawi r0, r0, 4 +/* 8009AB70 00097AB0 7C 00 01 94 */ addze r0, r0 +/* 8009AB74 00097AB4 98 1D 01 1E */ stb r0, 0x11e(r29) +/* 8009AB78 00097AB8 88 1D 01 1E */ lbz r0, 0x11e(r29) +/* 8009AB7C 00097ABC 88 9D 01 1D */ lbz r4, 0x11d(r29) +/* 8009AB80 00097AC0 50 04 44 2E */ rlwimi r4, r0, 8, 0x10, 0x17 +/* 8009AB84 00097AC4 B0 9D 00 48 */ sth r4, 0x48(r29) +/* 8009AB88 00097AC8 80 8D 94 68 */ lwz r4, changed@sda21(r13) +/* 8009AB8C 00097ACC 80 0D 94 88 */ lwz r0, FBSet@sda21(r13) +/* 8009AB90 00097AD0 80 AD 94 6C */ lwz r5, lbl_80409F2C@sda21(r13) +/* 8009AB94 00097AD4 28 00 00 00 */ cmplwi r0, 0 +/* 8009AB98 00097AD8 7C A0 1B 78 */ or r0, r5, r3 +/* 8009AB9C 00097ADC 90 0D 94 6C */ stw r0, lbl_80409F2C@sda21(r13) +/* 8009ABA0 00097AE0 90 8D 94 68 */ stw r4, changed@sda21(r13) +/* 8009ABA4 00097AE4 41 82 00 1C */ beq lbl_8009ABC0 +/* 8009ABA8 00097AE8 38 7D 00 F0 */ addi r3, r29, 0xf0 +/* 8009ABAC 00097AEC 38 9D 01 24 */ addi r4, r29, 0x124 +/* 8009ABB0 00097AF0 38 BD 01 28 */ addi r5, r29, 0x128 +/* 8009ABB4 00097AF4 38 DD 01 3C */ addi r6, r29, 0x13c +/* 8009ABB8 00097AF8 38 FD 01 40 */ addi r7, r29, 0x140 +/* 8009ABBC 00097AFC 4B FF F4 3D */ bl setFbbRegs +lbl_8009ABC0: +/* 8009ABC0 00097B00 80 1D 01 30 */ lwz r0, 0x130(r29) +/* 8009ABC4 00097B04 90 01 00 08 */ stw r0, 8(r1) +/* 8009ABC8 00097B08 A0 73 00 00 */ lhz r3, 0(r19) +/* 8009ABCC 00097B0C A0 94 00 00 */ lhz r4, 0(r20) +/* 8009ABD0 00097B10 88 BE 00 00 */ lbz r5, 0(r30) +/* 8009ABD4 00097B14 A0 DE 00 02 */ lhz r6, 2(r30) +/* 8009ABD8 00097B18 A0 FE 00 04 */ lhz r7, 4(r30) +/* 8009ABDC 00097B1C A1 1E 00 06 */ lhz r8, 6(r30) +/* 8009ABE0 00097B20 A1 3E 00 08 */ lhz r9, 8(r30) +/* 8009ABE4 00097B24 A1 5E 00 0A */ lhz r10, 0xa(r30) +/* 8009ABE8 00097B28 4B FF F6 E5 */ bl setVerticalRegs +/* 8009ABEC 00097B2C 7D C3 73 78 */ mr r3, r14 +/* 8009ABF0 00097B30 4B FF 56 05 */ bl OSRestoreInterrupts +/* 8009ABF4 00097B34 B9 C1 00 30 */ lmw r14, 0x30(r1) +/* 8009ABF8 00097B38 80 01 00 7C */ lwz r0, 0x7c(r1) +/* 8009ABFC 00097B3C 38 21 00 78 */ addi r1, r1, 0x78 +/* 8009AC00 00097B40 7C 08 03 A6 */ mtlr r0 +/* 8009AC04 00097B44 4E 80 00 20 */ blr + +.global VIFlush +VIFlush: +/* 8009AC08 00097B48 7C 08 02 A6 */ mflr r0 +/* 8009AC0C 00097B4C 90 01 00 04 */ stw r0, 4(r1) +/* 8009AC10 00097B50 94 21 FF D8 */ stwu r1, -0x28(r1) +/* 8009AC14 00097B54 BF 61 00 14 */ stmw r27, 0x14(r1) +/* 8009AC18 00097B58 4B FF 55 B5 */ bl OSDisableInterrupts +/* 8009AC1C 00097B5C 80 ED 94 70 */ lwz r7, shdwChangeMode@sda21(r13) +/* 8009AC20 00097B60 3C 80 80 3F */ lis r4, shdwRegs@ha +/* 8009AC24 00097B64 3C A0 80 3F */ lis r5, regs@ha +/* 8009AC28 00097B68 80 CD 94 60 */ lwz r6, changeMode@sda21(r13) +/* 8009AC2C 00097B6C 38 00 00 00 */ li r0, 0 +/* 8009AC30 00097B70 3B A4 BE 40 */ addi r29, r4, shdwRegs@l +/* 8009AC34 00097B74 7C E6 33 78 */ or r6, r7, r6 +/* 8009AC38 00097B78 90 CD 94 70 */ stw r6, shdwChangeMode@sda21(r13) +/* 8009AC3C 00097B7C 3B E5 BD C8 */ addi r31, r5, regs@l +/* 8009AC40 00097B80 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AC44 00097B84 90 0D 94 60 */ stw r0, changeMode@sda21(r13) +/* 8009AC48 00097B88 80 8D 94 78 */ lwz r4, shdwChanged@sda21(r13) +/* 8009AC4C 00097B8C 80 AD 94 7C */ lwz r5, lbl_80409F3C@sda21(r13) +/* 8009AC50 00097B90 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009AC54 00097B94 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009AC58 00097B98 7C 80 03 78 */ or r0, r4, r0 +/* 8009AC5C 00097B9C 7C A3 1B 78 */ or r3, r5, r3 +/* 8009AC60 00097BA0 90 6D 94 7C */ stw r3, lbl_80409F3C@sda21(r13) +/* 8009AC64 00097BA4 90 0D 94 78 */ stw r0, shdwChanged@sda21(r13) +/* 8009AC68 00097BA8 48 00 00 7C */ b lbl_8009ACE4 +lbl_8009AC6C: +/* 8009AC6C 00097BAC 80 6D 94 68 */ lwz r3, changed@sda21(r13) +/* 8009AC70 00097BB0 38 A0 00 20 */ li r5, 0x20 +/* 8009AC74 00097BB4 83 6D 94 6C */ lwz r27, lbl_80409F2C@sda21(r13) +/* 8009AC78 00097BB8 38 9B 00 00 */ addi r4, r27, 0 +/* 8009AC7C 00097BBC 4B FE 83 D5 */ bl __shr2u +/* 8009AC80 00097BC0 7C 84 00 34 */ cntlzw r4, r4 +/* 8009AC84 00097BC4 2C 04 00 20 */ cmpwi r4, 0x20 +/* 8009AC88 00097BC8 38 00 FF FF */ li r0, -1 +/* 8009AC8C 00097BCC 7F 60 00 38 */ and r0, r27, r0 +/* 8009AC90 00097BD0 40 80 00 08 */ bge lbl_8009AC98 +/* 8009AC94 00097BD4 48 00 00 0C */ b lbl_8009ACA0 +lbl_8009AC98: +/* 8009AC98 00097BD8 7C 03 00 34 */ cntlzw r3, r0 +/* 8009AC9C 00097BDC 38 83 00 20 */ addi r4, r3, 0x20 +lbl_8009ACA0: +/* 8009ACA0 00097BE0 54 85 08 3C */ slwi r5, r4, 1 +/* 8009ACA4 00097BE4 7C 7F 2A 14 */ add r3, r31, r5 +/* 8009ACA8 00097BE8 A0 03 00 00 */ lhz r0, 0(r3) +/* 8009ACAC 00097BEC 7C 7D 2A 14 */ add r3, r29, r5 +/* 8009ACB0 00097BF0 20 A4 00 3F */ subfic r5, r4, 0x3f +/* 8009ACB4 00097BF4 B0 03 00 00 */ sth r0, 0(r3) +/* 8009ACB8 00097BF8 38 60 00 00 */ li r3, 0 +/* 8009ACBC 00097BFC 38 80 00 01 */ li r4, 1 +/* 8009ACC0 00097C00 4B FE 83 6D */ bl __shl2i +/* 8009ACC4 00097C04 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009ACC8 00097C08 7C 65 18 F8 */ nor r5, r3, r3 +/* 8009ACCC 00097C0C 7C 84 20 F8 */ nor r4, r4, r4 +/* 8009ACD0 00097C10 80 6D 94 6C */ lwz r3, lbl_80409F2C@sda21(r13) +/* 8009ACD4 00097C14 7C 00 28 38 */ and r0, r0, r5 +/* 8009ACD8 00097C18 7C 63 20 38 */ and r3, r3, r4 +/* 8009ACDC 00097C1C 90 6D 94 6C */ stw r3, lbl_80409F2C@sda21(r13) +/* 8009ACE0 00097C20 90 0D 94 68 */ stw r0, changed@sda21(r13) +lbl_8009ACE4: +/* 8009ACE4 00097C24 80 0D 94 68 */ lwz r0, changed@sda21(r13) +/* 8009ACE8 00097C28 38 60 00 00 */ li r3, 0 +/* 8009ACEC 00097C2C 80 8D 94 6C */ lwz r4, lbl_80409F2C@sda21(r13) +/* 8009ACF0 00097C30 7C 00 1A 78 */ xor r0, r0, r3 +/* 8009ACF4 00097C34 7C 83 1A 78 */ xor r3, r4, r3 +/* 8009ACF8 00097C38 7C 60 03 79 */ or. r0, r3, r0 +/* 8009ACFC 00097C3C 40 82 FF 70 */ bne lbl_8009AC6C +/* 8009AD00 00097C40 38 00 00 01 */ li r0, 1 +/* 8009AD04 00097C44 90 0D 94 44 */ stw r0, flushFlag@sda21(r13) +/* 8009AD08 00097C48 7F C3 F3 78 */ mr r3, r30 +/* 8009AD0C 00097C4C 4B FF 54 E9 */ bl OSRestoreInterrupts +/* 8009AD10 00097C50 BB 61 00 14 */ lmw r27, 0x14(r1) +/* 8009AD14 00097C54 80 01 00 2C */ lwz r0, 0x2c(r1) +/* 8009AD18 00097C58 38 21 00 28 */ addi r1, r1, 0x28 +/* 8009AD1C 00097C5C 7C 08 03 A6 */ mtlr r0 +/* 8009AD20 00097C60 4E 80 00 20 */ blr + +.global VISetNextFrameBuffer +VISetNextFrameBuffer: +/* 8009AD24 00097C64 7C 08 02 A6 */ mflr r0 +/* 8009AD28 00097C68 3C 80 80 3F */ lis r4, regs@ha +/* 8009AD2C 00097C6C 90 01 00 04 */ stw r0, 4(r1) +/* 8009AD30 00097C70 94 21 FF E8 */ stwu r1, -0x18(r1) +/* 8009AD34 00097C74 93 E1 00 14 */ stw r31, 0x14(r1) +/* 8009AD38 00097C78 3B E4 BD C8 */ addi r31, r4, regs@l +/* 8009AD3C 00097C7C 93 C1 00 10 */ stw r30, 0x10(r1) +/* 8009AD40 00097C80 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AD44 00097C84 4B FF 54 89 */ bl OSDisableInterrupts +/* 8009AD48 00097C88 93 DF 01 20 */ stw r30, 0x120(r31) +/* 8009AD4C 00097C8C 38 00 00 01 */ li r0, 1 +/* 8009AD50 00097C90 3B C3 00 00 */ addi r30, r3, 0 +/* 8009AD54 00097C94 90 0D 94 88 */ stw r0, FBSet@sda21(r13) +/* 8009AD58 00097C98 38 7F 00 F0 */ addi r3, r31, 0xf0 +/* 8009AD5C 00097C9C 38 9F 01 24 */ addi r4, r31, 0x124 +/* 8009AD60 00097CA0 38 BF 01 28 */ addi r5, r31, 0x128 +/* 8009AD64 00097CA4 38 DF 01 3C */ addi r6, r31, 0x13c +/* 8009AD68 00097CA8 38 FF 01 40 */ addi r7, r31, 0x140 +/* 8009AD6C 00097CAC 4B FF F2 8D */ bl setFbbRegs +/* 8009AD70 00097CB0 7F C3 F3 78 */ mr r3, r30 +/* 8009AD74 00097CB4 4B FF 54 81 */ bl OSRestoreInterrupts +/* 8009AD78 00097CB8 80 01 00 1C */ lwz r0, 0x1c(r1) +/* 8009AD7C 00097CBC 83 E1 00 14 */ lwz r31, 0x14(r1) +/* 8009AD80 00097CC0 83 C1 00 10 */ lwz r30, 0x10(r1) +/* 8009AD84 00097CC4 38 21 00 18 */ addi r1, r1, 0x18 +/* 8009AD88 00097CC8 7C 08 03 A6 */ mtlr r0 +/* 8009AD8C 00097CCC 4E 80 00 20 */ blr + +.global VISetBlack +VISetBlack: +/* 8009AD90 00097CD0 7C 08 02 A6 */ mflr r0 +/* 8009AD94 00097CD4 3C 80 80 3F */ lis r4, regs@ha +/* 8009AD98 00097CD8 90 01 00 04 */ stw r0, 4(r1) +/* 8009AD9C 00097CDC 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8009ADA0 00097CE0 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8009ADA4 00097CE4 3B E4 BD C8 */ addi r31, r4, regs@l +/* 8009ADA8 00097CE8 93 C1 00 18 */ stw r30, 0x18(r1) +/* 8009ADAC 00097CEC 3B C3 00 00 */ addi r30, r3, 0 +/* 8009ADB0 00097CF0 4B FF 54 1D */ bl OSDisableInterrupts +/* 8009ADB4 00097CF4 93 DF 01 30 */ stw r30, 0x130(r31) +/* 8009ADB8 00097CF8 7C 7E 1B 78 */ mr r30, r3 +/* 8009ADBC 00097CFC 81 5F 01 44 */ lwz r10, 0x144(r31) +/* 8009ADC0 00097D00 80 1F 01 30 */ lwz r0, 0x130(r31) +/* 8009ADC4 00097D04 90 01 00 08 */ stw r0, 8(r1) +/* 8009ADC8 00097D08 A0 7F 00 FA */ lhz r3, 0xfa(r31) +/* 8009ADCC 00097D0C A0 9F 00 F6 */ lhz r4, 0xf6(r31) +/* 8009ADD0 00097D10 88 AA 00 00 */ lbz r5, 0(r10) +/* 8009ADD4 00097D14 A0 CA 00 02 */ lhz r6, 2(r10) +/* 8009ADD8 00097D18 A0 EA 00 04 */ lhz r7, 4(r10) +/* 8009ADDC 00097D1C A1 0A 00 06 */ lhz r8, 6(r10) +/* 8009ADE0 00097D20 A1 2A 00 08 */ lhz r9, 8(r10) +/* 8009ADE4 00097D24 A1 4A 00 0A */ lhz r10, 0xa(r10) +/* 8009ADE8 00097D28 4B FF F4 E5 */ bl setVerticalRegs +/* 8009ADEC 00097D2C 7F C3 F3 78 */ mr r3, r30 +/* 8009ADF0 00097D30 4B FF 54 05 */ bl OSRestoreInterrupts +/* 8009ADF4 00097D34 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8009ADF8 00097D38 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8009ADFC 00097D3C 83 C1 00 18 */ lwz r30, 0x18(r1) +/* 8009AE00 00097D40 38 21 00 20 */ addi r1, r1, 0x20 +/* 8009AE04 00097D44 7C 08 03 A6 */ mtlr r0 +/* 8009AE08 00097D48 4E 80 00 20 */ blr + +.global VIGetRetraceCount +VIGetRetraceCount: +/* 8009AE0C 00097D4C 80 6D 94 40 */ lwz r3, retraceCount@sda21(r13) +/* 8009AE10 00097D50 4E 80 00 20 */ blr + +.global getCurrentFieldEvenOdd +getCurrentFieldEvenOdd: +/* 8009AE14 00097D54 3C 60 CC 00 */ lis r3, 0xCC002000@ha +/* 8009AE18 00097D58 38 E3 20 00 */ addi r7, r3, 0xCC002000@l +/* 8009AE1C 00097D5C A4 07 00 2C */ lhzu r0, 0x2c(r7) +/* 8009AE20 00097D60 38 83 20 00 */ addi r4, r3, 0x2000 +/* 8009AE24 00097D64 54 05 05 7E */ clrlwi r5, r0, 0x15 +lbl_8009AE28: +/* 8009AE28 00097D68 A0 07 00 00 */ lhz r0, 0(r7) +/* 8009AE2C 00097D6C 7C A6 2B 78 */ mr r6, r5 +/* 8009AE30 00097D70 A0 64 00 2E */ lhz r3, 0x2e(r4) +/* 8009AE34 00097D74 54 05 05 7E */ clrlwi r5, r0, 0x15 +/* 8009AE38 00097D78 7C 06 28 40 */ cmplw r6, r5 +/* 8009AE3C 00097D7C 54 63 05 7E */ clrlwi r3, r3, 0x15 +/* 8009AE40 00097D80 40 82 FF E8 */ bne lbl_8009AE28 +/* 8009AE44 00097D84 80 CD 94 80 */ lwz r6, CurrTiming@sda21(r13) +/* 8009AE48 00097D88 38 05 FF FF */ addi r0, r5, -1 +/* 8009AE4C 00097D8C 38 83 FF FF */ addi r4, r3, -1 +/* 8009AE50 00097D90 A0 66 00 1A */ lhz r3, 0x1a(r6) +/* 8009AE54 00097D94 54 05 08 3C */ slwi r5, r0, 1 +/* 8009AE58 00097D98 A0 06 00 18 */ lhz r0, 0x18(r6) +/* 8009AE5C 00097D9C 7C 64 1B 96 */ divwu r3, r4, r3 +/* 8009AE60 00097DA0 7C 65 1A 14 */ add r3, r5, r3 +/* 8009AE64 00097DA4 7C 03 00 40 */ cmplw r3, r0 +/* 8009AE68 00097DA8 40 80 00 0C */ bge lbl_8009AE74 +/* 8009AE6C 00097DAC 38 60 00 01 */ li r3, 1 +/* 8009AE70 00097DB0 4E 80 00 20 */ blr +lbl_8009AE74: +/* 8009AE74 00097DB4 38 60 00 00 */ li r3, 0 +/* 8009AE78 00097DB8 4E 80 00 20 */ blr + +.global VIGetNextField +VIGetNextField: +/* 8009AE7C 00097DBC 7C 08 02 A6 */ mflr r0 +/* 8009AE80 00097DC0 90 01 00 04 */ stw r0, 4(r1) +/* 8009AE84 00097DC4 94 21 FF E0 */ stwu r1, -0x20(r1) +/* 8009AE88 00097DC8 93 E1 00 1C */ stw r31, 0x1c(r1) +/* 8009AE8C 00097DCC 4B FF 53 41 */ bl OSDisableInterrupts +/* 8009AE90 00097DD0 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009AE94 00097DD4 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 8009AE98 00097DD8 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 8009AE9C 00097DDC 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 8009AEA0 00097DE0 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_8009AEA4: +/* 8009AEA4 00097DE4 A0 08 00 00 */ lhz r0, 0(r8) +/* 8009AEA8 00097DE8 7C C7 33 78 */ mr r7, r6 +/* 8009AEAC 00097DEC A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 8009AEB0 00097DF0 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 8009AEB4 00097DF4 7C 07 30 40 */ cmplw r7, r6 +/* 8009AEB8 00097DF8 54 84 05 7E */ clrlwi r4, r4, 0x15 +/* 8009AEBC 00097DFC 40 82 FF E8 */ bne lbl_8009AEA4 +/* 8009AEC0 00097E00 80 ED 94 80 */ lwz r7, CurrTiming@sda21(r13) +/* 8009AEC4 00097E04 38 06 FF FF */ addi r0, r6, -1 +/* 8009AEC8 00097E08 38 A4 FF FF */ addi r5, r4, -1 +/* 8009AECC 00097E0C A0 87 00 1A */ lhz r4, 0x1a(r7) +/* 8009AED0 00097E10 54 06 08 3C */ slwi r6, r0, 1 +/* 8009AED4 00097E14 A0 07 00 18 */ lhz r0, 0x18(r7) +/* 8009AED8 00097E18 7C 85 23 96 */ divwu r4, r5, r4 +/* 8009AEDC 00097E1C 7C 86 22 14 */ add r4, r6, r4 +/* 8009AEE0 00097E20 7C 04 00 40 */ cmplw r4, r0 +/* 8009AEE4 00097E24 40 80 00 0C */ bge lbl_8009AEF0 +/* 8009AEE8 00097E28 3B E0 00 01 */ li r31, 1 +/* 8009AEEC 00097E2C 48 00 00 08 */ b lbl_8009AEF4 +lbl_8009AEF0: +/* 8009AEF0 00097E30 3B E0 00 00 */ li r31, 0 +lbl_8009AEF4: +/* 8009AEF4 00097E34 4B FF 53 01 */ bl OSRestoreInterrupts +/* 8009AEF8 00097E38 3C 60 80 3F */ lis r3, HorVer@ha +/* 8009AEFC 00097E3C 38 63 BE B8 */ addi r3, r3, HorVer@l +/* 8009AF00 00097E40 A0 03 00 0A */ lhz r0, 0xa(r3) +/* 8009AF04 00097E44 6B E3 00 01 */ xori r3, r31, 1 +/* 8009AF08 00097E48 54 00 07 FE */ clrlwi r0, r0, 0x1f +/* 8009AF0C 00097E4C 7C 63 02 78 */ xor r3, r3, r0 +/* 8009AF10 00097E50 80 01 00 24 */ lwz r0, 0x24(r1) +/* 8009AF14 00097E54 83 E1 00 1C */ lwz r31, 0x1c(r1) +/* 8009AF18 00097E58 38 21 00 20 */ addi r1, r1, 0x20 +/* 8009AF1C 00097E5C 7C 08 03 A6 */ mtlr r0 +/* 8009AF20 00097E60 4E 80 00 20 */ blr + +.global VIGetCurrentLine +VIGetCurrentLine: +/* 8009AF24 00097E64 7C 08 02 A6 */ mflr r0 +/* 8009AF28 00097E68 90 01 00 04 */ stw r0, 4(r1) +/* 8009AF2C 00097E6C 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009AF30 00097E70 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009AF34 00097E74 93 C1 00 08 */ stw r30, 8(r1) +/* 8009AF38 00097E78 83 ED 94 80 */ lwz r31, CurrTiming@sda21(r13) +/* 8009AF3C 00097E7C 4B FF 52 91 */ bl OSDisableInterrupts +/* 8009AF40 00097E80 3C 80 CC 00 */ lis r4, 0xCC002000@ha +/* 8009AF44 00097E84 39 04 20 00 */ addi r8, r4, 0xCC002000@l +/* 8009AF48 00097E88 A4 08 00 2C */ lhzu r0, 0x2c(r8) +/* 8009AF4C 00097E8C 38 A4 20 00 */ addi r5, r4, 0x2000 +/* 8009AF50 00097E90 54 06 05 7E */ clrlwi r6, r0, 0x15 +lbl_8009AF54: +/* 8009AF54 00097E94 A0 08 00 00 */ lhz r0, 0(r8) +/* 8009AF58 00097E98 7C C7 33 78 */ mr r7, r6 +/* 8009AF5C 00097E9C A0 85 00 2E */ lhz r4, 0x2e(r5) +/* 8009AF60 00097EA0 54 06 05 7E */ clrlwi r6, r0, 0x15 +/* 8009AF64 00097EA4 7C 07 30 40 */ cmplw r7, r6 +/* 8009AF68 00097EA8 54 87 05 7E */ clrlwi r7, r4, 0x15 +/* 8009AF6C 00097EAC 40 82 FF E8 */ bne lbl_8009AF54 +/* 8009AF70 00097EB0 80 8D 94 80 */ lwz r4, CurrTiming@sda21(r13) +/* 8009AF74 00097EB4 38 A7 FF FF */ addi r5, r7, -1 +/* 8009AF78 00097EB8 38 C6 FF FF */ addi r6, r6, -1 +/* 8009AF7C 00097EBC A0 04 00 1A */ lhz r0, 0x1a(r4) +/* 8009AF80 00097EC0 54 C4 08 3C */ slwi r4, r6, 1 +/* 8009AF84 00097EC4 7C 05 03 96 */ divwu r0, r5, r0 +/* 8009AF88 00097EC8 7F C4 02 14 */ add r30, r4, r0 +/* 8009AF8C 00097ECC 4B FF 52 69 */ bl OSRestoreInterrupts +/* 8009AF90 00097ED0 A0 1F 00 18 */ lhz r0, 0x18(r31) +/* 8009AF94 00097ED4 7C 1E 00 40 */ cmplw r30, r0 +/* 8009AF98 00097ED8 41 80 00 08 */ blt lbl_8009AFA0 +/* 8009AF9C 00097EDC 7F C0 F0 50 */ subf r30, r0, r30 +lbl_8009AFA0: +/* 8009AFA0 00097EE0 57 C3 F8 7E */ srwi r3, r30, 1 +/* 8009AFA4 00097EE4 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009AFA8 00097EE8 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009AFAC 00097EEC 83 C1 00 08 */ lwz r30, 8(r1) +/* 8009AFB0 00097EF0 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009AFB4 00097EF4 7C 08 03 A6 */ mtlr r0 +/* 8009AFB8 00097EF8 4E 80 00 20 */ blr + +.global VIGetTvFormat +VIGetTvFormat: +/* 8009AFBC 00097EFC 7C 08 02 A6 */ mflr r0 +/* 8009AFC0 00097F00 90 01 00 04 */ stw r0, 4(r1) +/* 8009AFC4 00097F04 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009AFC8 00097F08 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009AFCC 00097F0C 4B FF 52 01 */ bl OSDisableInterrupts +/* 8009AFD0 00097F10 80 0D 94 84 */ lwz r0, CurrTvMode@sda21(r13) +/* 8009AFD4 00097F14 2C 00 00 03 */ cmpwi r0, 3 +/* 8009AFD8 00097F18 41 82 00 30 */ beq lbl_8009B008 +/* 8009AFDC 00097F1C 40 80 00 1C */ bge lbl_8009AFF8 +/* 8009AFE0 00097F20 2C 00 00 01 */ cmpwi r0, 1 +/* 8009AFE4 00097F24 41 82 00 2C */ beq lbl_8009B010 +/* 8009AFE8 00097F28 40 80 00 30 */ bge lbl_8009B018 +/* 8009AFEC 00097F2C 2C 00 00 00 */ cmpwi r0, 0 +/* 8009AFF0 00097F30 40 80 00 18 */ bge lbl_8009B008 +/* 8009AFF4 00097F34 48 00 00 28 */ b lbl_8009B01C +lbl_8009AFF8: +/* 8009AFF8 00097F38 2C 00 00 05 */ cmpwi r0, 5 +/* 8009AFFC 00097F3C 41 82 00 1C */ beq lbl_8009B018 +/* 8009B000 00097F40 40 80 00 1C */ bge lbl_8009B01C +/* 8009B004 00097F44 48 00 00 0C */ b lbl_8009B010 +lbl_8009B008: +/* 8009B008 00097F48 3B E0 00 00 */ li r31, 0 +/* 8009B00C 00097F4C 48 00 00 10 */ b lbl_8009B01C +lbl_8009B010: +/* 8009B010 00097F50 3B E0 00 01 */ li r31, 1 +/* 8009B014 00097F54 48 00 00 08 */ b lbl_8009B01C +lbl_8009B018: +/* 8009B018 00097F58 7C 1F 03 78 */ mr r31, r0 +lbl_8009B01C: +/* 8009B01C 00097F5C 4B FF 51 D9 */ bl OSRestoreInterrupts +/* 8009B020 00097F60 7F E3 FB 78 */ mr r3, r31 +/* 8009B024 00097F64 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009B028 00097F68 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009B02C 00097F6C 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009B030 00097F70 7C 08 03 A6 */ mtlr r0 +/* 8009B034 00097F74 4E 80 00 20 */ blr + +.global VIGetDTVStatus +VIGetDTVStatus: +/* 8009B038 00097F78 7C 08 02 A6 */ mflr r0 +/* 8009B03C 00097F7C 90 01 00 04 */ stw r0, 4(r1) +/* 8009B040 00097F80 94 21 FF F0 */ stwu r1, -0x10(r1) +/* 8009B044 00097F84 93 E1 00 0C */ stw r31, 0xc(r1) +/* 8009B048 00097F88 4B FF 51 85 */ bl OSDisableInterrupts +/* 8009B04C 00097F8C 3C 80 CC 00 */ lis r4, 0xCC00206E@ha +/* 8009B050 00097F90 A0 04 20 6E */ lhz r0, 0xCC00206E@l(r4) +/* 8009B054 00097F94 54 1F 07 BE */ clrlwi r31, r0, 0x1e +/* 8009B058 00097F98 4B FF 51 9D */ bl OSRestoreInterrupts +/* 8009B05C 00097F9C 57 E3 07 FE */ clrlwi r3, r31, 0x1f +/* 8009B060 00097FA0 80 01 00 14 */ lwz r0, 0x14(r1) +/* 8009B064 00097FA4 83 E1 00 0C */ lwz r31, 0xc(r1) +/* 8009B068 00097FA8 38 21 00 10 */ addi r1, r1, 0x10 +/* 8009B06C 00097FAC 7C 08 03 A6 */ mtlr r0 +/* 8009B070 00097FB0 4E 80 00 20 */ blr + +.section .data, "wa" # 0x803A8380 - 0x803E6000 +timing: + .4byte 0x060000F0 + .4byte 0x00180019 + .4byte 0x00030002 + .4byte 0x0C0D0C0D + .4byte 0x02080207 + .4byte 0x02080207 + .4byte 0x020D01AD + .4byte 0x404769A2 + .4byte 0x01757A00 + .4byte 0x019C0600 + .4byte 0x00F00018 + .4byte 0x00180004 + .4byte 0x00040C0C + .4byte 0x0C0C0208 + .4byte 0x02080208 + .4byte 0x0208020E + .4byte 0x01AD4047 + .4byte 0x69A20175 + .4byte 0x7A00019C + .4byte 0x0500011F + .4byte 0x00230024 + .4byte 0x00010000 + .4byte 0x0D0C0B0A + .4byte 0x026B026A + .4byte 0x0269026C + .4byte 0x027101B0 + .4byte 0x404B6AAC + .4byte 0x017C8500 + .4byte 0x01A40500 + .4byte 0x011F0021 + .4byte 0x00210002 + .4byte 0x00020D0B + .4byte 0x0D0B026B + .4byte 0x026D026B + .4byte 0x026D0270 + .4byte 0x01B0404B + .4byte 0x6AAC017C + .4byte 0x850001A4 + .4byte 0x060000F0 + .4byte 0x00180019 + .4byte 0x00030002 + .4byte 0x100F0E0D + .4byte 0x02060205 + .4byte 0x02040207 + .4byte 0x020D01AD + .4byte 0x404E70A2 + .4byte 0x01757A00 + .4byte 0x019C0600 + .4byte 0x00F00018 + .4byte 0x00180004 + .4byte 0x0004100E + .4byte 0x100E0206 + .4byte 0x02080206 + .4byte 0x0208020E + .4byte 0x01AD404E + .4byte 0x70A20175 + .4byte 0x7A00019C + .4byte 0x0C0001E0 + .4byte 0x00300030 + .4byte 0x00060006 + .4byte 0x18181818 + .4byte 0x040E040E + .4byte 0x040E040E + .4byte 0x041A01AD + .4byte 0x404769A2 + .4byte 0x01757A00 + .4byte 0x019C0C00 + .4byte 0x01E0002C + .4byte 0x002C000A + .4byte 0x000A1818 + .4byte 0x1818040E + .4byte 0x040E040E + .4byte 0x040E041A + .4byte 0x01AD4047 + .4byte 0x69A8017B + .4byte 0x7A00019C +taps: + .4byte 0x01F001DC + .4byte 0x01AE0174 + .4byte 0x012900DB + .4byte 0x008E0046 + .4byte 0x000C00E2 + .4byte 0x00CB00C0 + .4byte 0x00C400CF + .4byte 0x00DE00EC + .4byte 0x00FC0008 + .4byte 0x000F0013 + .4byte 0x0013000F + .4byte 0x000C0008 + .4byte 0x00010000 +"@92": + .4byte lbl_800998CC + .4byte lbl_800998D4 + .4byte lbl_8009990C + .4byte lbl_80099914 + .4byte lbl_800998DC + .4byte lbl_800998E4 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_800998FC + .4byte lbl_80099904 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_8009991C + .4byte lbl_80099924 + .4byte lbl_8009992C + .4byte lbl_8009992C + .4byte lbl_800998EC + .4byte lbl_800998F4 +"@336": + .asciz "***************************************\n" + .balign 4 +"@337": + .asciz " ! ! ! C A U T I O N ! ! ! \n" + .balign 4 +"@338": + .asciz "This TV format \"DEBUG_PAL\" is only for \n" + .balign 4 +"@339": + .asciz "temporary solution until PAL DAC board \n" + .balign 4 +"@340": + .asciz "is available. Please do NOT use this \n" + .balign 4 +"@341": + .asciz "mode in real games!!! \n" + .balign 4 + .4byte 0 + +.section .bss, "wa" # 0x803E6000 - 0x80408AC0 +regs: + .skip 0x78 +shdwRegs: + .skip 0x78 +HorVer: + .skip 0x58 + +.section .sbss, "wa" # 0x804097C0 - 0x8040B45C +retraceCount: + .skip 0x4 +flushFlag: + .skip 0x4 +retraceQueue: + .skip 0x8 +PreCB: + .skip 0x4 +PostCB: + .skip 0x4 +encoderType: + .skip 0x4 +displayOffsetH: + .skip 0x2 +displayOffsetV: + .skip 0x2 +changeMode: + .skip 0x8 +changed: + .skip 0x4 +lbl_80409F2C: + .skip 0x4 +shdwChangeMode: + .skip 0x8 +shdwChanged: + .skip 0x4 +lbl_80409F3C: + .skip 0x4 +CurrTiming: + .skip 0x4 +CurrTvMode: + .skip 0x4 +FBSet: + .skip 0x4 +message$332: + .skip 0x4 |