core1/done/audio/n_seqplayer.c done

This commit is contained in:
Banjo Kazooie
2022-10-10 16:34:11 -05:00
parent cd222d498a
commit 9a51651a8e
14 changed files with 1565 additions and 211 deletions

View File

@@ -1,4 +1,4 @@
# banjo (89.2214%) # banjo (89.9076%)
<img src="./progress/progress_total.svg"> <img src="./progress/progress_total.svg">

View File

@@ -1,14 +1,14 @@
#ifndef ENUMS_H #ifndef ENUMS_H
#define ENUMS_H #define ENUMS_H
#define SPRITE_TYPE_CI4 (1 << 0) #define SPRITE_TYPE_CI4 (1 << 0) //0x001
#define SPRITE_TYPE_CI8 (1 << 2) #define SPRITE_TYPE_CI8 (1 << 2) //0x004
#define SPRITE_TYPE_I4 (1 << 5) #define SPRITE_TYPE_I4 (1 << 5) //0x020
#define SPRITE_TYPE_I8 (1 << 6) #define SPRITE_TYPE_I8 (1 << 6) //0x040
#define SPRITE_TYPE_IA4 (1 << 7) #define SPRITE_TYPE_IA4 (1 << 7) //0x080
#define SPRITE_TYPE_IA8 (1 << 8) #define SPRITE_TYPE_IA8 (1 << 8) //0x100
#define SPRITE_TYPE_UNKNOWN_200 (1 << 9) #define SPRITE_TYPE_UNKNOWN_200 (1 << 9) //0x200
#define SPRITE_TYPE_RGBA16 (1 << 10) #define SPRITE_TYPE_RGBA16 (1 << 10) ////0x400
#define SPRITE_TYPE_RGBA32 (1 << 11) #define SPRITE_TYPE_RGBA32 (1 << 11)
enum bkprog_e{ enum bkprog_e{
@@ -3055,7 +3055,7 @@ enum asset_e
ASSET_543_MODEL_JINJO_STATUE_BASE = 0x543, ASSET_543_MODEL_JINJO_STATUE_BASE = 0x543,
ASSET_544_MODEL_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE,
ASSET_545_MODEL_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO,
ASSET_546_MODEL_GRUNTY_SPELL_BARRIER = 0x546, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER,
// 547 GL Blue Egg Refill Pillow // 547 GL Blue Egg Refill Pillow
// 548 GL Red Feather Refill Pillow // 548 GL Red Feather Refill Pillow
// 549 GL Gold Feather Refill Pillow // 549 GL Gold Feather Refill Pillow

29
include/file_and_line.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef _FILE_AND_LINE_H_
#define _FILE_AND_LINE_H_
extern void func_8033F000(const char *, const char *, int);
#ifdef NONMATCHING
#define LINE(line_num) __LINE__
#define FILE(file_name) __FILE__
#define matching_assert(EX, F, L) assert(EX)
#else
#define LINE(line_num) line_num
#define FILE(file_name) "file_name"
#ifdef __ANSI_CPP__
#define FILE(file_name) # file_name
#else
#define FILE(file_name) "file_name"
#endif
#define matching_assert(EX, F, L) assert(EX)
#ifdef __ANSI_CPP__
#define matching_assert(EX, F, L) ((EX)?((void)0):func_8033F000( # EX , # F, L))
#else
#define matching_assert(EX, F , L) ((EX)?((void)0):func_8033F000("EX", "F", L))
#endif
#endif
#endif

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/> <path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#78e000" d="M44 0h67v20H44z"/> <path fill="#6ae000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/> <path fill="url(#b)" d="M0 0h111v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="22.0" y="14">core1</text> <text x="22.0" y="14">core1</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">73.1536%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">76.3559%</text>
<text x="77.5" y="14">73.1536%</text> <text x="77.5" y="14">76.3559%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/> <path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#35e000" d="M44 0h67v20H44z"/> <path fill="#33e000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/> <path fill="url(#b)" d="M0 0h111v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text> <text x="22.0" y="14">core2</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">88.2188%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">88.6047%</text>
<text x="77.5" y="14">88.2188%</text> <text x="77.5" y="14">88.6047%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/> <path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#30e000" d="M150 0h67v20H150z"/> <path fill="#2de000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/> <path fill="url(#b)" d="M0 0h217v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text> <text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">89.2214%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">89.9076%</text>
<text x="183.5" y="14">89.2214%</text> <text x="183.5" y="14">89.9076%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -33,7 +33,32 @@ void mlMtxApply(Mtx *mPtr){
func_80245A7C(D_80282FD0, mPtr); func_80245A7C(D_80282FD0, mPtr);
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802514BC.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802514BC.s")
#else
void func_802514BC(Mtx *arg0) {
s32 i, j, k;
f32 tmp;
f32 sp38[4][4];
f32 (*sp34)[4];
f32 (*var_s0)[4];
sp34 = reinterpret_cast(f32 *, *D_80282FD0);
var_s0 = reinterpret_cast(f32 *, arg0);
for(i = 0; i < 4; i++){
for(j = 0; j < 4; j++){
tmp = 0.0f;
for(k = 0; k < 4; k++){
tmp += var_s0[i][k] * sp34[k][j];
}
sp38[i][j] = tmp;
}
}
func_80253010(sp34, &sp38, sizeof(Mtx));
}
#endif
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802515D4.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802515D4.s")
@@ -57,31 +82,13 @@ void func_80251738(void){
v0[0] = 1.0f; v0[0] = 1.0f;
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80251788.s")
#else
f32 *func_80251788(f32 arg0, f32 arg1, f32 arg2){ f32 *func_80251788(f32 arg0, f32 arg1, f32 arg2){
f32 (* v0)[4][4] = (f32 *) ++D_80282FD0; f32 * var_v0 = ++D_80282FD0;
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
(*v0)[0][3] = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
(*v0)[0][2] = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
(*v0)[0][1] = 0.0f; *(var_v0++) = arg0; *(var_v0++) = arg1; *(var_v0++) = arg2; *(var_v0++) = 1.0f;
(*v0)[1][3] = 0.0f;
(*v0)[1][2] = 0.0f;
(*v0)[1][0] = 0.0f;
(*v0)[2][3] = 0.0f;
(*v0)[2][1] = 0.0f;
(*v0)[2][0] = 0.0f;
(*v0)[0][0] = 1.0f;
(*v0)[1][1] = 1.0f;
(*v0)[2][2] = 1.0f;
(*v0)[3][3] = 1.0f;
(*v0)[3][2] = arg2;
(*v0)[3][1] = arg1;
(*v0)[3][0] = arg0;
return &(*v0)[3][3];
} }
#endif
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802517F8.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_802517F8.s")
@@ -92,7 +99,7 @@ f32 *func_80251788(f32 arg0, f32 arg1, f32 arg2){
//mlMtx //mlMtx
void mlMtxIdent(void){ void mlMtxIdent(void){
s32 i; s32 i;
f32 *v0 = D_80282FD0 = D_80282810; f32 *v0 = D_80282FD0 = &D_80282810;
for(i = 0; i<3; i++){ for(i = 0; i<3; i++){
v0[0] = 1.0f; v0[0] = 1.0f;
v0[1] = 0.0f; v0[1] = 0.0f;
@@ -104,7 +111,13 @@ void mlMtxIdent(void){
v0[0] = 1.0f; v0[0] = 1.0f;
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80251B5C.s") void func_80251B5C(f32 arg0, f32 arg1, f32 arg2){
f32 * var_v0 = D_80282FD0 = &D_80282810;
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
*(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
*(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
*(var_v0++) = arg0; *(var_v0++) = arg1; *(var_v0++) = arg2; *(var_v0++) = 1.0f;
}
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80251BCC.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80251BCC.s")
@@ -347,62 +360,3 @@ void func_80252FC8(f32 arg0[3]){
mlMtxRotRoll(-arg0[2]); mlMtxRotRoll(-arg0[2]);
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80253010.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_13990/func_80253034.s")
typedef struct{
u32 unk0;
u32 unk4;
}struct49s;
extern struct49s D_803FFE10[];
extern u8 D_8000E800;
extern u8 D_8002D500;
extern u32 D_8027BF2C;
extern u32 D_8027BF30;
void func_80253050(
s32 overlay_id, u32 ram_start, u32 ram_end, u32 rom_start, u32 rom_end,
u32 code_start, u32 code_end, u32 data_start, u32 data_end, u32 bss_start, u32 bss_end
){
u32 sp34;
u32 sp30;
u32 sp2C;
u32 *tmp;
osWriteBackDCacheAll();
osInvalDCache(ram_start, ram_end - ram_start);
osInvalICache(ram_start, ram_end - ram_start);
if(bss_start){
osInvalDCache(bss_start, bss_end - bss_start);
}
rom_start = D_803FFE10[overlay_id].unk0;
rom_end = D_803FFE10[overlay_id].unk4;
if(overlay_id){
func_80254008();
sp34 = &D_8000E800;
}
else{
sp34 = &D_8002D500;
}
func_802405F0(sp34, rom_start, rom_end - rom_start);
rarezip_uncompress(&sp34, &ram_start);
sp2C = D_8027BF2C;
sp30 = D_8027BF30;
rarezip_uncompress(&sp34, &ram_start);
if(bss_start){
bzero(bss_start, bss_end - bss_start);
osWriteBackDCacheAll();
tmp = (u32*) bss_start;
tmp[0] = sp2C;
tmp[1] = sp30;
tmp[2] = D_8027BF2C;
tmp[3] = D_8027BF30;
}
}

60
src/core1/code_15630.c Normal file
View File

@@ -0,0 +1,60 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
typedef struct{
u32 unk0;
u32 unk4;
}struct49s;
extern struct49s D_803FFE10[];
extern u8 D_8000E800;
extern u8 D_8002D500;
extern u32 D_8027BF2C;
extern u32 D_8027BF30;
void func_80253050(
s32 overlay_id, u32 ram_start, u32 ram_end, u32 rom_start, u32 rom_end,
u32 code_start, u32 code_end, u32 data_start, u32 data_end, u32 bss_start, u32 bss_end
){
u32 sp34;
u32 sp30;
u32 sp2C;
u32 *tmp;
osWriteBackDCacheAll();
osInvalDCache(ram_start, ram_end - ram_start);
osInvalICache(ram_start, ram_end - ram_start);
if(bss_start){
osInvalDCache(bss_start, bss_end - bss_start);
}
rom_start = D_803FFE10[overlay_id].unk0;
rom_end = D_803FFE10[overlay_id].unk4;
if(overlay_id){
func_80254008();
sp34 = &D_8000E800;
}
else{
sp34 = &D_8002D500;
}
func_802405F0(sp34, rom_start, rom_end - rom_start);
rarezip_uncompress(&sp34, &ram_start);
sp2C = D_8027BF2C;
sp30 = D_8027BF30;
rarezip_uncompress(&sp34, &ram_start);
if(bss_start){
bzero(bss_start, bss_end - bss_start);
osWriteBackDCacheAll();
tmp = (u32*) bss_start;
tmp[0] = sp2C;
tmp[1] = sp30;
tmp[2] = D_8027BF2C;
tmp[3] = D_8027BF30;
}
}

View File

@@ -1,91 +0,0 @@
#include <ultra64.h>
#include "n_libaudio.h"
#include "n_synth.h"
// #include "functions.h"
// #include "variables.h"
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80260860.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_802609E0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80260BD4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/n_alEnvmixerPull.s")
#ifdef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__postNextSeqEvent.s")
#else
void __postNextSeqEvent(ALSeqPlayer *seqp)
{
ALEvent evt;
s32 deltaTicks;
ALSeq *seq = seqp->target;
/* sct 1/5/96 - Do nothing if we're not playing or don't have a target sequence. */
if ((seqp->state != AL_PLAYING) || (seq == NULL))
return;
/* Get the next event time in ticks. */
/* If false is returned, then there is no next delta (ie. end of sequence reached). */
if (!__alSeqNextDelta(seq, &deltaTicks))
return;
/* Handle loops. */
if (seqp->loopCount)
{
/* Assume that the loop end falls on a MIDI event. Delta time
will be correct even if we loop */
if (alSeqGetTicks(seq) + deltaTicks >= seqp->loopEnd->curTicks)
{
alSeqSetLoc(seq, seqp->loopStart);
if (seqp->loopCount != -1)
seqp->loopCount--;
}
}
evt.type = AL_SEQ_REF_EVT;
//alEvtqPostEvent(&seqp->evtq, &evt, deltaTicks * seqp->uspt);
alEvtqPostEvent(&seqp->evtq, &evt, deltaTicks * seqp->uspt);
}
#endif
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__setInstChanState.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80261348.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__initFromBank.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80261490.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__vsDelta.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__vsVol.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__seqpReleaseVoice.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__voiceNeedsNoteKill.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__unmapVoice.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_802617A0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__vsPan.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__lookupVoice.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__mapVoice.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__lookupSoundQuick.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80261A94.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_802623F4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_802623FC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__seqpStopOsc.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/__initChanState.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_22E40/func_80262BFC.s")

File diff suppressed because it is too large Load Diff

12
src/core1/n_env.c Normal file
View File

@@ -0,0 +1,12 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#pragma GLOBAL_ASM("asm/nonmatchings/core1/n_env/func_80260860.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/n_env/func_802609E0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/n_env/func_80260BD4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/n_env/n_alEnvmixerPull.s")

View File

@@ -2,6 +2,21 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
Mtx *func_8024DD9C(void);
void func_80251BCC(Mtx *);
void func_80252330(f32, f32, f32);
void mlMtxApply(Mtx *);
void func_803382D8(s32 arg0);
void func_803382E4(s32 arg0);
void func_803382F0(s32 arg0);
void func_803382FC(s32 arg0);
void func_80338308(s32 arg0, s32 arg1);
/* .data */
extern Gfx D_80370260[];
extern Gfx D_80370290[];
extern Gfx D_803702C0[];
extern Gfx D_80370308[];
extern u8 D_80370338[4]; extern u8 D_80370338[4];
extern u8 D_8037033C; extern u8 D_8037033C;
@@ -21,15 +36,136 @@ s32 D_8038363C;
s32 D_80383640; s32 D_80383640;
s32 D_80383644; s32 D_80383644;
void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
/* .code */ /* .code */
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80335D30.s") void func_80335D30(Gfx **gfx){
gDPPipeSync((*gfx)++);
if (D_80370338[0] == 0) {
gDPSetColorDither((*gfx)++, G_CD_DISABLE);
}//L80335D7C
switch(D_80383634 + 1){
case 0:
return;
case 15:
gSPDisplayList((*gfx)++, D_803702C0);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF);
return;
case 12:
gSPDisplayList((*gfx)++, D_80370290);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF);
return;
case 10:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineLERP((*gfx)++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C);
gDPSetEnvColor((*gfx)++, D_80383620, D_80383624, D_80383628, 0xFF);
return;
case 16:
gSPDisplayList((*gfx)++, D_80370290);
gDPSetCombineLERP((*gfx)++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C);
gDPSetEnvColor((*gfx)++, D_80383620, D_80383624, D_80383628, 0xFF);
return;
case 8:
if (D_8038361C != 0) {
gSPDisplayList((*gfx)++, D_80370308);
gDPSetCombineLERP((*gfx)++, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, COMBINED, ENVIRONMENT, COMBINED, 0, 0, 0, COMBINED);
gDPSetEnvColor((*gfx)++, D_8038361C, D_8038361C, D_8038361C, 0xFF);
} else {
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
}
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C);
return;
case 7:
if (D_8038361C != 0) {
gSPDisplayList((*gfx)++, D_80370308);
gDPSetCombineLERP((*gfx)++, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, PRIMITIVE, COMBINED, PRIMITIVE_ALPHA, COMBINED, 0, 0, 0, COMBINED);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038361C);
} else {
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF);
}
return;
case 6:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C);
return;
case 13:
gSPDisplayList((*gfx)++, D_80370290);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C);
return;
case 5:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF);
return;
case 9:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383630, D_80383630, D_80383630, D_8038363C);
return;
case 14:
gSPDisplayList((*gfx)++, D_80370290);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383630, D_80383630, D_80383630, D_8038363C);
return;
case 1:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383630, D_80383630, D_80383630, 0xFF);
return;
case 2:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineLERP((*gfx)++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor((*gfx)++, 0, 0, 0, 0, 0, D_8038363C);
return;
case 11:
gSPDisplayList((*gfx)++, D_80370290);
gDPSetCombineLERP((*gfx)++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor((*gfx)++, 0, 0, 0, 0, 0, D_8038363C);
return;
case 4:
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor((*gfx)++, 0, 0, D_80383620, D_80383624, D_80383628, D_8038362C);
return;
default://L80336814
gSPDisplayList((*gfx)++, D_80370260);
gDPSetCombineLERP((*gfx)++, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE);
gDPSetPrimColor((*gfx)++, 0, 0, 0, 0, 0, 0xFF);
return;
}
}
void func_8033687C( Gfx **gfx ) void func_8033687C( Gfx **gfx )
{ {
/* Turn off texturing */ /* Turn off texturing */
gDPPipeSync((*gfx)++); gDPPipeSync((*gfx)++);
if (D_80370338[0] == 0) { if (D_80370338[0] == 0) {
gDPSetColorDither((*gfx)++, 0); gDPSetColorDither((*gfx)++, G_CD_MAGICSQ);
D_80370338[0] = 1; D_80370338[0] = 1;
} }
@@ -363,19 +499,45 @@ void func_80337B68(Gfx **gfx, Vtx **vtx, Struct84s *texture_list, s32 texture_in
} }
#endif #endif
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80338048.s") void func_80338048(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], Struct84s *arg4, s32 arg5) {
func_803380F8(gfx, mtx, arg3);
func_80337B68(gfx, vtx, arg4, arg5);
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_803380A0.s") void func_803380A0(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], Struct84s *arg4, s32 arg5) {
func_803381B4(gfx, mtx, arg3);
func_80337B68(gfx, vtx, arg4, arg5);
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_803380F8.s") void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
f32 sp2C[3];
f32 sp20[3];
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_803381B4.s") func_8024C5CC(sp2C);
sp20[0] = arg2[0] - sp2C[0];
sp20[1] = arg2[1] - sp2C[1];
sp20[2] = arg2[2] - sp2C[2];
func_80251BCC(func_8024DD90());
func_80252330(sp20[0], sp20[1], sp20[2]);
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
void func_803382D8(s32 arg0); void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
void func_803382E4(s32 arg0); f32 sp2C[3];
void func_803382F0(s32 arg0); f32 sp20[3];
void func_803382FC(s32 arg0);
void func_80338308(s32 arg0, s32 arg1); func_8024C5CC(sp2C);
sp20[0] = arg2[0] - sp2C[0];
sp20[1] = arg2[1] - sp2C[1];
sp20[2] = arg2[2] - sp2C[2];
func_80251BCC(func_8024DD9C());
func_80252330(sp20[0], sp20[1], sp20[2]);
mlMtxApply(*mtx);
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
void func_80338270(){ void func_80338270(){
func_803382D8(0xFF); func_803382D8(0xFF);
@@ -425,9 +587,13 @@ void func_80338338(s32 r, s32 g, s32 b){
D_80383618 = b; D_80383618 = b;
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80338354.s") void func_80338354(s32 arg0){
D_8038361C = arg0 / 8 ;
}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80338370.s") void func_80338370(void){
D_80370338[0] = 0;
}
void func_8033837C(s32 arg0){ void func_8033837C(s32 arg0){
D_8037033C = arg0; D_8037033C = arg0;

View File

@@ -52,6 +52,8 @@ segments:
- [0x13680, c, code_13680] - [0x13680, c, code_13680]
- [0x136D0, c, code_136D0] - [0x136D0, c, code_136D0]
- [0x13990, c, code_13990] - [0x13990, c, code_13990]
- [0x155F0, hasm, code_155F0] #DONE
- [0x15630, c, code_15630] #DONE
- [0x15770, c, code_15770] - [0x15770, c, code_15770]
- [0x15B30, c, code_15B30] #DONE - [0x15B30, c, code_15B30] #DONE
- [0x16A50, c, memory] - [0x16A50, c, memory]
@@ -97,7 +99,8 @@ segments:
- [0x227F0, c, done/audio/n_drvrNew] #DONE - [0x227F0, c, done/audio/n_drvrNew] #DONE
- [0x22D50, c, done/audio/n_save] #DONE - [0x22D50, c, done/audio/n_save] #DONE
- [0x22DA0, c, done/audio/n_envresample] #DONE - [0x22DA0, c, done/audio/n_envresample] #DONE
- [0x22E40, c, code_22E40] #n_seqplayer.c - [0x22E40, c, n_env]
- [0x237F0, c, done/audio/n_seqplayer]
- [0x25360, c, done/audio/n_synstartvoiceparam] #DONE - [0x25360, c, done/audio/n_synstartvoiceparam] #DONE
- [0x25440, c, done/audio/n_mainbus] #DONE - [0x25440, c, done/audio/n_mainbus] #DONE
- [0x254C0, c, done/audio/n_load] #DONE - [0x254C0, c, done/audio/n_load] #DONE
@@ -267,7 +270,7 @@ segments:
- [0x39B60, .data, done/io/vimodempallan1] - [0x39B60, .data, done/io/vimodempallan1]
- [0x39B60, .data, done/io/vimodentsclan1] - [0x39B60, .data, done/io/vimodentsclan1]
- [0x39C00, bin, data_39C00] # .rodata, code_1D00] - [0x39C00, bin, data_39C00] # .rodata, code_1D00]
- [0x39C20, bin, data_39C20] # .rodata, code_31C0] - [0x39C20, .rodata, code_31C0]
- [0x39C30, bin, data_39C30] # .rodata, code_3A70] - [0x39C30, bin, data_39C30] # .rodata, code_3A70]
- [0x39CA0, bin, data_39CA0] # .rodata, code_72B0] - [0x39CA0, bin, data_39CA0] # .rodata, code_72B0]
- [0x39CD0, bin, data_39CD0] # .rodata, code_7F60] - [0x39CD0, bin, data_39CD0] # .rodata, code_7F60]
@@ -285,7 +288,7 @@ segments:
- [0x3AD30, bin, data_3AD30] - [0x3AD30, bin, data_3AD30]
- [0x3AD60, .rodata, done/audio/n_drvrNew] - [0x3AD60, .rodata, done/audio/n_drvrNew]
- [0x3AD80, bin, data_3AD80] - [0x3AD80, bin, data_3AD80]
- [0x3ADD0, bin, data_3ADD0] # .rodata, code_22E40] - [0x3ADD0, .rodata, done/audio/n_seqplayer]
- [0x3B180, .rodata, done/audio/n_resample] - [0x3B180, .rodata, done/audio/n_resample]
- [0x3B190, .rodata, done/gu/sinf] - [0x3B190, .rodata, done/gu/sinf]
- [0x3B1E0, .rodata, done/audio/cents2ratio] - [0x3B1E0, .rodata, done/audio/cents2ratio]

View File

@@ -35,7 +35,7 @@ mlMtxRotYaw = 0x80251D84;
mlMtxRotRoll = 0x80251E80; mlMtxRotRoll = 0x80251E80;
mlMtxRotate = 0x80252188; mlMtxRotate = 0x80252188;
mlMtxScale_xyz = 0x802521C0; mlMtxScale_xyz = 0x802521C0;
mlMtxScale = 0x80252280; mlMtxScale = 0x80252280;
mlMtx_apply_vec3s = 0x802525A4; mlMtx_apply_vec3s = 0x802525A4;
mlMtxTranslate = 0x80252980; mlMtxTranslate = 0x80252980;