mirror of https://github.com/zeldaret/tp.git
158 lines
3.7 KiB
C
158 lines
3.7 KiB
C
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: OSReset
|
|
//
|
|
|
|
#include "dolphin/os/OSReset.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
SECTION_INIT void memset();
|
|
void OSReport();
|
|
void __OSStopAudioSystem();
|
|
void ICFlashInvalidate();
|
|
void LCDisable();
|
|
void OSDisableInterrupts();
|
|
void __OSReboot();
|
|
void __OSLockSram();
|
|
void __OSUnlockSram();
|
|
void __OSSyncSram();
|
|
void OSDisableScheduler();
|
|
void OSEnableScheduler();
|
|
void OSCancelThread();
|
|
void __PADDisableRecalibration();
|
|
extern u8 __OSRebootParams[28 + 4 /* padding */];
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* ############################################################################################## */
|
|
/* 80451690-80451698 000B90 0008+00 2/2 0/0 0/0 .sbss ResetFunctionQueue */
|
|
static u8 ResetFunctionQueue[8];
|
|
|
|
/* 8033F660-8033F6E4 339FA0 0084+00 0/0 5/5 0/0 .text OSRegisterResetFunction */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void OSRegisterResetFunction(OSResetFunctionInfo* info) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/OSRegisterResetFunction.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8033F6E4-8033F78C 33A024 00A8+00 1/1 0/0 0/0 .text __OSCallResetFunctions */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm BOOL __OSCallResetFunctions(s32 param_0) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/__OSCallResetFunctions.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8033F78C-8033F7FC 33A0CC 0070+00 2/2 0/0 0/0 .text Reset */
|
|
static asm void Reset(register s32 param_0) {
|
|
// clang-format off
|
|
nofralloc
|
|
|
|
b lbl_8033F7AC
|
|
|
|
lbl_8033F790:
|
|
mfspr r8, 0x3f0
|
|
ori r8, r8, 8
|
|
mtspr 0x3f0, r8
|
|
isync
|
|
sync
|
|
nop
|
|
b lbl_8033F7B0
|
|
|
|
lbl_8033F7AC:
|
|
b lbl_8033F7CC
|
|
|
|
lbl_8033F7B0:
|
|
mftb r5, 0x10c
|
|
|
|
lbl_8033F7B4:
|
|
mftb r6, 0x10c
|
|
subf r7, r5, r6
|
|
cmplwi r7, 0x1124
|
|
blt lbl_8033F7B4
|
|
nop
|
|
b lbl_8033F7D0
|
|
|
|
lbl_8033F7CC:
|
|
b lbl_8033F7EC
|
|
|
|
lbl_8033F7D0:
|
|
lis r8, 0xCC00
|
|
ori r8, r8, 0x3000
|
|
li r4, 3
|
|
stw r4, 0x24(r8)
|
|
stw param_0, 0x24(r8)
|
|
nop
|
|
b lbl_8033F7F0
|
|
|
|
lbl_8033F7EC:
|
|
b lbl_8033F7F8
|
|
|
|
lbl_8033F7F0:
|
|
nop
|
|
b lbl_8033F7F0
|
|
|
|
lbl_8033F7F8:
|
|
b lbl_8033F790
|
|
// clang-format on
|
|
}
|
|
|
|
/* 8033F7FC-8033F864 33A13C 0068+00 1/1 0/0 0/0 .text KillThreads */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
static asm void KillThreads(void) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/KillThreads.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8033F864-8033F8AC 33A1A4 0048+00 0/0 3/3 0/0 .text __OSDoHotReset */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void __OSDoHotReset(s32 param_0) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/__OSDoHotReset.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* ############################################################################################## */
|
|
/* 803D07E8-803D0838 02D908 004E+02 1/1 0/0 0/0 .data @153 */
|
|
SECTION_DATA static char lit_153[] = "OSResetSystem(): You can't specify TRUE to forceMenu if you restart. Ignored\n";
|
|
|
|
/* 80451698-804516A0 000B98 0004+04 1/1 0/0 0/0 .sbss bootThisDol */
|
|
static u8 bootThisDol[4 + 4 /* padding */];
|
|
|
|
/* 8033F8AC-8033FAAC 33A1EC 0200+00 0/0 5/5 0/0 .text OSResetSystem */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm void OSResetSystem(s32 reset, u32 resetCode, BOOL forceMenu) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/OSResetSystem.s"
|
|
}
|
|
#pragma pop
|
|
|
|
/* 8033FAAC-8033FAE4 33A3EC 0038+00 0/0 3/3 0/0 .text OSGetResetCode */
|
|
#pragma push
|
|
#pragma optimization_level 0
|
|
#pragma optimizewithasm off
|
|
asm u32 OSGetResetCode(void) {
|
|
nofralloc
|
|
#include "asm/dolphin/os/OSReset/OSGetResetCode.s"
|
|
}
|
|
#pragma pop
|