Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func_80183070 to SleepForever #1686

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ void Room_Draw(PlayState* play, Room* room, u32 flags);

void Room_FinishRoomChange(PlayState* play, RoomContext* roomCtx);

void func_80183070(void);
hensldm marked this conversation as resolved.
Show resolved Hide resolved

AudioTask* AudioThread_Update(void);
void AudioThread_QueueCmdF32(u32 opArgs, f32 data);
void AudioThread_QueueCmdS32(u32 opArgs, s32 data);
Expand Down
2 changes: 1 addition & 1 deletion spec
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ beginseg
include "$(BUILD_DIR)/src/code/sys_matrix.o"
include "$(BUILD_DIR)/src/code/sys_ucode.o"
include "$(BUILD_DIR)/src/code/sys_rumble.o"
include "$(BUILD_DIR)/src/code/code_80183070.o"
include "$(BUILD_DIR)/src/code/sleep_forever.o"
include "$(BUILD_DIR)/src/code/c_keyframe.o"
include "$(BUILD_DIR)/src/code/sys_slowly.o"
include "$(BUILD_DIR)/src/code/sys_flashrom.o"
Expand Down
2 changes: 1 addition & 1 deletion src/code/code_80183070.c → src/code/sleep_forever.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "libc64/sleep.h"

void func_80183070(void) {
void Sleep_Forever(void) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So taking another look at OoT, they have an additional log message that uses the word freeze which I'm wondering if should actually use in the function name (func_800D31A0 is the function in OoT).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, OoT (zeldaret/oot#2315) looks to rename the file to sys_freeze (no word on the function yet, though I think just Freeze or Freeze_Forever works) which I agree with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with OoT's decision to call it sys_freeze. The word freeze in the context most appropriate is a system hang, or an unintended fault of software/hardware causing unresponsiveness, and not a deliberate action. Additionally, calling Sleep_Forever does not necessarily result in an unresponsive system.

The "freeze!" comment in OoT more seems like a joke than a hint at the actual source name.

for (;;) {
msleep(1000);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/disasm/files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
0x80180160 : "sys_matrix",
0x80182C90 : "sys_ucode",
0x80182CE0 : "sys_rumble",
0x80183070 : "code_80183070",
0x80183070 : "sleep_forever",
0x801830A0 : "c_keyframe",
0x80185660 : "sys_slowly",
0x801857C0 : "sys_flashrom",
Expand Down
2 changes: 1 addition & 1 deletion tools/sizes/code_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,7 @@ asm/non_matchings/code/sys_ucode/SysUcode_GetUCodeData.s,SysUcode_GetUCodeData,0
asm/non_matchings/code/sys_ucode/RumbleManager_Update.s,RumbleManager_Update,0x80182CE0,0xD0
asm/non_matchings/code/sys_ucode/RumbleManager_Init.s,RumbleManager_Init,0x80183020,0xE
asm/non_matchings/code/sys_ucode/RumbleManager_Destroy.s,RumbleManager_Destroy,0x80183058,0x6
asm/non_matchings/code/code_80183070/func_80183070.s,func_80183070,0x80183070,0xC
asm/non_matchings/code/sleep_forever/Sleep_Forever.s,Sleep_Forever,0x80183070,0xC
asm/non_matchings/code/c_keyframe/FrameCtrl_Reset.s,FrameCtrl_Reset,0x801830A0,0xA
asm/non_matchings/code/c_keyframe/FrameCtrl_Init.s,FrameCtrl_Init,0x801830C8,0x8
asm/non_matchings/code/c_keyframe/FrameCtrl_SetProperties.s,FrameCtrl_SetProperties,0x801830E8,0x18
Expand Down