mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-09 20:41:31 -04:00
Link jaudio_NES/aictrl.c
This commit is contained in:
+24
-23
@@ -2,6 +2,8 @@
|
||||
#define _DOLPHIN_OS
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/os/OSAlloc.h"
|
||||
#include "dolphin/os/OSCache.h"
|
||||
#include "dolphin/os/OSContext.h"
|
||||
#include "dolphin/os/OSInterrupt.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
@@ -19,47 +21,46 @@ extern void __OSPSInit();
|
||||
extern void __OSFPRInit();
|
||||
extern void __OSCacheInit();
|
||||
|
||||
void OSPanic(const char *file, int line, const char *message, ...);
|
||||
void OSPanic(const char* file, int line, const char* message, ...);
|
||||
void OSVReport(const char* fmt, va_list list);
|
||||
void OSReport(const char* fmt, ...);
|
||||
|
||||
extern void __OSPSInit();
|
||||
extern void __OSCacheInit();
|
||||
|
||||
#define OSErrorLine(line, ...) \
|
||||
OSPanic(__FILE__, line, __VA_ARGS__)
|
||||
#define OSErrorLine(line, ...) OSPanic(__FILE__, line, __VA_ARGS__)
|
||||
|
||||
#ifdef DOLPHIN_DEBUG
|
||||
#define DOLPHIN_ASSERTLINE(assertion, line) \
|
||||
(void) ((assertion) || (OSErrorLine(line, "Failed assertion " #assertion), 0))
|
||||
#define DOLPHIN_ASSERT(assertion) \
|
||||
(void) ((assertion) || (OSPanic(__FILE__, __LINE__, "Failed assertion " #assertion), 0))
|
||||
#define DOLPHIN_ASSERTLINE(assertion, line) \
|
||||
(void)((assertion) || (OSErrorLine(line, "Failed assertion " #assertion), 0))
|
||||
#define DOLPHIN_ASSERT(assertion) \
|
||||
(void)((assertion) || (OSPanic(__FILE__, __LINE__, "Failed assertion " #assertion), 0))
|
||||
#else
|
||||
#define DOLPHIN_ASSERTLINE(assertion, line)
|
||||
#define DOLPHIN_ASSERT(assertion)
|
||||
#endif
|
||||
|
||||
//void OSResetSystem(u32, u32, u32); // goes in reset, but eh
|
||||
// void OSResetSystem(u32, u32, u32); // goes in reset, but eh
|
||||
void OSInit(void);
|
||||
|
||||
#define OS_CONSOLE_RETAIL4 0x00000004
|
||||
#define OS_CONSOLE_RETAIL3 0x00000003
|
||||
#define OS_CONSOLE_RETAIL2 0x00000002
|
||||
#define OS_CONSOLE_RETAIL1 0x00000001
|
||||
#define OS_CONSOLE_RETAIL 0x00000000
|
||||
#define OS_CONSOLE_DEVHW4 0x10000007
|
||||
#define OS_CONSOLE_DEVHW3 0x10000006
|
||||
#define OS_CONSOLE_DEVHW2 0x10000005
|
||||
#define OS_CONSOLE_DEVHW1 0x10000004
|
||||
#define OS_CONSOLE_MINNOW 0x10000003
|
||||
#define OS_CONSOLE_ARTHUR 0x10000002
|
||||
#define OS_CONSOLE_RETAIL4 0x00000004
|
||||
#define OS_CONSOLE_RETAIL3 0x00000003
|
||||
#define OS_CONSOLE_RETAIL2 0x00000002
|
||||
#define OS_CONSOLE_RETAIL1 0x00000001
|
||||
#define OS_CONSOLE_RETAIL 0x00000000
|
||||
#define OS_CONSOLE_DEVHW4 0x10000007
|
||||
#define OS_CONSOLE_DEVHW3 0x10000006
|
||||
#define OS_CONSOLE_DEVHW2 0x10000005
|
||||
#define OS_CONSOLE_DEVHW1 0x10000004
|
||||
#define OS_CONSOLE_MINNOW 0x10000003
|
||||
#define OS_CONSOLE_ARTHUR 0x10000002
|
||||
#define OS_CONSOLE_PC_EMULATOR 0x10000001
|
||||
#define OS_CONSOLE_EMULATOR 0x10000000
|
||||
#define OS_CONSOLE_EMULATOR 0x10000000
|
||||
#define OS_CONSOLE_DEVELOPMENT 0x10000000
|
||||
#define OS_CONSOLE_DEVKIT 0x10000000
|
||||
#define OS_CONSOLE_TDEVKIT 0x20000000
|
||||
#define OS_CONSOLE_DEVKIT 0x10000000
|
||||
#define OS_CONSOLE_TDEVKIT 0x20000000
|
||||
|
||||
#define OS_CONSOLE_DEV_MASK 0x10000000
|
||||
#define OS_CONSOLE_DEV_MASK 0x10000000
|
||||
|
||||
u32 OSGetConsoleType();
|
||||
#define OS_CONSOLE_IS_DEV() ((OSGetConsoleType() & OS_CONSOLE_DEV_MASK) != 0)
|
||||
|
||||
@@ -2,14 +2,31 @@
|
||||
#define OS_ALLOC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void *OSInitAlloc(void *, void *, int);
|
||||
typedef int OSHeapHandle;
|
||||
|
||||
extern volatile OSHeapHandle __OSCurrHeap;
|
||||
|
||||
void* OSAllocFromHeap(int heap, unsigned long size);
|
||||
void* OSAllocFixed(void* rstart, void* rend);
|
||||
void OSFreeToHeap(int heap, void* ptr);
|
||||
int OSSetCurrentHeap(int heap);
|
||||
void* OSInitAlloc(void* arenaStart, void* arenaEnd, int maxHeaps);
|
||||
int OSCreateHeap(void* start, void* end);
|
||||
void OSDestroyHeap(int heap);
|
||||
void OSAddToHeap(int heap, void* start, void* end);
|
||||
long OSCheckHeap(int heap);
|
||||
unsigned long OSReferentSize(void* ptr);
|
||||
void OSDumpHeap(int heap);
|
||||
void OSVisitAllocated(void (*visitor)(void*, unsigned long));
|
||||
|
||||
#define OSAlloc(size) OSAllocFromHeap(__OSCurrHeap, (size))
|
||||
#define OSFree(ptr) OSFreeToHeap(__OSCurrHeap, (ptr))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define AUDIOSTRUCT_H
|
||||
|
||||
#include "types.h"
|
||||
#include "jaudio_NES/audiocommon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void Probe_Start(void);
|
||||
void Probe_Finish(void);
|
||||
extern void Probe_Start(s32 id, const char* label);
|
||||
extern void Probe_Finish(s32 id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user