From 2c03fa2d7437e00958ecf5260ebe85cb580099c2 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Sat, 15 Nov 2025 15:07:46 -0500 Subject: [PATCH 1/9] Fixed one function, plus linked that file --- src/dolphin/src/gx/GXTransform.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/dolphin/src/gx/GXTransform.c b/src/dolphin/src/gx/GXTransform.c index ea506d4f8..76d641ca5 100644 --- a/src/dolphin/src/gx/GXTransform.c +++ b/src/dolphin/src/gx/GXTransform.c @@ -448,9 +448,6 @@ void GXSetClipMode(GXClipMode mode) void __GXSetMatrixIndex(GXAttr matIdxAttr) { - // Function should be equivalent, but there seems to be a reg issue. - // The "__GXData->matIdxA" shouldn't show up twice in asm - // But it is for some reason. if (matIdxAttr < GX_VA_TEX4MTXIDX) { GX_WRITE_SOME_REG4(8, 0x30, __GXData->matIdxA, -12); From 34fb6ed95324d4a3662787fce3864b8450be7634 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Wed, 19 Nov 2025 14:05:19 -0500 Subject: [PATCH 2/9] Dolphin SDK --- .vscode/settings.json | 9 +- configure.py | 23 +- src/dolphin/include/dolphin/CARDPriv.h | 154 ++--- src/dolphin/include/dolphin/ax.h | 129 +++-- src/dolphin/include/dolphin/gx.h | 24 + src/dolphin/include/dolphin/os/init/__start.h | 10 +- src/dolphin/src/ax/AXAlloc.c | 151 ++--- src/dolphin/src/ax/AXCL.c | 168 ++---- src/dolphin/src/ax/AXComp.c | 2 +- src/dolphin/src/ax/AXOut.c | 25 +- src/dolphin/src/ax/AXVPB.c | 512 ++++++----------- src/dolphin/src/ax/DSPCode.c | 537 +++++++++++------- src/dolphin/src/ax/__ax.h | 2 + src/dolphin/src/card/CARDUnlock.c | 49 +- src/dolphin/src/gx/GXFifo.c | 8 +- src/dolphin/src/gx/GXGeometry.c | 18 +- src/dolphin/src/gx/GXInit.c | 8 +- src/dolphin/src/gx/GXLight.c | 155 +++-- src/dolphin/src/gx/GXPixel.c | 178 +++--- src/dolphin/src/os/init/__start.c | 9 +- 20 files changed, 1043 insertions(+), 1128 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8a8dc2250..95c0114af 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -48,7 +48,14 @@ "vi.h": "c", "types.h": "c", "ppcarch.h": "c", - "string.h": "c" + "string.h": "c", + "gxmanage.h": "c", + "gxtransform.h": "c", + "gxdraw.h": "c", + "gxget.h": "c", + "gxverify.h": "c", + "card.h": "c", + "__start.h": "c" }, // Disable C/C++ IntelliSense, use clangd instead "C_Cpp.intelliSenseEngine": "default", diff --git a/configure.py b/configure.py index d503bbeff..6dec1343f 100644 --- a/configure.py +++ b/configure.py @@ -631,14 +631,14 @@ def MatchingFor(*versions): "ax", [ Object(Matching, "dolphin/src/ax/AX.c"), - Object(NonMatching, "dolphin/src/ax/AXAlloc.c"), + Object(Matching, "dolphin/src/ax/AXAlloc.c"), Object(Matching, "dolphin/src/ax/AXAux.c"), - Object(NonMatching, "dolphin/src/ax/AXCL.c"), - Object(NonMatching, "dolphin/src/ax/AXOut.c"), + Object(Matching, "dolphin/src/ax/AXCL.c"), + Object(Matching, "dolphin/src/ax/AXOut.c"), Object(Matching, "dolphin/src/ax/AXSPB.c"), - Object(NonMatching, "dolphin/src/ax/AXVPB.c"), + Object(Matching, "dolphin/src/ax/AXVPB.c"), Object(Matching, "dolphin/src/ax/AXComp.c"), - Object(NonMatching, "dolphin/src/ax/DSPCode.c"), + Object(Matching, "dolphin/src/ax/DSPCode.c"), Object(Matching, "dolphin/src/ax/AXProf.c"), ], ), @@ -699,25 +699,24 @@ def MatchingFor(*versions): DolphinLib( "exi", [ - Object(NonMatching, "dolphin/src/exi/EXIBios.c"), + Object(Matching, "dolphin/src/exi/EXIBios.c"), Object(Matching, "dolphin/src/exi/EXIUart.c") ] ), DolphinLib( "gx", [ - Object(NonMatching, "dolphin/src/gx/GXInit.c"), - Object(NonMatching, "dolphin/src/gx/GXFifo.c"), + Object(Matching, "dolphin/src/gx/GXInit.c"), + Object(Matching, "dolphin/src/gx/GXFifo.c"), Object(Matching, "dolphin/src/gx/GXAttr.c"), Object(Matching, "dolphin/src/gx/GXMisc.c"), - Object(NonMatching, "dolphin/src/gx/GXGeometry.c"), + Object(Matching, "dolphin/src/gx/GXGeometry.c"), Object(Matching, "dolphin/src/gx/GXFrameBuf.c"), - Object(NonMatching, "dolphin/src/gx/GXLight.c"), + Object(Matching, "dolphin/src/gx/GXLight.c"), Object(Matching, "dolphin/src/gx/GXTexture.c"), Object(Matching, "dolphin/src/gx/GXBump.c"), Object(Matching, "dolphin/src/gx/GXTev.c"), - Object(NonMatching, "dolphin/src/gx/GXPixel.c"), - Object(NonMatching, "dolphin/src/gx/GXDraw.c"), + Object(Matching, "dolphin/src/gx/GXPixel.c"), Object(Matching, "dolphin/src/gx/GXDisplayList.c"), Object(Matching, "dolphin/src/gx/GXTransform.c"), Object(Matching, "dolphin/src/gx/GXPerf.c") diff --git a/src/dolphin/include/dolphin/CARDPriv.h b/src/dolphin/include/dolphin/CARDPriv.h index 8b7adeef6..02f0e1000 100644 --- a/src/dolphin/include/dolphin/CARDPriv.h +++ b/src/dolphin/include/dolphin/CARDPriv.h @@ -25,93 +25,97 @@ extern "C" { #define CARD_MAX_MOUNT_STEP (CARD_NUM_SYSTEM_BLOCK + 2) -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 +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; +typedef struct CARDDirCheck +{ + u8 padding0[64 - 2 * 4]; + u16 padding1; + s16 checkCode; + u16 checkSum; + u16 checkSumInv; } CARDDirCheck; -typedef struct CARDControl { - BOOL attached; - s32 result; - u16 size; - u16 pageSize; - s32 sectorSize; - u16 cBlock; - u16 vendorID; - s32 latency; - u8 id[12]; - int mountStep; - int formatStep; - u32 scramble; - DSPTaskInfo task; - void* workArea; - CARDDir* currentDir; - u16* currentFat; - OSThreadQueue threadQueue; - u8 cmd[9]; - s32 cmdlen; - vu32 mode; - int retry; - int repeat; - u32 addr; - void* buffer; - s32 xferred; - u16 freeNo; - u16 startBlock; - CARDFileInfo* fileInfo; - CARDCallback extCallback; - CARDCallback txCallback; - CARDCallback exiCallback; - CARDCallback apiCallback; - CARDCallback xferCallback; - CARDCallback eraseCallback; - CARDCallback unlockCallback; - OSAlarm alarm; - u32 cid; - const DVDDiskID* diskID; +typedef struct CARDControl +{ + BOOL attached; + s32 result; + u16 size; + u16 pageSize; + s32 sectorSize; + u16 cBlock; + u16 vendorID; + s32 latency; + u8 id[12]; + int mountStep; + int formatStep; + u32 scramble; + DSPTaskInfo task; + void* workArea; + CARDDir* currentDir; + u16* currentFat; + OSThreadQueue threadQueue; + u8 cmd[9]; + s32 cmdlen; + vu32 mode; + int retry; + int repeat; + u32 addr; + void* buffer; + s32 xferred; + u16 freeNo; + u16 startBlock; + CARDFileInfo* fileInfo; + CARDCallback extCallback; + CARDCallback txCallback; + CARDCallback exiCallback; + CARDCallback apiCallback; + CARDCallback xferCallback; + CARDCallback eraseCallback; + CARDCallback unlockCallback; + OSAlarm alarm; + u32 cid; + 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 +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]; + u8 padding[512 - 32 - 5 * 2]; - u16 checkSum; - u16 checkSumInv; + u16 checkSum; + u16 checkSumInv; } CARDID; void __CARDDefaultApiCallback(s32 chan, s32 result); void __CARDSyncCallback(s32 channel, s32 result); #define CARDIsValidBlockNo(card, iBlock) \ - (CARD_NUM_SYSTEM_BLOCK <= (iBlock) && (iBlock) < (card)->cBlock) + (CARD_NUM_SYSTEM_BLOCK <= (iBlock) && (iBlock) < (card)->cBlock) #define __CARDGetDirCheck(dir) ((CARDDirCheck*)&(dir)[CARD_MAX_FILE]) CARDDir* __CARDGetDirBlock(CARDControl* card); @@ -123,7 +127,7 @@ void __CARDExiHandler(s32 chan, OSContext* context); void __CARDExtHandler(s32 chan, OSContext* context); void __CARDUnlockedHandler(s32 chan, OSContext* context); s32 __CARDAccess(CARDControl* card, CARDDir* ent); -s32 __CARDIsWritable(CARDControl *card, CARDDir *entry); +s32 __CARDIsWritable(CARDControl* card, CARDDir* entry); #define TRUNC(n, a) (((u32)(n)) & ~((a)-1)) #define OFFSET(n, a) (((u32)(n)) & ((a)-1)) @@ -136,4 +140,4 @@ extern u8 __CARDPermMask; #ifdef __cplusplus } #endif -#endif // _DOLPHIN_CARDPRIV \ No newline at end of file +#endif // _DOLPHIN_CARDPRIV diff --git a/src/dolphin/include/dolphin/ax.h b/src/dolphin/include/dolphin/ax.h index 0148446ee..3ec66e257 100644 --- a/src/dolphin/include/dolphin/ax.h +++ b/src/dolphin/include/dolphin/ax.h @@ -7,7 +7,8 @@ extern "C" { #endif -typedef struct _AXPBMIX { +typedef struct _AXPBMIX +{ /* 0x00 */ u16 vL; /* 0x02 */ u16 vDeltaL; /* 0x04 */ u16 vR; @@ -28,7 +29,8 @@ typedef struct _AXPBMIX { /* 0x22 */ u16 vDeltaAuxAS; } AXPBMIX; -typedef struct _AXPBITD { +typedef struct _AXPBITD +{ /* 0x00 */ u16 flag; /* 0x02 */ u16 bufferHi; /* 0x04 */ u16 bufferLo; @@ -38,13 +40,15 @@ typedef struct _AXPBITD { /* 0x0C */ u16 targetShiftR; } AXPBITD; -typedef struct _AXPBUPDATE { +typedef struct _AXPBUPDATE +{ /* 0x00 */ u16 updNum[5]; /* 0x0A */ u16 dataHi; /* 0x0C */ u16 dataLo; } AXPBUPDATE; -typedef struct _AXPBDPOP { +typedef struct _AXPBDPOP +{ /* 0x00 */ s16 aL; /* 0x02 */ s16 aAuxAL; /* 0x04 */ s16 aAuxBL; @@ -56,18 +60,21 @@ typedef struct _AXPBDPOP { /* 0x10 */ s16 aAuxBS; } AXPBDPOP; -typedef struct _AXPBVE { +typedef struct _AXPBVE +{ /* 0x00 */ u16 currentVolume; /* 0x02 */ s16 currentDelta; } AXPBVE; -typedef struct _AXPBFIR { +typedef struct _AXPBFIR +{ /* 0x00 */ u16 numCoefs; /* 0x02 */ u16 coefsHi; /* 0x04 */ u16 coefsLo; } AXPBFIR; -typedef struct _AXPBADDR { +typedef struct _AXPBADDR +{ /* 0x00 */ u16 loopFlag; /* 0x02 */ u16 format; /* 0x04 */ u16 loopAddressHi; @@ -78,7 +85,8 @@ typedef struct _AXPBADDR { /* 0x0E */ u16 currentAddressLo; } AXPBADDR; -typedef struct _AXPBADPCM { +typedef struct _AXPBADPCM +{ /* 0x00 */ u16 a[8][2]; /* 0x20 */ u16 gain; /* 0x22 */ u16 pred_scale; @@ -86,27 +94,31 @@ typedef struct _AXPBADPCM { /* 0x26 */ u16 yn2; } AXPBADPCM; -typedef struct _AXPBSRC { +typedef struct _AXPBSRC +{ /* 0x00 */ u16 ratioHi; /* 0x02 */ u16 ratioLo; /* 0x04 */ u16 currentAddressFrac; /* 0x06 */ u16 last_samples[4]; } AXPBSRC; -typedef struct _AXPBADPCMLOOP { +typedef struct _AXPBADPCMLOOP +{ /* 0x00 */ u16 loop_pred_scale; /* 0x02 */ u16 loop_yn1; /* 0x04 */ u16 loop_yn2; } AXPBADPCMLOOP; -typedef struct _AXPBLPF { +typedef struct _AXPBLPF +{ u16 on; u16 yn1; u16 a0; u16 b0; } AXPBLPF; -typedef struct _AXPB { +typedef struct _AXPB +{ /* 0x00 */ u16 nextHi; /* 0x02 */ u16 nextLo; /* 0x04 */ u16 currHi; @@ -130,7 +142,8 @@ typedef struct _AXPB { /* 0xC2 */ u16 pad[25]; } AXPB; -typedef struct _AXVPB { +typedef struct _AXVPB +{ /* 0x000 */ void* next; /* 0x004 */ void* prev; /* 0x008 */ void* next1; @@ -149,15 +162,18 @@ typedef struct _AXVPB { /* 0x138 */ AXPB pb; } AXVPB; -typedef struct _AXPBITDBUFFER { +typedef struct _AXPBITDBUFFER +{ /* 0x00 */ s16 data[32]; } AXPBITDBUFFER; -typedef struct _AXPBU { +typedef struct _AXPBU +{ /* 0x00 */ u16 data[128]; } AXPBU; -typedef struct _AXSPB { +typedef struct _AXSPB +{ /* 0x00 */ u16 dpopLHi; /* 0x02 */ u16 dpopLLo; /* 0x04 */ s16 dpopLDelta; @@ -187,7 +203,8 @@ typedef struct _AXSPB { /* 0x34 */ s16 dpopBSDelta; } AXSPB; -typedef struct _AXPROFILE { +typedef struct _AXPROFILE +{ /* 0x00 */ u64 axFrameStart; /* 0x08 */ u64 auxProcessingStart; /* 0x10 */ u64 auxProcessingEnd; @@ -197,13 +214,15 @@ typedef struct _AXPROFILE { /* 0x30 */ u32 axNumVoices; } AXPROFILE; -typedef struct AX_AUX_DATA { +typedef struct AX_AUX_DATA +{ /* 0x00 */ s32* l; /* 0x00 */ s32* r; /* 0x00 */ s32* s; } AX_AUX_DATA; -typedef struct AX_AUX_DATA_DPL2 { +typedef struct AX_AUX_DATA_DPL2 +{ /* 0x00 */ s32* l; /* 0x00 */ s32* r; /* 0x00 */ s32* ls; @@ -212,48 +231,48 @@ typedef struct AX_AUX_DATA_DPL2 { typedef void (*AXCallback)(); -#define AX_DSP_SLAVE_LENGTH 0xF80 +#define AX_DSP_SLAVE_LENGTH 3936 #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_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_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_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 @@ -264,7 +283,7 @@ void AXQuit(void); // AXAlloc void AXFreeVoice(AXVPB* p); -AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void *), u32 userContext); +AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void*), u32 userContext); void AXSetVoicePriority(AXVPB* p, u32 priority); // AXAux diff --git a/src/dolphin/include/dolphin/gx.h b/src/dolphin/include/dolphin/gx.h index b822fb6a6..e83676ae8 100644 --- a/src/dolphin/include/dolphin/gx.h +++ b/src/dolphin/include/dolphin/gx.h @@ -23,4 +23,28 @@ #include #include +// TODO: Move these elsewhere + +#define GX_BITFIELD_SET(field, pos, size, value) ((field) = GX_BITFIELD(field, pos, size, value)) +#define GX_BITFIELD(field, pos, size, value) \ + (__rlwimi((field), (value), 31 - (pos) - (size) + 1, (pos), (pos) + (size)-1)) +#define GX_SET_REG(reg, x, st, end) GX_BITFIELD_SET((reg), (st), ((end) - (st) + 1), (x)) + +#define GXCOLOR_AS_U32(color) (*((u32*)&(color))) +#define GX_BITFIELD_TRUNC(field, pos, size, value) \ + (__rlwimi((field), (value), 0, (pos), (pos) + (size)-1)) +#define GX_SET_TRUNC(reg, x, st, end) GX_BITFIELD_TRUNC((reg), (st), ((end) - (st) + 1), (x)) + +#define GX_XF_LOAD_REG_HDR(addr) \ + GXWGFifo.s8 = 0x10; \ + GXWGFifo.s32 = (addr); + +#define GX_XF_LOAD_REG(addr, data) \ + GX_XF_LOAD_REG_HDR(addr); \ + GXWGFifo.s32 = (data); + +#define GX_BP_LOAD_REG(data) \ + GXWGFifo.s8 = 0x61; \ + GXWGFifo.s32 = (data); + #endif // _DOLPHIN_GX diff --git a/src/dolphin/include/dolphin/os/init/__start.h b/src/dolphin/include/dolphin/os/init/__start.h index 3c84bc243..ec2cc81cc 100644 --- a/src/dolphin/include/dolphin/os/init/__start.h +++ b/src/dolphin/include/dolphin/os/init/__start.h @@ -20,8 +20,8 @@ extern void InitMetroTRK(); u16 Pad3Button : PAD3_BUTTON_ADDR; static u8 Debug_BBA = 0; -extern void memset(void *, int, int); -extern int main(int argc, char *argv[]); +extern void memset(void*, int, int); +extern int main(int argc, char* argv[]); extern void exit(int); extern void __init_user(void); extern void OSInit(void); @@ -37,10 +37,12 @@ __declspec(section ".init") extern void __start(void); __declspec(section ".init") extern void __init_registers(void); __declspec(section ".init") extern void __init_data(void); __declspec(section ".init") extern void __init_hardware(void); -__declspec(section ".init") extern void __flush_cache(void *address, unsigned int size); +__declspec(section ".init") extern void __flush_cache(void* address, unsigned int size); + +__declspec(weak) void InitMetroTRK_BBA(); __declspec(section ".init") extern char _stack_addr[]; __declspec(section ".init") extern char _SDA_BASE_[]; __declspec(section ".init") extern char _SDA2_BASE_[]; -#endif // _DOLPHIN__START \ No newline at end of file +#endif // _DOLPHIN__START diff --git a/src/dolphin/src/ax/AXAlloc.c b/src/dolphin/src/ax/AXAlloc.c index 35ed9e641..d6f24cd2c 100644 --- a/src/dolphin/src/ax/AXAlloc.c +++ b/src/dolphin/src/ax/AXAlloc.c @@ -67,18 +67,6 @@ void __AXPushFreeStack(AXVPB* p) p->priority = 0; } -// AXVPB* __AXPopFreeStack(void) -// { -// AXVPB* p; - -// p = (void*)(u32)&__AXStackHead[0]->next; -// if (p) -// { -// __AXStackHead[0] = p->next; -// } -// return p; -// } - void __AXPushCallbackStack(AXVPB* p) { p->next1 = __AXCallbackStack; @@ -129,45 +117,6 @@ void __AXRemoveFromStack(AXVPB* p) tail->prev = head; } -// void __AXPushStackHead(AXVPB* p, u32 priority) -// { -// p->next = __AXStackHead[priority]; -// p->prev = 0; -// if (p->next) -// { -// __AXStackHead[priority]->prev = p; -// __AXStackHead[priority] = p; -// } -// else -// { -// __AXStackTail[priority] = p; -// __AXStackHead[priority] = p; -// } -// p->priority = priority; -// } - -// AXVPB* __AXPopStackFromBottom(u32 priority) -// { -// AXVPB* p; - -// p = NULL; -// if (__AXStackHead[priority]) -// { -// if (__AXStackHead[priority] == __AXStackTail[priority]) -// { -// p = __AXStackHead[priority]; -// __AXStackHead[priority] = __AXStackTail[priority] = 0; -// } -// else if (__AXStackTail[priority]) -// { -// p = __AXStackTail[priority]; -// __AXStackTail[priority] = p->prev; -// __AXStackTail[priority]->next = 0; -// } -// } -// return p; -// } - void AXFreeVoice(AXVPB* p) { int old; @@ -183,41 +132,73 @@ void AXFreeVoice(AXVPB* p) OSRestoreInterrupts(old); } -AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void*), u32 userContext) +inline AXVPB* __AXPopFreeStack(void) { - // priority r25 - // userContext r 28 - // AXStackHead r26 - int old; // r31 - AXVPB* p; // r30 - u32 i; // r29 + AXVPB* p; - old = OSDisableInterrupts(); p = (void*)(u32)&__AXStackHead[0]->next; - if (p != 0) + if (p) + { + __AXStackHead[0] = p->next; + } + return p; +} + +inline void __AXPushStackHead(AXVPB* p, u32 priority) +{ + p->next = __AXStackHead[priority]; + p->prev = 0; + + if (p->next) { - __AXStackHead[0] = __AXStackHead[0]->next; + __AXStackHead[priority]->prev = p; + __AXStackHead[priority] = p; } + else + { + __AXStackTail[priority] = p; + __AXStackHead[priority] = p; + } + + p->priority = priority; +} - if (p == NULL) +inline AXVPB* __AXPopStackFromBottom(u32 priority) +{ + AXVPB* p; + + p = NULL; + if (__AXStackHead[priority]) + { + if (__AXStackHead[priority] == __AXStackTail[priority]) + { + p = __AXStackHead[priority]; + __AXStackHead[priority] = __AXStackTail[priority] = 0; + } + else if (__AXStackTail[priority]) + { + p = __AXStackTail[priority]; + __AXStackTail[priority] = p->prev; + __AXStackTail[priority]->next = 0; + } + } + + return p; +} + +AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void*), u32 userContext) +{ + BOOL old; + AXVPB* p; + u32 i; + + old = OSDisableInterrupts(); + p = __AXPopFreeStack(); + if (p == 0) { for (i = 1; i < priority; i++) { - p = NULL; - if (__AXStackHead[i]) - { - if (__AXStackHead[i] == __AXStackTail[i]) - { - p = __AXStackHead[i]; - __AXStackHead[i] = __AXStackTail[i] = 0; - } - else if (__AXStackTail[i]) - { - p = __AXStackTail[i]; - __AXStackTail[i] = p->prev; - __AXStackTail[i]->next = 0; - } - } + p = __AXPopStackFromBottom(i); if (p) { if (p->pb.state == 1) @@ -232,25 +213,15 @@ AXVPB* AXAcquireVoice(u32 priority, void (*callback)(void*), u32 userContext) } } } + if (p) { - p->next = __AXStackHead[i]; - p->prev = 0; - if (p->next) - { - __AXStackHead[i]->prev = p; - __AXStackHead[i] = p; - } - else - { - __AXStackTail[i] = p; - __AXStackHead[i] = p; - } - p->priority = i; + __AXPushStackHead(p, priority); p->callback = callback; p->userContext = userContext; __AXSetPBDefault(p); } + OSRestoreInterrupts(old); return p; } diff --git a/src/dolphin/src/ax/AXCL.c b/src/dolphin/src/ax/AXCL.c index 9306571b5..ed0b875cf 100644 --- a/src/dolphin/src/ax/AXCL.c +++ b/src/dolphin/src/ax/AXCL.c @@ -27,11 +27,11 @@ u32 __AXGetCommandListAddress(void) return address; } -// void __AXWriteToCommandList(u16 data) -// { -// *__AXClWrite = data; -// __AXClWrite++; -// } +inline void __AXWriteToCommandList(u16 data) +{ + *__AXClWrite = data; + __AXClWrite++; +} void __AXNextFrame(void* sbuffer, void* buffer) { @@ -41,100 +41,69 @@ void __AXNextFrame(void* sbuffer, void* buffer) __AXCommandListCycles = 0x1A9; pCommandList = __AXClWrite; data = __AXGetStudio(); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0); + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)(data)); __AXCommandListCycles += 0x2E44; switch (__AXClMode) { case 0: - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(7); + __AXWriteToCommandList((u16)((u32)sbuffer >> 0x10)); + __AXWriteToCommandList((u32)sbuffer); __AXCommandListCycles += 0x546; break; case 1: - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0x11); + __AXWriteToCommandList((u16)((u32)sbuffer >> 0x10)); + __AXWriteToCommandList((u32)sbuffer); __AXCommandListCycles += 0x5E6; break; case 2: break; default: - return; + break; } data = (u32)__AXGetPBs(); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(2); + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)data); + __AXWriteToCommandList(3); if (__AXClMode == 2) { __AXGetAuxAInput(&data); if (data != 0) { - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0x13); + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxAInputDpl2(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxAOutput(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxAOutputDpl2R(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxAOutputDpl2Ls(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxAOutputDpl2Rs(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXCommandListCycles += 0xDED; } - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0x10); __AXGetAuxBForDPL2(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXGetAuxBOutputDPL2(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(data >> 0x10); + __AXWriteToCommandList((u16)data); __AXCommandListCycles += 0xDED; } else @@ -143,66 +112,45 @@ void __AXNextFrame(void* sbuffer, void* buffer) if (data != 0) { - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(4); + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)data); __AXGetAuxAOutput(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)data); __AXCommandListCycles += 0xDED; } __AXGetAuxBInput(&data); if (data != 0) { - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(5); __AXCommandListCycles += 0xDED; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)data); __AXGetAuxBOutput(&data); - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList((u16)(data >> 0x10)); + __AXWriteToCommandList((u16)data); } } if (__AXCompressor) { - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0x12); + __AXWriteToCommandList(0x8000); + __AXWriteToCommandList(0xA); + __AXWriteToCommandList((u32)__AXCompressorTable >> 0x10); + __AXWriteToCommandList((u32)__AXCompressorTable); __AXCommandListCycles += 0xBB8; } - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0xE); + __AXWriteToCommandList((u16)((u32)sbuffer >> 0x10)); + __AXWriteToCommandList((u32)sbuffer); + __AXWriteToCommandList((u16)((u32)buffer >> 0x10)); + __AXWriteToCommandList((u32)buffer); __AXCommandListCycles += 0x2710; - *__AXClWrite = data; - __AXClWrite++; + __AXWriteToCommandList(0xF); __AXCommandListCycles += 2; DCFlushRange(pCommandList, 0x300); } diff --git a/src/dolphin/src/ax/AXComp.c b/src/dolphin/src/ax/AXComp.c index 57415e27a..3ee2c4927 100644 --- a/src/dolphin/src/ax/AXComp.c +++ b/src/dolphin/src/ax/AXComp.c @@ -3,7 +3,7 @@ #include "ax/__ax.h" -u16 __AXCompressorTable[3360] = { +u16 __AXCompressorTable[3360] ATTRIBUTE_ALIGN(16) = { 0x7FA1, 0x7F43, 0x7EE6, 0x7E88, 0x7E2B, 0x7DCE, 0x7D72, 0x7D16, 0x7CBA, 0x7C5E, 0x7C02, 0x7BA7, 0x7B4C, 0x7AF1, 0x7A97, 0x7A3D, 0x79E3, 0x7989, 0x7930, 0x78D6, 0x787E, 0x7825, 0x77CD, 0x7774, 0x771C, 0x76C5, 0x766D, 0x7616, 0x75BF, 0x7569, 0x7512, 0x74BC, 0x7466, 0x7411, 0x73BB, 0x7366, diff --git a/src/dolphin/src/ax/AXOut.c b/src/dolphin/src/ax/AXOut.c index faeddd8bd..6dfc425db 100644 --- a/src/dolphin/src/ax/AXOut.c +++ b/src/dolphin/src/ax/AXOut.c @@ -173,31 +173,32 @@ void __AXOutInitDSP(void) } while (__AXDSPInitFlag == 0); } +#define BUFFER_MEMSET(buffer, size) \ + { \ + u32* p = (u32*)&buffer; \ + int i; \ + for (i = 0; i < size; i++) \ + { \ + *p = 0; \ + p++; \ + } \ + } + void __AXOutInit(u32 outputBufferMode) { #ifdef DEBUG OSReport("Initializing AXOut code module\n"); #endif - u32 i; - u32* dst; - u32* dst2; __AXOutputBufferMode = outputBufferMode; __AXOutFrame = 0; __AXAiDmaFrame = 0; __AXDebugSteppingMode = 0; - for (dst = (u32*)__AXOutBuffer, i = 0; i < sizeof(__AXOutBuffer) / sizeof(u32); i++) - { - *dst++ = 0; - } + BUFFER_MEMSET(__AXOutBuffer, 0x1E0); DCFlushRange(__AXOutBuffer, sizeof(__AXOutBuffer)); - for (dst2 = (u32*)__AXOutSBuffer, i = 0; i < sizeof(__AXOutSBuffer) / sizeof(u32); i++) - { - *dst2++ = 0; - } - + BUFFER_MEMSET(__AXOutSBuffer, 0xA0); DCFlushRange(__AXOutSBuffer, sizeof(__AXOutSBuffer)); __AXOutInitDSP(); diff --git a/src/dolphin/src/ax/AXVPB.c b/src/dolphin/src/ax/AXVPB.c index f8940c9b5..99627ce1a 100644 --- a/src/dolphin/src/ax/AXVPB.c +++ b/src/dolphin/src/ax/AXVPB.c @@ -3,14 +3,18 @@ #include "ax/__ax.h" -static unsigned long __AXSrcCycles[5] = { 0x00000DF8, 0x00000F78, 0x000014B8, 0x000019F8, - 0x000019F8 }; - -static unsigned long __AXMixCycles[32] = { - 0x000005BE, 0x00000B7C, 0x00000B7C, 0x0000113A, 0x000008B6, 0x00000E74, 0x00000E74, 0x00001432, - 0x000009A6, 0x0000134C, 0x0000134C, 0x00001CF2, 0x00000E97, 0x0000183D, 0x0000183D, 0x000021E3, - 0x00000B7C, 0x00001432, 0x00000B7C, 0x00001432, 0x00000B7C, 0x00000B7C, 0x00000B7C, 0x00000B7C, - 0x0000134C, 0x000021E3, 0x0000134C, 0x000021E3, 0x0000134C, 0x000021E3, 0x0000134C, 0x000021E3 +static u32 __AXSrcCycles[5] = { 0x00000DF8, 0x00000F78, 0x000014B8, 0x000019F8, 0x000019F8 }; + +static u32 __AXMainMixCycles[16] = { 0x00000000, 0x000002F8, 0x000002F8, 0x000005BE, + 0x000002F8, 0x000005F0, 0x000005F0, 0x000008B6, + 0x00000000, 0x000004F1, 0x000004F1, 0x000009A6, + 0x000004F1, 0x000009E2, 0x000009E2, 0x00000E97 }; + +static u32 __AXAuxMixCycles[32] = { + 0x00000000, 0x000002F8, 0x000002F8, 0x000005BE, 0x00000000, 0x000004F1, 0x000004F1, 0x000009A6, + 0x000002F8, 0x000005F0, 0x000005F0, 0x000008B6, 0x000002F8, 0x000007E9, 0x000007E9, 0x00000C9E, + 0x00000000, 0x000002F8, 0x000002F8, 0x000005BE, 0x00000000, 0x000004F1, 0x000004F1, 0x000009A6, + 0x000004F1, 0x000007E9, 0x000007E9, 0x00000AAF, 0x000004F1, 0x000009E2, 0x000009E2, 0x00000E97 }; static AXPB __AXPB[AX_MAX_VOICES] ATTRIBUTE_ALIGN(32); @@ -47,11 +51,21 @@ void __AXServiceVPB(AXVPB* pvpb) } if (sync & AX_SYNC_FLAG_COPYALL) { - // copy the whole PB struct. (size: 0xC0) + // copy the whole PB struct. (size: 0xF4) u32* src; u32* dst; src = (void*)ppbUser; dst = (void*)ppbDsp; + + *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + dst += 1; + src += 1; *(dst) = *(src); dst += 1; src += 1; @@ -194,6 +208,10 @@ void __AXServiceVPB(AXVPB* pvpb) dst += 1; src += 1; *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + if (pvpb->updateCounter != 0) { u32 count; @@ -208,15 +226,18 @@ void __AXServiceVPB(AXVPB* pvpb) } return; } + if (sync & AX_SYNC_FLAG_COPYSELECT) { ppbDsp->srcSelect = ppbUser->srcSelect; ppbDsp->coefSelect = ppbUser->coefSelect; } + if (sync & AX_SYNC_FLAG_COPYMXRCTRL) { ppbDsp->mixerCtrl = ppbUser->mixerCtrl; } + if (sync & AX_SYNC_FLAG_COPYSTATE) { ppbDsp->state = ppbUser->state; @@ -225,10 +246,12 @@ void __AXServiceVPB(AXVPB* pvpb) { ppbUser->state = ppbDsp->state; } + if (sync & AX_SYNC_FLAG_COPYTYPE) { ppbDsp->type = ppbUser->type; } + if (sync & AX_SYNC_FLAG_COPYAXPBMIX) { // copy AXPBMIX. @@ -289,6 +312,7 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); } + if (sync & AX_SYNC_FLAG_COPYTSHIFT) { ppbDsp->itd.targetShiftL = ppbUser->itd.targetShiftL; @@ -322,39 +346,42 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); src += 1; + + dst; // fixes reg alloc dst_ = pvpb->itdBuffer; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; - dst += 1; - *(dst) = 0; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; + dst_ += 1; + *(dst_) = 0; } + if (sync & AX_SYNC_FLAG_COPYUPDATE) { // copy UPDATE struct. @@ -375,6 +402,7 @@ void __AXServiceVPB(AXVPB* pvpb) dst += 1; src += 1; *(dst) = *(src); + if (pvpb->updateCounter) { u32* src_; @@ -392,13 +420,14 @@ void __AXServiceVPB(AXVPB* pvpb) } } } + if (sync & AX_SYNC_FLAG_COPYDPOP) { // copy DPOP struct. u16* src; u16* dst; - dst = (u16*)&ppbDsp->dpop; - src = (u16*)&ppbUser->dpop; + dst = (void*)&ppbDsp->dpop; + src = (void*)&ppbUser->dpop; *(dst) = *(src); dst += 1; src += 1; @@ -425,6 +454,7 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); } + if (sync & AX_SYNC_FLAG_SWAPVOL) { ppbUser->ve.currentVolume = ppbDsp->ve.currentVolume; @@ -435,6 +465,7 @@ void __AXServiceVPB(AXVPB* pvpb) ppbDsp->ve.currentVolume = ppbUser->ve.currentVolume; ppbDsp->ve.currentDelta = ppbUser->ve.currentDelta; } + if (sync & AX_SYNC_FLAG_COPYFIR) { // copy FIR struct. @@ -450,6 +481,7 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); } + if (sync & (AX_SYNC_FLAG_COPYLOOP | AX_SYNC_FLAG_COPYLOOPADDR | AX_SYNC_FLAG_COPYENDADDR | AX_SYNC_FLAG_COPYCURADDR)) { @@ -469,6 +501,10 @@ void __AXServiceVPB(AXVPB* pvpb) { *(u32*)&ppbDsp->addr.currentAddressHi = *(u32*)&ppbUser->addr.currentAddressHi; } + else + { + *(u32*)&ppbUser->addr.currentAddressHi = *(u32*)&ppbDsp->addr.currentAddressHi; + } } else if (sync & AX_SYNC_FLAG_COPYADDR) { @@ -488,6 +524,12 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); } + else + { + ppbUser->addr.currentAddressHi = ppbDsp->addr.currentAddressHi; + ppbUser->addr.currentAddressLo = ppbDsp->addr.currentAddressLo; + } + if (sync & AX_SYNC_FLAG_COPYADPCM) { // copy ADPCM struct. @@ -526,6 +568,7 @@ void __AXServiceVPB(AXVPB* pvpb) dst += 1; src += 1; } + if (sync & AX_SYNC_FLAG_COPYRATIO) { ppbDsp->src.ratioHi = ppbUser->src.ratioHi; @@ -560,6 +603,7 @@ void __AXServiceVPB(AXVPB* pvpb) dst += 1; src += 1; } + if (sync & AX_SYNC_FLAG_COPYADPCMLOOP) { // copy ADPCMLOOP struct. @@ -575,9 +619,36 @@ void __AXServiceVPB(AXVPB* pvpb) src += 1; *(dst) = *(src); } + + if (sync & 0x400000) + { + ppbDsp->lpf.a0 = ppbUser->lpf.a0; + ppbDsp->lpf.b0 = ppbUser->lpf.b0; + return; + } + + if (sync & 0x200000) + { + // copy AXPBLPF struct + u16* src; + u16* dst; + + dst = (void*)&ppbDsp->lpf; + src = (void*)&ppbUser->lpf; + *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + dst += 1; + src += 1; + *(dst) = *(src); + } } -void __AXDumpVPB(AXVPB* pvpb) +inline void __AXDumpVPB(AXVPB* pvpb) { AXPB* ppbDsp; @@ -591,7 +662,7 @@ void __AXDumpVPB(AXVPB* pvpb) __AXPushCallbackStack(pvpb); } -void __AXSyncPBs(u32 lessDspCycles) +void __AXSyncPBs(u32 lessDlpfycles) { u32 cycles; u32 i; @@ -600,19 +671,32 @@ void __AXSyncPBs(u32 lessDspCycles) __AXNumVoices = 0; DCInvalidateRange(__AXPB, sizeof(__AXPB)); DCInvalidateRange(__AXITD, sizeof(__AXITD)); - cycles = (__AXGetCommandListCycles() + 0x10000) - 0x55F0 + lessDspCycles; + cycles = (__AXGetCommandListCycles() + 0x10000) - 0x55F0 + lessDlpfycles; + for (i = 31; i; i--) { for (pvpb = __AXGetStackHead(i); pvpb; pvpb = pvpb->next) { - if (pvpb->depop != 0U) + if (pvpb->depop != 0) { __AXDepopVoice(&__AXPB[pvpb->index]); } - if ((pvpb->pb.state == 1) || (pvpb->updateCounter != 0U)) + + if ((pvpb->pb.state == 1) || (pvpb->updateCounter != 0)) { - cycles = __AXSrcCycles[pvpb->pb.src.ratioHi] + __AXMixCycles[pvpb->pb.mixerCtrl] + - 0x8C + cycles; + if (pvpb->pb.srcSelect != 2) + { + cycles += __AXSrcCycles[pvpb->pb.src.ratioHi]; + } + + if (pvpb->pb.lpf.on) + { + cycles += 555; + } + + cycles += __AXMainMixCycles[pvpb->pb.mixerCtrl & 0xF] + + __AXAuxMixCycles[(pvpb->pb.mixerCtrl >> 4) & 0x1F] + + __AXAuxMixCycles[(pvpb->pb.mixerCtrl >> 9) & 0x1F] + 0x8C; if (__AXMaxDspCycles > cycles) { __AXServiceVPB(pvpb); @@ -626,16 +710,18 @@ void __AXSyncPBs(u32 lessDspCycles) { __AXServiceVPB(pvpb); } + pvpb->sync = 0; pvpb->depop = 0; pvpb->updateMS = pvpb->updateCounter = 0; pvpb->updateWrite = pvpb->updateData; } } + __AXRecDspCycles = cycles; for (pvpb = __AXGetStackHead(0); pvpb; pvpb = pvpb->next) { - if (pvpb->depop != 0U) + if (pvpb->depop != 0) { __AXDepopVoice(&__AXPB[pvpb->index]); } @@ -644,6 +730,7 @@ void __AXSyncPBs(u32 lessDspCycles) __AXPB[pvpb->index].update.updNum[1] = __AXPB[pvpb->index].update.updNum[2] = __AXPB[pvpb->index].update.updNum[3] = __AXPB[pvpb->index].update.updNum[4] = 0; } + DCFlushRange(__AXPB, sizeof(__AXPB)); DCFlushRange(__AXITD, sizeof(__AXITD)); DCFlushRange(__AXUpdates, sizeof(__AXUpdates)); @@ -661,8 +748,9 @@ void __AXSetPBDefault(AXVPB* p) p->sync = 0xA4; p->updateMS = p->updateCounter = 0; p->updateWrite = p->updateData; - p->pb.update.updNum[59] = p->pb.update.updNum[0] = p->pb.update.updNum[1] = - p->pb.update.updNum[2] = p->pb.update.updNum[3] = p->pb.update.updNum[4] = 0; + p->pb.update.updNum[0] = p->pb.update.updNum[1] = p->pb.update.updNum[2] = + p->pb.update.updNum[3] = p->pb.update.updNum[4] = 0; + p->pb.lpf.on = 0; } void __AXVPBInit(void) @@ -672,36 +760,52 @@ void __AXVPBInit(void) AXPBITDBUFFER* ppbi; AXPBU* ppbu; AXVPB* pvpb; + u32* p; #ifdef DEBUG OSReport("Initializing AXVPB code module\n"); #endif __AXMaxDspCycles = OS_BUS_CLOCK / 400; - __AXRecDspCycles = 0U; - memset(__AXPB, 0, sizeof(__AXPB)); - memset(__AXITD, 0, sizeof(__AXITD)); - memset(__AXVPB, 0, sizeof(__AXVPB)); + __AXRecDspCycles = 0; + +#define BUFFER_MEMSET(buffer, size) \ + { \ + p = (u32*)&buffer; \ + for (i = size; i != 0; i--) \ + { \ + *p = 0; \ + p++; \ + } \ + } + + BUFFER_MEMSET(__AXPB, 0xF40); + BUFFER_MEMSET(__AXITD, 0x400); + BUFFER_MEMSET(__AXVPB, 0x22C0); + for (i = 0; i < AX_MAX_VOICES; i++) { ppb = &__AXPB[i]; ppbi = &__AXITD[i]; ppbu = &__AXUpdates[i]; pvpb = &__AXVPB[i]; + pvpb->index = i; pvpb->updateWrite = pvpb->updateData; pvpb->itdBuffer = ppbi; __AXSetPBDefault(pvpb); + if (i == 0x3F) { pvpb->pb.nextHi = pvpb->pb.nextLo = ppb->nextHi = ppb->nextLo = 0; } else { - pvpb->pb.nextHi = (u16)((u32)((char*)ppb + 0xC0) >> 16); - pvpb->pb.nextLo = (u16)((u32)((char*)ppb + 0xC0)); - ppb->nextHi = (u16)((u32)((char*)ppb + 0xC0) >> 16); - ppb->nextLo = (u16)((u32)((char*)ppb + 0xC0)); + pvpb->pb.nextHi = (u16)((u32)((char*)ppb + sizeof(AXPB)) >> 16); + pvpb->pb.nextLo = (u16)((u32)((char*)ppb + sizeof(AXPB))); + ppb->nextHi = (u16)((u32)((char*)ppb + sizeof(AXPB)) >> 16); + ppb->nextLo = (u16)((u32)((char*)ppb + sizeof(AXPB))); } + pvpb->pb.currHi = (u16)(((u32)ppb) >> 16); pvpb->pb.currLo = (u16)((u32)ppb); ppb->currHi = (u16)(((u32)ppb) >> 16); @@ -714,8 +818,11 @@ void __AXVPBInit(void) pvpb->pb.update.dataLo = (u16)((u32)ppbu); ppb->update.dataHi = (u16)(((u32)ppbu) >> 16); ppb->update.dataLo = (u16)((u32)ppbu); + + pvpb->priority = 1; __AXPushFreeStack(pvpb); } + DCFlushRange(__AXPB, sizeof(__AXPB)); } @@ -728,7 +835,7 @@ void __AXVPBQuit(void) void AXSetVoiceSrcType(AXVPB* p, u32 type) { - int old; + BOOL old; AXPB* ppb; old = OSDisableInterrupts(); @@ -754,13 +861,14 @@ void AXSetVoiceSrcType(AXVPB* p, u32 type) ppb->coefSelect = 2; break; } + p->sync |= AX_SYNC_FLAG_COPYSELECT; OSRestoreInterrupts(old); } void AXSetVoiceState(AXVPB* p, u16 state) { - int old; + BOOL old; old = OSDisableInterrupts(); p->pb.state = state; @@ -774,7 +882,7 @@ void AXSetVoiceState(AXVPB* p, u16 state) void AXSetVoiceType(AXVPB* p, u16 type) { - int old; + BOOL old; old = OSDisableInterrupts(); p->pb.type = type; @@ -782,246 +890,9 @@ void AXSetVoiceType(AXVPB* p, u16 type) OSRestoreInterrupts(old); } -void AXSetVoiceMix(AXVPB* p, AXPBMIX* mix) -{ - int old; - u16 mixerCtrl; - u16* dst; - u16* src; - - src = - (u16*)&mix; //! @bug? This is a pointer (to) a pointer and is not what you want if you want to copy the information, no? - dst = (u16*)&p->pb.mix; - - old = OSDisableInterrupts(); - - { - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - } - mixerCtrl = 0; - if (__AXClMode == 4) - { - if ((mix->vAuxAL != 0) || (mix->vAuxAR != 0)) - { - mixerCtrl |= 1; - } - if ((mix->vAuxBL != 0) || (mix->vAuxBR != 0)) - { - mixerCtrl |= 16; - } - if ((mix->vDeltaL != 0) || (mix->vDeltaR != 0) || (mix->vDeltaAuxAL != 0) || - (mix->vDeltaAuxAR != 0) || (mix->vDeltaAuxAS != 0) || (mix->vDeltaAuxBL != 0) || - (mix->vDeltaAuxBR != 0)) - { - mixerCtrl |= 8; - } - } - else - { - if ((mix->vAuxAL != 0) || (mix->vAuxAR != 0)) - { - mixerCtrl |= 1; - } - if ((mix->vAuxBL != 0) || (mix->vAuxBR != 0)) - { - mixerCtrl |= 2; - } - if ((mix->vS != 0) || (mix->vAuxAS != 0) || (mix->vAuxBS != 0)) - { - mixerCtrl |= 4; - } - if ((mix->vDeltaL != 0) || (mix->vDeltaR != 0) || (mix->vDeltaS != 0) || - (mix->vDeltaAuxAL != 0) || (mix->vDeltaAuxAR != 0) || (mix->vDeltaAuxAS != 0) || - (mix->vDeltaAuxBL != 0) || (mix->vDeltaAuxBR != 0) || (mix->vDeltaAuxBS != 0)) - { - mixerCtrl |= 8; - } - } - p->pb.mixerCtrl = mixerCtrl; - p->sync |= (AX_SYNC_FLAG_COPYAXPBMIX | AX_SYNC_FLAG_COPYMXRCTRL); - OSRestoreInterrupts(old); -} - -void AXSetVoiceItdOn(AXVPB* p) -{ - int old; - - old = OSDisableInterrupts(); - p->pb.itd.flag = 1; - p->pb.itd.shiftL = p->pb.itd.shiftR = p->pb.itd.targetShiftL = p->pb.itd.targetShiftR = 0; - p->sync &= ~(AX_SYNC_FLAG_COPYTSHIFT); - p->sync |= AX_SYNC_FLAG_COPYITD; - OSRestoreInterrupts(old); -} - -void AXSetVoiceItdTarget(AXVPB* p, u16 lShift, u16 rShift) -{ - int old; - - old = OSDisableInterrupts(); - p->pb.itd.targetShiftL = lShift; - p->pb.itd.targetShiftR = rShift; - p->sync |= AX_SYNC_FLAG_COPYTSHIFT; - OSRestoreInterrupts(old); -} - -void AXSetVoiceUpdateIncrement(AXVPB* p) -{ - int old; - - old = OSDisableInterrupts(); - p->updateMS++; - p->sync |= AX_SYNC_FLAG_COPYUPDATE; - OSRestoreInterrupts(old); -} - -void AXSetVoiceUpdateWrite(AXVPB* p, u16 param, u16 data) -{ - int old; - - old = OSDisableInterrupts(); - p->updateCounter += 2; - - *(p->updateWrite) = param; - p->updateWrite += 1; - *(p->updateWrite) = data; - p->updateWrite += 1; - p->sync |= AX_SYNC_FLAG_COPYUPDATE; - OSRestoreInterrupts(old); -} - -void AXSetVoiceDpop(AXVPB* p, AXPBDPOP* dpop) -{ - int old; - u16* dst; - u16* src; - - dst = (void*)&p->pb.dpop; - src = (void*)dpop; - - old = OSDisableInterrupts(); - { - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - *(dst) = *(src); - dst += 1; - src += 1; - } - p->sync |= AX_SYNC_FLAG_COPYDPOP; - OSRestoreInterrupts(old); -} - -void AXSetVoiceVe(AXVPB* p, AXPBVE* ve) -{ - int old; - - old = OSDisableInterrupts(); - p->pb.ve.currentVolume = ve->currentVolume; - p->pb.ve.currentDelta = ve->currentDelta; - p->sync |= AX_SYNC_FLAG_COPYVOL; - OSRestoreInterrupts(old); -} - -void AXSetVoiceVeDelta(AXVPB* p, s16 delta) -{ - int old; - - old = OSDisableInterrupts(); - p->pb.ve.currentDelta = delta; - p->sync |= AX_SYNC_FLAG_SWAPVOL; - OSRestoreInterrupts(old); -} - -void AXSetVoiceFir(AXVPB* p, AXPBFIR* fir) -{ - int old; - - old = OSDisableInterrupts(); - p->pb.fir.numCoefs = fir->numCoefs; - p->pb.fir.coefsHi = fir->coefsHi; - p->pb.fir.coefsLo = fir->coefsLo; - p->sync |= AX_SYNC_FLAG_COPYFIR; - OSRestoreInterrupts(old); -} - void AXSetVoiceAddr(AXVPB* p, AXPBADDR* addr) { - int old; + BOOL old; u32* dst; u32* src; @@ -1041,6 +912,7 @@ void AXSetVoiceAddr(AXVPB* p, AXPBADDR* addr) src += 1; *(dst) = *(src); } + switch (addr->format) { case 0: @@ -1094,6 +966,7 @@ void AXSetVoiceAddr(AXVPB* p, AXPBADDR* addr) default: break; } + p->sync &= ~(AX_SYNC_FLAG_COPYLOOP | AX_SYNC_FLAG_COPYLOOPADDR | AX_SYNC_FLAG_COPYENDADDR | AX_SYNC_FLAG_COPYCURADDR); p->sync |= (AX_SYNC_FLAG_COPYADDR | AX_SYNC_FLAG_COPYADPCM); @@ -1102,7 +975,7 @@ void AXSetVoiceAddr(AXVPB* p, AXPBADDR* addr) void AXSetVoiceLoop(AXVPB* p, u16 loop) { - int old; + BOOL old; old = OSDisableInterrupts(); p->pb.addr.loopFlag = loop; @@ -1112,10 +985,10 @@ void AXSetVoiceLoop(AXVPB* p, u16 loop) void AXSetVoiceLoopAddr(AXVPB* p, u32 addr) { - int old; + BOOL old; old = OSDisableInterrupts(); - p->pb.addr.loopAddressHi = (addr >> 0x10U); + p->pb.addr.loopAddressHi = (addr >> 0x10); p->pb.addr.loopAddressLo = (addr); p->sync |= AX_SYNC_FLAG_COPYLOOPADDR; OSRestoreInterrupts(old); @@ -1123,10 +996,10 @@ void AXSetVoiceLoopAddr(AXVPB* p, u32 addr) void AXSetVoiceEndAddr(AXVPB* p, u32 addr) { - int old; + BOOL old; old = OSDisableInterrupts(); - p->pb.addr.endAddressHi = (addr >> 0x10U); + p->pb.addr.endAddressHi = (addr >> 0x10); p->pb.addr.endAddressLo = (addr); p->sync |= AX_SYNC_FLAG_COPYENDADDR; OSRestoreInterrupts(old); @@ -1134,10 +1007,10 @@ void AXSetVoiceEndAddr(AXVPB* p, u32 addr) void AXSetVoiceCurrentAddr(AXVPB* p, u32 addr) { - int old; + BOOL old; old = OSDisableInterrupts(); - p->pb.addr.currentAddressHi = (addr >> 0x10U); + p->pb.addr.currentAddressHi = (addr >> 0x10); p->pb.addr.currentAddressLo = (addr); p->sync |= AX_SYNC_FLAG_COPYCURADDR; OSRestoreInterrupts(old); @@ -1145,7 +1018,7 @@ void AXSetVoiceCurrentAddr(AXVPB* p, u32 addr) void AXSetVoiceAdpcm(AXVPB* p, AXPBADPCM* adpcm) { - int old; + BOOL old; u32* dst; u32* src; @@ -1192,7 +1065,7 @@ void AXSetVoiceAdpcm(AXVPB* p, AXPBADPCM* adpcm) void AXSetVoiceSrc(AXVPB* p, AXPBSRC* src_) { - int old; + BOOL old; u16* dst; u16* src; @@ -1231,7 +1104,7 @@ void AXSetVoiceSrc(AXVPB* p, AXPBSRC* src_) void AXSetVoiceSrcRatio(AXVPB* p, float ratio) { u32 r; - int old; + BOOL old; old = OSDisableInterrupts(); r = 65536.0f * ratio; @@ -1247,7 +1120,7 @@ void AXSetVoiceSrcRatio(AXVPB* p, float ratio) void AXSetVoiceAdpcmLoop(AXVPB* p, AXPBADPCMLOOP* adpcmloop) { - int old; + BOOL old; u16* dst; u16* src; @@ -1268,18 +1141,3 @@ void AXSetVoiceAdpcmLoop(AXVPB* p, AXPBADPCMLOOP* adpcmloop) p->sync |= AX_SYNC_FLAG_COPYADPCMLOOP; OSRestoreInterrupts(old); } - -void AXSetMaxDspCycles(u32 cycles) -{ - __AXMaxDspCycles = cycles; -} - -u32 AXGetMaxDspCycles(void) -{ - return __AXMaxDspCycles; -} - -u32 AXGetDspCycles(void) -{ - return __AXRecDspCycles; -} diff --git a/src/dolphin/src/ax/DSPCode.c b/src/dolphin/src/ax/DSPCode.c index c13f4c0ec..c8fbd9e78 100644 --- a/src/dolphin/src/ax/DSPCode.c +++ b/src/dolphin/src/ax/DSPCode.c @@ -1,211 +1,336 @@ #include #include -u16 axDspSlaveLength = (AX_DSP_SLAVE_LENGTH*2); +u16 axDspSlaveLength = (AX_DSP_SLAVE_LENGTH * 2); + +u16 axDspSlave[AX_DSP_SLAVE_LENGTH] = { + 0x0000, 0x0000, 0x029F, 0x0E76, 0x029F, 0x0E85, 0x029F, 0x0EA1, 0x029F, 0x0EB0, 0x029F, 0x0EB6, + 0x029F, 0x0EE8, 0x029F, 0x0EEE, 0x1302, 0x1303, 0x1204, 0x1305, 0x1306, 0x8E00, 0x8C00, 0x8B00, + 0x0092, 0x00FF, 0x8100, 0x8900, 0x009E, 0x0E80, 0x00FE, 0x0E1B, 0x8100, 0x00FE, 0x0E31, 0x16FC, + 0xDCD1, 0x16FD, 0x0000, 0x16FB, 0x0001, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0029, 0x029F, 0x0045, + 0x1302, 0x1303, 0x1204, 0x1305, 0x1306, 0x8E00, 0x8C00, 0x8B00, 0x0092, 0x00FF, 0x16FC, 0xDCD1, + 0x16FD, 0x0001, 0x16FB, 0x0001, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0040, 0x8E00, 0x8100, 0x8900, + 0x009F, 0xBABE, 0x26FE, 0x02C0, 0x8000, 0x029C, 0x004A, 0x8200, 0x0294, 0x004A, 0x23FF, 0x8100, + 0x26FE, 0x02C0, 0x8000, 0x029C, 0x0054, 0x27FF, 0x0240, 0x7FFF, 0x2ECE, 0x2FCF, 0x16CD, 0x0C00, + 0x8100, 0x2EC9, 0x1FFB, 0x2FCB, 0x02BF, 0x0657, 0x0080, 0x0C00, 0x8E00, 0x8100, 0x8970, 0xB100, + 0x0291, 0x007E, 0x0A13, 0xC100, 0x0292, 0x007E, 0x009F, 0x0C8B, 0x4C00, 0x1C7E, 0x0213, 0x1C7E, + 0x176F, 0x16FC, 0xFBAD, 0x16FD, 0x8080, 0x0021, 0x16FC, 0xBAAD, 0x2EFD, 0x0021, 0x8D00, 0x8F00, + 0x8A00, 0x8900, 0x8168, 0x0098, 0x0000, 0x0099, 0x0001, 0x0081, 0x0000, 0x0000, 0x193E, 0x193C, + 0x11A0, 0x009B, 0xA100, 0x8271, 0x0277, 0x1F19, 0x193C, 0xA100, 0x8271, 0x0277, 0x1F19, 0x193C, + 0x1FD8, 0xB100, 0x0294, 0x00CD, 0x00DE, 0x0E44, 0x0000, 0xB100, 0x0294, 0x00AD, 0x191C, 0x191C, + 0x191C, 0x00E0, 0x0E45, 0x029F, 0x0118, 0x8B00, 0x7A00, 0x00FE, 0x0E44, 0x8400, 0x0099, 0x0140, + 0x1F1E, 0xA000, 0x191E, 0x191E, 0x191C, 0x00E0, 0x0E45, 0x009A, 0x0000, 0x0098, 0x0DC0, 0x4E00, + 0x4800, 0x2ECE, 0x2CCF, 0x009E, 0x0E48, 0x2ECD, 0x0E00, 0x2EC9, 0x009E, 0x0140, 0x2ECB, 0x029F, + 0x00E7, 0x8B00, 0x00D8, 0x0E44, 0x0099, 0x0140, 0x0000, 0xA000, 0x191E, 0x0000, 0x00FE, 0x0E44, + 0x191E, 0x191C, 0x00E0, 0x0E45, 0x4E00, 0x2ECE, 0x2CCF, 0x009E, 0x0E48, 0x2ECD, 0x0E00, 0x2EC9, + 0x009E, 0x0140, 0x2ECB, 0x02BF, 0x0657, 0x8A48, 0x0083, 0x0E48, 0x0080, 0x0000, 0x0081, 0x0000, + 0x1979, 0x193A, 0xB041, 0xA64B, 0xF051, 0xB441, 0x9100, 0x1150, 0x0100, 0xA792, 0xF151, 0xB520, + 0x9941, 0xA693, 0xF051, 0xB428, 0x9141, 0x0083, 0x0E48, 0x0080, 0x0140, 0x0081, 0x0140, 0x1979, + 0x193A, 0xB041, 0xA64B, 0xF051, 0xB441, 0x9100, 0x1150, 0x0117, 0xA792, 0xF151, 0xB520, 0x9941, + 0xA693, 0xF051, 0xB428, 0x9141, 0x00C0, 0x0E45, 0x029F, 0x0068, 0x8100, 0x8970, 0x8E78, 0x2ECE, + 0x2FCF, 0x009E, 0x0E48, 0x2ECD, 0x0E00, 0x2EC9, 0x009E, 0x0040, 0x2ECB, 0x0081, 0x0E48, 0x0082, + 0x0000, 0x009B, 0x009F, 0x009A, 0x0140, 0x8100, 0x8900, 0x8F00, 0x02BF, 0x0657, 0x193E, 0x193C, + 0xB100, 0x193F, 0x0294, 0x0140, 0x005A, 0x1B5E, 0x029F, 0x0148, 0x9900, 0x1B5E, 0x1B5C, 0x007B, + 0x0147, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB100, 0x193F, 0x0294, 0x0152, 0x005A, 0x1B5E, + 0x029F, 0x015A, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x0159, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, + 0xB100, 0x193F, 0x0294, 0x0164, 0x005A, 0x1B5E, 0x029F, 0x016C, 0x9900, 0x1B5E, 0x1B5C, 0x007B, + 0x016B, 0x4C00, 0x1B5E, 0x1B5C, 0x0082, 0x0400, 0x193E, 0x193C, 0xB179, 0x0294, 0x0177, 0x005A, + 0x1B5E, 0x029F, 0x017F, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x017E, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, + 0x193C, 0xB179, 0x0294, 0x0188, 0x005A, 0x1B5E, 0x029F, 0x0190, 0x9900, 0x1B5E, 0x1B5C, 0x007B, + 0x018F, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x0199, 0x005A, 0x1B5E, 0x029F, + 0x01A1, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x01A0, 0x4C00, 0x1B5E, 0x1B5C, 0x0082, 0x07C0, 0x193E, + 0x193C, 0xB179, 0x0294, 0x01AC, 0x005A, 0x1B5E, 0x029F, 0x01B4, 0x9900, 0x1B5E, 0x1B5C, 0x007B, + 0x01B3, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x01BD, 0x005A, 0x1B5E, 0x029F, + 0x01C5, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x01C4, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, + 0x0294, 0x01CE, 0x005A, 0x1B5E, 0x029F, 0x01D6, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x01D5, 0x4C00, + 0x1B5E, 0x1B5C, 0x029F, 0x0068, 0x0085, 0xFFFF, 0x8150, 0x8940, 0x8E48, 0x00FA, 0x0E17, 0x00F8, + 0x0E18, 0x0081, 0x0000, 0x02BF, 0x05EC, 0x00DA, 0x0E17, 0x00D8, 0x0E18, 0x8948, 0x0081, 0x0400, + 0x02BF, 0x05EC, 0x00DA, 0x0E17, 0x00D8, 0x0E18, 0x8948, 0x0081, 0x07C0, 0x02BF, 0x05EC, 0x029F, + 0x0068, 0x0086, 0x07C0, 0x02BF, 0x057F, 0x029F, 0x0068, 0x8100, 0x8E00, 0x191E, 0x191C, 0x2ECE, + 0x2CCF, 0x16CD, 0x0000, 0x16C9, 0x0001, 0x16CB, 0x0780, 0x02BF, 0x0657, 0x029F, 0x0068, 0x8100, + 0x8970, 0x8E60, 0x2ECE, 0x2CCF, 0x16CD, 0x0E48, 0x16C9, 0x0000, 0x8900, 0x0D20, 0x2DCB, 0x4C00, + 0x1C80, 0x0080, 0x0280, 0x0081, 0x0000, 0x0082, 0x0140, 0x0083, 0x0E48, 0x0A00, 0x27C9, 0x03A0, + 0x0004, 0x029C, 0x0226, 0x2ECE, 0x2CCF, 0x16CD, 0x0E58, 0x16C9, 0x0000, 0x16CB, 0x0260, 0x009F, + 0x00A0, 0x8F00, 0x007F, 0x023F, 0x197E, 0x1B1A, 0x197C, 0x1B1A, 0x1B5E, 0x7C22, 0x1B3E, 0x1B3C, + 0x1C04, 0x029F, 0x0068, 0x8E70, 0x8960, 0x191F, 0x2ECE, 0x2CCF, 0x16CD, 0x0C00, 0x16C9, 0x0000, + 0x0503, 0x0340, 0xFFF0, 0x2FCB, 0x02BF, 0x0657, 0x0080, 0x0C00, 0x029F, 0x0068, 0x8100, 0x8970, + 0x8E78, 0x2ECE, 0x2FCF, 0x16CD, 0x0B80, 0x16C9, 0x0000, 0x16CB, 0x00C4, 0x0082, 0x0E08, 0x009F, + 0x0000, 0x1B5F, 0x009F, 0x0140, 0x1B5F, 0x009F, 0x0280, 0x1B5F, 0x009F, 0x0400, 0x1B5F, 0x009F, + 0x0540, 0x1B5F, 0x009F, 0x0680, 0x1B5F, 0x009F, 0x07C0, 0x1B5F, 0x009F, 0x0900, 0x1B5F, 0x009F, + 0x0A40, 0x1B5F, 0x02BF, 0x0657, 0x00DE, 0x0BA7, 0x00DF, 0x0BA8, 0x2ECE, 0x2FCF, 0x16CD, 0x03C0, + 0x16C9, 0x0000, 0x16CB, 0x0080, 0x8100, 0x8900, 0x00DE, 0x0B84, 0x009F, 0x0D0F, 0x4C00, 0x1C7E, + 0x0213, 0x00FE, 0x0E15, 0x00DE, 0x0B85, 0x009F, 0x0D12, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E16, + 0x00DE, 0x0B86, 0x009A, 0x000F, 0x009F, 0x0C9F, 0x3400, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E14, + 0x00DE, 0x0B86, 0x009A, 0x001F, 0x009F, 0x0CAF, 0x14FC, 0x3400, 0x4C00, 0x1C7E, 0x0213, 0x00FE, + 0x0E46, 0x00DE, 0x0B86, 0x009F, 0x0CCF, 0x14F7, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E47, 0x8100, + 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x02EE, 0x8900, 0x00DF, 0x0B9E, 0x0300, 0x0CC0, 0x00FF, 0x0E40, + 0x00DF, 0x0B9F, 0x0300, 0x0CC0, 0x00FF, 0x0E41, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E43, + 0x02BF, 0x0657, 0x00DE, 0x0B9C, 0x2ECE, 0x00DE, 0x0B9D, 0x2ECF, 0x16CD, 0x0CC0, 0x16C9, 0x0000, + 0x16CB, 0x0040, 0x02BF, 0x0657, 0x029F, 0x0068, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E40, + 0x00FF, 0x0E41, 0x00FF, 0x0E43, 0x02BF, 0x0657, 0x029F, 0x0068, 0x8E00, 0x00E0, 0x0E07, 0x0080, + 0x0BA2, 0x0081, 0x03C0, 0x0E05, 0x00FE, 0x0E04, 0x8900, 0x8150, 0x009F, 0x0B80, 0x007A, 0x030F, + 0x193E, 0x4C49, 0x1C5E, 0x1A59, 0x0083, 0x0E05, 0x1B61, 0x1B60, 0x00DE, 0x0B87, 0x0601, 0x0295, + 0x031B, 0x029F, 0x0413, 0x00DE, 0x0E42, 0x00FE, 0x0E1C, 0x00C3, 0x0E15, 0x177F, 0x8E00, 0x8A00, + 0x8100, 0x8900, 0x00DE, 0x0BB3, 0x00DF, 0x0BB2, 0x1F1F, 0x4D00, 0x1481, 0x8D1E, 0x1FD8, 0x0098, + 0x8000, 0x0080, 0x0E48, 0xA830, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, + 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, + 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0x00FE, + 0x0BB2, 0x8F00, 0x0080, 0x0E48, 0x00C1, 0x0E43, 0x1C61, 0x193A, 0x1918, 0x9059, 0x1919, 0x9E51, + 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, + 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, + 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, + 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, + 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E00, + 0x6F33, 0x1B7F, 0x8100, 0x00DE, 0x0BDD, 0x0000, 0xB100, 0x0295, 0x03C5, 0x8D00, 0x8F00, 0x8A00, + 0x00C0, 0x0E43, 0x00C1, 0x0E43, 0x0083, 0x0BDF, 0x0087, 0xFFFF, 0x00DE, 0x0BDE, 0x80E1, 0xB04F, + 0x1F5E, 0xE2E1, 0xB64F, 0x1F5E, 0xE2E1, 0x110F, 0x03C0, 0xB79A, 0x1F5F, 0xE2E1, 0xB69B, 0x1F5E, + 0xE2E1, 0xB79A, 0x1B1F, 0x00FF, 0x0BDE, 0x00C3, 0x0E14, 0x8A00, 0x177F, 0x00C3, 0x0E46, 0x8A00, + 0x177F, 0x00C3, 0x0E47, 0x8A00, 0x177F, 0x8100, 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x040B, 0x00DE, + 0x0E42, 0x00FE, 0x0E43, 0x8100, 0x8900, 0x00DE, 0x0B9E, 0x00DF, 0x0BA0, 0x8200, 0x0293, 0x03E7, + 0x7800, 0x029F, 0x03EA, 0x0295, 0x03EA, 0x7400, 0x00FE, 0x0B9E, 0x00DF, 0x0E43, 0x05E0, 0x4C00, + 0x00FE, 0x0E40, 0x8100, 0x8900, 0x00DE, 0x0B9F, 0x00DF, 0x0BA1, 0x8200, 0x0293, 0x03FE, 0x7800, + 0x029F, 0x0401, 0x0295, 0x0401, 0x7400, 0x00FE, 0x0B9F, 0x00DF, 0x0E43, 0x05E0, 0x4C00, 0x00FE, + 0x0E41, 0x029F, 0x0413, 0x00DE, 0x0E42, 0x00FE, 0x0E40, 0x00FE, 0x0E41, 0x00FE, 0x0E43, 0x8100, + 0x8E00, 0x8400, 0x8900, 0x1EFE, 0x0E40, 0x1EBE, 0x0083, 0x0E08, 0x1C03, 0x1FF5, 0x191A, 0xF858, + 0xFBA0, 0xF8B1, 0xFBA0, 0xF8B1, 0xFBA0, 0xF8B1, 0xFBA0, 0xF83B, 0x1B7E, 0x0083, 0x0E04, 0x8100, + 0x8973, 0x1961, 0x1960, 0x7800, 0x00FE, 0x0E04, 0x0294, 0x0307, 0x8E00, 0x8100, 0x00DE, 0x0B9B, + 0xB100, 0x0295, 0x044B, 0x00DE, 0x0B9C, 0x00DC, 0x0B9D, 0x2ECE, 0x2CCF, 0x8100, 0x00DE, 0x0E1C, + 0x2ECD, 0x16C9, 0x0001, 0x16CB, 0x0040, 0x02BF, 0x0657, 0x8100, 0x8900, 0x00DE, 0x0B82, 0x00DF, + 0x0B83, 0x2ECE, 0x2FCF, 0x16CD, 0x0B80, 0x16C9, 0x0001, 0x16CB, 0x00C4, 0x02BF, 0x0657, 0x8100, + 0x00DE, 0x0B80, 0x00DC, 0x0B81, 0xB100, 0x0294, 0x0467, 0x00C0, 0x0E07, 0x029F, 0x0068, 0x2ECE, + 0x2CCF, 0x16CD, 0x0B80, 0x16C9, 0x0000, 0x16CB, 0x00C4, 0x0082, 0x0E08, 0x009F, 0x0000, 0x1B5F, + 0x009F, 0x0140, 0x1B5F, 0x009F, 0x0280, 0x1B5F, 0x009F, 0x0400, 0x1B5F, 0x009F, 0x0540, 0x1B5F, + 0x009F, 0x0680, 0x1B5F, 0x009F, 0x07C0, 0x1B5F, 0x009F, 0x0900, 0x1B5F, 0x009F, 0x0A40, 0x1B5F, + 0x02BF, 0x0657, 0x00DE, 0x0BA7, 0x00DF, 0x0BA8, 0x2ECE, 0x2FCF, 0x16CD, 0x03C0, 0x16C9, 0x0000, + 0x16CB, 0x0080, 0x8100, 0x8900, 0x00DE, 0x0B84, 0x009F, 0x0D0F, 0x4C00, 0x1C7E, 0x0213, 0x00FE, + 0x0E15, 0x00DE, 0x0B85, 0x009F, 0x0D12, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E16, 0x00DE, 0x0B86, + 0x009A, 0x000F, 0x009F, 0x0C9F, 0x3400, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E14, 0x00DE, 0x0B86, + 0x009A, 0x001F, 0x009F, 0x0CAF, 0x14FC, 0x3400, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E46, 0x00DE, + 0x0B86, 0x009F, 0x0CCF, 0x14F7, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E47, 0x8100, 0x00DE, 0x0B9B, + 0xB100, 0x0295, 0x04FE, 0x8900, 0x00DF, 0x0B9E, 0x0300, 0x0CC0, 0x00FF, 0x0E40, 0x00DF, 0x0B9F, + 0x0300, 0x0CC0, 0x00FF, 0x0E41, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E43, 0x02BF, 0x0657, + 0x00DE, 0x0B9C, 0x2ECE, 0x00DE, 0x0B9D, 0x2ECF, 0x16CD, 0x0CC0, 0x16C9, 0x0000, 0x16CB, 0x0040, + 0x02BF, 0x0657, 0x00C0, 0x0E07, 0x029F, 0x02FC, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E40, + 0x00FF, 0x0E41, 0x00FF, 0x0E43, 0x02BF, 0x0657, 0x00C0, 0x0E07, 0x029F, 0x02FC, 0x8E00, 0x0086, + 0x0400, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x1FC6, 0x2ECD, 0x16C9, 0x0001, 0x16CB, 0x0780, + 0x02BF, 0x0657, 0x02BF, 0x057F, 0x029F, 0x0068, 0x8E00, 0x0086, 0x07C0, 0x8100, 0x8970, 0x191C, + 0x2ECE, 0x2CCF, 0x1FC6, 0x2ECD, 0x16C9, 0x0001, 0x16CB, 0x0780, 0x02BF, 0x0657, 0x02BF, 0x057F, + 0x029F, 0x0068, 0x8C00, 0x8A00, 0x8100, 0x8970, 0x191F, 0x2ECE, 0x2FCF, 0x16CD, 0x0280, 0x16C9, + 0x0001, 0x16CB, 0x0280, 0x8F50, 0x8140, 0x0081, 0x0400, 0x0083, 0x0000, 0x0082, 0x0140, 0x0099, + 0x0080, 0x02BF, 0x0657, 0x1105, 0x0567, 0x1F61, 0x1120, 0x0559, 0x8972, 0x195C, 0xF07B, 0x197D, + 0xF131, 0x8139, 0x8900, 0x6800, 0x2ECE, 0x2CCF, 0x1FFB, 0x2FCD, 0x0F01, 0x2FC9, 0x1FF9, 0x2FCB, + 0x7200, 0x1F5E, 0x1F1C, 0x8100, 0x26C9, 0x02A0, 0x0004, 0x029C, 0x0568, 0x029F, 0x0068, 0x029F, + 0x0068, 0x029F, 0x0068, 0x029F, 0x0068, 0x16FC, 0xDCD1, 0x16FD, 0x0002, 0x16FB, 0x0001, 0x029F, + 0x0EF7, 0x029F, 0x0045, 0x8E00, 0x191F, 0x191D, 0x1F5F, 0x1F1D, 0x2FCE, 0x2DCF, 0x8900, 0x1FA6, + 0x2DCD, 0x0E00, 0x2EC9, 0x8100, 0x009C, 0x00C0, 0x2CCB, 0x1CA0, 0x0081, 0x0E48, 0x4800, 0x1B3E, + 0x1B3C, 0x0B00, 0x0099, 0x0060, 0x4B00, 0x1B3D, 0x0081, 0x0E48, 0x1C06, 0x0083, 0x0000, 0x1C43, + 0x27C9, 0x03A0, 0x0004, 0x029C, 0x05A0, 0x1109, 0x05D5, 0x8E00, 0x193A, 0x1938, 0x6900, 0x2FCE, + 0x2DCF, 0x8900, 0x193D, 0x2DCD, 0x16C9, 0x0000, 0x8100, 0x009C, 0x00C0, 0x2CCB, 0x0081, 0x0E48, + 0x4800, 0x1B3E, 0x1B3C, 0x0B00, 0x0960, 0x4B00, 0x1B3D, 0x0081, 0x0E48, 0x8F00, 0x80F0, 0x80C0, + 0x6A00, 0x4800, 0x1117, 0x05CF, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, + 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, 0x80F0, 0x80C0, 0x6A00, 0x4800, 0x1117, 0x05E3, + 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, 0x80F0, 0x80C0, 0x6B32, 0x4922, + 0x1B5F, 0x1B5D, 0x1C05, 0x02DF, 0x8E00, 0x009B, 0x0E48, 0x009D, 0x00C0, 0x02BF, 0x063C, 0x4900, + 0x00FF, 0x0E1D, 0x00FD, 0x0E1E, 0x8900, 0x02BF, 0x0657, 0x1104, 0x0627, 0x00DA, 0x0E1D, 0x00D8, + 0x0E1E, 0x009B, 0x0EA8, 0x009D, 0x00C0, 0x02BF, 0x063C, 0x4900, 0x00FF, 0x0E1D, 0x00FD, 0x0E1E, + 0x0083, 0x0E48, 0x02BF, 0x0647, 0x8900, 0x00DA, 0x0E1D, 0x00D8, 0x0E1E, 0x009B, 0x0E48, 0x009D, + 0x00C0, 0x02BF, 0x063C, 0x4900, 0x00FF, 0x0E1D, 0x00FD, 0x0E1E, 0x0083, 0x0EA8, 0x02BF, 0x0647, + 0x0000, 0x0000, 0x8E00, 0x8900, 0x00DA, 0x0E1D, 0x00D8, 0x0E1E, 0x009B, 0x0EA8, 0x009D, 0x00C0, + 0x02BF, 0x063C, 0x4900, 0x0083, 0x0E48, 0x02BF, 0x0647, 0x0083, 0x0EA8, 0x02BF, 0x0647, 0x02DF, + 0x8E00, 0x00FA, 0xFFCE, 0x00F8, 0xFFCF, 0x00FB, 0xFFCD, 0x16C9, 0x0000, 0x2DCB, 0x02DF, 0x8F00, + 0x8D00, 0x8A00, 0x197A, 0x1978, 0xA000, 0xB600, 0x1130, 0x0655, 0x9179, 0x4E6D, 0x197A, 0x4D43, + 0xA039, 0xB629, 0x02DF, 0x26C9, 0x02A0, 0x0004, 0x029C, 0x0657, 0x02DF, 0x26FE, 0x02C0, 0x8000, + 0x029C, 0x065D, 0x02DF, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0663, 0x02DF, 0x26FC, 0x02A0, 0x8000, + 0x029C, 0x0669, 0x02DF, 0x8100, 0x8970, 0x8E60, 0x2ECE, 0x2CCF, 0x16CD, 0x0E48, 0x16C9, 0x0000, + 0x8900, 0x0D20, 0x2DCB, 0x4C00, 0x1C80, 0x0080, 0x0280, 0x0081, 0x0000, 0x0082, 0x0140, 0x0083, + 0x0E48, 0x0A00, 0x27C9, 0x03A0, 0x0004, 0x029C, 0x0686, 0x2ECE, 0x2CCF, 0x16CD, 0x0E58, 0x16C9, + 0x0000, 0x16CB, 0x0260, 0x009F, 0x00A0, 0x8F00, 0x007F, 0x069F, 0x197E, 0x1B1A, 0x197C, 0x1B1A, + 0x1B5E, 0x1B5C, 0x1B3E, 0x1B3C, 0x1C04, 0x029F, 0x0068, 0x0082, 0x0BB8, 0x195E, 0x2ED1, 0x195E, + 0x2ED4, 0x195E, 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, 0x195E, 0x2ED8, 0x195E, 0x2ED9, 0x195E, + 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, 0x2EA3, 0x195E, 0x2EA4, 0x195E, 0x2EA5, 0x195E, + 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, 0x195E, 0x2EAB, 0x195E, + 0x2EAC, 0x195E, 0x2EAD, 0x195E, 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, 0x195E, 0x2EDA, 0x195E, + 0x2EDB, 0x195E, 0x2EDC, 0x8C00, 0x8A00, 0x8E00, 0x00D8, 0x0E16, 0x195B, 0x1959, 0x8100, 0x195C, + 0x0080, 0x0E48, 0x195F, 0x1B1F, 0x195F, 0x1B1F, 0x195F, 0x1B1F, 0x185F, 0x1B1F, 0x6B00, 0x1505, + 0x4D00, 0x157E, 0x1C9F, 0x1CBD, 0x05E0, 0x9900, 0x7D00, 0x1CDD, 0x8900, 0x1FA5, 0x1502, 0x1CBF, + 0x009A, 0x01FC, 0x009E, 0x0E48, 0x0081, 0xFFDD, 0x0083, 0x0D80, 0x0064, 0x0715, 0x1827, 0x1B07, + 0x4A00, 0x1FFC, 0x1827, 0x1B07, 0x1579, 0x3500, 0x1827, 0x1B07, 0x4100, 0x1B7E, 0x1827, 0x1B07, + 0x1B7F, 0x0000, 0x0065, 0x071B, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0007, 0x187F, 0x0066, 0x0724, + 0x4A3B, 0x1FFC, 0x1579, 0x3533, 0x4100, 0x1B7F, 0x0004, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, + 0x1ADF, 0x189F, 0x1ADF, 0x1ADC, 0x0082, 0x0BD2, 0x27DC, 0x1ADF, 0x27DB, 0x1ADF, 0x27DA, 0x1ADF, + 0x0082, 0x0BBE, 0x27D9, 0x1ADF, 0x27D8, 0x1ADF, 0x8F00, 0x00C1, 0x0E42, 0x0082, 0x0D80, 0x1940, + 0x1943, 0x80F0, 0xB8C0, 0x111F, 0x074F, 0xA6F0, 0xBCF0, 0x1940, 0x1943, 0xBCF0, 0x4EC0, 0xB831, + 0xA6F0, 0xBCF0, 0xBC00, 0x4E00, 0x1B3E, 0x00E1, 0x0E42, 0x02DF, 0x0082, 0x0BB8, 0x195E, 0x2ED1, + 0x195E, 0x2ED4, 0x195E, 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, 0x195E, 0x2ED8, 0x195E, 0x2ED9, + 0x195E, 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, 0x2EA3, 0x195E, 0x2EA4, 0x195E, 0x2EA5, + 0x195E, 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, 0x195E, 0x2EAB, + 0x195E, 0x2EAC, 0x195E, 0x2EAD, 0x195E, 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, 0x195E, 0x2EDA, + 0x195E, 0x2EDB, 0x195E, 0x2EDC, 0x8C00, 0x8A00, 0x8E00, 0x195B, 0x1959, 0x8100, 0x195C, 0x0080, + 0x0E48, 0x195F, 0x195F, 0x195F, 0x1B1F, 0x185F, 0x1B1F, 0x6B00, 0x1505, 0x4D00, 0x157E, 0x1C9F, + 0x1CBD, 0x05E0, 0x9900, 0x7D00, 0x1CDD, 0x8900, 0x1FA5, 0x1502, 0x1CBF, 0x009A, 0x01FC, 0x009E, + 0x0E49, 0x0081, 0xFFDD, 0x0083, 0x0D80, 0x0064, 0x07C6, 0x1827, 0x1B07, 0x4A00, 0x1B7E, 0x1827, + 0x1B07, 0x1B7C, 0x0000, 0x1827, 0x1B07, 0x0000, 0x0000, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0065, + 0x07CC, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0066, 0x07D1, 0x4A00, 0x1B7E, 0x1B7C, 0x0004, 0x189F, + 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x1ADC, 0x0082, 0x0BD2, 0x27DC, 0x1ADF, + 0x27DB, 0x1ADF, 0x27DA, 0x1ADF, 0x0082, 0x0BBE, 0x27D9, 0x1ADF, 0x27D8, 0x1ADF, 0x8D00, 0x8B00, + 0x8F00, 0x00C1, 0x0E42, 0x0082, 0x0D80, 0x8100, 0x1120, 0x07FE, 0x8900, 0x1940, 0x189E, 0x181B, + 0x199A, 0x5400, 0x1F5E, 0x1959, 0xB000, 0xFB00, 0x8139, 0x00E1, 0x0E42, 0x02DF, 0x0082, 0x0BB8, + 0x195E, 0x2ED1, 0x195E, 0x2ED4, 0x195E, 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, 0x195E, 0x2ED8, + 0x195E, 0x2ED9, 0x195E, 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, 0x2EA3, 0x195E, 0x2EA4, + 0x195E, 0x2EA5, 0x195E, 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, + 0x195E, 0x2EAB, 0x195E, 0x2EAC, 0x195E, 0x2EAD, 0x195E, 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, + 0x195E, 0x2EDA, 0x195E, 0x2EDB, 0x195E, 0x2EDC, 0x00C0, 0x0E42, 0x0081, 0xFFDD, 0x1120, 0x0843, + 0x1824, 0x1B04, 0x0000, 0x0000, 0x00E0, 0x0E42, 0x0082, 0x0BD9, 0x0004, 0x189F, 0x1ADF, 0x189F, + 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x8900, 0x1ADC, 0x27DC, 0x00FF, 0x0BD2, 0x27DB, 0x00FF, + 0x0BD1, 0x27DA, 0x00FF, 0x0BD0, 0x27D9, 0x00FF, 0x0BBE, 0x27D8, 0x00FF, 0x0BBD, 0x02DF, 0x02DF, + 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BA9, 0x02DF, + 0x00C0, 0x0E41, 0x0081, 0x0B8B, 0x00C2, 0x0E09, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAC, 0x02DF, + 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, + 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, + 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, + 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BA9, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x1C62, + 0x02BF, 0x81F9, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E41, 0x0081, 0x0B8B, 0x00C2, 0x0E09, 0x1C62, + 0x02BF, 0x81F9, 0x00F8, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x1C62, 0x02BF, + 0x81F9, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, + 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, + 0x0B97, 0x00C2, 0x0E0A, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, + 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BA9, 0x02DF, 0x00C0, 0x0E41, + 0x0081, 0x0B8B, 0x00C2, 0x0E09, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAC, 0x02DF, 0x00C0, + 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E48, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, + 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, + 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, + 0x0E08, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BA9, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, + 0x0E0A, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E41, 0x0081, 0x0B8B, + 0x00C2, 0x0E09, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B97, + 0x00C2, 0x0E0A, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, + 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E48, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, + 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x0083, 0x0E48, 0x02BF, + 0x845D, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x02BF, + 0x81F9, 0x00F8, 0x0BAA, 0x02DF, 0x00C0, 0x0E41, 0x0081, 0x0B8F, 0x00C2, 0x0E0C, 0x1C62, 0x02BF, + 0x81F9, 0x00F8, 0x0BAD, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, + 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x02DF, 0x00C0, 0x0E40, + 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAA, 0x02DF, 0x00C0, + 0x0E41, 0x0081, 0x0B8F, 0x00C2, 0x0E0C, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAD, 0x02DF, + 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E48, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, + 0x02BF, 0x8282, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, + 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, + 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, 0x0970, 0x00C0, 0x0E43, 0x0081, 0x0B99, + 0x00C2, 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, 0x097C, 0x00C0, 0x0E43, 0x0081, + 0x0B99, 0x00C2, 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, 0x0988, 0x00C0, 0x0E43, + 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, 0x099A, 0x00C0, + 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, 0x09A7, + 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x029F, + 0x09B4, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, + 0x0BB0, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E48, 0x02BF, 0x845D, + 0x00F8, 0x0BB0, 0x029F, 0x0970, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E48, + 0x02BF, 0x845D, 0x00F8, 0x0BB0, 0x029F, 0x097C, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, + 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB0, 0x029F, 0x0988, 0x00C0, 0x0E43, 0x0081, 0x0B99, + 0x00C2, 0x0E0D, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB0, 0x029F, 0x099A, 0x00C0, 0x0E43, + 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB0, 0x029F, 0x09A7, + 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB0, + 0x029F, 0x09B4, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x02BF, 0x81F9, 0x00F8, + 0x0BAB, 0x02DF, 0x00C0, 0x0E41, 0x0081, 0x0B93, 0x00C2, 0x0E0F, 0x1C62, 0x02BF, 0x81F9, 0x00F8, + 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x00C4, 0x0E41, 0x00C5, + 0x0E0F, 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B91, + 0x00C2, 0x0E0E, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAB, 0x02DF, 0x00C0, 0x0E41, 0x0081, + 0x0B93, 0x00C2, 0x0E0F, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, + 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E48, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x8282, + 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, + 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, + 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0A82, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, + 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0A8E, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, + 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0A9A, 0x00C0, 0x0E43, 0x0081, 0x0B95, + 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0AAC, 0x00C0, 0x0E43, 0x0081, + 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0AB9, 0x00C0, 0x0E43, + 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0AC6, 0x00C0, + 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x02DF, 0x00C0, 0x0E43, + 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0A82, + 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, + 0x029F, 0x0A8E, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, + 0x00F8, 0x0BB1, 0x029F, 0x0A9A, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, + 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0AAC, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, + 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0AB9, 0x00C0, 0x0E43, 0x0081, 0x0B95, + 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0AC6, 0x00C0, 0x0E43, + 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAB, 0x02DF, 0x00C0, 0x0E43, + 0x0081, 0x0B93, 0x00C2, 0x0E0F, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAE, 0x02DF, 0x00C0, 0x0E43, + 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x00C4, 0x0E43, 0x00C5, 0x0E0F, 0x02BF, 0x80E7, 0x00F8, + 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E48, + 0x02BF, 0x845D, 0x00F8, 0x0BAB, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B93, 0x00C2, 0x0E0F, 0x0083, + 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BAE, 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, 0x0E0E, + 0x0083, 0x0E48, 0x00C4, 0x0E43, 0x00C5, 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, + 0x02DF, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, + 0x029F, 0x0B92, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, + 0x0BB1, 0x029F, 0x0B9E, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, + 0x00F8, 0x0BB1, 0x029F, 0x0BAA, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, + 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0BBC, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, + 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0BC9, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, + 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BB1, 0x029F, 0x0BD6, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, + 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0B92, 0x00C0, 0x0E43, 0x0081, + 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0B9E, 0x00C0, + 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, + 0x0BAA, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, 0x845D, 0x00F8, + 0x0BB1, 0x029F, 0x0BBC, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E48, 0x02BF, + 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0BC9, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, + 0x0E48, 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x029F, 0x0BD6, 0x011C, 0x01D8, 0x0256, 0x02FC, 0x050E, + 0x0522, 0x01FF, 0x066F, 0x0D15, 0x01F9, 0x0573, 0x056F, 0x0571, 0x0243, 0x0536, 0x0575, 0x0D8F, + 0x020F, 0x0082, 0x0E05, 0x0863, 0x0864, 0x0870, 0x087C, 0x088E, 0x089A, 0x08B1, 0x08C8, 0x0863, + 0x08E5, 0x08F2, 0x08FF, 0x0912, 0x091F, 0x0938, 0x0951, 0x0863, 0x0970, 0x097C, 0x0988, 0x0863, + 0x099A, 0x09A7, 0x09B4, 0x09C7, 0x09D3, 0x09E0, 0x09ED, 0x09C7, 0x09FA, 0x0A07, 0x0A14, 0x0863, + 0x0970, 0x097C, 0x0988, 0x0863, 0x099A, 0x09A7, 0x09B4, 0x0A21, 0x0A2E, 0x0A3C, 0x0A4A, 0x0A21, + 0x0A58, 0x0A66, 0x0A74, 0x0863, 0x0A82, 0x0A8E, 0x0A9A, 0x0863, 0x0AAC, 0x0AB9, 0x0AC6, 0x0AD9, + 0x0AE5, 0x0AF2, 0x0AFF, 0x0AD9, 0x0B0C, 0x0B19, 0x0B26, 0x0863, 0x0A82, 0x0A8E, 0x0A9A, 0x0863, + 0x0AAC, 0x0AB9, 0x0AC6, 0x0B33, 0x0B3E, 0x0B4C, 0x0B5A, 0x0B33, 0x0B68, 0x0B76, 0x0B84, 0x0863, + 0x0B92, 0x0B9E, 0x0BAA, 0x0863, 0x0BBC, 0x0BC9, 0x0BD6, 0x0AD9, 0x0BE9, 0x0BF6, 0x0C03, 0x0AD9, + 0x0C10, 0x0C1D, 0x0C2A, 0x0863, 0x0B92, 0x0B9E, 0x0BAA, 0x0863, 0x0BBC, 0x0BC9, 0x0BD6, 0x0B33, + 0x0C37, 0x0C45, 0x0C53, 0x0B33, 0x0C61, 0x0C6F, 0x0C7D, 0x06A3, 0x0758, 0x0802, 0x1000, 0x1200, + 0x1400, 0x8E00, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E80, 0x16C9, 0x0000, 0x16CB, + 0x0100, 0x1F7E, 0x1F3C, 0x8100, 0x26C9, 0x02A0, 0x0004, 0x029C, 0x0D24, 0x191E, 0x191C, 0x2ECE, + 0x2CCF, 0x16CD, 0x0280, 0x16C9, 0x0000, 0x16CB, 0x0280, 0x1C80, 0x0080, 0x0280, 0x00C1, 0x0E1B, + 0x0085, 0x0000, 0x0089, 0x007F, 0x0082, 0x0F00, 0x0083, 0x16B4, 0x1CE3, 0x8100, 0x26C9, 0x02A0, + 0x0004, 0x029C, 0x0D42, 0x8F00, 0x8A78, 0x8C68, 0xF100, 0x1A3F, 0x84E3, 0x107E, 0xF2E3, 0xF2E7, + 0xF278, 0x6E68, 0xF132, 0x1A3F, 0x119E, 0x0D5E, 0x1C67, 0x84E3, 0x107E, 0xF2E3, 0xF2E7, 0xF278, + 0x6E68, 0xF132, 0x1A3F, 0x1C67, 0x84E3, 0x107E, 0xF2E3, 0xF2E7, 0xF200, 0x6E00, 0x1B5E, 0x00E1, + 0x0E1B, 0x0080, 0x0280, 0x0083, 0x0F00, 0x0081, 0x0000, 0x0082, 0x0140, 0x0089, 0xFFFF, 0x8900, + 0x8100, 0x8F00, 0x11A0, 0x0D7E, 0x197F, 0x9930, 0x1B1E, 0x1B3F, 0x7D29, 0x1B5F, 0x1B5D, 0x8E00, + 0x1FDB, 0x1F99, 0x2ECE, 0x2CCF, 0x16CD, 0x0E80, 0x16C9, 0x0001, 0x16CB, 0x0100, 0x02BF, 0x0657, + 0x1C04, 0x029F, 0x0068, 0x8E00, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x07C0, 0x16C9, + 0x0001, 0x16CB, 0x0500, 0x02BF, 0x0657, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x07C0, + 0x16C9, 0x0000, 0x8900, 0x0D20, 0x2DCB, 0x4C00, 0x1C80, 0x0080, 0x07C0, 0x0083, 0x0000, 0x1C43, + 0x0A00, 0x27C9, 0x03A0, 0x0004, 0x029C, 0x0DB1, 0x2ECE, 0x2CCF, 0x16CD, 0x07D0, 0x16C9, 0x0000, + 0x16CB, 0x04E0, 0x8F00, 0x80F0, 0x80C0, 0x6A00, 0x4800, 0x114F, 0x0DCC, 0x80F0, 0x80C0, 0x6B32, + 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, 0x80F0, + 0x80C0, 0x6800, 0x7C00, 0x4A00, 0x114F, 0x0DE3, 0x80F0, 0x80C0, 0x6932, 0x7D00, 0x4B22, 0x80F0, + 0x80C0, 0x683A, 0x7C00, 0x4A2A, 0x80F0, 0x80C0, 0x6932, 0x7D00, 0x4B22, 0x1B5F, 0x1B5D, 0x1C04, + 0x029F, 0x0068, 0x8F00, 0x80F1, 0x80C1, 0x6A00, 0x4800, 0x114F, 0x0DFC, 0x80F1, 0x80C1, 0x6B32, + 0x4922, 0x80F1, 0x80C1, 0x6A3A, 0x482A, 0x80F1, 0x80C1, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, 0x8E00, + 0x02DF, 0x8E00, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0400, 0x16C9, 0x0001, 0x16CB, + 0x0780, 0x02BF, 0x0657, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0A40, 0x16C9, 0x0001, + 0x16CB, 0x0280, 0x02BF, 0x0657, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E48, 0x16C9, + 0x0000, 0x16CB, 0x0280, 0x0081, 0x0E48, 0x0082, 0x0000, 0x0083, 0x0000, 0x02BF, 0x0657, 0x02BF, + 0x0DEE, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E48, 0x16C9, 0x0000, 0x16CB, 0x0280, + 0x0081, 0x0E48, 0x0082, 0x0140, 0x0083, 0x0140, 0x02BF, 0x0657, 0x02BF, 0x0DEE, 0x8100, 0x8970, + 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E48, 0x16C9, 0x0000, 0x16CB, 0x0280, 0x0081, 0x0E48, 0x0082, + 0x07C0, 0x0083, 0x07C0, 0x02BF, 0x0657, 0x02BF, 0x0DEE, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, + 0x16CD, 0x0E48, 0x16C9, 0x0000, 0x16CB, 0x0280, 0x0081, 0x0E48, 0x0082, 0x0900, 0x0083, 0x0900, + 0x02BF, 0x0657, 0x02BF, 0x0DEE, 0x029F, 0x0068, 0x8E00, 0x16FC, 0xECC0, 0x1FCC, 0x1D9E, 0x2EFD, + 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0E7C, 0x0000, 0x0000, 0x0000, 0x02FF, 0x8E00, 0x00F0, 0x0E17, + 0x00FE, 0x0E18, 0x00FC, 0x0E19, 0x1FCC, 0x1D9E, 0x16FC, 0xFEED, 0x2EFD, 0x26FC, 0x02A0, 0x8000, + 0x029C, 0x0E91, 0x00D0, 0x0E17, 0x00DE, 0x0E18, 0x00DC, 0x0E19, 0x0000, 0x0000, 0x0000, 0x0000, + 0x02FF, 0x8E00, 0x1DBC, 0x1DBE, 0x8100, 0x00DE, 0x0BB7, 0x0601, 0x0295, 0x0EAD, 0x0E00, 0x00FE, + 0x0B87, 0x1FCD, 0x1F8D, 0x02FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x8E00, 0x1DBC, + 0x1DBE, 0x8100, 0x00DE, 0x0BB7, 0x0601, 0x0295, 0x0EC5, 0x0E00, 0x00FE, 0x0B87, 0x1FCD, 0x1F8D, + 0x02FF, 0x8100, 0x00DE, 0x0B88, 0x0601, 0x0295, 0x0ED7, 0x00DE, 0x0BDA, 0x2EDA, 0x00DE, 0x0BDB, + 0x2EDB, 0x00DE, 0x0BDC, 0x2EDC, 0x1FCD, 0x1F8D, 0x02FF, 0x00DE, 0x0BDA, 0x2EDA, 0x26DB, 0x2EDB, + 0x26DC, 0x2EDC, 0x8100, 0x00DC, 0x0BE1, 0x7600, 0x00FC, 0x0BE1, 0x8100, 0x1FCD, 0x1F8D, 0x02FF, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x0F05, + 0x0F08, 0x0F40, 0x0F43, 0x8E00, 0x8100, 0x8900, 0x02BF, 0x0F46, 0x27FF, 0x009E, 0x0EF3, 0x4C00, + 0x1C7E, 0x0313, 0x1C7F, 0x176F, 0x0021, 0x029F, 0x0030, 0x0021, 0x8100, 0x8900, 0x02BF, 0x0F46, + 0x24FF, 0x02BF, 0x0F4C, 0x25FF, 0x02BF, 0x0F4C, 0x27FF, 0x2ECE, 0x2CCF, 0x16C9, 0x0001, 0x2FCD, + 0x2DCB, 0x8100, 0x8900, 0x02BF, 0x0F46, 0x24FF, 0x1C9E, 0x1CBC, 0x02BF, 0x0F4C, 0x25FF, 0x02BF, + 0x0F4C, 0x27FF, 0x1CDF, 0x1CFD, 0x8100, 0x02BF, 0x0F46, 0x26FF, 0x1C1E, 0x8900, 0x02BF, 0x0F4C, + 0x20FF, 0x1F5F, 0x02BF, 0x0F46, 0x21FF, 0x02BF, 0x0F46, 0x23FF, 0x26C9, 0x02A0, 0x0004, 0x029C, + 0x0F38, 0x029F, 0x80B5, 0x0021, 0x029F, 0x8000, 0x0021, 0x029F, 0x0045, 0x0021, 0x26FE, 0x02C0, + 0x8000, 0x029C, 0x0F46, 0x02DF, 0x27FE, 0x03C0, 0x8000, 0x029C, 0x0F4C, 0x02DF, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -u16 axDspSlave[AX_DSP_SLAVE_LENGTH] ATTRIBUTE_ALIGN(32) = { - 0x0000, 0x0000, 0x029F, 0x0BDB, 0x029F, 0x0BEA, 0x029F, 0x0C06, 0x029F, 0x0C15, 0x029F, 0x0C1B, 0x029F, 0x0C47, 0x029F, 0x0C4D, - 0x1302, 0x1303, 0x1204, 0x1305, 0x1306, 0x8E00, 0x8C00, 0x8B00, 0x0092, 0x00FF, 0x8100, 0x8900, 0x009E, 0x0E80, 0x00FE, 0x0E1B, - 0x8100, 0x00FE, 0x0E31, 0x16FC, 0xDCD1, 0x16FD, 0x0000, 0x16FB, 0x0001, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0029, 0x029F, 0x0045, - 0x1302, 0x1303, 0x1204, 0x1305, 0x1306, 0x8E00, 0x8C00, 0x8B00, 0x0092, 0x00FF, 0x16FC, 0xDCD1, 0x16FD, 0x0001, 0x16FB, 0x0001, - 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0040, 0x8E00, 0x8100, 0x8900, 0x009F, 0xBABE, 0x26FE, 0x02C0, 0x8000, 0x029C, 0x004A, 0x8200, - 0x0294, 0x004A, 0x23FF, 0x8100, 0x26FE, 0x02C0, 0x8000, 0x029C, 0x0054, 0x27FF, 0x0240, 0x7FFF, 0x2ECE, 0x2FCF, 0x16CD, 0x0C00, - 0x8100, 0x2EC9, 0x1FFB, 0x2FCB, 0x02BF, 0x055C, 0x0080, 0x0C00, 0x8E00, 0x8100, 0x8970, 0xB100, 0x0291, 0x007E, 0x0A11, 0xC100, - 0x0292, 0x007E, 0x009F, 0x0ACB, 0x4C00, 0x1C7E, 0x0213, 0x1C7E, 0x176F, 0x16FC, 0xFBAD, 0x16FD, 0x8080, 0x0021, 0x16FC, 0xBAAD, - 0x2EFD, 0x0021, 0x8100, 0x8970, 0x8E78, 0x2ECE, 0x2FCF, 0x009E, 0x0E44, 0x2ECD, 0x0E00, 0x2EC9, 0x009E, 0x0040, 0x2ECB, 0x0081, - 0x0E44, 0x0082, 0x0000, 0x009B, 0x009F, 0x009A, 0x0140, 0x8100, 0x8900, 0x8F00, 0x02BF, 0x055C, 0x193E, 0x193C, 0xB100, 0x193F, - 0x0294, 0x00A6, 0x005A, 0x1B5E, 0x029F, 0x00AE, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x00AD, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, - 0xB100, 0x193F, 0x0294, 0x00B8, 0x005A, 0x1B5E, 0x029F, 0x00C0, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x00BF, 0x4C00, 0x1B5E, 0x1B5C, - 0x193E, 0x193C, 0xB100, 0x193F, 0x0294, 0x00CA, 0x005A, 0x1B5E, 0x029F, 0x00D2, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x00D1, 0x4C00, - 0x1B5E, 0x1B5C, 0x0082, 0x0400, 0x193E, 0x193C, 0xB179, 0x0294, 0x00DD, 0x005A, 0x1B5E, 0x029F, 0x00E5, 0x9900, 0x1B5E, 0x1B5C, - 0x007B, 0x00E4, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x00EE, 0x005A, 0x1B5E, 0x029F, 0x00F6, 0x9900, 0x1B5E, - 0x1B5C, 0x007B, 0x00F5, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x00FF, 0x005A, 0x1B5E, 0x029F, 0x0107, 0x9900, - 0x1B5E, 0x1B5C, 0x007B, 0x0106, 0x4C00, 0x1B5E, 0x1B5C, 0x0082, 0x07C0, 0x193E, 0x193C, 0xB179, 0x0294, 0x0112, 0x005A, 0x1B5E, - 0x029F, 0x011A, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x0119, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x0123, 0x005A, - 0x1B5E, 0x029F, 0x012B, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x012A, 0x4C00, 0x1B5E, 0x1B5C, 0x193E, 0x193C, 0xB179, 0x0294, 0x0134, - 0x005A, 0x1B5E, 0x029F, 0x013C, 0x9900, 0x1B5E, 0x1B5C, 0x007B, 0x013B, 0x4C00, 0x1B5E, 0x1B5C, 0x029F, 0x0068, 0x0085, 0xFFFF, - 0x8150, 0x8940, 0x8E48, 0x00FA, 0x0E17, 0x00F8, 0x0E18, 0x0081, 0x0000, 0x02BF, 0x04F1, 0x00DA, 0x0E17, 0x00D8, 0x0E18, 0x8948, - 0x0081, 0x0400, 0x02BF, 0x04F1, 0x00DA, 0x0E17, 0x00D8, 0x0E18, 0x8948, 0x0081, 0x07C0, 0x02BF, 0x04F1, 0x029F, 0x0068, 0x0086, - 0x07C0, 0x02BF, 0x0484, 0x029F, 0x0068, 0x8100, 0x8E00, 0x191E, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0000, 0x16C9, 0x0001, 0x16CB, - 0x0780, 0x02BF, 0x055C, 0x029F, 0x0068, 0x8100, 0x8970, 0x8E60, 0x2ECE, 0x2CCF, 0x16CD, 0x0E44, 0x16C9, 0x0000, 0x8900, 0x0D20, - 0x2DCB, 0x4C00, 0x1C80, 0x0080, 0x0280, 0x0081, 0x0000, 0x0082, 0x0140, 0x0083, 0x0E44, 0x0A00, 0x27C9, 0x03A0, 0x0004, 0x029C, - 0x018C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E54, 0x16C9, 0x0000, 0x16CB, 0x0260, 0x009F, 0x00A0, 0x8F00, 0x007F, 0x01A6, 0x197E, 0x1B1A, - 0x197C, 0x1B1A, 0x1B5E, 0x1B5C, 0x7C00, 0x1B3E, 0x1B3C, 0x1C04, 0x029F, 0x0068, 0x8E70, 0x8960, 0x191F, 0x2ECE, 0x2CCF, 0x16CD, - 0x0C00, 0x16C9, 0x0000, 0x0503, 0x0340, 0xFFF0, 0x2FCB, 0x02BF, 0x055C, 0x0080, 0x0C00, 0x029F, 0x0068, 0x8100, 0x8970, 0x8E78, - 0x2ECE, 0x2FCF, 0x16CD, 0x0B80, 0x16C9, 0x0000, 0x16CB, 0x00C0, 0x0082, 0x0E08, 0x009F, 0x0000, 0x1B5F, 0x009F, 0x0140, 0x1B5F, - 0x009F, 0x0280, 0x1B5F, 0x009F, 0x0400, 0x1B5F, 0x009F, 0x0540, 0x1B5F, 0x009F, 0x0680, 0x1B5F, 0x009F, 0x07C0, 0x1B5F, 0x009F, - 0x0900, 0x1B5F, 0x009F, 0x0A40, 0x1B5F, 0x02BF, 0x055C, 0x00DE, 0x0BA7, 0x00DF, 0x0BA8, 0x2ECE, 0x2FCF, 0x16CD, 0x03C0, 0x16C9, - 0x0000, 0x16CB, 0x0080, 0x8100, 0x8900, 0x00DE, 0x0B84, 0x009F, 0x0AFC, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E15, 0x00DE, 0x0B85, - 0x009F, 0x0AFF, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E16, 0x00DE, 0x0B86, 0x009F, 0x0ADC, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E14, - 0x8100, 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x023B, 0x8900, 0x00DF, 0x0B9E, 0x0300, 0x0CC0, 0x00FF, 0x0E40, 0x00DF, 0x0B9F, 0x0300, - 0x0CC0, 0x00FF, 0x0E41, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E43, 0x02BF, 0x055C, 0x00DE, 0x0B9C, 0x2ECE, 0x00DE, 0x0B9D, - 0x2ECF, 0x16CD, 0x0CC0, 0x16C9, 0x0000, 0x16CB, 0x0040, 0x02BF, 0x055C, 0x029F, 0x0068, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, - 0x0E40, 0x00FF, 0x0E41, 0x00FF, 0x0E43, 0x02BF, 0x055C, 0x029F, 0x0068, 0x8E00, 0x00E0, 0x0E07, 0x0080, 0x0BA2, 0x0081, 0x03C0, - 0x0E05, 0x00FE, 0x0E04, 0x8900, 0x8150, 0x009F, 0x0B80, 0x007A, 0x025C, 0x193E, 0x4C49, 0x1C5E, 0x1A59, 0x0083, 0x0E05, 0x1B61, - 0x1B60, 0x00DE, 0x0B87, 0x0601, 0x0295, 0x0268, 0x029F, 0x0332, 0x00DE, 0x0E42, 0x00FE, 0x0E1C, 0x00C3, 0x0E15, 0x177F, 0x8F00, - 0x8A00, 0x8100, 0x8900, 0x00DE, 0x0BB3, 0x00DF, 0x0BB2, 0x1F1F, 0x4D00, 0x1481, 0x8D1E, 0x1FD8, 0x0098, 0x8000, 0x0080, 0x0E44, - 0xA830, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, - 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, 0xAD30, 0xAC38, - 0x00FE, 0x0BB2, 0x0080, 0x0E44, 0x00C1, 0x0E43, 0x1C61, 0x193A, 0x1918, 0x9059, 0x1919, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, - 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, - 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, - 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E51, - 0x8080, 0x9759, 0x8091, 0x9E51, 0x8080, 0x9759, 0x8091, 0x9E00, 0x6F33, 0x1B7F, 0x00C3, 0x0E14, 0x8F00, 0x8D00, 0x8A00, 0x177F, - 0x8100, 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x032A, 0x00DE, 0x0E42, 0x00FE, 0x0E43, 0x8100, 0x8900, 0x00DE, 0x0B9E, 0x00DF, 0x0BA0, - 0x8200, 0x0293, 0x0306, 0x7800, 0x029F, 0x0309, 0x0295, 0x0309, 0x7400, 0x00FE, 0x0B9E, 0x00DF, 0x0E43, 0x05E0, 0x4C00, 0x00FE, - 0x0E40, 0x8100, 0x8900, 0x00DE, 0x0B9F, 0x00DF, 0x0BA1, 0x8200, 0x0293, 0x031D, 0x7800, 0x029F, 0x0320, 0x0295, 0x0320, 0x7400, - 0x00FE, 0x0B9F, 0x00DF, 0x0E43, 0x05E0, 0x4C00, 0x00FE, 0x0E41, 0x029F, 0x0332, 0x00DE, 0x0E42, 0x00FE, 0x0E40, 0x00FE, 0x0E41, - 0x00FE, 0x0E43, 0x8100, 0x8E00, 0x8400, 0x8900, 0x1EFE, 0x0E40, 0x1EBE, 0x0083, 0x0E08, 0x1C03, 0x1FF5, 0x191A, 0xF858, 0xFBA0, - 0xF8B1, 0xFBA0, 0xF8B1, 0xFBA0, 0xF8B1, 0xFBA0, 0xF83B, 0x1B7E, 0x0083, 0x0E04, 0x8100, 0x8973, 0x1961, 0x1960, 0x7800, 0x00FE, - 0x0E04, 0x0294, 0x0254, 0x8E00, 0x8100, 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x036A, 0x00DE, 0x0B9C, 0x00DC, 0x0B9D, 0x2ECE, 0x2CCF, - 0x8100, 0x00DE, 0x0E1C, 0x2ECD, 0x16C9, 0x0001, 0x16CB, 0x0040, 0x02BF, 0x055C, 0x8100, 0x8900, 0x00DE, 0x0B82, 0x00DF, 0x0B83, - 0x2ECE, 0x2FCF, 0x16CD, 0x0B80, 0x16C9, 0x0001, 0x16CB, 0x00C0, 0x02BF, 0x055C, 0x8100, 0x00DE, 0x0B80, 0x00DC, 0x0B81, 0xB100, - 0x0294, 0x0386, 0x00C0, 0x0E07, 0x029F, 0x0068, 0x2ECE, 0x2CCF, 0x16CD, 0x0B80, 0x16C9, 0x0000, 0x16CB, 0x00C0, 0x0082, 0x0E08, - 0x009F, 0x0000, 0x1B5F, 0x009F, 0x0140, 0x1B5F, 0x009F, 0x0280, 0x1B5F, 0x009F, 0x0400, 0x1B5F, 0x009F, 0x0540, 0x1B5F, 0x009F, - 0x0680, 0x1B5F, 0x009F, 0x07C0, 0x1B5F, 0x009F, 0x0900, 0x1B5F, 0x009F, 0x0A40, 0x1B5F, 0x02BF, 0x055C, 0x00DE, 0x0BA7, 0x00DF, - 0x0BA8, 0x2ECE, 0x2FCF, 0x16CD, 0x03C0, 0x16C9, 0x0000, 0x16CB, 0x0080, 0x8100, 0x8900, 0x00DE, 0x0B84, 0x009F, 0x0AFC, 0x4C00, - 0x1C7E, 0x0213, 0x00FE, 0x0E15, 0x00DE, 0x0B85, 0x009F, 0x0AFF, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E16, 0x00DE, 0x0B86, 0x009F, - 0x0ADC, 0x4C00, 0x1C7E, 0x0213, 0x00FE, 0x0E14, 0x8100, 0x00DE, 0x0B9B, 0xB100, 0x0295, 0x0403, 0x8900, 0x00DF, 0x0B9E, 0x0300, - 0x0CC0, 0x00FF, 0x0E40, 0x00DF, 0x0B9F, 0x0300, 0x0CC0, 0x00FF, 0x0E41, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E43, 0x02BF, - 0x055C, 0x00DE, 0x0B9C, 0x2ECE, 0x00DE, 0x0B9D, 0x2ECF, 0x16CD, 0x0CC0, 0x16C9, 0x0000, 0x16CB, 0x0040, 0x02BF, 0x055C, 0x00C0, - 0x0E07, 0x029F, 0x0249, 0x009F, 0x0CE0, 0x00FF, 0x0E42, 0x00FF, 0x0E40, 0x00FF, 0x0E41, 0x00FF, 0x0E43, 0x02BF, 0x055C, 0x00C0, - 0x0E07, 0x029F, 0x0249, 0x8E00, 0x0086, 0x0400, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x1FC6, 0x2ECD, 0x16C9, 0x0001, 0x16CB, - 0x0780, 0x02BF, 0x055C, 0x02BF, 0x0484, 0x029F, 0x0068, 0x8E00, 0x0086, 0x07C0, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x1FC6, - 0x2ECD, 0x16C9, 0x0001, 0x16CB, 0x0780, 0x02BF, 0x055C, 0x02BF, 0x0484, 0x029F, 0x0068, 0x8C00, 0x8A00, 0x8100, 0x8970, 0x191F, - 0x2ECE, 0x2FCF, 0x16CD, 0x0280, 0x16C9, 0x0001, 0x16CB, 0x0280, 0x8F50, 0x8140, 0x0081, 0x0400, 0x0083, 0x0000, 0x0082, 0x0140, - 0x0099, 0x0080, 0x02BF, 0x055C, 0x1105, 0x046C, 0x1F61, 0x1120, 0x045E, 0x8972, 0x195C, 0xF07B, 0x197D, 0xF131, 0x8139, 0x8900, - 0x6800, 0x2ECE, 0x2CCF, 0x1FFB, 0x2FCD, 0x0F01, 0x2FC9, 0x1FF9, 0x2FCB, 0x7200, 0x1F5E, 0x1F1C, 0x8100, 0x26C9, 0x02A0, 0x0004, - 0x029C, 0x046D, 0x029F, 0x0068, 0x029F, 0x0068, 0x029F, 0x0068, 0x029F, 0x0068, 0x16FC, 0xDCD1, 0x16FD, 0x0002, 0x16FB, 0x0001, - 0x029F, 0x0C56, 0x029F, 0x0045, 0x8E00, 0x191F, 0x191D, 0x1F5F, 0x1F1D, 0x2FCE, 0x2DCF, 0x8900, 0x1FA6, 0x2DCD, 0x0E00, 0x2EC9, - 0x8100, 0x009C, 0x00C0, 0x2CCB, 0x1CA0, 0x0081, 0x0E44, 0x4800, 0x1B3E, 0x1B3C, 0x0B00, 0x0099, 0x0060, 0x4B00, 0x1B3D, 0x0081, - 0x0E44, 0x1C06, 0x0083, 0x0000, 0x1C43, 0x27C9, 0x03A0, 0x0004, 0x029C, 0x04A5, 0x1109, 0x04DA, 0x8E00, 0x193A, 0x1938, 0x6900, - 0x2FCE, 0x2DCF, 0x8900, 0x193D, 0x2DCD, 0x16C9, 0x0000, 0x8100, 0x009C, 0x00C0, 0x2CCB, 0x0081, 0x0E44, 0x4800, 0x1B3E, 0x1B3C, - 0x0B00, 0x0960, 0x4B00, 0x1B3D, 0x0081, 0x0E44, 0x8F00, 0x80F0, 0x80C0, 0x6A00, 0x4800, 0x1117, 0x04D4, 0x80F0, 0x80C0, 0x6B32, - 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, 0x80F0, 0x80C0, 0x6A00, 0x4800, 0x1117, - 0x04E8, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, 0x1C05, - 0x02DF, 0x8E00, 0x009B, 0x0E44, 0x009D, 0x00C0, 0x02BF, 0x0541, 0x4900, 0x00FF, 0x0E1D, 0x00FD, 0x0E1E, 0x8900, 0x02BF, 0x055C, - 0x1104, 0x052C, 0x00DA, 0x0E1D, 0x00D8, 0x0E1E, 0x009B, 0x0EA4, 0x009D, 0x00C0, 0x02BF, 0x0541, 0x4900, 0x00FF, 0x0E1D, 0x00FD, - 0x0E1E, 0x0083, 0x0E44, 0x02BF, 0x054C, 0x8900, 0x00DA, 0x0E1D, 0x00D8, 0x0E1E, 0x009B, 0x0E44, 0x009D, 0x00C0, 0x02BF, 0x0541, - 0x4900, 0x00FF, 0x0E1D, 0x00FD, 0x0E1E, 0x0083, 0x0EA4, 0x02BF, 0x054C, 0x0000, 0x0000, 0x8E00, 0x8900, 0x00DA, 0x0E1D, 0x00D8, - 0x0E1E, 0x009B, 0x0EA4, 0x009D, 0x00C0, 0x02BF, 0x0541, 0x4900, 0x0083, 0x0E44, 0x02BF, 0x054C, 0x0083, 0x0EA4, 0x02BF, 0x054C, - 0x02DF, 0x8E00, 0x00FA, 0xFFCE, 0x00F8, 0xFFCF, 0x00FB, 0xFFCD, 0x16C9, 0x0000, 0x2DCB, 0x02DF, 0x8F00, 0x8D00, 0x8A00, 0x197A, - 0x1978, 0xA000, 0xB600, 0x1130, 0x055A, 0x9179, 0x4E6D, 0x197A, 0x4D43, 0xA039, 0xB629, 0x02DF, 0x26C9, 0x02A0, 0x0004, 0x029C, - 0x055C, 0x02DF, 0x26FE, 0x02C0, 0x8000, 0x029C, 0x0562, 0x02DF, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0568, 0x02DF, 0x26FC, 0x02A0, - 0x8000, 0x029C, 0x056E, 0x02DF, 0x0082, 0x0BB8, 0x195E, 0x2ED1, 0x195E, 0x2ED4, 0x195E, 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, - 0x195E, 0x2ED8, 0x195E, 0x2ED9, 0x195E, 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, 0x2EA3, 0x195E, 0x2EA4, 0x195E, 0x2EA5, - 0x195E, 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, 0x195E, 0x2EAB, 0x195E, 0x2EAC, 0x195E, 0x2EAD, - 0x195E, 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, 0x195E, 0x2EDA, 0x195E, 0x2EDB, 0x195E, 0x2EDC, 0x8C00, 0x8A00, 0x8E00, 0x00D8, - 0x0E16, 0x195B, 0x1959, 0x8100, 0x195C, 0x0080, 0x0E44, 0x195F, 0x1B1F, 0x195F, 0x1B1F, 0x195F, 0x1B1F, 0x185F, 0x1B1F, 0x6B00, - 0x1505, 0x4D00, 0x157E, 0x1C9F, 0x1CBD, 0x05E0, 0x9900, 0x7D00, 0x1CDD, 0x8900, 0x1FA5, 0x1502, 0x1CBF, 0x009A, 0x01FC, 0x009E, - 0x0E44, 0x0081, 0xFFDD, 0x0083, 0x0D80, 0x0064, 0x05E6, 0x1827, 0x1B07, 0x4A00, 0x1FFC, 0x1827, 0x1B07, 0x1579, 0x3500, 0x1827, - 0x1B07, 0x4100, 0x1B7E, 0x1827, 0x1B07, 0x1B7F, 0x0000, 0x0065, 0x05EC, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0007, 0x187F, 0x0066, - 0x05F5, 0x4A3B, 0x1FFC, 0x1579, 0x3533, 0x4100, 0x1B7F, 0x0004, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, - 0x1ADC, 0x0082, 0x0BD2, 0x27DC, 0x1ADF, 0x27DB, 0x1ADF, 0x27DA, 0x1ADF, 0x0082, 0x0BBE, 0x27D9, 0x1ADF, 0x27D8, 0x1ADF, 0x8F00, - 0x00C1, 0x0E42, 0x0082, 0x0D80, 0x1940, 0x1943, 0x80F0, 0xB8C0, 0x111F, 0x0620, 0xA6F0, 0xBCF0, 0x1940, 0x1943, 0xBCF0, 0x4EC0, - 0xB831, 0xA6F0, 0xBCF0, 0xBC00, 0x4E00, 0x1B3E, 0x00E1, 0x0E42, 0x02DF, 0x0082, 0x0BB8, 0x195E, 0x2ED1, 0x195E, 0x2ED4, 0x195E, - 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, 0x195E, 0x2ED8, 0x195E, 0x2ED9, 0x195E, 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, - 0x2EA3, 0x195E, 0x2EA4, 0x195E, 0x2EA5, 0x195E, 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, 0x195E, - 0x2EAB, 0x195E, 0x2EAC, 0x195E, 0x2EAD, 0x195E, 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, 0x195E, 0x2EDA, 0x195E, 0x2EDB, 0x195E, - 0x2EDC, 0x8C00, 0x8A00, 0x8E00, 0x195B, 0x1959, 0x8100, 0x195C, 0x0080, 0x0E44, 0x195F, 0x195F, 0x195F, 0x1B1F, 0x185F, 0x1B1F, - 0x6B00, 0x1505, 0x4D00, 0x157E, 0x1C9F, 0x1CBD, 0x05E0, 0x9900, 0x7D00, 0x1CDD, 0x8900, 0x1FA5, 0x1502, 0x1CBF, 0x009A, 0x01FC, - 0x009E, 0x0E45, 0x0081, 0xFFDD, 0x0083, 0x0D80, 0x0064, 0x0697, 0x1827, 0x1B07, 0x4A00, 0x1B7E, 0x1827, 0x1B07, 0x1B7C, 0x0000, - 0x1827, 0x1B07, 0x0000, 0x0000, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0065, 0x069D, 0x1827, 0x1B07, 0x0000, 0x0000, 0x0066, 0x06A2, - 0x4A00, 0x1B7E, 0x1B7C, 0x0004, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x1ADC, 0x0082, 0x0BD2, 0x27DC, - 0x1ADF, 0x27DB, 0x1ADF, 0x27DA, 0x1ADF, 0x0082, 0x0BBE, 0x27D9, 0x1ADF, 0x27D8, 0x1ADF, 0x8D00, 0x8B00, 0x8F00, 0x00C1, 0x0E42, - 0x0082, 0x0D80, 0x8100, 0x1120, 0x06CF, 0x8900, 0x1940, 0x189E, 0x181B, 0x199A, 0x5400, 0x1F5E, 0x1959, 0xB000, 0xFB00, 0x8139, - 0x00E1, 0x0E42, 0x02DF, 0x0082, 0x0BB8, 0x195E, 0x2ED1, 0x195E, 0x2ED4, 0x195E, 0x2ED5, 0x195E, 0x2ED6, 0x195E, 0x2ED7, 0x195E, - 0x2ED8, 0x195E, 0x2ED9, 0x195E, 0x2EA0, 0x195E, 0x2EA1, 0x195E, 0x2EA2, 0x195E, 0x2EA3, 0x195E, 0x2EA4, 0x195E, 0x2EA5, 0x195E, - 0x2EA6, 0x195E, 0x2EA7, 0x195E, 0x2EA8, 0x195E, 0x2EA9, 0x195E, 0x2EAA, 0x195E, 0x2EAB, 0x195E, 0x2EAC, 0x195E, 0x2EAD, 0x195E, - 0x2EAE, 0x195E, 0x2EAF, 0x195E, 0x2EDE, 0x195E, 0x2EDA, 0x195E, 0x2EDB, 0x195E, 0x2EDC, 0x00C0, 0x0E42, 0x0081, 0xFFDD, 0x1120, - 0x0714, 0x1824, 0x1B04, 0x0000, 0x0000, 0x00E0, 0x0E42, 0x0082, 0x0BD9, 0x0004, 0x189F, 0x1ADF, 0x189F, 0x1ADF, 0x189F, 0x1ADF, - 0x189F, 0x1ADF, 0x8900, 0x1ADC, 0x27DC, 0x00FF, 0x0BD2, 0x27DB, 0x00FF, 0x0BD1, 0x27DA, 0x00FF, 0x0BD0, 0x27D9, 0x00FF, 0x0BBE, - 0x27D8, 0x00FF, 0x0BBD, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, - 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, - 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, 0x0E41, - 0x00C5, 0x0E0C, 0x02BF, 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, - 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, - 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, - 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, - 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E40, - 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, - 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, - 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x1C62, 0x02BF, 0x81F9, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, - 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, - 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, - 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x1C62, 0x1C80, 0x00C5, 0x0E0D, 0x02BF, 0x80E7, 0x00F8, 0x0BAF, 0x00FB, 0x0BB0, 0x02DF, - 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, - 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x80E7, 0x00F8, 0x0BAB, - 0x00FB, 0x0BAE, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x1C80, 0x00C5, 0x0E0A, 0x02BF, 0x80E7, 0x00F8, 0x0BB1, - 0x00FB, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x80E7, - 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, - 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, - 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x1C62, 0x1C80, 0x00C5, 0x0E0D, - 0x02BF, 0x80E7, 0x00F8, 0x0BAF, 0x00FB, 0x0BB0, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x1C62, 0x02BF, 0x81F9, 0x00F8, - 0x0BB1, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, - 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, - 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E44, 0x00C4, - 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x8282, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, - 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B91, - 0x00C2, 0x0E0E, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, - 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, - 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x8282, 0x00F8, - 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, - 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, - 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x0083, 0x0E44, - 0x02BF, 0x845D, 0x00F8, 0x0BAF, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, - 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E44, 0x00C4, - 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x8282, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x0083, - 0x0E44, 0x1C80, 0x00C5, 0x0E0D, 0x02BF, 0x8282, 0x00F8, 0x0BAF, 0x00FB, 0x0BB0, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, - 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, - 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x00C0, - 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E44, 0x1C80, 0x00C5, 0x0E0A, 0x02BF, 0x8282, 0x00F8, 0x0BB1, 0x00FB, 0x0BAF, - 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, - 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x0083, 0x0E44, 0x00C0, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, - 0x8282, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E40, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, - 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x00C0, 0x0E43, 0x0081, 0x0B97, 0x00C2, 0x0E0A, 0x0083, 0x0E44, 0x1C80, - 0x00C5, 0x0E0D, 0x02BF, 0x8282, 0x00F8, 0x0BAF, 0x00FB, 0x0BB0, 0x00C0, 0x0E43, 0x0081, 0x0B95, 0x00C2, 0x0E10, 0x0083, 0x0E44, - 0x02BF, 0x845D, 0x00F8, 0x0BB1, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, 0x00C5, 0x0E09, - 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x1C80, 0x00C5, 0x0E0F, - 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x1C62, 0x00C4, 0x0E41, - 0x00C5, 0x0E09, 0x02BF, 0x80E7, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x1C62, 0x1C80, - 0x00C5, 0x0E0F, 0x02BF, 0x80E7, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x00C0, 0x0E40, 0x0081, 0x0B8D, 0x00C2, 0x0E0B, 0x1C62, 0x00C4, - 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x80E7, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E43, 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x1C62, - 0x02BF, 0x81F9, 0x00F8, 0x0BB0, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, - 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, 0x0E0E, 0x0083, 0x0E44, 0x1C80, - 0x00C5, 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x02DF, 0x00C0, 0x0E40, 0x0081, 0x0B89, 0x00C2, 0x0E08, 0x0083, - 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E09, 0x02BF, 0x8282, 0x00F8, 0x0BA9, 0x00FB, 0x0BAC, 0x00C0, 0x0E43, 0x0081, 0x0B91, 0x00C2, - 0x0E0E, 0x0083, 0x0E44, 0x1C80, 0x00C5, 0x0E0F, 0x02BF, 0x8282, 0x00F8, 0x0BAB, 0x00FB, 0x0BAE, 0x00C0, 0x0E40, 0x0081, 0x0B8D, - 0x00C2, 0x0E0B, 0x0083, 0x0E44, 0x00C4, 0x0E41, 0x00C5, 0x0E0C, 0x02BF, 0x8282, 0x00F8, 0x0BAA, 0x00FB, 0x0BAD, 0x00C0, 0x0E43, - 0x0081, 0x0B99, 0x00C2, 0x0E0D, 0x0083, 0x0E44, 0x02BF, 0x845D, 0x00F8, 0x0BB0, 0x02DF, 0x0082, 0x013E, 0x01BD, 0x0249, 0x0413, - 0x0427, 0x0165, 0x0175, 0x0B02, 0x015F, 0x0478, 0x0474, 0x0476, 0x01AA, 0x043B, 0x047A, 0x0B7C, 0x0734, 0x0746, 0x0769, 0x078C, - 0x07C0, 0x07DD, 0x0810, 0x0843, 0x0892, 0x08A5, 0x08CA, 0x08EF, 0x0926, 0x0945, 0x097B, 0x09B1, 0x0A05, 0x0A27, 0x0734, 0x0734, - 0x0734, 0x0734, 0x0734, 0x0734, 0x0A65, 0x0A89, 0x0734, 0x0734, 0x0734, 0x0734, 0x0734, 0x0734, 0x0574, 0x0629, 0x06D3, 0x1000, - 0x1200, 0x1400, 0x8E00, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0E80, 0x16C9, 0x0000, 0x16CB, 0x0100, 0x1F7E, 0x1F3C, - 0x8100, 0x26C9, 0x02A0, 0x0004, 0x029C, 0x0B11, 0x191E, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, 0x0280, 0x16C9, 0x0000, 0x16CB, 0x0280, - 0x1C80, 0x0080, 0x0280, 0x00C1, 0x0E1B, 0x0085, 0x0000, 0x0089, 0x007F, 0x0082, 0x0F00, 0x0083, 0x16B4, 0x1CE3, 0x8100, 0x26C9, - 0x02A0, 0x0004, 0x029C, 0x0B2F, 0x8F00, 0x8A78, 0x8C68, 0xF100, 0x1A3F, 0x84E3, 0x107E, 0xF2E3, 0xF2E7, 0xF278, 0x6E68, 0xF132, - 0x1A3F, 0x119E, 0x0B4B, 0x1C67, 0x84E3, 0x107E, 0xF2E3, 0xF2E7, 0xF278, 0x6E68, 0xF132, 0x1A3F, 0x1C67, 0x84E3, 0x107E, 0xF2E3, - 0xF2E7, 0xF200, 0x6E00, 0x1B5E, 0x00E1, 0x0E1B, 0x0080, 0x0280, 0x0083, 0x0F00, 0x0081, 0x0000, 0x0082, 0x0140, 0x0089, 0xFFFF, - 0x8900, 0x8100, 0x8F00, 0x11A0, 0x0B6B, 0x197F, 0x9930, 0x1B1E, 0x1B3F, 0x7D29, 0x1B5F, 0x1B5D, 0x8E00, 0x1FDB, 0x1F99, 0x2ECE, - 0x2CCF, 0x16CD, 0x0E80, 0x16C9, 0x0001, 0x16CB, 0x0100, 0x02BF, 0x055C, 0x1C04, 0x029F, 0x0068, 0x8E00, 0x8100, 0x8970, 0x191C, - 0x2ECE, 0x2CCF, 0x16CD, 0x07C0, 0x16C9, 0x0001, 0x16CB, 0x0500, 0x02BF, 0x055C, 0x8100, 0x8970, 0x191C, 0x2ECE, 0x2CCF, 0x16CD, - 0x07C0, 0x16C9, 0x0000, 0x8900, 0x0D20, 0x2DCB, 0x4C00, 0x1C80, 0x0080, 0x07C0, 0x0083, 0x0000, 0x1C43, 0x0A00, 0x27C9, 0x03A0, - 0x0004, 0x029C, 0x0B9E, 0x2ECE, 0x2CCF, 0x16CD, 0x07D0, 0x16C9, 0x0000, 0x16CB, 0x04E0, 0x8F00, 0x80F0, 0x80C0, 0x6A00, 0x4800, - 0x114F, 0x0BB9, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x80F0, 0x80C0, 0x6A3A, 0x482A, 0x80F0, 0x80C0, 0x6B32, 0x4922, 0x1B5F, 0x1B5D, - 0x80F0, 0x80C0, 0x6800, 0x7C00, 0x4A00, 0x114F, 0x0BD0, 0x80F0, 0x80C0, 0x6932, 0x7D00, 0x4B22, 0x80F0, 0x80C0, 0x683A, 0x7C00, - 0x4A2A, 0x80F0, 0x80C0, 0x6932, 0x7D00, 0x4B22, 0x1B5F, 0x1B5D, 0x1C04, 0x029F, 0x0068, 0x8E00, 0x16FC, 0xECC0, 0x1FCC, 0x1D9E, - 0x2EFD, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0BE1, 0x0000, 0x0000, 0x0000, 0x02FF, 0x8E00, 0x00F0, 0x0E17, 0x00FE, 0x0E18, 0x00FC, - 0x0E19, 0x1FCC, 0x1D9E, 0x16FC, 0xFEED, 0x2EFD, 0x26FC, 0x02A0, 0x8000, 0x029C, 0x0BF6, 0x00D0, 0x0E17, 0x00DE, 0x0E18, 0x00DC, - 0x0E19, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x8E00, 0x1DBC, 0x1DBE, 0x8100, 0x00DE, 0x0BB7, 0x0601, 0x0295, 0x0C12, 0x0E00, - 0x00FE, 0x0B87, 0x1FCD, 0x1F8D, 0x02FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x8E00, 0x1DBC, 0x1DBE, 0x8100, 0x00DE, - 0x0BB7, 0x0601, 0x0295, 0x0C2A, 0x0E00, 0x00FE, 0x0B87, 0x1FCD, 0x1F8D, 0x02FF, 0x8100, 0x00DE, 0x0B88, 0x0601, 0x0295, 0x0C3C, - 0x00DE, 0x0BDA, 0x2EDA, 0x00DE, 0x0BDB, 0x2EDB, 0x00DE, 0x0BDC, 0x2EDC, 0x1FCD, 0x1F8D, 0x02FF, 0x00DE, 0x0BDA, 0x2EDA, 0x26DB, - 0x2EDB, 0x26DC, 0x2EDC, 0x8100, 0x1FCD, 0x1F8D, 0x02FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x02FF, 0x0000, 0x0000, 0x0000, - 0x0000, 0x02FF, 0x0C64, 0x0C67, 0x0C9F, 0x0CA2, 0x8E00, 0x8100, 0x8900, 0x02BF, 0x0CA5, 0x27FF, 0x009E, 0x0C52, 0x4C00, 0x1C7E, - 0x0313, 0x1C7F, 0x176F, 0x0021, 0x029F, 0x0030, 0x0021, 0x8100, 0x8900, 0x02BF, 0x0CA5, 0x24FF, 0x02BF, 0x0CAB, 0x25FF, 0x02BF, - 0x0CAB, 0x27FF, 0x2ECE, 0x2CCF, 0x16C9, 0x0001, 0x2FCD, 0x2DCB, 0x8100, 0x8900, 0x02BF, 0x0CA5, 0x24FF, 0x1C9E, 0x1CBC, 0x02BF, - 0x0CAB, 0x25FF, 0x02BF, 0x0CAB, 0x27FF, 0x1CDF, 0x1CFD, 0x8100, 0x02BF, 0x0CA5, 0x26FF, 0x1C1E, 0x8900, 0x02BF, 0x0CAB, 0x20FF, - 0x1F5F, 0x02BF, 0x0CA5, 0x21FF, 0x02BF, 0x0CA5, 0x23FF, 0x26C9, 0x02A0, 0x0004, 0x029C, 0x0C97, 0x029F, 0x80B5, 0x0021, 0x029F, - 0x8000, 0x0021, 0x029F, 0x0045, 0x0021, 0x26FE, 0x02C0, 0x8000, 0x029C, 0x0CA5, 0x02DF, 0x27FE, 0x03C0, 0x8000, 0x029C, 0x0CAB, - 0x02DF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }; diff --git a/src/dolphin/src/ax/__ax.h b/src/dolphin/src/ax/__ax.h index 1fb0fb8d2..4e5bd8530 100644 --- a/src/dolphin/src/ax/__ax.h +++ b/src/dolphin/src/ax/__ax.h @@ -64,4 +64,6 @@ void __AXSetPBDefault(AXVPB* p); void __AXVPBInit(void); void __AXVPBQuit(void); +extern u16 __AXCompressorTable[3360]; + #endif // _DOLPHIN_AX_INTERNAL_H_ diff --git a/src/dolphin/src/card/CARDUnlock.c b/src/dolphin/src/card/CARDUnlock.c index 6fef38534..08e2c4a4d 100644 --- a/src/dolphin/src/card/CARDUnlock.c +++ b/src/dolphin/src/card/CARDUnlock.c @@ -44,28 +44,25 @@ inline int CARDRand(void) return (int)((unsigned int)(next / 65536) % 32768); } -// static u32 GetInitVal(void) -// { -// u32 tmp = 0; -// u32 tick; - -// tick = OSGetTick(); -// next = tmp; -// tmp = 0x7fec8000; -// tmp |= CARDRand(); -// tmp &= 0xfffff000; -// return tmp; -// } +inline void CARDSrand(uint seed) +{ + next = seed; +} inline u32 GetInitVal(void) { - // OSTick tick = OSGetTick(); - next = OSGetTick(); - // CARDRand(); - return (CARDRand() | 0x7FEC0000) & ~(4096 - 1); + u32 tmp; + u32 tick; + + tick = OSGetTick(); + CARDSrand(tick); + tmp = 0x7FEC8000; + tmp |= CARDRand(); + tmp &= 0xFFFFF000; + return tmp; } -static u32 exnor(u32 data, u32 lshift) +inline u32 exnor(u32 data, u32 lshift) { u32 wk; u32 w; @@ -165,7 +162,8 @@ static s32 DummyLen(void) wk = 1; max = 0; - next = OSGetTick(); + tick = OSGetTick(); + CARDSrand(tick); tmp = CARDRand(); tmp &= 0x0000001f; @@ -179,7 +177,7 @@ static s32 DummyLen(void) { wk = 1; } - next = tmp; + CARDSrand((u32)tmp); tmp = CARDRand(); tmp &= 0x0000001f; tmp += 1; @@ -198,13 +196,14 @@ s32 __CARDUnlock(s32 chan, u8 flashID[12]) u32 init_val; u32 data = 0; - s32 dummy; - s32 rlen; - u32 rshift; + s32 dummy = 1; + s32 rlen = 1; + u32 rshift = 1; - u8 fsts; - u32 wk, wk1; - u32 w; + u8 fsts = 0; + u32 wk = 1; + u32 wk1 = 1; + u32 w; // not this u32 i; u32 Ans1 = 0; u32 Ans2 = 0; diff --git a/src/dolphin/src/gx/GXFifo.c b/src/dolphin/src/gx/GXFifo.c index b3e7e4054..8a8d2e37e 100644 --- a/src/dolphin/src/gx/GXFifo.c +++ b/src/dolphin/src/gx/GXFifo.c @@ -5,6 +5,10 @@ #include +static __GXFifoObj* CPUFifo; +static __GXFifoObj* GPFifo; +void* __GXCurrentBP; + static OSThread* __GXCurrentThread; static GXBool CPGPLinked; static BOOL GXOverflowSuspendInProgress; @@ -15,10 +19,6 @@ static u32 __GXOverflowCount; static BOOL IsWGPipeRedirected; #endif -__GXFifoObj* CPUFifo; -__GXFifoObj* GPFifo; -void* __GXCurrentBP; - static void __GXFifoReadEnable(void); static void __GXFifoReadDisable(void); static void __GXFifoLink(u8 en); diff --git a/src/dolphin/src/gx/GXGeometry.c b/src/dolphin/src/gx/GXGeometry.c index a01e04a1f..b163f358b 100644 --- a/src/dolphin/src/gx/GXGeometry.c +++ b/src/dolphin/src/gx/GXGeometry.c @@ -68,7 +68,7 @@ void __GXSendFlushPrim(void) u32 numD = __GXData->vNum * __GXData->vLim; GX_WRITE_U8(0x98); - // GX_WRITE_U16(__GXData->vNum); + GX_WRITE_U16(__GXData->vNum); for (i = 0; i < numD; i += 4) { GX_WRITE_U32(0); @@ -85,14 +85,6 @@ void GXSetLineWidth(u8 width, GXTexOffset texOffsets) __GXData->bpSentNot = 0; } -void GXGetLineWidth(u8* width, GXTexOffset* texOffsets) -{ - ASSERTMSGLINE(463, width != NULL && texOffsets != NULL, "GXGet*: invalid null pointer"); - - *width = GET_REG_FIELD(__GXData->lpSize, 8, 0); - *texOffsets = GET_REG_FIELD(__GXData->lpSize, 3, 16); -} - void GXSetPointSize(u8 pointSize, GXTexOffset texOffsets) { CHECK_GXBEGIN(484, "GXSetPointSize"); @@ -102,14 +94,6 @@ void GXSetPointSize(u8 pointSize, GXTexOffset texOffsets) __GXData->bpSentNot = 0; } -void GXGetPointSize(u8* pointSize, GXTexOffset* texOffsets) -{ - ASSERTMSGLINE(507, pointSize != NULL && texOffsets != NULL, "GXGet*: invalid null pointer"); - - *pointSize = (int)GET_REG_FIELD(__GXData->lpSize, 8, 8); - *texOffsets = GET_REG_FIELD(__GXData->lpSize, 3, 19); -} - void GXEnableTexOffsets(GXTexCoordID coord, u8 line_enable, u8 point_enable) { CHECK_GXBEGIN(529, "GXEnableTexOffsets"); diff --git a/src/dolphin/src/gx/GXInit.c b/src/dolphin/src/gx/GXInit.c index 6446039f3..294dcec77 100644 --- a/src/dolphin/src/gx/GXInit.c +++ b/src/dolphin/src/gx/GXInit.c @@ -30,10 +30,10 @@ static GXFifoObj FifoObj; static GXData gxData; GXData* const __GXData = &gxData; -void* __memReg; -void* __peReg; -void* __cpReg; -void* __piReg; +void* __piReg = NULL; +void* __cpReg = NULL; +void* __peReg = NULL; +void* __memReg = NULL; #if DEBUG GXBool __GXinBegin; diff --git a/src/dolphin/src/gx/GXLight.c b/src/dolphin/src/gx/GXLight.c index 03e15ebdf..f665d606b 100644 --- a/src/dolphin/src/gx/GXLight.c +++ b/src/dolphin/src/gx/GXLight.c @@ -1,9 +1,3 @@ -// #include "PowerPC_EABI_Support/MSL_C/MSL_Common/math_api.h" -// #include - -// TODO: The above are both commented out because of some weird calling quirk -// Using the externed cosf fixes this issue. - #include #include @@ -12,6 +6,10 @@ extern float cosf(float x); extern float sqrtf(float x); +// TODO: +// - Clean up the defines that are only used here. Possibly use a Set_Reg macro +// - Clean up the magic numbers that exist here + // GXLightObj private data typedef struct { @@ -310,104 +308,95 @@ void GXLoadLightObjImm(GXLightObj* lt_obj, GXLightID light) __GXData->bpSentNot = 1; } -#define GXCOLOR_AS_U32(color) (*((u32*)&(color))) - -void GXSetChanAmbColor(GXChannelID chan, GXColor amb_color) +void GXSetChanAmbColor(GXChannelID channel, GXColor color) { u32 reg; u32 rgb; - u32 colIdx; - - CHECK_GXBEGIN(661, "GXSetChanAmbColor"); + u32 colorID; + u8 alpha; - switch (chan) + switch (channel) { case GX_COLOR0: - reg = __GXData->ambColor[GX_COLOR0]; - rgb = GXCOLOR_AS_U32(amb_color) >> 8; - SET_REG_FIELD(675, reg, 24, 8, rgb); - colIdx = 0; + rgb = __GXData->ambColor[GX_COLOR0]; + reg = GX_SET_TRUNC(GXCOLOR_AS_U32(color) & ~0xff, rgb, 24, 31); + colorID = GX_COLOR0; break; case GX_COLOR1: - reg = __GXData->ambColor[GX_COLOR1]; - rgb = GXCOLOR_AS_U32(amb_color) >> 8; - SET_REG_FIELD(690, reg, 24, 8, rgb); - colIdx = 1; + rgb = __GXData->ambColor[GX_COLOR1]; + reg = GX_SET_TRUNC(GXCOLOR_AS_U32(color) & ~0xff, rgb, 24, 31); + colorID = GX_COLOR1; break; case GX_ALPHA0: reg = __GXData->ambColor[GX_COLOR0]; - SET_REG_FIELD(696, reg, 8, 0, amb_color.a); - colIdx = 0; + reg = GX_SET_TRUNC(reg, color.a, 24, 31); + colorID = GX_COLOR0; break; case GX_ALPHA1: reg = __GXData->ambColor[GX_COLOR1]; - SET_REG_FIELD(702, reg, 8, 0, amb_color.a); - colIdx = 1; + reg = GX_SET_TRUNC(reg, color.a, 24, 31); + colorID = GX_COLOR1; break; case GX_COLOR0A0: - reg = GXCOLOR_AS_U32(amb_color); - colIdx = 0; + reg = GXCOLOR_AS_U32(color); + colorID = GX_COLOR0; break; case GX_COLOR1A1: - reg = GXCOLOR_AS_U32(amb_color); - colIdx = 1; + reg = GXCOLOR_AS_U32(color); + colorID = GX_COLOR1; break; default: return; } - GX_WRITE_XF_REG(colIdx + 10, reg); - __GXData->bpSentNot = 1; - __GXData->ambColor[colIdx] = reg; + GX_XF_LOAD_REG(0x100a + colorID, reg); + __GXData->bpSentNot = GX_TRUE; + __GXData->ambColor[colorID] = reg; } -void GXSetChanMatColor(GXChannelID chan, GXColor mat_color) +void GXSetChanMatColor(GXChannelID channel, GXColor color) { - u32 reg; + u32 reg = 0; u32 rgb; - u32 colIdx; + GXChannelID colorID; - CHECK_GXBEGIN(762, "GXSetChanMatColor"); - - switch (chan) + switch (channel) { case GX_COLOR0: - reg = __GXData->matColor[GX_COLOR0]; - rgb = GXCOLOR_AS_U32(mat_color) >> 8; - SET_REG_FIELD(776, reg, 24, 8, rgb); - colIdx = 0; + rgb = __GXData->matColor[GX_COLOR0]; + reg = GX_SET_TRUNC(GXCOLOR_AS_U32(color) & ~0xff, rgb, 24, 31); + colorID = GX_COLOR0; break; case GX_COLOR1: - reg = __GXData->matColor[GX_COLOR1]; - rgb = GXCOLOR_AS_U32(mat_color) >> 8; - SET_REG_FIELD(791, reg, 24, 8, rgb); - colIdx = 1; + rgb = __GXData->matColor[GX_COLOR1]; + reg = GX_SET_TRUNC(GXCOLOR_AS_U32(color) & ~0xff, rgb, 24, 31); + colorID = GX_COLOR1; break; case GX_ALPHA0: reg = __GXData->matColor[GX_COLOR0]; - SET_REG_FIELD(797, reg, 8, 0, mat_color.a); - colIdx = 0; + reg = GX_SET_TRUNC(reg, color.a, 24, 31); + colorID = GX_COLOR0; break; case GX_ALPHA1: reg = __GXData->matColor[GX_COLOR1]; - SET_REG_FIELD(803, reg, 8, 0, mat_color.a); - colIdx = 1; + reg = GX_SET_TRUNC(reg, color.a, 24, 31); + colorID = GX_COLOR1; break; case GX_COLOR0A0: - reg = GXCOLOR_AS_U32(mat_color); - colIdx = 0; + reg = GXCOLOR_AS_U32(color); + colorID = GX_COLOR0; break; case GX_COLOR1A1: - reg = GXCOLOR_AS_U32(mat_color); - colIdx = 1; + reg = GXCOLOR_AS_U32(color); + colorID = GX_COLOR1; break; default: return; } - GX_WRITE_XF_REG(colIdx + 12, reg); - __GXData->bpSentNot = 1; - __GXData->matColor[colIdx] = reg; + GX_XF_LOAD_REG(0x100c + colorID, reg); + __GXData->bpSentNot = GX_TRUE; + __GXData->matColor[colorID] = reg; } void GXSetNumChans(u8 nChans) @@ -419,47 +408,37 @@ void GXSetNumChans(u8 nChans) __GXData->dirtyState |= 4; } -void GXSetChanCtrl(GXChannelID chan, GXBool enable, GXColorSrc amb_src, GXColorSrc mat_src, - u32 light_mask, GXDiffuseFn diff_fn, GXAttnFn attn_fn) -{ - u32 reg; - u32 idx; +// Magic numbers at the moment. Reference chibi robo repo to fix - CHECK_GXBEGIN(892, "GXSetChanCtrl"); +void GXSetChanCtrl(GXChannelID channel, GXBool doEnable, GXColorSrc ambSrc, GXColorSrc matSrc, + u32 mask, GXDiffuseFn diffFunc, GXAttnFn attnFunc) +{ + const u32 colorID = (u32)channel & 0x3; + u32 reg = 0; -#if DEBUG - if (chan == GX_COLOR0A0) - idx = 0; - else if (chan == GX_COLOR1A1) - idx = 1; - else - idx = chan; -#else - idx = chan & 0x3; -#endif + GX_SET_REG(reg, doEnable, 30, 30); + GX_SET_REG(reg, matSrc, 31, 31); + GX_SET_REG(reg, ambSrc, 25, 25); + GX_SET_REG(reg, (attnFunc == GX_AF_SPEC ? GX_DF_NONE : diffFunc), 23, 24); + GX_SET_REG(reg, (attnFunc != GX_AF_NONE), 22, 22); + GX_SET_REG(reg, (attnFunc != GX_AF_SPEC), 21, 21); - reg = 0; - SET_REG_FIELD(907, reg, 1, 1, enable); - SET_REG_FIELD(908, reg, 1, 0, mat_src); - SET_REG_FIELD(909, reg, 1, 6, amb_src); + // why are we unmasking bits we're about to overwrite? - SET_REG_FIELD(911, reg, 2, 7, (attn_fn == 0) ? 0 : diff_fn); - SET_REG_FIELD(912, reg, 1, 9, (attn_fn != 2)); - SET_REG_FIELD(913, reg, 1, 10, (attn_fn != 0)); + reg = (reg & ~(0xf << 2)) | ((mask & 0xf) << 2); - SET_REG_FIELD(925, reg, 4, 2, light_mask & 0xF); - SET_REG_FIELD(926, reg, 4, 11, (light_mask >> 4) & 0xF); + reg = (reg & ~(0xf << 11)) | (((mask >> 4) & 0xf) << 11); - GX_WRITE_XF_REG(idx + 14, reg); + GX_XF_LOAD_REG(0x100E + colorID, reg); - if (chan == GX_COLOR0A0) + if (channel == GX_COLOR0A0) { - GX_WRITE_XF_REG(16, reg); + GX_XF_LOAD_REG(0x1010, reg); } - else if (chan == GX_COLOR1A1) + else if (channel == GX_COLOR1A1) { - GX_WRITE_XF_REG(17, reg); + GX_XF_LOAD_REG(0x1011, reg); } - __GXData->bpSentNot = 1; + __GXData->bpSentNot = GX_TRUE; } diff --git a/src/dolphin/src/gx/GXPixel.c b/src/dolphin/src/gx/GXPixel.c index 6b4a29207..4fa9cddf0 100644 --- a/src/dolphin/src/gx/GXPixel.c +++ b/src/dolphin/src/gx/GXPixel.c @@ -6,40 +6,23 @@ #include +// TODO: Fix Magic numbers in the GX_SET_REG calls +// These are supposed to be enums void GXSetFog(GXFogType type, f32 startz, f32 endz, f32 nearz, f32 farz, GXColor color) { - u32 fogclr; - u32 fog0; - u32 fog1; - u32 fog2; - u32 fog3; - f32 A; - f32 B; - f32 B_mant; - f32 C; - f32 a; - f32 c; - u32 B_expn; - u32 b_m; - u32 b_s; - u32 a_hex; - u32 c_hex; - u32 fsel; - u32 proj; - u32 rgba; - - fogclr = 0; - fog0 = 0; - fog1 = 0; - fog2 = 0; - fog3 = 0; - - CHECK_GXBEGIN(138, "GXSetFog"); - - fsel = type & 7; - proj = (type >> 3) & 1; - - if (proj) + f32 a, c; + u32 a_bits, c_bits; + + u32 fogColorReg = 0; + u32 fogParamReg0 = 0; + u32 fogParamReg1 = 0; + u32 fogParamReg2 = 0; + u32 fogParamReg3 = 0; + + u32 fsel = type & 7; + BOOL isOrtho = (type >> 3) & 1; + + if (isOrtho) { if (farz == nearz || endz == startz) { @@ -48,106 +31,111 @@ void GXSetFog(GXFogType type, f32 startz, f32 endz, f32 nearz, f32 farz, GXColor } else { - A = (1.0f / (endz - startz)); - a = A * (farz - nearz); - c = A * (startz - nearz); + a = (1.0f / (endz - startz)) * (farz - nearz); + c = (1.0f / (endz - startz)) * (startz - nearz); } } else { + f32 tmpA, tmpB, tmpC; + u32 expB, magB, shiftB; + if (farz == nearz || endz == startz) { - A = 0.0f; - B = 0.5f; - C = 0.0f; + tmpA = 0.0f; + tmpB = 0.5f; + tmpC = 0.0f; } else { - A = (farz * nearz) / ((farz - nearz) * (endz - startz)); - B = farz / (farz - nearz); - C = startz / (endz - startz); + tmpA = (farz * nearz) / ((farz - nearz) * (endz - startz)); + tmpB = farz / (farz - nearz); + tmpC = startz / (endz - startz); } - B_mant = B; - B_expn = 0; - while (B_mant > 1.0) + expB = 0; + while (tmpB > 1.0) { - B_mant /= 2.0f; - B_expn++; + tmpB /= 2.0f; + expB++; } - while (B_mant > 0.0f && B_mant < 0.5) + while (tmpB > 0.0f && tmpB < 0.5) { - B_mant *= 2.0f; - B_expn--; + tmpB *= 2.0f; + expB--; } - a = A / (f32)(1 << (B_expn + 1)); - b_m = 8.388638e6f * B_mant; - b_s = B_expn + 1; - c = C; + a = tmpA / (1 << expB + 1); + magB = 8388638.0f * tmpB; + shiftB = expB + 1; + c = tmpC; - SET_REG_FIELD(198, fog1, 24, 0, b_m); - SET_REG_FIELD(198, fog1, 8, 24, 0xEF); + GX_SET_REG(fogParamReg1, magB, 8, 31); + GX_SET_REG(fogParamReg2, shiftB, 27, 31); - SET_REG_FIELD(201, fog2, 5, 0, b_s); - SET_REG_FIELD(201, fog2, 8, 24, 0xF0); + GX_SET_REG(fogParamReg1, 0xEF, 0, 7); + GX_SET_REG(fogParamReg2, 0xF0, 0, 7); } - a_hex = *(u32*)&a; - c_hex = *(u32*)&c; + a_bits = *(u32*)&a; + c_bits = *(u32*)&c; - SET_REG_FIELD(209, fog0, 11, 0, (a_hex >> 12) & 0x7FF); - SET_REG_FIELD(210, fog0, 8, 11, (a_hex >> 23) & 0xFF); - SET_REG_FIELD(211, fog0, 1, 19, (a_hex >> 31)); - SET_REG_FIELD(211, fog0, 8, 24, 0xEE); + GX_SET_REG(fogParamReg0, a_bits >> 12, 21, 31); + GX_SET_REG(fogParamReg0, a_bits >> 23, 13, 20); + GX_SET_REG(fogParamReg0, a_bits >> 31, 12, 12); - SET_REG_FIELD(214, fog3, 11, 0, (c_hex >> 12) & 0x7FF); - SET_REG_FIELD(215, fog3, 8, 11, (c_hex >> 23) & 0xFF); - SET_REG_FIELD(216, fog3, 1, 19, (c_hex >> 31)); + GX_SET_REG(fogParamReg0, 0xEE, 0, 7); - SET_REG_FIELD(217, fog3, 1, 20, proj); - SET_REG_FIELD(218, fog3, 3, 21, fsel); - SET_REG_FIELD(218, fog3, 8, 24, 0xF1); + GX_SET_REG(fogParamReg3, c_bits >> 12, 21, 31); + GX_SET_REG(fogParamReg3, c_bits >> 23, 13, 20); + GX_SET_REG(fogParamReg3, c_bits >> 31, 12, 12); - rgba = *(u32*)&color; - SET_REG_FIELD(222, fogclr, 24, 0, rgba >> 8); - SET_REG_FIELD(222, fogclr, 8, 24, 0xF2); + GX_SET_REG(fogParamReg3, isOrtho, 11, 11); + GX_SET_REG(fogParamReg3, fsel, 8, 10); - GX_WRITE_RAS_REG(fog0); - GX_WRITE_RAS_REG(fog1); - GX_WRITE_RAS_REG(fog2); - GX_WRITE_RAS_REG(fog3); - GX_WRITE_RAS_REG(fogclr); + GX_SET_REG(fogParamReg3, 0xF1, 0, 7); - __GXData->bpSentNot = 0; + GX_SET_REG(fogColorReg, color.b, 8 + 16, 31); + GX_SET_REG(fogColorReg, color.g, (8 + 8), (31 - 8)); + GX_SET_REG(fogColorReg, color.r, (8 + 0), (31 - 16)); + GX_SET_REG(fogColorReg, 0xF2, 0, 7); + + GX_BP_LOAD_REG(fogParamReg0); + GX_BP_LOAD_REG(fogParamReg1); + GX_BP_LOAD_REG(fogParamReg2); + GX_BP_LOAD_REG(fogParamReg3); + GX_BP_LOAD_REG(fogColorReg); + + __GXData->bpSentNot = GX_FALSE; } +// TODO: Fix Magic numbers in the GX_SET_REG calls +// These are supposed to be enums void GXSetFogRangeAdj(GXBool enable, u16 center, GXFogAdjTable* table) { + u32 fogRangeReg; + u32 fogRangeRegK; u32 i; - u32 range_adj; - u32 range_c; - - CHECK_GXBEGIN(331, "GXSetFogRangeAdj"); if (enable) { - for (i = 0; i < 10; i += 2) + for (i = 0; i < ARRAY_SIZE(table->fogVals); i += 2) { - range_adj = 0; - // complains about r - // SET_REG_FIELD(338, range_adj, 12, 0, table->r[i]); - // SET_REG_FIELD(339, range_adj, 12, 12, table->r[i + 1]); - SET_REG_FIELD(340, range_adj, 8, 24, (i >> 1) + 0xE9); - GX_WRITE_RAS_REG(range_adj); + fogRangeRegK = 0; + GX_SET_REG(fogRangeRegK, table->fogVals[i], 20, 31); + GX_SET_REG(fogRangeRegK, table->fogVals[i + 1], 8, 19); + GX_SET_REG(fogRangeRegK, 0xE9 + (i / 2), 0, 7); + GX_BP_LOAD_REG(fogRangeRegK); } } - range_c = 0; - SET_REG_FIELD(346, range_c, 10, 0, center + 342); - SET_REG_FIELD(347, range_c, 1, 10, enable); - SET_REG_FIELD(348, range_c, 8, 24, 0xE8); - GX_WRITE_RAS_REG(range_c); - __GXData->bpSentNot = 0; + + fogRangeReg = 0; + GX_SET_REG(fogRangeReg, center + 342, 22, 31); + GX_SET_REG(fogRangeReg, enable, 21, 21); + GX_SET_REG(fogRangeReg, 0xE8, 0, 7); + GX_BP_LOAD_REG(fogRangeReg); + + __GXData->bpSentNot = GX_FALSE; } void GXSetBlendMode(GXBlendMode type, GXBlendFactor src_factor, GXBlendFactor dst_factor, diff --git a/src/dolphin/src/os/init/__start.c b/src/dolphin/src/os/init/__start.c index 0fa8a9546..184665aee 100644 --- a/src/dolphin/src/os/init/__start.c +++ b/src/dolphin/src/os/init/__start.c @@ -137,7 +137,7 @@ __declspec(weak) asm void __start(void) // clang-format on } -__declspec(section ".init") static void __copy_rom_section(void* dst, const void* src, +__declspec(section ".init") inline void __copy_rom_section(void* dst, const void* src, unsigned long size) { if (size && (dst != src)) @@ -147,7 +147,7 @@ __declspec(section ".init") static void __copy_rom_section(void* dst, const void } } -__declspec(section ".init") static void __init_bss_section(void* dst, unsigned long size) +__declspec(section ".init") inline void __init_bss_section(void* dst, unsigned long size) { if (size) { @@ -221,3 +221,8 @@ void __init_data(void) bii++; } } + +__declspec(weak) void InitMetroTRK_BBA(void) +{ + return; +} From b0705fbc11120c4694291f16b5cfdccf4b2074de Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Wed, 19 Nov 2025 19:12:31 -0500 Subject: [PATCH 3/9] Thx Escape for finishing the last function --- configure.py | 19 ++++++++++--- src/dolphin/src/card/CARDUnlock.c | 45 ++++++++++++++++--------------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/configure.py b/configure.py index 6dec1343f..cc0d68e60 100644 --- a/configure.py +++ b/configure.py @@ -239,6 +239,17 @@ #"-requireprotos" ] +cflags_trk = [ + *cflags_base, + "-O4,p", + "-sdata 0", + "-sdata2 0", + "-inline auto,deferred", + "-rostr", + "-char signed", + "-use_lmw_stmw on" +] + # Renderware library flags cflags_renderware = [ *cflags_base, @@ -652,7 +663,7 @@ def MatchingFor(*versions): "card", [ Object(Matching, "dolphin/src/card/CARDBios.c"), - Object(NonMatching, "dolphin/src/card/CARDUnlock.c"), + Object(Matching, "dolphin/src/card/CARDUnlock.c"), Object(Matching, "dolphin/src/card/CARDRdwr.c"), Object(Matching, "dolphin/src/card/CARDBlock.c"), Object(Matching, "dolphin/src/card/CARDDir.c"), @@ -792,7 +803,7 @@ def MatchingFor(*versions): "Runtime.PPCEABI.H", [], [ - Object(NonMatching, "Runtime/__mem.c"), + Object(NonMatching, "Runtime/__mem.c", extra_cflags=["-inline on, deferred"]), Object(Matching, "Runtime/__va_arg.c"), Object(NonMatching, "Runtime/global_destructor_chain.c"), Object(NonMatching, "Runtime/New.cp"), @@ -896,9 +907,9 @@ def MatchingFor(*versions): Object(NonMatching, "debugger/embedded/MetroTRK/Portable/mem_TRK.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Portable/string_TRK.c"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c"), - #Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), + Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"), - #Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), + Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c"), diff --git a/src/dolphin/src/card/CARDUnlock.c b/src/dolphin/src/card/CARDUnlock.c index 08e2c4a4d..306ec30d3 100644 --- a/src/dolphin/src/card/CARDUnlock.c +++ b/src/dolphin/src/card/CARDUnlock.c @@ -191,24 +191,33 @@ static s32 DummyLen(void) return tmp; } +#define DATA_SCRAMBLE_R(data) (~(data ^ (data >> 7) ^ (data >> 15) ^ (data >> 23))) + +static inline u32 exnor_1st(u32 data, u32 rshift) +{ + u32 i = 0; + for (; i < rshift; ++i) + { + data = (data >> 1) | (DATA_SCRAMBLE_R(data) << 30) & 0x40000000; + } + return data; +} + s32 __CARDUnlock(s32 chan, u8 flashID[12]) { u32 init_val; - u32 data = 0; + u32 data; - s32 dummy = 1; - s32 rlen = 1; - u32 rshift = 1; + s32 dummy; + s32 rlen; + u32 rshift; - u8 fsts = 0; - u32 wk = 1; - u32 wk1 = 1; - u32 w; // not this - u32 i; + u8 fsts; + u32 wk, wk1; + u8 rbuf[72]; u32 Ans1 = 0; u32 Ans2 = 0; u32* dp; - u8 rbuf[64]; u32 para1A = 0; u32 para1B = 0; u32 para2A = 0; @@ -232,29 +241,22 @@ s32 __CARDUnlock(s32 chan, u8 flashID[12]) dummy = DummyLen(); rlen = dummy; + if (ReadArrayUnlock(chan, init_val, rbuf, rlen, 0) < 0) - { return CARD_RESULT_NOCARD; - } rshift = (u32)(dummy * 8 + 1); - wk = data; - for (i = 0; i < rshift; i++) - { - wk = ~(w ^ (w >> 7) ^ (w >> 15) ^ (w >> 23)); - w = (w >> 1) | ((wk << 30) & 0x40000000); - } - + wk = exnor_1st(init_val, rshift); wk1 = ~(wk ^ (wk >> 7) ^ (wk >> 15) ^ (wk >> 23)); card->scramble = (wk | ((wk1 << 31) & 0x80000000)); card->scramble = bitrev(card->scramble); dummy = DummyLen(); rlen = 20 + dummy; data = 0; + if (ReadArrayUnlock(chan, data, rbuf, rlen, 1) < 0) - { return CARD_RESULT_NOCARD; - } + dp = (u32*)rbuf; para1A = *dp++; para1B = *dp++; @@ -321,7 +323,6 @@ s32 __CARDUnlock(s32 chan, u8 flashID[12]) return CARD_RESULT_READY; } - static void InitCallback(void* _task) { s32 chan; From 13341ba899188a7e5574ba40f67c72794e2468c6 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Wed, 19 Nov 2025 19:13:43 -0500 Subject: [PATCH 4/9] .s bug still exists --- configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index cc0d68e60..307152d17 100644 --- a/configure.py +++ b/configure.py @@ -907,9 +907,9 @@ def MatchingFor(*versions): Object(NonMatching, "debugger/embedded/MetroTRK/Portable/mem_TRK.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Portable/string_TRK.c"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c"), - Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), + # Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"), - Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), + # Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c"), From 00fbe5ccee2e663d536223e37b91bc947f3787cc Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Wed, 19 Nov 2025 19:49:37 -0500 Subject: [PATCH 5/9] .s test --- configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 307152d17..cc0d68e60 100644 --- a/configure.py +++ b/configure.py @@ -907,9 +907,9 @@ def MatchingFor(*versions): Object(NonMatching, "debugger/embedded/MetroTRK/Portable/mem_TRK.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Portable/string_TRK.c"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c"), - # Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), + Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s"), Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"), - # Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), + Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"), Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"), Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c"), From d3ddce48674f1b9176d3174de107acf5b5b474ed Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Thu, 20 Nov 2025 17:54:25 -0500 Subject: [PATCH 6/9] Bink SDK test pr --- configure.py | 52 ++++++++++++++++++++++----- src/bink/shared/time/radcb.c | 0 src/bink/src/sdk/bitplane.c | 0 src/bink/src/sdk/dct.c | 0 src/bink/src/sdk/decode/binkacd.c | 0 src/bink/src/sdk/decode/binkread.c | 0 src/bink/src/sdk/decode/expand.c | 0 src/bink/src/sdk/decode/ngc/binkngc.c | 0 src/bink/src/sdk/decode/ngc/ngcfile.c | 0 src/bink/src/sdk/decode/ngc/ngcrgb.c | 0 src/bink/src/sdk/decode/ngc/ngcsnd.c | 0 src/bink/src/sdk/decode/ngc/ngcyuy2.c | 0 src/bink/src/sdk/decode/yuv.cpp | 0 src/bink/src/sdk/fft.c | 0 src/bink/src/sdk/popmal.c | 0 src/bink/src/sdk/varbits.c | 0 tools/project.py | 31 ++++++++++++++-- 17 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 src/bink/shared/time/radcb.c create mode 100644 src/bink/src/sdk/bitplane.c create mode 100644 src/bink/src/sdk/dct.c create mode 100644 src/bink/src/sdk/decode/binkacd.c create mode 100644 src/bink/src/sdk/decode/binkread.c create mode 100644 src/bink/src/sdk/decode/expand.c create mode 100644 src/bink/src/sdk/decode/ngc/binkngc.c create mode 100644 src/bink/src/sdk/decode/ngc/ngcfile.c create mode 100644 src/bink/src/sdk/decode/ngc/ngcrgb.c create mode 100644 src/bink/src/sdk/decode/ngc/ngcsnd.c create mode 100644 src/bink/src/sdk/decode/ngc/ngcyuy2.c create mode 100644 src/bink/src/sdk/decode/yuv.cpp create mode 100644 src/bink/src/sdk/fft.c create mode 100644 src/bink/src/sdk/popmal.c create mode 100644 src/bink/src/sdk/varbits.c diff --git a/configure.py b/configure.py index cc0d68e60..dea8d2200 100644 --- a/configure.py +++ b/configure.py @@ -102,6 +102,12 @@ type=Path, help="path to sjiswrap.exe (optional)", ) +parser.add_argument( + "--ninja", + metavar="BINARY", + type=Path, + help="path to ninja binary (optional)", +) parser.add_argument( "--verbose", action="store_true", @@ -113,6 +119,13 @@ action="store_true", help="builds equivalent (but non-matching) or modded objects", ) +parser.add_argument( + "--warn", + dest="warn", + type=str, + choices=["all", "off", "error"], + help="how to handle warnings", +) parser.add_argument( "--no-progress", dest="progress", @@ -134,6 +147,7 @@ config.generate_map = args.map config.non_matching = args.non_matching config.sjiswrap_path = args.sjiswrap +config.ninja_path = args.ninja config.progress = args.progress if not is_windows(): config.wrapper = args.wrapper @@ -143,14 +157,13 @@ # Tool versions config.binutils_tag = "2.42-1" -config.compilers_tag = "20240706" -config.dtk_tag = "v1.4.1" -config.objdiff_tag = "v3.3.1" -config.sjiswrap_tag = "v1.2.0" +config.compilers_tag = "20250812" +config.dtk_tag = "v1.7.0" +config.objdiff_tag = "v3.4.1" +config.sjiswrap_tag = "v1.2.2" config.wibo_tag = "0.6.11" # Project -config.shift_jis = False config.config_path = Path("config") / config.version / "config.yml" config.check_sha_path = Path("config") / config.version / "build.sha1" config.asflags = [ @@ -159,7 +172,6 @@ "-I include", f"-I build/{config.version}/include", f"--defsym BUILD_VERSION={version_num}", - f"--defsym VERSION_={config.version}", ] config.ldflags = [ "-fp hardware", @@ -216,6 +228,14 @@ else: cflags_base.append("-DNDEBUG=1") + # Warning flags +if args.warn == "all": + cflags_base.append("-W all") +elif args.warn == "off": + cflags_base.append("-W off") +elif args.warn == "error": + cflags_base.append("-W error") + # Metrowerks library flags cflags_runtime = [ *cflags_base, @@ -250,6 +270,22 @@ "-use_lmw_stmw on" ] +# Bink was compiled with ProDG +cflags_bink = [ + "-O3", + "-mcpu=750", + "-fno-exceptions", + "-Wno-inline", + "-nostdinc", + "-I src/dolphin/src", + "-I include", + "-I src/dolphin/include", + "-D__GEKKO__", + "-I src/bink/include", + "-I src/PowerPC_EABI_Support/include", + "-G0", +] + # Renderware library flags cflags_renderware = [ *cflags_base, @@ -598,8 +634,8 @@ def MatchingFor(*versions): }, { "lib": "binkngc", - "mw_version": "GC/1.3.2", - "cflags": cflags_runtime, + "mw_version": "ProDG/3.5", + "cflags": cflags_bink, "progress_category": "bink", "objects": [ Object(NonMatching, "bink/src/sdk/decode/ngc/binkngc.c"), diff --git a/src/bink/shared/time/radcb.c b/src/bink/shared/time/radcb.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/bitplane.c b/src/bink/src/sdk/bitplane.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/dct.c b/src/bink/src/sdk/dct.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/binkacd.c b/src/bink/src/sdk/decode/binkacd.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/binkread.c b/src/bink/src/sdk/decode/binkread.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/expand.c b/src/bink/src/sdk/decode/expand.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/ngc/binkngc.c b/src/bink/src/sdk/decode/ngc/binkngc.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/ngc/ngcfile.c b/src/bink/src/sdk/decode/ngc/ngcfile.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/ngc/ngcrgb.c b/src/bink/src/sdk/decode/ngc/ngcrgb.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/ngc/ngcsnd.c b/src/bink/src/sdk/decode/ngc/ngcsnd.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/ngc/ngcyuy2.c b/src/bink/src/sdk/decode/ngc/ngcyuy2.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/decode/yuv.cpp b/src/bink/src/sdk/decode/yuv.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/fft.c b/src/bink/src/sdk/fft.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/popmal.c b/src/bink/src/sdk/popmal.c new file mode 100644 index 000000000..e69de29bb diff --git a/src/bink/src/sdk/varbits.c b/src/bink/src/sdk/varbits.c new file mode 100644 index 000000000..e69de29bb diff --git a/tools/project.py b/tools/project.py index f5144a223..811b57c6a 100644 --- a/tools/project.py +++ b/tools/project.py @@ -606,6 +606,17 @@ def write_cargo_rule(): ### compiler_path = compilers / "$mw_version" + # NGCCC + ngccc = compiler_path / "ngccc.exe" + if is_windows(): + ngccc_cmd = f"cmd /c \"set SN_NGC_PATH={os.path.abspath(compiler_path)}&& {ngccc} $cflags -c -o $out $in\"" + else: + ngccc_cmd = f"env SN_NGC_PATH={os.path.abspath(compiler_path)} {wrapper_cmd}{ngccc} $cflags -c -o $out $in" + ngccc_implicit: List[Optional[Path]] = [ + compilers_implicit or ngccc, + wrapper_implicit, + ] + # MWCC mwcc = compiler_path / "mwcceppc.exe" mwcc_cmd = f"{wrapper_cmd}{mwcc} $cflags -MMD -c $in -o $basedir" @@ -663,6 +674,16 @@ def write_cargo_rule(): ) n.newline() + n.comment("ProDG build") + n.rule( + name="prodg", + command=ngccc_cmd, + description="ProDG $out", + depfile="$basefile.d", + deps="gcc", + ) + n.newline() + n.comment("MWCC build (with UTF-8 to Shift JIS wrapper)") n.rule( name="mwcc_sjis", @@ -877,12 +898,18 @@ def c_build(obj: Object, src_path: Path) -> Optional[Path]: cflags_str = make_flags_str(all_cflags) used_compiler_versions.add(obj.options["mw_version"]) + # Add MWCC build rule + fakerule = "mwcc_sjis" if obj.options["shift_jis"] else "mwcc" + fakeimplicit = mwcc_sjis_implicit if obj.options["shift_jis"] else mwcc_implicit + if ("prodg" in obj.options["mw_version"].lower()): + fakerule = "prodg" + fakeimplicit = ngccc_implicit lib_name = obj.options["lib"] n.comment(f"{obj.name}: {lib_name} (linked {obj.completed})") n.build( outputs=obj.src_obj_path, - rule="mwcc_sjis" if obj.options["shift_jis"] else "mwcc", + rule=fakerule, inputs=src_path, variables={ "mw_version": Path(obj.options["mw_version"]), @@ -891,7 +918,7 @@ def c_build(obj: Object, src_path: Path) -> Optional[Path]: "basefile": obj.src_obj_path.with_suffix(""), }, implicit=( - mwcc_sjis_implicit if obj.options["shift_jis"] else mwcc_implicit + fakeimplicit ), order_only="pre-compile", ) From 3b82c2cc21f088ac768a32e7fbab30830b7e6a74 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Thu, 20 Nov 2025 17:56:54 -0500 Subject: [PATCH 7/9] forgot to update wibo --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index dea8d2200..39080b329 100644 --- a/configure.py +++ b/configure.py @@ -161,7 +161,7 @@ config.dtk_tag = "v1.7.0" config.objdiff_tag = "v3.4.1" config.sjiswrap_tag = "v1.2.2" -config.wibo_tag = "0.6.11" +config.wibo_tag = "1.0.0-beta.5" # Project config.config_path = Path("config") / config.version / "config.yml" From 68efd3a5422581c9d95c2b05ca9885bee38c9ed4 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Thu, 20 Nov 2025 18:03:31 -0500 Subject: [PATCH 8/9] update download_tool.py --- tools/download_tool.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tools/download_tool.py b/tools/download_tool.py index eecb7ab53..22465267a 100644 --- a/tools/download_tool.py +++ b/tools/download_tool.py @@ -78,12 +78,14 @@ def sjiswrap_url(tag: str) -> str: def wibo_url(tag: str) -> str: - repo = "https://github.com/decompals/wibo" - return f"{repo}/releases/download/{tag}/wibo" + uname = platform.uname() + arch = uname.machine.lower() + system = uname.system.lower() + if system == "darwin": + arch = "macos" -def ok_url(tag: str) -> str: - repo = "https://github.com/bfbbdecomp/OK" - return f"{repo}/releases/download/{tag}/OK-linux-x86_64" + repo = "https://github.com/decompals/wibo" + return f"{repo}/releases/download/{tag}/wibo-{arch}" TOOLS: Dict[str, Callable[[str], str]] = { @@ -93,9 +95,9 @@ def ok_url(tag: str) -> str: "objdiff-cli": objdiff_cli_url, "sjiswrap": sjiswrap_url, "wibo": wibo_url, - "OK": ok_url } + def download(url, response, output) -> None: if url.endswith(".zip"): data = io.BytesIO(response.read()) @@ -112,6 +114,7 @@ def download(url, response, output) -> None: st = os.stat(output) os.chmod(output, st.st_mode | stat.S_IEXEC) + def main() -> None: parser = argparse.ArgumentParser() parser.add_argument("tool", help="Tool name") @@ -133,12 +136,17 @@ def main() -> None: try: import certifi import ssl - except: - print("\"certifi\" module not found. Please install it using \"python -m pip install certifi\".") + except ImportError: + print( + '"certifi" module not found. Please install it using "python -m pip install certifi".' + ) return - - with urllib.request.urlopen(req, context=ssl.create_default_context(cafile=certifi.where())) as response: + + with urllib.request.urlopen( + req, context=ssl.create_default_context(cafile=certifi.where()) + ) as response: download(url, response, output) + if __name__ == "__main__": main() From 7cdaa2348e68f6a185fc54b0d8d1b0abb0e9a7e7 Mon Sep 17 00:00:00 2001 From: Colin Miller Date: Thu, 20 Nov 2025 20:48:17 -0500 Subject: [PATCH 9/9] configure update --- .vscode/c_cpp_properties.json | 2 ++ .vscode/settings.json | 4 ++- configure.py | 5 +-- src/bink/include/binkngc.h | 8 +++++ src/bink/include/ngcsnd.h | 6 ++++ src/bink/include/popmal.h | 8 +++++ src/bink/src/sdk/decode/ngc/binkngc.c | 44 +++++++++++++++++++++++++++ src/bink/src/sdk/decode/ngc/ngcsnd.c | 11 +++++++ src/bink/src/sdk/popmal.c | 9 ++++++ 9 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 src/bink/include/binkngc.h create mode 100644 src/bink/include/ngcsnd.h create mode 100644 src/bink/include/popmal.h diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 37132a2f2..9362a1d82 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -13,6 +13,8 @@ "${workspaceFolder}/src/PowerPC_EABI_Support/include/PowerPC_EABI_Support/MSL_C/MSL_Common", "${workspaceFolder}/src/PowerPC_EABI_Support/include/PowerPC_EABI_Support/MSL_C++/MSL_Common/Include", "${workspaceFolder}/include/inline", + "${workspaceFolder}/src/bink/include", + "${workspaceFolder}/src/bink/src", "${workspaceFolder}/src/dolphin/include", "${workspaceFolder}/src/dolphin/src", "${workspaceFolder}/include/rwsdk", diff --git a/.vscode/settings.json b/.vscode/settings.json index 95c0114af..97aeb446e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -55,7 +55,9 @@ "gxget.h": "c", "gxverify.h": "c", "card.h": "c", - "__start.h": "c" + "__start.h": "c", + "macros.h": "c", + "ngcsnd.h": "c" }, // Disable C/C++ IntelliSense, use clangd instead "C_Cpp.intelliSenseEngine": "default", diff --git a/configure.py b/configure.py index 39080b329..864dddb07 100644 --- a/configure.py +++ b/configure.py @@ -216,6 +216,7 @@ "-i src/dolphin/include", "-i src/dolphin/src", "-i src", + "-i src/bink/include", f"-i build/{config.version}/include", f"-DBUILD_VERSION={version_num}", f"-DVERSION_{config.version}", @@ -280,10 +281,10 @@ "-I src/dolphin/src", "-I include", "-I src/dolphin/include", - "-D__GEKKO__", "-I src/bink/include", + "-D__GEKKO__", "-I src/PowerPC_EABI_Support/include", - "-G0", + "-G4", ] # Renderware library flags diff --git a/src/bink/include/binkngc.h b/src/bink/include/binkngc.h new file mode 100644 index 000000000..e8eb64a00 --- /dev/null +++ b/src/bink/include/binkngc.h @@ -0,0 +1,8 @@ +#ifndef BINKNGC_H +#define BINKNGC_H + +#include "dolphin/os/OSAlloc.h" + +void radfree(void* ptr); + +#endif diff --git a/src/bink/include/ngcsnd.h b/src/bink/include/ngcsnd.h new file mode 100644 index 000000000..46063fb8d --- /dev/null +++ b/src/bink/include/ngcsnd.h @@ -0,0 +1,6 @@ +#ifndef NGCSND_H +#define NGCSND_H + +#include "ax/__ax.h" + +#endif diff --git a/src/bink/include/popmal.h b/src/bink/include/popmal.h new file mode 100644 index 000000000..21957870f --- /dev/null +++ b/src/bink/include/popmal.h @@ -0,0 +1,8 @@ +#ifndef POPMAL_H +#define POPMAL_H + +#include "types.h" + +u32 popmalloctotal(); + +#endif diff --git a/src/bink/src/sdk/decode/ngc/binkngc.c b/src/bink/src/sdk/decode/ngc/binkngc.c index e69de29bb..431dfd812 100644 --- a/src/bink/src/sdk/decode/ngc/binkngc.c +++ b/src/bink/src/sdk/decode/ngc/binkngc.c @@ -0,0 +1,44 @@ +#include "binkngc.h" + +u32 usermalloc = NULL; +u32 userfree = NULL; +u32 userarammalloc = NULL; +u32 useraramfree = NULL; + +void RADSetMemory(u32 alloc, u32 free) +{ + usermalloc = alloc; + userfree = free; +} + +void radfree(void* ptr) +{ + u8* ptrU8 = (u8*)ptr; + u32* ptrU32 = (u32*)ptr; + + void (*customFree)(void*); + if (ptr) + { + if ((ptrU8[-2]) == 3) + { + customFree = (u32)(ptrU32[-2]); + customFree(ptrU8 - ptrU8[-1]); + } + else + { + OSFreeToHeap((void*)__OSCurrHeap, ptrU8 - ptrU8[-1]); + } + } +} + +void radaudiofree() +{ + if (useraramfree != NULL) + { + } +} + +// undefined4 * +void ReadTimeBase(u32* ptr) +{ +} diff --git a/src/bink/src/sdk/decode/ngc/ngcsnd.c b/src/bink/src/sdk/decode/ngc/ngcsnd.c index e69de29bb..649725dbf 100644 --- a/src/bink/src/sdk/decode/ngc/ngcsnd.c +++ b/src/bink/src/sdk/decode/ngc/ngcsnd.c @@ -0,0 +1,11 @@ +#include "ngcsnd.h" + +void Close() +{ + NGC_SoundShutdown(); +} + +void BinkOpenNGCSound() +{ + // return Open; +} diff --git a/src/bink/src/sdk/popmal.c b/src/bink/src/sdk/popmal.c index e69de29bb..39f3cefb5 100644 --- a/src/bink/src/sdk/popmal.c +++ b/src/bink/src/sdk/popmal.c @@ -0,0 +1,9 @@ +#include "popmal.h" + +static u32 pushtot = 0; +static u32 pushcur = 0; + +u32 popmalloctotal() +{ + return pushtot; +}