Skip to content

Commit 090b45b

Browse files
committed
few libnaudio tweaks
1 parent f4557c8 commit 090b45b

38 files changed

+993
-643
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ html/
1010
junk/
1111
nonmatchings
1212
py/
13+
rodata/
1314
rzip/
1415
src_debug/
1516
src_eu/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ dirs:
4747
$(foreach dir,$(BIN_DIR) $(RZIP_DIRS),$(shell mkdir -p $(BUILD_DIR)/$(dir)))
4848

4949
clean:
50-
rm -rf bin
5150
rm -rf build
5251

5352
really-clean: clean
53+
rm -rf bin
5454
rm -rf rzip
5555
make -C $(GAME_DIR) really-clean
5656

conker/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ $(BUILD_DIR)/$(SRC_DIR)/init_214F0.o: OPT_FLAGS := -g
127127
$(BUILD_DIR)/$(SRC_DIR)/init_22040.o: OPT_FLAGS := -g
128128
$(BUILD_DIR)/$(SRC_DIR)/init_22460.o: OPT_FLAGS := -g
129129

130+
# $(BUILD_DIR)/$(SRC_DIR)/game_3B920.o: OPT_FLAGS := -g
130131

131132
# not exactly right:
132133
# $(BUILD_DIR)/$(SRC_DIR)/libultra/io/%.o: OPT_FLAGS := -g3
@@ -148,13 +149,13 @@ dirs:
148149
$(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(BIN_DIRS) ,$(shell mkdir -p build/$(dir)))
149150

150151
clean:
152+
rm -rf build
153+
154+
really-clean: clean
151155
rm -rf asm
152156
rm -rf bin
153-
rm -rf build
154157
rm -rf $(BASENAME).*.ok
155158
rm -f *auto.txt
156-
157-
really-clean: clean
158159
rm -rf conker.us.bin conker.eu.bin conker.ects.bin conker.debug.bin
159160

160161
extract: $(BUILD_DIR)/splat

conker/conker.us.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ segments:
3131
- [0x1050, c]
3232
- [0x1420, c]
3333
- [0x2070, c]
34-
- [0x2DB0, asm, "libultra/io/aisetnextbuf"]
34+
- [0x2DB0, c, "libultra/io/aisetnextbuf"]
3535
- [0x2E50, c]
36-
- [0x30A0, asm, "libultra/io/pimgr"]
36+
- [0x30A0, c, "libultra/io/pimgr"]
3737
- [0x3220, c, "libultra/io/sptask"]
3838
- [0x34E0, asm, "libultra/io/vimgr"]
3939
- [0x37F0, c, "libultra/os/createthread"]
@@ -83,7 +83,7 @@ segments:
8383
- [0x18DA0, c, "libultra/audio/n_sl"]
8484
- [0x18E60, c, "libultra/audio/n_synthesizer"]
8585
- [0x19AB0, c, "libultra/audio/cents2ratio"]
86-
- [0x19B50, c]
86+
- [0x19B50, c, "libultra/audio/init_19B50"]
8787
- [0x1AAE0, c]
8888
- [0x1C060, c]
8989
- [0x1C690, c, "libultra/audio/n_synaddplayer"]
@@ -101,7 +101,7 @@ segments:
101101
- [0x1E2A0, c, "libultra/audio/init_1E2A0"]
102102
- [0x1E350, c, "libultra/audio/init_1E350"]
103103
- [0x1E400, c, "libultra/audio/init_1E400"]
104-
- [0x1E480, c] # not -g?
104+
- [0x1E480, c]
105105
- [0x1E4A0, c]
106106
- [0x1E530, c]
107107
- [0x1FB40, c]
@@ -199,9 +199,9 @@ segments:
199199
start: 0x000290D0
200200
vram: 0x800290D0
201201
files:
202-
- [0x290D0, "bin"] # data
202+
- [0x290D0, "bin"] # data (for boot?)
203203
- [0x291A0, "bin"] # ?
204-
- [0x2AAD0, "bin"] # ?
204+
- [0x2AAD0, "bin"] # first int is 0x42450, second is 0x19ea88
205205
- [0x2C080, ".data", "init/data/data_2C080"] # jump table for func_10002E50
206206
- [0x2C0A0, ".data", "init/data/data_2C0A0"] # jump table for func_100049E0
207207
- [0x2C0C0, "bin"]
@@ -238,7 +238,7 @@ segments:
238238
- [0x32490, c]
239239
- [0x32720, c, "game/done/game_32720"]
240240
- [0x32740, c]
241-
- [0x32f10, c]
241+
- [0x32F10, c, "game/done/game_32F10"]
242242
- [0x32f60, c, "game/done/game_32F60"]
243243
- [0x32fb0, c, "game/done/game_32FB0"]
244244
- [0x32fc0, c, "game/done/game_32FC0"]
@@ -263,7 +263,7 @@ segments:
263263
- [0x33660, c]
264264
- [0x33990, c]
265265
- [0x34ce0, c, "game/entrypoint"] # called from main code
266-
- [0x34ED0, c]
266+
- [0x34ED0, c, "game/done/game_34ED0"]
267267
- [0x34f20, c]
268268
- [0x357f0, c]
269269
- [0x35cf0, c, "game/done/game_35CF0"]
@@ -279,6 +279,7 @@ segments:
279279
- [0x39690, c, "game/done/game_39690"]
280280
- [0x39750, c]
281281
- [0x3b920, c]
282+
- [0x3BA70, c]
282283
- [0x3bfd0, c, "game/done/game_3BFD0"]
283284
- [0x3bfe0, c, "game/done/game_3BFE0"]
284285
- [0x3c230, c, "game/done/game_3C230"]
@@ -327,7 +328,7 @@ segments:
327328
- [0x43820, c, "game/done/game_43820"]
328329
- [0x43880, asm]
329330
- [0x439b0, c]
330-
- [0x43b20, c]
331+
- [0x43B20, c, "game/done/game_43B20"]
331332
- [0x43d00, asm]
332333
- [0x447b0, c]
333334
- [0x44a90, c]

