Checkpoint

This commit is contained in:
Donkey Kong 2023-08-07 22:50:18 +09:30
parent d90c1795f1
commit 64d549ad1c
58 changed files with 4088 additions and 2560 deletions

View File

@ -145,7 +145,7 @@ OPT_FLAGS := -O2
MIPSBIT := -mips2
ASFLAGS := -EB -mtune=vr4300 -march=vr4300 -mabi=32 -I include
GCC_ASFLAGS := -c -x assembler-with-cpp -mabi=32 -ffreestanding -mtune=vr4300 -march=vr4300 -mfix4300 -G 0 -O -mno-shared -fno-PIC -mno-abicalls
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T undefined_syms.auto.txt -T undefined_funcs.auto.txt
LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T undefined_syms_auto.$(VERSION).txt -T undefined_funcs_auto.$(VERSION).txt
BINOFLAGS := -I binary -O elf32-tradbigmips
### Rules ###
@ -278,7 +278,7 @@ $(DECOMPRESSED_BASEROM): $(BASEROM)
# .o -> .elf (dummy symbols)
$(PRELIM_ELF): $(ALL_OBJS) $(LD_SCRIPT)
$(call print1,Linking elf:,$@)
@$(LD) $(LDFLAGS) -T undefined_syms_auto.$(VERSION).txt -T undefined_syms.$(VERSION).txt -o $@
@$(LD) $(LDFLAGS) -o $@
# .elf -> .z64 (dummy symbols)
$(PRELIM_Z64) : $(PRELIM_ELF)
@ -292,7 +292,7 @@ $(PRELIM_Z64) : $(PRELIM_ELF)
# .o -> .elf (game)
$(ELF): $(ALL_OBJS) $(LD_SCRIPT)
$(call print1,Linking elf:,$@)
@$(LD) $(LDFLAGS) -T undefined_syms_auto.$(VERSION).txt -T undefined_syms.$(VERSION).txt -o $@
@$(LD) $(LDFLAGS) -o $@
# .elf -> .z64 (uncompressed)
$(UNCOMPRESSED_Z64) : $(ELF)

View File

@ -5,6 +5,7 @@ options:
compiler: "IDO"
platform: n64
asm_end_label: "endlabel"
asm_data_macro: dlabel
generated_c_preamble: |
#include <ultra64.h>
#include "functions.h"
@ -37,6 +38,7 @@ segments:
type: code
start: 0x1050
vram: 0x80000450
bss_size: 0x5F10
dir: dk64_boot
subsegments:
- [0x1050, c, dk64_boot_1050]
@ -180,6 +182,7 @@ segments:
- [0x11160, bin, dk64_boot_data_11160]
#- [0x11170, .rodata, gu/position]
- [0x11180, bin, dk64_boot_data_11180]
- { start: 0x11320, type: bss, vram: 0x80010720 }
- name: assets
type: bin
start: 0x113F0
@ -426,116 +429,116 @@ segments:
subsegments:
- [0x21ACB30, c, code_0]
- [0x21BAD50, bin, data_E220]
- [0x21BAD58, rgba16, img/arcade_80032228.rgba16, 16, 16]
- [0x21BAF58, bin, data_E428]
- [0x21BB7D8, rgba16, img/arcade_80032CA8.rgba16, 8, 10]
- [0x21BB878, bin, data_ED48]
- [0x21BB880, rgba16, img/arcade_80032D50.rgba16, 8, 10]
- [0x21BB920, bin, data_EDF0]
- [0x21BB9B0, rgba16, img/arcade_80032E80.rgba16, 8, 9]
- [0x21BBA40, bin, data_EF10]
- [0x21BBA98, rgba16, img/arcade_80032F68.rgba16, 43, 19]
- [0x21BC0FA, bin, data_F5CA]
- [0x21BC108, rgba16, img/arcade_800335D8.rgba16, 43, 19]
- [0x21BC76A, bin, data_FC3A]
- [0x21BC778, rgba16, img/arcade_80033C48.rgba16, 43, 19]
- [0x21BCDDA, bin, data_102AA]
- [0x21BCDE8, rgba16, img/arcade_800342B8.rgba16, 8, 10]
- [0x21BCE88, bin, data_10358]
- [0x21BCE90, rgba16, img/arcade_80034360.rgba16, 16, 16]
- [0x21BD090, bin, data_10560]
- [0x21BD140, rgba16, img/arcade_80034610.rgba16, 16, 16]
- [0x21BD340, bin, data_10810]
- [0x21BD348, rgba16, img/arcade_80034818.rgba16, 16, 16]
- [0x21BD548, bin, data_10A18]
- [0x21BD550, rgba16, img/arcade_80034A20.rgba16, 16, 16]
- [0x21BD750, bin, data_10C20]
- [0x21BD758, rgba16, img/arcade_80034C28.rgba16, 16, 16]
- [0x21BD958, bin, data_10E28]
- [0x21BD960, rgba16, img/arcade_80034E30.rgba16, 16, 16]
- [0x21BDB60, bin, data_11030]
- [0x21BDB68, rgba16, img/arcade_80035038.rgba16, 16, 16]
- [0x21BDD68, bin, data_11238]
- [0x21BDD70, rgba16, img/arcade_80035240.rgba16, 16, 16]
- [0x21BDF70, bin, data_11440]
- [0x21BDF78, rgba16, img/arcade_80035448.rgba16, 16, 16]
- [0x21BE178, bin, data_11648]
- [0x21BE180, rgba16, img/arcade_80035650.rgba16, 16, 16]
- [0x21BE380, bin, data_11850]
- [0x21BE3C8, rgba16, img/arcade_80035898.rgba16, 16, 16]
- [0x21BE5C8, bin, data_11A98]
- [0x21BE610, rgba16, img/arcade_80035AE0.rgba16, 16, 16]
- [0x21BE810, bin, data_11CE0]
- [0x21BE818, rgba16, img/arcade_80035CE8.rgba16, 16, 16]
- [0x21BEA18, bin, data_11EE8]
- [0x21BFC60, rgba16, img/arcade_80037130.rgba16, 16, 16]
- [0x21BFE60, bin, data_13330]
- [0x21BFE68, rgba16, img/arcade_80037338.rgba16, 16, 17]
- [0x21C0088, bin, data_13558]
- [0x21C00B0, rgba16, img/arcade_80037580.rgba16, 16, 16]
- [0x21C02B0, bin, data_13780]
- [0x21C02B8, rgba16, img/arcade_80037788.rgba16, 16, 16]
- [0x21C04B8, bin, data_13988]
- [0x21C04C0, rgba16, img/arcade_80037990.rgba16, 16, 16]
- [0x21C06C0, bin, data_13B90]
- [0x21C06C8, rgba16, img/arcade_80037B98.rgba16, 16, 16]
- [0x21C08C8, bin, data_13D98]
- [0x21C08D0, rgba16, img/arcade_80037DA0.rgba16, 16, 16]
- [0x21C0AD0, bin, data_13FA0]
- [0x21C0AD8, rgba16, img/arcade_80037FA8.rgba16, 16, 16]
- [0x21C0CD8, bin, data_141A8]
- [0x21C0CE0, rgba16, img/arcade_800381B0.rgba16, 16, 16]
- [0x21C0EE0, bin, data_143B0]
- [0x21C0EE8, rgba16, img/arcade_800383B8.rgba16, 16, 16]
- [0x21C10E8, bin, data_145B8]
- [0x21C10F0, rgba16, img/arcade_800385C0.rgba16, 16, 16]
- [0x21C12F0, bin, data_147C0]
- [0x21C12F8, rgba16, img/arcade_800387C8.rgba16, 16, 16]
- [0x21C14F8, bin, data_149C8]
- [0x21C1500, rgba16, img/arcade_800389D0.rgba16, 16, 16]
- [0x21C1700, bin, data_14BD0]
- [0x21C1708, rgba16, img/arcade_80038BD8.rgba16, 16, 16]
- [0x21C1908, bin, data_14DD8]
- [0x21C1910, rgba16, img/arcade_80038DE0.rgba16, 16, 16]
- [0x21C1B10, bin, data_14FE0]
- [0x21C1B18, rgba16, img/arcade_80038FE8.rgba16, 16, 16]
- [0x21C1D18, bin, data_151E8]
- [0x21C1D20, rgba16, img/arcade_800391F0.rgba16, 16, 16]
- [0x21C1F20, bin, data_153F0]
- [0x21C1F28, rgba16, img/arcade_800393F8.rgba16, 16, 16]
- [0x21C2128, bin, data_155F8]
- [0x21C2170, rgba16, img/arcade_80039640.rgba16, 16, 16]
- [0x21C2370, bin, data_15840]
- [0x21C23B8, rgba16, img/arcade_80039888.rgba16, 16, 16]
- [0x21C25B8, bin, data_15A88]
- [0x21C2600, rgba16, img/arcade_80039AD0.rgba16, 16, 16]
- [0x21C2800, bin, data_15CD0]
- [0x21C3168, rgba16, img/arcade_8003A638.rgba16, 16, 16]
- [0x21C3368, bin, data_16838]
- [0x21C3370, rgba16, img/arcade_8003A840.rgba16, 16, 16]
- [0x21C3570, bin, data_16A40]
- [0x21C3578, rgba16, img/arcade_8003AA48.rgba16, 16, 16]
- [0x21C3778, bin, data_16C48]
- [0x21C3780, rgba16, img/arcade_8003AC50.rgba16, 16, 16]
- [0x21C3980, bin, data_16E50]
- [0x21C3988, rgba16, img/arcade_8003AE58.rgba16, 20, 20]
- [0x21C3CA8, bin, data_17178]
- [0x21C71B0, rgba16, img/arcade_8003E680.rgba16, 24, 10]
- [0x21C7390, bin, data_1A860]
- [0x21C7398, rgba16, img/arcade_8003E868.rgba16, 24, 10]
- [0x21C7578, bin, data_1AA48]
- [0x21C84E8, rgba16, img/arcade_8003F9B8.rgba16, 46, 32]
- [0x21C9068, bin, data_1C538]
- [0x21C9070, rgba16, img/arcade_80040540.rgba16, 48, 41]
- [0x21C9FD0, bin, data_1D4A0]
- [0x21CA038, rgba16, img/arcade_80041508.rgba16, 48, 41]
- [0x21CAF98, bin, data_1E468]
- [0x21CB000, rgba16, img/arcade_800424D0.rgba16, 48, 41]
- [0x21CBF60, bin, data_1F430]
- [0x21CCF90, rgba16, img/arcade_80044460.rgba16, 48, 41]
- [0x21CDEF0, bin, data_213C0]
- [0x21CDF58, rgba16, img/arcade_80045428.rgba16, 48, 41]
- [0x21CEEB8, bin, data_22338]
# - [0x21BAD58, rgba16, img/arcade_80032228.rgba16, 16, 16]
# - [0x21BAF58, bin, data_E428]
# - [0x21BB7D8, rgba16, img/arcade_80032CA8.rgba16, 8, 10]
# - [0x21BB878, bin, data_ED48]
# - [0x21BB880, rgba16, img/arcade_80032D50.rgba16, 8, 10]
# - [0x21BB920, bin, data_EDF0]
# - [0x21BB9B0, rgba16, img/arcade_80032E80.rgba16, 8, 9]
# - [0x21BBA40, bin, data_EF10]
# - [0x21BBA98, rgba16, img/arcade_80032F68.rgba16, 43, 19]
# - [0x21BC0FA, bin, data_F5CA]
# - [0x21BC108, rgba16, img/arcade_800335D8.rgba16, 43, 19]
# - [0x21BC76A, bin, data_FC3A]
# - [0x21BC778, rgba16, img/arcade_80033C48.rgba16, 43, 19]
# - [0x21BCDDA, bin, data_102AA]
# - [0x21BCDE8, rgba16, img/arcade_800342B8.rgba16, 8, 10]
# - [0x21BCE88, bin, data_10358]
# - [0x21BCE90, rgba16, img/arcade_80034360.rgba16, 16, 16]
# - [0x21BD090, bin, data_10560]
# - [0x21BD140, rgba16, img/arcade_80034610.rgba16, 16, 16]
# - [0x21BD340, bin, data_10810]
# - [0x21BD348, rgba16, img/arcade_80034818.rgba16, 16, 16]
# - [0x21BD548, bin, data_10A18]
# - [0x21BD550, rgba16, img/arcade_80034A20.rgba16, 16, 16]
# - [0x21BD750, bin, data_10C20]
# - [0x21BD758, rgba16, img/arcade_80034C28.rgba16, 16, 16]
# - [0x21BD958, bin, data_10E28]
# - [0x21BD960, rgba16, img/arcade_80034E30.rgba16, 16, 16]
# - [0x21BDB60, bin, data_11030]
# - [0x21BDB68, rgba16, img/arcade_80035038.rgba16, 16, 16]
# - [0x21BDD68, bin, data_11238]
# - [0x21BDD70, rgba16, img/arcade_80035240.rgba16, 16, 16]
# - [0x21BDF70, bin, data_11440]
# - [0x21BDF78, rgba16, img/arcade_80035448.rgba16, 16, 16]
# - [0x21BE178, bin, data_11648]
# - [0x21BE180, rgba16, img/arcade_80035650.rgba16, 16, 16]
# - [0x21BE380, bin, data_11850]
# - [0x21BE3C8, rgba16, img/arcade_80035898.rgba16, 16, 16]
# - [0x21BE5C8, bin, data_11A98]
# - [0x21BE610, rgba16, img/arcade_80035AE0.rgba16, 16, 16]
# - [0x21BE810, bin, data_11CE0]
# - [0x21BE818, rgba16, img/arcade_80035CE8.rgba16, 16, 16]
# - [0x21BEA18, bin, data_11EE8]
# - [0x21BFC60, rgba16, img/arcade_80037130.rgba16, 16, 16]
# - [0x21BFE60, bin, data_13330]
# - [0x21BFE68, rgba16, img/arcade_80037338.rgba16, 16, 17]
# - [0x21C0088, bin, data_13558]
# - [0x21C00B0, rgba16, img/arcade_80037580.rgba16, 16, 16]
# - [0x21C02B0, bin, data_13780]
# - [0x21C02B8, rgba16, img/arcade_80037788.rgba16, 16, 16]
# - [0x21C04B8, bin, data_13988]
# - [0x21C04C0, rgba16, img/arcade_80037990.rgba16, 16, 16]
# - [0x21C06C0, bin, data_13B90]
# - [0x21C06C8, rgba16, img/arcade_80037B98.rgba16, 16, 16]
# - [0x21C08C8, bin, data_13D98]
# - [0x21C08D0, rgba16, img/arcade_80037DA0.rgba16, 16, 16]
# - [0x21C0AD0, bin, data_13FA0]
# - [0x21C0AD8, rgba16, img/arcade_80037FA8.rgba16, 16, 16]
# - [0x21C0CD8, bin, data_141A8]
# - [0x21C0CE0, rgba16, img/arcade_800381B0.rgba16, 16, 16]
# - [0x21C0EE0, bin, data_143B0]
# - [0x21C0EE8, rgba16, img/arcade_800383B8.rgba16, 16, 16]
# - [0x21C10E8, bin, data_145B8]
# - [0x21C10F0, rgba16, img/arcade_800385C0.rgba16, 16, 16]
# - [0x21C12F0, bin, data_147C0]
# - [0x21C12F8, rgba16, img/arcade_800387C8.rgba16, 16, 16]
# - [0x21C14F8, bin, data_149C8]
# - [0x21C1500, rgba16, img/arcade_800389D0.rgba16, 16, 16]
# - [0x21C1700, bin, data_14BD0]
# - [0x21C1708, rgba16, img/arcade_80038BD8.rgba16, 16, 16]
# - [0x21C1908, bin, data_14DD8]
# - [0x21C1910, rgba16, img/arcade_80038DE0.rgba16, 16, 16]
# - [0x21C1B10, bin, data_14FE0]
# - [0x21C1B18, rgba16, img/arcade_80038FE8.rgba16, 16, 16]
# - [0x21C1D18, bin, data_151E8]
# - [0x21C1D20, rgba16, img/arcade_800391F0.rgba16, 16, 16]
# - [0x21C1F20, bin, data_153F0]
# - [0x21C1F28, rgba16, img/arcade_800393F8.rgba16, 16, 16]
# - [0x21C2128, bin, data_155F8]
# - [0x21C2170, rgba16, img/arcade_80039640.rgba16, 16, 16]
# - [0x21C2370, bin, data_15840]
# - [0x21C23B8, rgba16, img/arcade_80039888.rgba16, 16, 16]
# - [0x21C25B8, bin, data_15A88]
# - [0x21C2600, rgba16, img/arcade_80039AD0.rgba16, 16, 16]
# - [0x21C2800, bin, data_15CD0]
# - [0x21C3168, rgba16, img/arcade_8003A638.rgba16, 16, 16]
# - [0x21C3368, bin, data_16838]
# - [0x21C3370, rgba16, img/arcade_8003A840.rgba16, 16, 16]
# - [0x21C3570, bin, data_16A40]
# - [0x21C3578, rgba16, img/arcade_8003AA48.rgba16, 16, 16]
# - [0x21C3778, bin, data_16C48]
# - [0x21C3780, rgba16, img/arcade_8003AC50.rgba16, 16, 16]
# - [0x21C3980, bin, data_16E50]
# - [0x21C3988, rgba16, img/arcade_8003AE58.rgba16, 20, 20]
# - [0x21C3CA8, bin, data_17178]
# - [0x21C71B0, rgba16, img/arcade_8003E680.rgba16, 24, 10]
# - [0x21C7390, bin, data_1A860]
# - [0x21C7398, rgba16, img/arcade_8003E868.rgba16, 24, 10]
# - [0x21C7578, bin, data_1AA48]
# - [0x21C84E8, rgba16, img/arcade_8003F9B8.rgba16, 46, 32]
# - [0x21C9068, bin, data_1C538]
# - [0x21C9070, rgba16, img/arcade_80040540.rgba16, 48, 41]
# - [0x21C9FD0, bin, data_1D4A0]
# - [0x21CA038, rgba16, img/arcade_80041508.rgba16, 48, 41]
# - [0x21CAF98, bin, data_1E468]
# - [0x21CB000, rgba16, img/arcade_800424D0.rgba16, 48, 41]
# - [0x21CBF60, bin, data_1F430]
# - [0x21CCF90, rgba16, img/arcade_80044460.rgba16, 48, 41]
# - [0x21CDEF0, bin, data_213C0]
# - [0x21CDF58, rgba16, img/arcade_80045428.rgba16, 48, 41]
# - [0x21CEEB8, bin, data_22338]
- [0x21D36B0, .rodata, code_0]
- name: jetpac
dir: jetpac

