Skip to content

Commit

Permalink
OSReboot OK
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 13, 2024
1 parent 2def735 commit 597c49e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
46 changes: 23 additions & 23 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,29 +962,29 @@ def JSystemLib(lib_name, objects):
DolphinLib(
"os",
[
Object(Matching, "dolphin/os/__start.c"),
Object(Matching, "dolphin/os/OS.c"),
Object(Matching, "dolphin/os/OSAlarm.c"),
Object(Matching, "dolphin/os/OSAlloc.c"),
Object(Matching, "dolphin/os/OSArena.c"),
Object(Matching, "dolphin/os/OSAudioSystem.c"),
Object(Matching, "dolphin/os/OSCache.c"),
Object(Matching, "dolphin/os/OSContext.c"),
Object(Matching, "dolphin/os/OSError.c"),
Object(Matching, "dolphin/os/OSFont.c"),
Object(Matching, "dolphin/os/OSInterrupt.c"),
Object(Matching, "dolphin/os/OSLink.c"),
Object(Matching, "dolphin/os/OSMessage.c"),
Object(Matching, "dolphin/os/OSMemory.c"),
Object(Matching, "dolphin/os/OSMutex.c"),
Object(NonMatching, "dolphin/os/OSReboot.c"),
Object(Matching, "dolphin/os/OSReset.c"),
Object(Matching, "dolphin/os/OSResetSW.c"),
Object(Matching, "dolphin/os/OSRtc.c"),
Object(Matching, "dolphin/os/OSSync.c"),
Object(Matching, "dolphin/os/OSThread.c"),
Object(Matching, "dolphin/os/OSTime.c"),
Object(Matching, "dolphin/os/__ppc_eabi_init.cpp"),
Object(Matching, "dolphin/os/__start.c"),
Object(Matching, "dolphin/os/OS.c"),
Object(Matching, "dolphin/os/OSAlarm.c"),
Object(Matching, "dolphin/os/OSAlloc.c"),
Object(Matching, "dolphin/os/OSArena.c"),
Object(Matching, "dolphin/os/OSAudioSystem.c"),
Object(Matching, "dolphin/os/OSCache.c"),
Object(Matching, "dolphin/os/OSContext.c"),
Object(Matching, "dolphin/os/OSError.c"),
Object(Matching, "dolphin/os/OSFont.c"),
Object(Matching, "dolphin/os/OSInterrupt.c"),
Object(Matching, "dolphin/os/OSLink.c"),
Object(Matching, "dolphin/os/OSMessage.c"),
Object(Matching, "dolphin/os/OSMemory.c"),
Object(Matching, "dolphin/os/OSMutex.c"),
Object(Matching, "dolphin/os/OSReboot.c"),
Object(Matching, "dolphin/os/OSReset.c"),
Object(Matching, "dolphin/os/OSResetSW.c"),
Object(Matching, "dolphin/os/OSRtc.c"),
Object(Matching, "dolphin/os/OSSync.c"),
Object(Matching, "dolphin/os/OSThread.c"),
Object(Matching, "dolphin/os/OSTime.c"),
Object(Matching, "dolphin/os/__ppc_eabi_init.cpp"),
],
),
DolphinLib(
Expand Down
6 changes: 2 additions & 4 deletions src/dolphin/os/OSReboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ void ReadApploader(DVDCommandBlock* dvdCmd, void* addr, u32 offset, u32 numBytes
static void Callback(s32 result, struct DVDCommandBlock* block) { Prepared = TRUE; }

void __OSReboot(u32 resetCode, u32 bootDol) {
/* Nonmatching */
OSContext exceptionContext;
DVDCommandBlock dvdCmd;
DVDCommandBlock dvdCmd2;
Expand All @@ -76,9 +75,8 @@ void __OSReboot(u32 resetCode, u32 bootDol) {

OSDisableInterrupts();

UNK_817FFFFC = 1;
UNK_817FFFF8 = 1;
OS_RESET_CODE = resetCode;
UNK_817FFFFC = 0;
UNK_817FFFF8 = 0;
OS_REBOOT_BOOL = TRUE;
BOOT_REGION_START = (u32)SaveStart;
BOOT_REGION_END = (u32)SaveEnd;
Expand Down

0 comments on commit 597c49e

Please sign in to comment.