tp/asm/si/SISamplingRate.s

86 lines
3.7 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 80346290
.global SISetSamplingRate
SISetSamplingRate:
/* 80346290 003431D0 7C 08 02 A6 */ mflr r0
/* 80346294 003431D4 90 01 00 04 */ stw r0, 4(r1)
/* 80346298 003431D8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8034629C 003431DC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803462A0 003431E0 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803462A4 003431E4 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803462A8 003431E8 3B A3 00 00 */ addi r29, r3, 0
/* 803462AC 003431EC 28 1D 00 0B */ cmplwi r29, 0xb
/* 803462B0 003431F0 3C 60 80 3D */ lis r3, lbl_803D12D0@ha
/* 803462B4 003431F4 3B E3 12 D0 */ addi r31, r3, lbl_803D12D0@l
/* 803462B8 003431F8 40 81 00 08 */ ble lbl_803462C0
/* 803462BC 003431FC 3B A0 00 0B */ li r29, 0xb
lbl_803462C0:
/* 803462C0 00343200 4B FF 74 35 */ bl __RAS_OSDisableInterrupts_begin
/* 803462C4 00343204 93 AD 91 80 */ stw r29, lbl_80451700-_SDA_BASE_(r13)
/* 803462C8 00343208 7C 7E 1B 78 */ mr r30, r3
/* 803462CC 0034320C 48 00 77 D1 */ bl VIGetTvFormat
/* 803462D0 00343210 2C 03 00 02 */ cmpwi r3, 2
/* 803462D4 00343214 41 82 00 24 */ beq lbl_803462F8
/* 803462D8 00343218 40 80 00 14 */ bge lbl_803462EC
/* 803462DC 0034321C 2C 03 00 00 */ cmpwi r3, 0
/* 803462E0 00343220 41 82 00 18 */ beq lbl_803462F8
/* 803462E4 00343224 40 80 00 1C */ bge lbl_80346300
/* 803462E8 00343228 48 00 00 20 */ b lbl_80346308
lbl_803462EC:
/* 803462EC 0034322C 2C 03 00 05 */ cmpwi r3, 5
/* 803462F0 00343230 41 82 00 08 */ beq lbl_803462F8
/* 803462F4 00343234 48 00 00 14 */ b lbl_80346308
lbl_803462F8:
/* 803462F8 00343238 7F E4 FB 78 */ mr r4, r31
/* 803462FC 0034323C 48 00 00 20 */ b lbl_8034631C
lbl_80346300:
/* 80346300 00343240 38 9F 00 30 */ addi r4, r31, 0x30
/* 80346304 00343244 48 00 00 18 */ b lbl_8034631C
lbl_80346308:
/* 80346308 00343248 38 7F 00 60 */ addi r3, r31, 0x60
/* 8034630C 0034324C 4C C6 31 82 */ crclr 6
/* 80346310 00343250 4B CC 07 AD */ bl OSReport
/* 80346314 00343254 3B A0 00 00 */ li r29, 0
/* 80346318 00343258 38 9F 00 00 */ addi r4, r31, 0
lbl_8034631C:
/* 8034631C 0034325C 3C 60 CC 00 */ lis r3, 0xCC00206C@ha
/* 80346320 00343260 A0 03 20 6C */ lhz r0, 0xCC00206C@l(r3)
/* 80346324 00343264 54 00 07 FF */ clrlwi. r0, r0, 0x1f
/* 80346328 00343268 41 82 00 0C */ beq lbl_80346334
/* 8034632C 0034326C 38 A0 00 02 */ li r5, 2
/* 80346330 00343270 48 00 00 08 */ b lbl_80346338
lbl_80346334:
/* 80346334 00343274 38 A0 00 01 */ li r5, 1
lbl_80346338:
/* 80346338 00343278 57 A3 10 3A */ slwi r3, r29, 2
/* 8034633C 0034327C 7C 04 1A 2E */ lhzx r0, r4, r3
/* 80346340 00343280 7C 64 1A 14 */ add r3, r4, r3
/* 80346344 00343284 88 83 00 02 */ lbz r4, 2(r3)
/* 80346348 00343288 7C 65 01 D6 */ mullw r3, r5, r0
/* 8034634C 0034328C 4B FF F4 A9 */ bl SISetXY
/* 80346350 00343290 7F C3 F3 78 */ mr r3, r30
/* 80346354 00343294 4B FF 73 C9 */ bl OSRestoreInterrupts
/* 80346358 00343298 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8034635C 0034329C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80346360 003432A0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80346364 003432A4 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80346368 003432A8 38 21 00 20 */ addi r1, r1, 0x20
/* 8034636C 003432AC 7C 08 03 A6 */ mtlr r0
/* 80346370 003432B0 4E 80 00 20 */ blr
.global SIRefreshSamplingRate
SIRefreshSamplingRate:
/* 80346374 003432B4 7C 08 02 A6 */ mflr r0
/* 80346378 003432B8 90 01 00 04 */ stw r0, 4(r1)
/* 8034637C 003432BC 94 21 FF F8 */ stwu r1, -8(r1)
/* 80346380 003432C0 80 6D 91 80 */ lwz r3, lbl_80451700-_SDA_BASE_(r13)
/* 80346384 003432C4 4B FF FF 0D */ bl SISetSamplingRate
/* 80346388 003432C8 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8034638C 003432CC 38 21 00 08 */ addi r1, r1, 8
/* 80346390 003432D0 7C 08 03 A6 */ mtlr r0
/* 80346394 003432D4 4E 80 00 20 */ blr