mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-04 10:26:16 -04:00
copy dolsdk2004 to tp / b_bh + e_mb done (#2299)
* move dolsdk2004 over * cleanup some temp work * finish and cleanup gf * b_bh done * d_a_e_mb done
This commit is contained in:
@@ -5,8 +5,8 @@ __register_global_object = .text:0x00000078; // type:function size:0x1C scope:gl
|
||||
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
|
||||
__ct__12daE_MB_HIO_cFv = .text:0x000000EC; // type:function size:0x48 scope:global
|
||||
anm_init__FP10e_mb_classifUcf = .text:0x00000134; // type:function size:0xAC scope:global
|
||||
daE_MB_Draw__FP10e_mb_class = .text:0x000001E0; // type:function size:0x150 scope:global
|
||||
e_mb_standby__FP10e_mb_class = .text:0x00000330; // type:function size:0x26C scope:global
|
||||
daE_MB_Draw__FP10e_mb_class = .text:0x000001E0; // type:function size:0x150 scope:local
|
||||
e_mb_standby__FP10e_mb_class = .text:0x00000330; // type:function size:0x26C scope:local
|
||||
e_mb_walk1__FP10e_mb_class = .text:0x0000059C; // type:function size:0x27C scope:global
|
||||
__dt__4cXyzFv = .text:0x00000818; // type:function size:0x3C scope:global
|
||||
e_mb_move__FP10e_mb_class = .text:0x00000854; // type:function size:0x6BC scope:global
|
||||
@@ -14,12 +14,12 @@ e_mb_walk2__FP10e_mb_class = .text:0x00000F10; // type:function size:0x2AC scope
|
||||
e_mb_firstdemo__FP10e_mb_class = .text:0x000011BC; // type:function size:0x324 scope:global
|
||||
e_mb_end__FP10e_mb_class = .text:0x000014E0; // type:function size:0x10 scope:global
|
||||
action__FP10e_mb_class = .text:0x000014F0; // type:function size:0x110 scope:global
|
||||
daE_MB_Execute__FP10e_mb_class = .text:0x00001600; // type:function size:0xAC8 scope:global
|
||||
daE_MB_IsDelete__FP10e_mb_class = .text:0x000020C8; // type:function size:0x8 scope:global
|
||||
daE_MB_Delete__FP10e_mb_class = .text:0x000020D0; // type:function size:0x68 scope:global
|
||||
useHeapInit__FP10fopAc_ac_c = .text:0x00002138; // type:function size:0x384 scope:global
|
||||
daE_MB_Execute__FP10e_mb_class = .text:0x00001600; // type:function size:0xAC8 scope:local
|
||||
daE_MB_IsDelete__FP10e_mb_class = .text:0x000020C8; // type:function size:0x8 scope:local
|
||||
daE_MB_Delete__FP10e_mb_class = .text:0x000020D0; // type:function size:0x68 scope:local
|
||||
useHeapInit__FP10fopAc_ac_c = .text:0x00002138; // type:function size:0x384 scope:local
|
||||
__dt__12J3DFrameCtrlFv = .text:0x000024BC; // type:function size:0x48 scope:global
|
||||
daE_MB_Create__FP10fopAc_ac_c = .text:0x00002504; // type:function size:0x218 scope:global
|
||||
daE_MB_Create__FP10fopAc_ac_c = .text:0x00002504; // type:function size:0x218 scope:local
|
||||
__dt__8cM3dGSphFv = .text:0x0000271C; // type:function size:0x48 scope:global
|
||||
__dt__8cM3dGAabFv = .text:0x00002764; // type:function size:0x48 scope:global
|
||||
__dt__12daE_MB_HIO_cFv = .text:0x000027AC; // type:function size:0x48 scope:global
|
||||
@@ -82,7 +82,7 @@ _dtors = .dtors:0x00000000; // type:label scope:global
|
||||
l_color$3793 = .data:0x00000000; // type:object size:0x4 scope:local
|
||||
@3884 = .data:0x00000004; // type:object size:0x1C scope:local
|
||||
cc_sph_src$4733 = .data:0x00000020; // type:object size:0x40 scope:local
|
||||
l_daE_MB_Method = .data:0x00000060; // type:object size:0x20 scope:global
|
||||
l_daE_MB_Method = .data:0x00000060; // type:object size:0x20 scope:local
|
||||
g_profile_E_MB = .data:0x00000080; // type:object size:0x30 scope:global
|
||||
__vt__8cM3dGSph = .data:0x000000B0; // type:object size:0xC scope:global
|
||||
__vt__8cM3dGAab = .data:0x000000BC; // type:object size:0xC scope:global
|
||||
@@ -107,23 +107,23 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
|
||||
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
|
||||
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
|
||||
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
|
||||
lbl_207_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
|
||||
lbl_207_bss_45 = .bss:0x00000045; // type:object size:0x1 scope:local data:byte
|
||||
@3759 = .bss:0x00000048; // type:object size:0xC scope:local
|
||||
l_HIO = .bss:0x00000054; // type:object size:0x1C scope:global data:byte
|
||||
l_HIO = .bss:0x00000054; // type:object size:0x1C scope:local data:byte
|
||||
@3824 = .bss:0x00000070; // type:object size:0xC scope:local
|
||||
L_pos1 = .bss:0x0000007C; // type:object size:0xC scope:global
|
||||
L_pos1 = .bss:0x0000007C; // type:object size:0xC scope:local
|
||||
@3825 = .bss:0x00000088; // type:object size:0xC scope:local
|
||||
L_pos2 = .bss:0x00000094; // type:object size:0xC scope:global data:float
|
||||
L_pos2 = .bss:0x00000094; // type:object size:0xC scope:local data:float
|
||||
@3826 = .bss:0x000000A0; // type:object size:0xC scope:local
|
||||
L_Hpos = .bss:0x000000AC; // type:object size:0xC scope:global
|
||||
L_Hpos = .bss:0x000000AC; // type:object size:0xC scope:local
|
||||
@3827 = .bss:0x000000B8; // type:object size:0xC scope:local
|
||||
R_pos1 = .bss:0x000000C4; // type:object size:0xC scope:global
|
||||
R_pos1 = .bss:0x000000C4; // type:object size:0xC scope:local
|
||||
@3828 = .bss:0x000000D0; // type:object size:0xC scope:local
|
||||
R_pos2 = .bss:0x000000DC; // type:object size:0xC scope:global data:float
|
||||
R_pos2 = .bss:0x000000DC; // type:object size:0xC scope:local data:float
|
||||
@3829 = .bss:0x000000E8; // type:object size:0xC scope:local
|
||||
R_Hpos = .bss:0x000000F4; // type:object size:0xC scope:global
|
||||
R_Hpos = .bss:0x000000F4; // type:object size:0xC scope:local
|
||||
@3830 = .bss:0x00000100; // type:object size:0xC scope:local
|
||||
c_pos = .bss:0x0000010C; // type:object size:0xC scope:global
|
||||
c_pos = .bss:0x0000010C; // type:object size:0xC scope:local
|
||||
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000118; // type:object size:0x4 scope:global
|
||||
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x0000011C; // type:object size:0x4 scope:global
|
||||
sInstance__27JASGlobalInstance<7Z2SeMgr> = .bss:0x00000120; // type:object size:0x4 scope:global
|
||||
|
||||
@@ -2338,7 +2338,7 @@ Z2AudioLib/Z2AudioMgr.cpp:
|
||||
|
||||
dolphin/gf/GFGeometry.cpp:
|
||||
.text start:0x802CDDC8 end:0x802CDE54
|
||||
.sdata start:0x804508A8 end:0x804508B8
|
||||
.sdata start:0x804508A8 end:0x804508B0
|
||||
|
||||
dolphin/gf/GFLight.cpp:
|
||||
.text start:0x802CDE54 end:0x802CDE9C
|
||||
@@ -2354,6 +2354,7 @@ JSystem/JKernel/JKRHeap.cpp:
|
||||
.text start:0x802CE138 end:0x802CEDB4
|
||||
.rodata start:0x8039CAD8 end:0x8039CAF0
|
||||
.data start:0x803CBF70 end:0x803CBFD0
|
||||
.sdata start:0x804508B0 end:0x804508B8
|
||||
.sbss start:0x80451370 end:0x80451398
|
||||
|
||||
JSystem/JKernel/JKRExpHeap.cpp:
|
||||
|
||||
+47
-22
@@ -201,6 +201,7 @@ cflags_base = [
|
||||
"-i include",
|
||||
f"-i build/{config.version}/include",
|
||||
"-i src",
|
||||
"-ir src/dolphin",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include",
|
||||
@@ -209,6 +210,7 @@ cflags_base = [
|
||||
"-i src/PowerPC_EABI_Support/MetroTRK",
|
||||
"-Iinclude/dolphin",
|
||||
f"-DVERSION={version_num}",
|
||||
"-D__GEKKO__",
|
||||
]
|
||||
|
||||
if config.version == "ShieldD":
|
||||
@@ -262,10 +264,33 @@ cflags_trk = [
|
||||
|
||||
# Dolphin library flags
|
||||
cflags_dolphin = [
|
||||
*cflags_base,
|
||||
"-use_lmw_stmw on",
|
||||
"-str reuse,pool,readonly",
|
||||
"-nodefaults",
|
||||
"-proc gekko",
|
||||
"-align powerpc",
|
||||
"-enum int",
|
||||
"-fp hardware",
|
||||
"-Cpp_exceptions off",
|
||||
'-pragma "cats off"',
|
||||
'-pragma "warn_notinlined off"',
|
||||
"-maxerrors 1",
|
||||
"-nosyspath",
|
||||
"-char unsigned",
|
||||
"-O4,p",
|
||||
"-sym on",
|
||||
"-inline auto",
|
||||
"-i include",
|
||||
f"-i build/{config.version}/include",
|
||||
"-ir src/dolphin",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include",
|
||||
"-i src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include",
|
||||
"-i src/PowerPC_EABI_Support/Runtime/Inc",
|
||||
"-i src/PowerPC_EABI_Support/MetroTRK",
|
||||
"-Iinclude/dolphin",
|
||||
f"-DVERSION={version_num}",
|
||||
"-D__GEKKO__",
|
||||
"-DSDK_REVISION=2",
|
||||
]
|
||||
|
||||
# Framework flags
|
||||
@@ -309,7 +334,7 @@ def DolphinLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
|
||||
return {
|
||||
"lib": lib_name,
|
||||
"mw_version": "GC/1.2.5n",
|
||||
"cflags": cflags_base,
|
||||
"cflags": cflags_dolphin,
|
||||
"progress_category": "sdk",
|
||||
"objects": objects,
|
||||
}
|
||||
@@ -899,7 +924,7 @@ config.libs = [
|
||||
"cflags": cflags_noopt,
|
||||
"progress_category": "sdk",
|
||||
"objects": [
|
||||
Object(NonMatching, "dolphin/gf/GFGeometry.cpp", extra_cflags=["-O3"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFGeometry.cpp", extra_cflags=["-O3"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFLight.cpp", extra_cflags=["-O3"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFPixel.cpp", extra_cflags=["-O3"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFTev.cpp", extra_cflags=["-O3"]),
|
||||
@@ -1135,24 +1160,24 @@ config.libs = [
|
||||
DolphinLib(
|
||||
"mtx",
|
||||
[
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx.c", extra_cflags=["-fp_contract off"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtxvec.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx44.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/vec.c", extra_cflags=["-fp_contract off"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/quat.c", extra_cflags=["-fp_contract off"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx44.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/vec.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/mtx/quat.c"),
|
||||
],
|
||||
),
|
||||
DolphinLib(
|
||||
"dvd",
|
||||
[
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdlow.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdfs.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvd.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdqueue.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvderror.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdidutils.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdFatal.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/fstload.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdlow.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdfs.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvd.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdqueue.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvderror.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdidutils.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdFatal.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/dvd/fstload.c", extra_cflags=["-char signed"]),
|
||||
],
|
||||
),
|
||||
DolphinLib(
|
||||
@@ -1164,8 +1189,8 @@ config.libs = [
|
||||
DolphinLib(
|
||||
"pad",
|
||||
[
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/pad/Padclamp.c", extra_cflags=["-fp_contract off"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/pad/Pad.c", extra_cflags=["-inline noauto"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/pad/Padclamp.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/pad/Pad.c"),
|
||||
],
|
||||
),
|
||||
DolphinLib(
|
||||
@@ -1200,7 +1225,7 @@ config.libs = [
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDCheck.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDMount.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDFormat.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDOpen.c", extra_cflags=["-inline noauto"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDOpen.c", extra_cflags=["-char signed"]),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDCreate.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDRead.c"),
|
||||
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDWrite.c"),
|
||||
@@ -1543,7 +1568,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_L7demo_dr"),
|
||||
ActorRel(NonMatching, "d_a_L7low_dr"),
|
||||
ActorRel(NonMatching, "d_a_L7op_demo_dr"),
|
||||
ActorRel(NonMatching, "d_a_b_bh"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_b_bh"),
|
||||
ActorRel(NonMatching, "d_a_b_bq"),
|
||||
ActorRel(NonMatching, "d_a_b_dr"),
|
||||
ActorRel(Equivalent, "d_a_b_dre"), # weak func order
|
||||
@@ -1612,7 +1637,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_e_kg"),
|
||||
ActorRel(NonMatching, "d_a_e_kk"),
|
||||
ActorRel(NonMatching, "d_a_e_kr"),
|
||||
ActorRel(NonMatching, "d_a_e_mb"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mb"),
|
||||
ActorRel(NonMatching, "d_a_e_md"),
|
||||
ActorRel(NonMatching, "d_a_e_mf"),
|
||||
ActorRel(NonMatching, "d_a_e_mk"),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/gx/GXEnum.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class J2DAnmBase;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef J2DTEVS_H
|
||||
#define J2DTEVS_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
|
||||
#include "JSystem/JUtility/JUTNameTab.h"
|
||||
#include "global.h"
|
||||
|
||||
struct JUTDataBlockHeader {
|
||||
/* 0x0 */ u32 mType;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef J3DGD_H
|
||||
#define J3DGD_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include "dolphin/gd/GDBase.h"
|
||||
|
||||
inline void J3DGDWrite_u8(u8 param) {
|
||||
@@ -116,7 +117,7 @@ inline void J3DGDSetNumTexGens(u8 numTexGens) {
|
||||
J3DGDWriteXFCmd(0x103f, numTexGens);
|
||||
}
|
||||
|
||||
inline void J3DGDSetTevKonstantSel_SwapModeTable(GXTevStageID stage, GXTevKColorSel colorSel1, GXTevKAlphaSel alphaSel1, GXTevKColorSel colorSel2, GXTevKAlphaSel alphaSel2, GXTevColor chan1, GXTevColor chan2) {
|
||||
inline void J3DGDSetTevKonstantSel_SwapModeTable(GXTevStageID stage, GXTevKColorSel colorSel1, GXTevKAlphaSel alphaSel1, GXTevKColorSel colorSel2, GXTevKAlphaSel alphaSel2, GXTevColorChan chan1, GXTevColorChan chan2) {
|
||||
J3DGDWriteBPCmd((stage / 2 + 0xf6) << 24 | (chan1 | chan2 << 2 | colorSel1 << 4 | alphaSel1 << 9 | colorSel2 << 14 | alphaSel2 << 19) & 0x00FFFFFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ public:
|
||||
};
|
||||
|
||||
static inline void J3DFifoWriteCPCmd(u8 cmd, u32 param) {
|
||||
GXWGFifo.u8 = GX_CMD_LOAD_CP_REG;
|
||||
GXWGFifo.u8 = GX_LOAD_CP_REG;
|
||||
GXWGFifo.u8 = cmd;
|
||||
GXWGFifo.u32 = param;
|
||||
}
|
||||
|
||||
static inline void J3DFifoWriteXFCmd(u16 cmd, u16 len) {
|
||||
GXWGFifo.u8 = GX_CMD_LOAD_XF_REG;
|
||||
GXWGFifo.u8 = GX_LOAD_XF_REG;
|
||||
GXWGFifo.u16 = (len - 1);
|
||||
GXWGFifo.u16 = cmd;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef J3DSTRUCT_H
|
||||
#define J3DSTRUCT_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "dolphin/mtx.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef J3DSYS_H
|
||||
#define J3DSYS_H
|
||||
|
||||
#include "dolphin/gx.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/mtx.h>
|
||||
|
||||
// Perhaps move to a new J3DEnum.h?
|
||||
enum J3DError {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define J3DTEVS_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DGD.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ struct J3DTextureSRTInfo;
|
||||
|
||||
struct J3DTransformInfo {
|
||||
/* 0x00 */ Vec mScale;
|
||||
/* 0x0C */ SVec mRotation;
|
||||
/* 0x0C */ S16Vec mRotation;
|
||||
/* 0x14 */ Vec mTranslate;
|
||||
|
||||
/* inline J3DTransformInfo& operator=(const J3DTransformInfo& b) {
|
||||
@@ -162,7 +162,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* d
|
||||
}
|
||||
|
||||
// regalloc issues
|
||||
inline void J3DPSMulMtxVec(register MtxP mtx, register SVec* vec, register SVec* dst) {
|
||||
inline void J3DPSMulMtxVec(register MtxP mtx, register S16Vec* vec, register S16Vec* dst) {
|
||||
register f32 fr12;
|
||||
register f32 fr11;
|
||||
register f32 fr10;
|
||||
@@ -252,7 +252,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec*
|
||||
}
|
||||
|
||||
// regalloc issues
|
||||
inline void J3DPSMulMtxVec(register Mtx3P mtx, register SVec* vec, register SVec* dst) {
|
||||
inline void J3DPSMulMtxVec(register Mtx3P mtx, register S16Vec* vec, register S16Vec* dst) {
|
||||
register f32* punit;
|
||||
register f32 unit;
|
||||
register f32 fr6;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef J3DVERTEX_H
|
||||
#define J3DVERTEX_H
|
||||
|
||||
#include "dolphin/gx/GXAttr.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
class J3DModel;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class J3DMaterial;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class J3DMaterial;
|
||||
struct J3DTexCoord2Info;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define J3DSHAPEFACTORY_H
|
||||
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "dolphin/gx/GXAttr.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class J3DShape;
|
||||
class J3DShapeMtx;
|
||||
@@ -74,4 +74,4 @@ struct J3DShapeFactory {
|
||||
};
|
||||
|
||||
|
||||
#endif /* J3DSHAPEFACTORY_H */
|
||||
#endif /* J3DSHAPEFACTORY_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JAudio2/JASOscillator.h"
|
||||
#include "JSystem/JAudio2/JASSoundParams.h"
|
||||
#include "JSystem/JAudio2/JASWaveInfo.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JASDSPChannel;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JASCRITICALSECTION_H
|
||||
#define JASCRITICALSECTION_H
|
||||
|
||||
#include "dolphin/os/OSInterrupt.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/os/OSInterrupt.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JASDisposer;
|
||||
class JKRHeap;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JASMUTEX_H
|
||||
#define JASMUTEX_H
|
||||
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define JASRESARCLOADER_H
|
||||
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
namespace JASResArcLoader {
|
||||
/* 80290BD0 */ size_t getResSize(JKRArchive const*, u16);
|
||||
@@ -10,7 +11,6 @@ namespace JASResArcLoader {
|
||||
/* 80290D18 */ int loadResourceAsync(JKRArchive*, u16, u8*, u32, void (*)(u32, u32), u32);
|
||||
};
|
||||
|
||||
typedef struct OSMessageQueue OSMessageQueue;
|
||||
class JKRArchive;
|
||||
|
||||
// from pikmin2
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JKRHeap;
|
||||
class JKRSolidHeap;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
#ifndef OSDSP_H
|
||||
#define OSDSP_H
|
||||
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
struct STRUCT_DSP_TASK {
|
||||
/* 0x00 */ DSPTaskInfo info;
|
||||
};
|
||||
#include <dolphin/dsp.h>
|
||||
|
||||
extern "C" DSPTaskInfo* DSPAddTask(DSPTaskInfo*);
|
||||
void DSPAddPriorTask(STRUCT_DSP_TASK*);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#ifndef OSDSP_TASK_H
|
||||
#define OSDSP_TASK_H
|
||||
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
struct DSPTaskInfo;
|
||||
#include <dolphin/dsp.h>
|
||||
|
||||
extern DSPTaskInfo* DSP_prior_task;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "JSystem/JUtility/JUTFader.h"
|
||||
#include "JSystem/JUtility/JUTXfb.h"
|
||||
#include "dolphin/os/OSAlarm.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JGEOMETRY_H
|
||||
#define JGEOMETRY_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
|
||||
@@ -175,7 +175,7 @@ struct TVec3<f32> : public Vec {
|
||||
}
|
||||
|
||||
inline void add(const TVec3<f32>& b) {
|
||||
C_VECAdd((Vec*)&x, (Vec*)&b.x, (Vec*)&x);
|
||||
JMathInlineVEC::C_VECAdd((Vec*)&x, (Vec*)&b.x, (Vec*)&x);
|
||||
}
|
||||
|
||||
void zero() { x = y = z = 0.0f; }
|
||||
@@ -236,7 +236,7 @@ struct TVec3<f32> : public Vec {
|
||||
// }
|
||||
|
||||
f32 squared() const {
|
||||
return C_VECSquareMag((Vec*)&x);
|
||||
return JMathInlineVEC::C_VECSquareMag((Vec*)&x);
|
||||
}
|
||||
|
||||
void normalize() {
|
||||
@@ -333,11 +333,11 @@ struct TVec3<f32> : public Vec {
|
||||
}
|
||||
|
||||
void sub(const TVec3<f32>& b) {
|
||||
C_VECSubtract((Vec*)&x, (Vec*)&b.x, (Vec*)&x);
|
||||
JMathInlineVEC::C_VECSubtract((Vec*)&x, (Vec*)&b.x, (Vec*)&x);
|
||||
}
|
||||
|
||||
void sub(const TVec3<f32>& a, const TVec3<f32>& b) {
|
||||
C_VECSubtract((Vec*)&a.x, (Vec*)&b.x, (Vec*)&x);
|
||||
JMathInlineVEC::C_VECSubtract((Vec*)&a.x, (Vec*)&b.x, (Vec*)&x);
|
||||
}
|
||||
|
||||
bool isZero() const {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRAramBlock.h"
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jkernel
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define JKRARAMPIECE_H
|
||||
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/arq.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/ar.h>
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JKRAramBlock;
|
||||
class JKRDecompCommand;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRFile.h"
|
||||
#include "dolphin/dvd.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
struct OSThread;
|
||||
|
||||
@@ -26,9 +26,9 @@ public:
|
||||
void initiate(void);
|
||||
s32 sync(void);
|
||||
|
||||
u32 getFileID() const { return mFileInfo.start_address; }
|
||||
u32 getFileID() const { return mFileInfo.startAddr; }
|
||||
DVDFileInfo* getFileInfo() { return &mFileInfo; }
|
||||
int getStatus() { return DVDGetCommandBlockStatus(&mFileInfo.block); }
|
||||
int getStatus() { return DVDGetCommandBlockStatus(&mFileInfo.cb); }
|
||||
|
||||
public:
|
||||
/* vt[03] */ virtual bool open(const char*); /* override */
|
||||
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
/* 0x00 */ // JKRFileFinder_UnknownBase
|
||||
/* 0x0C */ // vtable
|
||||
/* 0x10 */ // JKRFileFinder
|
||||
/* 0x14 */ DVDDirectory mDvdDirectory;
|
||||
/* 0x14 */ DVDDir mDvdDirectory;
|
||||
/* 0x20 */ bool mDvdIsOpen;
|
||||
/* 0x21 */ u8 field_0x21[3];
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JKRHEAP_H
|
||||
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "dolphin/os/OSMutex.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JKRHeap;
|
||||
typedef void (*JKRErrorHandler)(void*, u32, int);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define JKRTHREAD_H
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jkernel
|
||||
|
||||
@@ -171,4 +171,63 @@ inline void gekko_ps_copy16(register void* dst, register const void* src) {
|
||||
|
||||
}; // namespace JMath
|
||||
|
||||
namespace JMathInlineVEC {
|
||||
inline void C_VECAdd(register const Vec* a, register const Vec* b, register Vec* ab) {
|
||||
register f32 axy;
|
||||
register f32 bxy;
|
||||
register f32 az;
|
||||
register f32 sumz;
|
||||
register f32 bz;
|
||||
#ifdef __MWERKS__
|
||||
asm {
|
||||
psq_l axy, 0(a), 0, 0
|
||||
psq_l bxy, 0(b), 0, 0
|
||||
ps_add bxy, axy, bxy
|
||||
psq_st bxy, 0(ab), 0, 0
|
||||
psq_l az, 8(a), 1, 0
|
||||
psq_l bz, 8(b), 1, 0
|
||||
ps_add sumz, az, bz
|
||||
psq_st sumz, 8(ab), 1, 0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void C_VECSubtract(register const Vec* a, register const Vec* b, register Vec* ab) {
|
||||
register f32 axy;
|
||||
register f32 bxy;
|
||||
register f32 az;
|
||||
register f32 subz;
|
||||
register f32 bz;
|
||||
#ifdef __MWERKS__
|
||||
asm {
|
||||
psq_l axy, 0(a), 0, 0
|
||||
psq_l bxy, 0(b), 0, 0
|
||||
ps_sub bxy, axy, bxy
|
||||
psq_st bxy, 0(ab), 0, 0
|
||||
psq_l az, 8(a), 1, 0
|
||||
psq_l bz, 8(b), 1, 0
|
||||
ps_sub subz, az, bz
|
||||
psq_st subz, 8(ab), 1, 0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline f32 C_VECSquareMag(const Vec* v) {
|
||||
register f32 x_y;
|
||||
register f32 z;
|
||||
register f32 res;
|
||||
register const f32* src = &v->x;
|
||||
#ifdef __MWERKS__
|
||||
asm {
|
||||
psq_l x_y, 0(src), 0, 0
|
||||
ps_mul x_y, x_y, x_y
|
||||
lfs z, 8(src)
|
||||
ps_madd res, z, z, x_y
|
||||
ps_sum0 res, res, x_y, x_y
|
||||
}
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* JMATH_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JPABASESHAPE_H
|
||||
#define JPABASESHAPE_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class JPAEmitterWorkData;
|
||||
class JPABaseParticle;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JPACHILDSHAPE_H
|
||||
#define JPACHILDSHAPE_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class JPAEmitterWorkData;
|
||||
class JPABaseParticle;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JPAEMITTER_H
|
||||
#define JPAEMITTER_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
#include "JSystem/JParticle/JPAList.h"
|
||||
#include "JSystem/JParticle/JPARandom.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JPAPARTICLE_H
|
||||
#define JPAPARTICLE_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include "JSystem/JGeometry.h"
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSGAMBIENTLIGHT_H
|
||||
|
||||
#include "JSystem/JStage/JSGObject.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
namespace JStage {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSGFOG_H
|
||||
|
||||
#include "JSystem/JStage/JSGObject.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
namespace JStage {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSGLIGHT_H
|
||||
|
||||
#include "JSystem/JStage/JSGObject.h"
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
namespace JStage {
|
||||
enum TELight {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#include "JSystem/JStudio/JStudio/fvb.h"
|
||||
#include "JSystem/JStudio/JStudio/stb.h"
|
||||
#include "JSystem/JStudio/JStudio/ctb.h"
|
||||
#include "dolphin/gx.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/mtx.h>
|
||||
|
||||
namespace JStudio {
|
||||
struct TObject;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define JUTCACHEFONT_H
|
||||
|
||||
#include "JSystem/JUtility/JUTResFont.h"
|
||||
#include "global.h"
|
||||
|
||||
class JKRAramBlock;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "__va_arg.h"
|
||||
#include "dolphin/gx/GXEnum.h"
|
||||
#include "dolphin/os/OSError.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct _GXRenderModeObj GXRenderModeObj;
|
||||
@@ -42,6 +42,9 @@ STATIC_ASSERT(sizeof(JUTExternalFB) == 0x14);
|
||||
* @ingroup jsystem-jutility
|
||||
*
|
||||
*/
|
||||
|
||||
typedef void (*JUTExceptionUserCallback)(u16, OSContext*, u32, u32);
|
||||
|
||||
class JUTException : public JKRThread {
|
||||
public:
|
||||
enum EInfoPage {
|
||||
@@ -87,8 +90,8 @@ public:
|
||||
/* 802E21FC */ static void panic_f(char const*, int, char const*, ...);
|
||||
/* 802E227C */ static void setFPException(u32);
|
||||
/* 802E2578 */ static bool searchPartialModule(u32, u32*, u32*, u32*, u32*);
|
||||
/* 802E3AEC */ static OSErrorHandler setPreUserCallback(OSErrorHandler);
|
||||
/* 802E3AFC */ static OSErrorHandler setPostUserCallback(OSErrorHandler);
|
||||
/* 802E3AEC */ static JUTExceptionUserCallback setPreUserCallback(JUTExceptionUserCallback);
|
||||
/* 802E3AFC */ static JUTExceptionUserCallback setPostUserCallback(JUTExceptionUserCallback);
|
||||
/* 802E3B0C */ static void appendMapFile(char const*);
|
||||
/* 802E3BA0 */ static bool queryMapAddress(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
|
||||
/* 802E3C90 */ static bool queryMapAddress_single(char*, u32, s32, u32*, u32*, char*, u32, bool,
|
||||
@@ -120,8 +123,8 @@ private:
|
||||
static JSUList<JUTException::JUTExMapFile> sMapFileList;
|
||||
static OSMessage sMessageBuffer[1];
|
||||
static JUTException* sErrorManager;
|
||||
static OSErrorHandler sPreUserCallback;
|
||||
static OSErrorHandler sPostUserCallback;
|
||||
static JUTExceptionUserCallback sPreUserCallback;
|
||||
static JUTExceptionUserCallback sPostUserCallback;
|
||||
static void* sConsoleBuffer;
|
||||
static u32 sConsoleBufferSize;
|
||||
static JUTConsole* sConsole;
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
void stopMotor() { mRumble.stopMotor(mPortNum, false); }
|
||||
void stopMotorHard() { mRumble.stopMotorHard(mPortNum); }
|
||||
|
||||
static s8 getPortStatus(u32 port) { return mPadStatus[port].error; }
|
||||
static s8 getPortStatus(u32 port) { return mPadStatus[port].err; }
|
||||
|
||||
struct CButton {
|
||||
CButton() { clear(); }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JUTPALETTE_H
|
||||
#define JUTPALETTE_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
enum JUTTransparency { UNK0, UNK1 };
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTPROCBAR_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JUTTEXTURE_H
|
||||
#define JUTTEXTURE_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
class JUTPalette;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef JUTVIDEO_H
|
||||
#define JUTVIDEO_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
typedef u8 (*Pattern)[2];
|
||||
|
||||
@@ -30,14 +30,14 @@ public:
|
||||
/* 802E5144 */ static void postRetraceProc(u32);
|
||||
/* 802E50BC */ static void drawDoneCallback();
|
||||
|
||||
u16 getFbWidth() const { return mRenderObj->fb_width; }
|
||||
u16 getEfbHeight() const { return mRenderObj->efb_height; }
|
||||
u16 getFbWidth() const { return mRenderObj->fbWidth; }
|
||||
u16 getEfbHeight() const { return mRenderObj->efbHeight; }
|
||||
void getBounds(u16& width, u16& height) const {
|
||||
width = (u16)getFbWidth();
|
||||
height = (u16)getEfbHeight();
|
||||
}
|
||||
u16 getXfbHeight() const { return mRenderObj->xfb_height; }
|
||||
u32 isAntiAliasing() const { return mRenderObj->antialiasing; }
|
||||
u16 getXfbHeight() const { return mRenderObj->xfbHeight; }
|
||||
u32 isAntiAliasing() const { return mRenderObj->aa; }
|
||||
Pattern getSamplePattern() const { return mRenderObj->sample_pattern; }
|
||||
u8* getVFilter() const { return mRenderObj->vfilter; }
|
||||
OSMessageQueue* getMessageQueue() { return &mMessageQueue; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef TCOLOR_H
|
||||
#define TCOLOR_H
|
||||
|
||||
#include "dolphin/gx/GXStruct.h"
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
namespace JUtility {
|
||||
|
||||
@@ -32,4 +32,4 @@ struct TColor : public GXColor {
|
||||
};
|
||||
} // namespace JUtility
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef C_BG_S_CHK_H
|
||||
#define C_BG_S_CHK_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "f_pc/f_pc_base.h"
|
||||
|
||||
struct cBgD_Vtx_t : public Vec {};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_M3D_H_
|
||||
|
||||
#include "math.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class cM3dGAab;
|
||||
class cM3dGCps;
|
||||
@@ -19,8 +19,6 @@ struct cM3d_Range {
|
||||
/* 0x4 */ f32 mMax;
|
||||
};
|
||||
|
||||
struct Vec;
|
||||
|
||||
extern const f32 G_CM3D_F_ABS_MIN;
|
||||
|
||||
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#ifndef C_SXYZ_H
|
||||
#define C_SXYZ_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
struct SVec {
|
||||
s16 x, y, z;
|
||||
};
|
||||
|
||||
class csXyz : public SVec {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef C_XYZ_H
|
||||
#define C_XYZ_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include "math.h"
|
||||
|
||||
struct cXyz : Vec {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef OS_DOLPHIN_DDH_STUBS_H
|
||||
#define OS_DOLPHIN_DDH_STUBS_H
|
||||
|
||||
#include "amcstubs/AmcExi2Stubs.h"
|
||||
#include <dolphin/amc/AmcExi2Comm.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int ddh_cc_initialize(void* inputPendingPtrRef, AmcEXICallback monitorCallback);
|
||||
int ddh_cc_initialize(void* inputPendingPtrRef, EXICallback monitorCallback);
|
||||
int ddh_cc_shutdown();
|
||||
int ddh_cc_open();
|
||||
int ddh_cc_close();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef OS_DOLPHIN_GDEV_STUBS_H
|
||||
#define OS_DOLPHIN_GDEV_STUBS_H
|
||||
|
||||
#include "amcstubs/AmcExi2Stubs.h"
|
||||
#include <dolphin/amc/AmcExi2Comm.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int gdev_cc_initialize(void* inputPendingPtrRef, AmcEXICallback monitorCallback);
|
||||
int gdev_cc_initialize(void* inputPendingPtrRef, EXICallback monitorCallback);
|
||||
int gdev_cc_shutdown();
|
||||
int gdev_cc_open();
|
||||
int gdev_cc_close();
|
||||
|
||||
@@ -24,6 +24,9 @@ public:
|
||||
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
|
||||
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
|
||||
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
/* 0x14 */ u8 unk_0x14[0x24 - 0x14];
|
||||
#endif
|
||||
/* 0x14 */ Z2SoundStarter* mSoundStarter;
|
||||
/* 0x18 */ JGeometry::TVec3<f32>* mSoundPos;
|
||||
/* 0x1C */ u16 field_0x1c;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define Z2STATUSMGR_H
|
||||
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
|
||||
Z2StatusMgr();
|
||||
|
||||
@@ -1,26 +1,113 @@
|
||||
#ifndef D_A_B_BH_H
|
||||
#define D_A_B_BH_H
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/d_bg_s_acch.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-enemies
|
||||
* @class b_bh_class
|
||||
* @brief Big Baba
|
||||
* @brief Diababa - Baba Hand
|
||||
*
|
||||
* @details Forest Temple enemy.
|
||||
*
|
||||
*/
|
||||
class b_bh_class : public fopEn_enemy_c {
|
||||
private:
|
||||
/* 0x5AC */ u8 field_0x568[0xf4c - 0x5AC];
|
||||
public:
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x5B4 */ u8 mID;
|
||||
/* 0x5B5 */ u8 field_0x5b5;
|
||||
/* 0x5B6 */ u8 field_0x5b6;
|
||||
/* 0x5B7 */ u8 field_0x5b7;
|
||||
/* 0x5B8 */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x5BC */ Z2CreatureEnemy mSound;
|
||||
/* 0x660 */ int mAnm;
|
||||
/* 0x664 */ u8 field_0x664[0x668 - 0x664];
|
||||
/* 0x668 */ s16 field_0x668;
|
||||
/* 0x66A */ s16 mAction;
|
||||
/* 0x66C */ s16 mMode;
|
||||
/* 0x66E */ u8 field_0x66E[0x674 - 0x66E];
|
||||
/* 0x674 */ cXyz field_0x674;
|
||||
/* 0x680 */ u8 field_0x680[0x684 - 0x680];
|
||||
/* 0x684 */ s16 field_0x684;
|
||||
/* 0x686 */ s16 field_0x686;
|
||||
/* 0x688 */ f32 field_0x688;
|
||||
/* 0x68C */ f32 field_0x68c;
|
||||
/* 0x690 */ f32 field_0x690;
|
||||
/* 0x694 */ s16 mTimers[5];
|
||||
/* 0x69E */ s16 field_0x69e;
|
||||
/* 0x6A0 */ s8 field_0x6a0;
|
||||
/* 0x6A4 */ cXyz mBasePos;
|
||||
/* 0x6B0 */ cXyz field_0x6b0;
|
||||
/* 0x6BC */ cXyz field_0x6bc[18];
|
||||
/* 0x794 */ csXyz field_0x794[18];
|
||||
/* 0x800 */ J3DModel* mpStemModels[17];
|
||||
/* 0x844 */ u8 field_0x844[0x88C - 0x844];
|
||||
/* 0x88C */ f32 field_0x88c[17];
|
||||
/* 0x8D0 */ u8 field_0x8D0[0x8D4 - 0x8D0];
|
||||
/* 0x8D4 */ s16 field_0x8d4[17];
|
||||
/* 0x8F6 */ u8 field_0x8f6[0x8F8 - 0x8F6];
|
||||
/* 0x8F8 */ s16 field_0x8f8;
|
||||
/* 0x8FC */ f32 field_0x8fc;
|
||||
/* 0x900 */ s16 field_0x900[3];
|
||||
/* 0x906 */ s8 field_0x906[3];
|
||||
/* 0x909 */ s8 field_0x909[3];
|
||||
/* 0x90C */ s8 field_0x90c;
|
||||
/* 0x910 */ f32 field_0x910;
|
||||
/* 0x914 */ f32 field_0x914;
|
||||
/* 0x918 */ f32 field_0x918;
|
||||
/* 0x91C */ J3DModel* mpLeafModels[17];
|
||||
/* 0x960 */ f32 field_0x960[17];
|
||||
/* 0x9A4 */ u8 field_0x9A4[0x9A8 - 0x9A4];
|
||||
/* 0x9A8 */ csXyz field_0x9a8[18];
|
||||
/* 0xA14 */ u8 field_0xA14[0xA20 - 0xA14];
|
||||
/* 0xA20 */ f32 field_0xa20;
|
||||
/* 0xA24 */ s8 field_0xa24;
|
||||
/* 0xA25 */ s8 field_0xa25;
|
||||
/* 0xA26 */ csXyz field_0xa26;
|
||||
/* 0xA2C */ s8 mAnmSeTimer;
|
||||
/* 0xA30 */ u32 mAnmSe;
|
||||
/* 0xA34 */ dCcD_Stts mColliderStts;
|
||||
/* 0xA70 */ dCcD_Sph mCcSph;
|
||||
/* 0xBA8 */ dCcD_Sph mTgSph;
|
||||
/* 0xCE0 */ s8 field_0xce0;
|
||||
/* 0xCE4 */ dCcU_AtInfo mAtInfo;
|
||||
/* 0xD08 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0xD48 */ dBgS_ObjAcch mAcch;
|
||||
/* 0xF20 */ s8 field_0xf20;
|
||||
/* 0xF21 */ s8 field_0xf21;
|
||||
/* 0xF22 */ s8 field_0xf22;
|
||||
/* 0xF24 */ u32 field_0xf24;
|
||||
/* 0xF28 */ u8 field_0xF28[0xF30 - 0xF28];
|
||||
/* 0xF30 */ u32 mMouthMizuEmitterIDs[5];
|
||||
/* 0xF44 */ f32 mMouthMizuParticleSize;
|
||||
/* 0xF48 */ u8 mInitHIO;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(b_bh_class) == 0xf4c);
|
||||
|
||||
class daB_BH_HIO_c {
|
||||
class daB_BH_HIO_c
|
||||
#ifdef DEBUG
|
||||
: public JORReflexible
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/* 805AE26C */ daB_BH_HIO_c();
|
||||
/* 805B3098 */ ~daB_BH_HIO_c();
|
||||
/* 805B3098 */ virtual ~daB_BH_HIO_c() {}
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void genMessage(JORMContext*);
|
||||
#endif
|
||||
|
||||
/* 0x04 */ s8 no;
|
||||
/* 0x08 */ f32 model_size;
|
||||
/* 0x0C */ u8 unk_0xc[0x10 - 0xC];
|
||||
/* 0x10 */ s16 attack_freq_a;
|
||||
/* 0x12 */ s16 attack_freq_b;
|
||||
/* 0x14 */ s16 down_revive_time;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -41,16 +41,17 @@ public:
|
||||
/* 0x06DE */ s16 field_0x6de;
|
||||
/* 0x06E0 */ fpc_ProcID mTentacleIDs[2];
|
||||
/* 0x06E8 */ fpc_ProcID mMonkeyBombID;
|
||||
/* 0x06EC */ u8 field_0x6ec;
|
||||
/* 0x06EC */ s8 field_0x6ec;
|
||||
/* 0x06ED */ s8 mColpatType;
|
||||
/* 0x06F0 */ f32 mColpatBlend;
|
||||
/* 0x06F4 */ s16 mHeadRot;
|
||||
/* 0x06F6 */ s16 field_0x6f6;
|
||||
/* 0x06F8 */ s8 mDisableDraw;
|
||||
/* 0x06F9 */ u8 field_0x6f9;
|
||||
/* 0x06FA */ u8 field_0x6fa;
|
||||
/* 0x06FB */ u8 field_0x6fb;
|
||||
/* 0x06F9 */ s8 field_0x6f9;
|
||||
/* 0x06FA */ s8 field_0x6fa;
|
||||
/* 0x06FB */ s8 field_0x6fb;
|
||||
/* 0x06FC */ s8 field_0x6fc;
|
||||
/* 0x06FD */ s8 field_0x6fd;
|
||||
/* 0x06FE */ s16 field_0x6fe;
|
||||
/* 0x0700 */ dCcD_Stts mCcStts;
|
||||
/* 0x073C */ dCcD_Sph mCcSph;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef D_A_E_MB_H
|
||||
#define D_A_E_MB_H
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-enemies
|
||||
@@ -11,15 +14,59 @@
|
||||
*
|
||||
*/
|
||||
class e_mb_class : public fopEn_enemy_c {
|
||||
private:
|
||||
/* 0x5ac */ u8 field_0x5ac[0x8cc - 0x5ac];
|
||||
public:
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x5B4 */ s16 mMode;
|
||||
/* 0x5B6 */ u8 field_0x5b6;
|
||||
/* 0x5B8 */ cXyz field_0x5b8;
|
||||
/* 0x5C4 */ u8 field_0x5C4[0x5C8 - 0x5C4];
|
||||
/* 0x5C8 */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x5CC */ int mAnm;
|
||||
/* 0x5D0 */ mDoExt_btpAnm* mpBtp;
|
||||
/* 0x5D4 */ s16 field_0x5d4;
|
||||
/* 0x5D8 */ f32 mBtpFrame;
|
||||
/* 0x5DC */ cXyz field_0x5dc;
|
||||
/* 0x5E8 */ Z2CreatureEnemy mSound;
|
||||
/* 0x68C */ s8 field_0x68c;
|
||||
/* 0x690 */ mDoExt_McaMorf* mpBombModelMorf;
|
||||
/* 0x694 */ mDoExt_McaMorf* mpBombModel2Morf;
|
||||
/* 0x698 */ s16 mCounter;
|
||||
/* 0x69A */ s16 mAction;
|
||||
/* 0x69C */ s16 mTimers[3];
|
||||
/* 0x6A2 */ s16 field_0x6a2;
|
||||
/* 0x6A4 */ cXyz field_0x6a4;
|
||||
/* 0x6B0 */ s8 field_0x6b0;
|
||||
/* 0x6B4 */ mDoExt_3DlineMat1_c mRopeMat;
|
||||
/* 0x6F0 */ f32 field_0x6f0;
|
||||
/* 0x6F4 */ dCcD_Stts mColliderStts;
|
||||
/* 0x730 */ dCcD_Sph mCcSph;
|
||||
/* 0x868 */ dCcU_AtInfo mAtInfo;
|
||||
/* 0x88C */ u8 field_0x88C[0x8C8 - 0x88C];
|
||||
/* 0x8C8 */ s8 field_0x8c8;
|
||||
/* 0x8C9 */ u8 mInitHIO;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_mb_class) == 0x8cc);
|
||||
|
||||
class daE_MB_HIO_c {
|
||||
class daE_MB_HIO_c
|
||||
#ifdef DEBUG
|
||||
: public JORReflexible
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/* 8070616C */ daE_MB_HIO_c();
|
||||
/* 8070882C */ ~daE_MB_HIO_c();
|
||||
/* 8070882C */ virtual ~daE_MB_HIO_c() {}
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void genMessage(JORMContext*);
|
||||
#endif
|
||||
|
||||
/* 0x04 */ s8 no;
|
||||
/* 0x08 */ f32 base_size;
|
||||
/* 0x0C */ f32 swing_speed;
|
||||
/* 0x10 */ f32 swing_descend;
|
||||
/* 0x14 */ f32 swing_correction;
|
||||
/* 0x18 */ f32 reappear_time;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,12 +29,7 @@ struct dPa_YkgrPcallBack : public JPAParticleCallBack {
|
||||
/* 805A848C */ void draw(JPABaseEmitter*, JPABaseParticle*);
|
||||
/* 805A84D4 */ void setParam(f32);
|
||||
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x04 */ f32 field_0x4[2][3];
|
||||
/* 0x1C */ s8 field_0x1c;
|
||||
};
|
||||
|
||||
|
||||
@@ -199,6 +199,9 @@ public:
|
||||
/* 0x02C */ u32 m_flags;
|
||||
/* 0x030 */ cXyz* pm_pos;
|
||||
/* 0x034 */ cXyz* pm_old_pos;
|
||||
#ifdef DEBUG
|
||||
/* 0x038 */ cXyz unk_0x38;
|
||||
#endif
|
||||
/* 0x038 */ cXyz* pm_speed;
|
||||
/* 0x03C */ csXyz* pm_angle;
|
||||
/* 0x040 */ csXyz* pm_shape_angle;
|
||||
@@ -224,6 +227,9 @@ public:
|
||||
/* 0x0CC */ f32 field_0xcc;
|
||||
/* 0x0D0 */ f32 m_wtr_chk_offset;
|
||||
/* 0x0D4 */ cBgS_PolyInfo* pm_out_poly_info;
|
||||
#ifdef DEBUG
|
||||
/* 0x0E4 */ cXyz unk_0xe4;
|
||||
#endif
|
||||
/* 0x0D8 */ f32 field_0xd8;
|
||||
/* 0x0DC */ dBgS_GndChk m_gnd;
|
||||
/* 0x130 */ dBgS_RoofChk m_roof;
|
||||
|
||||
@@ -64,6 +64,11 @@ public:
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
static fopAc_ac_c* createEnemyBombBoomerang(cXyz* i_pos, csXyz* i_angle, int i_roomNo) {
|
||||
return (fopAc_ac_c*)fopAcM_fastCreate(PROC_NBOMB, 12, i_pos, i_roomNo, i_angle, NULL, -1,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
static fopAc_ac_c* createWaterBombExplode(cXyz* i_pos) {
|
||||
return (fopAc_ac_c*)fopAcM_fastCreate(PROC_NBOMB, 18, i_pos, -1, NULL, NULL, -1, NULL,
|
||||
NULL);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "d/d_menu_save.h"
|
||||
#include "f_op/f_op_msg.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
|
||||
class dDlst_Gameover_CAPTURE_c : public dDlst_base_c {
|
||||
@@ -84,7 +85,7 @@ s32 d_GameOver_Create(u8 param_0);
|
||||
bool d_GameOver_Delete(fpc_ProcID& i_id);
|
||||
|
||||
inline s32 d_GameOver_CheckDelete(fpc_ProcID& id) {
|
||||
if (id != UINT32_MAX) {
|
||||
if (id != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dGameover_c* gameover = (dGameover_c*)fopMsgM_SearchByID(id);
|
||||
|
||||
if (gameover != NULL) {
|
||||
@@ -98,7 +99,7 @@ inline s32 d_GameOver_CheckDelete(fpc_ProcID& id) {
|
||||
}
|
||||
|
||||
inline s32 d_GameOver_animeStart(fpc_ProcID& id) {
|
||||
if (id != UINT32_MAX) {
|
||||
if (id != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dGameover_c* gameover = (dGameover_c*)fopMsgM_SearchByID(id);
|
||||
|
||||
if (gameover != NULL) {
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
#define D_D_LIB_H
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "dolphin/mtx/quat.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/mtx.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class fopAc_ac_c;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetZCompLoc(GX_TRUE);
|
||||
GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_OR);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_OR);
|
||||
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0);
|
||||
GXSetFog(GX_FOG_NONE, 0.0f, 0.0f, 0.0f, 0.0f, g_clearColor);
|
||||
GXSetFogRangeAdj(GX_FALSE, 0, NULL);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "global.h"
|
||||
|
||||
class JKRAramArchive;
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "string.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "dolphin/os/OSTime.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
#include "f_pc/f_pc_name.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef D_D_TRESURE_H
|
||||
#define D_D_TRESURE_H
|
||||
|
||||
#include "dolphin/mtx/vec.h"
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class dTres_c {
|
||||
public:
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#ifndef _DOLPHIN_G2D_H_
|
||||
#define _DOLPHIN_G2D_H_
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum G2DMatCtg {
|
||||
G2D_CTG_TEXTURE,
|
||||
G2D_CTG_RGB_DIRECT,
|
||||
G2D_CTG_RGBA_INDEX8,
|
||||
G2D_CTG_EMPTY,
|
||||
} G2DMatCtg;
|
||||
|
||||
typedef struct G2DSprite {
|
||||
u16 nTlcS; // "Top Left Corner"
|
||||
u16 nTlcT;
|
||||
u16 nWidth;
|
||||
u16 nHeight;
|
||||
GXTexObj* to;
|
||||
f32 rS0;
|
||||
f32 rT0;
|
||||
f32 rS1;
|
||||
f32 rT1;
|
||||
} G2DSprite;
|
||||
|
||||
typedef struct G2DPosOri {
|
||||
f32 rPosX;
|
||||
f32 rPosY;
|
||||
f32 rOriX;
|
||||
f32 rOriY;
|
||||
} G2DPosOri;
|
||||
|
||||
typedef struct G2DGlob {
|
||||
u16 nViewportTlcX;
|
||||
u16 nViewportTlcY;
|
||||
u16 nViewportWidth;
|
||||
u16 nViewportHeight;
|
||||
G2DPosOri poCam;
|
||||
f32 rWorldX;
|
||||
f32 rWorldY;
|
||||
f32 rHalfX;
|
||||
f32 rHalfY;
|
||||
} G2DGlob;
|
||||
|
||||
typedef struct G2DMatDesc {
|
||||
s32 nReserved;
|
||||
G2DMatCtg nCategory;
|
||||
GXColor* color;
|
||||
GXTexObj* to;
|
||||
u8* clut; // Color Look-Up Table
|
||||
} G2DMatDesc;
|
||||
|
||||
typedef struct G2DTileDesc {
|
||||
u8 nMaterial;
|
||||
u8 nS;
|
||||
u8 nT;
|
||||
u8 nCI; // Color Index
|
||||
u8 aUser[4];
|
||||
} G2DTileDesc;
|
||||
|
||||
typedef struct G2DLayer {
|
||||
void* map;
|
||||
s8 nHS;
|
||||
s8 nVS;
|
||||
s8 nBPI;
|
||||
s16 nTileWidth;
|
||||
s16 nTileHeight;
|
||||
s8 bWrap;
|
||||
u8 nNumMaterials;
|
||||
G2DTileDesc* tileDesc;
|
||||
G2DMatDesc* matDesc;
|
||||
} G2DLayer;
|
||||
|
||||
void G2DInitSprite(G2DSprite* sprite);
|
||||
void G2DDrawSprite(G2DSprite* sprite, G2DPosOri* po);
|
||||
void G2DDrawLayer(G2DLayer* layer, s8* aSortBuffer);
|
||||
void G2DSetCamera(G2DPosOri* po);
|
||||
void G2DInitWorld(u32 nWorldX, u32 nWorldY);
|
||||
void G2DSetViewport(u16 nLeft, u16 nTop, u16 nWidth, u16 nHeight);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DOLPHIN_G2D_H_
|
||||
+25
-8
@@ -1,7 +1,7 @@
|
||||
#ifndef AI_H
|
||||
#define AI_H
|
||||
#ifndef _DOLPHIN_AI_H_
|
||||
#define _DOLPHIN_AI_H_
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,24 +10,41 @@ extern "C" {
|
||||
typedef void (*AISCallback)(u32 count);
|
||||
typedef void (*AIDCallback)();
|
||||
|
||||
#define AI_STREAM_START 1
|
||||
#define AI_STREAM_STOP 0
|
||||
|
||||
#define AI_SAMPLERATE_32KHZ 0
|
||||
#define AI_SAMPLERATE_48KHZ 1
|
||||
|
||||
AIDCallback AIRegisterDMACallback(AIDCallback callback);
|
||||
void AIInitDMA(u32 addr, u32 length);
|
||||
void AIInitDMA(u32 start_addr, u32 length);
|
||||
BOOL AIGetDMAEnableFlag(void);
|
||||
void AIStartDMA(void);
|
||||
void AIStopDMA(void);
|
||||
u32 AIGetDMABytesLeft(void);
|
||||
u32 AIGetDMAStartAddr(void);
|
||||
u32 AIGetDMALength(void);
|
||||
BOOL AICheckInit(void);
|
||||
AISCallback AIRegisterStreamCallback(AISCallback callback);
|
||||
u32 AIGetStreamSampleCount(void);
|
||||
void AIResetStreamSampleCount(void);
|
||||
void AISetStreamTrigger(u32 trigger);
|
||||
u32 AIGetStreamTrigger(void);
|
||||
void AISetStreamPlayState(u32 state);
|
||||
inline u32 AIGetStreamPlayState(void);
|
||||
u32 AIGetStreamPlayState(void);
|
||||
void AISetDSPSampleRate(u32 rate);
|
||||
u32 AIGetDSPSampleRate(void);
|
||||
void __AI_set_stream_sample_rate(u32 rate);
|
||||
void AISetStreamSampleRate(u32 rate);
|
||||
u32 AIGetStreamSampleRate(void);
|
||||
void AISetStreamVolLeft(u8 vol);
|
||||
u8 AIGetStreamVolLeft(void);
|
||||
void AISetStreamVolRight(u8 vol);
|
||||
u8 AIGetStreamVolRight(void);
|
||||
void AIInit(u8* stack);
|
||||
void AIReset(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AI_H */
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef _DOLPHIN_AM_H_
|
||||
#define _DOLPHIN_AM_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*AMCallback)(char* path);
|
||||
|
||||
void* AMLoadFile(char* path, u32* length);
|
||||
u32 AMPush(char* path);
|
||||
u32 AMPushData(void* buffer, u32 length);
|
||||
void AMPop(void);
|
||||
u32 AMGetZeroBuffer(void);
|
||||
u32 AMGetReadStatus(void);
|
||||
u32 AMGetFreeSize(void);
|
||||
u32 AMGetStackPointer(void);
|
||||
void AMInit(u32 aramBase, u32 aramBytes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,123 @@
|
||||
#ifndef _DOLPHIN_AMC_AMCEXI2COMM_H_
|
||||
#define _DOLPHIN_AMC_AMCEXI2COMM_H_
|
||||
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/amc/AmcTypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
AMC_EXI_NO_ERROR = 0,
|
||||
AMC_EXI_UNSELECTED,
|
||||
} AmcExiError;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// void EXI2_Init( volatile unsigned char **inputPendingPtrRef,
|
||||
// EXICallback monitorCallback );
|
||||
//
|
||||
// Description: Initialize the EXI2 driver (without interrupts). The
|
||||
// parameter 'inputPendingPtrref' is a flag showing whether input
|
||||
// is waiting in the EXI2 buffer and 'monitorCallback' is a
|
||||
// pointer to a callback function that is invoked at the end of
|
||||
// the EXI2 ISR.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
void EXI2_Init(volatile unsigned char **inputPendingPtrRef, EXICallback monitorCallback);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// void EXI2_EnableInterrupts( void );
|
||||
//
|
||||
// Description: Enable EXI2 interrupts. This function must be called to use
|
||||
// interrupts on the EXI2 interface. Call this function only
|
||||
// after EXI2_Init() has been invoked.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
void EXI2_EnableInterrupts( void );
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// int EXI2_Poll( void );
|
||||
//
|
||||
// Description: Returns the number of bytes waiting to be read in the EXI2
|
||||
// buffer.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
int EXI2_Poll( void );
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// AmcExiError EXI2_ReadN( void *bytes, unsigned long length );
|
||||
//
|
||||
// Description: Read length bytes and return in bytes[] array.
|
||||
//
|
||||
// Returns: One of AMC_EXI_*.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
AmcExiError EXI2_ReadN( void *bytes, unsigned long length);
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// AmcExiError EXI2_WriteN( const void *bytes, unsigned long length );
|
||||
//
|
||||
// Description: Write length bytes stored in bytes[] array.
|
||||
//
|
||||
// Returns: One of AMC_EXI_*.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
AmcExiError EXI2_WriteN( const void *bytes, unsigned long length);
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// void EXI2_Reserve( void );
|
||||
//
|
||||
// Description: Disable non-monitor communications over the EXI2 port.
|
||||
// This function must be called before the monitor takes
|
||||
// control of the processor.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
void EXI2_Reserve( void );
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// void EXI2_Unreserve( void );
|
||||
//
|
||||
// Description: Re-enable non-monitor communications over the EXI2 port.
|
||||
// This function must be called just before the monitor
|
||||
// gives control of the processor back to the application.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
void EXI2_Unreserve( void );
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// AmcExiError EXI2_GetStatusReg( u16* pu16StatusReg );
|
||||
//
|
||||
// Description: Read and store the value of the status register into
|
||||
// *pu16StatusReg.
|
||||
//
|
||||
// Returns: One of AMC_EXI_*.
|
||||
// ---------------------------------------------------------------------------
|
||||
AmcExiError EXI2_GetStatusReg( u16* pu16StatusReg );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef _INCLUDE_DOLPHIN_AMCTYPES_H_
|
||||
#define _INCLUDE_DOLPHIN_AMCTYPES_H_
|
||||
|
||||
#include <dolphin/os.h>
|
||||
|
||||
// EXI callback function pointer type
|
||||
typedef void (*EXICallback)(s32 chan, OSContext* context);
|
||||
|
||||
#endif
|
||||
@@ -1,30 +0,0 @@
|
||||
#ifndef AMCEXI2STUBS_H
|
||||
#define AMCEXI2STUBS_H
|
||||
|
||||
#include "dolphin/os.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef __OSInterruptHandler AmcEXICallback;
|
||||
|
||||
typedef enum {
|
||||
AMC_EXI_NO_ERROR = 0,
|
||||
AMC_EXI_UNSELECTED
|
||||
} AmcExiError;
|
||||
|
||||
void EXI2_Init(vu8**, AmcEXICallback);
|
||||
void EXI2_EnableInterrupts(void);
|
||||
int EXI2_Poll(void);
|
||||
AmcExiError EXI2_ReadN(void*, u32);
|
||||
AmcExiError EXI2_WriteN(const void*, u32);
|
||||
void EXI2_Reserve(void);
|
||||
void EXI2_Unreserve(void);
|
||||
BOOL AMC_IsStub(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* AMCEXI2STUBS_H */
|
||||
+56
-9
@@ -1,24 +1,71 @@
|
||||
#ifndef AR_H
|
||||
#define AR_H
|
||||
#ifndef _DOLPHIN_AR_H_
|
||||
#define _DOLPHIN_AR_H_
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*ARCallback)(void);
|
||||
typedef void (*ARQCallback)(u32 pointerToARQRequest);
|
||||
|
||||
ARCallback ARRegisterDMACallback(ARCallback callback);
|
||||
struct ARQRequest {
|
||||
/* 0x00 */ struct ARQRequest *next;
|
||||
/* 0x04 */ u32 owner;
|
||||
/* 0x08 */ u32 type;
|
||||
/* 0x0C */ u32 priority;
|
||||
/* 0x10 */ u32 source;
|
||||
/* 0x14 */ u32 dest;
|
||||
/* 0x18 */ u32 length;
|
||||
/* 0x1C */ ARQCallback callback;
|
||||
};
|
||||
|
||||
#define ARQ_DMA_ALIGNMENT 32
|
||||
|
||||
#define ARAM_DIR_MRAM_TO_ARAM 0x00
|
||||
#define ARAM_DIR_ARAM_TO_MRAM 0x01
|
||||
|
||||
#define ARStartDMARead(mmem, aram, len) \
|
||||
ARStartDMA(ARAM_DIR_ARAM_TO_MRAM, mmem, aram, len)
|
||||
#define ARStartDMAWrite(mmem, aram, len) \
|
||||
ARStartDMA(ARAM_DIR_MRAM_TO_ARAM, mmem, aram, len)
|
||||
|
||||
typedef struct ARQRequest ARQRequest;
|
||||
|
||||
#define ARQ_TYPE_MRAM_TO_ARAM ARAM_DIR_MRAM_TO_ARAM
|
||||
#define ARQ_TYPE_ARAM_TO_MRAM ARAM_DIR_ARAM_TO_MRAM
|
||||
|
||||
#define ARQ_PRIORITY_LOW 0
|
||||
#define ARQ_PRIORITY_HIGH 1
|
||||
|
||||
// AR
|
||||
ARQCallback ARRegisterDMACallback(ARQCallback callback);
|
||||
u32 ARGetDMAStatus(void);
|
||||
void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length);
|
||||
u32 ARInit(u32* stack_index_addr, u32 num_entries);
|
||||
u32 ARAlloc(u32 length);
|
||||
u32 ARFree(u32* length);
|
||||
BOOL ARCheckInit(void);
|
||||
u32 ARInit(u32* stack_index_addr, u32 num_entries);
|
||||
void ARReset(void);
|
||||
void ARSetSize(void);
|
||||
u32 ARGetBaseAddress(void);
|
||||
u32 ARGetSize(void);
|
||||
u16 __ARGetInterruptStatus();
|
||||
u32 ARGetInternalSize(void);
|
||||
void ARClear(u32 flag);
|
||||
|
||||
// ARQ
|
||||
void ARQInit(void);
|
||||
void ARQReset(void);
|
||||
void ARQPostRequest(ARQRequest* request, u32 owner, u32 type, u32 priority, u32 source, u32 dest, u32 length, ARQCallback callback);
|
||||
void ARQRemoveRequest(ARQRequest* request);
|
||||
void ARQRemoveOwnerRequest(u32 owner);
|
||||
void ARQFlushQueue(void);
|
||||
void ARQSetChunkSize(u32 size);
|
||||
u32 ARQGetChunkSize(void);
|
||||
BOOL ARQCheckInit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AR_H */
|
||||
#endif
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#ifndef ARQ_H
|
||||
#define ARQ_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ARQ_CHUNK_SIZE_DEFAULT 4096
|
||||
|
||||
typedef void (*ARQCallback)(u32 request_address);
|
||||
|
||||
typedef enum _ARamType {
|
||||
ARAM_DIR_MRAM_TO_ARAM,
|
||||
ARAM_DIR_ARAM_TO_MRAM,
|
||||
} ARamType;
|
||||
|
||||
typedef enum _ArqPriotity {
|
||||
ARQ_PRIORITY_LOW,
|
||||
ARQ_PRIORITY_HIGH,
|
||||
} ArqPriotity;
|
||||
|
||||
typedef struct ARQRequest {
|
||||
struct ARQRequest* next;
|
||||
u32 owner;
|
||||
u32 type;
|
||||
u32 priority;
|
||||
u32 source;
|
||||
u32 destination;
|
||||
u32 length;
|
||||
ARQCallback callback;
|
||||
} ARQRequest;
|
||||
|
||||
void ARQInit(void);
|
||||
void ARQPostRequest(ARQRequest* task, u32 owner, u32 type, u32 priority, u32 source,
|
||||
u32 destination, u32 length, ARQCallback callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* ARQ_H */
|
||||
@@ -0,0 +1,325 @@
|
||||
#ifndef _DOLPHIN_AX_H_
|
||||
#define _DOLPHIN_AX_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _AXPBMIX {
|
||||
/* 0x00 */ u16 vL;
|
||||
/* 0x02 */ u16 vDeltaL;
|
||||
/* 0x04 */ u16 vR;
|
||||
/* 0x06 */ u16 vDeltaR;
|
||||
/* 0x08 */ u16 vAuxAL;
|
||||
/* 0x0A */ u16 vDeltaAuxAL;
|
||||
/* 0x0C */ u16 vAuxAR;
|
||||
/* 0x0E */ u16 vDeltaAuxAR;
|
||||
/* 0x10 */ u16 vAuxBL;
|
||||
/* 0x12 */ u16 vDeltaAuxBL;
|
||||
/* 0x14 */ u16 vAuxBR;
|
||||
/* 0x16 */ u16 vDeltaAuxBR;
|
||||
/* 0x18 */ u16 vAuxBS;
|
||||
/* 0x1A */ u16 vDeltaAuxBS;
|
||||
/* 0x1C */ u16 vS;
|
||||
/* 0x1E */ u16 vDeltaS;
|
||||
/* 0x20 */ u16 vAuxAS;
|
||||
/* 0x22 */ u16 vDeltaAuxAS;
|
||||
} AXPBMIX;
|
||||
|
||||
typedef struct _AXPBITD {
|
||||
/* 0x00 */ u16 flag;
|
||||
/* 0x02 */ u16 bufferHi;
|
||||
/* 0x04 */ u16 bufferLo;
|
||||
/* 0x06 */ u16 shiftL;
|
||||
/* 0x08 */ u16 shiftR;
|
||||
/* 0x0A */ u16 targetShiftL;
|
||||
/* 0x0C */ u16 targetShiftR;
|
||||
} AXPBITD;
|
||||
|
||||
typedef struct _AXPBUPDATE {
|
||||
/* 0x00 */ u16 updNum[5];
|
||||
/* 0x0A */ u16 dataHi;
|
||||
/* 0x0C */ u16 dataLo;
|
||||
} AXPBUPDATE;
|
||||
|
||||
typedef struct _AXPBDPOP {
|
||||
/* 0x00 */ s16 aL;
|
||||
/* 0x02 */ s16 aAuxAL;
|
||||
/* 0x04 */ s16 aAuxBL;
|
||||
/* 0x06 */ s16 aR;
|
||||
/* 0x08 */ s16 aAuxAR;
|
||||
/* 0x0A */ s16 aAuxBR;
|
||||
/* 0x0C */ s16 aS;
|
||||
/* 0x0E */ s16 aAuxAS;
|
||||
/* 0x10 */ s16 aAuxBS;
|
||||
} AXPBDPOP;
|
||||
|
||||
typedef struct _AXPBVE {
|
||||
/* 0x00 */ u16 currentVolume;
|
||||
/* 0x02 */ s16 currentDelta;
|
||||
} AXPBVE;
|
||||
|
||||
typedef struct _AXPBFIR {
|
||||
/* 0x00 */ u16 numCoefs;
|
||||
/* 0x02 */ u16 coefsHi;
|
||||
/* 0x04 */ u16 coefsLo;
|
||||
} AXPBFIR;
|
||||
|
||||
typedef struct _AXPBADDR {
|
||||
/* 0x00 */ u16 loopFlag;
|
||||
/* 0x02 */ u16 format;
|
||||
/* 0x04 */ u16 loopAddressHi;
|
||||
/* 0x06 */ u16 loopAddressLo;
|
||||
/* 0x08 */ u16 endAddressHi;
|
||||
/* 0x0A */ u16 endAddressLo;
|
||||
/* 0x0C */ u16 currentAddressHi;
|
||||
/* 0x0E */ u16 currentAddressLo;
|
||||
} AXPBADDR;
|
||||
|
||||
typedef struct _AXPBADPCM {
|
||||
/* 0x00 */ u16 a[8][2];
|
||||
/* 0x20 */ u16 gain;
|
||||
/* 0x22 */ u16 pred_scale;
|
||||
/* 0x24 */ u16 yn1;
|
||||
/* 0x26 */ u16 yn2;
|
||||
} AXPBADPCM;
|
||||
|
||||
typedef struct _AXPBSRC {
|
||||
/* 0x00 */ u16 ratioHi;
|
||||
/* 0x02 */ u16 ratioLo;
|
||||
/* 0x04 */ u16 currentAddressFrac;
|
||||
/* 0x06 */ u16 last_samples[4];
|
||||
} AXPBSRC;
|
||||
|
||||
typedef struct _AXPBADPCMLOOP {
|
||||
/* 0x00 */ u16 loop_pred_scale;
|
||||
/* 0x02 */ u16 loop_yn1;
|
||||
/* 0x04 */ u16 loop_yn2;
|
||||
} AXPBADPCMLOOP;
|
||||
|
||||
typedef struct _AXPBLPF {
|
||||
u16 on;
|
||||
u16 yn1;
|
||||
u16 a0;
|
||||
u16 b0;
|
||||
} AXPBLPF;
|
||||
|
||||
typedef struct _AXPB {
|
||||
/* 0x00 */ u16 nextHi;
|
||||
/* 0x02 */ u16 nextLo;
|
||||
/* 0x04 */ u16 currHi;
|
||||
/* 0x06 */ u16 currLo;
|
||||
/* 0x08 */ u16 srcSelect;
|
||||
/* 0x0A */ u16 coefSelect;
|
||||
/* 0x0C */ u16 mixerCtrl;
|
||||
/* 0x0E */ u16 state;
|
||||
/* 0x10 */ u16 type;
|
||||
/* 0x12 */ AXPBMIX mix;
|
||||
/* 0x36 */ AXPBITD itd;
|
||||
/* 0x44 */ AXPBUPDATE update;
|
||||
/* 0x52 */ AXPBDPOP dpop;
|
||||
/* 0x64 */ AXPBVE ve;
|
||||
/* 0x68 */ AXPBFIR fir;
|
||||
/* 0x6E */ AXPBADDR addr;
|
||||
/* 0x7E */ AXPBADPCM adpcm;
|
||||
/* 0xA6 */ AXPBSRC src;
|
||||
/* 0xB4 */ AXPBADPCMLOOP adpcmLoop;
|
||||
/* 0xBA */ AXPBLPF lpf;
|
||||
/* 0xC2 */ u16 pad[25];
|
||||
} AXPB;
|
||||
|
||||
typedef struct _AXVPB {
|
||||
/* 0x000 */ void* next;
|
||||
/* 0x004 */ void* prev;
|
||||
/* 0x008 */ void* next1;
|
||||
/* 0x00C */ u32 priority;
|
||||
/* 0x010 */ void (*callback)(void*);
|
||||
/* 0x014 */ u32 userContext;
|
||||
/* 0x018 */ u32 index;
|
||||
/* 0x01C */ u32 sync;
|
||||
/* 0x020 */ u32 depop;
|
||||
/* 0x024 */ u32 updateMS;
|
||||
/* 0x028 */ u32 updateCounter;
|
||||
/* 0x02C */ u32 updateTotal;
|
||||
/* 0x030 */ u16* updateWrite;
|
||||
/* 0x034 */ u16 updateData[128];
|
||||
/* 0x134 */ void* itdBuffer;
|
||||
/* 0x138 */ AXPB pb;
|
||||
} AXVPB;
|
||||
|
||||
typedef struct _AXPBITDBUFFER {
|
||||
/* 0x00 */ s16 data[32];
|
||||
} AXPBITDBUFFER;
|
||||
|
||||
typedef struct _AXPBU {
|
||||
/* 0x00 */ u16 data[128];
|
||||
} AXPBU;
|
||||
|
||||
typedef struct _AXSPB {
|
||||
/* 0x00 */ u16 dpopLHi;
|
||||
/* 0x02 */ u16 dpopLLo;
|
||||
/* 0x04 */ s16 dpopLDelta;
|
||||
/* 0x06 */ u16 dpopRHi;
|
||||
/* 0x08 */ u16 dpopRLo;
|
||||
/* 0x0A */ s16 dpopRDelta;
|
||||
/* 0x0C */ u16 dpopSHi;
|
||||
/* 0x0E */ u16 dpopSLo;
|
||||
/* 0x10 */ s16 dpopSDelta;
|
||||
/* 0x12 */ u16 dpopALHi;
|
||||
/* 0x14 */ u16 dpopALLo;
|
||||
/* 0x16 */ s16 dpopALDelta;
|
||||
/* 0x18 */ u16 dpopARHi;
|
||||
/* 0x1A */ u16 dpopARLo;
|
||||
/* 0x1C */ s16 dpopARDelta;
|
||||
/* 0x1E */ u16 dpopASHi;
|
||||
/* 0x20 */ u16 dpopASLo;
|
||||
/* 0x22 */ s16 dpopASDelta;
|
||||
/* 0x24 */ u16 dpopBLHi;
|
||||
/* 0x26 */ u16 dpopBLLo;
|
||||
/* 0x28 */ s16 dpopBLDelta;
|
||||
/* 0x2A */ u16 dpopBRHi;
|
||||
/* 0x2C */ u16 dpopBRLo;
|
||||
/* 0x2E */ s16 dpopBRDelta;
|
||||
/* 0x30 */ u16 dpopBSHi;
|
||||
/* 0x32 */ u16 dpopBSLo;
|
||||
/* 0x34 */ s16 dpopBSDelta;
|
||||
} AXSPB;
|
||||
|
||||
typedef struct _AXPROFILE {
|
||||
/* 0x00 */ u64 axFrameStart;
|
||||
/* 0x08 */ u64 auxProcessingStart;
|
||||
/* 0x10 */ u64 auxProcessingEnd;
|
||||
/* 0x18 */ u64 userCallbackStart;
|
||||
/* 0x20 */ u64 userCallbackEnd;
|
||||
/* 0x28 */ u64 axFrameEnd;
|
||||
/* 0x30 */ u32 axNumVoices;
|
||||
} AXPROFILE;
|
||||
|
||||
typedef struct AX_AUX_DATA {
|
||||
/* 0x00 */ s32* l;
|
||||
/* 0x00 */ s32* r;
|
||||
/* 0x00 */ s32* s;
|
||||
} AX_AUX_DATA;
|
||||
|
||||
typedef struct AX_AUX_DATA_DPL2 {
|
||||
/* 0x00 */ s32* l;
|
||||
/* 0x00 */ s32* r;
|
||||
/* 0x00 */ s32* ls;
|
||||
/* 0x00 */ s32* rs;
|
||||
} AX_AUX_DATA_DPL2;
|
||||
|
||||
typedef void (*AXCallback)();
|
||||
|
||||
#define AX_DSP_SLAVE_LENGTH 0xF80
|
||||
#define AX_MAX_VOICES 64
|
||||
|
||||
#define AX_SRC_TYPE_NONE 0
|
||||
#define AX_SRC_TYPE_LINEAR 1
|
||||
#define AX_SRC_TYPE_4TAP_8K 2
|
||||
#define AX_SRC_TYPE_4TAP_12K 3
|
||||
#define AX_SRC_TYPE_4TAP_16K 4
|
||||
|
||||
// sync flags
|
||||
#define AX_SYNC_FLAG_COPYALL (1 << 31)
|
||||
#define AX_SYNC_FLAG_UNK1 (1 << 30) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK2 (1 << 29) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK3 (1 << 28) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK4 (1 << 27) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK5 (1 << 26) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK6 (1 << 25) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK7 (1 << 24) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK8 (1 << 23) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK9 (1 << 22) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_UNK10 (1 << 21) // reserved, unused?
|
||||
#define AX_SYNC_FLAG_COPYADPCMLOOP (1 << 20)
|
||||
#define AX_SYNC_FLAG_COPYRATIO (1 << 19)
|
||||
#define AX_SYNC_FLAG_COPYSRC (1 << 18)
|
||||
#define AX_SYNC_FLAG_COPYADPCM (1 << 17)
|
||||
#define AX_SYNC_FLAG_COPYCURADDR (1 << 16)
|
||||
#define AX_SYNC_FLAG_COPYENDADDR (1 << 15)
|
||||
#define AX_SYNC_FLAG_COPYLOOPADDR (1 << 14)
|
||||
#define AX_SYNC_FLAG_COPYLOOP (1 << 13)
|
||||
#define AX_SYNC_FLAG_COPYADDR (1 << 12)
|
||||
#define AX_SYNC_FLAG_COPYFIR (1 << 11)
|
||||
#define AX_SYNC_FLAG_SWAPVOL (1 << 10)
|
||||
#define AX_SYNC_FLAG_COPYVOL (1 << 9)
|
||||
#define AX_SYNC_FLAG_COPYDPOP (1 << 8)
|
||||
#define AX_SYNC_FLAG_COPYUPDATE (1 << 7)
|
||||
#define AX_SYNC_FLAG_COPYTSHIFT (1 << 6)
|
||||
#define AX_SYNC_FLAG_COPYITD (1 << 5)
|
||||
#define AX_SYNC_FLAG_COPYAXPBMIX (1 << 4)
|
||||
#define AX_SYNC_FLAG_COPYTYPE (1 << 3)
|
||||
#define AX_SYNC_FLAG_COPYSTATE (1 << 2)
|
||||
#define AX_SYNC_FLAG_COPYMXRCTRL (1 << 1)
|
||||
#define AX_SYNC_FLAG_COPYSELECT (1 << 0)
|
||||
|
||||
#define AX_PRIORITY_STACKS 32
|
||||
|
||||
// AX
|
||||
void AXInit(void);
|
||||
void AXInitEx(u32 outputBufferMode);
|
||||
void AXQuit(void);
|
||||
|
||||
// AXAlloc
|
||||
void AXFreeVoice(AXVPB* p);
|
||||
AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void *), u32 userContext);
|
||||
void AXSetVoicePriority(AXVPB* p, u32 priority);
|
||||
|
||||
// AXAux
|
||||
void AXRegisterAuxACallback(void (*callback)(void*, void*), void* context);
|
||||
void AXRegisterAuxBCallback(void (*callback)(void*, void*), void* context);
|
||||
|
||||
// AXCL
|
||||
void AXSetMode(u32 mode);
|
||||
u32 AXGetMode(void);
|
||||
|
||||
// AXOut
|
||||
extern AXPROFILE __AXLocalProfile;
|
||||
|
||||
void AXSetStepMode(u32 i);
|
||||
AXCallback AXRegisterCallback(AXCallback callback);
|
||||
|
||||
// AXProf
|
||||
void AXInitProfile(AXPROFILE* profile, u32 maxProfiles);
|
||||
u32 AXGetProfile(void);
|
||||
|
||||
// AXVPB
|
||||
void AXSetVoiceSrcType(AXVPB* p, u32 type);
|
||||
void AXSetVoiceState(AXVPB* p, u16 state);
|
||||
void AXSetVoiceType(AXVPB* p, u16 type);
|
||||
void AXSetVoiceMix(AXVPB* p, AXPBMIX* mix);
|
||||
void AXSetVoiceItdOn(AXVPB* p);
|
||||
void AXSetVoiceItdTarget(AXVPB* p, u16 lShift, u16 rShift);
|
||||
void AXSetVoiceUpdateIncrement(AXVPB* p);
|
||||
void AXSetVoiceUpdateWrite(AXVPB* p, u16 param, u16 data);
|
||||
void AXSetVoiceDpop(AXVPB* p, AXPBDPOP* dpop);
|
||||
void AXSetVoiceVe(AXVPB* p, AXPBVE* ve);
|
||||
void AXSetVoiceVeDelta(AXVPB* p, s16 delta);
|
||||
void AXSetVoiceFir(AXVPB* p, AXPBFIR* fir);
|
||||
void AXSetVoiceAddr(AXVPB* p, AXPBADDR* addr);
|
||||
void AXSetVoiceLoop(AXVPB* p, u16 loop);
|
||||
void AXSetVoiceLoopAddr(AXVPB* p, u32 addr);
|
||||
void AXSetVoiceEndAddr(AXVPB* p, u32 addr);
|
||||
void AXSetVoiceCurrentAddr(AXVPB* p, u32 addr);
|
||||
void AXSetVoiceAdpcm(AXVPB* p, AXPBADPCM* adpcm);
|
||||
void AXSetVoiceSrc(AXVPB* p, AXPBSRC* src_);
|
||||
void AXSetVoiceSrcRatio(AXVPB* p, f32 ratio);
|
||||
void AXSetVoiceAdpcmLoop(AXVPB* p, AXPBADPCMLOOP* adpcmloop);
|
||||
void AXSetMaxDspCycles(u32 cycles);
|
||||
u32 AXGetMaxDspCycles(void);
|
||||
u32 AXGetDspCycles(void);
|
||||
void AXSetVoiceLpf(AXVPB* p, AXPBLPF* lpf);
|
||||
void AXSetVoiceLpfCoefs(AXVPB* p, u16 a0, u16 b0);
|
||||
void AXGetLpfCoefs(u16 freq, u16* a0, u16* b0);
|
||||
|
||||
// DSPCode
|
||||
extern u16 axDspSlaveLength;
|
||||
extern u16 axDspSlave[AX_DSP_SLAVE_LENGTH];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DOLPHIN_AX_H_
|
||||
@@ -0,0 +1,224 @@
|
||||
#ifndef _DOLPHIN_AXART_H_
|
||||
#define _DOLPHIN_AXART_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <dolphin/ax.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum __axart_type {
|
||||
AXART_TYPE_NONE,
|
||||
AXART_TYPE_3D,
|
||||
AXART_TYPE_PANNING,
|
||||
AXART_TYPE_ITD,
|
||||
AXART_TYPE_SRC,
|
||||
AXART_TYPE_PITCH,
|
||||
AXART_TYPE_PITCH_ENV,
|
||||
AXART_TYPE_PITCH_MOD,
|
||||
AXART_TYPE_VOLUME,
|
||||
AXART_TYPE_AUX_A_VOLUME,
|
||||
AXART_TYPE_AUX_B_VOLUME,
|
||||
AXART_TYPE_VOLUME_ENV,
|
||||
AXART_TYPE_AUX_A_VOLUME_ENV,
|
||||
AXART_TYPE_AUX_B_VOLUME_ENV,
|
||||
AXART_TYPE_VOLUME_MOD,
|
||||
AXART_TYPE_AUX_A_VOLUME_MOD,
|
||||
AXART_TYPE_AUX_B_VOLUME_MOD,
|
||||
AXART_TYPE_LPF,
|
||||
|
||||
AXART_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
void* next;
|
||||
u32 type;
|
||||
} AXART_ART;
|
||||
|
||||
typedef struct {
|
||||
f32* lfo;
|
||||
u32 length;
|
||||
f32 delta;
|
||||
u32 sampleIndex;
|
||||
f32 counter;
|
||||
f32 sample1;
|
||||
f32 sample;
|
||||
f32 output;
|
||||
} AXART_LFO;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
f32 hAngle;
|
||||
f32 vAngle;
|
||||
f32 dist;
|
||||
f32 closingSpeed;
|
||||
u32 update;
|
||||
u8 pan;
|
||||
u8 span;
|
||||
u8 src;
|
||||
u16 itdL;
|
||||
u16 itdR;
|
||||
f32 pitch;
|
||||
s32 attenuation;
|
||||
} AXART_3D;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
u8 pan;
|
||||
u8 span;
|
||||
} AXART_PANNING;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
u16 itdL;
|
||||
u16 itdR;
|
||||
} AXART_ITD;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
u8 src;
|
||||
} AXART_SRC;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 cents;
|
||||
} AXART_PITCH;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 delta;
|
||||
s32 target;
|
||||
s32 cents;
|
||||
} AXART_PITCH_ENV;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
AXART_LFO lfo;
|
||||
s32 cents;
|
||||
} AXART_PITCH_MOD;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 attenuation;
|
||||
} AXART_VOLUME;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 attenuation;
|
||||
} AXART_AUXA_VOLUME;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 attenuation;
|
||||
} AXART_AUXB_VOLUME;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 delta;
|
||||
s32 target;
|
||||
s32 attenuation;
|
||||
} AXART_VOLUME_ENV;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 delta;
|
||||
s32 target;
|
||||
s32 attenuation;
|
||||
} AXART_AUXA_VOLUME_ENV;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
s32 delta;
|
||||
s32 target;
|
||||
s32 attenuation;
|
||||
} AXART_AUXB_VOLUME_ENV;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
AXART_LFO lfo;
|
||||
s32 attenuation;
|
||||
} AXART_VOLUME_MOD;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
AXART_LFO lfo;
|
||||
s32 attenuation;
|
||||
} AXART_AUXA_VOLUME_MOD;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
AXART_LFO lfo;
|
||||
s32 attenuation;
|
||||
} AXART_AUXB_VOLUME_MOD;
|
||||
|
||||
typedef struct {
|
||||
AXART_ART art;
|
||||
u32 initLPF;
|
||||
u32 frequency;
|
||||
u32 update;
|
||||
} AXART_LPF;
|
||||
|
||||
typedef struct {
|
||||
void* next;
|
||||
void* prev;
|
||||
AXVPB* axvpb;
|
||||
f32 sampleRate;
|
||||
AXART_ART* articulators;
|
||||
} AXART_SOUND;
|
||||
|
||||
#define AXART_SINE_CNT 64
|
||||
extern f32 AXARTSine[AXART_SINE_CNT];
|
||||
|
||||
// axart
|
||||
void AXARTInit(void);
|
||||
void AXARTQuit(void);
|
||||
void AXARTServiceSounds(void);
|
||||
void AXARTAddSound(AXART_SOUND* sound);
|
||||
void AXARTRemoveSound(AXART_SOUND* sound);
|
||||
void AXARTInitLfo(AXART_LFO* lfo, f32* samples, u32 length, f32 delta);
|
||||
void AXARTInitArt3D(AXART_3D* articulator);
|
||||
void AXARTInitArtPanning(AXART_PANNING* articulator);
|
||||
void AXARTInitArtItd(AXART_ITD* articulator);
|
||||
void AXARTInitArtSrctype(AXART_SRC* articulator);
|
||||
void AXARTInitArtPitch(AXART_PITCH* articulator);
|
||||
void AXARTInitArtPitchEnv(AXART_PITCH_ENV* articulator);
|
||||
void AXARTInitArtPitchMod(AXART_PITCH_MOD* articulator);
|
||||
void AXARTInitArtVolume(AXART_VOLUME* articulator);
|
||||
void AXARTInitArtAuxAVolume(AXART_AUXA_VOLUME* articulator);
|
||||
void AXARTInitArtAuxBVolume(AXART_AUXB_VOLUME* articulator);
|
||||
void AXARTInitArtVolumeEnv(AXART_VOLUME_ENV* articulator);
|
||||
void AXARTInitArtAuxAVolumeEnv(AXART_AUXA_VOLUME_ENV* articulator);
|
||||
void AXARTInitArtAuxBVolumeEnv(AXART_AUXB_VOLUME_ENV* articulator);
|
||||
void AXARTInitArtVolumeMod(AXART_VOLUME_MOD* articulator);
|
||||
void AXARTInitArtAuxAVolumeMod(AXART_AUXA_VOLUME_MOD* articulator);
|
||||
void AXARTInitArtAuxBVolumeMod(AXART_AUXB_VOLUME_MOD* articulator);
|
||||
void AXARTInitArtLpf(AXART_LPF* articulator);
|
||||
|
||||
// axart3d
|
||||
void AXARTSet3DDistanceScale(f32 scale);
|
||||
void AXARTSet3DDopplerScale(f32 scale);
|
||||
void AXART3DSound(AXART_3D* articulator);
|
||||
|
||||
// axartcents
|
||||
f32 AXARTCents(s32 cents);
|
||||
|
||||
// axartenv
|
||||
void AXARTPitchEnv(AXART_PITCH_ENV* articulator);
|
||||
void AXARTVolumeEnv(AXART_VOLUME_ENV* articulator);
|
||||
|
||||
// axartlfo
|
||||
void AXARTLfo(AXART_LFO* lfo);
|
||||
|
||||
// axartsound
|
||||
void AXARTServiceSound(AXART_SOUND* sound);
|
||||
void AXARTAddArticulator(AXART_SOUND* sound, AXART_ART* articulator);
|
||||
|
||||
// axartlpf
|
||||
void AXARTLpf(AXART_LPF*, AXVPB*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DOLPHIN_AXART_H_
|
||||
@@ -0,0 +1,196 @@
|
||||
#ifndef _DOLPHIN_AXFX_H_
|
||||
#define _DOLPHIN_AXFX_H_
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct AXFX_REVSTD_DELAYLINE {
|
||||
/* 0x00 */ s32 inPoint;
|
||||
/* 0x04 */ s32 outPoint;
|
||||
/* 0x08 */ s32 length;
|
||||
/* 0x0C */ f32* inputs;
|
||||
/* 0x10 */ f32 lastOutput;
|
||||
} AXFX_REVSTD_DELAYLINE;
|
||||
|
||||
typedef struct AXFX_REVSTD_WORK {
|
||||
/* 0x000 */ AXFX_REVSTD_DELAYLINE AP[6];
|
||||
/* 0x078 */ AXFX_REVSTD_DELAYLINE C[6];
|
||||
/* 0x0F0 */ f32 allPassCoeff;
|
||||
/* 0x0F4 */ f32 combCoef[6];
|
||||
/* 0x10C */ f32 lpLastout[3];
|
||||
/* 0x118 */ f32 level;
|
||||
/* 0x11C */ f32 damping;
|
||||
/* 0x120 */ s32 preDelayTime;
|
||||
/* 0x124 */ f32* preDelayLine[3];
|
||||
/* 0x130 */ f32* preDelayPtr[3];
|
||||
} AXFX_REVSTD_WORK;
|
||||
|
||||
typedef struct AXFX_REVERBSTD {
|
||||
/* 0x000 */ AXFX_REVSTD_WORK rv;
|
||||
/* 0x13C */ u8 tempDisableFX;
|
||||
/* 0x140 */ f32 coloration;
|
||||
/* 0x144 */ f32 mix;
|
||||
/* 0x148 */ f32 time;
|
||||
/* 0x14C */ f32 damping;
|
||||
/* 0x150 */ f32 preDelay;
|
||||
} AXFX_REVERBSTD;
|
||||
|
||||
typedef struct AXFX_BUFFERUPDATE {
|
||||
/* 0x00 */ s32* left;
|
||||
/* 0x04 */ s32* right;
|
||||
/* 0x08 */ s32* surround;
|
||||
} AXFX_BUFFERUPDATE;
|
||||
|
||||
typedef struct AXFX_BUFFERUPDATE_DPL2 {
|
||||
/* 0x00 */ s32* L;
|
||||
/* 0x04 */ s32* R;
|
||||
/* 0x08 */ s32* Ls;
|
||||
/* 0x0C */ s32* Rs;
|
||||
} AXFX_BUFFERUPDATE_DPL2;
|
||||
|
||||
// REVHI Structs
|
||||
|
||||
typedef struct AXFX_REVHI_DELAYLINE {
|
||||
/* 0x00 */ s32 inPoint;
|
||||
/* 0x04 */ s32 outPoint;
|
||||
/* 0x08 */ s32 length;
|
||||
/* 0x0C */ f32* inputs;
|
||||
/* 0x10 */ f32 lastOutput;
|
||||
} AXFX_REVHI_DELAYLINE;
|
||||
|
||||
typedef struct AXFX_REVHI_WORK {
|
||||
/* 0x000 */ AXFX_REVHI_DELAYLINE AP[9];
|
||||
/* 0x0B4 */ AXFX_REVHI_DELAYLINE C[9];
|
||||
/* 0x168 */ f32 allPassCoeff;
|
||||
/* 0x16C */ f32 combCoef[9];
|
||||
/* 0x190 */ f32 lpLastout[3];
|
||||
/* 0x19C */ f32 level;
|
||||
/* 0x1A0 */ f32 damping;
|
||||
/* 0x1A4 */ s32 preDelayTime;
|
||||
/* 0x1A8 */ f32 crosstalk;
|
||||
/* 0x1AC */ f32* preDelayLine[3];
|
||||
/* 0x1B8 */ f32* preDelayPtr[3];
|
||||
} AXFX_REVHI_WORK;
|
||||
|
||||
typedef struct AXFX_REVHI_WORK_DPL2 {
|
||||
/* 0x000 */ AXFX_REVHI_DELAYLINE AP[12];
|
||||
/* 0x0F0 */ AXFX_REVHI_DELAYLINE C[12];
|
||||
/* 0x1E0 */ f32 allPassCoeff;
|
||||
/* 0x1E4 */ f32 combCoef[12];
|
||||
/* 0x214 */ f32 lpLastout[4];
|
||||
/* 0x224 */ f32 level;
|
||||
/* 0x228 */ f32 damping;
|
||||
/* 0x22C */ s32 preDelayTime;
|
||||
/* 0x230 */ f32 crosstalk;
|
||||
/* 0x234 */ f32* preDelayLine[4];
|
||||
/* 0x244 */ f32* preDelayPtr[4];
|
||||
} AXFX_REVHI_WORK_DPL2;
|
||||
|
||||
typedef struct AXFX_REVERBHI {
|
||||
/* 0x000 */ AXFX_REVHI_WORK rv;
|
||||
/* 0x1C4 */ u8 tempDisableFX;
|
||||
/* 0x1C8 */ f32 coloration;
|
||||
/* 0x1CC */ f32 mix;
|
||||
/* 0x1D0 */ f32 time;
|
||||
/* 0x1D4 */ f32 damping;
|
||||
/* 0x1D8 */ f32 preDelay;
|
||||
/* 0x1DC */ f32 crosstalk;
|
||||
} AXFX_REVERBHI;
|
||||
|
||||
typedef struct AXFX_REVERBHI_DPL2 {
|
||||
/* 0x000 */ AXFX_REVHI_WORK_DPL2 rv;
|
||||
/* 0x254 */ u8 tempDisableFX;
|
||||
/* 0x258 */ f32 coloration;
|
||||
/* 0x25C */ f32 mix;
|
||||
/* 0x260 */ f32 time;
|
||||
/* 0x264 */ f32 damping;
|
||||
/* 0x268 */ f32 preDelay;
|
||||
} AXFX_REVERBHI_DPL2;
|
||||
|
||||
typedef struct AXFX_DELAY {
|
||||
/* 0x00 */ u32 currentSize[3];
|
||||
/* 0x0C */ u32 currentPos[3];
|
||||
/* 0x18 */ u32 currentFeedback[3];
|
||||
/* 0x24 */ u32 currentOutput[3];
|
||||
/* 0x30 */ s32* left;
|
||||
/* 0x34 */ s32* right;
|
||||
/* 0x38 */ s32* sur;
|
||||
/* 0x3C */ u32 delay[3];
|
||||
/* 0x48 */ u32 feedback[3];
|
||||
/* 0x54 */ u32 output[3];
|
||||
} AXFX_DELAY;
|
||||
|
||||
typedef struct AXFX_CHORUS_SRCINFO {
|
||||
/* 0x00 */ s32* dest;
|
||||
/* 0x04 */ s32* smpBase;
|
||||
/* 0x08 */ s32* old;
|
||||
/* 0x0C */ u32 posLo;
|
||||
/* 0x10 */ u32 posHi;
|
||||
/* 0x14 */ u32 pitchLo;
|
||||
/* 0x18 */ u32 pitchHi;
|
||||
/* 0x1C */ u32 trigger;
|
||||
/* 0x20 */ u32 target;
|
||||
} AXFX_CHORUS_SRCINFO;
|
||||
|
||||
typedef struct AXFX_CHORUS_WORK {
|
||||
/* 0x00 */ s32* lastLeft[3];
|
||||
/* 0x0C */ s32* lastRight[3];
|
||||
/* 0x18 */ s32* lastSur[3];
|
||||
/* 0x24 */ u8 currentLast;
|
||||
/* 0x28 */ s32 oldLeft[4];
|
||||
/* 0x38 */ s32 oldRight[4];
|
||||
/* 0x48 */ s32 oldSur[4];
|
||||
/* 0x58 */ u32 currentPosLo;
|
||||
/* 0x5C */ u32 currentPosHi;
|
||||
/* 0x60 */ s32 pitchOffset;
|
||||
/* 0x64 */ u32 pitchOffsetPeriodCount;
|
||||
/* 0x68 */ u32 pitchOffsetPeriod;
|
||||
/* 0x6C */ AXFX_CHORUS_SRCINFO src;
|
||||
} AXFX_CHORUS_WORK;
|
||||
|
||||
typedef struct AXFX_CHORUS {
|
||||
/* 0x00 */ AXFX_CHORUS_WORK work;
|
||||
/* 0x90 */ u32 baseDelay;
|
||||
/* 0x94 */ u32 variation;
|
||||
/* 0x98 */ u32 period;
|
||||
} AXFX_CHORUS;
|
||||
|
||||
// chorus
|
||||
int AXFXChorusInit(AXFX_CHORUS* c);
|
||||
int AXFXChorusShutdown(AXFX_CHORUS* c);
|
||||
int AXFXChorusSettings(AXFX_CHORUS* c);
|
||||
void AXFXChorusCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_CHORUS* chorus);
|
||||
|
||||
// delay
|
||||
void AXFXDelayCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_DELAY* delay);
|
||||
int AXFXDelaySettings(AXFX_DELAY* delay);
|
||||
int AXFXDelayInit(AXFX_DELAY* delay);
|
||||
int AXFXDelayShutdown(AXFX_DELAY* delay);
|
||||
|
||||
// reverb_hi
|
||||
void DoCrossTalk(s32* l, s32* r, f32 cross, f32 invcross);
|
||||
int AXFXReverbHiInit(AXFX_REVERBHI* rev);
|
||||
int AXFXReverbHiShutdown(AXFX_REVERBHI* rev);
|
||||
int AXFXReverbHiSettings(AXFX_REVERBHI* rev);
|
||||
void AXFXReverbHiCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBHI* reverb);
|
||||
|
||||
// reverb_hi_4ch
|
||||
int AXFXReverbHiInitDpl2(AXFX_REVERBHI_DPL2* reverb);
|
||||
int AXFXReverbHiShutdownDpl2(AXFX_REVERBHI_DPL2* reverb);
|
||||
int AXFXReverbHiSettingsDpl2(AXFX_REVERBHI_DPL2* rev);
|
||||
void AXFXReverbHiCallbackDpl2(AXFX_BUFFERUPDATE_DPL2* bufferUpdate, AXFX_REVERBHI_DPL2* reverb);
|
||||
|
||||
// reverb_std
|
||||
int AXFXReverbStdInit(AXFX_REVERBSTD* rev);
|
||||
int AXFXReverbStdShutdown(AXFX_REVERBSTD* rev);
|
||||
int AXFXReverbStdSettings(AXFX_REVERBSTD* rev);
|
||||
void AXFXReverbStdCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBSTD* reverb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _DOLPHIN_AXFX_H_
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef PPCARCH_H
|
||||
#define PPCARCH_H
|
||||
#ifndef _DOLPHIN_PPCARCH
|
||||
#define _DOLPHIN_PPCARCH
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -139,32 +139,32 @@ extern "C" {
|
||||
/*---------------------------------------------------------------------------*
|
||||
HID0 bits
|
||||
*---------------------------------------------------------------------------*/
|
||||
#define HID0_EMCP 0x80000000 // Enable MCP
|
||||
#define HID0_DBP 0x40000000 // Enable 60x bus address and data parity chk
|
||||
#define HID0_EBA 0x20000000 // Enable 60x address parity checking
|
||||
#define HID0_EBD 0x10000000 // Enable 60x data parity checking
|
||||
#define HID0_BCLK 0x08000000 // CLK_OUT output enable and clk selection
|
||||
#define HID0_ECLK 0x02000000 // CLK_OUT output enable and clk selection
|
||||
#define HID0_PAR 0x01000000 // Disable !ARTRY precharge
|
||||
#define HID0_DOZE 0x00800000 // Doze mode enable
|
||||
#define HID0_NAP 0x00400000 // Nap mode enable
|
||||
#define HID0_SLEEP 0x00200000 // Sleep mode enable
|
||||
#define HID0_DPM 0x00100000 // Dynamic power management enable
|
||||
#define HID0_NHR 0x00010000 // Not hard reset (0 hard reset if s/w set it)
|
||||
#define HID0_ICE 0x00008000 // Instruction cache enable
|
||||
#define HID0_DCE 0x00004000 // Data cache enable
|
||||
#define HID0_ILOCK 0x00002000 // ICache lock
|
||||
#define HID0_DLOCK 0x00001000 // DCache lock
|
||||
#define HID0_ICFI 0x00000800 // ICache flash invalidate
|
||||
#define HID0_DCFI 0x00000400 // DCache flash invalidate
|
||||
#define HID0_SPD 0x00000200 // Speculative cache access enable (0 enable)
|
||||
#define HID0_IFEM 0x00000100 // Enable M bit on bus for Ifetch
|
||||
#define HID0_SGE 0x00000080 // Store gathering enable
|
||||
#define HID0_DCFA 0x00000040 // DCache flush assist - set before a flush
|
||||
#define HID0_BTIC 0x00000020 // Branch target icache enable
|
||||
#define HID0_ABE 0x00000008 // Address bcast enable
|
||||
#define HID0_BHT 0x00000004 // Branch history table enable
|
||||
#define HID0_NOOPTI 0x00000001 // No-op Dcache touch instructions
|
||||
#define HID0_EMCP 0x80000000u // Enable MCP
|
||||
#define HID0_DBP 0x40000000u // Enable 60x bus address and data parity chk
|
||||
#define HID0_EBA 0x20000000u // Enable 60x address parity checking
|
||||
#define HID0_EBD 0x10000000u // Enable 60x data parity checking
|
||||
#define HID0_BCLK 0x08000000u // CLK_OUT output enable and clk selection
|
||||
#define HID0_ECLK 0x02000000u // CLK_OUT output enable and clk selection
|
||||
#define HID0_PAR 0x01000000u // Disable !ARTRY precharge
|
||||
#define HID0_DOZE 0x00800000u // Doze mode enable
|
||||
#define HID0_NAP 0x00400000u // Nap mode enable
|
||||
#define HID0_SLEEP 0x00200000u // Sleep mode enable
|
||||
#define HID0_DPM 0x00100000u // Dynamic power management enable
|
||||
#define HID0_NHR 0x00010000u // Not hard reset (0 hard reset if s/w set it)
|
||||
#define HID0_ICE 0x00008000u // Instruction cache enable
|
||||
#define HID0_DCE 0x00004000u // Data cache enable
|
||||
#define HID0_ILOCK 0x00002000u // ICache lock
|
||||
#define HID0_DLOCK 0x00001000u // DCache lock
|
||||
#define HID0_ICFI 0x00000800u // ICache flash invalidate
|
||||
#define HID0_DCFI 0x00000400u // DCache flash invalidate
|
||||
#define HID0_SPD 0x00000200u // Speculative cache access enable (0 enable)
|
||||
#define HID0_IFEM 0x00000100u // Enable M bit on bus for Ifetch
|
||||
#define HID0_SGE 0x00000080u // Store gathering enable
|
||||
#define HID0_DCFA 0x00000040u // DCache flush assist - set before a flush
|
||||
#define HID0_BTIC 0x00000020u // Branch target icache enable
|
||||
#define HID0_ABE 0x00000008u // Address bcast enable
|
||||
#define HID0_BHT 0x00000004u // Branch history table enable
|
||||
#define HID0_NOOPTI 0x00000001u // No-op Dcache touch instructions
|
||||
|
||||
#define HID0_ICE_BIT 16 // Instruction cache enable
|
||||
#define HID0_DCE_BIT 17 // Data cache enable
|
||||
@@ -207,7 +207,8 @@ extern "C" {
|
||||
#define GQR_STORE_SCALE_MASK 0x00003F00 // store scale field
|
||||
#define GQR_STORE_TYPE_MASK 0x00000007 // store type field
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
u32 _pad0 :2;
|
||||
u32 loadScale :6;
|
||||
u32 _pad1 :5;
|
||||
@@ -218,7 +219,8 @@ typedef struct {
|
||||
u32 storeType :3;
|
||||
} PPC_GQR_t;
|
||||
|
||||
typedef union {
|
||||
typedef union
|
||||
{
|
||||
u32 val;
|
||||
PPC_GQR_t f;
|
||||
} PPC_GQR_u;
|
||||
@@ -234,18 +236,21 @@ typedef union {
|
||||
#define DMA_L_TRIGGER 0x00000002 // 0 - cmd inactive, 1 - cmd rdy
|
||||
#define DMA_L_FLUSH 0x00000001 // 1 - Flush DMA queue
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
u32 memAddr :27;
|
||||
u32 dmaLenU :5;
|
||||
} PPC_DMA_U_t;
|
||||
|
||||
typedef union {
|
||||
typedef union
|
||||
{
|
||||
u32 val;
|
||||
PPC_DMA_U_t f;
|
||||
} PPC_DMA_U_u;
|
||||
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
u32 lcAddr :27;
|
||||
u32 dmaLd :1;
|
||||
u32 dmaLenL :2;
|
||||
@@ -254,7 +259,8 @@ typedef struct {
|
||||
} PPC_DMA_L_t;
|
||||
|
||||
|
||||
typedef union {
|
||||
typedef union
|
||||
{
|
||||
u32 val;
|
||||
PPC_DMA_L_t f;
|
||||
} PPC_DMA_L_u;
|
||||
@@ -466,39 +472,71 @@ typedef union {
|
||||
#define FPSCR_NI_BIT 29 // Non-IEEE mode
|
||||
#endif
|
||||
|
||||
u32 PPCMfmsr(void);
|
||||
void PPCMtmsr(register u32 newMSR);
|
||||
u32 PPCMfhid0(void);
|
||||
void PPCMthid0(register u32 newHID0);
|
||||
u32 PPCMfl2cr(void);
|
||||
void PPCMtl2cr(register u32 newL2cr);
|
||||
void PPCMtdec(register u32 newDec);
|
||||
void PPCSync(void);
|
||||
void PPCHalt(void);
|
||||
void PPCMtmmcr0(register u32 newMmcr0);
|
||||
void PPCMtmmcr1(register u32 newMmcr1);
|
||||
void PPCMtpmc1(register u32 newPmc1);
|
||||
void PPCMtpmc2(register u32 newPmc2);
|
||||
void PPCMtpmc3(register u32 newPmc3);
|
||||
void PPCMtpmc4(register u32 newPmc4);
|
||||
u32 PPCMffpscr(void);
|
||||
void PPCMtfpscr(register u32 newFPSCR);
|
||||
u32 PPCMfhid2(void);
|
||||
void PPCMthid2(register u32 newhid2);
|
||||
void PPCMtwpar(register u32 newwpar);
|
||||
void PPCDisableSpeculation(void);
|
||||
void PPCSetFpNonIEEEMode(void);
|
||||
|
||||
union FpscrUnion {
|
||||
f64 f;
|
||||
struct {
|
||||
u32 fpscr_pad;
|
||||
u32 fpscr;
|
||||
} u;
|
||||
} u;
|
||||
};
|
||||
|
||||
// PPCArch
|
||||
u32 PPCMfmsr();
|
||||
void PPCMtmsr(u32 newMSR);
|
||||
u32 PPCOrMsr(u32 value);
|
||||
u32 PPCMfhid0();
|
||||
void PPCMthid0(u32 newHID0);
|
||||
u32 PPCMfl2cr();
|
||||
void PPCMtl2cr(u32 newL2cr);
|
||||
void PPCMtdec(u32 newDec);
|
||||
void PPCSync();
|
||||
void PPCHalt();
|
||||
u32 PPCMffpscr();
|
||||
void PPCMtfpscr(u32 newFPSCR);
|
||||
u32 PPCMfhid2();
|
||||
void PPCMthid2(u32 newhid2);
|
||||
u32 PPCMfwpar();
|
||||
void PPCMtwpar(u32 newwpar);
|
||||
void PPCEnableSpeculation();
|
||||
void PPCDisableSpeculation();
|
||||
void PPCSetFpIEEEMode();
|
||||
void PPCSetFpNonIEEEMode();
|
||||
u32 PPCMfpmc4();
|
||||
u32 PPCMfpmc3();
|
||||
u32 PPCMfpmc1();
|
||||
void PPCMtpmc1(u32 newPmc1);
|
||||
void PPCMtpmc2(u32 newPmc1);
|
||||
void PPCMtpmc3(u32 newPmc1);
|
||||
void PPCMtpmc4(u32 newPmc1);
|
||||
void PPCMtmmcr0(u32 newMmcr0);
|
||||
void PPCMtmmcr1(u32 newMmcr0);
|
||||
void PPCMtdmaU(u32 newdmau);
|
||||
void PPCMtdmaL(u32 newdmal);
|
||||
u32 PPCMfdec(void);
|
||||
u32 PPCMfpmc2(void);
|
||||
u32 PPCAndMsr(u32 value);
|
||||
u32 PPCAndCMsr(u32 value);
|
||||
u32 PPCMfhid1();
|
||||
void PPCEieio();
|
||||
u32 PPCMfmmcr0();
|
||||
u32 PPCMfmmcr1();
|
||||
u32 PPCMfpmc2();
|
||||
u32 PPCMfsia();
|
||||
void PPCMtsia(u32 newSia);
|
||||
u32 PPCMfdmaL();
|
||||
u32 PPCMfpvr();
|
||||
u32 PPCMfdmaU();
|
||||
|
||||
// PPCPm
|
||||
void PMBegin(void);
|
||||
void PMEnd(void);
|
||||
void PMCycles(void);
|
||||
void PML1FetchMisses(void);
|
||||
void PML1MissCycles(void);
|
||||
void PMInstructions(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPCARCH_H */
|
||||
#endif // _DOLPHIN_PPCARCH
|
||||
|
||||
+270
-122
@@ -1,67 +1,193 @@
|
||||
#ifndef CARD_H
|
||||
#define CARD_H
|
||||
#ifndef _DOLPHIN_CARD_H_
|
||||
#define _DOLPHIN_CARD_H_
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/dsp.h>
|
||||
#include <dolphin/dvd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CARD_ENCODE_ANSI 0u
|
||||
#define CARD_ENCODE_SJIS 1u
|
||||
|
||||
/* Sizes */
|
||||
#define CARD_WORKAREA_SIZE (5 * 8 * 1024)
|
||||
#define CARD_READ_SIZE 512
|
||||
#define CARD_MAX_FILE 127
|
||||
#define CARD_COMMENT_SIZE 64
|
||||
#define CARD_FILENAME_MAX 32
|
||||
#define CARD_MAX_FILE 127
|
||||
#define CARD_ICON_MAX 8
|
||||
|
||||
typedef void (*CARDCallback)(s32 chan, s32 result);
|
||||
|
||||
typedef struct CARDFileInfo {
|
||||
s32 chan;
|
||||
s32 fileNo;
|
||||
s32 offset;
|
||||
s32 length;
|
||||
u16 iBlock;
|
||||
} CARDFileInfo;
|
||||
|
||||
typedef struct CARDDir {
|
||||
u8 gameName[4];
|
||||
u8 company[2];
|
||||
u8 _padding0;
|
||||
u8 bannerFormat;
|
||||
u8 fileName[CARD_FILENAME_MAX];
|
||||
u32 time; // seconds since 01/01/2000 midnight
|
||||
u32 iconAddr; // 0xffffffff if not used
|
||||
u16 iconFormat;
|
||||
u16 iconSpeed;
|
||||
u8 permission;
|
||||
u8 copyTimes;
|
||||
u16 startBlock;
|
||||
u16 length;
|
||||
u8 _padding1[2];
|
||||
u32 commentAddr; // 0xffffffff if not used
|
||||
} CARDDir;
|
||||
|
||||
typedef struct CARDControl {
|
||||
/* 0x000 */ BOOL attached;
|
||||
/* 0x004 */ s32 result;
|
||||
/* 0x008 */ u16 size;
|
||||
/* 0x00A */ u16 pageSize;
|
||||
/* 0x00C */ s32 sectorSize;
|
||||
/* 0x010 */ u16 cBlock;
|
||||
/* 0x012 */ u16 vendorID;
|
||||
/* 0x014 */ s32 latency;
|
||||
/* 0x018 */ u8 id[12];
|
||||
/* 0x024 */ int mountStep;
|
||||
/* 0x028 */ int formatStep;
|
||||
/* 0x028 */ u32 scramble;
|
||||
/* 0x02C */ DSPTaskInfo task;
|
||||
/* 0x080 */ void* workArea;
|
||||
/* 0x084 */ CARDDir *currentDir;
|
||||
/* 0x088 */ u16* currentFat;
|
||||
/* 0x08C */ OSThreadQueue threadQueue;
|
||||
/* 0x094 */ u8 cmd[9];
|
||||
/* 0x0A0 */ s32 cmdlen;
|
||||
/* 0x0A4 */ volatile u32 mode;
|
||||
/* 0x0A8 */ int retry;
|
||||
/* 0x0AC */ int repeat;
|
||||
/* 0x0B0 */ u32 addr;
|
||||
/* 0x0B4 */ void* buffer;
|
||||
/* 0x0B8 */ s32 xferred;
|
||||
/* 0x0BC */ u16 freeNo;
|
||||
/* 0x0BE */ u16 startBlock;
|
||||
/* 0x0C0 */ CARDFileInfo* fileInfo;
|
||||
/* 0x0C4 */ CARDCallback extCallback;
|
||||
/* 0x0C8 */ CARDCallback txCallback;
|
||||
/* 0x0CC */ CARDCallback exiCallback;
|
||||
/* 0x0D0 */ CARDCallback apiCallback;
|
||||
/* 0x0D4 */ CARDCallback xferCallback;
|
||||
/* 0x0D8 */ CARDCallback eraseCallback;
|
||||
/* 0x0DC */ CARDCallback unlockCallback;
|
||||
/* 0x0E0 */ OSAlarm alarm;
|
||||
/* 0x108 */ u32 cid;
|
||||
/* 0x10C */ const DVDDiskID* diskID;
|
||||
} CARDControl;
|
||||
|
||||
typedef struct CARDDecParam {
|
||||
/* 0x00 */ u8* inputAddr;
|
||||
/* 0x04 */ u32 inputLength;
|
||||
/* 0x08 */ u32 aramAddr;
|
||||
/* 0x0C */ u8* outputAddr;
|
||||
} CARDDecParam;
|
||||
|
||||
typedef struct CARDID {
|
||||
/* 0x000 */ u8 serial[32];
|
||||
/* 0x020 */ u16 deviceID;
|
||||
/* 0x022 */ u16 size;
|
||||
/* 0x024 */ u16 encode;
|
||||
/* 0x026 */ u8 padding[470];
|
||||
/* 0x1FC */ u16 checkSum;
|
||||
/* 0x1FE */ u16 checkSumInv;
|
||||
} CARDID;
|
||||
|
||||
typedef struct CARDDirCheck {
|
||||
/* 0x00 */ u8 padding0[56];
|
||||
/* 0x38 */ u16 padding1;
|
||||
/* 0x3A */ s16 checkCode;
|
||||
/* 0x3C */ u16 checkSum;
|
||||
/* 0x3E */ u16 checkSumInv;
|
||||
} CARDDirCheck;
|
||||
|
||||
typedef struct CARDStat {
|
||||
/* 0x00 */ char fileName[CARD_FILENAME_MAX];
|
||||
/* 0x20 */ u32 length;
|
||||
/* 0x24 */ u32 time;
|
||||
/* 0x28 */ u8 gameName[4];
|
||||
/* 0x2C */ u8 company[2];
|
||||
/* 0x2E */ u8 bannerFormat;
|
||||
/* 0x30 */ u32 iconAddr;
|
||||
/* 0x34 */ u16 iconFormat;
|
||||
/* 0x36 */ u16 iconSpeed;
|
||||
/* 0x38 */ u32 commentAddr;
|
||||
/* 0x3C */ u32 offsetBanner;
|
||||
/* 0x40 */ u32 offsetBannerTlut;
|
||||
/* 0x44 */ u32 offsetIcon[CARD_ICON_MAX];
|
||||
/* 0x64 */ u32 offsetIconTlut;
|
||||
/* 0x68 */ u32 offsetData;
|
||||
} CARDStat;
|
||||
|
||||
#define CARD_ATTR_PUBLIC 0x04u
|
||||
#define CARD_ATTR_NO_COPY 0x08u
|
||||
#define CARD_ATTR_NO_MOVE 0x10u
|
||||
#define CARD_ATTR_GLOBAL 0x20u
|
||||
#define CARD_ATTR_COMPANY 0x40u
|
||||
|
||||
#define CARD_FAT_AVAIL 0x0000u
|
||||
#define CARD_FAT_CHECKSUM 0x0000u
|
||||
#define CARD_FAT_CHECKSUMINV 0x0001u
|
||||
#define CARD_FAT_CHECKCODE 0x0002u
|
||||
#define CARD_FAT_FREEBLOCKS 0x0003u
|
||||
#define CARD_FAT_LASTSLOT 0x0004u
|
||||
|
||||
#define CARD_WORKAREA_SIZE (5 * 8 * 1024)
|
||||
|
||||
#define CARD_SEG_SIZE 0x200u
|
||||
#define CARD_PAGE_SIZE 0x80u
|
||||
#define CARD_MAX_SIZE 0x01000000U
|
||||
|
||||
#define CARD_NUM_SYSTEM_BLOCK 5
|
||||
#define CARD_SYSTEM_BLOCK_SIZE (8 * 1024u)
|
||||
|
||||
#define CARD_MAX_MOUNT_STEP (CARD_NUM_SYSTEM_BLOCK + 2)
|
||||
|
||||
#define CARD_STAT_SPEED_END 0
|
||||
#define CARD_STAT_SPEED_FAST 1
|
||||
#define CARD_STAT_SPEED_MIDDLE 2
|
||||
#define CARD_STAT_SPEED_SLOW 3
|
||||
#define CARD_STAT_SPEED_MASK 3
|
||||
|
||||
#define CARD_STAT_ANIM_LOOP 0
|
||||
#define CARD_STAT_ANIM_BOUNCE 4
|
||||
#define CARD_STAT_ANIM_MASK 0x4
|
||||
|
||||
#define CARD_RESULT_UNLOCKED 1
|
||||
#define CARD_RESULT_READY 0
|
||||
#define CARD_RESULT_BUSY -1
|
||||
#define CARD_RESULT_WRONGDEVICE -2
|
||||
#define CARD_RESULT_NOCARD -3
|
||||
#define CARD_RESULT_NOFILE -4
|
||||
#define CARD_RESULT_IOERROR -5
|
||||
#define CARD_RESULT_BROKEN -6
|
||||
#define CARD_RESULT_EXIST -7
|
||||
#define CARD_RESULT_NOENT -8
|
||||
#define CARD_RESULT_INSSPACE -9
|
||||
#define CARD_RESULT_NOPERM -10
|
||||
#define CARD_RESULT_LIMIT -11
|
||||
#define CARD_RESULT_NAMETOOLONG -12
|
||||
#define CARD_RESULT_ENCODING -13
|
||||
#define CARD_RESULT_CANCELED -14
|
||||
#define CARD_RESULT_FATAL_ERROR -128
|
||||
|
||||
#define CARDIsValidBlockNo(card, blockNo) ((blockNo) >= CARD_NUM_SYSTEM_BLOCK && (blockNo) < (card)->cBlock)
|
||||
|
||||
#define CARD_READ_SIZE 512
|
||||
#define CARD_COMMENT_SIZE 64
|
||||
|
||||
#define CARD_ICON_WIDTH 32
|
||||
#define CARD_ICON_HEIGHT 32
|
||||
|
||||
#define CARD_BANNER_WIDTH 96
|
||||
#define CARD_BANNER_HEIGHT 32
|
||||
|
||||
/* Icon animation */
|
||||
#define CARD_MODE_NORMAL 0
|
||||
#define CARD_MODE_FAST 1
|
||||
|
||||
#define CARDGetBannerFormat(stat) (((stat)->bannerFormat) & CARD_STAT_BANNER_MASK)
|
||||
#define CARDGetIconAnim(stat) (((stat)->bannerFormat) & CARD_STAT_ANIM_MASK)
|
||||
#define CARDGetIconFormat(stat, n) (((stat)->iconFormat >> (2 * (n))) & CARD_STAT_ICON_MASK)
|
||||
#define CARDGetIconSpeed(stat, n) (((stat)->iconSpeed >> (2 * (n))) & CARD_STAT_SPEED_MASK)
|
||||
#define CARDSetBannerFormat(stat, f) \
|
||||
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_BANNER_MASK) | (f)))
|
||||
#define CARDSetIconAnim(stat, f) \
|
||||
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_ANIM_MASK) | (f)))
|
||||
#define CARDSetIconFormat(stat, n, f) \
|
||||
((stat)->iconFormat = \
|
||||
(u16)(((stat)->iconFormat & ~(CARD_STAT_ICON_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
|
||||
#define CARDSetIconSpeed(stat, n, f) \
|
||||
((stat)->iconSpeed = \
|
||||
(u16)(((stat)->iconSpeed & ~(CARD_STAT_SPEED_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
|
||||
#define CARDSetIconAddress(stat, addr) ((stat)->iconAddr = (u32)(addr))
|
||||
#define CARDSetCommentAddress(stat, addr) ((stat)->commentAddr = (u32)(addr))
|
||||
#define CARDGetFileNo(fileInfo) ((fileInfo)->fileNo)
|
||||
|
||||
#define CARD_RESULT_UNLOCKED 1
|
||||
#define CARD_RESULT_READY 0
|
||||
#define CARD_RESULT_BUSY -1
|
||||
#define CARD_RESULT_WRONGDEVICE -2
|
||||
#define CARD_RESULT_NOCARD -3
|
||||
#define CARD_RESULT_NOFILE -4
|
||||
#define CARD_RESULT_IOERROR -5
|
||||
#define CARD_RESULT_BROKEN -6
|
||||
#define CARD_RESULT_EXIST -7
|
||||
#define CARD_RESULT_NOENT -8
|
||||
#define CARD_RESULT_INSSPACE -9
|
||||
#define CARD_RESULT_NOPERM -10
|
||||
#define CARD_RESULT_LIMIT -11
|
||||
#define CARD_RESULT_NAMETOOLONG -12
|
||||
#define CARD_RESULT_ENCODING -13
|
||||
#define CARD_RESULT_CANCELED -14
|
||||
#define CARD_RESULT_FATAL_ERROR -128
|
||||
|
||||
#define CARD_STAT_ICON_NONE 0
|
||||
#define CARD_STAT_ICON_C8 1
|
||||
#define CARD_STAT_ICON_RGB5A3 2
|
||||
@@ -72,103 +198,125 @@ extern "C" {
|
||||
#define CARD_STAT_BANNER_RGB5A3 2
|
||||
#define CARD_STAT_BANNER_MASK 3
|
||||
|
||||
#define CARD_STAT_ANIM_LOOP 0x00
|
||||
#define CARD_STAT_ANIM_BOUNCE 0x04
|
||||
#define CARD_STAT_ANIM_MASK 0x04
|
||||
#define CARD_ENCODE_ANSI 0
|
||||
#define CARD_ENCODE_SJIS 1
|
||||
|
||||
#define CARD_STAT_SPEED_END 0
|
||||
#define CARD_STAT_SPEED_FAST 1
|
||||
#define CARD_STAT_SPEED_MIDDLE 2
|
||||
#define CARD_STAT_SPEED_SLOW 3
|
||||
#define CARD_STAT_SPEED_MASK 3
|
||||
#define CARDGetDirCheck(dir) ((CARDDirCheck*)&(dir)[CARD_MAX_FILE])
|
||||
#define CARDGetBannerFormat(stat) (((stat)->bannerFormat) & CARD_STAT_BANNER_MASK)
|
||||
#define CARDGetIconAnim(stat) (((stat)->bannerFormat) & CARD_STAT_ANIM_MASK)
|
||||
#define CARDGetIconFormat(stat, n) (((stat)->iconFormat >> (2 * (n))) & CARD_STAT_ICON_MASK)
|
||||
#define CARDGetIconSpeed(stat, n) (((stat)->iconSpeed >> (2 * (n))) & CARD_STAT_SPEED_MASK)
|
||||
#define CARDSetBannerFormat(stat, f) \
|
||||
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_BANNER_MASK) | (f)))
|
||||
#define CARDSetIconAnim(stat, f) \
|
||||
((stat)->bannerFormat = (u8)(((stat)->bannerFormat & ~CARD_STAT_ANIM_MASK) | (f)))
|
||||
#define CARDSetIconFormat(stat, n, f) \
|
||||
((stat)->iconFormat = \
|
||||
(u16)(((stat)->iconFormat & ~(CARD_STAT_ICON_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
|
||||
#define CARDSetIconSpeed(stat, n, f) \
|
||||
((stat)->iconSpeed = \
|
||||
(u16)(((stat)->iconSpeed & ~(CARD_STAT_SPEED_MASK << (2 * (n)))) | ((f) << (2 * (n)))))
|
||||
#define CARDSetIconAddress(stat, addr) ((stat)->iconAddr = (u32)(addr))
|
||||
#define CARDSetCommentAddress(stat, addr) ((stat)->commentAddr = (u32)(addr))
|
||||
#define CARDGetFileNo(fileInfo) ((fileInfo)->fileNo)
|
||||
|
||||
#define CARD_ATTR_PUBLIC 0x04u
|
||||
#define CARD_ATTR_NO_COPY 0x08u
|
||||
#define CARD_ATTR_NO_MOVE 0x10u
|
||||
#define CARD_ATTR_GLOBAL 0x20u
|
||||
#define CARD_ATTR_COMPANY 0x40u
|
||||
extern u32 __CARDFreq;
|
||||
|
||||
typedef struct CARDFileInfo {
|
||||
s32 chan;
|
||||
s32 fileNo;
|
||||
#if DEBUG
|
||||
#define CARDFreq __CARDFreq
|
||||
#else
|
||||
#define CARDFreq EXI_FREQ_16M
|
||||
#endif
|
||||
|
||||
s32 offset;
|
||||
s32 length;
|
||||
u16 iBlock;
|
||||
u16 __padding;
|
||||
} CARDFileInfo;
|
||||
|
||||
typedef struct CARDStat {
|
||||
char fileName[CARD_FILENAME_MAX];
|
||||
u32 length;
|
||||
u32 time; // seconds since 01/01/2000 midnight
|
||||
u8 gameName[4];
|
||||
u8 company[2];
|
||||
|
||||
u8 bannerFormat;
|
||||
u8 __padding;
|
||||
u32 iconAddr; // offset to the banner, bannerTlut, icon, iconTlut data set.
|
||||
u16 iconFormat;
|
||||
u16 iconSpeed;
|
||||
u32 commentAddr; // offset to the pair of 32 byte character strings.
|
||||
|
||||
u32 offsetBanner;
|
||||
u32 offsetBannerTlut;
|
||||
u32 offsetIcon[CARD_ICON_MAX];
|
||||
u32 offsetIconTlut;
|
||||
u32 offsetData;
|
||||
} CARDStat;
|
||||
|
||||
typedef void (*CARDCallback)(s32 chan, s32 result);
|
||||
|
||||
/* CARDBios */
|
||||
void CARDInit(void);
|
||||
BOOL CARDGetFastMode(void);
|
||||
s32 CARDGetResultCode(s32 chan);
|
||||
s32 CARDCheckAsync(s32 chan, CARDCallback callback);
|
||||
s32 CARDFreeBlocks(s32 chan, s32* byteNotUsed, s32* filesNotUsed);
|
||||
s32 CARDRenameAsync(s32 chan, const char* oldName, const char* newName, CARDCallback callback);
|
||||
|
||||
/* CARDCheck */
|
||||
// CARDBios
|
||||
void CARDInit(void);
|
||||
s32 CARDGetResultCode(s32 chan);
|
||||
s32 CARDFreeBlocks(s32 chan, s32* byteNotUsed, s32* filesNotUsed);
|
||||
s32 CARDGetEncoding(s32 chan, u16* encode);
|
||||
s32 CARDGetMemSize(s32 chan, u16* size);
|
||||
s32 CARDGetSectorSize(s32 chan, u32* size);
|
||||
const DVDDiskID* CARDGetDiskID(s32 chan);
|
||||
s32 CARDSetDiskID(s32 chan, const DVDDiskID* diskID);
|
||||
BOOL CARDSetFastMode(BOOL enable);
|
||||
BOOL CARDGetFastMode(void);
|
||||
s32 CARDGetCurrentMode(s32 chan, u32* mode);
|
||||
|
||||
// CARDCheck
|
||||
s32 CARDCheckExAsync(s32 chan, s32* xferBytes, CARDCallback callback);
|
||||
s32 CARDCheckAsync(s32 chan, CARDCallback callback);
|
||||
s32 CARDCheckEx(s32 chan, s32* xferBytes);
|
||||
s32 CARDCheck(s32 chan);
|
||||
static s32 CARDCheckExAsync(s32 chan, s32* xferBytes, CARDCallback callback);
|
||||
|
||||
/* CARDCreate */
|
||||
static s32 CARDCreateAsync(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo,
|
||||
CARDCallback callback);
|
||||
// CARDCreate
|
||||
s32 CARDCreateAsync(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo, CARDCallback callback);
|
||||
s32 CARDCreate(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo);
|
||||
|
||||
/* CARDFormat */
|
||||
// CARDDelete
|
||||
s32 CARDFastDeleteAsync(s32 chan, s32 fileNo, CARDCallback callback);
|
||||
s32 CARDFastDelete(s32 chan, s32 fileNo);
|
||||
s32 CARDDeleteAsync(s32 chan, const char* fileName, CARDCallback callback);
|
||||
s32 CARDDelete(s32 chan, const char* fileName);
|
||||
|
||||
// CARDErase
|
||||
s32 CARDEraseAsync(CARDFileInfo* fileInfo, s32 length, s32 offset, CARDCallback callback);
|
||||
s32 CARDErase(CARDFileInfo* fileInfo, s32 length, s32 offset);
|
||||
|
||||
// CARDFormat
|
||||
s32 CARDFormat(s32 chan);
|
||||
|
||||
/* CARDMount */
|
||||
s32 CARDProbe(s32 chan);
|
||||
// CARDMount
|
||||
int CARDProbe(s32 chan);
|
||||
s32 CARDProbeEx(s32 chan, s32* memSize, s32* sectorSize);
|
||||
s32 CARDMount(s32 chan, void* workArea, CARDCallback attachCb);
|
||||
s32 CARDMountAsync(s32 chan, void* workArea, CARDCallback detachCallback, CARDCallback attachCallback);
|
||||
s32 CARDMount(s32 chan, void* workArea, CARDCallback detachCallback);
|
||||
s32 CARDUnmount(s32 chan);
|
||||
static s32 CARDMountAsync(s32 chan, void* workArea, CARDCallback detachCb, CARDCallback attachCb);
|
||||
|
||||
/* CARDNet */
|
||||
// CARDNet
|
||||
u16 CARDSetVendorID(u16 vendorID);
|
||||
u16 CARDGetVendorID();
|
||||
s32 CARDGetSerialNo(s32 chan, u64* serialNo);
|
||||
s32 CARDGetUniqueCode(s32 chan, u64* uniqueCode);
|
||||
s32 CARDGetAttributes(s32 chan, s32 fileNo, u8* attr);
|
||||
s32 CARDSetAttributesAsync(s32 chan, s32 fileNo, u8 attr, CARDCallback callback);
|
||||
s32 CARDSetAttributes(s32 chan, s32 fileNo, u8 attr);
|
||||
|
||||
/* CARDOpen */
|
||||
// CARDOpen
|
||||
s32 CARDFastOpen(s32 chan, s32 fileNo, CARDFileInfo* fileInfo);
|
||||
s32 CARDOpen(s32 chan, const char* fileName, CARDFileInfo* fileInfo);
|
||||
s32 CARDClose(CARDFileInfo* fileInfo);
|
||||
|
||||
/* CARDRead */
|
||||
static s32 CARDReadAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset,
|
||||
CARDCallback callback);
|
||||
s32 CARDRead(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
|
||||
// CARDProgram
|
||||
s32 CARDProgramAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
|
||||
s32 CARDProgram(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
|
||||
|
||||
/* CARDStat */
|
||||
s32 CARDSetStatus(s32 chan, s32 fileNo, CARDStat* stat);
|
||||
// CARDRdwr
|
||||
s32 CARDGetXferredBytes(s32 chan);
|
||||
|
||||
// CARDRead
|
||||
s32 CARDReadAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
|
||||
s32 CARDRead(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
|
||||
s32 CARDCancel(CARDFileInfo* fileInfo);
|
||||
|
||||
// CARDRename
|
||||
s32 CARDRename(s32 chan, const char* oldName, const char* newName);
|
||||
|
||||
// CARDStat
|
||||
s32 CARDGetStatus(s32 chan, s32 fileNo, CARDStat* stat);
|
||||
static s32 CARDSetStatusAsync(s32 chan, s32 fileNo, CARDStat* stat, CARDCallback callback);
|
||||
s32 CARDSetStatusAsync(s32 chan, s32 fileNo, CARDStat* stat, CARDCallback callback);
|
||||
s32 CARDSetStatus(s32 chan, s32 fileNo, CARDStat* stat);
|
||||
|
||||
/* CARDWrite */
|
||||
static s32 CARDWriteAsync(CARDFileInfo* fileInfo, const void* buf, s32 length, s32 offset,
|
||||
CARDCallback callback);
|
||||
s32 CARDWrite(CARDFileInfo* fileInfo, const void* buf, s32 length, s32 offset);
|
||||
// CARDWrite
|
||||
s32 CARDWriteAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset, CARDCallback callback);
|
||||
s32 CARDWrite(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CARD_H */
|
||||
#endif
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDBIOS_H
|
||||
#define CARDBIOS_H
|
||||
|
||||
|
||||
#endif /* CARDBIOS_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDBLOCK_H
|
||||
#define CARDBLOCK_H
|
||||
|
||||
|
||||
#endif /* CARDBLOCK_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDCHECK_H
|
||||
#define CARDCHECK_H
|
||||
|
||||
|
||||
#endif /* CARDCHECK_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDCREATE_H
|
||||
#define CARDCREATE_H
|
||||
|
||||
|
||||
#endif /* CARDCREATE_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDDIR_H
|
||||
#define CARDDIR_H
|
||||
|
||||
|
||||
#endif /* CARDDIR_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDFORMAT_H
|
||||
#define CARDFORMAT_H
|
||||
|
||||
|
||||
#endif /* CARDFORMAT_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDMOUNT_H
|
||||
#define CARDMOUNT_H
|
||||
|
||||
|
||||
#endif /* CARDMOUNT_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDNET_H
|
||||
#define CARDNET_H
|
||||
|
||||
|
||||
#endif /* CARDNET_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDOPEN_H
|
||||
#define CARDOPEN_H
|
||||
|
||||
|
||||
#endif /* CARDOPEN_H */
|
||||
@@ -1,184 +0,0 @@
|
||||
#ifndef CARDPRIV_H
|
||||
#define CARDPRIV_H
|
||||
|
||||
#include "dolphin/os/OSAlarm.h"
|
||||
#include "dolphin/os/OSThread.h"
|
||||
#include "dolphin/dsp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CARD_FAT_AVAIL 0x0000u
|
||||
#define CARD_FAT_CHECKSUM 0x0000u
|
||||
#define CARD_FAT_CHECKSUMINV 0x0001u
|
||||
#define CARD_FAT_CHECKCODE 0x0002u
|
||||
#define CARD_FAT_FREEBLOCKS 0x0003u
|
||||
#define CARD_FAT_LASTSLOT 0x0004u
|
||||
|
||||
#define CARD_PAGE_SIZE 128u
|
||||
#define CARD_SEG_SIZE 512u
|
||||
|
||||
#define CARD_NUM_SYSTEM_BLOCK 5
|
||||
#define CARD_SYSTEM_BLOCK_SIZE (8 * 1024u)
|
||||
|
||||
#define CARD_MAX_MOUNT_STEP (CARD_NUM_SYSTEM_BLOCK + 2)
|
||||
|
||||
typedef struct DVDDiskID DVDDiskID;
|
||||
|
||||
typedef struct CARDDir {
|
||||
u8 gameName[4];
|
||||
u8 company[2];
|
||||
u8 _padding0;
|
||||
u8 bannerFormat;
|
||||
u8 fileName[CARD_FILENAME_MAX];
|
||||
u32 time; // seconds since 01/01/2000 midnight
|
||||
|
||||
u32 iconAddr; // 0xFFFFFFFF if not used
|
||||
u16 iconFormat;
|
||||
u16 iconSpeed;
|
||||
|
||||
u8 permission;
|
||||
u8 copyTimes;
|
||||
u16 startBlock;
|
||||
u16 length;
|
||||
u8 _padding1[2];
|
||||
|
||||
u32 commentAddr; // 0xFFFFFFFF if not used
|
||||
} CARDDir;
|
||||
|
||||
typedef struct CARDDirCheck {
|
||||
u8 padding0[64 - 2 * 4];
|
||||
u16 padding1;
|
||||
s16 checkCode;
|
||||
u16 checkSum;
|
||||
u16 checkSumInv;
|
||||
} CARDDirCheck;
|
||||
|
||||
typedef struct CARDControl {
|
||||
/* 0x000 */ BOOL attached;
|
||||
/* 0x004 */ s32 result;
|
||||
/* 0x008 */ u16 size;
|
||||
/* 0x00A */ u16 pageSize;
|
||||
/* 0x00C */ s32 sectorSize;
|
||||
/* 0x010 */ u16 cBlock;
|
||||
/* 0x012 */ u16 vendorID;
|
||||
/* 0x014 */ s32 latency;
|
||||
/* 0x018 */ u8 id[12];
|
||||
/* 0x024 */ int mountStep;
|
||||
/* 0x028 */ int formatStep;
|
||||
/* 0x02C */ u32 scramble;
|
||||
/* 0x030 */ DSPTaskInfo task;
|
||||
/* 0x080 */ void* workArea;
|
||||
/* 0x084 */ CARDDir* currentDir;
|
||||
/* 0x088 */ u16* currentFat;
|
||||
/* 0x08C */ OSThreadQueue threadQueue;
|
||||
/* 0x094 */ u8 cmd[9];
|
||||
/* 0x0A0 */ s32 cmdlen;
|
||||
/* 0x0A4 */ vu32 mode;
|
||||
/* 0x0A8 */ int retry;
|
||||
/* 0x0AC */ int repeat;
|
||||
/* 0x0B0 */ u32 addr;
|
||||
/* 0x0B4 */ void* buffer;
|
||||
/* 0x0B8 */ s32 xferred;
|
||||
/* 0x0BC */ u16 freeNo;
|
||||
/* 0x0BE */ u16 startBlock;
|
||||
/* 0x0C0 */ CARDFileInfo* fileInfo;
|
||||
/* 0x0C4 */ CARDCallback extCallback;
|
||||
/* 0x0C8 */ CARDCallback txCallback;
|
||||
/* 0x0CC */ CARDCallback exiCallback;
|
||||
/* 0x0D0 */ CARDCallback apiCallback;
|
||||
/* 0x0D4 */ CARDCallback xferCallback;
|
||||
/* 0x0D8 */ CARDCallback eraseCallback;
|
||||
/* 0x0DC */ CARDCallback unlockCallback;
|
||||
/* 0x0E0 */ OSAlarm alarm;
|
||||
/* 0x108 */ u32 cid;
|
||||
/* 0x10C */ const DVDDiskID* diskID;
|
||||
} CARDControl;
|
||||
|
||||
typedef struct CARDID {
|
||||
u8 serial[32]; // flashID[12] + timebase[8] + counterBias[4] + language[4] + XXX[4]
|
||||
u16 deviceID;
|
||||
u16 size;
|
||||
u16 encode; // character set -- 0: S-JIS, 1: ANSI
|
||||
|
||||
u8 padding[512 - 32 - 5 * 2];
|
||||
|
||||
u16 checkSum;
|
||||
u16 checkSumInv;
|
||||
} CARDID;
|
||||
|
||||
void __CARDDefaultApiCallback(s32 chan, s32 result);
|
||||
s32 __CARDEraseSector(s32 chan, u32 addr, CARDCallback callback);
|
||||
s32 __CARDPutControlBlock(struct CARDControl* card, s32 result);
|
||||
void __CARDSyncCallback(s32 chan, s32 result);
|
||||
u16* __CARDGetFatBlock(CARDControl* card);
|
||||
|
||||
/* CARDBios */
|
||||
void __CARDExtHandler(s32 chan, OSContext* context);
|
||||
void __CARDExiHandler(s32 chan, OSContext* context);
|
||||
void __CARDTxHandler(s32 chan, OSContext* context);
|
||||
void __CARDUnlockedHandler(s32 chan, OSContext* context);
|
||||
s32 __CARDEnableInterrupt(s32 chan, BOOL enable);
|
||||
s32 __CARDReadStatus(s32 chan, u8* status);
|
||||
s32 __CARDReadVendorID(s32 chan, u16* vendorId);
|
||||
s32 __CARDClearStatus(s32 chan);
|
||||
s32 __CARDStart(s32 chan, CARDCallback txCallback, CARDCallback exiCallback);
|
||||
s32 __CARDReadSegment(s32 chan, CARDCallback callback);
|
||||
s32 __CARDWritePage(s32 chan, CARDCallback callback);
|
||||
u16 __CARDGetFontEncode(void);
|
||||
void __CARDSetDiskID(const DVDDiskID* id);
|
||||
s32 __CARDGetControlBlock(s32 chan, struct CARDControl** pcard);
|
||||
s32 __CARDSync(s32 chan);
|
||||
|
||||
/* CARDBlock */
|
||||
s32 __CARDAllocBlock(s32 chan, u32 cBlock, CARDCallback callback);
|
||||
s32 __CARDUpdateFatBlock(s32 chan, u16* fat, CARDCallback callback);
|
||||
|
||||
/* CARDCheck */
|
||||
void __CARDCheckSum(void* ptr, int length, u16* checksum, u16* checksumInv);
|
||||
s32 __CARDVerify(CARDControl* card);
|
||||
|
||||
/* CARDDir */
|
||||
CARDDir* __CARDGetDirBlock(CARDControl* card);
|
||||
s32 __CARDUpdateDir(s32 chan, CARDCallback callback);
|
||||
|
||||
/* CARDFormat */
|
||||
s32 __CARDFormatRegionAsync(s32 chan, u16 encode, CARDCallback callback);
|
||||
|
||||
/* CARDMount */
|
||||
void __CARDMountCallback(s32 chan, s32 result);
|
||||
|
||||
/* CARDOpen */
|
||||
BOOL __CARDCompareFileName(CARDDir* ent, const char* fileName);
|
||||
s32 __CARDAccess(CARDControl* card, CARDDir* ent);
|
||||
s32 __CARDIsWritable(CARDControl* card, CARDDir* ent);
|
||||
s32 __CARDIsReadable(CARDControl* card, CARDDir* ent);
|
||||
|
||||
/* CARDRdwr */
|
||||
s32 __CARDRead(s32 chan, u32 addr, s32 length, void* dst, CARDCallback callback);
|
||||
s32 __CARDWrite(s32 chan, u32 addr, s32 length, void* dst, CARDCallback callback);
|
||||
|
||||
/* CARDRead */
|
||||
s32 __CARDSeek(CARDFileInfo* fileInfo, s32 length, s32 offset, CARDControl** pcard);
|
||||
|
||||
/* CARDUnlock */
|
||||
s32 __CARDUnlock(s32 chan, u8 flashID[12]);
|
||||
|
||||
#define CARDIsValidBlockNo(card, iBlock) \
|
||||
(CARD_NUM_SYSTEM_BLOCK <= (iBlock) && (iBlock) < (card)->cBlock)
|
||||
#define __CARDGetDirCheck(dir) ((CARDDirCheck*)&(dir)[CARD_MAX_FILE])
|
||||
|
||||
#define TRUNC(n, a) (((u32)(n)) & ~((a)-1))
|
||||
#define OFFSET(n, a) (((u32)(n)) & ((a)-1))
|
||||
|
||||
extern CARDControl __CARDBlock[2];
|
||||
extern DVDDiskID __CARDDiskNone;
|
||||
extern u16 __CARDVendorID;
|
||||
extern u8 data_80450A72;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CARDPRIV_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDRDWR_H
|
||||
#define CARDRDWR_H
|
||||
|
||||
|
||||
#endif /* CARDRDWR_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDREAD_H
|
||||
#define CARDREAD_H
|
||||
|
||||
|
||||
#endif /* CARDREAD_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDSTAT_H
|
||||
#define CARDSTAT_H
|
||||
|
||||
|
||||
#endif /* CARDSTAT_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDUNLOCK_H
|
||||
#define CARDUNLOCK_H
|
||||
|
||||
|
||||
#endif /* CARDUNLOCK_H */
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef CARDWRITE_H
|
||||
#define CARDWRITE_H
|
||||
|
||||
|
||||
#endif /* CARDWRITE_H */
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef _CHARPIPELINE_FILECACHE_H_
|
||||
#define _CHARPIPELINE_FILECACHE_H_
|
||||
|
||||
#include <charPipeline/structures.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DS_AUTO_PURGE 0
|
||||
#define DS_NO_PURGE 1
|
||||
|
||||
typedef struct {
|
||||
DSLink Link;
|
||||
void (*Free)(Ptr* data);
|
||||
char* Name;
|
||||
Ptr Data;
|
||||
u16 ReferenceCount;
|
||||
} DSCacheNode, *DSCacheNodePtr;
|
||||
|
||||
typedef struct {
|
||||
u8 PurgeFlag;
|
||||
DSList CacheNodeList;
|
||||
} DSCache, *DSCachePtr;
|
||||
|
||||
extern u8 DOCacheInitialized;
|
||||
extern DSCache DODisplayCache;
|
||||
|
||||
DSCacheNodePtr DSAddCacheNode(DSCachePtr cache, char* name, Ptr data, Ptr OSFreeFunc);
|
||||
void DSEmptyCache(DSCachePtr cache);
|
||||
Ptr DSGetCacheObj(DSCachePtr cache, char* name);
|
||||
void DSInitCache(DSCachePtr cache);
|
||||
void DSPurgeCache(DSCachePtr cache);
|
||||
void DSReleaseCacheObj(DSCachePtr cache, Ptr data);
|
||||
void DSSetCachePurgeFlag(DSCachePtr cache, u8 purgeFlag);
|
||||
void CSHInitDisplayCache(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_H_
|
||||
|
||||
#include <charPipeline/structures/List.h>
|
||||
#include <charPipeline/structures/dolphinString.h>
|
||||
#include <charPipeline/structures/Tree.h>
|
||||
#include <charPipeline/structures/HTable.h>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef _CHARPIPELINE_STRUCTURES_HTABLE_H_
|
||||
#define _CHARPIPELINE_STRUCTURES_HTABLE_H_
|
||||
|
||||
#include <charPipeline/structures/List.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef u16 (DSHashFunc)(Ptr);
|
||||
|
||||
typedef struct {
|
||||
DSList* table;
|
||||
u16 tableSize;
|
||||
DSHashFunc* hash;
|
||||
} DSHashTable;
|
||||
|
||||
void DSInitHTable(DSHashTable* hTable, u16 size, DSList* listArray, DSHashFunc* hashFunc, Ptr obj, DSLinkPtr link);
|
||||
void DSInsertHTableObj(DSHashTable* hTable, Ptr obj);
|
||||
void DSHTableToList(DSHashTable* hTable, DSList* list);
|
||||
void* DSNextHTableObj(DSHashTable* hTable, Ptr obj);
|
||||
s32 DSHTableIndex(DSHashTable* hTable, Ptr obj);
|
||||
void* DSHTableHead(DSHashTable* hTable, s32 index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user