summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-02-09 18:29:13 -0500
committerLioncash <mathew1800@gmail.com>2014-02-09 19:40:11 -0500
commitebb48d019eec1c29a37a406e2db16d7565367faa (patch)
tree254aa42356ced8de7c87d9da181cff4475c12ba4 /Source/Core
parent40182a48a56b8e294e126c64f5f37910a40c67cd (diff)
Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/BreakPoints.h22
-rw-r--r--Source/Core/Common/CommonFuncs.h2
-rw-r--r--Source/Core/Common/FileUtil.h6
-rw-r--r--Source/Core/Common/MathUtil.h4
-rw-r--r--Source/Core/Core/ConfigManager.cpp176
-rw-r--r--Source/Core/Core/ConfigManager.h18
-rw-r--r--Source/Core/Core/DSP/DSPCore.cpp4
-rw-r--r--Source/Core/Core/DSP/LabelMap.h2
-rw-r--r--Source/Core/Core/DSP/assemble.h6
-rw-r--r--Source/Core/Core/Debugger/Debugger_SymbolMap.h4
-rw-r--r--Source/Core/Core/HLE/HLE.cpp36
-rw-r--r--Source/Core/Core/HW/AudioInterface.cpp24
-rw-r--r--Source/Core/Core/HW/DSP.cpp36
-rw-r--r--Source/Core/Core/HW/DSPHLE/UCodes/UCode_AXStructs.h18
-rw-r--r--Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda.h166
-rw-r--r--Source/Core/Core/HW/DVDInterface.cpp84
-rw-r--r--Source/Core/Core/HW/EXI_Channel.h50
-rw-r--r--Source/Core/Core/HW/EXI_DeviceMic.h18
-rw-r--r--Source/Core/Core/HW/GCMemcard.h132
-rw-r--r--Source/Core/Core/HW/SI.cpp156
-rw-r--r--Source/Core/Core/HW/SI_DeviceDanceMat.h12
-rw-r--r--Source/Core/Core/HW/SI_DeviceGCController.h14
-rw-r--r--Source/Core/Core/HW/SI_DeviceGCSteeringWheel.h12
-rw-r--r--Source/Core/Core/HW/Sram.h36
-rw-r--r--Source/Core/Core/HW/VideoInterface.h134
-rw-r--r--Source/Core/Core/HW/WII_IPC.cpp16
-rw-r--r--Source/Core/Core/HW/WiimoteEmu/WiimoteHid.h20
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h74
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.h19
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.h72
-rw-r--r--Source/Core/Core/IPC_HLE/WII_Socket.h6
-rw-r--r--Source/Core/Core/Movie.h60
-rw-r--r--Source/Core/Core/NetPlayClient.h32
-rw-r--r--Source/Core/Core/NetPlayProto.h4
-rw-r--r--Source/Core/Core/NetPlayServer.h8
-rw-r--r--Source/Core/Core/PowerPC/Gekko.h645
-rw-r--r--Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp2
-rw-r--r--Source/Core/Core/ec_wii.h60
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp8
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.h16
-rw-r--r--Source/Core/VideoBackends/Software/SWCommandProcessor.h34
-rw-r--r--Source/Core/VideoBackends/Software/SWPixelEngine.h50
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp6
-rw-r--r--Source/Core/VideoCommon/BPMemory.h204
-rw-r--r--Source/Core/VideoCommon/CPMemory.h116
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.h34
-rw-r--r--Source/Core/VideoCommon/LightingShaderGen.h12
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.cpp4
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp60
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.h22
50 files changed, 1379 insertions, 1377 deletions
diff --git a/Source/Core/Common/BreakPoints.h b/Source/Core/Common/BreakPoints.h
index a17cce5341..e9ac0b1667 100644
--- a/Source/Core/Common/BreakPoints.h
+++ b/Source/Core/Common/BreakPoints.h
@@ -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;
};
diff --git a/Source/Core/Common/CommonFuncs.h b/Source/Core/Common/CommonFuncs.h
index 63bdc04dfb..1b385859d5 100644
--- a/Source/Core/Common/CommonFuncs.h
+++ b/Source/Core/Common/CommonFuncs.h
@@ -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
diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h
index 91de214a38..4fee364a2e 100644
--- a/Source/Core/Common/FileUtil.h
+++ b/Source/Core/Common/FileUtil.h
@@ -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;
};
diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h
index 599701ca16..3e7b198c49 100644
--- a/Source/Core/Common/MathUtil.h
+++ b/Source/Core/Common/MathUtil.h
@@ -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)
diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp
index f28dfa5d21..6877d10ca5 100644
--- a/Source/Core/Core/ConfigManager.cpp
+++ b/Source/Core/Core/ConfigManager.cpp
@@ -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 */ },
-
- { "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 */ },
-
- { "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 */ },
+ { "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 */ },
+
+ { "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 */ },
+
+ { "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 */ },
-
- { "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 */ },
-
- { "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 */ },
+ { "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 */ },
+
+ { "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 */ },
+
+ { "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 */ },
-
- { "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 */ },
-
- { "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 */ },
+ { "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 */ },
+
+ { "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 */ },
};
SConfig::SConfig()
diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h
index 6fc411a3ea..7a688760fa 100644
--- a/Source/Core/Core/ConfigManager.h
+++ b/Source/Core/Core/ConfigManager.h
@@ -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
diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp
index ff05dcb3fa..caaff46be5 100644
--- a/Source/Core/Core/DSP/DSPCore.cpp
+++ b/Source/Core/Core/DSP/DSPCore.cpp
@@ -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 },
diff --git a/Source/Core/Core/DSP/LabelMap.h b/Source/Core/Core/DSP/LabelMap.h
index 908b3bd7c9..4f700bb632 100644
--- a/Source/Core/Core/DSP/LabelMap.h
+++ b/Source/Core/Core/DSP/LabelMap.h
@@ -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;
diff --git a/Source/Core/Core/DSP/assemble.h b/Source/Core/Core/DSP/assemble.h
index 5a15ed2ded..25795c8153 100644
--- a/Source/Core/Core/DSP/assemble.h
+++ b/Source/Core/Core/DSP/assemble.h
@@ -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
diff --git a/Source/Core/Core/Debugger/Debugger_SymbolMap.h b/Source/Core/Core/Debugger/Debugger_SymbolMap.h
index 2d470e2059..dde4ba0b04 100644
--- a/Source/Core/Core/Debugger/Debugger_SymbolMap.h
+++ b/Source/Core/Core/Debugger/Debugger_SymbolMap.h
@@ -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);
diff --git a/Source/Core/Core/HLE/HLE.cpp b/Source/Core/Core/HLE/HLE.cpp
index 24180fc6b5..c0ecc50826 100644
--- a/Source/Core/Core/HLE/HLE.cpp
+++ b/Source/Core/Core/HLE/HLE.cpp
@@ -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 },
-
- { "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 },
+ { "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 },
};
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)
diff --git a/Source/Core/Core/HW/AudioInterface.cpp b/Source/Core/Core/HW/AudioInterface.cpp
index 4b406932a9..70a4dd099c 100644
--- a/Source/Core/Core/HW/AudioInterface.cpp
+++ b/Source/Core/Core/HW/AudioInterface.cpp
@@ -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;
};
diff --git a/Source/Core/Core/HW/DSP.cpp b/Source/Core/Core/HW/DSP.cpp
index 807793b5cc..821ba69925 100644
--- a/Source/Core/Core/HW/DSP.cpp
+++ b/Source/Core/Core/HW/DSP.cpp
@@ -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;
diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_AXStructs.h b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_AXStructs.h
index 58039fc2f9..e4c538bfc5 100644
--- a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_AXStructs.h
+++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_AXStructs.h
@@ -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;
diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda.h b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda.h
index 76f2663317..1f33a08a7a 100644
--- a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda.h
+++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda.h
@@ -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 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 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 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 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 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 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
// 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];
};
diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp
index d1dfbf97e9..90e2bbf2eb 100644
--- a/Source/Core/Core/HW/DVDInterface.cpp
+++ b/Source/Core/Core/HW/DVDInterface.cpp
@@ -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 u32 LoopStart;
-static u32 AudioPos;
-static u32 CurrentStart;
-static u32 LoopLength;
-static u32 CurrentLength;
-
-u32 g_ErrorCode = 0;
+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;
+
+u32 g_ErrorCode = 0;
bool g_bDiscInside = false;
bool g_bStream = false;
int tc = 0;
diff --git a/Source/Core/Core/HW/EXI_Channel.h b/Source/Core/Core/HW/EXI_Channel.h
index 550b948778..d47e1be7da 100644
--- a/Source/Core/Core/HW/EXI_Channel.h
+++ b/Source/Core/Core/HW/EXI_Channel.h
@@ -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
diff --git a/Source/Core/Core/HW/EXI_DeviceMic.h b/Source/Core/Core/HW/EXI_DeviceMic.h
index e4d29009ba..3305362934 100644
--- a/Source/Core/Core/HW/EXI_DeviceMic.h
+++ b/Source/Core/Core/HW/EXI_DeviceMic.h
@@ -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
};
};
diff --git a/Source/Core/Core/HW/GCMemcard.h b/Source/Core/Core/HW/GCMemcard.h
index fdd553194a..ad001de03c 100644
--- a/Source/Core/Core/HW/GCMemcard.h
+++ b/Source/Core/Core/HW/GCMemcard.h
@@ -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);
diff --git a/Source/Core/Core/HW/SI.cpp b/Source/Core/Core/HW/SI.cpp
index eccbab41ec..8e087df6a6 100644
--- a/Source/Core/Core/HW/SI.cpp
+++ b/Source/Core/Core/HW/SI.cpp
@@ -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)
{
diff --git a/Source/Core/Core/HW/SI_DeviceDanceMat.h b/Source/Core/Core/HW/SI_DeviceDanceMat.h
index 29b1609fae..14636c0b4e 100644
--- a/Source/Core/Core/HW/SI_DeviceDanceMat.h
+++ b/Source/Core/Core/HW/SI_DeviceDanceMat.h
@@ -49,13 +49,13 @@ private:
u32 Hex;
struct
{
- u32 Parameter1 : 8;
- u32 Parameter2 : 8;
- u32 Command : 8;
- u32 : 8;
+ u32 Parameter1 : 8;
+ u32 Parameter2 : 8;
+ u32 Command : 8;
+ u32 : 8;
};
- UCommand() {Hex = 0;}
- UCommand(u32 _iValue) {Hex = _iValue;}
+ UCommand() {Hex = 0;}
+ UCommand(u32 _iValue) {Hex = _iValue;}
};
enum EButtonCombo
diff --git a/Source/Core/Core/HW/SI_DeviceGCController.h b/Source/Core/Core/HW/SI_DeviceGCController.h
index f23a4decfc..30087ca4ed 100644
--- a/Source/Core/Core/HW/SI_DeviceGCController.h
+++ b/Source/Core/Core/HW/SI_DeviceGCController.h
@@ -26,7 +26,7 @@ private:
struct SOrigin
{
u8 uCommand;// Maybe should be button bits?
- u8 unk_1; // ..and this would be the other half
+ u8 unk_1; // ..and this would be the other half
u8 uOriginStickX;
u8 uOriginStickY;
u8 uSubStickStickX;
@@ -49,13 +49,13 @@ private:
u32 Hex;
struct
{
- u32 Parameter1 : 8;
- u32 Parameter2 : 8;
- u32 Command : 8;
- u32 : 8;
+ u32 Parameter1 : 8;
+ u32 Parameter2 : 8;
+ u32 Command : 8;
+ u32 : 8;
};
- UCommand() {Hex = 0;}
- UCommand(u32 _iValue) {Hex = _iValue;}
+ UCommand() {Hex = 0;}
+ UCommand(u32 _iValue) {Hex = _iValue;}
};
enum EButtonCombo
diff --git a/Source/Core/Core/HW/SI_DeviceGCSteeringWheel.h b/Source/Core/Core/HW/SI_DeviceGCSteeringWheel.h
index 9150df132f..8bf9f4fe70 100644
--- a/Source/Core/Core/HW/SI_DeviceGCSteeringWheel.h
+++ b/Source/Core/Core/HW/SI_DeviceGCSteeringWheel.h
@@ -50,13 +50,13 @@ private:
u32 Hex;
struct
{
- u32 Parameter1 : 8;
- u32 Parameter2 : 8;
- u32 Command : 8;
- u32 : 8;
+ u32 Parameter1 : 8;
+ u32 Parameter2 : 8;
+ u32 Command : 8;
+ u32 : 8;
};
- UCommand() {Hex = 0;}
- UCommand(u32 _iValue) {Hex = _iValue;}
+ UCommand() {Hex = 0;}
+ UCommand(u32 _iValue) {Hex = _iValue;}
};
enum EButtonCombo
diff --git a/Source/Core/Core/HW/Sram.h b/Source/Core/Core/HW/Sram.h
index 30d535a5b8..4c9b3d3c05 100644
--- a/Source/Core/Core/HW/Sram.h
+++ b/Source/Core/Core/HW/Sram.h
@@ -42,25 +42,25 @@ distribution.
union SRAM
{
u8 p_SRAM[64];
- struct { // Stored configuration value from the system SRAM area
- u16 checksum; // holds the block checksum.
- u16 checksum_inv; // holds the inverse block checksum
- u32 ead0; // unknown attribute
- u32 ead1; // unknown attribute
- u32 counter_bias; // bias value for the realtime clock
- s8 display_offsetH; // pixel offset for the VI
- u8 ntd; // unknown attribute
- u8 lang; // language of system
- u8 flags; // device and operations flag
+ struct { // Stored configuration value from the system SRAM area
+ u16 checksum; // Holds the block checksum.
+ u16 checksum_inv; // Holds the inverse block checksum
+ u32 ead0; // Unknown attribute
+ u32 ead1; // Unknown attribute
+ u32 counter_bias; // Bias value for the realtime clock
+ s8 display_offsetH; // Pixel offset for the VI
+ u8 ntd; // Unknown attribute
+ u8 lang; // Language of system
+ u8 flags; // Device and operations flag
- // Stored configuration value from the extended SRAM area
- u8 flash_id[2][12]; // flash_id[2][12] 96bit memorycard unlock flash ID
- u32 wirelessKbd_id; // Device ID of last connected wireless keyboard
- u16 wirelessPad_id[4]; // 16bit device ID of last connected pad.
- u8 dvderr_code; // last non-recoverable error from DVD interface
- u8 __padding0; // reserved
- u8 flashID_chksum[2]; // 8bit checksum of unlock flash ID
- u32 __padding1; // padding
+ // Stored configuration value from the extended SRAM area
+ u8 flash_id[2][12]; // flash_id[2][12] 96bit memorycard unlock flash ID
+ u32 wirelessKbd_id; // Device ID of last connected wireless keyboard
+ u16 wirelessPad_id[4]; // 16-bit device ID of last connected pad.
+ u8 dvderr_code; // last non-recoverable error from DVD interface
+ u8 __padding0; // reserved
+ u8 flashID_chksum[2]; // 8-bit checksum of unlock flash ID
+ u32 __padding1; // padding
};
};
#pragma pack(pop)
diff --git a/Source/Core/Core/HW/VideoInterface.h b/Source/Core/Core/HW/VideoInterface.h
index 5677e4d6d1..6ea32d265a 100644
--- a/Source/Core/Core/HW/VideoInterface.h
+++ b/Source/Core/Core/HW/VideoInterface.h
@@ -102,9 +102,9 @@ union UVIVerticalTimingRegister
u16 Hex;
struct
{
- u16 EQU : 4; // Equalization pulse in half lines
- u16 ACV : 10; // Active video in lines per field (seems always zero)
- u16 : 2;
+ u16 EQU : 4; // Equalization pulse in half lines
+ u16 ACV : 10; // Active video in lines per field (seems always zero)
+ u16 : 2;
};
UVIVerticalTimingRegister(u16 _hex) { Hex = _hex;}
UVIVerticalTimingRegister() { Hex = 0;}
@@ -115,14 +115,14 @@ union UVIDisplayControlRegister
u16 Hex;
struct
{
- u16 ENB : 1; // Enables video timing generation and data request
- u16 RST : 1; // Clears all data requests and puts VI into its idle state
- u16 NIN : 1; // 0: Interlaced, 1: Non-Interlaced: top field drawn at field rate and bottom field is not displayed
- u16 DLR : 1; // Selects 3D Display Mode
- u16 LE0 : 2; // Display Latch; 0: Off, 1: On for 1 field, 2: On for 2 fields, 3: Always on
- u16 LE1 : 2;
- u16 FMT : 2; // 0: NTSC, 1: PAL, 2: MPAL, 3: Debug
- u16 : 6;
+ u16 ENB : 1; // Enables video timing generation and data request
+ u16 RST : 1; // Clears all data requests and puts VI into its idle state
+ u16 NIN : 1; // 0: Interlaced, 1: Non-Interlaced: top field drawn at field rate and bottom field is not displayed
+ u16 DLR : 1; // Selects 3D Display Mode
+ u16 LE0 : 2; // Display Latch; 0: Off, 1: On for 1 field, 2: On for 2 fields, 3: Always on
+ u16 LE1 : 2;
+ u16 FMT : 2; // 0: NTSC, 1: PAL, 2: MPAL, 3: Debug
+ u16 : 6;
};
UVIDisplayControlRegister(u16 _hex) { Hex = _hex;}
UVIDisplayControlRegister() { Hex = 0;}
@@ -134,12 +134,12 @@ union UVIHorizontalTiming0
struct { u16 Lo, Hi; };
struct
{
- u32 HLW : 9; // Halfline Width (W*16 = Width (720))
- u32 : 7;
- u32 HCE : 7; // Horizontal Sync Start to Color Burst End
- u32 : 1;
- u32 HCS : 7; // Horizontal Sync Start to Color Burst Start
- u32 : 1;
+ u32 HLW : 9; // Halfline Width (W*16 = Width (720))
+ u32 : 7;
+ u32 HCE : 7; // Horizontal Sync Start to Color Burst End
+ u32 : 1;
+ u32 HCS : 7; // Horizontal Sync Start to Color Burst Start
+ u32 : 1;
};
};
@@ -149,11 +149,11 @@ union UVIHorizontalTiming1
struct { u16 Lo, Hi; };
struct
{
- u32 HSY : 7; // Horizontal Sync Width
- u32 HBE640 : 9; // Horizontal Sync Start to horizontal blank end
- u32 : 1;
- u32 HBS640 : 9; // Half line to horizontal blanking start
- u32 : 6;
+ u32 HSY : 7; // Horizontal Sync Width
+ u32 HBE640 : 9; // Horizontal Sync Start to horizontal blank end
+ u32 : 1;
+ u32 HBS640 : 9; // Half line to horizontal blanking start
+ u32 : 6;
};
};
@@ -164,10 +164,10 @@ union UVIVBlankTimingRegister
struct { u16 Lo, Hi; };
struct
{
- u32 PRB : 10; // Pre-blanking in half lines
- u32 : 6;
- u32 PSB : 10; // Post blanking in half lines
- u32 : 6;
+ u32 PRB : 10; // Pre-blanking in half lines
+ u32 : 6;
+ u32 PSB : 10; // Post blanking in half lines
+ u32 : 6;
};
};
@@ -178,10 +178,10 @@ union UVIBurstBlankingRegister
struct { u16 Lo, Hi; };
struct
{
- u32 BS0 : 5; // Field x start to burst blanking start in halflines
- u32 BE0 : 11; // Field x start to burst blanking end in halflines
- u32 BS2 : 5; // Field x+2 start to burst blanking start in halflines
- u32 BE2 : 11; // Field x+2 start to burst blanking end in halflines
+ u32 BS0 : 5; // Field x start to burst blanking start in halflines
+ u32 BE0 : 11; // Field x start to burst blanking end in halflines
+ u32 BS2 : 5; // Field x+2 start to burst blanking start in halflines
+ u32 BE2 : 11; // Field x+2 start to burst blanking end in halflines
};
};
@@ -192,11 +192,11 @@ union UVIFBInfoRegister
struct
{
// TODO: mask out lower 9bits/align to 9bits???
- u32 FBB : 24; // Base address of the framebuffer in external mem
+ u32 FBB : 24; // Base address of the framebuffer in external mem
// POFF only seems to exist in the top reg. XOFF, unknown.
- u32 XOFF : 4; // Horizontal Offset of the left-most pixel within the first word of the fetched picture
- u32 POFF : 1; // Page offest: 1: fb address is (address>>5)
- u32 CLRPOFF : 3; // ? setting bit 31 clears POFF
+ u32 XOFF : 4; // Horizontal Offset of the left-most pixel within the first word of the fetched picture
+ u32 POFF : 1; // Page offest: 1: fb address is (address>>5)
+ u32 CLRPOFF : 3; // ? setting bit 31 clears POFF
};
};
@@ -207,13 +207,13 @@ union UVIInterruptRegister
struct { u16 Lo, Hi; };
struct
{
- u32 HCT : 11; // Horizontal Position
- u32 : 5;
- u32 VCT : 11; // Vertical Position
- u32 : 1;
- u32 IR_MASK : 1; // Interrupt Mask Bit
- u32 : 2;
- u32 IR_INT : 1; // Interrupt Status (1=Active, 0=Clear)
+ u32 HCT : 11; // Horizontal Position
+ u32 : 5;
+ u32 VCT : 11; // Vertical Position
+ u32 : 1;
+ u32 IR_MASK : 1; // Interrupt Mask Bit
+ u32 : 2;
+ u32 IR_INT : 1; // Interrupt Status (1=Active, 0=Clear)
};
};
@@ -223,11 +223,11 @@ union UVILatchRegister
struct { u16 Lo, Hi; };
struct
{
- u32 HCT : 11; // Horizontal Count
- u32 : 5;
- u32 VCT : 11; // Vertical Count
- u32 : 4;
- u32 TRG : 1; // Trigger Flag
+ u32 HCT : 11; // Horizontal Count
+ u32 : 5;
+ u32 VCT : 11; // Vertical Count
+ u32 : 4;
+ u32 TRG : 1; // Trigger Flag
};
};
@@ -236,8 +236,8 @@ union UVIHorizontalStepping
u16 Hex;
struct
{
- u16 FbSteps : 8;
- u16 FieldSteps : 8;
+ u16 FbSteps : 8;
+ u16 FieldSteps : 8;
};
};
@@ -246,10 +246,10 @@ union UVIHorizontalScaling
u16 Hex;
struct
{
- u16 STP : 9; // Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320)
- u16 : 3;
- u16 HS_EN : 1; // Enable Horizontal Scaling
- u16 : 3;
+ u16 STP : 9; // Horizontal stepping size (U1.8 Scaler Value) (0x160 Works for 320)
+ u16 : 3;
+ u16 HS_EN : 1; // Enable Horizontal Scaling
+ u16 : 3;
};
UVIHorizontalScaling(u16 _hex) { Hex = _hex;}
UVIHorizontalScaling() { Hex = 0;}
@@ -262,10 +262,10 @@ union UVIFilterCoefTable3
struct { u16 Lo, Hi; };
struct
{
- u32 Tap0 : 10;
- u32 Tap1 : 10;
- u32 Tap2 : 10;
- u32 : 2;
+ u32 Tap0 : 10;
+ u32 Tap1 : 10;
+ u32 Tap2 : 10;
+ u32 : 2;
};
};
@@ -276,10 +276,10 @@ union UVIFilterCoefTable4
struct { u16 Lo, Hi; };
struct
{
- u32 Tap0 : 8;
- u32 Tap1 : 8;
- u32 Tap2 : 8;
- u32 Tap3 : 8;
+ u32 Tap0 : 8;
+ u32 Tap1 : 8;
+ u32 Tap2 : 8;
+ u32 Tap3 : 8;
};
};
@@ -296,10 +296,10 @@ union UVIBorderBlankRegister
struct { u16 Lo, Hi; };
struct
{
- u32 HBE656 : 10; // Border Horizontal Blank End
- u32 : 11;
- u32 HBS656 : 10; // Border Horizontal Blank start
- u32 BRDR_EN : 1; // Border Enable
+ u32 HBE656 : 10; // Border Horizontal Blank End
+ u32 : 11;
+ u32 HBS656 : 10; // Border Horizontal Blank start
+ u32 BRDR_EN : 1; // Border Enable
};
};
@@ -309,9 +309,9 @@ union UVIDTVStatus
u16 Hex;
struct
{
- u16 component_plugged : 1;
- u16 ntsc_j : 1;
- u16 :14;
+ u16 component_plugged : 1;
+ u16 ntsc_j : 1;
+ u16 :14;
};
};
diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp
index de218451b9..912bb8a61d 100644
--- a/Source/Core/Core/HW/WII_IPC.cpp
+++ b/Source/Core/Core/HW/WII_IPC.cpp
@@ -47,14 +47,14 @@ enum
struct CtrlRegister
{
- u8 X1 : 1;
- u8 X2 : 1;
- u8 Y1 : 1;
- u8 Y2 : 1;
- u8 IX1 : 1;
- u8 IX2 : 1;
- u8 IY1 : 1;
- u8 IY2 : 1;
+ u8 X1 : 1;
+ u8 X2 : 1;
+ u8 Y1 : 1;
+ u8 Y2 : 1;
+ u8 IX1 : 1;
+ u8 IX2 : 1;
+ u8 IY1 : 1;
+ u8 IY2 : 1;
CtrlRegister() { X1 = X2 = Y1 = Y2 = IX1 = IX2 = IY1 = IY2 = 0; }
diff --git a/Source/Core/Core/HW/WiimoteEmu/WiimoteHid.h b/Source/Core/Core/HW/WiimoteEmu/WiimoteHid.h
index 751c177f98..11c8d0be66 100644
--- a/Source/Core/Core/HW/WiimoteEmu/WiimoteHid.h
+++ b/Source/Core/Core/HW/WiimoteEmu/WiimoteHid.h
@@ -382,23 +382,23 @@ struct cc_trigger
struct nu_cal
{
- wm_accel cal_zero; // zero calibration
+ wm_accel cal_zero; // zero calibration
u8 pad1;
- wm_accel cal_g; // g size
+ wm_accel cal_g; // g size
u8 pad2;
- nu_js jx; //
- nu_js jy; //
+ nu_js jx;
+ nu_js jy;
u8 sum[2];
};
struct cc_cal
{
- nu_js Lx; //
- nu_js Ly; //
- nu_js Rx; //
- nu_js Ry; //
- cc_trigger Tl; //
- cc_trigger Tr; //
+ nu_js Lx;
+ nu_js Ly;
+ nu_js Rx;
+ nu_js Ry;
+ cc_trigger Tl;
+ cc_trigger Tr;
};
struct gh3_cal
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h
index 49249a2053..708063255b 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h
@@ -11,30 +11,30 @@
#include "ChunkFile.h"
-#define FS_SUCCESS (u32)0 // Success
-#define FS_EACCES (u32)-1 // Permission denied
-#define FS_EEXIST (u32)-2 // File exists
-#define FS_EINVAL (u32)-4 // Invalid argument Invalid FD
-#define FS_ENOENT (u32)-6 // File not found
-#define FS_EBUSY (u32)-8 // Resource busy
-#define FS_EIO (u32)-12 // Returned on ECC error
-#define FS_ENOMEM (u32)-22 // Alloc failed during request
-#define FS_EFATAL (u32)-101 // Fatal error
-#define FS_EACCESS (u32)-102 // Permission denied
-#define FS_ECORRUPT (u32)-103 // returned for "corrupted" NAND
-#define FS_EEXIST2 (u32)-105 // File exists
-#define FS_ENOENT2 (u32)-106 // File not found
-#define FS_ENFILE (u32)-107 // Too many fds open
-#define FS_EFBIG (u32)-108 // Max block count reached?
-#define FS_EFDEXHAUSTED (u32)-109 // Too many fds open
-#define FS_ENAMELEN (u32)-110 // Pathname is too long
-#define FS_EFDOPEN (u32)-111 // FD is already open
-#define FS_EIO2 (u32)-114 // Returned on ECC error
-#define FS_ENOTEMPTY (u32)-115 // Directory not empty
-#define FS_EDIRDEPTH (u32)-116 // Max directory depth exceeded
-#define FS_EBUSY2 (u32)-118 // Resource busy
-//#define FS_EFATAL (u32)-119 // Fatal error not used by IOS as fatal ERROR
-#define FS_EESEXHAUSTED (u32)-1016 // Max of 2 ES handles at a time
+#define FS_SUCCESS (u32)0 // Success
+#define FS_EACCES (u32)-1 // Permission denied
+#define FS_EEXIST (u32)-2 // File exists
+#define FS_EINVAL (u32)-4 // Invalid argument Invalid FD
+#define FS_ENOENT (u32)-6 // File not found
+#define FS_EBUSY (u32)-8 // Resource busy
+#define FS_EIO (u32)-12 // Returned on ECC error
+#define FS_ENOMEM (u32)-22 // Alloc failed during request
+#define FS_EFATAL (u32)-101 // Fatal error
+#define FS_EACCESS (u32)-102 // Permission denied
+#define FS_ECORRUPT (u32)-103 // returned for "corrupted" NAND
+#define FS_EEXIST2 (u32)-105 // File exists
+#define FS_ENOENT2 (u32)-106 // File not found
+#define FS_ENFILE (u32)-107 // Too many fds open
+#define FS_EFBIG (u32)-108 // Max block count reached?
+#define FS_EFDEXHAUSTED (u32)-109 // Too many fds open
+#define FS_ENAMELEN (u32)-110 // Pathname is too long
+#define FS_EFDOPEN (u32)-111 // FD is already open
+#define FS_EIO2 (u32)-114 // Returned on ECC error
+#define FS_ENOTEMPTY (u32)-115 // Directory not empty
+#define FS_EDIRDEPTH (u32)-116 // Max directory depth exceeded
+#define FS_EBUSY2 (u32)-118 // Resource busy
+//#define FS_EFATAL (u32)-119 // Fatal error not used by IOS as fatal ERROR
+#define FS_EESEXHAUSTED (u32)-1016 // Max of 2 ES handles at a time
// A struct for IOS ioctlv calls
struct SIOCtlVBuffer
@@ -44,10 +44,10 @@ struct SIOCtlVBuffer
// These are the Ioctlv parameters in the IOS communication. The BufferVector
// is a memory address offset at where the in and out buffer addresses are
// stored.
- Parameter = Memory::Read_U32(m_Address + 0x0C); // command 3, arg0
- NumberInBuffer = Memory::Read_U32(m_Address + 0x10); // 4, arg1
- NumberPayloadBuffer = Memory::Read_U32(m_Address + 0x14); // 5, arg2
- BufferVector = Memory::Read_U32(m_Address + 0x18); // 6, arg3
+ Parameter = Memory::Read_U32(m_Address + 0x0C); // command 3, arg0
+ NumberInBuffer = Memory::Read_U32(m_Address + 0x10); // 4, arg1
+ NumberPayloadBuffer = Memory::Read_U32(m_Address + 0x14); // 5, arg2
+ BufferVector = Memory::Read_U32(m_Address + 0x18); // 6, arg3
// The start of the out buffer
u32 BufferVectorOffset = BufferVector;
@@ -56,9 +56,9 @@ struct SIOCtlVBuffer
for (u32 i = 0; i < NumberInBuffer; i++)
{
SBuffer Buffer;
- Buffer.m_Address = Memory::Read_U32(BufferVectorOffset);
+ Buffer.m_Address = Memory::Read_U32(BufferVectorOffset);
BufferVectorOffset += 4;
- Buffer.m_Size = Memory::Read_U32(BufferVectorOffset);
+ Buffer.m_Size = Memory::Read_U32(BufferVectorOffset);
BufferVectorOffset += 4;
InBuffer.push_back(Buffer);
DEBUG_LOG(WII_IPC_HLE, "SIOCtlVBuffer in%i: 0x%08x, 0x%x",
@@ -69,9 +69,9 @@ struct SIOCtlVBuffer
for (u32 i = 0; i < NumberPayloadBuffer; i++)
{
SBuffer Buffer;
- Buffer.m_Address = Memory::Read_U32(BufferVectorOffset);
+ Buffer.m_Address = Memory::Read_U32(BufferVectorOffset);
BufferVectorOffset += 4;
- Buffer.m_Size = Memory::Read_U32(BufferVectorOffset);
+ Buffer.m_Size = Memory::Read_U32(BufferVectorOffset);
BufferVectorOffset += 4;
PayloadBuffer.push_back(Buffer);
DEBUG_LOG(WII_IPC_HLE, "SIOCtlVBuffer io%i: 0x%08x, 0x%x",
@@ -137,11 +137,11 @@ public:
}
#define UNIMPLEMENTED_CMD(cmd) WARN_LOG(WII_IPC_HLE, "%s does not support "#cmd"()", m_Name.c_str()); return true;
- virtual bool Seek (u32) { UNIMPLEMENTED_CMD(Seek) }
- virtual bool Read (u32) { UNIMPLEMENTED_CMD(Read) }
- virtual bool Write (u32) { UNIMPLEMENTED_CMD(Write) }
- virtual bool IOCtl (u32) { UNIMPLEMENTED_CMD(IOCtl) }
- virtual bool IOCtlV (u32) { UNIMPLEMENTED_CMD(IOCtlV) }
+ virtual bool Seek (u32) { UNIMPLEMENTED_CMD(Seek) }
+ virtual bool Read (u32) { UNIMPLEMENTED_CMD(Read) }
+ virtual bool Write (u32) { UNIMPLEMENTED_CMD(Write) }
+ virtual bool IOCtl (u32) { UNIMPLEMENTED_CMD(IOCtl) }
+ virtual bool IOCtlV (u32) { UNIMPLEMENTED_CMD(IOCtlV) }
#undef UNIMPLEMENTED_CMD
virtual int GetCmdDelay(u32) { return 0; }
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.h
index 504fe7b02e..7604afed8d 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.h
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_fs.h
@@ -18,15 +18,16 @@ struct NANDStat
u32 Used_Inodes;
};
-enum {
- FS_RESULT_OK = 0,
- FS_INVALID = -4,
- FS_DIRFILE_NOT_FOUND = -6,
- FS_RESULT_FATAL = -101,
- FS_NO_ACCESS = -102,
- FS_FILE_EXIST = -105,
- FS_FILE_NOT_EXIST = -106,
- FS_NO_HANDLE = -106,
+enum
+{
+ FS_RESULT_OK = 0,
+ FS_INVALID = -4,
+ FS_DIRFILE_NOT_FOUND = -6,
+ FS_RESULT_FATAL = -101,
+ FS_NO_ACCESS = -102,
+ FS_FILE_EXIST = -105,
+ FS_FILE_NOT_EXIST = -106,
+ FS_NO_HANDLE = -106,
};
class CWII_IPC_HLE_Device_fs : public IWII_IPC_HLE_Device
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.h
index c57e4ee84d..0b4551d530 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.h
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.h
@@ -50,60 +50,60 @@ private:
typedef struct
{
u8 bLength;
- u8 bDescriptorType;
+ u8 bDescriptorType;
u16 bcdUSB;
- u8 bDeviceClass;
- u8 bDeviceSubClass;
- u8 bDeviceProtocol;
- u8 bMaxPacketSize0;
+ u8 bDeviceClass;
+ u8 bDeviceSubClass;
+ u8 bDeviceProtocol;
+ u8 bMaxPacketSize0;
u16 idVendor;
u16 idProduct;
u16 bcdDevice;
- u8 iManufacturer;
- u8 iProduct;
- u8 iSerialNumber;
- u8 bNumConfigurations;
- u8 pad[2];
+ u8 iManufacturer;
+ u8 iProduct;
+ u8 iSerialNumber;
+ u8 bNumConfigurations;
+ u8 pad[2];
} WiiHIDDeviceDescriptor;
typedef struct
{
- u8 bLength;
- u8 bDescriptorType;
+ u8 bLength;
+ u8 bDescriptorType;
u16 wTotalLength;
- u8 bNumInterfaces;
- u8 bConfigurationValue;
- u8 iConfiguration;
- u8 bmAttributes;
- u8 MaxPower;
- u8 pad[3];
+ u8 bNumInterfaces;
+ u8 bConfigurationValue;
+ u8 iConfiguration;
+ u8 bmAttributes;
+ u8 MaxPower;
+ u8 pad[3];
} WiiHIDConfigDescriptor;
typedef struct
{
- u8 bLength;
- u8 bDescriptorType;
- u8 bInterfaceNumber;
- u8 bAlternateSetting;
- u8 bNumEndpoints;
- u8 bInterfaceClass;
- u8 bInterfaceSubClass;
- u8 bInterfaceProtocol;
- u8 iInterface;
- u8 pad[3];
+ u8 bLength;
+ u8 bDescriptorType;
+ u8 bInterfaceNumber;
+ u8 bAlternateSetting;
+ u8 bNumEndpoints;
+ u8 bInterfaceClass;
+ u8 bInterfaceSubClass;
+ u8 bInterfaceProtocol;
+ u8 iInterface;
+ u8 pad[3];
} WiiHIDInterfaceDescriptor;
typedef struct
{
- u8 bLength;
- u8 bDescriptorType;
- u8 bEndpointAddress;
- u8 bmAttributes;
+ u8 bLength;
+ u8 bDescriptorType;
+ u8 bEndpointAddress;
+ u8 bmAttributes;
u16 wMaxPacketSize;
- u8 bInterval;
- u8 bRefresh;
- u8 bSynchAddress;
- u8 pad[1];
+ u8 bInterval;
+ u8 bRefresh;
+ u8 bSynchAddress;
+ u8 pad[1];
} WiiHIDEndpointDescriptor;
u32 deviceCommandAddress;
diff --git a/Source/Core/Core/IPC_HLE/WII_Socket.h b/Source/Core/Core/IPC_HLE/WII_Socket.h
index 37f97ffdb1..07d05d02e1 100644
--- a/Source/Core/Core/IPC_HLE/WII_Socket.h
+++ b/Source/Core/Core/IPC_HLE/WII_Socket.h
@@ -147,9 +147,9 @@ struct WiiInAddr
struct WiiSockAddr
{
- u8 len;
- u8 family;
- u8 data[6];
+ u8 len;
+ u8 family;
+ u8 data[6];
};
struct WiiSockAddrIn
diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h
index c2e52a739d..346c2682a3 100644
--- a/Source/Core/Core/Movie.h
+++ b/Source/Core/Core/Movie.h
@@ -31,16 +31,16 @@ enum PlayMode {
// Gamecube Controller State
#pragma pack(push,1)
struct ControllerState {
- bool Start:1, A:1, B:1, X:1, Y:1, Z:1; // Binary buttons, 6 bits
- bool DPadUp:1, DPadDown:1, // Binary D-Pad buttons, 4 bits
- DPadLeft:1, DPadRight:1;
- bool L:1, R:1; // Binary triggers, 2 bits
- bool disc:1; // Checks for disc being changed
- bool reserved:3; // Reserved bits used for padding, 4 bits
+ bool Start:1, A:1, B:1, X:1, Y:1, Z:1; // Binary buttons, 6 bits
+ bool DPadUp:1, DPadDown:1, // Binary D-Pad buttons, 4 bits
+ DPadLeft:1, DPadRight:1;
+ bool L:1, R:1; // Binary triggers, 2 bits
+ bool disc:1; // Checks for disc being changed
+ bool reserved:3; // Reserved bits used for padding, 4 bits
- u8 TriggerL, TriggerR; // Triggers, 16 bits
- u8 AnalogStickX, AnalogStickY; // Main Stick, 16 bits
- u8 CStickX, CStickY; // Sub-Stick, 16 bits
+ u8 TriggerL, TriggerR; // Triggers, 16 bits
+ u8 AnalogStickX, AnalogStickY; // Main Stick, 16 bits
+ u8 CStickX, CStickY; // Sub-Stick, 16 bits
}; // Total: 60 + 4 = 64 bits per frame
static_assert(sizeof(ControllerState) == 8, "ControllerState should be 8 bytes");
@@ -68,34 +68,34 @@ extern u32 g_rerecords;
#pragma pack(push,1)
struct DTMHeader {
- u8 filetype[4]; // Unique Identifier (always "DTM"0x1A)
+ u8 filetype[4]; // Unique Identifier (always "DTM"0x1A)
- u8 gameID[6]; // The Game ID
- bool bWii; // Wii game
+ u8 gameID[6]; // The Game ID
+ bool bWii; // Wii game
- u8 numControllers; // The number of connected controllers (1-4)
+ u8 numControllers; // The number of connected controllers (1-4)
- bool bFromSaveState; // false indicates that the recording started from bootup, true for savestate
- u64 frameCount; // Number of frames in the recording
- u64 inputCount; // Number of input frames in recording
- u64 lagCount; // Number of lag frames in the recording
- u64 uniqueID; // (not implemented) A Unique ID comprised of: md5(time + Game ID)
- u32 numRerecords; // Number of rerecords/'cuts' of this TAS
- u8 author[32]; // Author's name (encoded in UTF-8)
+ bool bFromSaveState; // false indicates that the recording started from bootup, true for savestate
+ u64 frameCount; // Number of frames in the recording
+ u64 inputCount; // Number of input frames in recording
+ u64 lagCount; // Number of lag frames in the recording
+ u64 uniqueID; // (not implemented) A Unique ID comprised of: md5(time + Game ID)
+ u32 numRerecords; // Number of rerecords/'cuts' of this TAS
+ u8 author[32]; // Author's name (encoded in UTF-8)
- u8 videoBackend[16]; // UTF-8 representation of the video backend
- u8 audioEmulator[16]; // UTF-8 representation of the audio emulator
- unsigned char md5[16]; // MD5 of game iso
+ u8 videoBackend[16]; // UTF-8 representation of the video backend
+ u8 audioEmulator[16]; // UTF-8 representation of the audio emulator
+ unsigned char md5[16]; // MD5 of game iso
u64 recordingStartTime; // seconds since 1970 that recording started (used for RTC)
- bool bSaveConfig; // Loads the settings below on startup if true
+ bool bSaveConfig; // Loads the settings below on startup if true
bool bSkipIdle;
bool bDualCore;
bool bProgressive;
bool bDSPHLE;
bool bFastDiscSpeed;
- u8 CPUCore; // 0 = interpreter, 1 = JIT, 2 = JITIL
+ u8 CPUCore; // 0 = interpreter, 1 = JIT, 2 = JITIL
bool bEFBAccessEnable;
bool bEFBCopyEnable;
bool bCopyEFBToTexture;
@@ -104,14 +104,14 @@ struct DTMHeader {
bool bUseXFB;
bool bUseRealXFB;
bool bMemcard;
- bool bClearSave; // Create a new memory card when playing back a movie if true
+ bool bClearSave; // Create a new memory card when playing back a movie if true
u8 bongos;
bool bSyncGPU;
bool bNetPlay;
- u8 reserved[13]; // Padding for any new config options
- u8 discChange[40]; // Name of iso file to switch to, for two disc games.
- u8 revision[20]; // Git hash
- u8 reserved2[27]; // Make heading 256 bytes, just because we can
+ u8 reserved[13]; // Padding for any new config options
+ u8 discChange[40]; // Name of iso file to switch to, for two disc games.
+ u8 revision[20]; // Git hash
+ u8 reserved2[27]; // Make heading 256 bytes, just because we can
};
static_assert(sizeof(DTMHeader) == 256, "DTMHeader should be 256 bytes");
diff --git a/Source/Core/Core/NetPlayClient.h b/Source/Core/Core/NetPlayClient.h
index 18509cf8c0..1a3ec64df8 100644
--- a/Source/Core/Core/NetPlayClient.h
+++ b/Source/Core/Core/NetPlayClient.h
@@ -96,26 +96,26 @@ protected:
std::recursive_mutex players, send;
} m_crit;
- Common::FifoQueue<NetPad> m_pad_buffer[4];
- Common::FifoQueue<NetWiimote> m_wiimote_buffer[4];
+ Common::FifoQueue<NetPad> m_pad_buffer[4];
+ Common::FifoQueue<NetWiimote> m_wiimote_buffer[4];
- NetPlayUI* m_dialog;
- sf::SocketTCP m_socket;
- std::thread m_thread;
- sf::Selector<sf::SocketTCP> m_selector;
+ NetPlayUI* m_dialog;
+ sf::SocketTCP m_socket;
+ std::thread m_thread;
+ sf::Selector<sf::SocketTCP> m_selector;
- std::string m_selected_game;
- volatile bool m_is_running;
- volatile bool m_do_loop;
+ std::string m_selected_game;
+ volatile bool m_is_running;
+ volatile bool m_do_loop;
- unsigned int m_target_buffer_size;
+ unsigned int m_target_buffer_size;
- Player* m_local_player;
+ Player* m_local_player;
- u32 m_current_game;
+ u32 m_current_game;
- PadMapping m_pad_map[4];
- PadMapping m_wiimote_map[4];
+ PadMapping m_pad_map[4];
+ PadMapping m_wiimote_map[4];
bool m_is_recording;
@@ -125,8 +125,8 @@ private:
void SendWiimoteState(const PadMapping in_game_pad, const NetWiimote& nw);
unsigned int OnData(sf::Packet& packet);
- PlayerId m_pid;
- std::map<PlayerId, Player> m_players;
+ PlayerId m_pid;
+ std::map<PlayerId, Player> m_players;
};
void NetPlay_Enable(NetPlayClient* const np);
diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h
index 3cd6648b96..e887dc482a 100644
--- a/Source/Core/Core/NetPlayProto.h
+++ b/Source/Core/Core/NetPlayProto.h
@@ -23,12 +23,12 @@ extern NetSettings g_NetPlaySettings;
struct Rpt : public std::vector<u8>
{
- u16 channel;
+ u16 channel;
};
typedef std::vector<u8> NetWiimote;
-#define NETPLAY_VERSION "Dolphin NetPlay 2014-01-08"
+#define NETPLAY_VERSION "Dolphin NetPlay 2014-01-08"
const int NETPLAY_INITIAL_GCTIME = 1272737767;
diff --git a/Source/Core/Core/NetPlayServer.h b/Source/Core/Core/NetPlayServer.h
index 13acbcfb2b..12f4dbc372 100644
--- a/Source/Core/Core/NetPlayServer.h
+++ b/Source/Core/Core/NetPlayServer.h
@@ -72,11 +72,11 @@ private:
bool m_is_running;
bool m_do_loop;
- Common::Timer m_ping_timer;
- u32 m_ping_key;
+ Common::Timer m_ping_timer;
+ u32 m_ping_key;
bool m_update_pings;
- u32 m_current_game;
- unsigned int m_target_buffer_size;
+ u32 m_current_game;
+ unsigned int m_target_buffer_size;
PadMapping m_pad_map[4];
PadMapping m_wiimote_map[4];
diff --git a/Source/Core/Core/PowerPC/Gekko.h b/Source/Core/Core/PowerPC/Gekko.h
index b02bcdeec4..5c631a5b28 100644
--- a/Source/Core/Core/PowerPC/Gekko.h
+++ b/Source/Core/Core/PowerPC/Gekko.h
@@ -18,244 +18,245 @@ union UGeckoInstruction
{
u32 hex;
- UGeckoInstruction(u32 _hex) { hex = _hex;}
- UGeckoInstruction() { hex = 0;}
+ UGeckoInstruction(u32 _hex) { hex = _hex;}
+ UGeckoInstruction() { hex = 0;}
struct
{
// Record bit
// 1, if the condition register should be updated by this instruction
- u32 Rc : 1;
- u32 SUBOP10 : 10;
+ u32 Rc : 1;
+ u32 SUBOP10 : 10;
// Source GPR
- u32 RB : 5;
+ u32 RB : 5;
// Source or destination GPR
- u32 RA : 5;
+ u32 RA : 5;
// Destination GPR
- u32 RD : 5;
+ u32 RD : 5;
// Primary opcode
- u32 OPCD : 6;
+ u32 OPCD : 6;
};
struct
{
// Immediate, signed 16-bit
- signed SIMM_16 : 16;
- u32 : 5;
+ signed SIMM_16 : 16;
+ u32 : 5;
// Conditions on which to trap
- u32 TO : 5;
- u32 OPCD_2 : 6;
+ u32 TO : 5;
+ u32 OPCD_2 : 6;
};
struct
{
- u32 Rc_2 : 1;
- u32 : 10;
- u32 : 5;
- u32 : 5;
+ u32 Rc_2 : 1;
+ u32 : 10;
+ u32 : 5;
+ u32 : 5;
// Source GPR
- u32 RS : 5;
- u32 OPCD_3 : 6;
+ u32 RS : 5;
+ u32 OPCD_3 : 6;
};
struct
{
// Immediate, unsigned 16-bit
- u32 UIMM : 16;
- u32 : 5;
- u32 : 5;
- u32 OPCD_4 : 6;
+ u32 UIMM : 16;
+ u32 : 5;
+ u32 : 5;
+ u32 OPCD_4 : 6;
};
struct
{
// Link bit
// 1, if branch instructions should put the address of the next instruction into the link register
- u32 LK : 1;
+ u32 LK : 1;
// Absolute address bit
// 1, if the immediate field represents an absolute address
- u32 AA : 1;
+ u32 AA : 1;
// Immediate, signed 24-bit
- u32 LI : 24;
- u32 OPCD_5 : 6;
+ u32 LI : 24;
+ u32 OPCD_5 : 6;
};
struct
{
- u32 LK_2 : 1;
- u32 AA_2 : 1;
+ u32 LK_2 : 1;
+ u32 AA_2 : 1;
// Branch displacement, signed 14-bit (right-extended by 0b00)
- u32 BD : 14;
+ u32 BD : 14;
// Branch condition
- u32 BI : 5;
+ u32 BI : 5;
// Conditional branch control
- u32 BO : 5;
- u32 OPCD_6 : 6;
+ u32 BO : 5;
+ u32 OPCD_6 : 6;
};
struct
{
- u32 LK_3 : 1;
- u32 : 10;
- u32 : 5;
- u32 BI_2 : 5;
- u32 BO_2 : 5;
- u32 OPCD_7 : 6;
+ u32 LK_3 : 1;
+ u32 : 10;
+ u32 : 5;
+ u32 BI_2 : 5;
+ u32 BO_2 : 5;
+ u32 OPCD_7 : 6;
};
struct
{
- u32 : 11;
- u32 RB_2 : 5;
- u32 RA_2 : 5;
+ u32 : 11;
+ u32 RB_2 : 5;
+ u32 RA_2 : 5;
// ?
- u32 L : 1;
- u32 : 1;
+ u32 L : 1;
+ u32 : 1;
// Destination field in CR or FPSCR
- u32 CRFD : 3;
- u32 OPCD_8 : 6;
+ u32 CRFD : 3;
+ u32 OPCD_8 : 6;
};
struct
{
- signed SIMM_16_2 : 16;
- u32 RA_3 : 5;
- u32 L_2 : 1;
- u32 : 1;
- u32 CRFD_2 : 3;
- u32 OPCD_9 : 6;
+ signed SIMM_16_2 : 16;
+ u32 RA_3 : 5;
+ u32 L_2 : 1;
+ u32 : 1;
+ u32 CRFD_2 : 3;
+ u32 OPCD_9 : 6;
};
struct
{
- u32 UIMM_2 : 16;
- u32 RA_4 : 5;
- u32 L_3 : 1;
- u32 : 1;
- u32 CRFD_3 : 3;
- u32 OPCD_A : 6;
+ u32 UIMM_2 : 16;
+ u32 RA_4 : 5;
+ u32 L_3 : 1;
+ u32 : 1;
+ u32 CRFD_3 : 3;
+ u32 OPCD_A : 6;
};
struct
{
- u32 : 1;
- u32 SUBOP10_2: 10;
- u32 RB_5 : 5;
- u32 RA_5 : 5;
- u32 L_4 : 1;
- u32 : 1;
- u32 CRFD_4 : 3;
- u32 OPCD_B : 6;
+ u32 : 1;
+ u32 SUBOP10_2: 10;
+ u32 RB_5 : 5;
+ u32 RA_5 : 5;
+ u32 L_4 : 1;
+ u32 : 1;
+ u32 CRFD_4 : 3;
+ u32 OPCD_B : 6;
};
struct
{
- u32 : 16;
+ u32 : 16;
// Segment register
- u32 SR : 4;
- u32 : 1;
- u32 RS_2 : 5;
- u32 OPCD_C : 6;
+ u32 SR : 4;
+ u32 : 1;
+ u32 RS_2 : 5;
+ u32 OPCD_C : 6;
};
// Table 59
struct
{
- u32 Rc_4 : 1;
- u32 SUBOP5 : 5;
+ u32 Rc_4 : 1;
+ u32 SUBOP5 : 5;
// ?
- u32 RC : 5;
- u32 : 5;
- u32 RA_6 : 5;
- u32 RD_2 : 5;
- u32 OPCD_D : 6;
+ u32 RC : 5;
+ u32 : 5;
+ u32 RA_6 : 5;
+ u32 RD_2 : 5;
+ u32 OPCD_D : 6;
};
struct
- { u32 : 10;
+ {
+ u32 : 10;
// Overflow enable
- u32 OE : 1;
+ u32 OE : 1;
// Special-purpose register
- u32 SPR : 10;
- u32 : 11;
+ u32 SPR : 10;
+ u32 : 11;
};
struct
{
- u32 : 10;
- u32 OE_3 : 1;
+ u32 : 10;
+ u32 OE_3 : 1;
// Upper special-purpose register
- u32 SPRU : 5;
+ u32 SPRU : 5;
// Lower special-purpose register
- u32 SPRL : 5;
- u32 : 11;
+ u32 SPRL : 5;
+ u32 : 11;
};
// rlwinmx
struct
{
- u32 Rc_3 : 1;
+ u32 Rc_3 : 1;
// Mask end
- u32 ME : 5;
+ u32 ME : 5;
// Mask begin
- u32 MB : 5;
+ u32 MB : 5;
// Shift amount
- u32 SH : 5;
- u32 : 16;
+ u32 SH : 5;
+ u32 : 16;
};
// crxor
struct
{
- u32 : 11;
+ u32 : 11;
// Source bit in the CR
- u32 CRBB : 5;
+ u32 CRBB : 5;
// Source bit in the CR
- u32 CRBA : 5;
+ u32 CRBA : 5;
// Destination bit in the CR
- u32 CRBD : 5;
- u32 : 6;
+ u32 CRBD : 5;
+ u32 : 6;
};
// mftb
struct
{
- u32 : 11;
+ u32 : 11;
// Time base register
- u32 TBR : 10;
- u32 : 11;
+ u32 TBR : 10;
+ u32 : 11;
};
struct
{
- u32 : 11;
+ u32 : 11;
// Upper time base register
- u32 TBRU : 5;
+ u32 TBRU : 5;
// Lower time base register
- u32 TBRL : 5;
- u32 : 11;
+ u32 TBRL : 5;
+ u32 : 11;
};
struct
{
- u32 : 18;
+ u32 : 18;
// Source field in the CR or FPSCR
- u32 CRFS : 3;
- u32 : 2;
- u32 CRFD_5 : 3;
- u32 : 6;
+ u32 CRFS : 3;
+ u32 : 2;
+ u32 CRFD_5 : 3;
+ u32 : 6;
};
struct
{
- u32 : 12;
+ u32 : 12;
// Field mask, identifies the CR fields to be updated by mtcrf
- u32 CRM : 8;
- u32 : 1;
+ u32 CRM : 8;
+ u32 : 1;
// Destination FPR
- u32 FD : 5;
- u32 : 6;
+ u32 FD : 5;
+ u32 : 6;
};
struct
{
- u32 : 6;
+ u32 : 6;
// Source FPR
- u32 FC : 5;
+ u32 FC : 5;
// Source FPR
- u32 FB : 5;
+ u32 FB : 5;
// Source FPR
- u32 FA : 5;
+ u32 FA : 5;
// Source FPR
- u32 FS : 5;
- u32 : 6;
+ u32 FS : 5;
+ u32 : 6;
};
struct
{
@@ -268,30 +269,30 @@ union UGeckoInstruction
// paired single quantized load/store
struct
{
- u32 : 7;
+ u32 : 7;
// Graphics quantization register to use
- u32 Ix : 3;
+ u32 Ix : 3;
// 0: paired single, 1: scalar
- u32 Wx : 1;
- u32 : 1;
+ u32 Wx : 1;
+ u32 : 1;
// Graphics quantization register to use
- u32 I : 3;
+ u32 I : 3;
// 0: paired single, 1: scalar
- u32 W : 1;
- u32 : 16;
+ u32 W : 1;
+ u32 : 16;
};
struct
{
- signed SIMM_12 : 12;
- u32 : 20;
+ signed SIMM_12 : 12;
+ u32 : 20;
};
struct
{
- u32 : 11;
+ u32 : 11;
// Number of bytes to use in lswi/stswi (0 means 32 bytes)
- u32 NB : 5;
+ u32 NB : 5;
};
};
@@ -307,29 +308,29 @@ union UGQR
u32 Hex;
struct
{
- u32 ST_TYPE : 3;
- u32 : 5;
- u32 ST_SCALE : 6;
- u32 : 2;
- u32 LD_TYPE : 3;
- u32 : 5;
- u32 LD_SCALE : 6;
- u32 : 2;
+ u32 ST_TYPE : 3;
+ u32 : 5;
+ u32 ST_SCALE : 6;
+ u32 : 2;
+ u32 LD_TYPE : 3;
+ u32 : 5;
+ u32 LD_SCALE : 6;
+ u32 : 2;
};
UGQR(u32 _hex) { Hex = _hex; }
- UGQR() {Hex = 0; }
+ UGQR() {Hex = 0; }
};
// FPU Register
union UFPR
{
- u64 as_u64;
- s64 as_s64;
- double d;
- u32 as_u32[2];
- s32 as_s32[2];
- float f[2];
+ u64 as_u64;
+ s64 as_s64;
+ double d;
+ u32 as_u32[2];
+ s32 as_s32[2];
+ float f[2];
};
#define XER_CA_MASK 0x20000000
@@ -340,16 +341,16 @@ union UReg_XER
{
struct
{
- u32 BYTE_COUNT : 7;
- u32 : 22;
- u32 CA : 1;
- u32 OV : 1;
- u32 SO : 1;
+ u32 BYTE_COUNT : 7;
+ u32 : 22;
+ u32 CA : 1;
+ u32 OV : 1;
+ u32 SO : 1;
};
u32 Hex;
UReg_XER(u32 _hex) { Hex = _hex; }
- UReg_XER() { Hex = 0; }
+ UReg_XER() { Hex = 0; }
};
// Machine State Register
@@ -357,31 +358,31 @@ union UReg_MSR
{
struct
{
- u32 LE : 1;
- u32 RI : 1;
- u32 PM : 1;
- u32 : 1; // res28
- u32 DR : 1;
- u32 IR : 1;
- u32 IP : 1;
- u32 : 1; // res24
- u32 FE1 : 1;
- u32 BE : 1;
- u32 SE : 1;
- u32 FE0 : 1;
- u32 MCHECK : 1;
- u32 FP : 1;
- u32 PR : 1;
- u32 EE : 1;
- u32 ILE : 1;
- u32 : 1; // res14
- u32 POW : 1;
- u32 res : 13;
+ u32 LE : 1;
+ u32 RI : 1;
+ u32 PM : 1;
+ u32 : 1; // res28
+ u32 DR : 1;
+ u32 IR : 1;
+ u32 IP : 1;
+ u32 : 1; // res24
+ u32 FE1 : 1;
+ u32 BE : 1;
+ u32 SE : 1;
+ u32 FE0 : 1;
+ u32 MCHECK : 1;
+ u32 FP : 1;
+ u32 PR : 1;
+ u32 EE : 1;
+ u32 ILE : 1;
+ u32 : 1; // res14
+ u32 POW : 1;
+ u32 res : 13;
};
u32 Hex;
UReg_MSR(u32 _hex) { Hex = _hex; }
- UReg_MSR() { Hex = 0; }
+ UReg_MSR() { Hex = 0; }
};
// Floating Point Status and Control Register
@@ -390,64 +391,64 @@ union UReg_FPSCR
struct
{
// Rounding mode (towards: nearest, zero, +inf, -inf)
- u32 RN : 2;
+ u32 RN : 2;
// Non-IEEE mode enable (aka flush-to-zero)
- u32 NI : 1;
+ u32 NI : 1;
// Inexact exception enable
- u32 XE : 1;
+ u32 XE : 1;
// IEEE division by zero exception enable
- u32 ZE : 1;
+ u32 ZE : 1;
// IEEE underflow exception enable
- u32 UE : 1;
+ u32 UE : 1;
// IEEE overflow exception enable
- u32 OE : 1;
+ u32 OE : 1;
// Invalid operation exception enable
- u32 VE : 1;
+ u32 VE : 1;
// Invalid operation exception for integer conversion (sticky)
- u32 VXCVI : 1;
+ u32 VXCVI : 1;
// Invalid operation exception for square root (sticky)
- u32 VXSQRT : 1;
+ u32 VXSQRT : 1;
// Invalid operation exception for software request (sticky)
- u32 VXSOFT : 1;
+ u32 VXSOFT : 1;
// reserved
- u32 : 1;
+ u32 : 1;
// Floating point result flags (not sticky)
- u32 FPRF : 5;
+ u32 FPRF : 5;
// Fraction inexact (not sticky)
- u32 FI : 1;
+ u32 FI : 1;
// Fraction rounded (not sticky)
- u32 FR : 1;
+ u32 FR : 1;
// Invalid operation exception for invalid comparison (sticky)
- u32 VXVC : 1;
+ u32 VXVC : 1;
// Invalid operation exception for inf * 0 (sticky)
- u32 VXIMZ : 1;
+ u32 VXIMZ : 1;
// Invalid operation exception for 0 / 0 (sticky)
- u32 VXZDZ : 1;
+ u32 VXZDZ : 1;
// Invalid operation exception for int / inf (sticky)
- u32 VXIDI : 1;
+ u32 VXIDI : 1;
// Invalid operation exception for inf - inf (sticky)
- u32 VXISI : 1;
+ u32 VXISI : 1;
// Invalid operation exception for SNaN (sticky)
- u32 VXSNAN : 1;
+ u32 VXSNAN : 1;
// Inexact exception (sticky)
- u32 XX : 1;
+ u32 XX : 1;
// Division by zero exception (sticky)
- u32 ZX : 1;
+ u32 ZX : 1;
// Underflow exception (sticky)
- u32 UX : 1;
+ u32 UX : 1;
// Overflow exception (sticky)
- u32 OX : 1;
+ u32 OX : 1;
// Invalid operation exception summary (not sticky)
- u32 VX : 1;
+ u32 VX : 1;
// Enabled exception summary (not sticky)
- u32 FEX : 1;
+ u32 FEX : 1;
// Exception summary (sticky)
- u32 FX : 1;
+ u32 FX : 1;
};
u32 Hex;
- UReg_FPSCR(u32 _hex) { Hex = _hex; }
- UReg_FPSCR() { Hex = 0;}
+ UReg_FPSCR(u32 _hex) { Hex = _hex; }
+ UReg_FPSCR() { Hex = 0;}
};
// Hardware Implementation-Dependent Register 0
@@ -455,36 +456,36 @@ union UReg_HID0
{
struct
{
- u32 NOOPTI : 1;
- u32 : 1;
- u32 BHT : 1;
- u32 ABE : 1;
- u32 : 1;
- u32 BTIC : 1;
- u32 DCFA : 1;
- u32 SGE : 1;
- u32 IFEM : 1;
- u32 SPD : 1;
- u32 DCFI : 1;
- u32 ICFI : 1;
- u32 DLOCK : 1;
- u32 ILOCK : 1;
- u32 DCE : 1;
- u32 ICE : 1;
- u32 NHR : 1;
- u32 : 3;
- u32 DPM : 1;
- u32 SLEEP : 1;
- u32 NAP : 1;
- u32 DOZE : 1;
- u32 PAR : 1;
- u32 ECLK : 1;
- u32 : 1;
- u32 BCLK : 1;
- u32 EBD : 1;
- u32 EBA : 1;
- u32 DBP : 1;
- u32 EMCP : 1;
+ u32 NOOPTI : 1;
+ u32 : 1;
+ u32 BHT : 1;
+ u32 ABE : 1;
+ u32 : 1;
+ u32 BTIC : 1;
+ u32 DCFA : 1;
+ u32 SGE : 1;
+ u32 IFEM : 1;
+ u32 SPD : 1;
+ u32 DCFI : 1;
+ u32 ICFI : 1;
+ u32 DLOCK : 1;
+ u32 ILOCK : 1;
+ u32 DCE : 1;
+ u32 ICE : 1;
+ u32 NHR : 1;
+ u32 : 3;
+ u32 DPM : 1;
+ u32 SLEEP : 1;
+ u32 NAP : 1;
+ u32 DOZE : 1;
+ u32 PAR : 1;
+ u32 ECLK : 1;
+ u32 : 1;
+ u32 BCLK : 1;
+ u32 EBD : 1;
+ u32 EBA : 1;
+ u32 DBP : 1;
+ u32 EMCP : 1;
};
u32 Hex;
};
@@ -494,25 +495,25 @@ union UReg_HID2
{
struct
{
- u32 : 16;
- u32 DQOMEE : 1;
- u32 DCMEE : 1;
- u32 DNCEE : 1;
- u32 DCHEE : 1;
- u32 DQOERR : 1;
- u32 DCEMERR : 1;
- u32 DNCERR : 1;
- u32 DCHERR : 1;
- u32 DMAQL : 4;
- u32 LCE : 1;
- u32 PSE : 1;
- u32 WPE : 1;
- u32 LSQE : 1;
+ u32 : 16;
+ u32 DQOMEE : 1;
+ u32 DCMEE : 1;
+ u32 DNCEE : 1;
+ u32 DCHEE : 1;
+ u32 DQOERR : 1;
+ u32 DCEMERR : 1;
+ u32 DNCERR : 1;
+ u32 DCHERR : 1;
+ u32 DMAQL : 4;
+ u32 LCE : 1;
+ u32 PSE : 1;
+ u32 WPE : 1;
+ u32 LSQE : 1;
};
u32 Hex;
- UReg_HID2(u32 _hex) { Hex = _hex; }
- UReg_HID2() { Hex = 0; }
+ UReg_HID2(u32 _hex) { Hex = _hex; }
+ UReg_HID2() { Hex = 0; }
};
// Hardware Implementation-Dependent Register 4
@@ -520,22 +521,22 @@ union UReg_HID4
{
struct
{
- u32 : 20;
- u32 L2CFI : 1;
- u32 L2MUM : 1;
- u32 DBP : 1;
- u32 LPE : 1;
- u32 ST0 : 1;
- u32 SBE : 1;
- u32 : 1;
- u32 BPD : 2;
- u32 L2FM : 2;
- u32 : 1;
+ u32 : 20;
+ u32 L2CFI : 1;
+ u32 L2MUM : 1;
+ u32 DBP : 1;
+ u32 LPE : 1;
+ u32 ST0 : 1;
+ u32 SBE : 1;
+ u32 : 1;
+ u32 BPD : 2;
+ u32 L2FM : 2;
+ u32 : 1;
};
u32 Hex;
- UReg_HID4(u32 _hex) { Hex = _hex; }
- UReg_HID4() { Hex = 0; }
+ UReg_HID4(u32 _hex) { Hex = _hex; }
+ UReg_HID4() { Hex = 0; }
};
// SPR1 - Page Table format
@@ -544,9 +545,9 @@ union UReg_SPR1
u32 Hex;
struct
{
- u32 htaborg : 16;
- u32 : 7;
- u32 htabmask : 9;
+ u32 htaborg : 16;
+ u32 : 7;
+ u32 htabmask : 9;
};
};
@@ -556,21 +557,21 @@ union UReg_MMCR0
u32 Hex;
struct
{
- u32 PMC2SELECT : 6;
- u32 PMC1SELECT : 7;
- u32 PMCTRIGGER : 1;
- u32 PMCINTCONTROL : 1;
- u32 PMC1INTCONTROL : 1;
- u32 THRESHOLD : 6;
- u32 INTONBITTRANS : 1;
- u32 RTCSELECT : 2;
- u32 DISCOUNT : 1;
- u32 ENINT : 1;
- u32 DMR : 1;
- u32 DMS : 1;
- u32 DU : 1;
- u32 DP : 1;
- u32 DIS : 1;
+ u32 PMC2SELECT : 6;
+ u32 PMC1SELECT : 7;
+ u32 PMCTRIGGER : 1;
+ u32 PMCINTCONTROL : 1;
+ u32 PMC1INTCONTROL : 1;
+ u32 THRESHOLD : 6;
+ u32 INTONBITTRANS : 1;
+ u32 RTCSELECT : 2;
+ u32 DISCOUNT : 1;
+ u32 ENINT : 1;
+ u32 DMR : 1;
+ u32 DMS : 1;
+ u32 DU : 1;
+ u32 DP : 1;
+ u32 DIS : 1;
};
};
@@ -580,9 +581,9 @@ union UReg_MMCR1
u32 Hex;
struct
{
- u32 : 22;
- u32 PMC4SELECT : 5;
- u32 PMC3SELECT : 5;
+ u32 : 22;
+ u32 PMC4SELECT : 5;
+ u32 PMC3SELECT : 5;
};
};
@@ -591,14 +592,14 @@ union UReg_WPAR
{
struct
{
- u32 BNE : 1;
- u32 : 4;
- u32 GB_ADDR : 27;
+ u32 BNE : 1;
+ u32 : 4;
+ u32 GB_ADDR : 27;
};
u32 Hex;
- UReg_WPAR(u32 _hex) { Hex = _hex; }
- UReg_WPAR() { Hex = 0; }
+ UReg_WPAR(u32 _hex) { Hex = _hex; }
+ UReg_WPAR() { Hex = 0; }
};
// Direct Memory Access Upper register
@@ -606,13 +607,13 @@ union UReg_DMAU
{
struct
{
- u32 DMA_LEN_U : 5;
- u32 MEM_ADDR : 27;
+ u32 DMA_LEN_U : 5;
+ u32 MEM_ADDR : 27;
};
u32 Hex;
- UReg_DMAU(u32 _hex) { Hex = _hex; }
- UReg_DMAU() { Hex = 0; }
+ UReg_DMAU(u32 _hex) { Hex = _hex; }
+ UReg_DMAU() { Hex = 0; }
};
// Direct Memory Access Lower (DMAL) register
@@ -620,65 +621,65 @@ union UReg_DMAL
{
struct
{
- u32 DMA_F : 1;
- u32 DMA_T : 1;
- u32 DMA_LEN_L : 2;
- u32 DMA_LD : 1;
- u32 LC_ADDR : 27;
+ u32 DMA_F : 1;
+ u32 DMA_T : 1;
+ u32 DMA_LEN_L : 2;
+ u32 DMA_LD : 1;
+ u32 LC_ADDR : 27;
};
u32 Hex;
- UReg_DMAL(u32 _hex) { Hex = _hex; }
- UReg_DMAL() { Hex = 0; }
+ UReg_DMAL(u32 _hex) { Hex = _hex; }
+ UReg_DMAL() { Hex = 0; }
};
union UReg_BAT_Up
{
struct
{
- u32 VP : 1;
- u32 VS : 1;
- u32 BL : 11; // Block length (aka block size mask)
- u32 : 4;
- u32 BEPI : 15;
+ u32 VP : 1;
+ u32 VS : 1;
+ u32 BL : 11; // Block length (aka block size mask)
+ u32 : 4;
+ u32 BEPI : 15;
};
u32 Hex;
- UReg_BAT_Up(u32 _hex) { Hex = _hex; }
- UReg_BAT_Up() { Hex = 0; }
+ UReg_BAT_Up(u32 _hex) { Hex = _hex; }
+ UReg_BAT_Up() { Hex = 0; }
};
union UReg_BAT_Lo
{
struct
{
- u32 PP : 2;
- u32 : 1;
- u32 WIMG : 4;
- u32 : 10;
- u32 BRPN : 15; // Physical Block Number
+ u32 PP : 2;
+ u32 : 1;
+ u32 WIMG : 4;
+ u32 : 10;
+ u32 BRPN : 15; // Physical Block Number
};
u32 Hex;
- UReg_BAT_Lo(u32 _hex) { Hex = _hex; }
- UReg_BAT_Lo() { Hex = 0; }
+ UReg_BAT_Lo(u32 _hex) { Hex = _hex; }
+ UReg_BAT_Lo() { Hex = 0; }
};
union UReg_PTE
{
struct
{
- u64 API : 6;
- u64 H : 1;
- u64 VSID : 24;
- u64 V : 1;
- u64 PP : 2;
- u64 : 1;
- u64 WIMG : 4;
- u64 C : 1;
- u64 R : 1;
- u64 : 3;
- u64 RPN : 20;
+ u64 API : 6;
+ u64 H : 1;
+ u64 VSID : 24;
+ u64 V : 1;
+ u64 PP : 2;
+ u64 : 1;
+ u64 WIMG : 4;
+ u64 C : 1;
+ u64 R : 1;
+ u64 : 3;
+ u64 RPN : 20;
};
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
index 882b9d01da..4b29b1680a 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Tables.cpp
@@ -63,7 +63,7 @@ static GekkoOPTemplate primarytable[] =
{45, Interpreter::sthu, {"sthu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
{36, Interpreter::stw, {"stw", OPTYPE_STORE, FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
{37, Interpreter::stwu, {"stwu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
- {38, Interpreter::stb, {"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
+ {38, Interpreter::stb, {"stb", OPTYPE_STORE, FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
{39, Interpreter::stbu, {"stbu", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_S | FL_LOADSTORE, 0, 0, 0, 0}},
{46, Interpreter::lmw, {"lmw", OPTYPE_SYSTEM, FL_EVIL | FL_LOADSTORE, 10, 0, 0, 0}},
diff --git a/Source/Core/Core/ec_wii.h b/Source/Core/Core/ec_wii.h
index 969b3b53df..0cf73d7d82 100644
--- a/Source/Core/Core/ec_wii.h
+++ b/Source/Core/Core/ec_wii.h
@@ -41,10 +41,10 @@ public:
EcWii();
~EcWii();
static EcWii& GetInstance();
- u32 getNgId() {return Common::swap32(BootMiiKeysBin.ng_id);}
- u32 getNgKeyId() {return Common::swap32(BootMiiKeysBin.ng_key_id);}
- const u8* getNgPriv() {return BootMiiKeysBin.ng_priv;}
- const u8* getNgSig() {return BootMiiKeysBin.ng_sig;};
+ u32 getNgId() {return Common::swap32(BootMiiKeysBin.ng_id);}
+ u32 getNgKeyId() {return Common::swap32(BootMiiKeysBin.ng_key_id);}
+ const u8* getNgPriv() {return BootMiiKeysBin.ng_priv;}
+ const u8* getNgSig() {return BootMiiKeysBin.ng_sig;};
private:
void InitDefaults();
@@ -65,38 +65,38 @@ private:
struct
{
- u8 creator [0x100]; // 0x000
- u8 boot1_hash [ 0x14]; // 0x100
- u8 common_key [ 0x10]; // 0x114
- u32 ng_id; // 0x124
+ u8 creator [0x100]; // 0x000
+ u8 boot1_hash [ 0x14]; // 0x100
+ u8 common_key [ 0x10]; // 0x114
+ u32 ng_id; // 0x124
union {
struct {
- u8 ng_priv [ 0x1e]; // 0x128
- u8 pad1 [ 0x12];
+ u8 ng_priv [ 0x1e]; // 0x128
+ u8 pad1 [ 0x12];
};
struct {
- u8 pad2 [ 0x1c];
- u8 nand_hmac [ 0x14]; //0x144
+ u8 pad2 [ 0x1c];
+ u8 nand_hmac [ 0x14]; //0x144
};
};
- u8 nand_key [ 0x10]; //0x158
- u8 rng_key [ 0x10]; //0x168
- u32 unk1; //0x178
- u32 unk2; //0x17C
- u8 eeprom_pad [ 0x80]; //0x180
-
- u32 ms_id; //0x200
- u32 ca_id; //0x204
- u32 ng_key_id; //0x208
- u8 ng_sig [ 0x3c]; //0x20c
- eep_ctr_t counters [ 0x02]; //0x248
- u8 fill [ 0x18]; //0x25c
- u8 korean_key [ 0x10]; //0x274
- u8 pad3 [ 0x74]; //0x284
- u16 prng_seed [ 0x02]; //0x2F8
- u8 pad4 [ 0x04]; //0x2FC
-
- u8 crack_pad [0x100]; //0x300
+ u8 nand_key [ 0x10]; //0x158
+ u8 rng_key [ 0x10]; //0x168
+ u32 unk1; //0x178
+ u32 unk2; //0x17C
+ u8 eeprom_pad [ 0x80]; //0x180
+
+ u32 ms_id; //0x200
+ u32 ca_id; //0x204
+ u32 ng_key_id; //0x208
+ u8 ng_sig [ 0x3c]; //0x20c
+ eep_ctr_t counters [ 0x02]; //0x248
+ u8 fill [ 0x18]; //0x25c
+ u8 korean_key [ 0x10]; //0x274
+ u8 pad3 [ 0x74]; //0x284
+ u16 prng_seed [ 0x02]; //0x2F8
+ u8 pad4 [ 0x04]; //0x2FC
+
+ u8 crack_pad [0x100]; //0x300
}
diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
index 04f2bb505f..0c4f026a9e 100644
--- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
@@ -22,14 +22,14 @@ typedef struct
static const ForceType force_type_names[] =
{
- {GUID_ConstantForce, "Constant"}, // DICONSTANTFORCE
- {GUID_RampForce, "Ramp"}, // DIRAMPFORCE
- {GUID_Square, "Square"}, // DIPERIODIC ...
+ {GUID_ConstantForce, "Constant"}, // DICONSTANTFORCE
+ {GUID_RampForce, "Ramp"}, // DIRAMPFORCE
+ {GUID_Square, "Square"}, // DIPERIODIC ...
{GUID_Sine, "Sine"},
{GUID_Triangle, "Triangle"},
{GUID_SawtoothUp, "Sawtooth Up"},
{GUID_SawtoothDown, "Sawtooth Down"},
- //{GUID_Spring, "Spring"}, // DICUSTOMFORCE ... < I think
+ //{GUID_Spring, "Spring"}, // DICUSTOMFORCE ... < I think
//{GUID_Damper, "Damper"},
//{GUID_Inertia, "Inertia"},
//{GUID_Friction, "Friction"},
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
index f1714b253e..02c7e6d5d0 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.h
@@ -34,9 +34,9 @@ private:
{
EffectIDState() : effect(SDL_HapticEffect()), id(-1), changed(false) {}
- SDL_HapticEffect effect;
- int id;
- bool changed;
+ SDL_HapticEffect effect;
+ int id;
+ bool changed;
};
#endif
@@ -141,13 +141,13 @@ public:
std::string GetSource() const override;
private:
- SDL_Joystick* const m_joystick;
- const int m_sdl_index;
- const unsigned int m_index;
+ SDL_Joystick* const m_joystick;
+ const int m_sdl_index;
+ const unsigned int m_index;
#ifdef USE_SDL_HAPTIC
- std::list<EffectIDState> m_state_out;
- SDL_Haptic* m_haptic;
+ std::list<EffectIDState> m_state_out;
+ SDL_Haptic* m_haptic;
#endif
};
diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.h b/Source/Core/VideoBackends/Software/SWCommandProcessor.h
index f16f2c2c32..8273af2f31 100644
--- a/Source/Core/VideoBackends/Software/SWCommandProcessor.h
+++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.h
@@ -48,12 +48,12 @@ namespace SWCommandProcessor
{
struct
{
- u16 OverflowHiWatermark : 1;
- u16 UnderflowLoWatermark: 1;
- u16 ReadIdle : 1; // done reading
- u16 CommandIdle : 1; // done processing commands
- u16 Breakpoint : 1;
- u16 : 11;
+ u16 OverflowHiWatermark : 1;
+ u16 UnderflowLoWatermark : 1;
+ u16 ReadIdle : 1; // done reading
+ u16 CommandIdle : 1; // done processing commands
+ u16 Breakpoint : 1;
+ u16 : 11;
};
u16 Hex;
UCPStatusReg() {Hex = 0; }
@@ -65,13 +65,13 @@ namespace SWCommandProcessor
{
struct
{
- u16 GPReadEnable : 1;
- u16 BPEnable : 1;
- u16 FifoOverflowIntEnable : 1;
- u16 FifoUnderflowIntEnable : 1;
- u16 GPLinkEnable : 1;
- u16 BreakPointIntEnable : 1;
- u16 : 10;
+ u16 GPReadEnable : 1;
+ u16 BPEnable : 1;
+ u16 FifoOverflowIntEnable : 1;
+ u16 FifoUnderflowIntEnable : 1;
+ u16 GPLinkEnable : 1;
+ u16 BreakPointIntEnable : 1;
+ u16 : 10;
};
u16 Hex;
UCPCtrlReg() {Hex = 0; }
@@ -83,10 +83,10 @@ namespace SWCommandProcessor
{
struct
{
- u16 ClearFifoOverflow : 1;
- u16 ClearFifoUnderflow : 1;
- u16 ClearMetrices : 1;
- u16 : 13;
+ u16 ClearFifoOverflow : 1;
+ u16 ClearFifoUnderflow : 1;
+ u16 ClearMetrices : 1;
+ u16 : 13;
};
u16 Hex;
UCPClearReg() {Hex = 0; }
diff --git a/Source/Core/VideoBackends/Software/SWPixelEngine.h b/Source/Core/VideoBackends/Software/SWPixelEngine.h
index 71cca73c2c..4a6c6ec2aa 100644
--- a/Source/Core/VideoBackends/Software/SWPixelEngine.h
+++ b/Source/Core/VideoBackends/Software/SWPixelEngine.h
@@ -48,10 +48,10 @@ namespace SWPixelEngine
u16 Hex;
struct
{
- u16 ZCompEnable : 1; // Z Comparator Enable
- u16 Function : 3;
- u16 ZUpdEnable : 1;
- u16 : 11;
+ u16 ZCompEnable : 1; // Z Comparator Enable
+ u16 Function : 3;
+ u16 ZUpdEnable : 1;
+ u16 : 11;
};
};
@@ -60,15 +60,15 @@ namespace SWPixelEngine
u16 Hex;
struct
{
- u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
- u16 BMLogic : 1; // GX_BM_LOGIC
- u16 Dither : 1;
- u16 ColorUpdEnable : 1;
- u16 AlphaUpdEnable : 1;
- u16 DstFactor : 3;
- u16 SrcFactor : 3;
- u16 Substract : 1; // Additive mode by default
- u16 BlendOperator : 4;
+ u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
+ u16 BMLogic : 1; // GX_BM_LOGIC
+ u16 Dither : 1;
+ u16 ColorUpdEnable : 1;
+ u16 AlphaUpdEnable : 1;
+ u16 DstFactor : 3;
+ u16 SrcFactor : 3;
+ u16 Substract : 1; // Additive mode by default
+ u16 BlendOperator : 4;
};
};
@@ -77,9 +77,9 @@ namespace SWPixelEngine
u16 Hex;
struct
{
- u16 DstAlpha : 8;
- u16 Enable : 1;
- u16 : 7;
+ u16 DstAlpha : 8;
+ u16 Enable : 1;
+ u16 : 7;
};
};
@@ -88,8 +88,8 @@ namespace SWPixelEngine
u16 Hex;
struct
{
- u16 Threshold : 8;
- u16 CompareMode : 8;
+ u16 Threshold : 8;
+ u16 CompareMode : 8;
};
};
@@ -98,8 +98,8 @@ namespace SWPixelEngine
u16 Hex;
struct
{
- u16 ReadMode : 3;
- u16 : 13;
+ u16 ReadMode : 3;
+ u16 : 13;
};
};
@@ -107,11 +107,11 @@ namespace SWPixelEngine
{
struct
{
- u16 PETokenEnable : 1;
- u16 PEFinishEnable : 1;
- u16 PEToken : 1; // write only
- u16 PEFinish : 1; // write only
- u16 : 12;
+ u16 PETokenEnable : 1;
+ u16 PEFinishEnable : 1;
+ u16 PEToken : 1; // write only
+ u16 PEFinish : 1; // write only
+ u16 : 12;
};
u16 Hex;
UPECtrlReg() {Hex = 0; }
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 2182fdcb8f..4f60f9d4f6 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -41,9 +41,9 @@ static volatile u32 s_swapRequested = false;
static volatile struct
{
- u32 xfbAddr;
- u32 fbWidth;
- u32 fbHeight;
+ u32 xfbAddr;
+ u32 fbWidth;
+ u32 fbHeight;
} s_beginFieldArgs;
namespace SW
diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h
index ff8650bd4a..0670b49dbc 100644
--- a/Source/Core/VideoCommon/BPMemory.h
+++ b/Source/Core/VideoCommon/BPMemory.h
@@ -353,17 +353,17 @@ struct TevStageCombiner
// if mid, sw, tw, and addprev are 0, then no indirect stage is used, mask = 0x17fe00
struct
{
- u32 bt : 2; // indirect tex stage ID
- u32 fmt : 2; // format: ITF_X
- u32 bias : 3; // ITB_X
- u32 bs : 2; // ITBA_X, indicates which coordinate will become the 'bump alpha'
- u32 mid : 4; // matrix id to multiply offsets with
- u32 sw : 3; // ITW_X, wrapping factor for S of regular coord
- u32 tw : 3; // ITW_X, wrapping factor for T of regular coord
- u32 lb_utclod : 1; // use modified or unmodified texture coordinates for LOD computation
- u32 fb_addprev : 1; // 1 if the texture coordinate results from the previous TEV stage should be added
- u32 pad0 : 3;
- u32 rid : 8;
+ u32 bt : 2; // Indirect tex stage ID
+ u32 fmt : 2; // Format: ITF_X
+ u32 bias : 3; // ITB_X
+ u32 bs : 2; // ITBA_X, indicates which coordinate will become the 'bump alpha'
+ u32 mid : 4; // Matrix ID to multiply offsets with
+ u32 sw : 3; // ITW_X, wrapping factor for S of regular coord
+ u32 tw : 3; // ITW_X, wrapping factor for T of regular coord
+ u32 lb_utclod : 1; // Use modified or unmodified texture coordinates for LOD computation
+ u32 fb_addprev : 1; // 1 if the texture coordinate results from the previous TEV stage should be added
+ u32 pad0 : 3;
+ u32 rid : 8;
};
struct
{
@@ -378,7 +378,7 @@ struct TevStageCombiner
{
struct
{
- u32 texmap0 : 3; // indirect tex stage texmap
+ u32 texmap0 : 3; // Indirect tex stage texmap
u32 texcoord0 : 3;
u32 enable0 : 1; // 1 if should read from texture
u32 colorchan0 : 3; // RAS1_CC_X
@@ -404,10 +404,10 @@ union TEXSCALE
{
struct
{
- u32 ss0 : 4; // indirect tex stage 0, 2^(-ss0)
- u32 ts0 : 4; // indirect tex stage 0
- u32 ss1 : 4; // indirect tex stage 1
- u32 ts1 : 4; // indirect tex stage 1
+ u32 ss0 : 4; // Indirect tex stage 0, 2^(-ss0)
+ u32 ts0 : 4; // Indirect tex stage 0
+ u32 ss1 : 4; // Indirect tex stage 1
+ u32 ts1 : 4; // Indirect tex stage 1
u32 pad : 8;
u32 rid : 8;
};
@@ -421,8 +421,8 @@ union RAS1_IREF
{
struct
{
- u32 bi0 : 3; // indirect tex stage 0 ntexmap
- u32 bc0 : 3; // indirect tex stage 0 ntexcoord
+ u32 bi0 : 3; // Indirect tex stage 0 ntexmap
+ u32 bc0 : 3; // Indirect tex stage 0 ntexcoord
u32 bi1 : 3;
u32 bc1 : 3;
u32 bi2 : 3;
@@ -444,15 +444,15 @@ union TexMode0
{
struct
{
- u32 wrap_s : 2;
- u32 wrap_t : 2;
+ u32 wrap_s : 2;
+ u32 wrap_t : 2;
u32 mag_filter : 1;
u32 min_filter : 3;
- u32 diag_lod : 1;
- s32 lod_bias : 8;
- u32 pad0 : 2;
- u32 max_aniso : 2;
- u32 lod_clamp : 1;
+ u32 diag_lod : 1;
+ s32 lod_bias : 8;
+ u32 pad0 : 2;
+ u32 max_aniso : 2;
+ u32 lod_clamp : 1;
};
u32 hex;
};
@@ -469,8 +469,8 @@ union TexImage0
{
struct
{
- u32 width : 10; //actually w-1
- u32 height : 10; //actually h-1
+ u32 width : 10; // Actually w-1
+ u32 height : 10; // Actually h-1
u32 format : 4;
};
u32 hex;
@@ -479,10 +479,10 @@ union TexImage1
{
struct
{
- u32 tmem_even : 15; // tmem line index for even LODs
- u32 cache_width : 3;
+ u32 tmem_even : 15; // TMEM line index for even LODs
+ u32 cache_width : 3;
u32 cache_height : 3;
- u32 image_type : 1; // 1 if this texture is managed manually (0 means we'll autofetch the texture data whenever it changes)
+ u32 image_type : 1; // 1 if this texture is managed manually (0 means we'll autofetch the texture data whenever it changes)
};
u32 hex;
};
@@ -491,8 +491,8 @@ union TexImage2
{
struct
{
- u32 tmem_odd : 15; // tmem line index for odd LODs
- u32 cache_width : 3;
+ u32 tmem_odd : 15; // tmem line index for odd LODs
+ u32 cache_width : 3;
u32 cache_height : 3;
};
u32 hex;
@@ -536,9 +536,9 @@ union ZTex2
};
// Z-texture types (formats)
-#define TEV_ZTEX_TYPE_U8 0
-#define TEV_ZTEX_TYPE_U16 1
-#define TEV_ZTEX_TYPE_U24 2
+#define TEV_ZTEX_TYPE_U8 0
+#define TEV_ZTEX_TYPE_U16 1
+#define TEV_ZTEX_TYPE_U24 2
#define TEV_ZTEX_DISABLE 0
#define TEV_ZTEX_ADD 1
@@ -565,13 +565,13 @@ union GenMode
{
struct
{
- u32 numtexgens : 4; // 0xF
- u32 numcolchans : 5; // 0x1E0
+ u32 numtexgens : 4; // 0xF
+ u32 numcolchans : 5; // 0x1E0
u32 multisampling : 1; // 0x200
- u32 numtevstages : 4; // 0x3C00
- u32 cullmode : 2; // 0xC000
- u32 numindstages : 3; // 0x30000
- u32 zfreeze : 5; //0x3C0000
+ u32 numtevstages : 4; // 0x3C00
+ u32 cullmode : 2; // 0xC000
+ u32 numindstages : 3; // 0x30000
+ u32 zfreeze : 5; //0x3C0000
};
u32 hex;
};
@@ -580,12 +580,12 @@ union LPSize
{
struct
{
- u32 linesize : 8; // in 1/6th pixels
- u32 pointsize : 8; // in 1/6th pixels
- u32 lineoff : 3;
- u32 pointoff : 3;
+ u32 linesize : 8; // in 1/6th pixels
+ u32 pointsize : 8; // in 1/6th pixels
+ u32 lineoff : 3;
+ u32 pointoff : 3;
u32 lineaspect : 1; // interlacing: adjust for pixels having AR of 1/2
- u32 padding : 1;
+ u32 padding : 1;
};
u32 hex;
};
@@ -630,13 +630,13 @@ union BlendMode
{
u32 blendenable : 1;
u32 logicopenable : 1;
- u32 dither : 1;
- u32 colorupdate : 1;
- u32 alphaupdate : 1;
- u32 dstfactor : 3; //BLEND_ONE, BLEND_INV_SRc etc
- u32 srcfactor : 3;
- u32 subtract : 1;
- u32 logicmode : 4;
+ u32 dither : 1;
+ u32 colorupdate : 1;
+ u32 alphaupdate : 1;
+ u32 dstfactor : 3; //BLEND_ONE, BLEND_INV_SRc etc
+ u32 srcfactor : 3;
+ u32 subtract : 1;
+ u32 logicmode : 4;
};
u32 hex;
};
@@ -666,10 +666,10 @@ union FogParam3
struct
{
u32 c_mant : 11;
- u32 c_exp : 8;
+ u32 c_exp : 8;
u32 c_sign : 1;
- u32 proj : 1; // 0 - perspective, 1 - orthographic
- u32 fsel : 3; // 0 - off, 2 - linear, 4 - exp, 5 - exp2, 6 - backward exp, 7 - backward exp2
+ u32 proj : 1; // 0 - perspective, 1 - orthographic
+ u32 fsel : 3; // 0 - off, 2 - linear, 4 - exp, 5 - exp2, 6 - backward exp, 7 - backward exp2
};
// amount to subtract from eyespacez after range adjustment
@@ -703,10 +703,10 @@ struct FogRangeParams
{
struct
{
- u32 Center : 10; // viewport center + 342
+ u32 Center : 10; // viewport center + 342
u32 Enabled : 1;
- u32 unused : 13;
- u32 regid : 8;
+ u32 unused : 13;
+ u32 regid : 8;
};
u32 hex;
};
@@ -739,9 +739,9 @@ union ZMode
{
struct
{
- u32 testenable : 1;
- u32 func : 3;
- u32 updateenable : 1; //size?
+ u32 testenable : 1;
+ u32 func : 3;
+ u32 updateenable : 1; //size?
};
u32 hex;
};
@@ -776,34 +776,34 @@ union FieldMask
u32 hex;
};
-#define PIXELFMT_RGB8_Z24 0
-#define PIXELFMT_RGBA6_Z24 1
+#define PIXELFMT_RGB8_Z24 0
+#define PIXELFMT_RGBA6_Z24 1
#define PIXELFMT_RGB565_Z16 2
-#define PIXELFMT_Z24 3
-#define PIXELFMT_Y8 4
-#define PIXELFMT_U8 5
-#define PIXELFMT_V8 6
-#define PIXELFMT_YUV420 7
-
-#define ZC_LINEAR 0
-#define ZC_NEAR 1
-#define ZC_MID 2
-#define ZC_FAR 3
+#define PIXELFMT_Z24 3
+#define PIXELFMT_Y8 4
+#define PIXELFMT_U8 5
+#define PIXELFMT_V8 6
+#define PIXELFMT_YUV420 7
+
+#define ZC_LINEAR 0
+#define ZC_NEAR 1
+#define ZC_MID 2
+#define ZC_FAR 3
// It seems these Z formats aren't supported/were removed ?
#define ZC_INV_LINEAR 4
-#define ZC_INV_NEAR 5
-#define ZC_INV_MID 6
-#define ZC_INV_FAR 7
+#define ZC_INV_NEAR 5
+#define ZC_INV_MID 6
+#define ZC_INV_FAR 7
union PE_CONTROL
{
struct
{
- u32 pixel_format : 3; // PIXELFMT_X
- u32 zformat : 3; // Z Compression for 16bit Z format
- u32 early_ztest : 1; // 1: before tex stage
- u32 unused : 17;
- u32 rid : 8;
+ u32 pixel_format : 3; // PIXELFMT_X
+ u32 zformat : 3; // Z Compression for 16bit Z format
+ u32 early_ztest : 1; // 1: before tex stage
+ u32 unused : 17;
+ u32 rid : 8;
};
u32 hex;
@@ -816,12 +816,12 @@ union TCInfo
{
struct
{
- u32 scale_minus_1 : 16;
- u32 range_bias : 1;
+ u32 scale_minus_1 : 16;
+ u32 range_bias : 1;
u32 cylindric_wrap : 1;
// These bits only have effect in the s field of TCoordInfo
- u32 line_offset : 1;
- u32 point_offset : 1;
+ u32 line_offset : 1;
+ u32 point_offset : 1;
};
u32 hex;
};
@@ -837,9 +837,9 @@ union ColReg
u32 hex;
struct
{
- s32 a : 11;
- u32 : 1;
- s32 b : 11;
+ s32 a : 11;
+ u32 : 1;
+ s32 b : 11;
u32 type : 1;
};
};
@@ -926,18 +926,18 @@ union UPE_Copy
u32 Hex;
struct
{
- u32 clamp0 : 1; // if set clamp top
- u32 clamp1 : 1; // if set clamp bottom
- u32 yuv : 1; // if set, color conversion from RGB to YUV
- u32 target_pixel_format : 4; // realformat is (fmt/2)+((fmt&1)*8).... for some reason the msb is the lsb (pattern: cycling right shift)
- u32 gamma : 2; // gamma correction.. 0 = 1.0 ; 1 = 1.7 ; 2 = 2.2 ; 3 is reserved
- u32 half_scale : 1; // "mipmap" filter... 0 = no filter (scale 1:1) ; 1 = box filter (scale 2:1)
- u32 scale_invert : 1; // if set vertical scaling is on
- u32 clear : 1;
- u32 frame_to_field : 2; // 0 progressive ; 1 is reserved ; 2 = interlaced (even lines) ; 3 = interlaced 1 (odd lines)
- u32 copy_to_xfb : 1;
- u32 intensity_fmt : 1; // if set, is an intensity format (I4,I8,IA4,IA8)
- u32 auto_conv : 1; // if 0 automatic color conversion by texture format and pixel type
+ u32 clamp0 : 1; // if set clamp top
+ u32 clamp1 : 1; // if set clamp bottom
+ u32 yuv : 1; // if set, color conversion from RGB to YUV
+ u32 target_pixel_format : 4; // realformat is (fmt/2)+((fmt&1)*8).... for some reason the msb is the lsb (pattern: cycling right shift)
+ u32 gamma : 2; // gamma correction.. 0 = 1.0 ; 1 = 1.7 ; 2 = 2.2 ; 3 is reserved
+ u32 half_scale : 1; // "mipmap" filter... 0 = no filter (scale 1:1) ; 1 = box filter (scale 2:1)
+ u32 scale_invert : 1; // if set vertical scaling is on
+ u32 clear : 1;
+ u32 frame_to_field : 2; // 0 progressive ; 1 is reserved ; 2 = interlaced (even lines) ; 3 = interlaced 1 (odd lines)
+ u32 copy_to_xfb : 1;
+ u32 intensity_fmt : 1; // if set, is an intensity format (I4,I8,IA4,IA8)
+ u32 auto_conv : 1; // if 0 automatic color conversion by texture format and pixel type
};
u32 tp_realFormat() {
return target_pixel_format / 2 + (target_pixel_format & 1) * 8;
@@ -1011,7 +1011,7 @@ struct BPMemory
u32 copyTexDest; //4b// 4b == CopyAddress (GXDispCopy and GXTexCopy use it)
u32 unknown6; //4c
u32 copyMipMapStrideChannels; // 4d usually set to 4 when dest is single channel, 8 when dest is 2 channel, 16 when dest is RGBA
- // also, doubles whenever mipmap box filter option is set (excent on RGBA). Probably to do with number of bytes to look at when smoothing
+ // also, doubles whenever mipmap box filter option is set (excent on RGBA). Probably to do with number of bytes to look at when smoothing
u32 dispcopyyscale; //4e
u32 clearcolorAR; //4f
u32 clearcolorGB; //50
diff --git a/Source/Core/VideoCommon/CPMemory.h b/Source/Core/VideoCommon/CPMemory.h
index dab187c26d..87c6918c80 100644
--- a/Source/Core/VideoCommon/CPMemory.h
+++ b/Source/Core/VideoCommon/CPMemory.h
@@ -60,33 +60,33 @@ union TVtxDesc
{
// 0: not present
// 1: present
- u32 PosMatIdx : 1;
- u32 Tex0MatIdx : 1;
- u32 Tex1MatIdx : 1;
- u32 Tex2MatIdx : 1;
- u32 Tex3MatIdx : 1;
- u32 Tex4MatIdx : 1;
- u32 Tex5MatIdx : 1;
- u32 Tex6MatIdx : 1;
- u32 Tex7MatIdx : 1;
+ u32 PosMatIdx : 1;
+ u32 Tex0MatIdx : 1;
+ u32 Tex1MatIdx : 1;
+ u32 Tex2MatIdx : 1;
+ u32 Tex3MatIdx : 1;
+ u32 Tex4MatIdx : 1;
+ u32 Tex5MatIdx : 1;
+ u32 Tex6MatIdx : 1;
+ u32 Tex7MatIdx : 1;
// 00: not present
// 01: direct
// 10: 8 bit index
// 11: 16 bit index
- u32 Position : 2;
- u32 Normal : 2;
- u32 Color0 : 2;
- u32 Color1 : 2;
- u32 Tex0Coord : 2;
- u32 Tex1Coord : 2;
- u32 Tex2Coord : 2;
- u32 Tex3Coord : 2;
- u32 Tex4Coord : 2;
- u32 Tex5Coord : 2;
- u32 Tex6Coord : 2;
- u32 Tex7Coord : 2;
- u32 :31;
+ u32 Position : 2;
+ u32 Normal : 2;
+ u32 Color0 : 2;
+ u32 Color1 : 2;
+ u32 Tex0Coord : 2;
+ u32 Tex1Coord : 2;
+ u32 Tex2Coord : 2;
+ u32 Tex3Coord : 2;
+ u32 Tex4Coord : 2;
+ u32 Tex5Coord : 2;
+ u32 Tex6Coord : 2;
+ u32 Tex7Coord : 2;
+ u32 :31;
};
struct
@@ -101,25 +101,25 @@ union UVAT_group0
struct
{
// 0:8
- u32 PosElements : 1;
- u32 PosFormat : 3;
- u32 PosFrac : 5;
+ u32 PosElements : 1;
+ u32 PosFormat : 3;
+ u32 PosFrac : 5;
// 9:12
- u32 NormalElements : 1;
- u32 NormalFormat : 3;
+ u32 NormalElements : 1;
+ u32 NormalFormat : 3;
// 13:16
- u32 Color0Elements : 1;
- u32 Color0Comp : 3;
+ u32 Color0Elements : 1;
+ u32 Color0Comp : 3;
// 17:20
- u32 Color1Elements : 1;
- u32 Color1Comp : 3;
+ u32 Color1Elements : 1;
+ u32 Color1Comp : 3;
// 21:29
- u32 Tex0CoordElements : 1;
- u32 Tex0CoordFormat : 3;
- u32 Tex0Frac : 5;
+ u32 Tex0CoordElements : 1;
+ u32 Tex0CoordFormat : 3;
+ u32 Tex0Frac : 5;
// 30:31
- u32 ByteDequant : 1;
- u32 NormalIndex3 : 1;
+ u32 ByteDequant : 1;
+ u32 NormalIndex3 : 1;
};
};
@@ -129,22 +129,22 @@ union UVAT_group1
struct
{
// 0:8
- u32 Tex1CoordElements : 1;
- u32 Tex1CoordFormat : 3;
- u32 Tex1Frac : 5;
+ u32 Tex1CoordElements : 1;
+ u32 Tex1CoordFormat : 3;
+ u32 Tex1Frac : 5;
// 9:17
- u32 Tex2CoordElements : 1;
- u32 Tex2CoordFormat : 3;
- u32 Tex2Frac : 5;
+ u32 Tex2CoordElements : 1;
+ u32 Tex2CoordFormat : 3;
+ u32 Tex2Frac : 5;
// 18:26
- u32 Tex3CoordElements : 1;
- u32 Tex3CoordFormat : 3;
- u32 Tex3Frac : 5;
+ u32 Tex3CoordElements : 1;
+ u32 Tex3CoordFormat : 3;
+ u32 Tex3Frac : 5;
// 27:30
- u32 Tex4CoordElements : 1;
- u32 Tex4CoordFormat : 3;
+ u32 Tex4CoordElements : 1;
+ u32 Tex4CoordFormat : 3;
//
- u32 : 1;
+ u32 : 1;
};
};
@@ -154,19 +154,19 @@ union UVAT_group2
struct
{
// 0:4
- u32 Tex4Frac : 5;
+ u32 Tex4Frac : 5;
// 5:13
- u32 Tex5CoordElements : 1;
- u32 Tex5CoordFormat : 3;
- u32 Tex5Frac : 5;
+ u32 Tex5CoordElements : 1;
+ u32 Tex5CoordFormat : 3;
+ u32 Tex5Frac : 5;
// 14:22
- u32 Tex6CoordElements : 1;
- u32 Tex6CoordFormat : 3;
- u32 Tex6Frac : 5;
+ u32 Tex6CoordElements : 1;
+ u32 Tex6CoordFormat : 3;
+ u32 Tex6Frac : 5;
// 23:31
- u32 Tex7CoordElements : 1;
- u32 Tex7CoordFormat : 3;
- u32 Tex7Frac : 5;
+ u32 Tex7CoordElements : 1;
+ u32 Tex7CoordFormat : 3;
+ u32 Tex7Frac : 5;
};
};
diff --git a/Source/Core/VideoCommon/CommandProcessor.h b/Source/Core/VideoCommon/CommandProcessor.h
index 57ac25af16..e9fe9fedbe 100644
--- a/Source/Core/VideoCommon/CommandProcessor.h
+++ b/Source/Core/VideoCommon/CommandProcessor.h
@@ -82,12 +82,12 @@ union UCPStatusReg
{
struct
{
- u16 OverflowHiWatermark : 1;
- u16 UnderflowLoWatermark: 1;
- u16 ReadIdle : 1;
- u16 CommandIdle : 1;
- u16 Breakpoint : 1;
- u16 : 11;
+ u16 OverflowHiWatermark : 1;
+ u16 UnderflowLoWatermark : 1;
+ u16 ReadIdle : 1;
+ u16 CommandIdle : 1;
+ u16 Breakpoint : 1;
+ u16 : 11;
};
u16 Hex;
UCPStatusReg() {Hex = 0; }
@@ -99,13 +99,13 @@ union UCPCtrlReg
{
struct
{
- u16 GPReadEnable : 1;
- u16 BPEnable : 1;
- u16 FifoOverflowIntEnable : 1;
- u16 FifoUnderflowIntEnable : 1;
- u16 GPLinkEnable : 1;
- u16 BPInt : 1;
- u16 : 10;
+ u16 GPReadEnable : 1;
+ u16 BPEnable : 1;
+ u16 FifoOverflowIntEnable : 1;
+ u16 FifoUnderflowIntEnable : 1;
+ u16 GPLinkEnable : 1;
+ u16 BPInt : 1;
+ u16 : 10;
};
u16 Hex;
UCPCtrlReg() {Hex = 0; }
@@ -117,10 +117,10 @@ union UCPClearReg
{
struct
{
- u16 ClearFifoOverflow : 1;
- u16 ClearFifoUnderflow : 1;
- u16 ClearMetrices : 1;
- u16 : 13;
+ u16 ClearFifoOverflow : 1;
+ u16 ClearFifoUnderflow : 1;
+ u16 ClearMetrices : 1;
+ u16 : 13;
};
u16 Hex;
UCPClearReg() {Hex = 0; }
diff --git a/Source/Core/VideoCommon/LightingShaderGen.h b/Source/Core/VideoCommon/LightingShaderGen.h
index d50716cfcd..10c38dae91 100644
--- a/Source/Core/VideoCommon/LightingShaderGen.h
+++ b/Source/Core/VideoCommon/LightingShaderGen.h
@@ -30,12 +30,12 @@
*/
struct LightingUidData
{
- u32 matsource : 4; // 4x1 bit
- u32 enablelighting : 4; // 4x1 bit
- u32 ambsource : 4; // 4x1 bit
- u32 diffusefunc : 8; // 4x2 bits
- u32 attnfunc : 8; // 4x2 bits
- u32 light_mask : 32; // 4x8 bits
+ u32 matsource : 4; // 4x1 bit
+ u32 enablelighting : 4; // 4x1 bit
+ u32 ambsource : 4; // 4x1 bit
+ u32 diffusefunc : 8; // 4x2 bits
+ u32 attnfunc : 8; // 4x2 bits
+ u32 light_mask : 32; // 4x8 bits
};
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp
index 90e5c008ef..9f14a90526 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -19,8 +19,8 @@ namespace OSD
struct Message
{
- Message() {}
- Message(const std::string& s, u32 ts) : str(s), timestamp(ts) {}
+ Message() {}
+ Message(const std::string& s, u32 ts) : str(s), timestamp(ts) {}
std::string str;
u32 timestamp;
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index 7ac79ebe3e..b075a296d9 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -27,10 +27,10 @@ union UPEZConfReg
u16 Hex;
struct
{
- u16 ZCompEnable : 1; // Z Comparator Enable
- u16 Function : 3;
- u16 ZUpdEnable : 1;
- u16 : 11;
+ u16 ZCompEnable : 1; // Z Comparator Enable
+ u16 Function : 3;
+ u16 ZUpdEnable : 1;
+ u16 : 11;
};
};
@@ -39,15 +39,15 @@ union UPEAlphaConfReg
u16 Hex;
struct
{
- u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
- u16 BMLogic : 1; // GX_BM_LOGIC
- u16 Dither : 1;
- u16 ColorUpdEnable : 1;
- u16 AlphaUpdEnable : 1;
- u16 DstFactor : 3;
- u16 SrcFactor : 3;
- u16 Substract : 1; // Additive mode by default
- u16 BlendOperator : 4;
+ u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
+ u16 BMLogic : 1; // GX_BM_LOGIC
+ u16 Dither : 1;
+ u16 ColorUpdEnable : 1;
+ u16 AlphaUpdEnable : 1;
+ u16 DstFactor : 3;
+ u16 SrcFactor : 3;
+ u16 Substract : 1; // Additive mode by default
+ u16 BlendOperator : 4;
};
};
@@ -56,9 +56,9 @@ union UPEDstAlphaConfReg
u16 Hex;
struct
{
- u16 DstAlpha : 8;
- u16 Enable : 1;
- u16 : 7;
+ u16 DstAlpha : 8;
+ u16 Enable : 1;
+ u16 : 7;
};
};
@@ -67,8 +67,8 @@ union UPEAlphaModeConfReg
u16 Hex;
struct
{
- u16 Threshold : 8;
- u16 CompareMode : 8;
+ u16 Threshold : 8;
+ u16 CompareMode : 8;
};
};
@@ -77,11 +77,11 @@ union UPECtrlReg
{
struct
{
- u16 PETokenEnable : 1;
- u16 PEFinishEnable : 1;
- u16 PEToken : 1; // write only
- u16 PEFinish : 1; // write only
- u16 : 12;
+ u16 PETokenEnable : 1;
+ u16 PEFinishEnable : 1;
+ u16 PEToken : 1; // write only
+ u16 PEFinish : 1; // write only
+ u16 : 12;
};
u16 Hex;
UPECtrlReg() {Hex = 0; }
@@ -89,13 +89,13 @@ union UPECtrlReg
};
// STATE_TO_SAVE
-static UPEZConfReg m_ZConf;
-static UPEAlphaConfReg m_AlphaConf;
-static UPEDstAlphaConfReg m_DstAlphaConf;
-static UPEAlphaModeConfReg m_AlphaModeConf;
-static UPEAlphaReadReg m_AlphaRead;
-static UPECtrlReg m_Control;
-//static u16 m_Token; // token value most recently encountered
+static UPEZConfReg m_ZConf;
+static UPEAlphaConfReg m_AlphaConf;
+static UPEDstAlphaConfReg m_DstAlphaConf;
+static UPEAlphaModeConfReg m_AlphaModeConf;
+static UPEAlphaReadReg m_AlphaRead;
+static UPECtrlReg m_Control;
+//static u16 m_Token; // token value most recently encountered
volatile u32 g_bSignalTokenInterrupt;
volatile u32 g_bSignalFinishInterrupt;
diff --git a/Source/Core/VideoCommon/VertexShaderGen.h b/Source/Core/VideoCommon/VertexShaderGen.h
index 0bc4d8d832..f48d1c69fb 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.h
+++ b/Source/Core/VideoCommon/VertexShaderGen.h
@@ -59,26 +59,26 @@ struct vertex_shader_uid_data
{
u32 NumValues() const { return sizeof(vertex_shader_uid_data); }
- u32 components : 23;
- u32 numTexGens : 4;
- u32 numColorChans : 2;
+ u32 components : 23;
+ u32 numTexGens : 4;
+ u32 numColorChans : 2;
u32 dualTexTrans_enabled : 1;
- u32 pixel_lighting : 1;
- u32 pad0 : 1;
+ u32 pixel_lighting : 1;
+ u32 pad0 : 1;
u32 texMtxInfo_n_projection : 16; // Stored separately to guarantee that the texMtxInfo struct is 8 bits wide
struct {
- u32 inputform : 2;
- u32 texgentype : 3;
- u32 sourcerow : 5;
+ u32 inputform : 2;
+ u32 texgentype : 3;
+ u32 sourcerow : 5;
u32 embosssourceshift : 3;
- u32 embosslightshift : 3;
+ u32 embosslightshift : 3;
} texMtxInfo[8];
struct {
- u32 index : 6;
+ u32 index : 6;
u32 normalize : 1;
- u32 pad : 1;
+ u32 pad : 1;
} postMtxInfo[8];
LightingUidData lighting;