diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2024-09-08 00:47:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-07 16:47:22 -0600 |
| commit | 2e2b2e2c7a59bd3544de5e73f72a03b947ec8ab3 (patch) | |
| tree | f8b347b1649933af455a23aee0bb31f67af1fbc1 /src | |
| parent | e982c44721a76972de0e16a971e6447fc68f3f67 (diff) | |
[headers] Move padmgr, scheduler, irqmgr symbols to respective headers; add segmented_address.h (#1681)
* [headers] Move padmgr, scheduler symbols to respective headers
* fix revealed header problems
* Fix bss
* review
* bss
* segmented_address.h
---------
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/boot/idle.c | 7 | ||||
| -rw-r--r-- | src/code/main.c | 39 | ||||
| -rw-r--r-- | src/code/padmgr.c | 2 | ||||
| -rw-r--r-- | src/code/speed_meter.c | 1 | ||||
| -rw-r--r-- | src/code/z_jpeg.c | 2 | ||||
| -rw-r--r-- | src/code/z_lib.c | 2 | ||||
| -rw-r--r-- | src/code/z_nulltask.c | 1 |
7 files changed, 30 insertions, 24 deletions
diff --git a/src/boot/idle.c b/src/boot/idle.c index 7e96241c2..3c2138672 100644 --- a/src/boot/idle.c +++ b/src/boot/idle.c @@ -1,6 +1,8 @@ #include "prevent_bss_reordering.h" + +#include "stdbool.h" + #include "buffers.h" -#include "irqmgr.h" #include "main.h" #include "segment_symbols.h" #include "stack.h" @@ -10,7 +12,7 @@ #include "z64thread.h" // Variables are put before most headers as a hacky way to bypass bss reordering -IrqMgr gIrqMgr; +struct IrqMgr gIrqMgr; STACK(sIrqMgrStack, 0x500); StackEntry sIrqMgrStackInfo; OSThread sMainThread; @@ -22,6 +24,7 @@ OSViMode gViConfigMode; u8 gViConfigModeType; #include "idle.h" +#include "irqmgr.h" u8 D_80096B20 = 1; vu8 gViConfigUseBlack = true; diff --git a/src/code/main.c b/src/code/main.c index f45a1dfb2..e2822a9a8 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -1,19 +1,13 @@ -#include "audiomgr.h" -#include "fault.h" -#include "idle.h" -#include "irqmgr.h" -#include "padmgr.h" -#include "scheduler.h" -#include "CIC6105.h" +#include "prevent_bss_reordering.h" +#include "ultra64.h" #include "stack.h" -#include "stackcheck.h" // Variables are put before most headers as a hacky way to bypass bss reordering OSMesgQueue sSerialEventQueue; OSMesg sSerialMsgBuf[1]; u32 gSegments[NUM_SEGMENTS]; -Scheduler gScheduler; -IrqMgrClient sIrqClient; +struct Scheduler gScheduler; +struct IrqMgrClient sIrqClient; OSMesgQueue sIrqMgrMsgQueue; OSMesg sIrqMgrMsgBuf[60]; OSThread gGraphThread; @@ -21,17 +15,28 @@ STACK(sGraphStack, 0x1800); STACK(sSchedStack, 0x600); STACK(sAudioStack, 0x800); STACK(sPadMgrStack, 0x500); -StackEntry sGraphStackInfo; -StackEntry sSchedStackInfo; -StackEntry sAudioStackInfo; -StackEntry sPadMgrStackInfo; -AudioMgr sAudioMgr; +struct StackEntry sGraphStackInfo; +struct StackEntry sSchedStackInfo; +struct StackEntry sAudioStackInfo; +struct StackEntry sPadMgrStackInfo; +struct AudioMgr sAudioMgr; static s32 sBssPad; -PadMgr gPadMgr; +struct PadMgr gPadMgr; #include "main.h" + +#include "audiomgr.h" #include "buffers.h" -#include "global.h" +#include "CIC6105.h" +#include "fault.h" +#include "idle.h" +#include "irqmgr.h" +#include "padmgr.h" +#include "regs.h" +#include "segment_symbols.h" +#include "stack.h" +#include "stackcheck.h" +#include "scheduler.h" #include "sys_initial_check.h" #include "system_heap.h" #include "z64nmi_buff.h" diff --git a/src/code/padmgr.c b/src/code/padmgr.c index f8da69762..69570d8c4 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -38,7 +38,7 @@ #include "fault.h" #include "macros.h" -#include "main.h" +#include "scheduler.h" #include "z64math.h" #include "z64voice.h" diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index d027e913d..df477db77 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -3,7 +3,6 @@ #include "libc64/malloc.h" #include "gfx.h" -#include "main.h" #include "regs.h" #include "sys_cfb.h" #include "z64game.h" diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c index 00cbe135a..1b66fb8d9 100644 --- a/src/code/z_jpeg.c +++ b/src/code/z_jpeg.c @@ -1,7 +1,7 @@ #include "z64jpeg.h" #include "stdbool.h" -#include "main.h" +#include "scheduler.h" #include "sys_ucode.h" #include "macros.h" diff --git a/src/code/z_lib.c b/src/code/z_lib.c index 8a494cf76..e8d95584a 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -3,7 +3,7 @@ #include "libc64/qrand.h" -#include "main.h" +#include "segmented_address.h" #include "sfx.h" #include "z64game.h" diff --git a/src/code/z_nulltask.c b/src/code/z_nulltask.c index b060e0639..fc65107d5 100644 --- a/src/code/z_nulltask.c +++ b/src/code/z_nulltask.c @@ -1,7 +1,6 @@ #include "scheduler.h" #include "macros.h" -#include "main.h" /** * Blocks the current thread until all queued scheduler tasks have completed. |
