match jaudio_NES/driver Nas_SynthMain

This commit is contained in:
Cuyler36
2025-10-23 02:52:41 -04:00
committed by abnormalhare
parent 7941d78bf3
commit 9c72faddf6
6 changed files with 532 additions and 483 deletions
+18 -1
View File
@@ -68,6 +68,14 @@ extern "C" {
#define A_CMD_LOADCACHE 24
#define A_CMD_EXIT 25
#define aUnkCmd3(pkt, a1, a2, a3) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_CMD_UNK3, 24, 8) | _SHIFTL(a3, 0, 16); \
_a->words.w1 = _SHIFTL(a1, 16, 16) | _SHIFTL(a2, 0, 16); \
}
#define aHalfCut(pkt, src, dst, len) \
{ \
Acmd *_a = (Acmd *)pkt; \
@@ -84,6 +92,14 @@ extern "C" {
_a->words.w1 = _SHIFTL(rampL, 16, 16) | _SHIFTL(rampR, 0, 16); \
}
#define aLoadCache(pkt, dst, src, len) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_CMD_LOADCACHE, 24, 8) | _SHIFTL((len) >> 4, 16, 8) | _SHIFTL(src, 0, 16); \
_a->words.w1 = (u32)(dst); \
}
#define aLoadBuffer2(pkt, dst, src, len) \
{ \
Acmd *_a = (Acmd *)pkt; \
@@ -234,7 +250,8 @@ typedef enum SoundOutputMode {
/* 0 */ SOUND_OUTPUT_STEREO,
/* 1 */ SOUND_OUTPUT_HEADSET,
/* 2 */ SOUND_OUTPUT_SURROUND,
/* 3 */ SOUND_OUTPUT_MONO
/* 3 */ SOUND_OUTPUT_MONO,
/* 4 */ SOUND_OUTPUT_DOLBY_SURROUND
} SoundOutputMode;
typedef enum SampleCodec {
+1 -1
View File
@@ -322,7 +322,7 @@ typedef struct playbackch_ {
/* 0x54 */ sweep portamento_sweep;
/* 0x60 */ tmtable vibrato_tmtable;
/* 0x7C */ s32 _7C;
/* 0x80 */ u8 _80;
/* 0x80 */ u8 vel_conv_table_idx;
/* 0x84 */ u32 start_sample_pos;
/* 0x88 */ u8 _88[0x18];
} playbackch;
+1 -1
View File
@@ -19,7 +19,7 @@
extern Acmd* Nas_smzAudioFrame(Acmd* cmds, s32* processed_cmds, s16* pSamples, s32 nSamples);
extern Acmd* Nas_DriveRsp(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updateIndex);
extern Acmd* Nas_SynthMain(s32 chan_id, commonch* common, driverch* driver, s16* samples, s32 samples_per_update, Acmd* cmd, s32 update_idx);
extern Acmd* Nas_Synth_Resample(Acmd* cmd, driverch* driver, s32 size, u16 frequencyFixedPoint, u16 sampleDmemBeforeResampling, s32 flags);
extern Acmd* Nas_Synth_Resample(Acmd* cmd, const driverch* driver, s32 size, u16 frequencyFixedPoint, u16 sampleDmemBeforeResampling, s32 flags);
extern Acmd* Nas_DolbySurround(Acmd* cmd, commonch* common, driverch* driver, s32 samples_per_update, s32 dmem, s32 flags);
extern Acmd* Nas_Synth_Envelope(Acmd* cmd, commonch* common, driverch* driver, s32 samples_per_update, u16 dmem, s32 haasEffectDelaySide, s32 flags);
extern Acmd* Nas_Synth_Delay(Acmd* cmd, commonch* common, driverch* driver, s32 size, s32 flags, s32 haasEffectDelaySide);
+1
View File
@@ -61,6 +61,7 @@ extern void Nas_BgCopyInit(void);
extern void MK_Init(void);
extern void Nas_WaveDmaNew(s32 n_channels);
extern Na_SyncProc NA_SYNC_PROC;
extern BOOL AUDIO_SYSTEM_READY;
extern Na_DmaProc NA_DMA_PROC;
extern OSMesgQueue MK_QUEUE;
+3 -3
View File
@@ -805,9 +805,9 @@ extern void Nas_EntryTrack(channel* chan, note* n) {
}
}
playback->_80 = (int)(n->velocity_square2 * 11.5f);
if (playback->_80 > 15) {
playback->_80 = 15;
playback->vel_conv_table_idx = (int)(n->velocity_square2 * 11.5f);
if (playback->vel_conv_table_idx > 15) {
playback->vel_conv_table_idx = 15;
}
playback->bank_id = subtrack->bank_id;
File diff suppressed because it is too large Load Diff