Implement & link jaudio_NES/game64.c

Co-authored-by: roeming <roeming@users.noreply.github.com>
This commit is contained in:
Cuyler36
2025-04-17 01:53:17 -04:00
parent 78242ae813
commit ebb0647e7b
23 changed files with 4311 additions and 352 deletions
+1 -1
View File
@@ -702,7 +702,7 @@ config.libs = [
Object(Matching, "jaudio_NES/game/audioheaders.c"),
Object(Matching, "jaudio_NES/game/dummyprobe.c"),
Object(Matching, "jaudio_NES/game/emusound.c", extra_cflags=["-O4,s", "-fp_contract on", "-func_align 32", "-vector on"]),
Object(NonMatching, "jaudio_NES/game/game64.c"),
Object(Matching, "jaudio_NES/game/game64.c"),
Object(Matching, "jaudio_NES/game/kappa.c"),
Object(Matching, "jaudio_NES/game/melody.c"),
Object(Matching, "jaudio_NES/game/radio.c"),
+1
View File
@@ -3,6 +3,7 @@
#include "types.h"
// #include "va_args.h"
#include "libc/stdarg.h"
#ifdef __cplusplus
extern "C" {
+3 -3
View File
@@ -65,7 +65,7 @@ extern void sAdo_PlyWalkSeRoom(u8 walk, const xyz_t* pos);
extern void sAdo_NpcWalkSe(u16 se_no, const xyz_t* pos);
extern void sAdo_NpcWalkSeRoom(u8 se_no, const xyz_t* pos);
extern void sAdo_PlayerStatusLevel(f32 speed, int p);
extern void sAdo_PlayerStatusLevel(u8 dash, f32 speed);
/* Not sure about the last param name */
extern void sAdo_VoiceSe(u8 num, u8 num2, u8 num3, s16 character_idx, u8 scale, u8 mode);
@@ -103,7 +103,7 @@ extern s8 sAdo_InstCountGet();
extern void sAdo_RhythmPos(u32 id, u8 haniwa_id, const xyz_t* pos);
extern void sAdo_SpecChange(int spec);
extern void sAdo_MDPlayerPos(const xyz_t* pos, u16 s1, u16 s2, int p);
extern void sAdo_MDPlayerPos(const xyz_t* pos, u16 s1, u16 s2, u32 p);
extern void sAdo_BGMVolume(f32 f, u16 volume);
extern void sAdo_BgmCrossfadeStart(u8 b);
@@ -141,7 +141,7 @@ extern u16 sAdo_Get_WalkLabel(int type);
extern u16 sAdo_Get_KokeruLabel(int type);
extern void sAdo_SceneMode(u8 mode);
extern u8 sAdo_RoomIncectPos(u32 f, u16 u, const xyz_t* pos);
extern u8 sAdo_RoomIncectPos(u32 f, u8 u, const xyz_t* pos);
extern void sAdo_FurnitureInstPos(u32 id, const xyz_t* pos);
extern void sAdo_Set_ongenpos_refuse_fg(int state);
+14
View File
@@ -0,0 +1,14 @@
#ifndef OSATTENTION_H_
#define OSATTENTION_H_
#ifdef __cplusplus
extern "C" {
#endif // !__cplusplus
int OSAttention(const char* c, ...);
#ifdef __cplusplus
}
#endif // !__cplusplus
#endif // !OSATTENTION_H_
+7 -2
View File
@@ -1,6 +1,11 @@
#ifndef ARAMCALL_H
#define ARAMCALL_H
#include "types.h"
void Jac_WaveDirectorySet(char*);
#include "jaudio_NES/heapctrl.h"
#endif
void Jac_WaveDirectorySet(char*);
void Jac_RegisterARAMCallback(u32 (*callback)(char*, u32, u32, u32*, JAHEAP*));
void Init_AramMotherHeap();
JAHEAP* Get_AramMotherHeap();
#endif
+2 -2
View File
@@ -9,12 +9,12 @@
#define DUMMYROM_ARAM_TO_DRAM 1
extern u8* JAC_ARAM_DMA_BUFFER_TOP;
ALHeap aram_hp; /* placed in common bss */
extern ALHeap aram_hp; /* placed in common bss */
extern u32 GetNeos_FileTop(void);
extern u32 GetNeosRomTop(void);
extern u32 GetNeosRom_PreLoaded(void);
extern void SetPreCopy_NeosRom(u8* load_addr, u32 load_size, BOOL cut_flag);
extern u32 SetPreCopy_NeosRom(u8* load_addr, u32 load_size, BOOL cut_flag);
extern BOOL ARAMStartDMAmesg(u32 dir, u32 dramAddr, u32 aramAddr, u32 size, s32 unused, OSMesgQueue* mq);
extern void Jac_SetAudioARAMSize(u32 size);
extern void ARAllocFull(u32* outSize);
+1 -1
View File
@@ -20,7 +20,7 @@ extern s32 DVDT_DRAMtoARAM_Main(void* arg);
extern s32 DVDT_ARAMtoDRAM(u32 owner, u32 dst, u32 src, u32 length, u32* status, Jac_DVDCallback callback);
extern s32 DVDT_DRAMtoARAM(u32 owner, u32 dst, u32 src, u32 length, u32* status, Jac_DVDCallback callback);
extern s32 DVDT_CheckFile(char* file);
extern void DVDT_CheckPass(u32 owner, u32* status, Jac_DVDCallback callback);
extern s32 DVDT_CheckPass(u32 owner, u32* status, Jac_DVDCallback callback);
extern s32 Jac_CheckFile(char* file);
extern void Jac_RegisterDVDErrorCallback(ErrorCallback callback);
extern s32 Jac_RegisterFastOpen(char* file);
+37 -19
View File
@@ -2,14 +2,21 @@
#define GAME64_H
#include "types.h"
#include "libc/stdarg.h"
#ifdef __cplusplus
extern "C" {
#endif
f32 distance2vol4KITEKI(f32);
f32 distance2vol4MD(f32);
extern void Na_InitAudio(void (*fatal_callback)(), u8* load_addr, size_t load_size, u8* bootsound,
size_t bootsound_size, BOOL cut_flag);
extern void Na_GameFrame();
extern void Na_Reset();
extern void Na_SoftReset();
extern void Na_Tenki(u8);
extern void Na_BgmStart(u8);
extern void Na_BgmCrossfadeStart(u8);
extern void Na_BgmStop(u16);
@@ -18,49 +25,60 @@ extern void Na_PlyWalkSe(u16, u16, f32);
extern void Na_PlyWalkSeRoom(u8, u16, f32);
extern void Na_NpcWalkSe(u16, u16, f32);
extern void Na_NpcWalkSeRoom(u8, u16, f32);
extern void Na_PlayerStatusLevel(f32, int);
// #ifdef BUGFIXES
extern void Na_PlayerStatusLevel(u8, f32);
// #endif // BUGFIXES
extern void Na_VoiceSe(u8, u8, u8, s16, u8, u8);
extern void Na_MessageStatus(u8);
extern void Na_MessageSpeed(u8);
extern u8 Na_MessageSpeedGet();
extern void Na_SysLevStart(u8);
extern void Na_SysLevStop(u8);
extern void Na_OngenPos(u32, u8, u16, f32);
extern void Na_OngenTrgStartSpeed(u16, u16, f32, f32);
extern void Na_OngenTrgStart(u16, u16, f32);
extern void Na_SetOutMode(u8);
extern void Na_SetVoiceMode(u8);
extern void Na_FloorTrgStart(u8, u16, f32);
extern void Na_SysLevStart(u8);
extern void Na_SysLevStop(u8);
extern void Na_Pause(u8);
extern void Na_RhythmPos(u32, u8, u16, f32);
extern void Na_SpecChange(int);
extern void Na_MDPlayerPos(u16, u16, u16, int, f32);
extern void Na_MDPlayerPos(u16 a, f32 e, u16 b, u16 c, u32 d);
extern void Na_BGMVolume(f32, u16);
extern void Na_SubGameStart();
extern void Na_SubGameEnd();
extern void Na_RestartPrepare();
extern u8 Na_CheckRestartReady();
extern void Na_Restart();
extern u8 Na_SubGameOK();
extern void Na_Tenki(u8);
extern void Na_KishaStatusTrg(u8);
extern void Na_KishaStatusLevel(f32 speed, u32 ongenNum1, u16 angle1, f32 distance1, u32 ongenNum2, u16 angle2,
f32 distance2);
extern void Na_TTKK_ARM(u8);
extern void Na_OngenTrgStartSpeed(u16, u16, f32, f32);
extern void Na_BgmMuteClear();
extern u8 Na_BgmFadeoutCheck();
extern u8 Na_SeFadeoutCheck();
extern void Na_BgmTrOn(u8 a);
extern void Na_BgmTrOff(u8 a);
extern void Na_SubGameStart();
extern void Na_SubGameEnd();
extern void Na_SceneMode(u8);
extern u8 Na_RoomIncectPos(int, u8, u16, f32);
extern void Na_FurnitureInstPos(int, u16, f32);
extern void Na_TrgSeEcho(u8);
extern void Na_LevSeEcho(u8);
extern void Na_BgmFadeoutCheck();
extern void Na_SeFadeoutCheck();
extern void Na_BGMFilter(u8);
extern void Na_RoomType(u8);
extern u8 Na_CheckNeosBoot();
extern void Na_Museum(u8);
extern void Na_SoftReset();
extern void Na_SceneMode(u8);
extern u8 Na_RoomIncectPos(int, u16, u16, f32);
extern void Na_FurnitureInstPos(int, u16, f32);
extern int Na_GetSoundFrameCounter();
extern void Na_kazagurumaLevel(f32);
extern u8 Na_CheckNeosBoot();
extern void Na_RestartPrepare();
extern u8 Na_CheckRestartReady();
extern void Na_Restart();
extern void Na_Reset();
// __declspec(weak) extern int OSAttention(const char* msg, ...) {
// va_list marker;
// va_start(marker, msg);
// return vprintf(msg, marker);
// }
extern u8 sou_now_bgm_handle;
extern u8 sou_chime_status;
+43 -1
View File
@@ -5,7 +5,49 @@
#include "jaudio_NES/game64.h"
/* C++ linkage */
extern void Sou_lev_ongen_data_struct_clear();
extern void Sou_BgmFadeoutEndCheck();
extern u8 Sou_BgmTenkiConv(u8);
extern void Sou_GroupControl(u8, u8, f32);
extern void Sou_GroupControl_MD(u8, u8, f32);
extern u8 pan_kochou(u8, f32);
extern u8 angle2pan(u16 angle, f32 dist);
extern f32 distance2vol(f32 distance);
extern void Sou_VoiceStart(u8, u8);
extern void Sou_TrgStart(u16, f32, f32, f32, u8, u8, f32);
extern void Sou_SpecialRoutine00();
extern void Sou_SpecialRoutine02();
extern void Sou_SpecialRoutine03();
extern void Sou_TrgEndCheck();
extern void Sou_LevStart(u8, u8);
extern void Sou_LevStop(u8, u8);
extern void Sou_TrgMake(u8);
extern void Sou_VoiceMake(u8);
extern void Sou_LevMake(u8);
extern void Sou_ChimeMake();
extern void Sou_LevSet(u8);
extern void Sou_Insect_Lev_Cont();
extern void Sou_Ongen_Lev_Cont();
extern void Sou_Ongen_Lev_Prog(u8);
extern void Sou_BgmStart(u8, u16);
extern void Sou_BGMVolMove();
extern void Sou_Na_BgmStart(u8);
extern void Sou_Na_BgmStop(u16);
extern void Sou_SpecialRoutine06();
extern void Sou_SpecialRoutine07();
extern void Sou_SeFadeoutRoutine();
extern void Sou_SeFadeinRoutine();
extern void Sou_SeVolumeReset();
extern void Sou_SeTrFadeout(u8, u16);
extern void Sou_SeFadeout(u16);
extern void Sou_SpecialRoutine08();
extern void Sou_SpecialRoutine10();
extern void Sou_InitAudio();
extern void Sou_DVD_Error(char*, u8*);
extern void Sou_WalkSe(u16, u16, f32, u8, f32);
extern u8 Sou_TanboinHenkan(u8, u8);
extern u8 Sou_ChouboinHenkan(u8, u8);
extern u8 Sou_ConnectCheck(u8, u8, u8);
extern u8 Sou_BoinShiinCheck(u8);
extern void Sou_PosTrgStart(u16, u16, f32, u8, f32);
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef HEAPCTRL_H
#define HEAPCTRL_H
#include "types.h"
typedef struct jaheap_ {
void* _00;
void* _04;
void* _08;
} JAHEAP;
JAHEAP* Jac_AllocHeap(jaheap_*, jaheap_*, unsigned long);
#endif
+1 -1
View File
@@ -15,7 +15,7 @@ extern s16 Na_MelodyGetSubTrackNum(s16 inst);
extern void Na_FurnitureInst(u32 id, u8 inst, u8* melody, u16 angle, f32 dist);
extern void Na_MelodyVoice(s16 voice);
extern u32 na_melody_id_hist[];
extern u32 na_melody_id_hist[2];
#ifdef __cplusplus
}
+3 -2
View File
@@ -9,10 +9,11 @@ extern "C" {
typedef struct seqp seqp; // TODO
void Jaq_Reset(void);
void Jaq_SetSeqData(seqp* seqp, u8* param_2, u32 param_3, int param_4);
s32 Jaq_SetSeqData(seqp* seqp, u8* param_2, u32 param_3, int param_4);
s32 Jaq_StartSeq(u8);
#ifdef __cplusplus
}
#endif
#endif
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef WAVEREAD_H
#define WAVEREAD_H
#include "types.h"
int WaveScene_Set(u32, u32);
void Wavegroup_Init();
int Wavegroup_Regist(void*, u32);
#endif
+8
View File
@@ -3,6 +3,10 @@
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
int unk0;
@@ -31,4 +35,8 @@ int sprintf(char *s, const char *format, ...);
int vprintf(const char *format, va_list arg);
int vsprintf(char *s, const char *format, va_list arg);
#ifdef __cplusplus
}
#endif
#endif
+5 -66
View File
@@ -14,7 +14,6 @@
int S_ongenpos_refuse_fg;
static void sAdo_Calc_MicPosition_common(f32* fcalc, u16* scalc, const xyz_t* pos) {
f32 diff;
xyz_t posd;
xyz_t* camera_pos;
@@ -36,12 +35,10 @@ static void sAdo_Calc_MicPosition_common(f32* fcalc, u16* scalc, const xyz_t* po
}
extern void sAdo_Calc_MicPosition_forTrig(f32* fcalc, u16* scalc, const xyz_t* pos) {
sAdo_Calc_MicPosition_common(fcalc, scalc, pos);
}
extern void sAdo_Calc_MicPosition_forLevel(f32* fcalc, u16* scalc, const xyz_t* pos) {
sAdo_Calc_MicPosition_common(fcalc, scalc, pos);
}
@@ -61,7 +58,6 @@ extern void sAdo_SysTrgStart(u16 id) {
}
extern void sAdo_PlyWalkSe(u16 walk, const xyz_t* pos) {
f32 fcalc;
u16 scalc;
sAdo_Calc_MicPosition_forTrig(&fcalc, &scalc, pos);
@@ -70,7 +66,6 @@ extern void sAdo_PlyWalkSe(u16 walk, const xyz_t* pos) {
}
extern void sAdo_PlyWalkSeRoom(u8 walk, const xyz_t* pos) {
f32 fcalc;
u16 scalc;
sAdo_Calc_MicPosition_forTrig(&fcalc, &scalc, pos);
@@ -79,7 +74,6 @@ extern void sAdo_PlyWalkSeRoom(u8 walk, const xyz_t* pos) {
}
extern void sAdo_NpcWalkSe(u16 se_no, const xyz_t* pos) {
f32 fcalc;
u16 scalc;
sAdo_Calc_MicPosition_forTrig(&fcalc, &scalc, pos);
@@ -88,7 +82,6 @@ extern void sAdo_NpcWalkSe(u16 se_no, const xyz_t* pos) {
}
extern void sAdo_NpcWalkSeRoom(u8 se_no, const xyz_t* pos) {
f32 fcalc;
u16 scalc;
sAdo_Calc_MicPosition_forTrig(&fcalc, &scalc, pos);
@@ -96,13 +89,11 @@ extern void sAdo_NpcWalkSeRoom(u8 se_no, const xyz_t* pos) {
Na_NpcWalkSeRoom(se_no, scalc, fcalc);
}
extern void sAdo_PlayerStatusLevel(f32 speed, int p) {
Na_PlayerStatusLevel(speed, p);
extern void sAdo_PlayerStatusLevel(u8 dash, f32 speed) {
Na_PlayerStatusLevel(dash, speed);
}
extern void sAdo_VoiceSe(u8 num, u8 num2, u8 num3, s16 character_idx, u8 scale, u8 mode) {
Na_VoiceSe(num, num2, num3, character_idx, scale, mode);
}
@@ -111,32 +102,26 @@ extern void sAdo_Inst(u16 num, u8* p) {
}
extern void sAdo_MessageStatus(u8 status) {
Na_MessageStatus(status);
}
extern void sAdo_MessageSpeed(u8 speed) {
Na_MessageSpeed(speed);
}
extern u8 sAdo_MessageSpeedGet() {
return Na_MessageSpeedGet();
}
extern void sAdo_SysLevStart(u8 id) {
Na_SysLevStart(id);
}
extern void sAdo_SysLevStop(u8 id) {
Na_SysLevStop(id);
}
extern void sAdo_OngenPos(u32 p1, u8 p2, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -147,7 +132,6 @@ extern void sAdo_OngenPos(u32 p1, u8 p2, const xyz_t* pos) {
}
extern void sAdo_OngenTrgStart(u16 id, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -156,7 +140,6 @@ extern void sAdo_OngenTrgStart(u16 id, const xyz_t* pos) {
}
extern void sAdo_SetOutMode(u8 mode) {
if (OSGetSoundMode() == 0) {
Na_SetOutMode(1);
} else if (mode == 1) {
@@ -167,12 +150,10 @@ extern void sAdo_SetOutMode(u8 mode) {
}
extern void sAdo_SetVoiceMode(u8 mode) {
Na_SetVoiceMode(mode);
}
extern void sAdo_FloorTrgStart(u8 id, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -181,22 +162,18 @@ extern void sAdo_FloorTrgStart(u8 id, const xyz_t* pos) {
}
extern void sAdo_RhythmStart(u32 p, s8 type, s8 wait) {
Na_RhythmStart(p, type, wait);
}
extern void sAdo_RhythmStop(u32 p) {
Na_RhythmStop(p);
}
extern void sAdo_RhythmAllStop() {
Na_RhythmAllStop();
}
extern void sAdo_FurnitureInst(u32 id, u8 inst, u8* melody, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -205,22 +182,18 @@ extern void sAdo_FurnitureInst(u32 id, u8 inst, u8* melody, const xyz_t* pos) {
}
extern void sAdo_Pause(u8 mode) {
Na_Pause(mode);
}
extern f32 sAdo_GetRhythmAnimCounter(u32 p) {
return Na_GetRhythmAnimCounter(p);
}
extern s8 sAdo_GetRhythmDelay(u32 p) {
return Na_GetRhythmDelay(p);
}
extern void sAdo_GetRhythmInfo(TempoBeat_c* rhythm) {
Na_GetRhythmInfo(rhythm);
}
@@ -229,12 +202,10 @@ extern void sAdo_SetRhythmInfo(TempoBeat_c* rhythm) {
}
extern s8 sAdo_InstCountGet() {
return Na_InstCountGet();
}
extern void sAdo_RhythmPos(u32 p, u8 haniwa_id, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -243,57 +214,47 @@ extern void sAdo_RhythmPos(u32 p, u8 haniwa_id, const xyz_t* pos) {
}
extern void sAdo_SpecChange(int spec) {
Na_SpecChange(spec);
}
extern void sAdo_MDPlayerPos(const xyz_t* pos, u16 s1, u16 s2, int p) {
extern void sAdo_MDPlayerPos(const xyz_t* pos, u16 s1, u16 s2, u32 p) {
u16 scalc;
f32 fcalc;
sAdo_Calc_MicPosition_common(&fcalc, &scalc, pos);
Na_MDPlayerPos(scalc, s1, s2, p, fcalc);
Na_MDPlayerPos(scalc, fcalc, s1, s2, p);
}
extern void sAdo_BGMVolume(f32 volume, u16 vol_move_ctr) {
Na_BGMVolume(volume, vol_move_ctr);
}
extern void sAdo_BgmCrossfadeStart(u8 b) {
Na_BgmCrossfadeStart(b);
}
extern void sAdo_SubGameStart() {
Na_SubGameStart();
}
extern void sAdo_SubGameEnd() {
Na_SubGameEnd();
}
extern int sAdo_SubGameOK() {
return Na_SubGameOK();
}
extern void sAdo_Tenki(u8 mode) {
Na_Tenki(mode);
}
extern void sAdos_KishaStatusTrg(u8 state) {
Na_KishaStatusTrg(state);
}
extern void sAdos_KishaStatusLevel(f32 speed, u32 ongenNum1, u16 angle1, f32 distance1, u32 ongenNum2, u16 angle2,
f32 distance2) {
Na_KishaStatusLevel(speed, ongenNum1, angle1, distance1, ongenNum2, angle2, distance2);
}
@@ -302,7 +263,6 @@ extern int sAdos_GetRadioCounter(Radio_c* radio) {
}
extern void sAdos_GetKappaCounter(void* p) {
Na_GetKappaCounter(p);
}
@@ -311,12 +271,10 @@ extern void sAdos_GetStaffRollInfo(StaffRollInfo_c* info) {
}
extern void sAdos_TTKK_ARM(u8 mode) {
Na_TTKK_ARM(mode);
}
extern void sAdo_OngenTrgStartSpeed(f32 speed, u16 s1, const xyz_t* pos) {
f32 fcalc;
u16 scalc;
@@ -326,42 +284,34 @@ extern void sAdo_OngenTrgStartSpeed(f32 speed, u16 s1, const xyz_t* pos) {
}
extern void sAdo_TrgSeEcho(u8 b) {
Na_TrgSeEcho(b);
}
extern void sAdo_LevSeEcho(u8 b) {
Na_LevSeEcho(b);
}
extern u8 sAdo_BgmFadeoutCheck() {
Na_BgmFadeoutCheck();
}
extern u8 sAdo_SeFadeoutCheck() {
Na_SeFadeoutCheck();
}
extern void sAdo_RoomType(u8 type) {
Na_RoomType(type);
}
extern void sAdo_Museum(u8 type) {
Na_Museum(type);
}
extern void sAdo_SoftReset() {
Na_SoftReset();
}
u16 sAdo_Get_WalkLabel(int attr) {
u16 ret;
switch (attr) {
case mCoBG_ATTRIBUTE_GRASS0:
@@ -401,7 +351,6 @@ u16 sAdo_Get_WalkLabel(int attr) {
}
u16 sAdo_Get_KokeruLabel(int type) {
u16 label = sAdo_Get_WalkLabel(type);
u16 ret;
@@ -438,12 +387,10 @@ u16 sAdo_Get_KokeruLabel(int type) {
}
extern void sAdo_SceneMode(u8 mode) {
Na_SceneMode(mode);
}
extern u8 sAdo_RoomIncectPos(u32 f, u16 u, const xyz_t* pos) {
extern u8 sAdo_RoomIncectPos(u32 f, u8 u, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -452,7 +399,6 @@ extern u8 sAdo_RoomIncectPos(u32 f, u16 u, const xyz_t* pos) {
}
extern void sAdo_FurnitureInstPos(u32 id, const xyz_t* pos) {
u16 scalc;
f32 fcalc;
@@ -461,22 +407,18 @@ extern void sAdo_FurnitureInstPos(u32 id, const xyz_t* pos) {
}
extern void sAdo_Set_ongenpos_refuse_fg(int state) {
S_ongenpos_refuse_fg = state;
}
extern int sAdo_GameframeEnd_Check() {
return S_ongenpos_refuse_fg;
}
extern u32 sAdo_GetSoundFrameCounter() {
return Na_GetSoundFrameCounter();
}
extern int sAdo_CheckOnPlussBridge(const xyz_t* pos, u32 atr) {
f32 x;
f32 z;
if ((Common_Get(pluss_bridge_pos) != NULL) && (atr == 0x17)) {
@@ -490,16 +432,13 @@ extern int sAdo_CheckOnPlussBridge(const xyz_t* pos, u32 atr) {
}
extern void sAdo_RegistPlussBridge(const xyz_t* pos) {
Common_Set(pluss_bridge_pos, pos);
}
extern void sAdo_DeletePlussBridge() {
Common_Set(pluss_bridge_pos, NULL);
}
extern void sAdo_kazagurumaLevel(f32 level) {
Na_kazagurumaLevel(level);
}
+4 -4
View File
@@ -7,13 +7,13 @@ typedef enum player_status_level_s {
static void Player_actor_sound_SetStatus(ACTOR* actor) {
PLAYER_ACTOR* player = (PLAYER_ACTOR*)actor;
int status;
int main_index = player->now_main_index;
u8 status;
f32 speed;
status = player->now_main_index;
speed = player->keyframe0.frame_control.speed / 0.59999996f;
switch (status) {
switch (main_index) {
case mPlayer_INDEX_READY_WALK_NET:
case mPlayer_INDEX_DEMO_WALK:
case mPlayer_INDEX_WALK:
@@ -34,7 +34,7 @@ static void Player_actor_sound_SetStatus(ACTOR* actor) {
} else if (speed < 0.0f) {
speed = 0.0f;
}
sAdo_PlayerStatusLevel(speed, status);
sAdo_PlayerStatusLevel(status, speed);
}
static void Player_actor_set_sound_common1(xyz_t* pos, u16 id) {
@@ -0,0 +1,11 @@
#include "jaudio_NES/OSAttention.h"
#include "MSL_C/printf.h"
extern "C" int OSAttention(const char* msg, ...) {
va_list marker;
va_start(marker, msg);
return vprintf(msg, marker);
}
+2 -244
View File
@@ -1,244 +1,2 @@
#include "jaudio_NES/game64.h"
#include "m_name_table.h"
// TODO: finish
#pragma force_active on
// clang-format off
static const u8 SEQ_TABLE[256] = {
247, 81, 82, 83,
84, 85, 86, 87,
88, 89, 90, 91,
92, 93, 94, 95,
96, 97, 98, 99,
100, 101, 102, 103,
104, 176, 178, 218,
219, 220, 222, 223,
224, 225, 226, 227,
229, 169, 170, 171,
68, 166, 60, 59,
168, 177, 74, 62,
63, 64, 65, 66,
67, 214, 215, 216,
217, 228, 57, 231,
221, 230, 167, 70,
71, 73, 75, 78,
79, 105, 58, 69,
72, 232, 233, 234,
235, 179, 76, 172,
173, 174, 175, 247,
247, 247, 247, 247,
180, 181, 182, 183,
184, 185, 186, 187,
188, 189, 190, 191,
192, 193, 194, 195,
196, 197, 198, 199,
200, 201, 202, 203,
204, 205, 206, 207,
208, 209, 210, 211,
212, 213, 77, 61,
77, 80, 247, 247,
111, 112, 113, 114,
115, 116, 117, 118,
119, 120, 121, 122,
123, 124, 125, 126,
127, 128, 129, 130,
131, 132, 133, 134,
135, 136, 137, 138,
139, 140, 141, 142,
143, 144, 145, 146,
147, 148, 149, 150,
151, 152, 153, 154,
155, 156, 157, 158,
159, 160, 161, 162,
163, 164, 165, 247,
247, 247, 247, 247,
247, 247, 247, 247,
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11,
12, 13, 14, 15,
16, 17, 18, 19,
20, 21, 22, 23,
24, 25, 26, 27,
28, 29, 30, 31,
32, 33, 34, 35,
36, 37, 38, 39,
40, 41, 42, 43,
44, 45, 46, 47,
48, 49, 50, 51,
52, 53, 54, 55,
56, 57, 236, 237,
241, 238, 240, 239
};
static const u16 SE_FLOOR_DATA[FLOOR_ALL_NUM] ATTRIBUTE_ALIGN(2) = {
27, 27, 32, 31,
28, 32, 31, 27,
27, 28, 29, 29,
27, 31, 28, 30,
33, 27, 30, 27,
32, 32, 31, 28,
32, 27, 35, 32,
32, 32, 27, 29,
31, 32, 28, 28,
28, 27, 28, 28,
27, 31, 36, 32,
28, 27, 33, 27,
35, 28, 32, 32,
28, 28, 32, 29,
28, 33, 27, 32,
33, 27, 32, 32,
28, 32, 32, 34,
32, 32, 27, 32,
28, 27, 29, 27,
28, 28, 27, 31,
28, 31, 28, 32,
28, 32, 32, 32,
32, 32, 32, 32,
32, 32, 32
};
// ATTRIBUTE_ALIGN(4)
static const u16 SE_ROOM_INS_DATA[] ATTRIBUTE_ALIGN(2) = {
0x505, 0x509, 0x50D, 0x511,
0x515, 0x519, 0x51D, 0x521,
0x525, 0x529, 0x501, 0x52D,
0x531, 0x535, 0x539, 0x53D,
0
};
static const u16 SE_ROOM_INS_RANDOM_OFFSET[] = {
11, 11, 11, 10,
10, 10, 12, 100,
20, 100, 45, 10,
4, 9, 2, 1,
0
};
static const u8 SHIIN2BOIN[] = {
0, 1, 2, 3,
4, 5, 1, 2,
3, 4, 5, 1,
2, 3, 4, 5,
1, 2, 3, 4,
5, 1, 2, 3,
4, 5, 1, 2,
3, 4, 5, 1,
2, 3, 4, 5,
1, 3, 5, 1,
2, 3, 4, 5,
1, 45, 1, 2,
3, 4, 5, 1,
2, 3, 4, 5,
1, 4, 5, 1,
2, 3, 4, 5,
1, 2, 3, 4,
5, 1, 2, 3,
4, 5, 3, 1,
3, 5, 0, 0,
0, 0, 0, 0,
0, 0
};
static const u8 TRGPRIO[] = {
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 50, 50, 50,
50, 60, 60, 60,
60, 60, 60, 60,
60, 70, 70, 70,
70, 70, 70, 70,
70, 70, 70, 70,
70, 70, 70, 70,
70, 70, 70, 70,
70, 70, 70, 70
};
static const u8 sou_trg_se_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 0, 0, 0,
0, 0, 0, 0
};
static const u8 sou_voice_se_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 128, 0, 0,
63, 0, 0, 0
};
static const u8 sou_lev_se_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
63, 128, 0, 0,
63, 0, 0, 0
};
static const u8 sou_lev_ongen_data_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
70, 28, 60, 0,
70, 28, 60, 0
};
static const u8 sou_ongen_entry_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
63, 0, 0, 0,
70, 28, 60, 0
};
static const u8 sou_se_fade_init[] ATTRIBUTE_ALIGN(4) = {
0, 0, 0, 0,
0, 0, 0, 0,
63, 128, 0, 0
};
// force data pooling
FORCESTRIP static int __REMOVE_TEMP() {
int a = SEQ_TABLE[55];
int b = SE_FLOOR_DATA[3];
int c = SE_ROOM_INS_DATA[6];
return a * b * c;
}
// clang-format on
#pragma force_active reset
#include "../src/static/jaudio_NES/game/OSAttention.c_inc"
#include "../src/static/jaudio_NES/game/game64.c_inc"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,209 @@
#include "jaudio_NES/seqsetup.h"
#include "jaudio_NES/aramcall.h"
#include "jaudio_NES/wave_read.h"
#include "jaudio_NES/dvdthread.h"
#include "jaudio_NES/heapctrl.h"
u8 NIN_SEQ[] ATTRIBUTE_ALIGN(32) = { 0xfe, 0x00, 0x78, 0xfd, 0x00, 0x5c, 0xc1, 0x09, 0x00, 0x00, 0x15, 0x88, 0x01, 0xe0,
0x88, 0x01, 0xe0, 0x88, 0x01, 0xe0, 0xff, 0xa4, 0x07, 0x0c, 0xa4, 0x21, 0xe4, 0x9a,
0x03, 0x40, 0x0a, 0x9c, 0x09, 0x00, 0x00, 0x9e, 0x01, 0x00, 0x00, 0x04, 0x9c, 0x00,
0x7f, 0x00, 0x18, 0x01, 0x46, 0x88, 0x01, 0x13, 0x81, 0x17, 0x28, 0x2d, 0x64, 0x1c,
0x3c, 0x08, 0x1b, 0x64, 0x1c, 0x17, 0x30, 0x2d, 0x64, 0x00, 0xe7, 0x3c, 0x10, 0x1b,
0x64, 0x00, 0xe7, 0x17, 0x28, 0x16, 0x64, 0x1c, 0x3c, 0x08, 0x0d, 0x64, 0x1c, 0x17,
0x30, 0x16, 0x64, 0x00, 0xe7, 0x3c, 0x10, 0x0d, 0x64, 0x00, 0xe7, 0xff };
// has some ascii inside it, maybe embedded file, starts "IBNK"
u8 NIN_BANK[] ATTRIBUTE_ALIGN(32) = {
0x49, 0x42, 0x4e, 0x4b, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x41, 0x4e, 0x4b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0x71, 0xa1, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
0x45, 0x52, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x20, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// has some ascii inside it, maybe embedded file, starts "WSYS"
u8 NIN_WAVE[] ATTRIBUTE_ALIGN(32) = {
0x57, 0x53, 0x59, 0x53, 0x00, 0x00, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x3c, 0x00, 0x46, 0xfa,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xc6, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x17, 0xbb, 0x00,
0x00, 0x81, 0x31, 0x00, 0x00, 0x81, 0x58, 0x09, 0xee, 0x0d, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
0xff, 0x00, 0x3c, 0x00, 0x46, 0xac, 0x44, 0x00, 0x00, 0x00, 0x48, 0xe0, 0x00, 0x00, 0x1d, 0xa3, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0xb0, 0x00, 0x00, 0x34, 0xb0, 0x09, 0xee, 0x0d, 0x47, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x69, 0x6e, 0x74, 0x65,
0x6e, 0x64, 0x6f, 0x5f, 0x68, 0x69, 0x5f, 0x30, 0x2e, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x57, 0x49, 0x4e, 0x46, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x2d,
0x44, 0x46, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x2d, 0x45, 0x58, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x2d, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53,
0x43, 0x4e, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xa0, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x42, 0x43, 0x54, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void __OK(u32 a) {
(void)a;
int r31 = Jaq_SetSeqData(0, NIN_SEQ, 0x60, 0);
int unused1 = Jaq_StartSeq(r31);
}
u32 bootsound_ptr;
u32 bootsound_size;
u32 dummy_callback(char* a, u32 b, u32 c, u32* d, JAHEAP* e) {
(void)a;
(void)b;
(void)c;
JAHEAP* heap2;
JAHEAP* heap;
Init_AramMotherHeap();
heap = Get_AramMotherHeap();
heap2 = Jac_AllocHeap(e, heap, bootsound_size);
if ((s32)heap2 == 0) {
return 0;
}
u32 p = (u32)e->_08;
int unused = DVDT_DRAMtoARAM(0, bootsound_ptr, p, bootsound_size, d, 0);
return p;
}
extern void Bank_Init();
extern int Bank_Regist(void*, u32);
void BootSound(u32 a, u32 b) {
bootsound_ptr = a;
bootsound_size = b;
Bank_Init();
Wavegroup_Init();
int unused1 = Wavegroup_Regist(NIN_WAVE, 0);
int unused2 = Bank_Regist(NIN_BANK, 0);
Jac_RegisterARAMCallback(dummy_callback);
int unused3 = WaveScene_Set(0, 0);
int unused4 = DVDT_CheckPass(0, 0, __OK);
Jac_RegisterARAMCallback(0);
}
+3 -3
View File
@@ -25,7 +25,7 @@
#define AUDIOPROC_MESSAGE_NEOS_SYNC ((OSMessage)2)
#define AUDIOPROC_MESSAGE_3 ((OSMessage)3)
OSThread jac_audioThread[3];
OSThread jac_audioThread;
OSThread jac_neosThread;
OSThread jac_dvdThread;
@@ -190,8 +190,8 @@ extern void StartAudioThread(void* pHeap, s32 heapSize, u32 aramSize, u32 flags)
if ((flags & AUDIO_THREAD_FLAG_AUDIO)) {
// point to top of audioStack
u8* stack_p = audioStack;
OSCreateThread(&jac_audioThread[0], &audioproc, NULL, &stack_p[AUDIO_STACK_SIZE], AUDIO_STACK_SIZE, pri, 0);
OSResumeThread(&jac_audioThread[0]);
OSCreateThread(&jac_audioThread, &audioproc, NULL, &stack_p[AUDIO_STACK_SIZE], AUDIO_STACK_SIZE, pri, 0);
OSResumeThread(&jac_audioThread);
}
if ((flags & AUDIO_THREAD_FLAG_DVD)) {
+2 -1
View File
@@ -5,6 +5,7 @@
#include "jaudio_NES/os.h"
#include "jaudio_NES/memory.h"
ALHeap aram_hp;
u8* JAC_ARAM_DMA_BUFFER_TOP = nullptr;
static u32 AUDIO_ARAM_TOP = 0;
static u32 CARD_SECURITY_BUFFER = 0;
@@ -30,7 +31,7 @@ extern u32 GetNeosRom_PreLoaded(void) {
return init_load_size;
}
extern void SetPreCopy_NeosRom(u8* load_addr, u32 load_size, BOOL cut_flag) {
extern u32 SetPreCopy_NeosRom(u8* load_addr, u32 load_size, BOOL cut_flag) {
init_load_size = load_size;
init_load_addr = load_addr;
init_cut_flag = cut_flag;
+2 -2
View File
@@ -393,7 +393,7 @@ extern s32 DVDT_CheckFile(char* file) {
return len;
}
extern void DVDT_CheckPass(u32 owner, u32* status, Jac_DVDCallback callback) {
extern s32 DVDT_CheckPass(u32 owner, u32* status, Jac_DVDCallback callback) {
DVDCall call;
void* cb = (void*)&call;
@@ -401,7 +401,7 @@ extern void DVDT_CheckPass(u32 owner, u32* status, Jac_DVDCallback callback) {
call.callbackStatus = status;
call.callback = callback;
DVDT_AddTask((TaskCallback)__DVDT_CheckBack, cb, 0x58);
return DVDT_AddTask((TaskCallback)__DVDT_CheckBack, cb, 0x58);
}
extern s32 Jac_CheckFile(char* file) {