mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
This commit is contained in:
@@ -14,9 +14,9 @@ class DebugInterface;
|
||||
|
||||
struct TBreakPoint
|
||||
{
|
||||
u32 iAddress;
|
||||
bool bOn;
|
||||
bool bTemporary;
|
||||
u32 iAddress;
|
||||
bool bOn;
|
||||
bool bTemporary;
|
||||
};
|
||||
|
||||
struct TMemCheck
|
||||
@@ -29,18 +29,18 @@ struct TMemCheck
|
||||
u32 StartAddress;
|
||||
u32 EndAddress;
|
||||
|
||||
bool bRange;
|
||||
bool bRange;
|
||||
|
||||
bool OnRead;
|
||||
bool OnWrite;
|
||||
bool OnRead;
|
||||
bool OnWrite;
|
||||
|
||||
bool Log;
|
||||
bool Break;
|
||||
bool Log;
|
||||
bool Break;
|
||||
|
||||
u32 numHits;
|
||||
u32 numHits;
|
||||
|
||||
void Action(DebugInterface *dbg_interface, u32 _iValue, u32 addr,
|
||||
bool write, int size, u32 pc);
|
||||
bool write, int size, u32 pc);
|
||||
};
|
||||
|
||||
// Code breakpoints.
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
private:
|
||||
TBreakPoints m_BreakPoints;
|
||||
u32 m_iBreakOnCount;
|
||||
u32 m_iBreakOnCount;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ struct ArraySizeImpl : public std::extent<T>
|
||||
#define b8(x) ( b4(x) | ( b4(x) >> 4) )
|
||||
#define b16(x) ( b8(x) | ( b8(x) >> 8) )
|
||||
#define b32(x) (b16(x) | (b16(x) >>16) )
|
||||
#define ROUND_UP_POW2(x) (b32(x - 1) + 1)
|
||||
#define ROUND_UP_POW2(x) (b32(x - 1) + 1)
|
||||
|
||||
#ifndef __GNUC_PREREQ
|
||||
#define __GNUC_PREREQ(a, b) 0
|
||||
|
||||
@@ -59,9 +59,9 @@ namespace File
|
||||
struct FSTEntry
|
||||
{
|
||||
bool isDirectory;
|
||||
u64 size; // file length or number of entries from children
|
||||
std::string physicalName; // name on disk
|
||||
std::string virtualName; // name in FST names table
|
||||
u64 size; // File length or number of entries from children
|
||||
std::string physicalName; // Name on disk
|
||||
std::string virtualName; // Name in FST names table
|
||||
std::vector<FSTEntry> children;
|
||||
};
|
||||
|
||||
|
||||
@@ -148,8 +148,8 @@ inline double pow2(double x) {return x * x;}
|
||||
|
||||
float MathFloatVectorSum(const std::vector<float>&);
|
||||
|
||||
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
|
||||
#define ROUND_DOWN(x, a) ((x) & ~((a) - 1))
|
||||
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
|
||||
#define ROUND_DOWN(x, a) ((x) & ~((a) - 1))
|
||||
|
||||
// Rounds down. 0 -> undefined
|
||||
inline u64 Log2(u64 val)
|
||||
|
||||
@@ -18,96 +18,96 @@ static const struct
|
||||
const int DefaultModifier;
|
||||
} g_HKData[] = {
|
||||
#ifdef __APPLE__
|
||||
{ "Open", 79 /* 'O' */, 2 /* wxMOD_CMD */ },
|
||||
{ "ChangeDisc", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "RefreshList", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "Open", 79 /* 'O' */, 2 /* wxMOD_CMD */ },
|
||||
{ "ChangeDisc", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "RefreshList", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "PlayPause", 80 /* 'P' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Stop", 87 /* 'W' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayPause", 80 /* 'P' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Stop", 87 /* 'W' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ExportRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ExportRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "ToggleFullscreen", 70 /* 'F' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Screenshot", 83 /* 'S' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleFullscreen", 70 /* 'F' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Screenshot", 83 /* 'S' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "Wiimote1Connect", 49 /* '1' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote2Connect", 50 /* '2' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote3Connect", 51 /* '3' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote4Connect", 52 /* '4' */, 2 /* wxMOD_CMD */ },
|
||||
{ "BalanceBoardConnect",53 /* '4' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote1Connect", 49 /* '1' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote2Connect", 50 /* '2' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote3Connect", 51 /* '3' */, 2 /* wxMOD_CMD */ },
|
||||
{ "Wiimote4Connect", 52 /* '4' */, 2 /* wxMOD_CMD */ },
|
||||
{ "BalanceBoardConnect", 53 /* '4' */, 2 /* wxMOD_CMD */ },
|
||||
#else
|
||||
{ "Open", 79 /* 'O' */, 2 /* wxMOD_CONTROL */},
|
||||
{ "ChangeDisc", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "RefreshList", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "Open", 79 /* 'O' */, 2 /* wxMOD_CONTROL */},
|
||||
{ "ChangeDisc", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "RefreshList", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "PlayPause", 349 /* WXK_F10 */, 0 /* wxMOD_NONE */ },
|
||||
{ "Stop", 27 /* WXK_ESCAPE */, 0 /* wxMOD_NONE */ },
|
||||
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayPause", 349 /* WXK_F10 */, 0 /* wxMOD_NONE */ },
|
||||
{ "Stop", 27 /* WXK_ESCAPE */, 0 /* wxMOD_NONE */ },
|
||||
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ExportRecording",0, 0 /* wxMOD_NONE */ },
|
||||
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ExportRecording", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 1 /* wxMOD_ALT */ },
|
||||
{ "Screenshot", 348 /* WXK_F9 */, 0 /* wxMOD_NONE */ },
|
||||
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 1 /* wxMOD_ALT */ },
|
||||
{ "Screenshot", 348 /* WXK_F9 */, 0 /* wxMOD_NONE */ },
|
||||
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "Wiimote1Connect", 344 /* WXK_F5 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote2Connect", 345 /* WXK_F6 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote3Connect", 346 /* WXK_F7 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote4Connect", 347 /* WXK_F8 */, 1 /* wxMOD_ALT */ },
|
||||
{ "BalanceBoardConnect",348 /* WXK_F9 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote1Connect", 344 /* WXK_F5 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote2Connect", 345 /* WXK_F6 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote3Connect", 346 /* WXK_F7 */, 1 /* wxMOD_ALT */ },
|
||||
{ "Wiimote4Connect", 347 /* WXK_F8 */, 1 /* wxMOD_ALT */ },
|
||||
{ "BalanceBoardConnect",348 /* WXK_F9 */, 1 /* wxMOD_ALT */ },
|
||||
#endif
|
||||
{ "ToggleIR", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleFog", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "IncreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "DecreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot4", 343 /* WXK_F4 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot5", 344 /* WXK_F5 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot6", 345 /* WXK_F6 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot7", 346 /* WXK_F7 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot8", 347 /* WXK_F8 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot10",0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleIR", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "ToggleFog", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "IncreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "DecreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot4", 343 /* WXK_F4 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot5", 344 /* WXK_F5 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot6", 345 /* WXK_F6 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot7", 346 /* WXK_F7 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot8", 347 /* WXK_F8 */, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateSlot10", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "SaveStateSlot1", 340 /* WXK_F1 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot2", 341 /* WXK_F2 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot3", 342 /* WXK_F3 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot4", 343 /* WXK_F4 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot5", 344 /* WXK_F5 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot6", 345 /* WXK_F6 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot7", 346 /* WXK_F7 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot8", 347 /* WXK_F8 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "SaveStateSlot10",0, 0 /* wxMOD_NONE */ },
|
||||
{ "SaveStateSlot1", 340 /* WXK_F1 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot2", 341 /* WXK_F2 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot3", 342 /* WXK_F3 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot4", 343 /* WXK_F4 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot5", 344 /* WXK_F5 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot6", 345 /* WXK_F6 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot7", 346 /* WXK_F7 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot8", 347 /* WXK_F8 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "SaveStateSlot10", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "LoadLastState1", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState2", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState3", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState4", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState5", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState6", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState7", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState8", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState1", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState2", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState3", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState4", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState5", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState6", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState7", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadLastState8", 0, 0 /* wxMOD_NONE */ },
|
||||
|
||||
{ "SaveFirstState", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoLoadState", 351 /* WXK_F12 */, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoSaveState", 351 /* WXK_F12 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "SaveFirstState", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoLoadState", 351 /* WXK_F12 */, 0 /* wxMOD_NONE */ },
|
||||
{ "UndoSaveState", 351 /* WXK_F12 */, 4 /* wxMOD_SHIFT */ },
|
||||
{ "SaveStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
{ "LoadStateFile", 0, 0 /* wxMOD_NONE */ },
|
||||
};
|
||||
|
||||
SConfig::SConfig()
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
#include "SysConf.h"
|
||||
|
||||
// DSP Backend Types
|
||||
#define BACKEND_NULLSOUND _trans("No audio output")
|
||||
#define BACKEND_ALSA "ALSA"
|
||||
#define BACKEND_AOSOUND "AOSound"
|
||||
#define BACKEND_COREAUDIO "CoreAudio"
|
||||
#define BACKEND_DIRECTSOUND "DSound"
|
||||
#define BACKEND_OPENAL "OpenAL"
|
||||
#define BACKEND_PULSEAUDIO "Pulse"
|
||||
#define BACKEND_XAUDIO2 "XAudio2"
|
||||
#define BACKEND_OPENSLES "OpenSLES"
|
||||
#define BACKEND_NULLSOUND _trans("No audio output")
|
||||
#define BACKEND_ALSA "ALSA"
|
||||
#define BACKEND_AOSOUND "AOSound"
|
||||
#define BACKEND_COREAUDIO "CoreAudio"
|
||||
#define BACKEND_DIRECTSOUND "DSound"
|
||||
#define BACKEND_OPENAL "OpenAL"
|
||||
#define BACKEND_PULSEAUDIO "Pulse"
|
||||
#define BACKEND_XAUDIO2 "XAudio2"
|
||||
#define BACKEND_OPENSLES "OpenSLES"
|
||||
struct SConfig : NonCopyable
|
||||
{
|
||||
// Wii Devices
|
||||
|
||||
@@ -79,8 +79,8 @@ static bool VerifyRoms(const char *irom_filename, const char *coef_filename)
|
||||
{
|
||||
struct DspRomHashes
|
||||
{
|
||||
u32 hash_irom; // dsp_rom.bin
|
||||
u32 hash_drom; // dsp_coef.bin
|
||||
u32 hash_irom; // dsp_rom.bin
|
||||
u32 hash_drom; // dsp_coef.bin
|
||||
} KNOWN_ROMS[] = {
|
||||
// Official Nintendo ROM
|
||||
{ 0x66f334fe, 0xf3b93527 },
|
||||
|
||||
@@ -24,7 +24,7 @@ class LabelMap
|
||||
{
|
||||
label_t(const std::string &lbl, s32 address, LabelType ltype) : name(lbl), addr(address), type(ltype) {}
|
||||
std::string name;
|
||||
s32 addr;
|
||||
s32 addr;
|
||||
LabelType type;
|
||||
};
|
||||
std::vector<label_t> labels;
|
||||
|
||||
@@ -81,9 +81,9 @@ public:
|
||||
private:
|
||||
struct param_t
|
||||
{
|
||||
u32 val;
|
||||
partype_t type;
|
||||
char *str;
|
||||
u32 val;
|
||||
partype_t type;
|
||||
char *str;
|
||||
};
|
||||
|
||||
enum segment_t
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace Dolphin_Debugger
|
||||
|
||||
struct CallstackEntry
|
||||
{
|
||||
std::string Name;
|
||||
u32 vAddress;
|
||||
std::string Name;
|
||||
u32 vAddress;
|
||||
};
|
||||
|
||||
bool GetCallstack(std::vector<CallstackEntry> &output);
|
||||
|
||||
@@ -40,35 +40,35 @@ struct SPatch
|
||||
|
||||
static const SPatch OSPatches[] =
|
||||
{
|
||||
{ "FAKE_TO_SKIP_0", HLE_Misc::UnimplementedFunction, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
{ "FAKE_TO_SKIP_0", HLE_Misc::UnimplementedFunction, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
|
||||
{ "PanicAlert", HLE_Misc::HLEPanicAlert, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "PanicAlert", HLE_Misc::HLEPanicAlert, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
|
||||
// Name doesn't matter, installed in CBoot::BootUp()
|
||||
{ "HBReload", HLE_Misc::HBReload, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
{ "HBReload", HLE_Misc::HBReload, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
|
||||
// ES_LAUNCH
|
||||
{ "__OSBootDol", HLE_Misc::OSBootDol, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
{ "OSGetResetCode", HLE_Misc::OSGetResetCode, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
{ "__OSBootDol", HLE_Misc::OSBootDol, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
{ "OSGetResetCode", HLE_Misc::OSGetResetCode, HLE_HOOK_REPLACE, HLE_TYPE_GENERIC },
|
||||
|
||||
// Debug/OS Support
|
||||
{ "OSPanic", HLE_OS::HLE_OSPanic, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "OSPanic", HLE_OS::HLE_OSPanic, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
|
||||
{ "OSReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "WUD_DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "vprintf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "printf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "puts", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // gcc-optimized printf?
|
||||
{ "___blank(char *,...)", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // used for early init things (normally)
|
||||
{ "___blank", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "__write_console", HLE_OS::HLE_write_console, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // used by sysmenu (+more?)
|
||||
{ "GeckoCodehandler", HLE_Misc::HLEGeckoCodehandler, HLE_HOOK_START, HLE_TYPE_GENERIC },
|
||||
{ "OSReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "WUD_DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "vprintf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "printf", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "puts", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // gcc-optimized printf?
|
||||
{ "___blank(char *,...)", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // used for early init things (normally)
|
||||
{ "___blank", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG },
|
||||
{ "__write_console", HLE_OS::HLE_write_console, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG }, // used by sysmenu (+more?)
|
||||
{ "GeckoCodehandler", HLE_Misc::HLEGeckoCodehandler, HLE_HOOK_START, HLE_TYPE_GENERIC },
|
||||
};
|
||||
|
||||
static const SPatch OSBreakPoints[] =
|
||||
{
|
||||
{ "FAKE_TO_SKIP_0", HLE_Misc::UnimplementedFunction },
|
||||
{ "FAKE_TO_SKIP_0", HLE_Misc::UnimplementedFunction },
|
||||
};
|
||||
|
||||
void Patch(u32 addr, const char *hle_func_name)
|
||||
|
||||
@@ -91,15 +91,15 @@ union AICR
|
||||
AICR(u32 _hex) { hex = _hex;}
|
||||
struct
|
||||
{
|
||||
u32 PSTAT : 1; // sample counter/playback enable
|
||||
u32 AISFR : 1; // AIS Frequency (0=32khz 1=48khz)
|
||||
u32 AIINTMSK : 1; // 0=interrupt masked 1=interrupt enabled
|
||||
u32 AIINT : 1; // audio interrupt status
|
||||
u32 AIINTVLD : 1; // This bit controls whether AIINT is affected by the Interrupt Timing register
|
||||
// matching the sample counter. Once set, AIINT will hold its last value
|
||||
u32 SCRESET : 1; // write to reset counter
|
||||
u32 AIDFR : 1; // AID Frequency (0=48khz 1=32khz)
|
||||
u32 :25;
|
||||
u32 PSTAT : 1; // sample counter/playback enable
|
||||
u32 AISFR : 1; // AIS Frequency (0=32khz 1=48khz)
|
||||
u32 AIINTMSK : 1; // 0=interrupt masked 1=interrupt enabled
|
||||
u32 AIINT : 1; // audio interrupt status
|
||||
u32 AIINTVLD : 1; // This bit controls whether AIINT is affected by the Interrupt Timing register
|
||||
// matching the sample counter. Once set, AIINT will hold its last value
|
||||
u32 SCRESET : 1; // write to reset counter
|
||||
u32 AIDFR : 1; // AID Frequency (0=48khz 1=32khz)
|
||||
u32 :25;
|
||||
};
|
||||
u32 hex;
|
||||
};
|
||||
@@ -110,9 +110,9 @@ union AIVR
|
||||
AIVR() { hex = 0;}
|
||||
struct
|
||||
{
|
||||
u32 left : 8;
|
||||
u32 right : 8;
|
||||
u32 :16;
|
||||
u32 left : 8;
|
||||
u32 right : 8;
|
||||
u32 :16;
|
||||
};
|
||||
u32 hex;
|
||||
};
|
||||
|
||||
+18
-18
@@ -70,8 +70,8 @@ union UARAMCount
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 count : 31;
|
||||
u32 dir : 1; // 0: MRAM -> ARAM 1: ARAM -> MRAM
|
||||
u32 count : 31;
|
||||
u32 dir : 1; // 0: MRAM -> ARAM 1: ARAM -> MRAM
|
||||
};
|
||||
};
|
||||
|
||||
@@ -83,23 +83,23 @@ union UDSPControl
|
||||
struct
|
||||
{
|
||||
// DSP Control
|
||||
u16 DSPReset : 1; // Write 1 to reset and waits for 0
|
||||
u16 DSPAssertInt : 1;
|
||||
u16 DSPHalt : 1;
|
||||
u16 DSPReset : 1; // Write 1 to reset and waits for 0
|
||||
u16 DSPAssertInt : 1;
|
||||
u16 DSPHalt : 1;
|
||||
// Interrupt for DMA to the AI/speakers
|
||||
u16 AID : 1;
|
||||
u16 AID_mask : 1;
|
||||
u16 AID : 1;
|
||||
u16 AID_mask : 1;
|
||||
// ARAM DMA interrupt
|
||||
u16 ARAM : 1;
|
||||
u16 ARAM_mask : 1;
|
||||
u16 ARAM : 1;
|
||||
u16 ARAM_mask : 1;
|
||||
// DSP DMA interrupt
|
||||
u16 DSP : 1;
|
||||
u16 DSP_mask : 1;
|
||||
u16 DSP : 1;
|
||||
u16 DSP_mask : 1;
|
||||
// Other ???
|
||||
u16 DMAState : 1; // DSPGetDMAStatus() uses this flag. __ARWaitForDMA() uses it too...maybe it's just general DMA flag
|
||||
u16 unk3 : 1;
|
||||
u16 DSPInit : 1; // DSPInit() writes to this flag
|
||||
u16 pad : 4;
|
||||
u16 DMAState : 1; // DSPGetDMAStatus() uses this flag. __ARWaitForDMA() uses it too...maybe it's just general DMA flag
|
||||
u16 unk3 : 1;
|
||||
u16 DSPInit : 1; // DSPInit() writes to this flag
|
||||
u16 pad : 4;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -188,9 +188,9 @@ union ARAM_Info
|
||||
u16 Hex;
|
||||
struct
|
||||
{
|
||||
u16 size : 6;
|
||||
u16 unk : 1;
|
||||
u16 : 9;
|
||||
u16 size : 6;
|
||||
u16 unk : 1;
|
||||
u16 : 9;
|
||||
};
|
||||
};
|
||||
static ARAM_Info g_ARAM_Info;
|
||||
|
||||
@@ -161,8 +161,8 @@ struct PBDpopWM
|
||||
|
||||
struct PBVolumeEnvelope
|
||||
{
|
||||
u16 cur_volume; // volume at start of frame
|
||||
s16 cur_volume_delta; // signed per sample delta (96 samples per frame)
|
||||
u16 cur_volume; // Volume at start of frame
|
||||
s16 cur_volume_delta; // Signed per sample delta (96 samples per frame)
|
||||
};
|
||||
|
||||
struct PBUnknown2
|
||||
@@ -254,12 +254,12 @@ struct AXPB
|
||||
struct PBBiquadFilter
|
||||
{
|
||||
|
||||
u16 on; // on = 2, off = 0
|
||||
u16 xn1; // History data
|
||||
u16 on; // on = 2, off = 0
|
||||
u16 xn1; // History data
|
||||
u16 xn2;
|
||||
u16 yn1;
|
||||
u16 yn2;
|
||||
u16 b0; // Filter coefficients
|
||||
u16 b0; // Filter coefficients
|
||||
u16 b1;
|
||||
u16 b2;
|
||||
u16 a1;
|
||||
@@ -280,13 +280,13 @@ struct AXPBWii
|
||||
u16 this_pb_hi;
|
||||
u16 this_pb_lo;
|
||||
|
||||
u16 src_type; // Type of sample rate converter (none, 4-tap, linear)
|
||||
u16 coef_select; // coef for the 4-tap src
|
||||
u16 src_type; // Type of sample rate converter (none, 4-tap, linear)
|
||||
u16 coef_select; // coef for the 4-tap src
|
||||
u16 mixer_control_hi;
|
||||
u16 mixer_control_lo;
|
||||
|
||||
u16 running; // 1=RUN 0=STOP
|
||||
u16 is_stream; // 1 = stream, 0 = one shot
|
||||
u16 running; // 1=RUN 0=STOP
|
||||
u16 is_stream; // 1 = stream, 0 = one shot
|
||||
|
||||
PBMixerWii mixer;
|
||||
PBInitialTimeDelay initial_time_delay;
|
||||
|
||||
@@ -18,87 +18,87 @@ union ZeldaVoicePB
|
||||
struct
|
||||
{
|
||||
// Read-Write part
|
||||
u16 Status; // 0x00 | 1 = play, 0 = stop
|
||||
u16 KeyOff; // 0x01 | writing 1 stops voice?
|
||||
u16 RatioInt; // 0x02 | Position delta (playback speed)
|
||||
u16 Unk03; // 0x03 | unknown
|
||||
u16 NeedsReset; // 0x04 | indicates if some values in PB need to be reset
|
||||
u16 ReachedEnd; // 0x05 | set to 1 when end reached
|
||||
u16 IsBlank; // 0x06 | 0 = normal sound, 1 = samples are always the same
|
||||
u16 Unk07; // 0x07 | unknown, in zelda always 0x0010. Something to do with number of saved samples (0x68)?
|
||||
u16 Status; // 0x00 | 1 = play, 0 = stop
|
||||
u16 KeyOff; // 0x01 | writing 1 stops voice?
|
||||
u16 RatioInt; // 0x02 | Position delta (playback speed)
|
||||
u16 Unk03; // 0x03 | unknown
|
||||
u16 NeedsReset; // 0x04 | indicates if some values in PB need to be reset
|
||||
u16 ReachedEnd; // 0x05 | set to 1 when end reached
|
||||
u16 IsBlank; // 0x06 | 0 = normal sound, 1 = samples are always the same
|
||||
u16 Unk07; // 0x07 | unknown, in zelda always 0x0010. Something to do with number of saved samples (0x68)?
|
||||
|
||||
u16 SoundType; // 0x08 | "Sound type": so far in zww: 0x0d00 for music (volume mode 0), 0x4861 for sfx (volume mode 1)
|
||||
u16 volumeLeft1; // 0x09 | Left Volume 1 // There's probably two of each because they should be ramped within each frame.
|
||||
u16 volumeLeft2; // 0x0A | Left Volume 2
|
||||
u16 Unk0B; // 0x0B | unknown
|
||||
u16 SoundType; // 0x08 | "Sound type": so far in zww: 0x0d00 for music (volume mode 0), 0x4861 for sfx (volume mode 1)
|
||||
u16 volumeLeft1; // 0x09 | Left Volume 1 // There's probably two of each because they should be ramped within each frame.
|
||||
u16 volumeLeft2; // 0x0A | Left Volume 2
|
||||
u16 Unk0B; // 0x0B | unknown
|
||||
|
||||
u16 SoundType2; // 0x0C | "Sound type" 2 (not really sound type)
|
||||
u16 volumeRight1; // 0x0D | Right Volume 1
|
||||
u16 volumeRight2; // 0x0E | Right Volume 2
|
||||
u16 Unk0F; // 0x0F | unknown
|
||||
u16 SoundType2; // 0x0C | "Sound type" 2 (not really sound type)
|
||||
u16 volumeRight1; // 0x0D | Right Volume 1
|
||||
u16 volumeRight2; // 0x0E | Right Volume 2
|
||||
u16 Unk0F; // 0x0F | unknown
|
||||
|
||||
u16 SoundType3; // 0x10 | "Sound type" 3 (not really sound type)
|
||||
u16 volumeUnknown1_1; // 0x11 | Unknown Volume 1
|
||||
u16 volumeUnknown1_2; // 0x12 | Unknown Volume 1
|
||||
u16 Unk13; // 0x13 | unknown
|
||||
u16 SoundType3; // 0x10 | "Sound type" 3 (not really sound type)
|
||||
u16 volumeUnknown1_1; // 0x11 | Unknown Volume 1
|
||||
u16 volumeUnknown1_2; // 0x12 | Unknown Volume 1
|
||||
u16 Unk13; // 0x13 | unknown
|
||||
|
||||
u16 SoundType4; // 0x14 | "Sound type" 4 (not really sound type)
|
||||
u16 volumeUnknown2_1; // 0x15 | Unknown Volume 2
|
||||
u16 volumeUnknown2_2; // 0x16 | Unknown Volume 2
|
||||
u16 Unk17; // 0x17 | unknown
|
||||
u16 SoundType4; // 0x14 | "Sound type" 4 (not really sound type)
|
||||
u16 volumeUnknown2_1; // 0x15 | Unknown Volume 2
|
||||
u16 volumeUnknown2_2; // 0x16 | Unknown Volume 2
|
||||
u16 Unk17; // 0x17 | unknown
|
||||
|
||||
u16 Unk18[0x10]; // 0x18 | unknown
|
||||
u16 Unk28; // 0x28 | unknown
|
||||
u16 Unk29; // 0x29 | unknown // multiplied by 0x2a @ 0d21/ZWW
|
||||
u16 Unk2a; // 0x2A | unknown // loaded at 0d2e/ZWW
|
||||
u16 Unk2b; // 0x2B | unknown
|
||||
u16 VolumeMode; // 0x2C | unknown // See 0337/ZWW
|
||||
u16 Unk2D; // 0x2D | unknown
|
||||
u16 Unk2E; // 0x2E | unknown
|
||||
u16 Unk2F; // 0x2F | unknown
|
||||
u16 CurSampleFrac; // 0x30 | Fractional part of the current sample position
|
||||
u16 Unk31; // 0x31 | unknown / unused
|
||||
u16 CurBlock; // 0x32 | current block? used by zelda's AFC decoder. we don't need it.
|
||||
u16 FixedSample; // 0x33 | sample value for "blank" voices
|
||||
u32 RestartPos; // 0x34 | restart pos / "loop start offset"
|
||||
u16 Unk36[2]; // 0x36 | unknown // loaded at 0adc/ZWW in 0x21 decoder
|
||||
u32 CurAddr; // 0x38 | current address
|
||||
u32 RemLength; // 0x3A | remaining length
|
||||
u16 ResamplerOldData[4]; // 0x3C | The resampler stores the last 4 decoded samples here from the previous frame, so that the filter kernel has something to read before the start of the buffer.
|
||||
u16 Unk40[0x10]; // 0x40 | Used as some sort of buffer by IIR
|
||||
u16 Unk50[0x8]; // 0x50 | Used as some sort of buffer by 06ff/ZWW
|
||||
u16 Unk58[0x8]; // 0x58 |
|
||||
u16 Unk60[0x6]; // 0x60 |
|
||||
u16 YN2; // 0x66 | YN2
|
||||
u16 YN1; // 0x67 | YN1
|
||||
u16 Unk68[0x10]; // 0x68 | Saved samples from last decode?
|
||||
u16 FilterState1; // 0x78 | unknown // ZWW: 0c84_FilterBufferInPlace loads and stores. Simply, the filter state.
|
||||
u16 FilterState2; // 0x79 | unknown // ZWW: same as above. these two are active if 0x04a8 != 0.
|
||||
u16 Unk7A; // 0x7A | unknown
|
||||
u16 Unk7B; // 0x7B | unknown
|
||||
u16 Unk7C; // 0x7C | unknown
|
||||
u16 Unk7D; // 0x7D | unknown
|
||||
u16 Unk7E; // 0x7E | unknown
|
||||
u16 Unk7F; // 0x7F | unknown
|
||||
u16 Unk18[0x10]; // 0x18 | unknown
|
||||
u16 Unk28; // 0x28 | unknown
|
||||
u16 Unk29; // 0x29 | unknown // multiplied by 0x2a @ 0d21/ZWW
|
||||
u16 Unk2a; // 0x2A | unknown // loaded at 0d2e/ZWW
|
||||
u16 Unk2b; // 0x2B | unknown
|
||||
u16 VolumeMode; // 0x2C | unknown // See 0337/ZWW
|
||||
u16 Unk2D; // 0x2D | unknown
|
||||
u16 Unk2E; // 0x2E | unknown
|
||||
u16 Unk2F; // 0x2F | unknown
|
||||
u16 CurSampleFrac; // 0x30 | Fractional part of the current sample position
|
||||
u16 Unk31; // 0x31 | unknown / unused
|
||||
u16 CurBlock; // 0x32 | current block? used by zelda's AFC decoder. we don't need it.
|
||||
u16 FixedSample; // 0x33 | sample value for "blank" voices
|
||||
u32 RestartPos; // 0x34 | restart pos / "loop start offset"
|
||||
u16 Unk36[2]; // 0x36 | unknown // loaded at 0adc/ZWW in 0x21 decoder
|
||||
u32 CurAddr; // 0x38 | current address
|
||||
u32 RemLength; // 0x3A | remaining length
|
||||
u16 ResamplerOldData[4]; // 0x3C | The resampler stores the last 4 decoded samples here from the previous frame, so that the filter kernel has something to read before the start of the buffer.
|
||||
u16 Unk40[0x10]; // 0x40 | Used as some sort of buffer by IIR
|
||||
u16 Unk50[0x8]; // 0x50 | Used as some sort of buffer by 06ff/ZWW
|
||||
u16 Unk58[0x8]; // 0x58 |
|
||||
u16 Unk60[0x6]; // 0x60 |
|
||||
u16 YN2; // 0x66 | YN2
|
||||
u16 YN1; // 0x67 | YN1
|
||||
u16 Unk68[0x10]; // 0x68 | Saved samples from last decode?
|
||||
u16 FilterState1; // 0x78 | unknown // ZWW: 0c84_FilterBufferInPlace loads and stores. Simply, the filter state.
|
||||
u16 FilterState2; // 0x79 | unknown // ZWW: same as above. these two are active if 0x04a8 != 0.
|
||||
u16 Unk7A; // 0x7A | unknown
|
||||
u16 Unk7B; // 0x7B | unknown
|
||||
u16 Unk7C; // 0x7C | unknown
|
||||
u16 Unk7D; // 0x7D | unknown
|
||||
u16 Unk7E; // 0x7E | unknown
|
||||
u16 Unk7F; // 0x7F | unknown
|
||||
|
||||
// Read-only part
|
||||
u16 Format; // 0x80 | audio format
|
||||
u16 RepeatMode; // 0x81 | 0 = one-shot, non zero = loop
|
||||
u16 LoopYN1; // 0x82 | YN1 reload (when AFC loops)
|
||||
u16 LoopYN2; // 0x83 | YN2 reload (when AFC loops)
|
||||
u16 Unk84; // 0x84 | IIR Filter # coefs?
|
||||
u16 StopOnSilence; // 0x85 | Stop on silence? (Flag for something volume related. Decides the weird stuff at 035a/ZWW, alco 0cd3)
|
||||
u16 Unk86; // 0x86 | unknown
|
||||
u16 Unk87; // 0x87 | unknown
|
||||
u32 LoopStartPos; // 0x88 | loopstart pos
|
||||
u32 Length; // 0x8A | sound length
|
||||
u32 StartAddr; // 0x8C | sound start address
|
||||
u32 UnkAddr; // 0x8E | ???
|
||||
u16 Padding[0x10]; // 0x90 | padding
|
||||
u16 Padding2[0x8]; // 0xa0 | FIR filter coefs of some sort (0xa4 controls the appearance of 0xa5-0xa7 and is almost always 0x7FFF)
|
||||
u16 FilterEnable; // 0xa8 | FilterBufferInPlace enable
|
||||
u16 Padding3[0x7]; // 0xa9 | padding
|
||||
u16 Padding4[0x10]; // 0xb0 | padding
|
||||
u16 Format; // 0x80 | audio format
|
||||
u16 RepeatMode; // 0x81 | 0 = one-shot, non zero = loop
|
||||
u16 LoopYN1; // 0x82 | YN1 reload (when AFC loops)
|
||||
u16 LoopYN2; // 0x83 | YN2 reload (when AFC loops)
|
||||
u16 Unk84; // 0x84 | IIR Filter # coefs?
|
||||
u16 StopOnSilence; // 0x85 | Stop on silence? (Flag for something volume related. Decides the weird stuff at 035a/ZWW, alco 0cd3)
|
||||
u16 Unk86; // 0x86 | unknown
|
||||
u16 Unk87; // 0x87 | unknown
|
||||
u32 LoopStartPos; // 0x88 | loopstart pos
|
||||
u32 Length; // 0x8A | sound length
|
||||
u32 StartAddr; // 0x8C | sound start address
|
||||
u32 UnkAddr; // 0x8E | ???
|
||||
u16 Padding[0x10]; // 0x90 | padding
|
||||
u16 Padding2[0x8]; // 0xa0 | FIR filter coefs of some sort (0xa4 controls the appearance of 0xa5-0xa7 and is almost always 0x7FFF)
|
||||
u16 FilterEnable; // 0xa8 | FilterBufferInPlace enable
|
||||
u16 Padding3[0x7]; // 0xa9 | padding
|
||||
u16 Padding4[0x10]; // 0xb0 | padding
|
||||
};
|
||||
u16 raw[0xc0]; // WARNING-do not use on parts of the 32-bit values - they are swapped!
|
||||
};
|
||||
@@ -107,10 +107,10 @@ union ZeldaUnkPB
|
||||
{
|
||||
struct
|
||||
{
|
||||
u16 Control; // 0x00 | control
|
||||
u16 Unk01; // 0x01 | unknown
|
||||
u32 SrcAddr; // 0x02 | some address
|
||||
u16 Unk04[0xC]; // 0x04 | unknown
|
||||
u16 Control; // 0x00 | control
|
||||
u16 Unk01; // 0x01 | unknown
|
||||
u32 SrcAddr; // 0x02 | some address
|
||||
u16 Unk04[0xC]; // 0x04 | unknown
|
||||
};
|
||||
u16 raw[16];
|
||||
};
|
||||
|
||||
@@ -67,14 +67,14 @@ union UDISR
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 BREAK : 1; // Stop the Device + Interrupt
|
||||
u32 DEINITMASK : 1; // Access Device Error Int Mask
|
||||
u32 DEINT : 1; // Access Device Error Int
|
||||
u32 TCINTMASK : 1; // Transfer Complete Int Mask
|
||||
u32 TCINT : 1; // Transfer Complete Int
|
||||
u32 BRKINTMASK : 1;
|
||||
u32 BRKINT : 1; // w 1: clear brkint
|
||||
u32 : 25;
|
||||
u32 BREAK : 1; // Stop the Device + Interrupt
|
||||
u32 DEINITMASK : 1; // Access Device Error Int Mask
|
||||
u32 DEINT : 1; // Access Device Error Int
|
||||
u32 TCINTMASK : 1; // Transfer Complete Int Mask
|
||||
u32 TCINT : 1; // Transfer Complete Int
|
||||
u32 BRKINTMASK : 1;
|
||||
u32 BRKINT : 1; // w 1: clear brkint
|
||||
u32 : 25;
|
||||
};
|
||||
UDISR() {Hex = 0;}
|
||||
UDISR(u32 _hex) {Hex = _hex;}
|
||||
@@ -86,10 +86,10 @@ union UDICVR
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 CVR : 1; // 0: Cover closed 1: Cover open
|
||||
u32 CVRINTMASK : 1; // 1: Interrupt enabled
|
||||
u32 CVRINT : 1; // r 1: Interrupt requested w 1: Interrupt clear
|
||||
u32 : 29;
|
||||
u32 CVR : 1; // 0: Cover closed 1: Cover open
|
||||
u32 CVRINTMASK : 1; // 1: Interrupt enabled
|
||||
u32 CVRINT : 1; // r 1: Interrupt requested w 1: Interrupt clear
|
||||
u32 : 29;
|
||||
};
|
||||
UDICVR() {Hex = 0;}
|
||||
UDICVR(u32 _hex) {Hex = _hex;}
|
||||
@@ -113,13 +113,13 @@ union UDIMAR
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 Zerobits : 5; // Must be zero (32byte aligned)
|
||||
u32 : 27;
|
||||
u32 Zerobits : 5; // Must be zero (32byte aligned)
|
||||
u32 : 27;
|
||||
};
|
||||
struct
|
||||
{
|
||||
u32 Address : 26;
|
||||
u32 : 6;
|
||||
u32 Address : 26;
|
||||
u32 : 6;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -129,13 +129,13 @@ union UDILENGTH
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 Zerobits : 5; // Must be zero (32byte aligned)
|
||||
u32 : 27;
|
||||
u32 Zerobits : 5; // Must be zero (32byte aligned)
|
||||
u32 : 27;
|
||||
};
|
||||
struct
|
||||
{
|
||||
u32 Length : 26;
|
||||
u32 : 6;
|
||||
u32 Length : 26;
|
||||
u32 : 6;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -145,10 +145,10 @@ union UDICR
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 TSTART : 1; // w:1 start r:0 ready
|
||||
u32 DMA : 1; // 1: DMA Mode 0: Immediate Mode (can only do Access Register Command)
|
||||
u32 RW : 1; // 0: Read Command (DVD to Memory) 1: Write Command (Memory to DVD)
|
||||
u32 : 29;
|
||||
u32 TSTART : 1; // w:1 start r:0 ready
|
||||
u32 DMA : 1; // 1: DMA Mode 0: Immediate Mode (can only do Access Register Command)
|
||||
u32 RW : 1; // 0: Read Command (DVD to Memory) 1: Write Command (Memory to DVD)
|
||||
u32 : 29;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -170,8 +170,8 @@ union UDICFG
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 CONFIG : 8;
|
||||
u32 : 24;
|
||||
u32 CONFIG : 8;
|
||||
u32 : 24;
|
||||
};
|
||||
UDICFG() {Hex = 0;}
|
||||
UDICFG(u32 _hex) {Hex = _hex;}
|
||||
@@ -180,22 +180,22 @@ union UDICFG
|
||||
|
||||
// STATE_TO_SAVE
|
||||
// hardware registers
|
||||
static UDISR m_DISR;
|
||||
static UDICVR m_DICVR;
|
||||
static UDICMDBUF m_DICMDBUF[3];
|
||||
static UDIMAR m_DIMAR;
|
||||
static UDILENGTH m_DILENGTH;
|
||||
static UDICR m_DICR;
|
||||
static UDIIMMBUF m_DIIMMBUF;
|
||||
static UDICFG m_DICFG;
|
||||
static UDISR m_DISR;
|
||||
static UDICVR m_DICVR;
|
||||
static UDICMDBUF m_DICMDBUF[3];
|
||||
static UDIMAR m_DIMAR;
|
||||
static UDILENGTH m_DILENGTH;
|
||||
static UDICR m_DICR;
|
||||
static UDIIMMBUF m_DIIMMBUF;
|
||||
static UDICFG m_DICFG;
|
||||
|
||||
static u32 LoopStart;
|
||||
static u32 AudioPos;
|
||||
static u32 CurrentStart;
|
||||
static u32 LoopLength;
|
||||
static u32 CurrentLength;
|
||||
static u32 LoopStart;
|
||||
static u32 AudioPos;
|
||||
static u32 CurrentStart;
|
||||
static u32 LoopLength;
|
||||
static u32 CurrentLength;
|
||||
|
||||
u32 g_ErrorCode = 0;
|
||||
u32 g_ErrorCode = 0;
|
||||
bool g_bDiscInside = false;
|
||||
bool g_bStream = false;
|
||||
int tc = 0;
|
||||
|
||||
@@ -42,21 +42,21 @@ private:
|
||||
// DO NOT obey the warning and give this struct a name. Things will fail.
|
||||
struct
|
||||
{
|
||||
// Indentation Meaning:
|
||||
// Channels 0, 1, 2
|
||||
// Channels 0, 1 only
|
||||
// Channel 0 only
|
||||
u32 EXIINTMASK : 1;
|
||||
u32 EXIINT : 1;
|
||||
u32 TCINTMASK : 1;
|
||||
u32 TCINT : 1;
|
||||
u32 CLK : 3;
|
||||
u32 CHIP_SELECT : 3; // CS1 and CS2 are Channel 0 only
|
||||
u32 EXTINTMASK : 1;
|
||||
u32 EXTINT : 1;
|
||||
u32 EXT : 1; // External Insertion Status (1: External EXI device present)
|
||||
u32 ROMDIS : 1; // ROM Disable
|
||||
u32 :18;
|
||||
// Indentation Meaning:
|
||||
// Channels 0, 1, 2
|
||||
// Channels 0, 1 only
|
||||
// Channel 0 only
|
||||
u32 EXIINTMASK : 1;
|
||||
u32 EXIINT : 1;
|
||||
u32 TCINTMASK : 1;
|
||||
u32 TCINT : 1;
|
||||
u32 CLK : 3;
|
||||
u32 CHIP_SELECT : 3; // CS1 and CS2 are Channel 0 only
|
||||
u32 EXTINTMASK : 1;
|
||||
u32 EXTINT : 1;
|
||||
u32 EXT : 1; // External Insertion Status (1: External EXI device present)
|
||||
u32 ROMDIS : 1; // ROM Disable
|
||||
u32 :18;
|
||||
};
|
||||
UEXI_STATUS() {Hex = 0;}
|
||||
UEXI_STATUS(u32 _hex) {Hex = _hex;}
|
||||
@@ -68,20 +68,20 @@ private:
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 TSTART : 1;
|
||||
u32 DMA : 1;
|
||||
u32 RW : 2;
|
||||
u32 TLEN : 2;
|
||||
u32 :26;
|
||||
u32 TSTART : 1;
|
||||
u32 DMA : 1;
|
||||
u32 RW : 2;
|
||||
u32 TLEN : 2;
|
||||
u32 :26;
|
||||
};
|
||||
};
|
||||
|
||||
// STATE_TO_SAVE
|
||||
UEXI_STATUS m_Status;
|
||||
u32 m_DMAMemoryAddress;
|
||||
u32 m_DMALength;
|
||||
UEXI_CONTROL m_Control;
|
||||
u32 m_ImmData;
|
||||
UEXI_STATUS m_Status;
|
||||
u32 m_DMAMemoryAddress;
|
||||
u32 m_DMALength;
|
||||
UEXI_CONTROL m_Control;
|
||||
u32 m_ImmData;
|
||||
|
||||
// Devices
|
||||
enum
|
||||
|
||||
@@ -43,15 +43,15 @@ private:
|
||||
u8 U8[2];
|
||||
struct
|
||||
{
|
||||
u16 out :4; // MICSet/GetOut...???
|
||||
u16 id :1; // Used for MICGetDeviceID (always 0)
|
||||
u16 button_unk :3; // Button bits which appear unused
|
||||
u16 button :1; // The actual button on the mic
|
||||
u16 buff_ovrflw :1; // Ring buffer wrote over bytes which weren't read by console
|
||||
u16 gain :1; // Gain: 0dB or 15dB
|
||||
u16 sample_rate :2; // Sample rate, 00-11025, 01-22050, 10-44100, 11-??
|
||||
u16 buff_size :2; // Ring buffer size in bytes, 00-32, 01-64, 10-128, 11-???
|
||||
u16 is_active :1; // If we are sampling or not
|
||||
u16 out : 4; // MICSet/GetOut...???
|
||||
u16 id : 1; // Used for MICGetDeviceID (always 0)
|
||||
u16 button_unk : 3; // Button bits which appear unused
|
||||
u16 button : 1; // The actual button on the mic
|
||||
u16 buff_ovrflw : 1; // Ring buffer wrote over bytes which weren't read by console
|
||||
u16 gain : 1; // Gain: 0dB or 15dB
|
||||
u16 sample_rate : 2; // Sample rate, 00-11025, 01-22050, 10-44100, 11-??
|
||||
u16 buff_size : 2; // Ring buffer size in bytes, 00-32, 01-64, 10-128, 11-???
|
||||
u16 is_active : 1; // If we are sampling or not
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -73,88 +73,88 @@ private:
|
||||
};
|
||||
std::vector<GCMBlock> mc_data_blocks;
|
||||
#pragma pack(push,1)
|
||||
struct Header { //Offset Size Description
|
||||
struct Header { //Offset Size Description
|
||||
// Serial in libogc
|
||||
u8 serial[12]; //0x0000 12 ?
|
||||
u64 formatTime; //0x000c 8 time of format (OSTime value)
|
||||
u32 SramBias; //0x0014 4 sram bias at time of format
|
||||
u32 SramLang; //0x0018 4 sram language
|
||||
u8 Unk2[4]; //0x001c 4 ? almost always 0
|
||||
u8 serial[12]; //0x0000 12 ?
|
||||
u64 formatTime; //0x000c 8 Time of format (OSTime value)
|
||||
u32 SramBias; //0x0014 4 SRAM bias at time of format
|
||||
u32 SramLang; //0x0018 4 SRAM language
|
||||
u8 Unk2[4]; //0x001c 4 ? almost always 0
|
||||
// end Serial in libogc
|
||||
u8 deviceID[2]; //0x0020 2 0 if formated in slot A 1 if formated in slot B
|
||||
u8 SizeMb[2]; //0x0022 2 size of memcard in Mbits
|
||||
u16 Encoding; //0x0024 2 encoding (ASCII or japanese)
|
||||
u8 Unused1[468]; //0x0026 468 unused (0xff)
|
||||
u16 UpdateCounter; //0x01fa 2 update Counter (?, probably unused)
|
||||
u16 Checksum; //0x01fc 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x01fe 2 Inverse Checksum
|
||||
u8 Unused2[7680]; //0x0200 0x1e00 unused (0xff)
|
||||
u8 deviceID[2]; //0x0020 2 0 if formated in slot A 1 if formated in slot B
|
||||
u8 SizeMb[2]; //0x0022 2 Size of memcard in Mbits
|
||||
u16 Encoding; //0x0024 2 Encoding (ASCII or japanese)
|
||||
u8 Unused1[468]; //0x0026 468 Unused (0xff)
|
||||
u16 UpdateCounter; //0x01fa 2 Update Counter (?, probably unused)
|
||||
u16 Checksum; //0x01fc 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x01fe 2 Inverse Checksum
|
||||
u8 Unused2[7680]; //0x0200 0x1e00 Unused (0xff)
|
||||
} hdr;
|
||||
|
||||
struct DEntry
|
||||
{
|
||||
u8 Gamecode[4]; //0x00 0x04 Gamecode
|
||||
u8 Makercode[2]; //0x04 0x02 Makercode
|
||||
u8 Unused1; //0x06 0x01 reserved/unused (always 0xff, has no effect)
|
||||
u8 BIFlags; //0x07 0x01 banner gfx format and icon animation (Image Key)
|
||||
// bit(s) description
|
||||
// 2 Icon Animation 0: forward 1: ping-pong
|
||||
// 1 [--0: No Banner 1: Banner present--] WRONG! YAGCD LIES!
|
||||
// 0 [--Banner Color 0: RGB5A3 1: CI8--] WRONG! YAGCD LIES!
|
||||
// bits 0 and 1: image format
|
||||
// 00 no banner
|
||||
// 01 CI8 banner
|
||||
// 10 RGB5A3 banner
|
||||
// 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner
|
||||
//
|
||||
u8 Filename[DENTRY_STRLEN]; //0x08 0x20 filename
|
||||
u8 ModTime[4]; //0x28 0x04 Time of file's last modification in seconds since 12am, January 1st, 2000
|
||||
u8 ImageOffset[4]; //0x2c 0x04 image data offset
|
||||
u8 IconFmt[2]; //0x30 0x02 icon gfx format (2bits per icon)
|
||||
// bits Description
|
||||
// 00 no icon
|
||||
// 01 CI8 with a shared color palette after the last frame
|
||||
// 10 RGB5A3
|
||||
// 11 CI8 with a unique color palette after itself
|
||||
//
|
||||
u8 AnimSpeed[2]; //0x32 0x02 animation speed (2bits per icon) (*1)
|
||||
// bits Description
|
||||
// 00 no icon
|
||||
// 01 Icon lasts for 4 frames
|
||||
// 10 Icon lasts for 8 frames
|
||||
// 11 Icon lasts for 12 frames
|
||||
//
|
||||
u8 Permissions; //0x34 0x01 file-permissions
|
||||
// bit permission Description
|
||||
// 4 no move File cannot be moved by the IPL
|
||||
// 3 no copy File cannot be copied by the IPL
|
||||
// 2 public Can be read by any game
|
||||
//
|
||||
u8 CopyCounter; //0x35 0x01 copy counter (*2)
|
||||
u8 FirstBlock[2]; //0x36 0x02 block no of first block of file (0 == offset 0)
|
||||
u8 BlockCount[2]; //0x38 0x02 file-length (number of blocks in file)
|
||||
u8 Unused2[2]; //0x3a 0x02 reserved/unused (always 0xffff, has no effect)
|
||||
u8 CommentsAddr[4]; //0x3c 0x04 Address of the two comments within the file data (*3)
|
||||
u8 Gamecode[4]; //0x00 0x04 Gamecode
|
||||
u8 Makercode[2]; //0x04 0x02 Makercode
|
||||
u8 Unused1; //0x06 0x01 reserved/unused (always 0xff, has no effect)
|
||||
u8 BIFlags; //0x07 0x01 banner gfx format and icon animation (Image Key)
|
||||
// Bit(s) Description
|
||||
// 2 Icon Animation 0: forward 1: ping-pong
|
||||
// 1 [--0: No Banner 1: Banner present--] WRONG! YAGCD LIES!
|
||||
// 0 [--Banner Color 0: RGB5A3 1: CI8--] WRONG! YAGCD LIES!
|
||||
// bits 0 and 1: image format
|
||||
// 00 no banner
|
||||
// 01 CI8 banner
|
||||
// 10 RGB5A3 banner
|
||||
// 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner
|
||||
//
|
||||
u8 Filename[DENTRY_STRLEN]; //0x08 0x20 Filename
|
||||
u8 ModTime[4]; //0x28 0x04 Time of file's last modification in seconds since 12am, January 1st, 2000
|
||||
u8 ImageOffset[4]; //0x2c 0x04 image data offset
|
||||
u8 IconFmt[2]; //0x30 0x02 icon gfx format (2bits per icon)
|
||||
// Bits Description
|
||||
// 00 No icon
|
||||
// 01 CI8 with a shared color palette after the last frame
|
||||
// 10 RGB5A3
|
||||
// 11 CI8 with a unique color palette after itself
|
||||
//
|
||||
u8 AnimSpeed[2]; //0x32 0x02 Animation speed (2bits per icon) (*1)
|
||||
// Bits Description
|
||||
// 00 No icon
|
||||
// 01 Icon lasts for 4 frames
|
||||
// 10 Icon lasts for 8 frames
|
||||
// 11 Icon lasts for 12 frames
|
||||
//
|
||||
u8 Permissions; //0x34 0x01 File-permissions
|
||||
// Bit Permission Description
|
||||
// 4 no move File cannot be moved by the IPL
|
||||
// 3 no copy File cannot be copied by the IPL
|
||||
// 2 public Can be read by any game
|
||||
//
|
||||
u8 CopyCounter; //0x35 0x01 Copy counter (*2)
|
||||
u8 FirstBlock[2]; //0x36 0x02 Block no of first block of file (0 == offset 0)
|
||||
u8 BlockCount[2]; //0x38 0x02 File-length (number of blocks in file)
|
||||
u8 Unused2[2]; //0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
|
||||
u8 CommentsAddr[4]; //0x3c 0x04 Address of the two comments within the file data (*3)
|
||||
};
|
||||
|
||||
struct Directory
|
||||
{
|
||||
DEntry Dir[DIRLEN]; //0x0000 Directory Entries (max 127)
|
||||
DEntry Dir[DIRLEN]; //0x0000 Directory Entries (max 127)
|
||||
u8 Padding[0x3a];
|
||||
u16 UpdateCounter; //0x1ffa 2 update Counter
|
||||
u16 Checksum; //0x1ffc 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x1ffe 2 Inverse Checksum
|
||||
u16 UpdateCounter; //0x1ffa 2 Update Counter
|
||||
u16 Checksum; //0x1ffc 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x1ffe 2 Inverse Checksum
|
||||
} dir, dir_backup;
|
||||
|
||||
Directory *CurrentDir, *PreviousDir;
|
||||
struct BlockAlloc
|
||||
{
|
||||
u16 Checksum; //0x0000 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x0002 2 Inverse Checksum
|
||||
u16 UpdateCounter; //0x0004 2 update Counter
|
||||
u16 FreeBlocks; //0x0006 2 free Blocks
|
||||
u16 LastAllocated; //0x0008 2 last allocated Block
|
||||
u16 Map[BAT_SIZE]; //0x000a 0x1ff8 Map of allocated Blocks
|
||||
u16 Checksum; //0x0000 2 Additive Checksum
|
||||
u16 Checksum_Inv; //0x0002 2 Inverse Checksum
|
||||
u16 UpdateCounter; //0x0004 2 Update Counter
|
||||
u16 FreeBlocks; //0x0006 2 Free Blocks
|
||||
u16 LastAllocated; //0x0008 2 Last allocated Block
|
||||
u16 Map[BAT_SIZE]; //0x000a 0x1ff8 Map of allocated Blocks
|
||||
u16 GetNextBlock(u16 Block) const;
|
||||
u16 NextFreeBlock(u16 StartingBlock=MC_FST_BLOCKS) const;
|
||||
bool ClearBlocks(u16 StartingBlock, u16 Length);
|
||||
|
||||
+78
-78
@@ -59,10 +59,10 @@ union USIChannelOut
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 OUTPUT1 : 8;
|
||||
u32 OUTPUT0 : 8;
|
||||
u32 CMD : 8;
|
||||
u32 : 8;
|
||||
u32 OUTPUT1 : 8;
|
||||
u32 OUTPUT0 : 8;
|
||||
u32 CMD : 8;
|
||||
u32 : 8;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -72,12 +72,12 @@ union USIChannelIn_Hi
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 INPUT3 : 8;
|
||||
u32 INPUT2 : 8;
|
||||
u32 INPUT1 : 8;
|
||||
u32 INPUT0 : 6;
|
||||
u32 ERRLATCH : 1; // 0: no error 1: Error latched. Check SISR.
|
||||
u32 ERRSTAT : 1; // 0: no error 1: error on last transfer
|
||||
u32 INPUT3 : 8;
|
||||
u32 INPUT2 : 8;
|
||||
u32 INPUT1 : 8;
|
||||
u32 INPUT0 : 6;
|
||||
u32 ERRLATCH : 1; // 0: no error 1: Error latched. Check SISR.
|
||||
u32 ERRSTAT : 1; // 0: no error 1: error on last transfer
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,10 +87,10 @@ union USIChannelIn_Lo
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 INPUT7 : 8;
|
||||
u32 INPUT6 : 8;
|
||||
u32 INPUT5 : 8;
|
||||
u32 INPUT4 : 8;
|
||||
u32 INPUT7 : 8;
|
||||
u32 INPUT6 : 8;
|
||||
u32 INPUT5 : 8;
|
||||
u32 INPUT4 : 8;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -109,17 +109,17 @@ union USIPoll
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 VBCPY3 : 1; // 1: write to output buffer only on vblank
|
||||
u32 VBCPY2 : 1;
|
||||
u32 VBCPY1 : 1;
|
||||
u32 VBCPY0 : 1;
|
||||
u32 EN3 : 1; // Enable polling of channel
|
||||
u32 EN2 : 1; // does not affect communication RAM transfers
|
||||
u32 EN1 : 1;
|
||||
u32 EN0 : 1;
|
||||
u32 Y : 8; // Polls per frame
|
||||
u32 X : 10; // Polls per X lines. begins at vsync, min 7, max depends on video mode
|
||||
u32 : 6;
|
||||
u32 VBCPY3 : 1; // 1: write to output buffer only on vblank
|
||||
u32 VBCPY2 : 1;
|
||||
u32 VBCPY1 : 1;
|
||||
u32 VBCPY0 : 1;
|
||||
u32 EN3 : 1; // Enable polling of channel
|
||||
u32 EN2 : 1; // does not affect communication RAM transfers
|
||||
u32 EN1 : 1;
|
||||
u32 EN0 : 1;
|
||||
u32 Y : 8; // Polls per frame
|
||||
u32 X : 10; // Polls per X lines. begins at vsync, min 7, max depends on video mode
|
||||
u32 : 6;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -129,22 +129,22 @@ union USIComCSR
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 TSTART : 1; // write: start transfer read: transfer status
|
||||
u32 CHANNEL : 2; // determines which SI channel will be used on the communication interface.
|
||||
u32 : 3;
|
||||
u32 CALLBEN : 1; // Callback enable
|
||||
u32 CMDEN : 1; // Command enable?
|
||||
u32 INLNGTH : 7;
|
||||
u32 : 1;
|
||||
u32 OUTLNGTH : 7; // Communication Channel Output Length in bytes
|
||||
u32 : 1;
|
||||
u32 CHANEN : 1; // Channel enable?
|
||||
u32 CHANNUM : 2; // Channel number?
|
||||
u32 RDSTINTMSK : 1; // Read Status Interrupt Status Mask
|
||||
u32 RDSTINT : 1; // Read Status Interrupt Status
|
||||
u32 COMERR : 1; // Communication Error (set 0)
|
||||
u32 TCINTMSK : 1; // Transfer Complete Interrupt Mask
|
||||
u32 TCINT : 1; // Transfer Complete Interrupt
|
||||
u32 TSTART : 1; // write: start transfer read: transfer status
|
||||
u32 CHANNEL : 2; // determines which SI channel will be used on the communication interface.
|
||||
u32 : 3;
|
||||
u32 CALLBEN : 1; // Callback enable
|
||||
u32 CMDEN : 1; // Command enable?
|
||||
u32 INLNGTH : 7;
|
||||
u32 : 1;
|
||||
u32 OUTLNGTH : 7; // Communication Channel Output Length in bytes
|
||||
u32 : 1;
|
||||
u32 CHANEN : 1; // Channel enable?
|
||||
u32 CHANNUM : 2; // Channel number?
|
||||
u32 RDSTINTMSK : 1; // Read Status Interrupt Status Mask
|
||||
u32 RDSTINT : 1; // Read Status Interrupt Status
|
||||
u32 COMERR : 1; // Communication Error (set 0)
|
||||
u32 TCINTMSK : 1; // Transfer Complete Interrupt Mask
|
||||
u32 TCINT : 1; // Transfer Complete Interrupt
|
||||
};
|
||||
USIComCSR() {Hex = 0;}
|
||||
USIComCSR(u32 _hex) {Hex = _hex;}
|
||||
@@ -156,35 +156,35 @@ union USIStatusReg
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 UNRUN3 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN3 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL3 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP3 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST3 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST3 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 7:6
|
||||
u32 UNRUN2 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN2 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL2 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP2 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST2 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST2 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 15:14
|
||||
u32 UNRUN1 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN1 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL1 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP1 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST1 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST1 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 23:22
|
||||
u32 UNRUN0 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN0 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL0 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP0 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST0 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST0 : 1; // (R) 1: new Data available
|
||||
u32 : 1;
|
||||
u32 WR : 1; // (RW) write 1 start copy, read 0 copy done
|
||||
u32 UNRUN3 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN3 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL3 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP3 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST3 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST3 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 7:6
|
||||
u32 UNRUN2 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN2 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL2 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP2 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST2 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST2 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 15:14
|
||||
u32 UNRUN1 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN1 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL1 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP1 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST1 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST1 : 1; // (R) 1: new Data available
|
||||
u32 : 2; // 23:22
|
||||
u32 UNRUN0 : 1; // (RWC) write 1: bit cleared read 1: main proc underrun error
|
||||
u32 OVRUN0 : 1; // (RWC) write 1: bit cleared read 1: overrun error
|
||||
u32 COLL0 : 1; // (RWC) write 1: bit cleared read 1: collision error
|
||||
u32 NOREP0 : 1; // (RWC) write 1: bit cleared read 1: response error
|
||||
u32 WRST0 : 1; // (R) 1: buffer channel0 not copied
|
||||
u32 RDST0 : 1; // (R) 1: new Data available
|
||||
u32 : 1;
|
||||
u32 WR : 1; // (RW) write 1 start copy, read 0 copy done
|
||||
};
|
||||
USIStatusReg() {Hex = 0;}
|
||||
USIStatusReg(u32 _hex) {Hex = _hex;}
|
||||
@@ -196,18 +196,18 @@ union USIEXIClockCount
|
||||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 LOCK : 1; // 1: prevents CPU from setting EXI clock to 32MHz
|
||||
u32 : 0;
|
||||
u32 LOCK : 1; // 1: prevents CPU from setting EXI clock to 32MHz
|
||||
u32 : 0;
|
||||
};
|
||||
};
|
||||
|
||||
// STATE_TO_SAVE
|
||||
static SSIChannel g_Channel[MAX_SI_CHANNELS];
|
||||
static USIPoll g_Poll;
|
||||
static USIComCSR g_ComCSR;
|
||||
static USIStatusReg g_StatusReg;
|
||||
static USIEXIClockCount g_EXIClockCount;
|
||||
static u8 g_SIBuffer[128];
|
||||
static SSIChannel g_Channel[MAX_SI_CHANNELS];
|
||||
static USIPoll g_Poll;
|
||||
static USIComCSR g_ComCSR;
|
||||
static USIStatusReg g_StatusReg;
|
||||
static USIEXIClockCount g_EXIClockCount;
|
||||
static u8 g_SIBuffer[128];
|
||||
|
||||
void DoState(PointerWrap &p)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user