From 7d67f40a71eca0f8fe0e1941249744cd959570ca Mon Sep 17 00:00:00 2001 From: Cuyler36 <24523422+Cuyler36@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:52:02 -0400 Subject: [PATCH] Reorganize jaudio_NES src folder layout --- config/dol_slices.yml | 26 +++++++++---------- configure.py | 20 ++------------ .../jaudio_NES/{ => game}/audioheaders.c | 0 src/static/jaudio_NES/{ => game}/dummyprobe.c | 0 src/static/jaudio_NES/{ => game}/emusound.c | 0 src/static/jaudio_NES/{ => game}/game64.c | 0 src/static/jaudio_NES/{ => game}/melody.c | 0 src/static/jaudio_NES/{ => game}/radio.c | 0 src/static/jaudio_NES/{ => game}/rhythm.c | 0 src/static/jaudio_NES/{ => game}/staff.c | 0 src/static/jaudio_NES/{ => game}/verysimple.c | 0 src/static/jaudio_NES/{ => internal}/aictrl.c | 0 .../jaudio_NES/{ => internal}/audiothread.c | 0 .../jaudio_NES/{ => internal}/dummyrom.c | 0 .../jaudio_NES/{ => internal}/neosthread.c | 0 src/static/jaudio_NES/{ => internal}/sample.c | 0 16 files changed, 15 insertions(+), 31 deletions(-) rename src/static/jaudio_NES/{ => game}/audioheaders.c (100%) rename src/static/jaudio_NES/{ => game}/dummyprobe.c (100%) rename src/static/jaudio_NES/{ => game}/emusound.c (100%) rename src/static/jaudio_NES/{ => game}/game64.c (100%) rename src/static/jaudio_NES/{ => game}/melody.c (100%) rename src/static/jaudio_NES/{ => game}/radio.c (100%) rename src/static/jaudio_NES/{ => game}/rhythm.c (100%) rename src/static/jaudio_NES/{ => game}/staff.c (100%) rename src/static/jaudio_NES/{ => game}/verysimple.c (100%) rename src/static/jaudio_NES/{ => internal}/aictrl.c (100%) rename src/static/jaudio_NES/{ => internal}/audiothread.c (100%) rename src/static/jaudio_NES/{ => internal}/dummyrom.c (100%) rename src/static/jaudio_NES/{ => internal}/neosthread.c (100%) rename src/static/jaudio_NES/{ => internal}/sample.c (100%) diff --git a/config/dol_slices.yml b/config/dol_slices.yml index e47bd6ef..969b663c 100644 --- a/config/dol_slices.yml +++ b/config/dol_slices.yml @@ -28,54 +28,54 @@ dvderr.c: .rodata: [0x800a97f8, 0x800a9838] .data: [0x800b0a60, 0x800b9140] .bss: [0x800e2790, 0x800e2b88] -jaudio_NES/dummyprobe.c: +jaudio_NES/game/dummyprobe.c: .text: [0x800083f8, 0x80008400] -jaudio_NES/audioheaders.c: +jaudio_NES/game/audioheaders.c: .data: [0x800cca40, 0x800ce880] -jaudio_NES/verysimple.c: +jaudio_NES/game/verysimple.c: .text: [0x80008400, 0x80008480] .sdata: [0x80217b80, 0x80217b88] -# jaudio_NES/game64.c: # TODO: finish +# jaudio_NES/game/game64.c: # TODO: finish # .rodata: [0x800a9938, 0x800a9b98] -jaudio_NES/melody.c: +jaudio_NES/game/melody.c: .text: [0x8001561c, 0x80015a4c] .rodata: [0x800a9b98, 0x800aa500] .sbss: [0x80218390, 0x802183a0] .sdata2: [0x80218d58, 0x80218d60] -jaudio_NES/rhythm.c: +jaudio_NES/game/rhythm.c: .text: [0x80015a4c, 0x800165ec] .bss: [0x8017bdd8, 0x8017be80] .sdata: [0x80217bd0, 0x80217bd8] .sbss: [0x802183a0, 0x802183b0] .sdata2: [0x80218d60, 0x80218d78] -jaudio_NES/radio.c: +jaudio_NES/game/radio.c: .text: [0x800165ec, 0x8001676c] .sdata2: [0x80218d78, 0x80218d88] -jaudio_NES/staff.c: +jaudio_NES/game/staff.c: .text: [0x80016840, 0x80016d20] .data: [0x800cfe10, 0x800cff20] .sbss: [0x802183b8, 0x802183c8] .sdata2: [0x80218d98, 0x80218da0] -jaudio_NES/aictrl.c: +jaudio_NES/internal/aictrl.c: .text: [0x80017e80, 0x80018640] .rodata: [0x800aa500, 0x800aa518] .bss: [0x8017cfa0, 0x8017cfc0] .sbss: [0x802183f0, 0x80218420] .sdata2: [0x80218da8, 0x80218db8] -jaudio_NES/sample.c: +jaudio_NES/internal/sample.c: .text: [0x80018640, 0x80018920] -jaudio_NES/dummyrom.c: +jaudio_NES/internal/dummyrom.c: .text: [0x80018920, 0x80018bc0] .rodata: [0x800aa518, 0x800aa528] # .bss: [0x8020d78c, 0x8020d7a0] # placed in common bss .sbss: [0x80218420, 0x80218440] -jaudio_NES/audiothread.c: +jaudio_NES/internal/audiothread.c: .text: [0x80018bc0, 0x800190e0] .rodata: [0x800aa528, 0x800aa538] .bss: [0x8017cfc0, 0x80180020] .sbss: [0x80218440, 0x80218460] .sdata2: [0x80218db8, 0x80218dc0] -jaudio_NES/neosthread.c: +jaudio_NES/internal/neosthread.c: .text: [0x800190e0, 0x80019380] .rodata: [0x800aa538, 0x800aa558] .bss: [0x80180020, 0x80186440] diff --git a/configure.py b/configure.py index 945ffd36..7735de22 100644 --- a/configure.py +++ b/configure.py @@ -624,31 +624,15 @@ class AsmSource(Source): inputs = self.src_path ) -JAUDIO_FUNC_ALIGN_32_TUS = [ - "sample.c", - "aictrl.c", - "dummyrom.c", - "audiothread.c", - "neosthread.c" -] - -JAUDIO_USER_TUS = [ - "verysimple.c", - "melody.c", - "radio.c", - "rhythm.c", - "staff.c" -] - class CSource(Source): def __init__(self, ctx: c.SourceContext, path: str): if path.startswith("src/static/dolphin/"): self.cflags = c.SDK_FLAGS self.cc = c.OCC elif path.startswith("src/static/jaudio_NES/"): - if os.path.basename(path) in JAUDIO_FUNC_ALIGN_32_TUS: + if path.startswith("src/static/jaudio_NES/internal/"): self.cflags = c.JAUDIO_FUNC_ALIGN_32_CFLAGS - elif os.path.basename(path) in JAUDIO_USER_TUS: + elif path.startswith("src/static/jaudio_NES/game/"): self.cflags = c.JAUDIO_USER_CFLAGS else: self.cflags = c.JAUDIO_CFLAGS diff --git a/src/static/jaudio_NES/audioheaders.c b/src/static/jaudio_NES/game/audioheaders.c similarity index 100% rename from src/static/jaudio_NES/audioheaders.c rename to src/static/jaudio_NES/game/audioheaders.c diff --git a/src/static/jaudio_NES/dummyprobe.c b/src/static/jaudio_NES/game/dummyprobe.c similarity index 100% rename from src/static/jaudio_NES/dummyprobe.c rename to src/static/jaudio_NES/game/dummyprobe.c diff --git a/src/static/jaudio_NES/emusound.c b/src/static/jaudio_NES/game/emusound.c similarity index 100% rename from src/static/jaudio_NES/emusound.c rename to src/static/jaudio_NES/game/emusound.c diff --git a/src/static/jaudio_NES/game64.c b/src/static/jaudio_NES/game/game64.c similarity index 100% rename from src/static/jaudio_NES/game64.c rename to src/static/jaudio_NES/game/game64.c diff --git a/src/static/jaudio_NES/melody.c b/src/static/jaudio_NES/game/melody.c similarity index 100% rename from src/static/jaudio_NES/melody.c rename to src/static/jaudio_NES/game/melody.c diff --git a/src/static/jaudio_NES/radio.c b/src/static/jaudio_NES/game/radio.c similarity index 100% rename from src/static/jaudio_NES/radio.c rename to src/static/jaudio_NES/game/radio.c diff --git a/src/static/jaudio_NES/rhythm.c b/src/static/jaudio_NES/game/rhythm.c similarity index 100% rename from src/static/jaudio_NES/rhythm.c rename to src/static/jaudio_NES/game/rhythm.c diff --git a/src/static/jaudio_NES/staff.c b/src/static/jaudio_NES/game/staff.c similarity index 100% rename from src/static/jaudio_NES/staff.c rename to src/static/jaudio_NES/game/staff.c diff --git a/src/static/jaudio_NES/verysimple.c b/src/static/jaudio_NES/game/verysimple.c similarity index 100% rename from src/static/jaudio_NES/verysimple.c rename to src/static/jaudio_NES/game/verysimple.c diff --git a/src/static/jaudio_NES/aictrl.c b/src/static/jaudio_NES/internal/aictrl.c similarity index 100% rename from src/static/jaudio_NES/aictrl.c rename to src/static/jaudio_NES/internal/aictrl.c diff --git a/src/static/jaudio_NES/audiothread.c b/src/static/jaudio_NES/internal/audiothread.c similarity index 100% rename from src/static/jaudio_NES/audiothread.c rename to src/static/jaudio_NES/internal/audiothread.c diff --git a/src/static/jaudio_NES/dummyrom.c b/src/static/jaudio_NES/internal/dummyrom.c similarity index 100% rename from src/static/jaudio_NES/dummyrom.c rename to src/static/jaudio_NES/internal/dummyrom.c diff --git a/src/static/jaudio_NES/neosthread.c b/src/static/jaudio_NES/internal/neosthread.c similarity index 100% rename from src/static/jaudio_NES/neosthread.c rename to src/static/jaudio_NES/internal/neosthread.c diff --git a/src/static/jaudio_NES/sample.c b/src/static/jaudio_NES/internal/sample.c similarity index 100% rename from src/static/jaudio_NES/sample.c rename to src/static/jaudio_NES/internal/sample.c