View File

@ -90,7 +90,7 @@ standardSearchColumns = {
],
"rand": [
"rand",
"func_806119A0",
"func_global_asm_806119A0",
],
"malloc": [
"malloc",
@ -115,8 +115,8 @@ standardSearchColumns = {
"D_807F5FD4": [
"D_807F5FD4",
],
"func_8071498C": [
"func_8071498C",
"func_global_asm_8071498C": [
"func_global_asm_8071498C",
],
"pointerTable": [
"getPointerTableFile",

View File

@ -96,8 +96,8 @@ void arcade_pie_update(u8);
void func_80030FEC(void);
void func_800313B8(void);
void func_8060DEA8(void);
void func_80737638(void * arg0, enum sfx_e arg1, u32 arg2 , u32 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_global_asm_8060DEA8(void);
void func_global_asm_80737638(void * arg0, enum sfx_e arg1, u32 arg2 , u32 arg3, f32 arg4, u32 arg5, u32 arg6);
/* rom */
extern Gfx **D_1000040;

File diff suppressed because it is too large Load Diff

View File

@ -313,7 +313,7 @@ typedef struct actor_animation_state {
s16 unk12;
void *bone_array_1; // at 0x14, camera, update bone positions // TODO: Proper type
void *bone_array_2; // at 0x18, camera, update bone positions // TODO: Proper type
AnimationStateUnk1C *unk1C; // TODO: Used in func_80724CA4 and func_8068FF40, pretty easy match, array of 0x8 structs? // malloc(0x100) in func_80683158
AnimationStateUnk1C *unk1C; // TODO: Used in func_global_asm_80724CA4 and func_global_asm_8068FF40, pretty easy match, array of 0x8 structs? // malloc(0x100) in func_global_asm_80683158
AnimationStateUnk20 *unk20; // See boss func_8002FB7C
AnimationStateUnk24 *unk24;
s32 unk28;
@ -615,7 +615,7 @@ typedef struct another_additional_actor_data {
s32 unkC;
s16 unk10;
u8 unk12;
u8 unk13; // Used in func_806925AC
u8 unk13; // Used in func_global_asm_806925AC
} AnotherAdditionalActorData;
typedef struct {
@ -744,7 +744,7 @@ typedef struct menu_additional_actor_data {
typedef struct player_additional_actor_data {
union {
s32 unk0; // TODO: May be s16 (see func_806CF580), but changing that causes some matching functions to break
s32 unk0; // TODO: May be s16 (see func_global_asm_806CF580), but changing that causes some matching functions to break
s16 unk0_s16[2];
};
f32 unk4;
@ -978,14 +978,14 @@ typedef struct player_additional_actor_data {
u16 unk242; // Used
s8 unk244;
u8 unk245; // Used
s8 unk246; // Used func_806CA26C
s8 unk247; // Used func_806CA26C
s8 unk246; // Used func_global_asm_806CA26C
s8 unk247; // Used func_global_asm_806CA26C
s8 unk248;
s8 unk249;
s8 unk24A;
s8 unk24B; // Used
u16 unk24C; // Used // TODO: s16? func_806CA1B4 uses this as u16
u16 unk24E; // Used // TODO: s16? func_806CA1B4 uses this as u16
u16 unk24C; // Used // TODO: s16? func_global_asm_806CA1B4 uses this as u16
u16 unk24E; // Used // TODO: s16? func_global_asm_806CA1B4 uses this as u16
s32 unk250;
s32 unk254;
f32 unk258; // Used
@ -1120,7 +1120,7 @@ typedef struct global_asm_struct_60 GlobalASMStruct60;
struct global_asm_struct_60 {
s32 *unk0; // Used
GlobalASMStruct60 *unk4; // Used? Might be wrong datatype, see func_80688638
GlobalASMStruct60 *unk4; // Used? Might be wrong datatype, see func_global_asm_80688638
s16 unk8;
s16 unkA; // Used
s16 unkC; // Used - Texture index?
@ -1305,7 +1305,7 @@ struct actor {
u8 unk145;
union {
u16 unk146; // used (0x147 hand state? 0x146 seems to be u16)
s16 unk146_s16; // used func_8068A764
s16 unk146_s16; // used func_global_asm_8068A764
};
u32 unk148; // Used
u32 unk14C; // Used
@ -1771,7 +1771,7 @@ typedef struct object_model2 {
u8 unk6F;
GlobalASMStruct83 *unk70;
OM2_unk74 *unk74;
OM2_unk78 *unk78; // used in func_80650AD8, weird format
OM2_unk78 *unk78; // used in func_global_asm_80650AD8, weird format
OM2_unk7C *unk7C; // labelled behavior_pointer in ScriptHawk
s32 unk80;
s16 object_type; // at 0x84
@ -1895,7 +1895,7 @@ typedef struct {
s32 unk28;
} Struct8073BC74;
// func_80712944, func_8060AC34
// func_global_asm_80712944, func_global_asm_8060AC34
typedef struct global_asm_struct_12 {
u16 unk0;
s8 unk2;

View File

@ -138,7 +138,7 @@ typedef struct {
s32 frame_count;
} Struct80767A40;
extern Struct80767A40 D_80767A40; // TODO: Might be an array, see func_805FBC5C
extern Struct80767A40 D_80767A40; // TODO: Might be an array, see func_global_asm_805FBC5C
typedef struct {
Actor* unk0;
@ -171,7 +171,7 @@ typedef struct {
} GlobalASMStruct58_unk0;
struct global_asm_struct_58 {
GlobalASMStruct58_unk0 *unk0; // used, at least 0x65 big (func_80661264, func_8065F5F0), not sure what datatype though
GlobalASMStruct58_unk0 *unk0; // used, at least 0x65 big (func_global_asm_80661264, func_global_asm_8065F5F0), not sure what datatype though
f32 unk4; // used
f32 unk8; // used
f32 unkC; // used

View File

@ -1,10 +1,31 @@
#include <ultra64.h>
#include "functions.h"
typedef struct global_asm_struct_2 {
u32 unk0;
u32 unk4;
u32 unk8;
u32 unkC;
} GlobalASMStruct2;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137120/func_global_asm_80732420.s")
void func_global_asm_8073243C(void) {
void func_global_asm_80732420(GlobalASMStruct2 *arg0, u32 arg1, u32 arg2) {
arg0->unk0 = arg1;
arg0->unk8 = arg2;
arg0->unk4 = arg0->unk0;
arg0->unkC = 0;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137120/func_global_asm_80732444.s")
s32 func_global_asm_80732444(s32 arg0, s32 arg1, GlobalASMStruct2 *arg2, s32 arg3, s32 arg4) {
s32 sp4;
s32 sp0;
sp0 = 0;
sp4 = ((arg3 * arg4) + 0xF) & ~0xF;
if (!((arg2->unk4 + sp4) > (arg2->unk0 + arg2->unk8))) {
sp0 = arg2->unk4;
arg2->unk4 += sp4;
} else {
}
return sp0;
}

View File

@ -1,18 +1,151 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
s32 unk0;
s32 unk4;
} Struct807324D0_unk4;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_807324D0.s")
typedef struct {
s16 unk0;
s16 unk2;
Struct807324D0_unk4 unk4[4];
} Struct807324D0;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_80732534.s")
typedef struct {
s32 unk0;
s32 unk4;
u8 unk8;
u8 unk9;
s16 unkA;
s32 unkC;
s32 unk10;
} GlobalASMStruct69;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_80732618.s")
typedef struct {
s32 unk0;
s32 unk4;
GlobalASMStruct69 *unk8;
s16 unkC;
u8 unkE;
} Struct807327F4;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_80732730.s")
typedef struct {
s16 unk0;
u8 unk2;
u8 unk3;
s32 unk4;
s32 unk8;
s16 unkC;
s16 unkE;
s32 unk10[1]; // TODO: How many elements?
} Struct80732730;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_807327F4.s")
typedef struct {
s16 unk0;
u8 unk2;
u8 unk3;
s32 unk4;
s32 unk8;
s32 unkC[1]; // TODO: How many elements?
} Struct80732618;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1371D0/func_global_asm_80732894.s")
typedef struct {
s16 unk0;
s16 unk2;
s32 unk4[1]; // TODO: How many elements?
} Struct80732534;
void func_global_asm_80732924(void) {
void func_global_asm_80732730(Struct80732730 *arg0, s32 arg1, s32 arg2);
void func_global_asm_807327F4(Struct807327F4 *arg0, s32 arg1, s32 arg2);
void func_global_asm_80732894(GlobalASMStruct69 *arg0, s32 arg1, s32 arg2);
void func_global_asm_80732618(Struct80732618 *arg0, s32 arg1, s32 arg2);
void func_global_asm_807324D0(Struct807324D0 *arg0, s32 arg1) {
s32 sp4;
s32 sp0;
sp4 = arg1;
for (sp0 = 0; sp0 < arg0->unk2; sp0++) {
arg0->unk4[sp0].unk0 += sp4;
}
}
void func_global_asm_80732534(Struct80732534 *arg0, s32 arg1) {
s32 sp24;
s32 sp20;
s32 sp1C;
sp24 = arg0;
sp20 = arg1;
if (arg0->unk0 != 0x4231) {
return;
}
for (sp1C = 0; sp1C < arg0->unk2; sp1C++) {
arg0->unk4[sp1C] += sp24;
if (arg0->unk4[sp1C] != 0) {
func_global_asm_80732618(arg0->unk4[sp1C], sp24, sp20);
}
}
}
void func_global_asm_80732618(Struct80732618 *arg0, s32 arg1, s32 arg2) {
s32 i;
if (arg0->unk2 != 0) {
return;
}
arg0->unk2 = 1;
if (arg0->unk8 != 0) {
arg0->unk8 += arg1;
func_global_asm_80732730(arg0->unk8, arg1, arg2);
}
for (i = 0; i < arg0->unk0; i++) {
arg0->unkC[i] += arg1;
if (arg0->unkC[i] != 0) {
func_global_asm_80732730(arg0->unkC[i], arg1, arg2);
}
}
}
void func_global_asm_80732730(Struct80732730 *arg0, s32 arg1, s32 arg2) {
s32 i;
if (arg0->unk3 != 0) {
return;
}
arg0->unk3 = 1;
for (i = 0; i < arg0->unkE; i++) {
arg0->unk10[i] += arg1;
func_global_asm_807327F4(arg0->unk10[i], arg1, arg2);
}
}
void func_global_asm_807327F4(Struct807327F4 *arg0, s32 arg1, s32 arg2) {
if (arg0->unkE != 0) {
return;
}
arg0->unkE = 1;
arg0->unk0 = arg0->unk0 + arg1;
arg0->unk4 = arg0->unk4 + arg1;
arg0->unk8 = (s32)arg0->unk8 + arg1;
func_global_asm_80732894(arg0->unk8, arg1, arg2);
}
void func_global_asm_80732894(GlobalASMStruct69 *arg0, s32 arg1, s32 arg2) {
if (arg0->unk9 != 0) {
return;
}
arg0->unk9 = 1;
arg0->unk0 += arg2;
if (arg0->unk8 == 0) {
arg0->unk10 += arg1;
if (arg0->unkC != 0) {
arg0->unkC += arg1;
}
} else if (arg0->unk8 == 1) {
if (arg0->unkC != 0) {
arg0->unkC += arg1;
}
}
}

View File

@ -4,12 +4,164 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_80732930.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_807329AC.s")
extern f32 D_80760190;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_80732B3C.s")
/*
// No idea why this doesn't match, something to do with the shift
f32 func_global_asm_80732930(u8 arg0) {
f32 sp4;
f32 sp0;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_80732D80.s")
sp4 = D_80760190;
sp0 = 1.0f;
while (arg0) {
if (arg0 & 1) {
sp0 *= sp4;
}
sp4 *= sp4;
arg0 >>= 1;
}
return sp0;
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_80732DAC.s")
typedef struct {
s32 unk0;
u8 unk4;
s8 unk5;
s8 unk6;
s8 unk7;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s16 unk20;
u16 unk22;
u16 unk24;
s16 unk26;
union {
u8 unk28[4];
f32 unk28_f32;
};
} Struct80732B3C;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137630/func_global_asm_80732DEC.s")
f32 func_global_asm_80732930(u8);
extern Struct80732B3C *D_807FF030;
f32 func_global_asm_80739FE0(s32);
extern f32 D_80760194;
extern f32 D_80760198;
s32 func_global_asm_807329AC(Struct80732B3C **arg0, f32 *arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5) {
Struct80732B3C *sp2C;
s32 sp28;
sp28 = 0;
if (arg5 == 0) {
return 0;
}
if (D_807FF030 != NULL) {
sp2C = D_807FF030;
D_807FF030 = D_807FF030->unk0;
sp2C->unk4 = arg2;
*arg0 = sp2C;
sp28 = arg5 << 0xE;
switch (arg2) {
case 0x1:
sp2C->unk24 = 0;
sp2C->unk22 = 0x103 - arg3;
sp2C->unk28[0] = arg4 >> 1;
sp2C->unk28[1] = 0x7F - sp2C->unk28[0];
*arg1 = sp2C->unk28[1];
break;
case 0x80:
sp2C->unk28_f32 = func_global_asm_80732930(arg4);
sp2C->unk24 = 0;
sp2C->unk22 = 0x103 - arg3;
*arg1 = 1.0f;
break;
default:
break;
}
}
return sp28;
}
s32 func_global_asm_80732B3C(Struct80732B3C *arg0, f32 *arg1) {
f32 sp2C;
Struct80732B3C *sp28;
s32 sp24;
sp28 = arg0;
sp24 = 0x3E80;
switch (sp28->unk4) {
case 0x1:
sp28->unk24++;
if (sp28->unk24 >= sp28->unk22) {
sp28->unk24 = 0;
}
sp2C = (f32)sp28->unk24 / sp28->unk22;
sp2C = func_global_asm_80612D1C(sp2C * D_80760194);
sp2C = sp2C * sp28->unk28[0];
*arg1 = sp28->unk28[1] + sp2C;
break;
case 0x80:
sp28->unk24++;
if (sp28->unk24 >= sp28->unk22) {
sp28->unk24 = 0;
}
sp2C = (f32)sp28->unk24 / sp28->unk22;
sp2C = func_global_asm_80612D1C(sp2C * D_80760198) * sp28->unk28_f32;
*arg1 = func_global_asm_80739FE0(sp2C);
break;
default:
break;
}
return sp24;
}
void func_global_asm_80732D80(s32 *arg0) {
s32 *sp4;
sp4 = arg0;
*arg0 = D_807FF030;
D_807FF030 = arg0;
}
extern f32 D_8076019C;
f32 func_global_asm_80732DAC(f32 arg0) {
return func_global_asm_80612D1C(arg0 / D_8076019C);
}
extern Struct80732B3C *D_807FF034;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
} Struct80732DEC;
void func_global_asm_80732DEC(Struct80732DEC *arg0, s32 arg1) {
Struct80732B3C *sp24;
s32 i;
D_807FF034 = func_global_asm_80732444(0, 0, arg0->unkC, arg1, 0x2C);
D_807FF030 = D_807FF034;
D_807FF030 = D_807FF034;
sp24 = D_807FF034;
for (i = 0; i < (arg1 - 1); i++) {
sp24->unk0 = &D_807FF034[i + 1];
sp24 = sp24->unk0;
}
sp24->unk0 = NULL;
arg0->unk10 = &func_global_asm_807329AC;
arg0->unk14 = &func_global_asm_80732B3C;
arg0->unk18 = &func_global_asm_80732D80;
}

View File

@ -12,17 +12,79 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80733C34.s")
// jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80733D8C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80735624.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80735864.s")
// regalloc
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80735958.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_807359A0.s")
typedef struct {
s32 unk0;
s32 unk4;
f32 unk8;
} Struct80735958_unk18;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_137C10/func_global_asm_80735A34.s")
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
Struct80735958_unk18* unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
} Struct80735958;
void func_global_asm_80735A44(void) {
/*
void func_global_asm_80735958(Struct80735958 *arg0, f32 arg1) {
if (arg0->unk18 != NULL) {
arg0->unk24 = arg1 * arg0->unk18->unk8;
} else {
arg0->unk24 = 0x1E8;
}
}
*/
typedef struct {
u8 unk0[0x18 - 0x0];
s32 unk18;
u8 unk1C[0x24 - 0x1C];
s32 unk24;
s32 unk28;
s32 unk2C;
u8 unk30[0x48 - 0x30];
s32 unk48;
} Struct807359A0;
void func_global_asm_807359A0(Struct807359A0 *arg0) {
s32 pad[3];
s16 pad2;
s16 sp20;
s32 sp1C;
if (!(arg0->unk2C == 1) || !arg0->unk18) {
return;
}
if (!func_global_asm_8073D060(arg0->unk18, &sp1C)) {
return;
}
sp20 = 0;
alEvtqPostEvent(&arg0->unk48, &sp20, arg0->unk24 * sp1C);
}
typedef struct {
u8 unk0[0x88 - 0x0];
u8 unk88;
} Struct80735A34;
void func_global_asm_80735A34(Struct80735A34 *arg0, u8 arg1) {
arg0->unk88 = arg1;
}

View File

@ -1,5 +1,13 @@
#include <ultra64.h>
#include "functions.h"
void func_global_asm_80735A50(ALSeqPlayer *arg0, s32 arg1) {
s32 pad[2];
s32 sp1C;
s16 sp1A;
s16 sp18; // TODO: ALEvent
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A750/func_global_asm_80735A50.s")
sp18 = 0xE;
sp1C = arg1;
alEvtqPostEvent(&arg0->evtq, &sp18, 0);
}

View File

@ -1,16 +1,141 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
u8 unk0[0x14];
s32 unk14; // ALEventQueue
u8 unk18[0x28-0x18];
s16 unk28;
u8 unk2A[0x48-0x2A];
s32 unk48;
s32 unk4C;
s32 unk50;
} struct_80735CF4; // Probably something in the audio library.
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
} Struct807563CC;
extern Struct807563CC *D_807563CC;
typedef struct {
u8 unk0[0xC];
void* unkC;
u8 unk10[0x43-0x10];
u8 unk43;
} struct_80736FB8;
// All of these structs are probably from the audio library
typedef struct {
u8 unk0[0x5];
s8 unk5;
} struct_80737028_2;
typedef struct {
u8 unk0[4];
struct_80737028_2* unk4;
} struct_80737028_1;
typedef struct {
u8 unk0[0x8];
struct_80737028_1* unk8;
u8 unkC[0x2C-0xC];
f32 unk2C;
} struct_80737028_0;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
s32 unk28;
s32 unk2C;
s32 unk30;
s32 unk34;
s32 unk38;
s32 unk3C;
s8 unk40;
s8 unk41;
s8 unk42;
s8 unk43;
s8 unk44;
} Struct_807375E0;
typedef struct Struct80737990 Struct80737990;
struct Struct80737990 {
Struct80737990 *next;
u8 unk4[0x43 - 0x4];
u8 unk43;
};
extern Struct80737990 *D_807563C0;
extern u16 *D_807FF0E4;
void func_global_asm_80735DBC(ALEvent *);
void func_global_asm_807370A4(s32, void *, s32);
void func_global_asm_8073749C(void *);
void func_global_asm_8073B6B0(void *);
void func_global_asm_8073B750(void *);
f32 func_global_asm_80739FE0(s8);
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80735AA0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80735CF4.s")
s32 func_global_asm_80735CF4(struct_80735CF4 *arg0) {
struct_80735CF4 *sp2C;
ALEvent sp1C;
sp2C = arg0;
do {
if (sp2C->unk28 == 0x20) {
if (FALSE);
sp1C.type = 0x20;
alEvtqPostEvent(&sp2C->unk14, &sp1C, sp2C->unk48);
} else {
func_global_asm_80735DBC(&sp2C->unk28);
if (FALSE);
}
sp2C->unk4C = alEvtqNextEvent(&sp2C->unk14, &sp2C->unk28);
} while (sp2C->unk4C == 0);
sp2C->unk50 += sp2C->unk4C;
return sp2C->unk4C;
}
// jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80735DBC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80736FB8.s")
void func_global_asm_80736FB8(struct_80736FB8 *arg0) {
if (arg0->unk43 & 4) {
func_global_asm_8073B6B0(&arg0->unkC);
func_global_asm_8073B750(&arg0->unkC);
}
func_global_asm_8073749C(arg0);
func_global_asm_807370A4(&D_807563CC->unk14, arg0, 0xFFFF);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737028.s")
void func_global_asm_80737028(struct_80737028_0 *arg0) {
// TODO: Confirm AL Stuff
ALEvent sp20;
f32 sp1C;
sp1C = func_global_asm_80739FE0(arg0->unk8->unk4->unk5) * arg0->unk2C;
sp20.type = 0x10;
sp20.msg.vol.voice = (void*)arg0;
sp20.msg.vol.delta = *(s32*)(&sp1C);
alEvtqPostEvent(&D_807563CC->unk14, &sp20, 0x8235);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_807370A4.s")
@ -20,36 +145,84 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_8073749C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_807375E0.s")
void func_global_asm_80737600(void) {
void func_global_asm_807375E0(Struct_807375E0 *arg0, u8 arg1) {
if (arg0 != 0) {
arg0->unk40 = (s16)arg1;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737608.s")
void func_global_asm_80737630(void) {
u8 func_global_asm_80737608(Struct_807375E0 *arg0) {
if (arg0 != NULL) {
return arg0->unk44;
} else {
return 0;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737638.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737924.s")
void func_global_asm_80737924(Struct80737990 *arg0) {
s32 pad2[2];
Struct80737990 *sp1C;
s16 pad;
s16 sp18; // TODO: ALEvent
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737990.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737A4C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737A74.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737A9C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737AC4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737B2C.s")
void func_global_asm_80737B48(void) {
sp18 = 0x400;
sp1C = arg0;
if (arg0 != NULL) {
sp1C->unk43 &= ~0x10;
alEvtqPostEvent(&D_807563CC->unk14, &sp18, 0);
}
}
void func_global_asm_80737B50(void) {
void func_global_asm_80737990(u8 arg0) {
u32 sp2C;
s32 pad[2];
Struct80737990 *sp20;
s16 sp1E;
s16 sp1C; // TODO: ALEvent
Struct80737990 *sp18;
sp2C = osSetIntMask(OS_IM_NONE);
sp18 = D_807563C0;
while (sp18 != NULL) {
sp1C = 0x400;
sp20 = sp18;
if ((sp18->unk43 & arg0) == arg0) {
sp20->unk43 &= ~0x10;
alEvtqPostEvent(&D_807563CC->unk14, &sp1C, 0);
}
sp18 = sp18->next;
}
osSetIntMask(sp2C);
}
void func_global_asm_80737A4C(void) {
func_global_asm_80737990(1);
}
void func_global_asm_80737A74(void) {
func_global_asm_80737990(0x11);
}
void func_global_asm_80737A9C(void) {
func_global_asm_80737990(3);
}
void func_global_asm_80737AC4(s32 arg0, s16 arg1, s32 arg2) {
ALEvent sp18;
// TODO: Is this right?
sp18.type = arg1;
sp18.msg.loop.start = arg0;
sp18.msg.loop.end = arg2;
if (arg0 != 0) {
alEvtqPostEvent(&D_807563CC->unk14, &sp18, 0);
}
}
u16 func_global_asm_80737B2C(u8 arg0) {
return D_807FF0E4[arg0];
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13A7A0/func_global_asm_80737B58.s")

View File

@ -1,7 +1,65 @@
#include <ultra64.h>
#include "functions.h"
extern u8 D_807FF0F0;
extern u8 D_807FF0F1;
extern s8 D_807FF0F2;
extern u8 D_807FF0F4[];
extern u8 D_807FF0F6[];
extern u8 D_807FF0F8[];
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13C920/func_global_asm_80737C20.s")
void func_global_asm_80737CF4(s32 arg0, s32 arg1);
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13C920/func_global_asm_80737CF4.s")
void func_global_asm_80737C20(s32 arg0) {
s32 sp24;
D_807FF0F0 = 0;
D_807FF0F1 = 0;
D_807FF0F2 = 0;
switch ((u8)arg0) {
case 1:
D_807FF0F1 = 1;
break;
case 3:
D_807FF0F2 = 1;
break;
case 4:
D_807FF0F0 = 1;
break;
}
for (sp24 = 0; sp24 < 2; sp24++) {
func_global_asm_80737CF4(sp24, 0);
}
}
void func_global_asm_80737CF4(s32 arg0, s32 arg1) {
if (arg1 == 0) {
arg1 = D_807FF0F8[arg0];
}
D_807FF0F4[arg0] = 0;
D_807FF0F6[arg0] = 0;
switch (arg1) {
case 2:
if (D_807FF0F0 != 0) {
D_807FF0F6[arg0] = 1;
}
break;
case 3:
if (D_807FF0F0 != 0) {
D_807FF0F4[arg0] = 1;
}
break;
case 4:
if (D_807FF0F1 == 0) {
D_807FF0F4[arg0] = 1;
}
break;
case 5:
if (D_807FF0F1 == 0) {
D_807FF0F4[arg0] = 1;
D_807FF0F6[arg0] = 1;
}
break;
}
D_807FF0F8[arg0] = arg1;
}

View File

@ -1,11 +1,6 @@
#include <ultra64.h>
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB30/func_global_asm_80737E30.s")
void func_global_asm_80737E38(void) {
}
void func_global_asm_80737E40(void) {
s32 func_global_asm_80737E30(ALSeqPlayer *arg0) {
return arg0->state;
}

View File

@ -1,29 +1,130 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
u8 unk0[0x84 - 0x0];
s32 unk84;
} Struct80737E90;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737E50.s")
typedef struct {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
} Struct80737EA4_unk20_unkC;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737E90.s")
// TODO: WTF?
typedef struct {
union {
s16 unk0[2];
Struct80737EA4_unk20_unkC *unkC;
};
} Struct80737EA4_unk20;
void func_global_asm_80737E9C(void) {
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
Struct80737EA4_unk20 *unk20;
} Struct80737EA4;
typedef struct {
u8 unk0[0xD - 0x0];
u8 unkD;
u8 unkE;
u8 unkF;
u8 unk10;
u8 unk11[0x34 - 0x11];
} Struct80737F0C_unk60;
typedef struct {
u8 unk0[0x30 - 0x0];
u16 unk30;
u16 unk32;
u8 unk34;
u8 unk38[0x60 - 0x35];
Struct80737F0C_unk60 *unk60;
} Struct80737F0C;
void func_global_asm_80737E50(ALSeqPlayer* arg0) {
ALEvent sp18;
sp18.type = AL_SEQP_PLAY_EVT;
alEvtqPostEvent(&arg0->evtq, &sp18, 0);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737EA4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737F0C.s")
void func_global_asm_80737F38(void) {
void func_global_asm_80737E90(Struct80737E90 *arg0, s32 arg1) {
arg0->unk84 = arg1;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737F40.s")
void func_global_asm_80737EA4(Struct80737EA4 *arg0, u8 arg1, u8 arg2) {
Struct80737EA4_unk20_unkC *sp4;
if (arg1 < arg0->unk20[0].unk0[0]) { // TODO: Wtf?
sp4 = arg0->unk20[arg1 + 3].unkC; // TODO: Wtf?
if (sp4 != NULL) {
sp4->unk3 = (arg2 * 2) | (sp4->unk3 & 1);
}
}
}
void func_global_asm_80737F0C(Struct80737F0C *arg0, s32 arg1, u8 arg2) {
arg0->unk60[arg1].unk10 = arg2;
}
void func_global_asm_80737F40(Struct80737F0C *arg0) {
s32 i;
arg0->unk30 = 0xFFFF;
for (i = 0; i < arg0->unk34; i++) {
arg0->unk60[i].unkE = 0xFF;
arg0->unk60[i].unkD = 0xFF;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80737FD8.s")
/*
void func_global_asm_80737FD8(ALSeqPlayer *arg0, s32 arg1) {
func_global_asm_807382A0(arg0, 0, arg1 | 0xB0, 0xFF, 0);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_8073801C.s")
/*
void func_global_asm_8073801C(ALSeqPlayer *arg0, s32 arg1) {
arg0->chanMask |= 1 << arg1;
func_global_asm_807382A0(arg0, 0, arg1 | 0xB0, 0xFF, 0xFF);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80738080.s")
/*
void func_global_asm_80738080(ALSeqPlayer *arg0, s32 arg1, u8 arg2) {
func_global_asm_807382A0(arg0, 0, arg1 | 0xB0, 0xFF, arg2);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_807380CC.s")
/*
void func_global_asm_807380CC(ALSeqPlayer *arg0, s32 arg1, u8 arg2) {
func_global_asm_807382A0(arg0, 0, arg1 | 0xB0, 0x41, arg2);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CB50/func_global_asm_80738118.s")
/*
void func_global_asm_80738118(ALSeqPlayer *arg0, s32 arg1, u8 arg2) {
func_global_asm_807382A0(arg0, 0, arg1 | 0xB0, 0xFC, arg2);
}
*/

View File

@ -1,9 +1,33 @@
#include <ultra64.h>
#include "functions.h"
void func_global_asm_80738170(ALSeqPlayer *seqp, u8 arg1, u8 arg2) {
ALEvent sp18;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CE70/func_global_asm_80738170.s")
sp18.type = AL_SEQP_MIDI_EVT;
sp18.msg.midi.ticks = 0;
sp18.msg.midi.status = arg1 | 0xB0;
sp18.msg.midi.byte1 = 0x5B;
sp18.msg.midi.byte2 = arg2;
alEvtqPostEvent(&seqp->evtq, &sp18, 0);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CE70/func_global_asm_807381D8.s")
void func_global_asm_807381D8(ALSeqPlayer *seqp, f32 arg1, f32 arg2) {
ALEvent sp18;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CE70/func_global_asm_80738230.s")
sp18.type = 0x18;
sp18.msg.evt18.unk00 = arg1;
sp18.msg.evt18.unk04 = arg2;
alEvtqPostEvent(&seqp->evtq, &sp18, 0);
}
void func_global_asm_80738230(ALSeqPlayer *seqp, u8 arg1, u8 arg2) {
ALEvent sp18;
sp18.type = AL_SEQP_MIDI_EVT;
sp18.msg.midi.ticks = 0;
sp18.msg.midi.status = arg1 | 0xB0;
sp18.msg.midi.byte1 = 0x5C;
sp18.msg.midi.byte2 = arg2;
alEvtqPostEvent(&seqp->evtq, &sp18, 0);
}

View File

@ -1,5 +1,23 @@
#include <ultra64.h>
#include "functions.h"
void func_global_asm_807382A0(ALSeqPlayer *arg0, s32 arg1, u8 arg2, u8 arg3, u8 arg4) {
s32 sp2C;
u8 sp2B;
u8 sp2A;
u8 sp29;
u8 sp28;
s32 sp24;
s16 sp22;
s16 sp20; // TODO: ALEvent
s32 sp1C;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13CFA0/func_global_asm_807382A0.s")
sp20 = 2;
sp24 = 0;
sp28 = arg2;
sp29 = arg3;
sp2A = arg4;
sp2C = 0;
sp1C = arg1;
alEvtqPostEvent(&arg0->evtq, &sp20, sp1C);
}

View File

@ -1,5 +1,19 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
u8 unk0[0x48 - 0x0];
ALEventQueue unk48;
} Struct80738320;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D020/func_global_asm_80738320.s")
void func_global_asm_80738320(Struct80738320 *arg0, s32 arg1) {
ALEvent sp18;
sp18.type = 7;
sp18.msg.evt7.unk04 = 0xFF;
sp18.msg.evt7.unk05 = 0x51;
sp18.msg.evt7.unk07 = (arg1 & 0xFF0000) >> 0x10;
sp18.msg.evt7.unk08 = (arg1 & 0xFF00) >> 8;
sp18.msg.evt7.unk09 = arg1 & 0xFF;
alEvtqPostEvent(&arg0->unk48, &sp18, 0);
}

View File

@ -1,11 +1,10 @@
#include <ultra64.h>
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D0B0/func_global_asm_807383B0.s")
void func_global_asm_807383EC(void) {
}
void func_global_asm_807383F4(void) {
s32 func_global_asm_807383B0(ALSeqPlayer *arg0) {
if (!arg0->target) {
return 0;
}
// TODO: Oof, I think our audio headers may be the wrong version...
return arg0->uspt / ((f32*)arg0->target)[2];
}

View File

@ -1,5 +1,13 @@
#include <ultra64.h>
#include "functions.h"
void func_global_asm_80738400(ALSeqPlayer *arg0, u8 arg1, u8 arg2, u8 arg3, s32 arg4) {
ALEvent sp18;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D100/func_global_asm_80738400.s")
sp18.type = 0x19;
sp18.msg.evt19.unk00 = arg1;
sp18.msg.evt19.unk01 = arg2;
sp18.msg.evt19.unk02 = arg3;
sp18.msg.evt19.param = arg4;
alEvtqPostEvent(&arg0->evtq, &sp18, 0);
}

View File

@ -2,18 +2,15 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_80738470.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_807385F0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_8073876C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_80738BA0.s")
void func_global_asm_80738BA8(void) {
}
void func_global_asm_80738BB0(void) {
s32 func_global_asm_80738BA0(s32 *arg0) {
return arg0[3];
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_80738BB8.s")
@ -27,3 +24,4 @@ void func_global_asm_80738BB0(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_80739098.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13D170/func_global_asm_8073928C.s")

View File

@ -1,6 +1,123 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
s32 unk0;
s16 unk4;
u8 unk6;
u8 unk7;
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
u8 unkC;
u8 unkD;
u8 unkE;
u8 unkF;
u8 unk10;
u8 unk11;
u8 unk12;
u8 unk13;
f32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s8 unk24;
s8 unk25;
s8 unk26;
s8 unk27;
s8 unk28;
s8 unk29;
s8 unk2A;
s8 unk2B;
s8 unk2C;
s8 unk2D;
s8 unk2E;
s8 unk2F;
s8 unk30;
s8 unk31;
s8 unk32;
s8 unk33;
} Struct8073AB00_unk60;
typedef struct {
u8 unk0[0x30 - 0x0];
u8 unk30;
u8 unk31;
s16 unk32;
u8 unk34;
u8 unk35[0x60 - 0x35];
Struct8073AB00_unk60 *unk60;
u8 unk64[0x7C - 0x64];
f32 unk7C;
f32 unk80;
} Struct8073AB00;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
u8 unkC;
u8 unkD;
} Struct8073AD50_arg1_unk10_unk0;
typedef struct {
Struct8073AD50_arg1_unk10_unk0 *unk0;
} Struct8073AD50_arg1_unk10;
typedef struct {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
u8 unk4;
u8 unk5;
u8 unk6;
u8 unk7;
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
s16 unkC;
s16 unkE;
Struct8073AD50_arg1_unk10 *unk10;
} Struct8073AD50_arg1;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
Struct8073AD50_arg1 *unkC[1]; // TODO: How many elements
} Struct8073A98C_arg1;
void func_global_asm_8073AB00(Struct8073AB00 *arg0, s32 arg1);
void func_global_asm_8073AD50(Struct8073AB00 *arg0, Struct8073AD50_arg1 *arg1, s32 arg2);
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
u8 unkC;
u8 unkD;
} Struct8073A900_arg0_unk20;
typedef struct {
u8 unk0[0x20 - 0x0];
Struct8073A900_arg0_unk20 *unk20;
u8 unk24[0x30 - 0x24];
u8 unk30;
u8 unk31;
u8 unk32;
u8 unk33;
u8 unk34;
u8 unk35;
u8 unk36;
} Struct8073A900_arg0;
typedef struct {
u8 unk0[0x24 - 0x0];
s32 unk24;
} Struct8073A8BC;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_80739FE0.s")
@ -16,23 +133,137 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A518.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A690.s")
s16 func_global_asm_8073A690(Struct8073A900_arg0 *arg0, Struct8073AB00 *arg1) {
u32 sp4;
u32 sp0;
sp4 = (arg0->unk36 * arg0->unk33 * arg0->unk30) >> 6;
sp0 = (arg1->unk60[arg0->unk31].unk9 * (arg0->unk20->unkD * arg1->unk32)) >> 0xE;
if (arg1->unk60[arg0->unk31].unkD != 0xFF) {
sp0 = ((arg1->unk60[arg0->unk31].unkD * sp0) + 1) >> 8;
}
sp4 *= sp0;
sp4 = sp4 >> 0xF;
return sp4;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A7B8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A8BC.s")
/*
// TODO: Extremely close
u8 func_global_asm_8073A7B8(Struct8073A900_arg0 *arg0, Struct8073AB00 *arg1) {
s32 sp14;
s32 sp10;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A900.s")
sp14 = arg1->unk60[arg0->unk31].unkA & 0x80;
sp10 = ((arg1->unk60[arg0->unk31].unkA & 0x7F) + (s32)(arg1->unk7C * 127.0f)) * arg1->unk80;
return (MAX(0, MIN(0x7F, sp10)) | sp14);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073A98C.s")
s32 func_global_asm_8073A8BC(Struct8073A8BC *arg0, s32 arg1) {
s32 sp4;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073AA74.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073AB00.s")
void func_global_asm_8073AD48(void) {
sp4 = arg0->unk24 - arg1;
if (sp4 >= 0) {
return sp4;
} else {
return 1000;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073AD50.s")
u8 func_global_asm_8073A900(Struct8073A900_arg0 *arg0, Struct8073AB00 *arg1) {
s32 sp4;
sp4 = (arg1->unk60[arg0->unk31].unk7 + arg0->unk20->unkC) - 0x40;
if (sp4 > 0) {
} else {
sp4 = 0;
}
if (sp4 < 0x7F) {
} else {
sp4 = 0x7F;
}
return sp4;
}
void func_global_asm_8073A98C(Struct8073AB00 *arg0, Struct8073A98C_arg1 *arg1) {
s32 i;
Struct8073AD50_arg1 *sp18;
sp18 = NULL;
for (i = 0; sp18 == NULL; i++) {
sp18 = arg1->unkC[i];
}
for (i = 0; i < arg0->unk34; i++) {
func_global_asm_8073AB00(arg0, i);
func_global_asm_8073AD50(arg0, sp18, i);
}
if (arg1->unk8 != 0) {
func_global_asm_8073AB00(arg0, i);
func_global_asm_8073AD50(arg0, arg1->unk8, 9);
}
}
void func_global_asm_8073AA74(Struct8073AB00 *arg0) {
s32 i;
for (i = 0; i < arg0->unk34; i++) {
arg0->unk60[i].unk0 = 0;
func_global_asm_8073AB00(arg0, i);
}
}
void func_global_asm_8073AB00(Struct8073AB00 *arg0, s32 arg1) {
arg0->unk60[arg1].unk6 = 0;
arg0->unk60[arg1].unkA = 0;
arg0->unk60[arg1].unk7 = 0x40;
arg0->unk60[arg1].unk9 = 0x7F;
arg0->unk60[arg1].unk8 = 5;
arg0->unk60[arg1].unkC = 0;
arg0->unk60[arg1].unk4 = 0xC8;
arg0->unk60[arg1].unk14 = 1.0f;
arg0->unk60[arg1].unk10 = 0;
arg0->unk60[arg1].unkD = 0xFF;
arg0->unk60[arg1].unkE = 0xFF;
arg0->unk60[arg1].unkF = 0;
arg0->unk60[arg1].unkB = 0;
arg0->unk60[arg1].unk13 = 0;
arg0->unk60[arg1].unk12 = 0;
arg0->unk60[arg1].unk11 = 0;
arg0->unk60[arg1].unk32 = 0;
}
void func_global_asm_8073AD50(Struct8073AB00 *arg0, Struct8073AD50_arg1 *arg1, s32 arg2) {
Struct8073AD50_arg1_unk10 *temp;
arg0->unk60[arg2].unk0 = arg1;
arg0->unk60[arg2].unk7 = arg1->unk1;
arg0->unk60[arg2].unk9 = arg1->unk0;
arg0->unk60[arg2].unk8 = arg1->unk2;
arg0->unk60[arg2].unk4 = arg1->unkC;
if (arg1->unkE == 0) {
return;
}
temp = arg1->unk10;
arg0->unk60[arg2].unk18 = temp->unk0->unk0;
arg0->unk60[arg2].unk1C = temp->unk0->unk4;
arg0->unk60[arg2].unk20 = temp->unk0->unk8;
arg0->unk60[arg2].unk25 = temp->unk0->unkC;
arg0->unk60[arg2].unk26 = temp->unk0->unkD;
arg0->unk60[arg2].unk27 = 0;
arg0->unk60[arg2].unk28 = arg1->unk4;
arg0->unk60[arg2].unk29 = arg1->unk5;
arg0->unk60[arg2].unk2A = arg1->unk6;
arg0->unk60[arg2].unk2B = arg1->unk7;
arg0->unk60[arg2].unk2C = arg1->unk8;
arg0->unk60[arg2].unk2D = arg1->unk9;
arg0->unk60[arg2].unk2E = arg1->unkA;
arg0->unk60[arg2].unk2F = arg1->unkB;
arg0->unk60[arg2].unk24 = 0;
arg0->unk60[arg2].unk31 = 0;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_13ECE0/func_global_asm_8073B08C.s")

View File

@ -1,12 +1,35 @@
#include <ultra64.h>
#include "functions.h"
void func_global_asm_8073B560(ALPlayer *arg0) {
OSIntMask sp1C;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140260/func_global_asm_8073B560.s")
sp1C = osSetIntMask(OS_IM_NONE);
arg0->samplesLeft = n_syn->curSamples;
arg0->next = n_syn->head;
n_syn->head = arg0;
osSetIntMask(sp1C);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140260/func_global_asm_8073B5D0.s")
void func_global_asm_8073B5D0(ALPlayer *arg0) {
OSIntMask sp1C;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140260/func_global_asm_8073B640.s")
sp1C = osSetIntMask(OS_IM_NONE);
arg0->samplesLeft = n_syn->curSamples;
arg0->next = n_syn->head;
n_syn->head = arg0;
osSetIntMask(sp1C);
}
void func_global_asm_8073B640(ALPlayer *arg0) {
OSIntMask sp1C;
sp1C = osSetIntMask(OS_IM_NONE);
arg0->samplesLeft = n_syn->curSamples;
arg0->next = n_syn->head;
n_syn->head = arg0;
osSetIntMask(sp1C);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140260/func_global_asm_8073B6B0.s")

View File

@ -1,21 +1,272 @@
#include <ultra64.h>
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073B900.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073B9B0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073BA60.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073BB10.s")
extern f32 D_807604B0;
extern f32 D_807604B4;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073BC74.s")
void func_global_asm_8073BB10(f32 arg0, f32 arg1, f32 arg2, f32 *arg3, f32 *arg4) {
f32 sp3C;
f32 sp38;
f32 sp34;
f32 temp[6];
if (arg1 >= (arg0 - 200.0f)) {
arg1 = arg0 - 200.0f;
}
sp3C = func_global_asm_80611BB4(arg1 * D_807604B0, arg0);
sp38 = sp3C * sp3C;
sp34 = (sp3C * D_807604B4) / arg2;
arg3[0] = sp38 / (1.0f + sp38 + sp34);
arg3[1] = arg3[0] * 2.0f;
arg3[2] = arg3[0];
arg4[1] = ((sp38 - 1.0f) * 2.0f) / (1.0f + sp38 + sp34);
arg4[2] = ((1.0f + sp38) - sp34) / (1.0f + sp38 + sp34);
}
void func_global_asm_8073BC74(Struct8073BC74 *arg0) {
s32 sp14;
s32 sp10;
s16 spE;
f32 sp8;
f32 sp4;
f32 sp0;
sp10 = arg0->unk0 * 16384.0f;
spE = sp10 >> 0xF;
arg0->unk2 = 16384.0f - spE;
arg0->unk28 = 0;
for (sp14 = 0; sp14 < 8; sp14++) {
arg0->unk8[sp14] = 0;
}
arg0->unk8[sp14] = spE;
sp14 += 1;
sp0 = 16384.0f;
sp4 = sp8 = spE / sp0;
if (sp14 < 0x10) {
do {
sp4 *= sp8;
arg0->unk8[sp14] = sp4 * sp0;
} while ((sp14 += 1) < 0x10); // LOL
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073BDC4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073BE54.s")
extern f32 D_807604B8;
extern f32 D_807604BC;
/*
// TODO: Something up with the shift
f32 func_global_asm_8073BDC4(s32 arg0) {
f32 sp4;
f32 sp0;
arg0 = arg0;
sp0 = 1.0f;
if (arg0 >= 0) {
sp4 = D_807604B8;
} else {
sp4 = D_807604BC;
arg0 = -arg0;
}
while (arg0 != 0) {
if (arg0 & 1) {
sp0 *= sp4;
}
sp4 *= sp4;
arg0 = arg0 >> 1;
}
return sp0;
}
*/
extern f32 D_807604C0;
extern f32 D_807604C4;
void func_global_asm_8073BE54(Struct8073BC74 *arg0, f32 arg1) {
s32 sp3C;
f32 sp30[3];
f32 sp24[3];
if (arg0->unk2 == 0) {
return;
}
if (arg0->unk2 < 0xA) {
arg0->unk2 = 0xA;
}
func_global_asm_8073BB10(arg1, arg0->unk0 + 10.0f, arg0->unk2 / 10.0f, &sp30, &sp24);
for (sp3C = 3; sp3C < 8; sp3C += 1) {
arg0->unk8[sp3C] = 0;
}
arg0->unk8[0] = sp30[0] * (D_807604C0 - (arg0->unk2 * 128.0f));
arg0->unkA = sp30[1] * (D_807604C4 - (arg0->unk2 * 128.0f));
arg0->unkC = 0;
arg0->unk18 = sp24[1] * -16384.0f;
arg0->unk1A = sp24[2] * -16384.0f;
for (sp3C = 0xA; sp3C < 0x10; sp3C += 1) {
arg0->unk8[sp3C] = 0;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073C040.s")
s16 *func_global_asm_80732444(s32, s32, s32, u8, s32);
extern s32 D_80756458[];
extern f32 D_807604C8;
typedef struct {
s16 unk0;
s16 unk2;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
s32 unk28;
s32 unk2C;
s32 unk30;
} Struct8073C040_sp28_unk20;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
f32 unk24;
s32 unk28;
} Struct8073C040_sp28_unk24;
typedef struct {
s32 unk0;
s32 unk4;
s16 unk8;
s16 unkA;
s16 unkC;
s16 unkE;
f32 unk10;
f32 unk14;
s32 unk18;
f32 unk1C;
Struct8073C040_sp28_unk20 *unk20;
Struct8073C040_sp28_unk24 *unk24;
} Struct8073C040_sp28;
typedef struct {
u32 unk0;
Struct8073C040_sp28 *unk4;
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20[1]; // TODO: How many elements?
s32 unk24[1]; // TODO: How many elements?
s32 unk28;
s32 unk2C;
} Struct8073C040_sp24;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
u8 unk1C[4]; // TODO: How many elements?
s32 unk20[1]; // TODO: How many elements?
} Struct8073C040_arg1;
/*
// TODO: Very close considering the size of it...
void func_global_asm_8073C040(s16 **arg0, Struct8073C040_arg1 *arg1, s16 arg2, s32 arg3) {
u16 sp36;
u16 sp34;
u16 sp32;
s32 *sp2C;
Struct8073C040_sp28 *sp28;
Struct8073C040_sp24 *sp24;
f32 var_f8;
sp2C = NULL;
sp24 = func_global_asm_80732444(0, 0, arg3, 1, 0x30);
*arg0 = sp24;
switch (arg1->unk1C[arg2]) {
case 6:
sp2C = arg1->unk20[arg2];
break;
default:
sp2C = &D_80756458;
break;
}
sp34 = 0;
sp24->unk8 = sp2C[sp34++];
sp24->unk0 = sp2C[sp34++];
sp24->unk4 = func_global_asm_80732444(0, 0, arg3, sp24->unk8, 0x28);
sp24->unk20[0] = func_global_asm_80732444(0, 0, arg3, sp24->unk0, 2);
sp24->unk28 = sp24->unk20[0];
sp24->unk24[0] = func_global_asm_80732444(0, 0, arg3, sp24->unk0, 2);
sp24->unk2C = sp24->unk24[0];
// Fine up to here
for (sp32 = 0; sp32 < sp24->unk0; sp32++) {
sp24->unk24[sp32] = 0;
sp24->unk20[sp32] = sp24->unk24[sp32];
}
for (sp36 = 0; sp36 < sp24->unk8; sp36++) {
sp28 = &sp24->unk4[sp36];
sp28->unk0 = sp2C[sp34++];
sp28->unk4 = sp2C[sp34++];
sp28->unkA = sp2C[sp34++];
sp28->unk8 = sp2C[sp34++];
sp28->unkC = sp2C[sp34++];
if (sp2C[sp34] != 0) {
sp28->unk10 = ((sp2C[sp34++] / 1000.0f) * 2.0f) / arg1->unk18;
sp28->unk1C = (sp2C[sp34++] / D_807604C8) * (sp28->unk4 - sp28->unk0);
sp28->unk14 = 1.0f;
sp28->unk18 = 0;
sp28->unk24 = func_global_asm_80732444(0, 0, arg3, 1, 0x38);
sp28->unk24->unk14 = func_global_asm_80732444(0, 0, arg3, 1, 0x20);
sp28->unk24->unk18 = func_global_asm_80732444(0, 0, arg3, 1, 0x20);
sp28->unk24->unk24 = 0.0f;
sp28->unk24->unk28 = 1;
} else {
sp28->unk24 = NULL;
sp34 += 1;
sp34 += 1;
}
if (sp2C[sp34] != 0) {
sp28->unk20 = func_global_asm_80732444(0, 0, arg3, 1, 0x38);
sp28->unk20->unk2C = func_global_asm_80732444(0, 0, arg3, 1, 8);
sp28->unk20->unk30 = func_global_asm_80732444(0, 0, arg3, 1, 8);
sp28->unk20->unk0 = sp2C[sp34++];
func_global_asm_8073BC74(sp28->unk20);
} else {
sp28->unk20 = NULL;
sp34 += 1;
}
}
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_140600/func_global_asm_8073C604.s")

View File

@ -1,13 +1,33 @@
#include <ultra64.h>
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141520/func_global_asm_8073C820.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141520/func_global_asm_8073C8D0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141520/func_global_asm_8073C948.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141520/func_global_asm_8073C9C0.s")
s32 func_global_asm_8073DA30(s32, s16, s32);
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141520/func_global_asm_8073CA04.s")
void func_global_asm_8073C9C0(s32 arg0, s16 arg1, s32 arg2) {
s32 sp1C;
sp1C = arg0;
func_global_asm_8073DA30(sp1C, arg1, arg2);
}
extern f32 D_807604D0;
typedef struct {
s16 unk0;
s16 unk2;
} Struct8073CA04_arg0;
void func_global_asm_8073CA04(Struct8073CA04_arg0 *arg0, s16 arg1, s32 *arg2) {
if (arg1 == 8) {
arg0->unk2 = *arg2 * D_807604D0;
} else if (arg1 == 9) {
arg0->unk0 = *arg2;
}
func_global_asm_8073BE54(arg0, n_syn->outputRate);
}

View File

@ -2,6 +2,7 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1417C0/func_global_asm_8073CAC0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1417C0/func_global_asm_8073CC94.s")

View File

@ -1,6 +1,8 @@
#include <ultra64.h>
#include "functions.h"
#include "synthinternal.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_141EF0/func_global_asm_8073D1F0.s")

View File

@ -1,8 +1,11 @@
#include <ultra64.h>
#include "functions.h"
typedef struct {
u8 unk0[0x16 - 0x0];
s16 unk16;
} Struct8073E8A0;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435A0/func_global_asm_8073E8A0.s")
void func_global_asm_8073E8B4(void) {
void func_global_asm_8073E8A0(Struct8073E8A0 *arg0, s16 arg1) {
arg0->unk16 = arg1;
}

View File

@ -1,15 +1,119 @@
#include <ultra64.h>
#include "functions.h"
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073E8C0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073F1E4.s")
typedef struct {
u8 unk0[0x48 - 0x0];
s32 unk48;
f32 unk4C;
s32 unk50;
s32 unk54;
s16 unk58;
s16 unk5A;
s32 unk5C;
s32 unk60;
s32 unk64;
s32 unk68;
s32 unk6C;
s32 unk70;
s32 unk74;
s32 unk78;
s32 unk7C;
s32 *unk80;
s32 unk84;
} Struct8073F1E4;
s32 func_global_asm_8073F1E4(Struct8073F1E4 *arg0, s32 arg1, s32 *arg2) {
Struct8073F1E4 *sp24;
sp24 = arg0;
switch (arg1) {
case 3:
if (sp24->unk80 != NULL) {
sp24->unk80[0] = arg2;
} else {
sp24->unk7C = arg2;
}
sp24->unk80 = arg2;
break;
case 4:
sp24->unk78 = 1;
sp24->unk84 = 0;
sp24->unk5A = 1;
sp24->unk74 = 0;
sp24->unk4C = 0.0f;
sp24->unk50 = 1;
sp24->unk48 = 0;
func_global_asm_80740F48(sp24, 4, arg2);
break;
case 9:
sp24->unk84 = 1;
break;
default:
func_global_asm_80740F48(sp24, arg1, arg2);
break;
}
return 0;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073F328.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073F60C.s")
extern f32 D_80760554;
s16 func_global_asm_8073F60C(f32 arg0, f32 arg1, s32 arg2, u16 *arg3) {
s16 spE;
s16 spC;
f32 sp8;
f32 sp4;
f32 sp0;
if (arg2 == 0) {
if (arg0 <= arg1) {
*arg3 = 0xFFFF;
return 0x7FFF;
} else {
*arg3 = 0;
return -0x8000;
}
}
sp8 = 1.0f / arg2;
if (arg1 < 1.0f) {
arg1 = 1.0f;
}
if (arg0 <= 0.0f) {
arg0 = 1.0f;
}
sp4 = (arg1 - arg0) * sp8 * 8.0f;
spE = sp4;
sp0 = sp4 - spE;
spE -= 1;
sp0 += 1.0f;
spC = sp0;
spE += spC;
sp0 -= spC;
*arg3 = D_80760554 * sp0;
return spE;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073F81C.s")
/*
// __n_getVol?
// TODO: Something wrong with the shifts
s16 func_global_asm_8073F81C(s16 arg0, s32 arg1, s16 arg2, u16 arg3) {
s32 sp4;
arg1 = arg1 >> 3;
if (arg1 == 0) {
return arg0;
}
sp4 = arg3 * arg1;
sp4 = sp4 >> 0x10;
sp4 += arg2 * arg1;
return arg0 + sp4;
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_1435C0/func_global_asm_8073F8A0.s")

View File

@ -2,4 +2,5 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_144A90/func_global_asm_8073FD90.s")

View File

@ -1,7 +1,53 @@
#include <ultra64.h>
#include "functions.h"
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_145950/func_global_asm_80740C50.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/code_145950/func_global_asm_80740F48.s")
void func_global_asm_807407A8(void *, s32, void*);
typedef struct {
u8 unk0[0x8C - 0x0];
s8 unk8C;
s8 unk8D;
s8 unk8E;
s8 unk8F;
s16 unk90;
s16 unk92;
s32 unk94;
s32 unk98;
s32 unk9C;
s32 unkA0;
s32 unkA4;
s32 unkA8;
s32 unkAC;
s32 unkB0;
s32 unkB4;
s32 unkB8;
} Struct80740F48;
// TODO: Fake match? This makes no sense...
s32 func_global_asm_80740F48(Struct80740F48 *arg0, s32 arg1, f32 *arg2) {
f32 *temp = &arg2;
switch (arg1) {
case 4:
arg0->unk92 = 0;
func_global_asm_807407A8(arg0, 4, arg2);
break;
case 18:
arg0->unk92 = arg2;
arg0->unkB8 |= 2;
break;
case 19:
arg0->unk90 = *temp;
arg0->unkB8 |= 2;
break;
case 17:
arg0->unk8C = arg2;
break;
default:
func_global_asm_807407A8(arg0, arg1, arg2);
break;
}
return 0;
}

View File

@ -2,10 +2,131 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/event/func_global_asm_8073B1D0.s")
void alEvtqNew(ALEventQueue *evtq, ALEventListItem *items, s32 itemCount)
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/event/func_global_asm_8073B26C.s")
{
s32 i;
evtq->eventCount = 0;
evtq->allocList.next = 0;
evtq->allocList.prev = 0;
evtq->freeList.next = 0;
evtq->freeList.prev = 0;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/event/func_global_asm_8073B310.s")
for (i = 0; i < itemCount; i++) {
alLink((ALLink *)&items[i], &evtq->freeList);
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/event/func_global_asm_8073B490.s")
ALMicroTime alEvtqNextEvent(ALEventQueue *evtq, ALEvent *evt)
{
ALEventListItem *item;
ALMicroTime delta;
OSIntMask mask;
mask = osSetIntMask(OS_IM_NONE);
item = (ALEventListItem *)evtq->allocList.next;
if (item)
{
alUnlink((ALLink *)item);
bcopy(&item->evt, evt, sizeof(*evt));
alLink((ALLink *)item, &evtq->freeList);
delta = item->delta;
}
else
{
/* sct 11/28/95 - If we get here, most like we overflowed the event queue */
/* with non-self-perpetuating events. Eg. if we filled the evtq with volume */
/* events, then when the seqp is told to play it will handle all the events */
/* at once completely emptying out the queue. At this point this problem */
/* must be treated as an out of resource error and the evtq should be increased. */
evt->type = -1;
delta = 0;
}
osSetIntMask(mask);
return delta;
}
void alEvtqPostEvent(ALEventQueue *evtq, ALEvent *evt, ALMicroTime delta)
{
ALEventListItem *item;
ALEventListItem *nextItem;
ALLink *node;
s32 postAtEnd=0;
OSIntMask mask;
mask = osSetIntMask(OS_IM_NONE);
item = (ALEventListItem *)evtq->freeList.next;
if (!item) {
osSetIntMask(mask);
#ifdef _DEBUG
__osError(ERR_ALEVENTNOFREE, 0);
#endif
return;
}
alUnlink((ALLink *)item);
bcopy(evt, &item->evt, sizeof(*evt));
if (delta == AL_EVTQ_END)
postAtEnd = -1;
for (node = &evtq->allocList; node != 0; node = node->next) {
if (!node->next) { /* end of the list */
if (postAtEnd)
item->delta = 0;
else
item->delta = delta;
alLink((ALLink *)item, node);
break;
} else {
nextItem = (ALEventListItem *)node->next;
if (delta < nextItem->delta) {
item->delta = delta;
nextItem->delta -= delta;
alLink((ALLink *)item, node);
break;
}
delta -= nextItem->delta;
}
}
osSetIntMask(mask);
}
void alEvtqFlushType(ALEventQueue *evtq, s16 type)
{
ALLink *thisNode;
ALLink *nextNode;
ALEventListItem *thisItem, *nextItem;
OSIntMask mask;
mask = osSetIntMask(OS_IM_NONE);
thisNode = evtq->allocList.next;
while( thisNode != 0 )
{
nextNode = thisNode->next;
thisItem = (ALEventListItem *)thisNode;
nextItem = (ALEventListItem *)nextNode;
if (thisItem->evt.type == type)
{
if (nextItem)
nextItem->delta += thisItem->delta;
alUnlink(thisNode);
alLink(thisNode, &evtq->freeList);
}
thisNode = nextNode;
}
osSetIntMask(mask);
}

View File

@ -2,12 +2,20 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/link/func_global_asm_807393E0.s")
void func_global_asm_8073940C(void) {
/* might want to make these macros */
void alLink(ALLink *ln, ALLink *to)
{
ln->next = to->next;
ln->prev = to;
if (to->next)
to->next->prev = ln;
to->next = ln;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/link/func_global_asm_80739414.s")
void func_global_asm_8073944C(void) {
void alUnlink(ALLink *ln)
{
if (ln->next)
ln->next->prev = ln->prev;
if (ln->prev)
ln->prev->next = ln->next;
}

View File

@ -2,6 +2,25 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/n_sl/func_global_asm_80739320.s")
extern N_ALGlobals *n_alGlobals=0;
extern N_ALSynth *n_syn;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/n_sl/func_global_asm_8073938C.s")
void n_alInit(N_ALGlobals *g, ALSynConfig *c)
{
if (!n_alGlobals) { /* already initialized? */
n_alGlobals = g;
if (!n_syn) {
n_syn = &n_alGlobals->drvr;
n_alSynNew(c); //n_alSynNew(c);
}
}
}
void n_alClose(N_ALGlobals *glob)
{
if (n_alGlobals) {
n_alSynDelete();//n_alSynDelete();
n_alGlobals = 0;
n_syn = 0;
}
}

View File

@ -2,7 +2,8 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/n_syndelete/func_global_asm_8073D140.s")
extern N_ALSynth *n_syn;
void func_global_asm_8073D154(void) {
void n_alSynDelete(void) {
n_syn->head = NULL;
}

View File

@ -2,4 +2,12 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/seqpsetseq/func_global_asm_80739F40.s")
void alSeqpSetSeq(ALSeqPlayer *seqp, ALSeq *seq)
{
ALEvent evt;
evt.type = AL_SEQP_SEQ_EVT;
evt.msg.spseq.seq = seq;
alEvtqPostEvent(&seqp->evtq, &evt, 0);
}

View File

@ -2,4 +2,12 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/seqpsetvol/func_global_asm_80739F90.s")
void alSepqSetVol(ALSeqPlayer *seqp, s16 vol)
{
ALEvent evt;
evt.type = AL_SEQP_VOL_EVT;
evt.msg.spvol.vol = vol;
alEvtqPostEvent(&seqp->evtq, &evt, 0);
}

View File

@ -2,4 +2,9 @@
#include "functions.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/seqpstop/func_global_asm_80739F00.s")
void alSeqpStop(ALSeqPlayer *seqp) {
ALEvent evt;
evt.type = AL_SEQP_STOPPING_EVT;
alEvtqPostEvent(&seqp->evtq, &evt, 0);
}

View File

@ -1,24 +1,92 @@
#include <ultra64.h>
#include "functions.h"
#include "synthinternal.h"
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739460.s")
//n_alSynNew
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/n_alSynNew.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739A64.s")
//n_alAudioFrame
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/n_alAudioFrame.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739C88.s")
ALParam *__n_allocParam(void) {
ALParam *update = 0;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739CE8.s")
void func_global_asm_80739D0C(void) {
if (n_syn->paramList) {
update = n_syn->paramList;
n_syn->paramList = n_syn->paramList->next;
update->next = 0;
}
return update;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739D14.s")
void __n_freeParam(ALParam *param)
{
param->next = n_syn->paramList;
n_syn->paramList = param;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739D80.s")
void _n_collectPVoices()
{
ALLink *dl;
PVoice *pv;
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739DC0.s")
while ((dl = n_syn->pLameList.next) != 0) {
pv = (PVoice *)dl;
/* ### remove from mixer */
alUnlink(dl);
alLink(dl, &n_syn->pFreeList);
}
}
void _n_freePVoice(PVoice *pvoice)
{
/*
* move the voice from the allocated list to the lame list
*/
alUnlink((ALLink *)pvoice);
alLink((ALLink *)pvoice, &n_syn->pLameList);
}
/*
Add 0.5 to adjust the average affect of
the truncation error produced by casting
a float to an int.
*/
s32 _n_timeToSamplesNoRound(s32 micros)
{
f32 tmp = ((f32)micros) * n_syn->outputRate / 1000000.0f + 0.5f;
return (s32)tmp;
}
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739E24.s")
#else
// s32 _timeToSamples(ALSynth *synth, s32 micros)
s32 func_global_asm_80739E24(s32 micros)
{ return _n_timeToSamplesNoRound(micros) & ~0xf;
}
#endif
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/audio/synthesizer/func_global_asm_80739E5C.s")
static s32 __n_nextSampleTime(ALPlayer **client)
{
s32 pad;
ALMicroTime delta = 0x7fffffff; /* max delta for s32 */
ALPlayer *cl;
//assert(n_syn->head);
*client = 0;
for (cl = n_syn->head; cl != 0; cl = cl->next) {
if ((cl->samplesLeft - n_syn->curSamples) < delta) {
*client = cl;
delta = cl->samplesLeft - n_syn->curSamples;
}
}
return (*client)->samplesLeft;
}

View File

@ -5,9 +5,6 @@
void func_global_asm_806FB480(void) {
}
void func_global_asm_806FB488(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_100180/func_global_asm_806FB490.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_100180/func_global_asm_806FB714.s")

View File

@ -10,7 +10,7 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060B968.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060B9D0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/getEEPROMSaveSlot.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060BA14.s")
@ -70,7 +70,7 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060E1A8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060E25C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/getFlagBlockAddress.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_104F0/func_global_asm_8060E3B0.s")

View File

@ -26,7 +26,7 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_10E1D0/setIntroStoryPlaying.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_10E1D0/func_global_asm_8070B318.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_10E1D0/isIntroStoryPlaying.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_10E1D0/func_global_asm_8070B324.s")

View File

@ -50,7 +50,7 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80712634.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80712658.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/gameIsInDKTheatreMode.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_8071268C.s")
@ -128,13 +128,13 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80714360.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80714394.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/gameIsInQuitGameMode.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_807143E8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/gameIsInSnidesBonusGameMode.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/gameIsInMysteryMenuMinigameMode.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80714450.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/gameIsInMainMenuMode.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_80714464.s")

View File

@ -4,9 +4,9 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/func_global_asm_80731030.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/func_global_asm_8073106C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/clearPermanentFlags.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/func_global_asm_807310BC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/clearGlobalFlags.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_135D30/isFlagSet.s")

View File

@ -62,9 +62,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_global_asm_80641DA0.s")
void func_global_asm_80641F68(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_global_asm_80641F70.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_global_asm_8064216C.s")

View File

@ -158,7 +158,4 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_70FD0/func_global_asm_80672CBC.s")
void func_global_asm_80672E64(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_70FD0/func_global_asm_80672E6C.s")

View File

@ -30,27 +30,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_806787CC.s")
void func_global_asm_806787EC(void) {
}
void func_global_asm_806787F4(void) {
}
void func_global_asm_806787FC(void) {
}
void func_global_asm_80678804(void) {
}
void func_global_asm_8067880C(void) {
}
void func_global_asm_80678814(void) {
}
void func_global_asm_8067881C(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_80678824.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_8067889C.s")
@ -157,24 +136,6 @@ void func_global_asm_8067881C(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_8067B238.s")
void func_global_asm_8067B280(void) {
}
void func_global_asm_8067B288(void) {
}
void func_global_asm_8067B290(void) {
}
void func_global_asm_8067B298(void) {
}
void func_global_asm_8067B2A0(void) {
}
void func_global_asm_8067B2A8(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_8067B2B0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_8067B2B8.s")

View File

@ -10,9 +10,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_global_asm_806998C8.s")
void func_global_asm_806998E8(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_global_asm_806998F0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_global_asm_80699914.s")

View File

@ -6,18 +6,12 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A18A8.s")
void func_global_asm_806A1ABC(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A1AC4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A1F28.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A1F64.s")
void func_global_asm_806A1FD0(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A1FD8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A6280/func_global_asm_806A2328.s")

View File

@ -15,6 +15,3 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A7710/func_global_asm_806A2B90.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A7710/func_global_asm_806A2E30.s")
void func_global_asm_806A36F4(void) {
}

View File

@ -4,9 +4,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_B7490/func_global_asm_806B2790.s")
void func_global_asm_806B2D5C(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_B7490/func_global_asm_806B2D64.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_B7490/func_global_asm_806B3420.s")

View File

@ -8,4 +8,4 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_C1E70/func_global_asm_806BD7B0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_C1E70/func_global_asm_806BDD2C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_C1E70/areAllKeysTurnedIn.s")

View File

@ -5,81 +5,6 @@
void func_global_asm_806C71A0(void) {
}
void func_global_asm_806C71A8(void) {
}
void func_global_asm_806C71B0(void) {
}
void func_global_asm_806C71B8(void) {
}
void func_global_asm_806C71C0(void) {
}
void func_global_asm_806C71C8(void) {
}
void func_global_asm_806C71D0(void) {
}
void func_global_asm_806C71D8(void) {
}
void func_global_asm_806C71E0(void) {
}
void func_global_asm_806C71E8(void) {
}
void func_global_asm_806C71F0(void) {
}
void func_global_asm_806C71F8(void) {
}
void func_global_asm_806C7200(void) {
}
void func_global_asm_806C7208(void) {
}
void func_global_asm_806C7210(void) {
}
void func_global_asm_806C7218(void) {
}
void func_global_asm_806C7220(void) {
}
void func_global_asm_806C7228(void) {
}
void func_global_asm_806C7230(void) {
}
void func_global_asm_806C7238(void) {
}
void func_global_asm_806C7240(void) {
}
void func_global_asm_806C7248(void) {
}
void func_global_asm_806C7250(void) {
}
void func_global_asm_806C7258(void) {
}
void func_global_asm_806C7260(void) {
}
void func_global_asm_806C7268(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CBEA0/func_global_asm_806C7270.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CBEA0/func_global_asm_806C75A4.s")

View File

@ -48,7 +48,7 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CC800/func_global_asm_806C9434.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CC800/func_global_asm_806C95D0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CC800/loadExits.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CC800/func_global_asm_806C9658.s")

View File

@ -190,9 +190,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806D1238.s")
void func_global_asm_806D1270(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806D1278.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806D12CC.s")
@ -553,9 +550,6 @@ void func_global_asm_806D1270(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E17F4.s")
void func_global_asm_806E1864(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E186C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E1A50.s")
@ -666,12 +660,6 @@ void func_global_asm_806E1864(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E5D60.s")
void func_global_asm_806E5E58(void) {
}
void func_global_asm_806E5E60(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E5E68.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E5EA8.s")
@ -728,7 +716,7 @@ void func_global_asm_806E5E60(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E7658.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E770C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/playerCanDive.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806E7780.s")
@ -883,9 +871,6 @@ void func_global_asm_806E78F8(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806EAF6C.s")
void func_global_asm_806EAFEC(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806EAFF4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_CEAE0/func_global_asm_806EB058.s")

View File

@ -172,12 +172,6 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_EFDC0/func_global_asm_806EFF34.s")
void func_global_asm_806F006C(void) {
}
void func_global_asm_806F0074(void) {
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_EFDC0/func_global_asm_806F007C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_EFDC0/func_global_asm_806F00BC.s")

View File

@ -221,89 +221,89 @@ __libm_qnan_f = 0x80010710;
playSong = 0x80602A94;
playSound = 0x80609140;
getEEPROMSaveSlot = 0x8060B9D0;
malloc = 0x80610FE8;
rand = 0x80611A44;
playCutscene = 0x8061CC40;
getPointerTableFile = 0x8066B0F8;
areAllKeysTurnedIn = 0x806BDD2C;
getFlagBlockAddress = 0x8060E25C;
getExitData = 0x806C96C4;
loadExits = 0x806C95D0;
setIntroStoryPlaying = 0x8070B308;
isIntroStoryPlaying = 0x8070B318;
clearPermanentFlags = 0x8073106C;
clearGlobalFlags = 0x807310BC;
isFlagSet = 0x8073110C;
setFlag = 0x8073129C;
gameIsInDKTheatreMode = 0x80712658;
gameIsInDKTVMode = 0x807142D8;
gameIsInAdventureMode = 0x8071432C;
gameIsInQuitGameMode = 0x80714394;
gameIsInSnidesBonusGameMode = 0x807143E8;
gameIsInMysteryMenuMinigameMode = 0x8071441C;
gameIsInMainMenuMode = 0x80714450;
playerCanDive = 0x806E770C;
getLevelIndex = 0x805FF030;
n_alInit = 0x80739320;
n_alClose = 0x8073938C;
alLink = 0x807393E0;
alUnlink = 0x80739414;
n_alSynNew = 0x80739460;
n_alAudioFrame = 0x80739A64;
__n_allocParam = 0x80739C88;
__n_freeParam = 0x80739CE8;
_n_collectPVoices = 0x80739D14;
_n_freePVoice = 0x80739D80;
_n_timeToSamplesNoRound = 0x80739DC0;
__n_nextSampleTime = 0x80739E5C;
alSeqpStop = 0x80739F00;
alSeqpSetSeq = 0x80739F40;
alSepqSetVol = 0x80739F90;
alEvtqNew = 0x8073B1D0;
alEvtqNextEvent = 0x8073B26C;
alEvtqPostEvent = 0x8073B310;
alEvtqFlushType = 0x8073B490;
n_alSynDelete = 0x8073D140;
next_map = 0x807444E4;
next_exit = 0x807444E8;
is_cutscene_active = 0x807444EC;
enemies_killed = 0x80744508;
current_character_index = 0x8074E77C;
action_initiation_function_list = 0x80752C70;
game_mode_copy = 0x80755314;
game_mode = 0x80755318;
object_timer = 0x8076A064;
current_map = 0x8076A0A8;
current_exit = 0x8076A0AC;
loading_zone_transition_type = 0x8076AEE0;
newly_pressed_input = 0x807ECD48;
newly_pressed_input_copy = 0x807ECD66;
chunk_array_pointer = 0x807F6C18;
actor_list = 0x807FBFF0;
actor_count = 0x807FC3F0;
actor_spawner_pointer = 0x807FC400;
exit_array = 0x807FC900;
character_change_array = 0x807FC924;
cc_number_of_players = 0x807FC928;
cc_player_index = 0x807FC929;
extra_player_info_pointer = 0x807FD580;
loading_zone_transition_speed = 0x807FD88C;
current_menu_selection = 0x8076A0D1;
current_file_selection = 0x8076A0D2;
current_actor_pointer = 0x807FBB40;
player_pointer = 0x807FBB4C;
global_properties_bitfield = 0x807FBB60;
temporary_flag_block = 0x807FDD90;
is_autowalking = 0x807463B8;
widescreen_enabled = 0x807444C0;
story_skip = 0x8074452C;
number_of_exits = 0x807FC904;
current_file = 0x807467C8;
n_alGlobals = 0x807563E0;
n_syn = 0x807563E4;
playSong = 0x80602A94; // segment:global_asm
playSound = 0x80609140; // segment:global_asm
getEEPROMSaveSlot = 0x8060B9D0; // segment:global_asm
malloc = 0x80610FE8; // segment:global_asm
rand = 0x80611A44; // segment:global_asm
playCutscene = 0x8061CC40; // segment:global_asm
getPointerTableFile = 0x8066B0F8; // segment:global_asm
areAllKeysTurnedIn = 0x806BDD2C; // segment:global_asm
getFlagBlockAddress = 0x8060E25C; // segment:global_asm
getExitData = 0x806C96C4; // segment:global_asm
loadExits = 0x806C95D0; // segment:global_asm
setIntroStoryPlaying = 0x8070B308; // segment:global_asm
isIntroStoryPlaying = 0x8070B318; // segment:global_asm
clearPermanentFlags = 0x8073106C; // segment:global_asm
clearGlobalFlags = 0x807310BC; // segment:global_asm
isFlagSet = 0x8073110C; // segment:global_asm
setFlag = 0x8073129C; // segment:global_asm
gameIsInDKTheatreMode = 0x80712658; // segment:global_asm
gameIsInDKTVMode = 0x807142D8; // segment:global_asm
gameIsInAdventureMode = 0x8071432C; // segment:global_asm
gameIsInQuitGameMode = 0x80714394; // segment:global_asm
gameIsInSnidesBonusGameMode = 0x807143E8; // segment:global_asm
gameIsInMysteryMenuMinigameMode = 0x8071441C; // segment:global_asm
gameIsInMainMenuMode = 0x80714450; // segment:global_asm
playerCanDive = 0x806E770C; // segment:global_asm
getLevelIndex = 0x805FF030; // segment:global_asm
n_alInit = 0x80739320; // segment:global_asm
n_alClose = 0x8073938C; // segment:global_asm
alLink = 0x807393E0; // segment:global_asm
alUnlink = 0x80739414; // segment:global_asm
n_alSynNew = 0x80739460; // segment:global_asm
n_alAudioFrame = 0x80739A64; // segment:global_asm
__n_allocParam = 0x80739C88; // segment:global_asm
__n_freeParam = 0x80739CE8; // segment:global_asm
_n_collectPVoices = 0x80739D14; // segment:global_asm
_n_freePVoice = 0x80739D80; // segment:global_asm
_n_timeToSamplesNoRound = 0x80739DC0; // segment:global_asm
__n_nextSampleTime = 0x80739E5C; // segment:global_asm
alSeqpStop = 0x80739F00; // segment:global_asm
alSeqpSetSeq = 0x80739F40; // segment:global_asm
alSepqSetVol = 0x80739F90; // segment:global_asm
alEvtqNew = 0x8073B1D0; // segment:global_asm
alEvtqNextEvent = 0x8073B26C; // segment:global_asm
alEvtqPostEvent = 0x8073B310; // segment:global_asm
alEvtqFlushType = 0x8073B490; // segment:global_asm
n_alSynDelete = 0x8073D140; // segment:global_asm
next_map = 0x807444E4; // segment:global_asm
next_exit = 0x807444E8; // segment:global_asm
is_cutscene_active = 0x807444EC; // segment:global_asm
enemies_killed = 0x80744508; // segment:global_asm
current_character_index = 0x8074E77C; // segment:global_asm
action_initiation_function_list = 0x80752C70; // segment:global_asm
game_mode_copy = 0x80755314; // segment:global_asm
game_mode = 0x80755318; // segment:global_asm
object_timer = 0x8076A064; // segment:global_asm
current_map = 0x8076A0A8; // segment:global_asm
current_exit = 0x8076A0AC; // segment:global_asm
loading_zone_transition_type = 0x8076AEE0; // segment:global_asm
newly_pressed_input = 0x807ECD48; // segment:global_asm
newly_pressed_input_copy = 0x807ECD66; // segment:global_asm
chunk_array_pointer = 0x807F6C18; // segment:global_asm
actor_list = 0x807FBFF0; // segment:global_asm
actor_count = 0x807FC3F0; // segment:global_asm
actor_spawner_pointer = 0x807FC400; // segment:global_asm
exit_array = 0x807FC900; // segment:global_asm
character_change_array = 0x807FC924; // segment:global_asm
cc_number_of_players = 0x807FC928; // segment:global_asm
cc_player_index = 0x807FC929; // segment:global_asm
extra_player_info_pointer = 0x807FD580; // segment:global_asm
loading_zone_transition_speed = 0x807FD88C; // segment:global_asm
current_menu_selection = 0x8076A0D1; // segment:global_asm
current_file_selection = 0x8076A0D2; // segment:global_asm
current_actor_pointer = 0x807FBB40; // segment:global_asm
player_pointer = 0x807FBB4C; // segment:global_asm
global_properties_bitfield = 0x807FBB60; // segment:global_asm
temporary_flag_block = 0x807FDD90; // segment:global_asm
is_autowalking = 0x807463B8; // segment:global_asm
widescreen_enabled = 0x807444C0; // segment:global_asm
story_skip = 0x8074452C; // segment:global_asm
number_of_exits = 0x807FC904; // segment:global_asm
current_file = 0x807467C8; // segment:global_asm
n_alGlobals = 0x807563E0; // segment:global_asm
n_syn = 0x807563E4; // segment:global_asm