Created inital yaml for decompressed rom, edited makefile to build it and fixed all undefined symbol/multiple definition errors

This commit is contained in:
Mr-Wiseguy
2022-10-28 02:46:26 -04:00
parent cc8a6ffc78
commit e1bf4549e3
174 changed files with 3648 additions and 1282 deletions

View File

@@ -22,12 +22,12 @@ s32 D_8027BEE8;
s32 D_8027BEEC;
u64 D_8027BEF0;
extern u8 D_80286F90;
extern u8 core2_TEXT_START[];
extern u16 D_803A5D00[2][0x1ECC0/2];
void func_8023DA20(s32 arg0){
bzero(&D_8027A130, &D_80286F90 - (u8*)&D_8027A130);
bzero(&D_8027A130, core2_TEXT_START - (u8*)&D_8027A130);
osWriteBackDCacheAll();
sns_find_and_parse_payload();
osInitialize();

View File

@@ -7,7 +7,7 @@
#define CORE2_DATA_CRC2 0
#endif
extern s32 D_803727F4;
extern s32 core1_D_803727F4 = CORE2_DATA_CRC2;
extern struct {
u8 pad0[4];
@@ -74,7 +74,7 @@ f32 func_8024E420(s32 arg0, s32 arg1, s32 arg2) {
f32 phi_f2;
phi_f2 = 0.0125f;
if ((D_80379B90.unk4 != D_803727F4) || (D_80379B90.unkC != D_80276574)) {
if ((D_80379B90.unk4 != core1_D_803727F4) || (D_80379B90.unkC != D_80276574)) {
phi_f2 = 0.00625f;
}
if (arg0 > 0) {

View File

@@ -707,7 +707,7 @@ f32 func_80257AD4(f32 val1, f32 val2)
return sinf((func_802588B0(val1, val2) / val2) * (2*BAD_PI));
}
f32 ml_f_map(f32 a, f32 b, f32 c, f32 d, f32 e)
f32 ml_map_f(f32 a, f32 b, f32 c, f32 d, f32 e)
{
f32 val;
@@ -756,9 +756,9 @@ f32 func_80257C48(f32 arg0, f32 arg1, f32 arg2)
f32 func_80257C60(f32 a, f32 b, f32 c, f32 d, f32 e, f32 (*func)(f32))
{
f32 val = func(ml_f_map(a, b, c, 0.f, 1.f));
f32 val = func(ml_map_f(a, b, c, 0.f, 1.f));
return ml_f_map(val, 0, 1, d, e);
return ml_map_f(val, 0, 1, d, e);
}
f32 func_80257CC0(f32 a, f32 b, f32 c, f32 d, f32 e)
@@ -774,9 +774,9 @@ f32 func_80257CF8(f32 a, f32 b, f32 c, f32 d, f32 e)
f32 func_80257D30(f32 a, f32 b, f32 c, f32 d, f32 e)
{
if (a < 0)
return ml_f_map(a, -b, -c, -d, -e);
return ml_map_f(a, -b, -c, -d, -e);
else
return ml_f_map(a, b, c, d, e);
return ml_map_f(a, b, c, d, e);
}
void func_80257DB0(f32 arg0[3], f32 arg1[3], f32 arg2[3])

View File

@@ -373,7 +373,7 @@ bool amgr_handleFrameMsg(AudioInfo *info, AudioInfo *prev_info){
func_802403F0();
func_8023FFAC();
if(prev_info){
sp30 = osAiSetNextBuf(prev_info->data, prev_info->frameSamples*4);
sp30 = osAiSetNextBuffer(prev_info->data, prev_info->frameSamples*4);
}//L8024003C
if(sp30 == -1){
func_80247F24(2, 0x7d2);

View File

@@ -81,7 +81,7 @@ volatile s32 D_8028062C;
Struct_Core1_8C50_s * D_80280630[20];
volatile s32 D_80280680;
volatile s32 D_80280684;
s32 D_80280688;
void* D_80280688;
OSTimer D_80280690; //audio_timer
OSTimer D_802806B0; //controller_timer
s32 D_802806D0;
@@ -216,7 +216,7 @@ void func_80246B94(void){
void func_80246C2C(void){
if((D_8027FC14 << 1) < 0){
osDpSetStatus(DPC_SET_FREEZE);
D_80280688 = osViGetCurrFrameBuffer();
D_80280688 = osViGetCurrentFramebuffer();
func_8024BFAC();
}
D_8027FC14 = D_8027FC18 = 2;
@@ -239,7 +239,7 @@ void func_80246D78(void){
volatile s32 sp30;
sp30 = FALSE;
if( osViGetCurrFrameBuffer() != D_80280688 || sp2C){
if( osViGetCurrentFramebuffer() != D_80280688 || sp2C){
if(osDpGetStatus() & DPC_STATUS_FREEZE){
osDpSetStatus(DPC_CLR_FREEZE);

View File

@@ -122,7 +122,7 @@ void func_8024BFD8(s32 arg0){
osViSwapBuffer(D_803A5D00[D_80280720 = func_8024BD80()]);
D_80280E90 = 0;
while(!(osDpGetStatus() & 2) && osViGetCurrFrameBuffer() != osViGetNextFrameBuffer()){
while(!(osDpGetStatus() & 2) && osViGetCurrentFramebuffer() != osViGetNextFramebuffer()){
osRecvMesg(&D_802807D0, NULL, OS_MESG_BLOCK);
D_80280E90++;
}//L8024C178

View File

@@ -67,7 +67,7 @@ static s32 NULL_PARAMS[10] = {
0, 0, 0, 0, 0, 0, 0, 0
};
void init_lpfilter(ALLowPass *lp)
void _init_lpfilter(ALLowPass *lp)
{
s32 i, temp;
s16 fc;
@@ -168,7 +168,7 @@ void alFxNew(ALFx *r, ALSynConfig *c, ALHeap *hp)
d->lp = alHeapAlloc(hp, 1, sizeof(ALLowPass));
d->lp->fstate = alHeapAlloc(hp, 1, sizeof(POLEF_STATE));
d->lp->fc = param[j++];
init_lpfilter(d->lp);
_init_lpfilter(d->lp);
} else {
d->lp = 0;
j++;

View File

@@ -56,7 +56,7 @@ void n_alCSPNew(N_ALCSPlayer *seqp, ALSeqpConfig *c)
*/
seqp->maxChannels = c->maxChannels;
seqp->chanState = alHeapAlloc(hp, c->maxChannels, sizeof(ALChanState) );
__initChanState((ALSeqPlayer*)seqp); /* sct 11/6/95 */
__n_initChanState((ALSeqPlayer*)seqp); /* sct 11/6/95 */
/*
* init the voice state array
@@ -120,8 +120,8 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
n_alSynFreeVoice(voice);
vs = (ALVoiceState *)voice->clientPrivate;
if(vs->flags)
__seqpStopOsc((ALSeqPlayer*)seqp,vs);
__unmapVoice((ALSeqPlayer*)seqp, voice);
__n_seqpStopOsc((ALSeqPlayer*)seqp,vs);
__n_unmapVoice((ALSeqPlayer*)seqp, voice);
break;
case (AL_SEQP_ENV_EVT):
@@ -134,7 +134,7 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
delta = seqp->nextEvent.msg.vol.delta;
vs->envEndTime = seqp->curTime + delta;
vs->envGain = seqp->nextEvent.msg.vol.vol;
n_alSynSetVol(voice, __vsVol(vs, (ALSeqPlayer*)seqp), delta);
n_alSynSetVol(voice, __n_vsVol(vs, (ALSeqPlayer*)seqp), delta);
break;
case (AL_TREM_OSC_EVT):
@@ -142,8 +142,8 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
oscState = seqp->nextEvent.msg.osc.oscState;
delta = (*seqp->updateOsc)(oscState,&oscValue);
vs->tremelo = (u8)oscValue;
n_alSynSetVol(&vs->voice, __vsVol(vs,(ALSeqPlayer*)seqp),
__vsDelta(vs,seqp->curTime));
n_alSynSetVol(&vs->voice, __n_vsVol(vs,(ALSeqPlayer*)seqp),
__n_vsDelta(vs,seqp->curTime));
evt.type = AL_TREM_OSC_EVT;
evt.msg.osc.vs = vs;
evt.msg.osc.oscState = oscState;
@@ -179,8 +179,8 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
for (vs = seqp->vAllocHead; vs != 0; vs = vs->next)
{
n_alSynSetVol(&vs->voice,
__vsVol(vs, (ALSeqPlayer*)seqp),
__vsDelta(vs, seqp->curTime));
__n_vsVol(vs, (ALSeqPlayer*)seqp),
__n_vsDelta(vs, seqp->curTime));
}
break;
@@ -204,8 +204,8 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
n_alSynStopVoice(&vs->voice);
n_alSynFreeVoice(&vs->voice);
if(vs->flags)
__seqpStopOsc((ALSeqPlayer*)seqp,vs);
__unmapVoice((ALSeqPlayer*)seqp, &vs->voice);
__n_seqpStopOsc((ALSeqPlayer*)seqp,vs);
__n_unmapVoice((ALSeqPlayer*)seqp, &vs->voice);
}
seqp->state = AL_STOPPED;
@@ -243,8 +243,8 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
occurring prior to KILL_TIME. */
for (vs = seqp->vAllocHead; vs != 0; vs = vs->next)
{
if (__voiceNeedsNoteKill ((ALSeqPlayer*)seqp, &vs->voice, KILL_TIME))
__seqpReleaseVoice((ALSeqPlayer*)seqp, &vs->voice, KILL_TIME);
if (__n_voiceNeedsNoteKill ((ALSeqPlayer*)seqp, &vs->voice, KILL_TIME))
__n_seqpReleaseVoice((ALSeqPlayer*)seqp, &vs->voice, KILL_TIME);
}
seqp->state = AL_STOPPING;
@@ -265,7 +265,7 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
seqp->target = seqp->nextEvent.msg.spseq.seq;
seqp->chanMask = 0xFFFF;
if (seqp->bank)
__initFromBank((ALSeqPlayer *)seqp, seqp->bank);
__n_initFromBank((ALSeqPlayer *)seqp, seqp->bank);
break;
case (AL_SEQP_BANK_EVT):
@@ -273,7 +273,7 @@ static ALMicroTime __n_CSPVoiceHandler(void *node)
((seqp->state == AL_STOPPED)?((void)0):func_8033F000("seqp->state == AL_STOPPED","n_csplayer.c", 283));
seqp->bank = seqp->nextEvent.msg.spbank.bank;
__initFromBank((ALSeqPlayer *)seqp, seqp->bank);
__n_initFromBank((ALSeqPlayer *)seqp, seqp->bank);
break;
/* sct 11/6/95 - these events should now be handled by __n_CSPHandleNextSeqEvent */
@@ -402,7 +402,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
vstate = seqp->vAllocHead;
while(vs){
if(vstate->channel == byte2){
__seqpReleaseVoice(seqp, &vstate->voice.node.next, vstate->sound->envelope->releaseTime);
__n_seqpReleaseVoice(seqp, &vstate->voice.node.next, vstate->sound->envelope->releaseTime);
}
vs = vs->next;
}
@@ -435,7 +435,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
if (seqp->state != AL_PLAYING)
break;
sound = __lookupSoundQuick((ALSeqPlayer*)seqp, key, vel, chan);
sound = __n_lookupSoundQuick((ALSeqPlayer*)seqp, key, vel, chan);
ALFlagFailIf(!sound, seqp->debugFlags & NO_SOUND_ERR_MASK,
ERR_ALSEQP_NO_SOUND);
@@ -443,7 +443,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
config.fxBus = 0;
config.unityPitch = 0;
vstate = __mapVoice((ALSeqPlayer*)seqp, key, vel, chan);
vstate = __n_mapVoice((ALSeqPlayer*)seqp, key, vel, chan);
ALFlagFailIf(!vstate, seqp->debugFlags & NO_VOICE_ERR_MASK,
ERR_ALSEQP_NO_VOICE );
@@ -521,8 +521,8 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
pitch = vstate->pitch * seqp->chanState[chan].pitchBend *
vstate->vibrato;
fxmix = seqp->chanState[chan].fxmix;
pan = __vsPan(vstate, (ALSeqPlayer*)seqp);
vol = __vsVol(vstate, (ALSeqPlayer*)seqp);
pan = __n_vsPan(vstate, (ALSeqPlayer*)seqp);
vol = __n_vsVol(vstate, (ALSeqPlayer*)seqp);
deltaTime = sound->envelope->attackTime;
n_alSynStartVoiceParams(voice, sound->wavetable,
@@ -562,7 +562,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
*/
case (AL_MIDI_NoteOff):
vstate = __lookupVoice((ALSeqPlayer*)seqp, key, chan);
vstate = __n_lookupVoice((ALSeqPlayer*)seqp, key, chan);
ALFlagFailIf(!vstate, seqp->debugFlags & NOTE_OFF_ERR_MASK,
ERR_ALSEQP_OFF_VOICE );
@@ -571,7 +571,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
else
{
vstate->phase = AL_PHASE_RELEASE;
__seqpReleaseVoice((ALSeqPlayer*)seqp, &vstate->voice,
__n_seqpReleaseVoice((ALSeqPlayer*)seqp, &vstate->voice,
vstate->sound->envelope->releaseTime);
}
@@ -583,13 +583,13 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
* aftertouch affects only notes that are already
* sounding.
*/
vstate = __lookupVoice((ALSeqPlayer*)seqp, key, chan);
vstate = __n_lookupVoice((ALSeqPlayer*)seqp, key, chan);
ALFailIf(!vstate, ERR_ALSEQP_POLY_VOICE );
vstate->velocity = byte2;
n_alSynSetVol(&vstate->voice,
__vsVol(vstate, (ALSeqPlayer*)seqp),
__vsDelta(vstate,seqp->curTime));
__n_vsVol(vstate, (ALSeqPlayer*)seqp),
__n_vsDelta(vstate,seqp->curTime));
break;
case (AL_MIDI_ChannelPressure):
@@ -602,8 +602,8 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
if (vs->channel == chan) {
vs->velocity = byte1;
n_alSynSetVol(&vs->voice,
__vsVol(vs, (ALSeqPlayer*)seqp),
__vsDelta(vs,seqp->curTime));
__n_vsVol(vs, (ALSeqPlayer*)seqp),
__n_vsDelta(vs,seqp->curTime));
}
}
break;
@@ -617,7 +617,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
{
if (vs->channel == chan)
{
pan = __vsPan(vs, (ALSeqPlayer*)seqp);
pan = __n_vsPan(vs, (ALSeqPlayer*)seqp);
n_alSynSetPan(&vs->voice, pan);
}
}
@@ -629,9 +629,9 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
{
if ((vs->channel == chan) && (vs->envPhase != AL_PHASE_RELEASE))
{
vol = __vsVol(vs, (ALSeqPlayer*)seqp);
vol = __n_vsVol(vs, (ALSeqPlayer*)seqp);
n_alSynSetVol(&vs->voice, vol,
__vsDelta(vs,seqp->curTime));
__n_vsDelta(vs,seqp->curTime));
}
}
break;
@@ -641,9 +641,9 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
{
if ((vs->channel == chan) && (vs->envPhase != AL_PHASE_RELEASE))
{
vol = __vsVol(vs, (ALSeqPlayer*)seqp);
vol = __n_vsVol(vs, (ALSeqPlayer*)seqp);
n_alSynSetVol(&vs->voice, vol,
__vsDelta(vs,seqp->curTime));
__n_vsDelta(vs,seqp->curTime));
}
}
break;
@@ -676,7 +676,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
else if(vs->phase == AL_PHASE_SUSTREL)
{
vs->phase = AL_PHASE_RELEASE;
__seqpReleaseVoice((ALSeqPlayer*)seqp,
__n_seqpReleaseVoice((ALSeqPlayer*)seqp,
&vs->voice,
vs->sound->envelope->releaseTime);
}
@@ -719,7 +719,7 @@ static void __n_CSPHandleMIDIMsg(N_ALCSPlayer *seqp, N_ALEvent *event)
if (key < seqp->bank->instCount)
{
ALInstrument *inst = seqp->bank->instArray[key];
__setInstChanState((ALSeqPlayer*)seqp, inst, chan); /* sct 11/6/95 */
__n_setInstChanState((ALSeqPlayer*)seqp, inst, chan); /* sct 11/6/95 */
}
else
{

View File

@@ -218,7 +218,7 @@ Acmd *n_alEnvmixerPull(void *filter, s32 sampleOffset, Acmd *p)
* Changing to STOPPED and reset the filter
*/
ptr = __n_pullSubFrame(e, &inp, &loutp, samples, ptr);
n_alEnvmixerResampleParam(e, 4, 0);
n_alEnvmixerParam(e, 4, 0);
}
break;
@@ -252,7 +252,7 @@ Acmd *n_alEnvmixerPull(void *filter, s32 sampleOffset, Acmd *p)
* on down the chain
*/
ptr = __n_pullSubFrame(e, &inp, &loutp, samples, ptr);
n_alEnvmixerResampleParam(e, e->em_ctrlList->type, e->em_ctrlList->data.i);
n_alEnvmixerParam(e, e->em_ctrlList->type, e->em_ctrlList->data.i);
break;
}
loutp += (samples<<1);

View File

@@ -2,7 +2,7 @@
#include "n_synth.h"
s32
int
n_alEnvmixerParam(N_PVoice *filter, s32 paramID, void *param)
{
N_PVoice *e = filter;

View File

@@ -45,7 +45,7 @@ s32 n_alSynAllocVoice( N_ALVoice *voice, ALVoiceConfig *vc)
update->type = AL_FILTER_SET_VOLUME;
update->data.i = 0;
update->moredata.i = pvoice->offset - 64;
n_alEnvmixerResampleParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
/*
* stop stolen voice
@@ -55,7 +55,7 @@ s32 n_alSynAllocVoice( N_ALVoice *voice, ALVoiceConfig *vc)
update->delta = n_syn->paramSamples + pvoice->offset;
update->type = AL_FILTER_STOP_VOICE;
update->next = 0;
n_alEnvmixerResampleParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
} else {
#ifdef _DEBUG
__osError(ERR_ALSYN_NO_UPDATE, 0);

View File

@@ -19,7 +19,7 @@ void n_alSynFreeVoice(N_ALVoice *voice)
update->type = AL_FILTER_FREE_VOICE;
update->pvoice = (PVoice *)voice->pvoice;
n_alEnvmixerResampleParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
} else {
_n_freePVoice(voice->pvoice);
}

View File

@@ -24,6 +24,6 @@ void n_alSynSetFXMix(N_ALVoice *v, u8 fxmix)
update->data.i = fxmix;
update->next = 0;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -22,6 +22,6 @@ void n_alSynSetPan(N_ALVoice *v, u8 pan)
update->data.i = pan;
update->next = 0;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -22,6 +22,6 @@ void n_alSynSetPitch( N_ALVoice *v, f32 pitch)
update->data.f = pitch;
update->next = 0;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -25,6 +25,6 @@ void n_alSynSetVol( N_ALVoice *v, s16 volume, ALMicroTime t)
//f = v->pvoice->channelKnob;
//(*f->setParam)(f, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -43,7 +43,7 @@ void n_alSynStartVoice( N_ALVoice *v, ALWaveTable *table)
update->next = 0;
update->unity = v->unityPitch;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -36,7 +36,7 @@ void n_alSynStartVoiceParams(N_ALVoice *v, ALWaveTable *w,
update->samples = _n_timeToSamples( t);
update->wave = w;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -15,6 +15,6 @@ void n_alSynStopVoice( N_ALVoice *v)
update->type = AL_FILTER_STOP_VOICE;
update->next = 0;
n_alEnvmixerResampleParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update);
}
}

View File

@@ -213,7 +213,7 @@ Acmd *n_alAudioFrame(Acmd *cmdList, s32 *cmdLen, s16 *outBuf, s32 outLen)
* Synthesis driver private interfaces
***********************************************************************/
ALParam *__allocParam()
ALParam *__n_allocParam()
{
ALParam *update = 0;

View File

@@ -207,7 +207,7 @@ s32 alFxParamHdl(void *filter, s32 paramID, void *param)
if(f->delay[s].lp)
{
f->delay[s].lp->fc = (s16)val;
init_lpfilter(f->delay[s].lp);
_init_lpfilter(f->delay[s].lp);
}
break;
}