Implement & link jaudio_NES/dummyrom.c

This commit is contained in:
Cuyler36
2024-06-03 18:52:26 -04:00
parent 7f001f81e7
commit 1ae02605f6
10 changed files with 153 additions and 14 deletions
+3
View File
@@ -10,6 +10,9 @@ extern "C" {
#define S16_MIN (-0x8000)
#define S16_MAX (0x7FFF)
#define AUDIO_ARAM_SIZE 0x400000 /* 4MB */
#define AUDIO_ARAM_HEAP_SIZE 0xC000
#ifdef __cplusplus
}
#endif
+1 -11
View File
@@ -3,6 +3,7 @@
#include "types.h"
#include "jaudio_NES/audiocommon.h"
#include "PR/abi.h"
#ifdef __cplusplus
extern "C" {
@@ -39,17 +40,6 @@ typedef struct AudioPort_ {
/* 0x04 */ u32 param;
} AudioPort;
/* sizeof(Acmd) == 0x4*/
typedef union Acmd {
struct {
/* 0x00 */ u8 p0;
/* 0x01 */ u8 p1;
/* 0x02 */ u8 p2;
/* 0x03 */ u8 p3;
};
/* 0x00 */ u32 uint32;
} Acmd;
/* sizeof(ALHeap) == 0x14 */
typedef struct ALHeap {
/* 0x00 */ u8* base;
+23
View File
@@ -0,0 +1,23 @@
#ifndef DUMMYROM_H
#define DUMMYROM_H
#include "types.h"
#include "jaudio_NES/audiostruct.h"
#include "libultra/libultra.h"
#define DUMMYROM_DRAM_TO_ARAM 0
#define DUMMYROM_ARAM_TO_DRAM 1
extern u8* JAC_ARAM_DMA_BUFFER_TOP;
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 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);
extern void Jac_InitARAM(u32 loadAudiorom);
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef DVDTHREAD_H
#define DVDTHREAD_H
#include "types.h"
#include "dolphin/dvd.h"
typedef void (*Jac_DVDCallback)(u32);
extern s32 DVDT_DRAMtoARAM(u32 owner, u32 dram, u32 aram, u32 len, u32* outLen, Jac_DVDCallback callback);
extern s32 DVDT_ARAMtoDRAM(u32 owner, u32 dram, u32 aram, u32 len, u32* outLen, Jac_DVDCallback callback);
extern u32 Jac_CheckFile(char* path);
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef OS_H
#define OS_H
#include "types.h"
#include "libultra/libultra.h"
extern int Z_osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 block);
#endif
+2 -2
View File
@@ -7,7 +7,7 @@
typedef void* OSMesg;
typedef struct OSMesgQueue {
typedef struct OSMesgQueue_s {
/* 0x00 */ OSThread* mtqueue;
/* 0x04 */ OSThread* fullqueue;
/* 0x08 */ int validCount;
@@ -16,7 +16,7 @@ typedef struct OSMesgQueue {
/* 0x14 */ OSMesg* msg;
} OSMesgQueue; // size = 0x18
extern void osCreateMesgQueue(OSMessageQueue* mq ,OSMessage msg, int flags);
extern void osCreateMesgQueue(OSMessageQueue* mq, OSMessage msg, int flags);
extern int osSendMesg(OSMessageQueue* mq, OSMessage msg, int flags);
extern int osRecvMesg(OSMessageQueue* mq, OSMessage* msg, int flags);