conker/include/2.0L/PR/libaudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,9 @@ typedef struct {
667667
/* 0x0D */ u8 unkD;
668668
/* 0x0E */ u8 unkE;
669669
/* 0x0F */ u8 unkF;
670-
/* 0x10 */ u8 pad10[0x4];
670+
/* 0x10 */ f32 unk10;
671671
/* 0x14 */ u8 unk14;
672-
/* 0x15 */ u8 unk15;
672+
/* 0x15 */ s8 unk15;
673673
/* 0x16 */ u8 unk16;
674674
/* 0x17 */ u8 unk17;
675675
/* 0x18 */ f32 pitchBend; /* current pitch bend val in cents */

conker/include/functions.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ s32 func_10009980(s32 *arg0);
6060
void func_10009B2C(struct54 *arg0);
6161
void func_10009B4C(struct54 *arg0);
6262
void func_10009B90(struct54 *arg0);
63+
s32 func_1000BA18(u32 arg0, u8 arg1, f32 arg2, f32 arg3, f32 arg4);
6364
struct151 *func_1000B1B0(s32 arg0);
6465
s32 func_1000B830(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
6566
s32 func_1000B8B8(s32 arg0, u8 arg1, f32 arg2, f32 arg3, f32 arg4);
@@ -106,10 +107,6 @@ void func_1001263C(s32 arg0, s32 arg1, s32 arg2);
106107
void func_100126E8(s32 arg0, s32 arg1);
107108
s32 func_10012718(u16 arg0, struct127 *arg1, s32 arg2, s16 arg3, u16 arg4);
108109
s32 func_100127D0(void);
109-
// void func_10012820(struct14 *arg0, s32 arg1, s32 arg2);
110-
// s32 func_10012844(s32 arg0, s32 arg1, struct15 *arg2, u32 arg3, u32 arg4);
111-
void func_100128D0(struct8 *arg0, s32 arg1);
112-
void func_10012934(struct122 *arg0, s32 arg1, s32 arg2);
113110
void func_10012A28(struct121 *arg0, s32 arg1, s32 arg2, s32 arg3);
114111
void func_10012B84(struct11 *arg0, s32 arg1);
115112
void func_10012BD0(struct11 *arg0, s32 arg1);
@@ -365,6 +362,7 @@ s32 func_150150A4(void);
365362
s32 func_15015300(struct134 *arg0);
366363
void func_15016370(void);
367364
void func_15016500(void);
365+
void func_15017300(s16 arg0, s16 arg1);
368366
void func_150175E0(void);
369367
void func_15017790(void);
370368
void func_150177F8(void);
@@ -906,14 +904,13 @@ s32 func_10009FFC(void);
906904
//func_1000A420
907905
//func_1000A750
908906
//func_1000B060
909-
//func_1000B1FC
907+
struct151 *func_1000B1FC(s32 arg0);
910908
//func_1000B294
911909
//func_1000B2F4
912910
//func_1000B3D4
913911
//func_1000B548
914912
//func_1000B638
915913
//func_1000B8B8
916-
//func_1000BA18
917914
//func_1000BAFC
918915
//func_1000BCBC
919916
//func_1000BF60
@@ -1034,7 +1031,10 @@ struct21 *func_10020ABC(struct42 *arg0, struct119 *arg1, s32 arg2, s32 arg3, str
10341031
struct21 *func_10022040(struct42 *arg0, struct119 *arg1, s32 arg2, struct21 *arg3);
10351032

10361033
u16 *func_15001DE0(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5);
1034+
void func_1501748C(s16 arg0);
1035+
10371036
s32 func_1501A490(s32 arg0, s16 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5);
1037+
s32 func_1502B7F0(s32*, s32, s32, s32, s32);
10381038
struct126 *func_1503195C(struct127 *, s32, s32);
10391039
void func_150403C8(void *arg0, u32 arg1, s32 arg2);
10401040
void func_15043BB8(struct105* arg0);
@@ -1065,6 +1065,7 @@ s32 func_15081574(s32, f32, f32, s32, s32, s32);
10651065
void func_15083568(struct127*, s32, f32, s32);
10661066
s32 func_15083E0C(u8);
10671067
struct127 *func_15083E90(s32);
1068+
void func_15085710(s16, s32, s32);
10681069
s32 func_150859AC(s16 arg0, s32 arg1); // a guess
10691070
void func_1508B20C(f32, f32, f32, f32);
10701071
s32 func_150A29C8(u8, u16);

conker/include/structs.h

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,11 +1860,15 @@ typedef struct {
18601860
s32 unk28;
18611861
s32 unk2C;
18621862
s32 unk30; // used
1863-
u8 pad34[0x1A];
1863+
u8 pad34[0x4];
1864+
s32 unk38;
1865+
u8 unk3C[0x10];
1866+
u16 unk4C;
18641867
u16 unk4E;
18651868
u16 unk50;
1866-
u8 unk52[0x6];
1867-
s16 unk58;
1869+
u16 unk52;
1870+
u8 pad54[0x4];
1871+
u16 unk58;
18681872
s16 unk5A;
18691873
s16 unk5C;
18701874
u8 pad5E[0x2];
@@ -3223,4 +3227,34 @@ typedef struct {
32233227
s16 unkD16;
32243228
} struct257;
32253229

3230+
typedef struct {
3231+
s32 unk0;
3232+
u8 pad4[0x2];
3233+
s16 unk6;
3234+
s16 unk8;
3235+
s16 unkA;
3236+
u8 unkC;
3237+
} struct258;
3238+
3239+
typedef struct {
3240+
u8 unk0[0x74];
3241+
f32 unk74;
3242+
f32 unk78;
3243+
u8 unk7C[0xC];
3244+
f32 unk88;
3245+
f32 unk8C;
3246+
f32 unk90;
3247+
f32 unk94;
3248+
f32 unk98;
3249+
f32 unk9C;
3250+
f32 unkA0;
3251+
f32 unkA4;
3252+
f32 unkA8;
3253+
f32 unkAC;
3254+
f32 unkB0;
3255+
f32 unkB4;
3256+
u8 unkB8[0xc8];
3257+
3258+
} struct259; // size 0x180
3259+
32263260
#endif

conker/include/variables.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ extern u16 D_800860E4[];
402402
extern void (*D_80086150[])(s32);
403403
extern void (*D_80086730[])(void);
404404
extern s8 D_80087260;
405+
extern s8 D_80087264;
405406
extern s8 D_8008726C;
407+
extern s8 D_80087270[];
406408
extern u8 D_80087280[];
407409
extern u32 D_80087380;
408410

@@ -551,6 +553,8 @@ extern u32 D_8009667C;
551553
extern f32 D_800968B0;
552554
extern f32 D_800968C0;
553555
extern s32 D_800968E0;
556+
extern f32 D_80096900;
557+
extern f32 D_80096904;
554558

555559
extern f32 D_80098D90[];
556560
extern f32 D_80098DB0; // 0.008726646192371845
@@ -835,8 +839,7 @@ extern u8 D_800BE617;
835839
extern s8 D_800BE618;
836840
extern s32 D_800BE620;
837841
extern s32 D_800BE624;
838-
extern f32 D_800BE628[][16]; // contains structs size 0x180
839-
// extern s32 D_800BE628;
842+
extern s32 D_800BE628; //[]; // contains structs size 0x180
840843
extern s32 D_800BE62C;
841844
extern u8 D_800BE635;
842845
extern s32 D_800BE638;
@@ -1057,7 +1060,7 @@ extern s32 D_800D19A0;
10571060
extern struct124 *D_800D1C90[187]; // 748 bytes, 187 pointers? 17 structs?
10581061
extern s32 D_800D1F80[187]; // 187 bytes long
10591062
extern s32 D_800D2040[187]; // 187 bytes long
1060-
extern struct39 *D_800D20FC;
1063+
extern struct258 *D_800D20FC;
10611064

10621065
extern s32 *D_800D2104;
10631066
extern u8 D_800D2108[];
@@ -1066,6 +1069,7 @@ extern s32 D_800D2120;
10661069
extern s32 D_800D2124;
10671070
extern s32 D_800D2128;
10681071
extern struct187 *D_800D212C;
1072+
extern u16 D_800D2132;
10691073
extern s32 D_800D2138;
10701074

10711075
extern s16 D_800D2340;

0 commit comments

Comments
 (0)