Merge pull request #86 from lioncash/vertical-alignments2-electric-boogaloo
Second and final pass of clearing out tabs.
This commit is contained in:
commit
73691a8587
|
@ -28,16 +28,16 @@
|
|||
#include <soundtouch/STTypes.h>
|
||||
|
||||
// 16 bit Stereo
|
||||
#define SFX_MAX_SOURCE 1
|
||||
#define OAL_MAX_BUFFERS 32
|
||||
#define OAL_MAX_SAMPLES 256
|
||||
#define STEREO_CHANNELS 2
|
||||
#define SURROUND_CHANNELS 6 // number of channels in surround mode
|
||||
#define SIZE_SHORT 2
|
||||
#define SIZE_FLOAT 4 // size of a float in bytes
|
||||
#define FRAME_STEREO_SHORT STEREO_CHANNELS * SIZE_SHORT
|
||||
#define FRAME_STEREO_FLOAT STEREO_CHANNELS * SIZE_FLOAT
|
||||
#define FRAME_SURROUND_FLOAT SURROUND_CHANNELS * SIZE_FLOAT
|
||||
#define SFX_MAX_SOURCE 1
|
||||
#define OAL_MAX_BUFFERS 32
|
||||
#define OAL_MAX_SAMPLES 256
|
||||
#define STEREO_CHANNELS 2
|
||||
#define SURROUND_CHANNELS 6 // number of channels in surround mode
|
||||
#define SIZE_SHORT 2
|
||||
#define SIZE_FLOAT 4 // size of a float in bytes
|
||||
#define FRAME_STEREO_SHORT STEREO_CHANNELS * SIZE_SHORT
|
||||
#define FRAME_STEREO_FLOAT STEREO_CHANNELS * SIZE_FLOAT
|
||||
#define FRAME_SURROUND_FLOAT SURROUND_CHANNELS * SIZE_FLOAT
|
||||
#endif
|
||||
|
||||
class OpenALStream: public SoundStream
|
||||
|
|
|
@ -44,7 +44,7 @@ static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) {
|
|||
_assert_msg_(AUDIO, SL_RESULT_SUCCESS == result, "Couldn't enqueue audio stream.");
|
||||
|
||||
|
||||
curBuffer ^= 1; // Switch buffer
|
||||
curBuffer ^= 1; // Switch buffer
|
||||
// Render to the fresh buffer
|
||||
g_mixer->Mix(reinterpret_cast<short *>(buffer[curBuffer]), BUFFER_SIZE_IN_SAMPLES);
|
||||
}
|
||||
|
|
|
@ -217,11 +217,11 @@ void XAudio2::Update()
|
|||
//static int xi = 0;
|
||||
//if (100000 == ++xi)
|
||||
//{
|
||||
// xi = 0;
|
||||
// XAUDIO2_PERFORMANCE_DATA perfData;
|
||||
// pXAudio2->GetPerformanceData(&perfData);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted);
|
||||
// xi = 0;
|
||||
// XAUDIO2_PERFORMANCE_DATA perfData;
|
||||
// pXAudio2->GetPerformanceData(&perfData);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2 latency (samples): %i", perfData.CurrentLatencyInSamples);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2 total glitches: %i", perfData.GlitchesSinceEngineStarted);
|
||||
//}
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ void XAudio2::Stop()
|
|||
m_mastering_voice = nullptr;
|
||||
}
|
||||
|
||||
m_xaudio2.reset(); // release interface
|
||||
m_xaudio2.reset(); // release interface
|
||||
|
||||
if (m_xaudio2_dll)
|
||||
{
|
||||
|
|
|
@ -218,11 +218,11 @@ void XAudio2_7::Update()
|
|||
//static int xi = 0;
|
||||
//if (100000 == ++xi)
|
||||
//{
|
||||
// xi = 0;
|
||||
// XAUDIO2_PERFORMANCE_DATA perfData;
|
||||
// pXAudio2->GetPerformanceData(&perfData);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2_7 latency (samples): %i", perfData.CurrentLatencyInSamples);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2_7 total glitches: %i", perfData.GlitchesSinceEngineStarted);
|
||||
// xi = 0;
|
||||
// XAUDIO2_PERFORMANCE_DATA perfData;
|
||||
// pXAudio2->GetPerformanceData(&perfData);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2_7 latency (samples): %i", perfData.CurrentLatencyInSamples);
|
||||
// NOTICE_LOG(DSPHLE, "XAudio2_7 total glitches: %i", perfData.GlitchesSinceEngineStarted);
|
||||
//}
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ void XAudio2_7::Stop()
|
|||
m_mastering_voice = nullptr;
|
||||
}
|
||||
|
||||
m_xaudio2.reset(); // release interface
|
||||
m_xaudio2.reset(); // release interface
|
||||
|
||||
if (m_xaudio2_dll)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
ALDeviceList::ALDeviceList()
|
||||
{
|
||||
ALDEVICEINFO ALDeviceInfo;
|
||||
ALDEVICEINFO ALDeviceInfo;
|
||||
char *devices;
|
||||
s32 index;
|
||||
const char *defaultDeviceName = NULL;
|
||||
|
|
|
@ -12,12 +12,12 @@ using namespace std;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
string strDeviceName;
|
||||
s32 iMajorVersion;
|
||||
s32 iMinorVersion;
|
||||
u32 uiSourceCount;
|
||||
vector<string> *pvstrExtensions;
|
||||
bool bSelected;
|
||||
string strDeviceName;
|
||||
s32 iMajorVersion;
|
||||
s32 iMinorVersion;
|
||||
u32 uiSourceCount;
|
||||
vector<string>* pvstrExtensions;
|
||||
bool bSelected;
|
||||
} ALDEVICEINFO, *LPALDEVICEINFO;
|
||||
|
||||
class ALDeviceList
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define _WIN32_WINNT 0x602
|
||||
#endif
|
||||
*/
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
|
|
@ -412,7 +412,7 @@ FixupBranch ARMXEmitter::BL_CC(CCFlags Cond)
|
|||
void ARMXEmitter::SetJumpTarget(FixupBranch const &branch)
|
||||
{
|
||||
s32 distance = (s32(code) - 8) - (s32)branch.ptr;
|
||||
_dbg_assert_msg_(DYNA_REC, distance > -33554432
|
||||
_dbg_assert_msg_(DYNA_REC, distance > -33554432
|
||||
&& distance <= 33554432,
|
||||
"SetJumpTarget out of range (%p calls %p)", code,
|
||||
branch.ptr);
|
||||
|
@ -420,13 +420,13 @@ void ARMXEmitter::SetJumpTarget(FixupBranch const &branch)
|
|||
*(u32*)branch.ptr = (u32)(branch.condition | (10 << 24) | ((distance >> 2) &
|
||||
0x00FFFFFF));
|
||||
else // BL
|
||||
*(u32*)branch.ptr = (u32)(branch.condition | 0x0B000000 | ((distance >> 2)
|
||||
*(u32*)branch.ptr = (u32)(branch.condition | 0x0B000000 | ((distance >> 2)
|
||||
& 0x00FFFFFF));
|
||||
}
|
||||
void ARMXEmitter::B (const void *fnptr)
|
||||
{
|
||||
s32 distance = (s32)fnptr - (s32(code) + 8);
|
||||
_dbg_assert_msg_(DYNA_REC, distance > -33554432
|
||||
_dbg_assert_msg_(DYNA_REC, distance > -33554432
|
||||
&& distance <= 33554432,
|
||||
"B out of range (%p calls %p)", code, fnptr);
|
||||
|
||||
|
@ -553,19 +553,19 @@ void ARMXEmitter::SBC (ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(6,
|
|||
void ARMXEmitter::SBCS(ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(6, Rd, Rn, Rm, true); }
|
||||
void ARMXEmitter::RSC (ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(7, Rd, Rn, Rm); }
|
||||
void ARMXEmitter::RSCS(ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(7, Rd, Rn, Rm, true); }
|
||||
void ARMXEmitter::TST ( ARMReg Rn, Operand2 Rm) { WriteInstruction(8, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::TEQ ( ARMReg Rn, Operand2 Rm) { WriteInstruction(9, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::CMP ( ARMReg Rn, Operand2 Rm) { WriteInstruction(10, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::CMN ( ARMReg Rn, Operand2 Rm) { WriteInstruction(11, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::TST ( ARMReg Rn, Operand2 Rm) { WriteInstruction(8, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::TEQ ( ARMReg Rn, Operand2 Rm) { WriteInstruction(9, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::CMP ( ARMReg Rn, Operand2 Rm) { WriteInstruction(10, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::CMN ( ARMReg Rn, Operand2 Rm) { WriteInstruction(11, R0, Rn, Rm, true); }
|
||||
void ARMXEmitter::ORR (ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(12, Rd, Rn, Rm); }
|
||||
void ARMXEmitter::ORRS(ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(12, Rd, Rn, Rm, true); }
|
||||
void ARMXEmitter::MOV (ARMReg Rd, Operand2 Rm) { WriteInstruction(13, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MOVS(ARMReg Rd, Operand2 Rm) { WriteInstruction(13, Rd, R0, Rm, true); }
|
||||
void ARMXEmitter::MOV (ARMReg Rd, Operand2 Rm) { WriteInstruction(13, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MOVS(ARMReg Rd, Operand2 Rm) { WriteInstruction(13, Rd, R0, Rm, true); }
|
||||
void ARMXEmitter::BIC (ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(14, Rd, Rn, Rm); }
|
||||
void ARMXEmitter::BICS(ARMReg Rd, ARMReg Rn, Operand2 Rm) { WriteInstruction(14, Rd, Rn, Rm, true); }
|
||||
void ARMXEmitter::MVN (ARMReg Rd, Operand2 Rm) { WriteInstruction(15, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MVNS(ARMReg Rd, Operand2 Rm) { WriteInstruction(15, Rd, R0, Rm, true); }
|
||||
void ARMXEmitter::MOVW(ARMReg Rd, Operand2 Rm) { WriteInstruction(16, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MVN (ARMReg Rd, Operand2 Rm) { WriteInstruction(15, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MVNS(ARMReg Rd, Operand2 Rm) { WriteInstruction(15, Rd, R0, Rm, true); }
|
||||
void ARMXEmitter::MOVW(ARMReg Rd, Operand2 Rm) { WriteInstruction(16, Rd, R0, Rm); }
|
||||
void ARMXEmitter::MOVT(ARMReg Rd, Operand2 Rm, bool TopBits) { WriteInstruction(17, Rd, R0, TopBits ? Rm.Value >> 16 : Rm); }
|
||||
|
||||
void ARMXEmitter::WriteInstruction (u32 Op, ARMReg Rd, ARMReg Rn, Operand2 Rm, bool SetFlags) // This can get renamed later
|
||||
|
@ -614,11 +614,11 @@ void ARMXEmitter::LSRS(ARMReg dest, ARMReg src, Operand2 op2) { WriteShiftedData
|
|||
void ARMXEmitter::ASR (ARMReg dest, ARMReg src, Operand2 op2) { WriteShiftedDataOp(4, false, dest, src, op2);}
|
||||
void ARMXEmitter::ASRS(ARMReg dest, ARMReg src, Operand2 op2) { WriteShiftedDataOp(4, true, dest, src, op2);}
|
||||
|
||||
void ARMXEmitter::MUL (ARMReg dest, ARMReg src, ARMReg op2)
|
||||
void ARMXEmitter::MUL (ARMReg dest, ARMReg src, ARMReg op2)
|
||||
{
|
||||
Write32(condition | (dest << 16) | (src << 8) | (9 << 4) | op2);
|
||||
}
|
||||
void ARMXEmitter::MULS(ARMReg dest, ARMReg src, ARMReg op2)
|
||||
void ARMXEmitter::MULS(ARMReg dest, ARMReg src, ARMReg op2)
|
||||
{
|
||||
Write32(condition | (1 << 20) | (dest << 16) | (src << 8) | (9 << 4) | op2);
|
||||
}
|
||||
|
@ -697,11 +697,11 @@ void ARMXEmitter::REV16(ARMReg dest, ARMReg src)
|
|||
Write32(condition | (0x6BF << 16) | (dest << 12) | (0xFB << 4) | src);
|
||||
}
|
||||
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, Operand2 op2)
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, Operand2 op2)
|
||||
{
|
||||
Write32(condition | (0x320F << 12) | (write_nzcvq << 19) | (write_g << 18) | op2.Imm12Mod());
|
||||
}
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, ARMReg src)
|
||||
void ARMXEmitter::_MSR (bool write_nzcvq, bool write_g, ARMReg src)
|
||||
{
|
||||
Write32(condition | (0x120F << 12) | (write_nzcvq << 19) | (write_g << 18) | src);
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ private:
|
|||
OpType Type;
|
||||
|
||||
// IMM types
|
||||
u8 Rotation; // Only for u8 values
|
||||
u8 Rotation; // Only for u8 values
|
||||
|
||||
// Register types
|
||||
u8 IndexOrShift;
|
||||
|
@ -302,9 +302,9 @@ bool TryMakeOperand2_AllowNegation(s32 imm, Operand2 &op2, bool *negated);
|
|||
// Use this only when you know imm can be made into an Operand2.
|
||||
Operand2 AssumeMakeOperand2(u32 imm);
|
||||
|
||||
inline Operand2 R(ARMReg Reg) { return Operand2(Reg, TYPE_REG); }
|
||||
inline Operand2 IMM(u32 Imm) { return Operand2(Imm, TYPE_IMM); }
|
||||
inline Operand2 Mem(void *ptr) { return Operand2((u32)ptr, TYPE_IMM); }
|
||||
inline Operand2 R(ARMReg Reg) { return Operand2(Reg, TYPE_REG); }
|
||||
inline Operand2 IMM(u32 Imm) { return Operand2(Imm, TYPE_IMM); }
|
||||
inline Operand2 Mem(void *ptr) { return Operand2((u32)ptr, TYPE_IMM); }
|
||||
//usage: struct {int e;} s; STRUCT_OFFSET(s,e)
|
||||
#define STRUCT_OFF(str,elem) ((u32)((u32)&(str).elem-(u32)&(str)))
|
||||
|
||||
|
@ -474,8 +474,8 @@ public:
|
|||
void UDIV(ARMReg dest, ARMReg dividend, ARMReg divisor);
|
||||
void SDIV(ARMReg dest, ARMReg dividend, ARMReg divisor);
|
||||
|
||||
void MUL (ARMReg dest, ARMReg src, ARMReg op2);
|
||||
void MULS(ARMReg dest, ARMReg src, ARMReg op2);
|
||||
void MUL (ARMReg dest, ARMReg src, ARMReg op2);
|
||||
void MULS(ARMReg dest, ARMReg src, ARMReg op2);
|
||||
|
||||
void UMULL(ARMReg destLo, ARMReg destHi, ARMReg rn, ARMReg rm);
|
||||
void UMULLS(ARMReg destLo, ARMReg destHi, ARMReg rn, ARMReg rm);
|
||||
|
@ -599,7 +599,7 @@ private:
|
|||
|
||||
void VREVX(u32 size, u32 Size, ARMReg Vd, ARMReg Vm);
|
||||
|
||||
public:
|
||||
public:
|
||||
NEONXEmitter(ARMXEmitter *emit)
|
||||
: _emit(emit)
|
||||
{}
|
||||
|
|
|
@ -132,11 +132,11 @@ void MemChecks::AddFromStrings(const TMemChecksStr& mcstrs)
|
|||
std::stringstream ss;
|
||||
ss << std::hex << mcstr;
|
||||
ss >> mc.StartAddress;
|
||||
mc.bRange = mcstr.find("n") != mcstr.npos;
|
||||
mc.OnRead = mcstr.find("r") != mcstr.npos;
|
||||
mc.OnWrite = mcstr.find("w") != mcstr.npos;
|
||||
mc.Log = mcstr.find("l") != mcstr.npos;
|
||||
mc.Break = mcstr.find("p") != mcstr.npos;
|
||||
mc.bRange = mcstr.find("n") != mcstr.npos;
|
||||
mc.OnRead = mcstr.find("r") != mcstr.npos;
|
||||
mc.OnWrite = mcstr.find("w") != mcstr.npos;
|
||||
mc.Log = mcstr.find("l") != mcstr.npos;
|
||||
mc.Break = mcstr.find("p") != mcstr.npos;
|
||||
if (mc.bRange)
|
||||
ss >> mc.EndAddress;
|
||||
else
|
||||
|
|
|
@ -47,7 +47,7 @@ std::vector<std::string> cdio_get_devices()
|
|||
if (is_cdrom(drive))
|
||||
{
|
||||
std::string str(TStrToUTF8(drive));
|
||||
str.pop_back(); // we don't want the final backslash
|
||||
str.pop_back(); // we don't want the final backslash
|
||||
drives.push_back(std::move(str));
|
||||
}
|
||||
|
||||
|
|
|
@ -105,13 +105,13 @@ inline u64 _rotr64(u64 x, unsigned int shift){
|
|||
#define freelocale _free_locale
|
||||
#define newlocale(mask, locale, base) _create_locale(mask, locale)
|
||||
|
||||
#define LC_GLOBAL_LOCALE ((locale_t)-1)
|
||||
#define LC_ALL_MASK LC_ALL
|
||||
#define LC_COLLATE_MASK LC_COLLATE
|
||||
#define LC_CTYPE_MASK LC_CTYPE
|
||||
#define LC_MONETARY_MASK LC_MONETARY
|
||||
#define LC_NUMERIC_MASK LC_NUMERIC
|
||||
#define LC_TIME_MASK LC_TIME
|
||||
#define LC_GLOBAL_LOCALE ((locale_t)-1)
|
||||
#define LC_ALL_MASK LC_ALL
|
||||
#define LC_COLLATE_MASK LC_COLLATE
|
||||
#define LC_CTYPE_MASK LC_CTYPE
|
||||
#define LC_MONETARY_MASK LC_MONETARY
|
||||
#define LC_NUMERIC_MASK LC_NUMERIC
|
||||
#define LC_TIME_MASK LC_TIME
|
||||
|
||||
inline locale_t uselocale(locale_t new_locale)
|
||||
{
|
||||
|
|
|
@ -55,63 +55,63 @@
|
|||
#define JAP_DIR "JAP"
|
||||
|
||||
// Subdirs in the User dir returned by GetUserPath(D_USER_IDX)
|
||||
#define GC_USER_DIR "GC"
|
||||
#define WII_USER_DIR "Wii"
|
||||
#define CONFIG_DIR "Config"
|
||||
#define GAMESETTINGS_DIR "GameSettings"
|
||||
#define MAPS_DIR "Maps"
|
||||
#define CACHE_DIR "Cache"
|
||||
#define SHADERCACHE_DIR "ShaderCache"
|
||||
#define STATESAVES_DIR "StateSaves"
|
||||
#define SCREENSHOTS_DIR "ScreenShots"
|
||||
#define LOAD_DIR "Load"
|
||||
#define HIRES_TEXTURES_DIR LOAD_DIR DIR_SEP "Textures"
|
||||
#define DUMP_DIR "Dump"
|
||||
#define DUMP_TEXTURES_DIR "Textures"
|
||||
#define DUMP_FRAMES_DIR "Frames"
|
||||
#define DUMP_AUDIO_DIR "Audio"
|
||||
#define DUMP_DSP_DIR "DSP"
|
||||
#define LOGS_DIR "Logs"
|
||||
#define MAIL_LOGS_DIR "Mail"
|
||||
#define SHADERS_DIR "Shaders"
|
||||
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
|
||||
#define WII_WC24CONF_DIR "shared2" DIR_SEP "wc24"
|
||||
#define THEMES_DIR "Themes"
|
||||
#define GC_USER_DIR "GC"
|
||||
#define WII_USER_DIR "Wii"
|
||||
#define CONFIG_DIR "Config"
|
||||
#define GAMESETTINGS_DIR "GameSettings"
|
||||
#define MAPS_DIR "Maps"
|
||||
#define CACHE_DIR "Cache"
|
||||
#define SHADERCACHE_DIR "ShaderCache"
|
||||
#define STATESAVES_DIR "StateSaves"
|
||||
#define SCREENSHOTS_DIR "ScreenShots"
|
||||
#define LOAD_DIR "Load"
|
||||
#define HIRES_TEXTURES_DIR LOAD_DIR DIR_SEP "Textures"
|
||||
#define DUMP_DIR "Dump"
|
||||
#define DUMP_TEXTURES_DIR "Textures"
|
||||
#define DUMP_FRAMES_DIR "Frames"
|
||||
#define DUMP_AUDIO_DIR "Audio"
|
||||
#define DUMP_DSP_DIR "DSP"
|
||||
#define LOGS_DIR "Logs"
|
||||
#define MAIL_LOGS_DIR "Mail"
|
||||
#define SHADERS_DIR "Shaders"
|
||||
#define WII_SYSCONF_DIR "shared2" DIR_SEP "sys"
|
||||
#define WII_WC24CONF_DIR "shared2" DIR_SEP "wc24"
|
||||
#define THEMES_DIR "Themes"
|
||||
|
||||
// Filenames
|
||||
// Files in the directory returned by GetUserPath(D_CONFIG_IDX)
|
||||
#define DOLPHIN_CONFIG "Dolphin.ini"
|
||||
#define DEBUGGER_CONFIG "Debugger.ini"
|
||||
#define LOGGER_CONFIG "Logger.ini"
|
||||
#define DOLPHIN_CONFIG "Dolphin.ini"
|
||||
#define DEBUGGER_CONFIG "Debugger.ini"
|
||||
#define LOGGER_CONFIG "Logger.ini"
|
||||
|
||||
// Files in the directory returned by GetUserPath(D_LOGS_IDX)
|
||||
#define MAIN_LOG "dolphin.log"
|
||||
#define MAIN_LOG "dolphin.log"
|
||||
|
||||
// Files in the directory returned by GetUserPath(D_WIISYSCONF_IDX)
|
||||
#define WII_SYSCONF "SYSCONF"
|
||||
#define WII_SYSCONF "SYSCONF"
|
||||
|
||||
// Files in the directory returned by GetUserPath(D_DUMP_IDX)
|
||||
#define RAM_DUMP "ram.raw"
|
||||
#define ARAM_DUMP "aram.raw"
|
||||
#define FAKEVMEM_DUMP "fakevmem.raw"
|
||||
#define RAM_DUMP "ram.raw"
|
||||
#define ARAM_DUMP "aram.raw"
|
||||
#define FAKEVMEM_DUMP "fakevmem.raw"
|
||||
|
||||
// Sys files
|
||||
#define TOTALDB "totaldb.dsy"
|
||||
#define TOTALDB "totaldb.dsy"
|
||||
|
||||
#define FONT_ANSI "font_ansi.bin"
|
||||
#define FONT_SJIS "font_sjis.bin"
|
||||
#define FONT_ANSI "font_ansi.bin"
|
||||
#define FONT_SJIS "font_sjis.bin"
|
||||
|
||||
#define DSP_IROM "dsp_rom.bin"
|
||||
#define DSP_COEF "dsp_coef.bin"
|
||||
#define DSP_IROM "dsp_rom.bin"
|
||||
#define DSP_COEF "dsp_coef.bin"
|
||||
|
||||
#define GC_IPL "IPL.bin"
|
||||
#define GC_SRAM "SRAM.raw"
|
||||
#define GC_MEMCARDA "MemoryCardA"
|
||||
#define GC_MEMCARDB "MemoryCardB"
|
||||
#define GC_IPL "IPL.bin"
|
||||
#define GC_SRAM "SRAM.raw"
|
||||
#define GC_MEMCARDA "MemoryCardA"
|
||||
#define GC_MEMCARDB "MemoryCardB"
|
||||
|
||||
#define WII_STATE "state.dat"
|
||||
#define WII_STATE "state.dat"
|
||||
|
||||
#define WII_SETTING "setting.txt"
|
||||
#define WII_SETTING "setting.txt"
|
||||
|
||||
#define GECKO_CODE_HANDLER "codehandler.bin"
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ static void point_add(u8 *r, u8 *p, u8 *q)
|
|||
elt_add(ry, s, rx);
|
||||
}
|
||||
|
||||
void point_mul(u8 *d, const u8 *a, u8 *b) // a is bignum
|
||||
void point_mul(u8 *d, const u8 *a, u8 *b) // a is bignum
|
||||
{
|
||||
u32 i;
|
||||
u8 mask;
|
||||
|
|
|
@ -11,7 +11,7 @@ int bn_compare(u8 *a, u8 *b, u32 n);
|
|||
void bn_sub_modulus(u8 *a, u8 *N, u32 n);
|
||||
void bn_add(u8 *d, u8 *a, u8 *b, u8 *N, u32 n);
|
||||
void bn_mul(u8 *d, u8 *a, u8 *b, u8 *N, u32 n);
|
||||
void bn_inv(u8 *d, u8 *a, u8 *N, u32 n); // only for prime N
|
||||
void bn_inv(u8 *d, u8 *a, u8 *N, u32 n); // only for prime N
|
||||
void bn_exp(u8 *d, u8 *a, u8 *N, u32 n, u8 *e, u32 en);
|
||||
void point_mul(u8 *d, const u8 *a, u8 *b);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
m_read_ptr = AtomicLoad(tmpptr->next);
|
||||
// set the next element to NULL to stop the recursive deletion
|
||||
tmpptr->next = NULL;
|
||||
delete tmpptr; // this also deletes the element
|
||||
delete tmpptr; // this also deletes the element
|
||||
}
|
||||
|
||||
bool Pop(T& t)
|
||||
|
|
|
@ -803,37 +803,37 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
|||
getenv("PWD") : "") + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP;
|
||||
#endif
|
||||
|
||||
paths[D_GCUSER_IDX] = paths[D_USER_IDX] + GC_USER_DIR DIR_SEP;
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
|
||||
paths[D_GAMESETTINGS_IDX] = paths[D_USER_IDX] + GAMESETTINGS_DIR DIR_SEP;
|
||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
|
||||
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
|
||||
paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
|
||||
paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
|
||||
paths[D_HIRESTEXTURES_IDX] = paths[D_USER_IDX] + HIRES_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[D_WIIWC24_IDX] = paths[D_WIIUSER_IDX] + WII_WC24CONF_DIR DIR_SEP;
|
||||
paths[D_THEMES_IDX] = paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
paths[D_GCUSER_IDX] = paths[D_USER_IDX] + GC_USER_DIR DIR_SEP;
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
|
||||
paths[D_GAMESETTINGS_IDX] = paths[D_USER_IDX] + GAMESETTINGS_DIR DIR_SEP;
|
||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
|
||||
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
|
||||
paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
|
||||
paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
|
||||
paths[D_HIRESTEXTURES_IDX] = paths[D_USER_IDX] + HIRES_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[D_WIIWC24_IDX] = paths[D_WIIUSER_IDX] + WII_WC24CONF_DIR DIR_SEP;
|
||||
paths[D_THEMES_IDX] = paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
}
|
||||
|
||||
if (!newPath.empty())
|
||||
|
@ -851,72 +851,72 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
|||
switch (DirIDX)
|
||||
{
|
||||
case D_WIIROOT_IDX:
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR + DIR_SEP;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR + DIR_SEP;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
break;
|
||||
|
||||
case D_USER_IDX:
|
||||
paths[D_GCUSER_IDX] = paths[D_USER_IDX] + GC_USER_DIR DIR_SEP;
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
|
||||
paths[D_GAMESETTINGS_IDX] = paths[D_USER_IDX] + GAMESETTINGS_DIR DIR_SEP;
|
||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
|
||||
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
|
||||
paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
|
||||
paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
|
||||
paths[D_HIRESTEXTURES_IDX] = paths[D_USER_IDX] + HIRES_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[D_THEMES_IDX] = paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
paths[D_GCUSER_IDX] = paths[D_USER_IDX] + GC_USER_DIR DIR_SEP;
|
||||
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
|
||||
paths[D_GAMESETTINGS_IDX] = paths[D_USER_IDX] + GAMESETTINGS_DIR DIR_SEP;
|
||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
|
||||
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
|
||||
paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
|
||||
paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
|
||||
paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
|
||||
paths[D_HIRESTEXTURES_IDX] = paths[D_USER_IDX] + HIRES_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR DIR_SEP;
|
||||
paths[D_THEMES_IDX] = paths[D_USER_IDX] + THEMES_DIR DIR_SEP;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
break;
|
||||
|
||||
case D_CONFIG_IDX:
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
paths[F_DOLPHINCONFIG_IDX] = paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
|
||||
paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
|
||||
paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
|
||||
break;
|
||||
|
||||
case D_GCUSER_IDX:
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
paths[F_GCSRAM_IDX] = paths[D_GCUSER_IDX] + GC_SRAM;
|
||||
break;
|
||||
|
||||
case D_DUMP_IDX:
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
|
||||
paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
|
||||
paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
|
||||
paths[D_DUMPDSP_IDX] = paths[D_DUMP_IDX] + DUMP_DSP_DIR DIR_SEP;
|
||||
paths[F_RAMDUMP_IDX] = paths[D_DUMP_IDX] + RAM_DUMP;
|
||||
paths[F_ARAMDUMP_IDX] = paths[D_DUMP_IDX] + ARAM_DUMP;
|
||||
paths[F_FAKEVMEMDUMP_IDX] = paths[D_DUMP_IDX] + FAKEVMEM_DUMP;
|
||||
break;
|
||||
case D_LOGS_IDX:
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
paths[D_MAILLOGS_IDX] = paths[D_LOGS_IDX] + MAIL_LOGS_DIR DIR_SEP;
|
||||
paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
|
||||
}
|
||||
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_WIIWC24_IDX] = paths[D_WIIUSER_IDX] + WII_WC24CONF_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR + DIR_SEP;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
paths[D_WIIUSER_IDX] = paths[D_WIIROOT_IDX] + DIR_SEP;
|
||||
paths[D_WIIWC24_IDX] = paths[D_WIIUSER_IDX] + WII_WC24CONF_DIR DIR_SEP;
|
||||
paths[D_WIISYSCONF_IDX] = paths[D_WIIUSER_IDX] + WII_SYSCONF_DIR + DIR_SEP;
|
||||
paths[F_WIISYSCONF_IDX] = paths[D_WIISYSCONF_IDX] + WII_SYSCONF;
|
||||
}
|
||||
|
||||
return paths[DirIDX];
|
||||
|
|
|
@ -198,7 +198,7 @@ public:
|
|||
bool IsOpen() { return NULL != m_file; }
|
||||
|
||||
// m_good is set to false when a read, write or other function fails
|
||||
bool IsGood() { return m_good; }
|
||||
bool IsGood() { return m_good; }
|
||||
operator void*() { return m_good ? m_file : NULL; }
|
||||
|
||||
std::FILE* ReleaseHandle();
|
||||
|
|
|
@ -20,7 +20,7 @@ class FixedSizeQueue
|
|||
int count; // sacrifice 4 bytes for a simpler implementation. may optimize away in the future.
|
||||
|
||||
// Make copy constructor private for now.
|
||||
FixedSizeQueue(FixedSizeQueue &other) { }
|
||||
FixedSizeQueue(FixedSizeQueue &other) {}
|
||||
|
||||
public:
|
||||
FixedSizeQueue()
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
void Set(const std::string& key, const std::string& newValue);
|
||||
void Set(const std::string& key, const std::string& newValue, const std::string& defaultValue);
|
||||
|
||||
bool Get(const std::string& key, std::string* value, const std::string& defaultValue = NULL_STRING);
|
||||
bool Get(const std::string& key, std::string* value, const std::string& defaultValue = NULL_STRING);
|
||||
|
||||
void Set(const std::string& key, u32 newValue) {
|
||||
Set(key, StringFromFormat("0x%08x", newValue));
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
Read(value, value_size) &&
|
||||
Read(&entry_number) &&
|
||||
entry_number == m_num_entries+1)
|
||||
{
|
||||
{
|
||||
reader.Read(key, value, value_size);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -140,12 +140,12 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type,
|
|||
|
||||
#ifndef GEKKO
|
||||
#ifdef _WIN32
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
if (!(_a_)) {\
|
||||
if (!PanicYesNo(_fmt_, __VA_ARGS__)) {Crash();} \
|
||||
}
|
||||
#else // not win32
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
#define _assert_msg_(_t_, _a_, _fmt_, ...) \
|
||||
if (!(_a_)) {\
|
||||
if (!PanicYesNo(_fmt_, ##__VA_ARGS__)) {Crash();} \
|
||||
}
|
||||
|
|
|
@ -28,52 +28,52 @@ LogManager *LogManager::m_logManager = NULL;
|
|||
LogManager::LogManager()
|
||||
{
|
||||
// create log files
|
||||
m_Log[LogTypes::MASTER_LOG] = new LogContainer("*", "Master Log");
|
||||
m_Log[LogTypes::BOOT] = new LogContainer("BOOT", "Boot");
|
||||
m_Log[LogTypes::COMMON] = new LogContainer("COMMON", "Common");
|
||||
m_Log[LogTypes::DISCIO] = new LogContainer("DIO", "Disc IO");
|
||||
m_Log[LogTypes::FILEMON] = new LogContainer("FileMon", "File Monitor");
|
||||
m_Log[LogTypes::PAD] = new LogContainer("PAD", "Pad");
|
||||
m_Log[LogTypes::PIXELENGINE] = new LogContainer("PE", "PixelEngine");
|
||||
m_Log[LogTypes::COMMANDPROCESSOR] = new LogContainer("CP", "CommandProc");
|
||||
m_Log[LogTypes::VIDEOINTERFACE] = new LogContainer("VI", "VideoInt");
|
||||
m_Log[LogTypes::SERIALINTERFACE] = new LogContainer("SI", "SerialInt");
|
||||
m_Log[LogTypes::PROCESSORINTERFACE] = new LogContainer("PI", "ProcessorInt");
|
||||
m_Log[LogTypes::MEMMAP] = new LogContainer("MI", "MI & memmap");
|
||||
m_Log[LogTypes::SP1] = new LogContainer("SP1", "Serial Port 1");
|
||||
m_Log[LogTypes::STREAMINGINTERFACE] = new LogContainer("Stream", "StreamingInt");
|
||||
m_Log[LogTypes::DSPINTERFACE] = new LogContainer("DSP", "DSPInterface");
|
||||
m_Log[LogTypes::DVDINTERFACE] = new LogContainer("DVD", "DVDInterface");
|
||||
m_Log[LogTypes::GPFIFO] = new LogContainer("GP", "GPFifo");
|
||||
m_Log[LogTypes::EXPANSIONINTERFACE] = new LogContainer("EXI", "ExpansionInt");
|
||||
m_Log[LogTypes::GDB_STUB] = new LogContainer("GDB_STUB", "GDB Stub");
|
||||
m_Log[LogTypes::AUDIO_INTERFACE] = new LogContainer("AI", "AudioInt");
|
||||
m_Log[LogTypes::POWERPC] = new LogContainer("PowerPC", "IBM CPU");
|
||||
m_Log[LogTypes::OSHLE] = new LogContainer("HLE", "HLE");
|
||||
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
|
||||
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
|
||||
m_Log[LogTypes::DSP_MAIL] = new LogContainer("DSPMails", "DSP Mails");
|
||||
m_Log[LogTypes::VIDEO] = new LogContainer("Video", "Video Backend");
|
||||
m_Log[LogTypes::AUDIO] = new LogContainer("Audio", "Audio Emulator");
|
||||
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
|
||||
m_Log[LogTypes::CONSOLE] = new LogContainer("CONSOLE", "Dolphin Console");
|
||||
m_Log[LogTypes::OSREPORT] = new LogContainer("OSREPORT", "OSReport");
|
||||
m_Log[LogTypes::WIIMOTE] = new LogContainer("Wiimote", "Wiimote");
|
||||
m_Log[LogTypes::WII_IPC] = new LogContainer("WII_IPC", "WII IPC");
|
||||
m_Log[LogTypes::WII_IPC_HID] = new LogContainer("WII_IPC_HID", "WII IPC HID");
|
||||
m_Log[LogTypes::WII_IPC_HLE] = new LogContainer("WII_IPC_HLE", "WII IPC HLE");
|
||||
m_Log[LogTypes::WII_IPC_DVD] = new LogContainer("WII_IPC_DVD", "WII IPC DVD");
|
||||
m_Log[LogTypes::WII_IPC_ES] = new LogContainer("WII_IPC_ES", "WII IPC ES");
|
||||
m_Log[LogTypes::WII_IPC_FILEIO] = new LogContainer("WII_IPC_FILEIO","WII IPC FILEIO");
|
||||
m_Log[LogTypes::WII_IPC_SD] = new LogContainer("WII_IPC_SD", "WII IPC SD");
|
||||
m_Log[LogTypes::WII_IPC_STM] = new LogContainer("WII_IPC_STM", "WII IPC STM");
|
||||
m_Log[LogTypes::WII_IPC_NET] = new LogContainer("WII_IPC_NET", "WII IPC NET");
|
||||
m_Log[LogTypes::WII_IPC_WC24] = new LogContainer("WII_IPC_WC24", "WII IPC WC24");
|
||||
m_Log[LogTypes::WII_IPC_SSL] = new LogContainer("WII_IPC_SSL", "WII IPC SSL");
|
||||
m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE","WII IPC WIIMOTE");
|
||||
m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay");
|
||||
m_Log[LogTypes::MEMCARD_MANAGER] = new LogContainer("MemCard Manager", "MemCard Manager");
|
||||
m_Log[LogTypes::NETPLAY] = new LogContainer("NETPLAY", "Netplay");
|
||||
m_Log[LogTypes::MASTER_LOG] = new LogContainer("*", "Master Log");
|
||||
m_Log[LogTypes::BOOT] = new LogContainer("BOOT", "Boot");
|
||||
m_Log[LogTypes::COMMON] = new LogContainer("COMMON", "Common");
|
||||
m_Log[LogTypes::DISCIO] = new LogContainer("DIO", "Disc IO");
|
||||
m_Log[LogTypes::FILEMON] = new LogContainer("FileMon", "File Monitor");
|
||||
m_Log[LogTypes::PAD] = new LogContainer("PAD", "Pad");
|
||||
m_Log[LogTypes::PIXELENGINE] = new LogContainer("PE", "PixelEngine");
|
||||
m_Log[LogTypes::COMMANDPROCESSOR] = new LogContainer("CP", "CommandProc");
|
||||
m_Log[LogTypes::VIDEOINTERFACE] = new LogContainer("VI", "VideoInt");
|
||||
m_Log[LogTypes::SERIALINTERFACE] = new LogContainer("SI", "SerialInt");
|
||||
m_Log[LogTypes::PROCESSORINTERFACE] = new LogContainer("PI", "ProcessorInt");
|
||||
m_Log[LogTypes::MEMMAP] = new LogContainer("MI", "MI & memmap");
|
||||
m_Log[LogTypes::SP1] = new LogContainer("SP1", "Serial Port 1");
|
||||
m_Log[LogTypes::STREAMINGINTERFACE] = new LogContainer("Stream", "StreamingInt");
|
||||
m_Log[LogTypes::DSPINTERFACE] = new LogContainer("DSP", "DSPInterface");
|
||||
m_Log[LogTypes::DVDINTERFACE] = new LogContainer("DVD", "DVDInterface");
|
||||
m_Log[LogTypes::GPFIFO] = new LogContainer("GP", "GPFifo");
|
||||
m_Log[LogTypes::EXPANSIONINTERFACE] = new LogContainer("EXI", "ExpansionInt");
|
||||
m_Log[LogTypes::GDB_STUB] = new LogContainer("GDB_STUB", "GDB Stub");
|
||||
m_Log[LogTypes::AUDIO_INTERFACE] = new LogContainer("AI", "AudioInt");
|
||||
m_Log[LogTypes::POWERPC] = new LogContainer("PowerPC", "IBM CPU");
|
||||
m_Log[LogTypes::OSHLE] = new LogContainer("HLE", "HLE");
|
||||
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
|
||||
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
|
||||
m_Log[LogTypes::DSP_MAIL] = new LogContainer("DSPMails", "DSP Mails");
|
||||
m_Log[LogTypes::VIDEO] = new LogContainer("Video", "Video Backend");
|
||||
m_Log[LogTypes::AUDIO] = new LogContainer("Audio", "Audio Emulator");
|
||||
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
|
||||
m_Log[LogTypes::CONSOLE] = new LogContainer("CONSOLE", "Dolphin Console");
|
||||
m_Log[LogTypes::OSREPORT] = new LogContainer("OSREPORT", "OSReport");
|
||||
m_Log[LogTypes::WIIMOTE] = new LogContainer("Wiimote", "Wiimote");
|
||||
m_Log[LogTypes::WII_IPC] = new LogContainer("WII_IPC", "WII IPC");
|
||||
m_Log[LogTypes::WII_IPC_HID] = new LogContainer("WII_IPC_HID", "WII IPC HID");
|
||||
m_Log[LogTypes::WII_IPC_HLE] = new LogContainer("WII_IPC_HLE", "WII IPC HLE");
|
||||
m_Log[LogTypes::WII_IPC_DVD] = new LogContainer("WII_IPC_DVD", "WII IPC DVD");
|
||||
m_Log[LogTypes::WII_IPC_ES] = new LogContainer("WII_IPC_ES", "WII IPC ES");
|
||||
m_Log[LogTypes::WII_IPC_FILEIO] = new LogContainer("WII_IPC_FILEIO", "WII IPC FILEIO");
|
||||
m_Log[LogTypes::WII_IPC_SD] = new LogContainer("WII_IPC_SD", "WII IPC SD");
|
||||
m_Log[LogTypes::WII_IPC_STM] = new LogContainer("WII_IPC_STM", "WII IPC STM");
|
||||
m_Log[LogTypes::WII_IPC_NET] = new LogContainer("WII_IPC_NET", "WII IPC NET");
|
||||
m_Log[LogTypes::WII_IPC_WC24] = new LogContainer("WII_IPC_WC24", "WII IPC WC24");
|
||||
m_Log[LogTypes::WII_IPC_SSL] = new LogContainer("WII_IPC_SSL", "WII IPC SSL");
|
||||
m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE", "WII IPC WIIMOTE");
|
||||
m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay");
|
||||
m_Log[LogTypes::MEMCARD_MANAGER] = new LogContainer("MemCard Manager", "MemCard Manager");
|
||||
m_Log[LogTypes::NETPLAY] = new LogContainer("NETPLAY", "Netplay");
|
||||
|
||||
m_fileLog = new FileLogListener(File::GetUserPath(F_MAINLOG_IDX).c_str());
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ public:
|
|||
bool IsEnabled() const { return m_enable; }
|
||||
void SetEnable(bool enable) { m_enable = enable; }
|
||||
|
||||
LogTypes::LOG_LEVELS GetLevel() const { return m_level; }
|
||||
LogTypes::LOG_LEVELS GetLevel() const { return m_level; }
|
||||
|
||||
void SetLevel(LogTypes::LOG_LEVELS level) { m_level = level; }
|
||||
void SetLevel(LogTypes::LOG_LEVELS level) { m_level = level; }
|
||||
|
||||
bool HasListeners() const { return !m_listeners.empty(); }
|
||||
|
||||
|
@ -86,7 +86,7 @@ private:
|
|||
~LogManager();
|
||||
public:
|
||||
|
||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char *file, int line, const char *fmt, va_list args);
|
||||
|
|
|
@ -58,7 +58,7 @@ void* AllocateExecutableMemory(size_t size, bool low)
|
|||
#else
|
||||
if (ptr == NULL)
|
||||
{
|
||||
#endif
|
||||
#endif
|
||||
PanicAlert("Failed to allocate executable memory");
|
||||
}
|
||||
#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
|
||||
|
||||
#ifndef __has_include
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
|
||||
|
||||
#ifndef __has_include
|
||||
|
@ -194,7 +194,7 @@ private:
|
|||
};
|
||||
|
||||
#else
|
||||
typedef recursive_mutex mutex; // just use CriticalSections
|
||||
typedef recursive_mutex mutex; // just use CriticalSections
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -346,11 +346,6 @@ public:
|
|||
return owns;
|
||||
}
|
||||
|
||||
//explicit operator bool () const
|
||||
//{
|
||||
// return owns_lock();
|
||||
//}
|
||||
|
||||
mutex_type* mutex() const
|
||||
{
|
||||
return pm;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z))
|
||||
#define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
|
||||
|
||||
#ifndef __has_include
|
||||
|
@ -311,9 +311,9 @@ inline thread::id get_id()
|
|||
#endif
|
||||
}
|
||||
|
||||
} // namespace this_thread
|
||||
} // namespace this_thread
|
||||
|
||||
} // namespace std
|
||||
} // namespace std
|
||||
|
||||
#undef USE_RVALUE_REFERENCES
|
||||
#undef USE_BEGINTHREADEX
|
||||
|
|
|
@ -520,11 +520,7 @@ std::string SHIFTJISToUTF8(const std::string& input)
|
|||
|
||||
std::string UTF16ToUTF8(const std::wstring& input)
|
||||
{
|
||||
std::string result =
|
||||
// CodeToUTF8("UCS-2", input);
|
||||
// CodeToUTF8("UCS-2LE", input);
|
||||
// CodeToUTF8("UTF-16", input);
|
||||
CodeToUTF8("UTF-16LE", input);
|
||||
std::string result = CodeToUTF8("UTF-16LE", input);
|
||||
|
||||
// TODO: why is this needed?
|
||||
result.erase(std::remove(result.begin(), result.end(), 0x00), result.end());
|
||||
|
|
|
@ -108,7 +108,7 @@ private:
|
|||
};
|
||||
|
||||
void SleepCurrentThread(int ms);
|
||||
void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms
|
||||
void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms
|
||||
|
||||
// Use this function during a spin-wait to make the current thread
|
||||
// relax while another thread is working. This may be more efficient
|
||||
|
|
|
@ -157,7 +157,7 @@ u64 Timer::GetLocalTimeSinceJan1970()
|
|||
tzDST = 0;
|
||||
|
||||
// Lazy way to get local time in sec
|
||||
gmTime = gmtime(&sysTime);
|
||||
gmTime = gmtime(&sysTime);
|
||||
tzDiff = sysTime - mktime(gmTime);
|
||||
|
||||
return (u64)(sysTime + tzDiff + tzDST);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#endif
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
/*
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
|
|
|
@ -161,8 +161,8 @@ private:
|
|||
u16 indexReg;
|
||||
};
|
||||
|
||||
inline OpArg M(void *ptr) {return OpArg((u64)ptr, (int)SCALE_RIP);}
|
||||
inline OpArg R(X64Reg value) {return OpArg(0, SCALE_NONE, value);}
|
||||
inline OpArg M(void *ptr) {return OpArg((u64)ptr, (int)SCALE_RIP);}
|
||||
inline OpArg R(X64Reg value) {return OpArg(0, SCALE_NONE, value);}
|
||||
inline OpArg MatR(X64Reg value) {return OpArg(0, SCALE_ATREG, value);}
|
||||
inline OpArg MDisp(X64Reg value, int offset) {
|
||||
return OpArg((u32)offset, SCALE_ATREG, value);
|
||||
|
|
|
@ -370,11 +370,11 @@ bool batchdecrypt(u32 *codes, u16 size)
|
|||
tmparray[1] = 0;
|
||||
tmparray[2] = 4; // Skip crc
|
||||
tmparray[3] = size;
|
||||
getbitstring(tmparray,tmparray2+1,11); // Game id
|
||||
getbitstring(tmparray,tmparray2+2,17); // Code id
|
||||
getbitstring(tmparray,tmparray2+3,1); // Master code
|
||||
getbitstring(tmparray,tmparray2+4,1); // Unknown
|
||||
getbitstring(tmparray,tmparray2+5,2); // Region
|
||||
getbitstring(tmparray,tmparray2+1,11); // Game id
|
||||
getbitstring(tmparray,tmparray2+2,17); // Code id
|
||||
getbitstring(tmparray,tmparray2+3,1); // Master code
|
||||
getbitstring(tmparray,tmparray2+4,1); // Unknown
|
||||
getbitstring(tmparray,tmparray2+5,2); // Region
|
||||
|
||||
// Grab gameid and region from the last decrypted code
|
||||
// Maybe check this against dolphin's GameID? - "code is for wrong game" type msg
|
||||
|
@ -473,7 +473,7 @@ void DecryptARCode(std::vector<std::string> vCodes, std::vector<AREntry> &ops)
|
|||
{
|
||||
// Commented out since we just send the code anyways and hope for the best XD
|
||||
//PanicAlert("Action Replay Code Decryption Error:\nCRC Check Failed\n\n"
|
||||
// "First Code in Block(should be verification code):\n%s", vCodes[0].c_str());
|
||||
// "First Code in Block(should be verification code):\n%s", vCodes[0].c_str());
|
||||
|
||||
for (i = 0; i < (vCodes.size()<<1); i+=2)
|
||||
{
|
||||
|
|
|
@ -195,7 +195,7 @@ void LoadCodes(const IniFile& globalIni, const IniFile& localIni, bool forceLoad
|
|||
{
|
||||
// Encrypted AR code
|
||||
// Decryption is done in "blocks", so we must push blocks into a vector,
|
||||
// then send to decrypt when a new block is encountered, or if it's the last block.
|
||||
// then send to decrypt when a new block is encountered, or if it's the last block.
|
||||
encryptedLines.push_back(pieces[0]+pieces[1]+pieces[2]);
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ bool RunCode(const ARCode &arcode)
|
|||
// after a conditional code, skip lines if needed
|
||||
if (skip_count)
|
||||
{
|
||||
if (skip_count > 0) // skip x lines
|
||||
if (skip_count > 0) // skip x lines
|
||||
{
|
||||
LogInfo("Line skipped");
|
||||
--skip_count;
|
||||
|
@ -302,13 +302,13 @@ bool RunCode(const ARCode &arcode)
|
|||
{
|
||||
// skip all lines
|
||||
LogInfo("All Lines skipped");
|
||||
return true; // don't need to iterate through the rest of the ops
|
||||
return true; // don't need to iterate through the rest of the ops
|
||||
}
|
||||
else if (-CONDTIONAL_ALL_LINES_UNTIL == skip_count)
|
||||
{
|
||||
// skip until a "00000000 40000000" line is reached
|
||||
LogInfo("Line skipped");
|
||||
if (0 == addr && 0x40000000 == data) // check for an endif line
|
||||
if (addr == 0 && 0x40000000 == data) // check for an endif line
|
||||
skip_count = 0;
|
||||
}
|
||||
|
||||
|
@ -642,7 +642,7 @@ bool Subtype_AddCode(const ARAddr addr, const u32 data)
|
|||
LogInfo("--------");
|
||||
|
||||
const u32 read = Memory::Read_U32(new_addr);
|
||||
const float fread = *((float*)&read) + (float)data; // data contains an integer value
|
||||
const float fread = *((float*)&read) + (float)data; // data contains an integer value
|
||||
const u32 newval = *((u32*)&fread);
|
||||
Memory::Write_U32(newval, new_addr);
|
||||
LogInfo("Old Value %08x", read);
|
||||
|
@ -928,7 +928,7 @@ bool CompareValues(const u32 val1, const u32 val2, const int type)
|
|||
|
||||
case CONDTIONAL_AND:
|
||||
LogInfo("Type 7: If And");
|
||||
return !!(val1 & val2); // bitwise AND
|
||||
return !!(val1 & val2); // bitwise AND
|
||||
break;
|
||||
|
||||
default: LogInfo("Unknown Compare type");
|
||||
|
|
|
@ -49,37 +49,37 @@ bool CBoot::EmulatedBS2_GC()
|
|||
|
||||
// Write necessary values
|
||||
// Here we write values to memory that the apploader does not take care of. Game info goes
|
||||
// to 0x80000000 according to yagcd 4.2.
|
||||
// to 0x80000000 according to YAGCD 4.2.
|
||||
DVDInterface::DVDRead(0x00000000, 0x80000000, 0x20); // write disc info
|
||||
|
||||
Memory::Write_U32(0x0D15EA5E, 0x80000020); // booted from bootrom. 0xE5207C22 = booted from jtag
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x80000028); // Physical Memory Size (24MB on retail)
|
||||
// TODO determine why some games fail when using a retail id. (Seem to take different EXI paths, see ikaruga for example)
|
||||
Memory::Write_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see yagcd 4.2.1.1.2
|
||||
Memory::Write_U32(0x0D15EA5E, 0x80000020); // Booted from bootrom. 0xE5207C22 = booted from jtag
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x80000028); // Physical Memory Size (24MB on retail)
|
||||
// TODO determine why some games fail when using a retail ID. (Seem to take different EXI paths, see Ikaruga for example)
|
||||
Memory::Write_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see YAGCD 4.2.1.1.2
|
||||
|
||||
Memory::Write_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC
|
||||
? 0 : 1, 0x800000CC); // fake the VI Init of the IPL (yagcd 4.2.1.4)
|
||||
? 0 : 1, 0x800000CC); // Fake the VI Init of the IPL (YAGCD 4.2.1.4)
|
||||
|
||||
Memory::Write_U32(0x01000000, 0x800000d0); // ARAM Size. 16MB main + 4/16/32MB external (retail consoles have no external ARAM)
|
||||
Memory::Write_U32(0x01000000, 0x800000d0); // ARAM Size. 16MB main + 4/16/32MB external (retail consoles have no external ARAM)
|
||||
|
||||
Memory::Write_U32(0x09a7ec80, 0x800000F8); // Bus Clock Speed
|
||||
Memory::Write_U32(0x1cf7c580, 0x800000FC); // CPU Clock Speed
|
||||
Memory::Write_U32(0x09a7ec80, 0x800000F8); // Bus Clock Speed
|
||||
Memory::Write_U32(0x1cf7c580, 0x800000FC); // CPU Clock Speed
|
||||
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // write default FPU Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // Write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000C00); // Write default Syscall Handler: rfi
|
||||
|
||||
Memory::Write_U64((u64)CEXIIPL::GetGCTime() * (u64)40500000, 0x800030D8); // preset time base ticks
|
||||
Memory::Write_U64((u64)CEXIIPL::GetGCTime() * (u64)40500000, 0x800030D8); // Preset time base ticks
|
||||
// HIO checks this
|
||||
//Memory::Write_U16(0x8200, 0x000030e6); // Console type
|
||||
//Memory::Write_U16(0x8200, 0x000030e6); // Console type
|
||||
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
|
||||
// Load Apploader to Memory - The apploader is hardcoded to begin at 0x2440 on the disc,
|
||||
// but the size can differ between discs. Compare with yagcd chap 13.
|
||||
// but the size can differ between discs. Compare with YAGCD chap 13.
|
||||
u32 iAppLoaderOffset = 0x2440;
|
||||
u32 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10);
|
||||
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14) + VolumeHandler::Read32(iAppLoaderOffset + 0x18);
|
||||
u32 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10);
|
||||
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14) + VolumeHandler::Read32(iAppLoaderOffset + 0x18);
|
||||
if ((iAppLoaderEntry == (u32)-1) || (iAppLoaderSize == (u32)-1))
|
||||
{
|
||||
INFO_LOG(BOOT, "GC BS2: Not running apploader!");
|
||||
|
@ -90,9 +90,9 @@ bool CBoot::EmulatedBS2_GC()
|
|||
// Setup pointers like real BS2 does
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC)
|
||||
{
|
||||
PowerPC::ppcState.gpr[1] = 0x81566550; // StackPointer, used to be set to 0x816ffff0
|
||||
PowerPC::ppcState.gpr[2] = 0x81465cc0; // global pointer to Small Data Area 2 Base (haven't seen anything use it...meh)
|
||||
PowerPC::ppcState.gpr[13] = 0x81465320; // global pointer to Small Data Area Base (Luigi's Mansion's apploader uses it)
|
||||
PowerPC::ppcState.gpr[1] = 0x81566550; // StackPointer, used to be set to 0x816ffff0
|
||||
PowerPC::ppcState.gpr[2] = 0x81465cc0; // Global pointer to Small Data Area 2 Base (haven't seen anything use it...meh)
|
||||
PowerPC::ppcState.gpr[13] = 0x81465320; // Global pointer to Small Data Area Base (Luigi's Mansion's apploader uses it)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -131,9 +131,9 @@ bool CBoot::EmulatedBS2_GC()
|
|||
|
||||
RunFunction(iAppLoaderMain);
|
||||
|
||||
u32 iRamAddress = Memory::ReadUnchecked_U32(0x81300004);
|
||||
u32 iLength = Memory::ReadUnchecked_U32(0x81300008);
|
||||
u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c);
|
||||
u32 iRamAddress = Memory::ReadUnchecked_U32(0x81300004);
|
||||
u32 iLength = Memory::ReadUnchecked_U32(0x81300008);
|
||||
u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c);
|
||||
|
||||
INFO_LOG(MASTER_LOG, "DVDRead: offset: %08x memOffset: %08x length: %i", iDVDOffset, iRamAddress, iLength);
|
||||
DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength);
|
||||
|
@ -232,55 +232,55 @@ bool CBoot::SetupWiiMemory(IVolume::ECountry country)
|
|||
Wiibrew. These values are needed for the games to function correctly. A few
|
||||
values in this region will also be placed here by the game as it boots.
|
||||
They are:
|
||||
0x80000038 Start of FST
|
||||
0x8000003c Size of FST Size
|
||||
0x80000060 Copyright code
|
||||
0x80000038 Start of FST
|
||||
0x8000003c Size of FST Size
|
||||
0x80000060 Copyright code
|
||||
*/
|
||||
|
||||
DVDInterface::DVDRead(0x00000000, 0x00000000, 0x20); // Game Code
|
||||
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
|
||||
Memory::Write_U32(0x00000001, 0x00000024); // Unknown
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x00000028); // MEM1 size 24MB
|
||||
Memory::Write_U32(0x00000023, 0x0000002c); // Production Board Model
|
||||
Memory::Write_U32(0x00000000, 0x00000030); // Init
|
||||
Memory::Write_U32(0x817FEC60, 0x00000034); // Init
|
||||
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
|
||||
Memory::Write_U32(0x00000001, 0x00000024); // Unknown
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x00000028); // MEM1 size 24MB
|
||||
Memory::Write_U32(0x00000023, 0x0000002c); // Production Board Model
|
||||
Memory::Write_U32(0x00000000, 0x00000030); // Init
|
||||
Memory::Write_U32(0x817FEC60, 0x00000034); // Init
|
||||
// 38, 3C should get start, size of FST through apploader
|
||||
Memory::Write_U32(0x38a00040, 0x00000060); // Exception init
|
||||
Memory::Write_U32(0x8008f7b8, 0x000000e4); // Thread Init
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x000000f0); // "Simulated memory size" (debug mode?)
|
||||
Memory::Write_U32(0x8179b500, 0x000000f4); // __start
|
||||
Memory::Write_U32(0x0e7be2c0, 0x000000f8); // Bus speed
|
||||
Memory::Write_U32(0x2B73A840, 0x000000fc); // CPU speed
|
||||
Memory::Write_U16(0x0000, 0x000030e6); // Console type
|
||||
Memory::Write_U32(0x00000000, 0x000030c0); // EXI
|
||||
Memory::Write_U32(0x00000000, 0x000030c4); // EXI
|
||||
Memory::Write_U32(0x00000000, 0x000030dc); // Time
|
||||
Memory::Write_U32(0x00000000, 0x000030d8); // Time
|
||||
Memory::Write_U16(0x8201, 0x000030e6); // Dev console / debug capable
|
||||
Memory::Write_U32(0x00000000, 0x000030f0); // Apploader
|
||||
Memory::Write_U32(0x01800000, 0x00003100); // BAT
|
||||
Memory::Write_U32(0x01800000, 0x00003104); // BAT
|
||||
Memory::Write_U32(0x00000000, 0x0000310c); // Init
|
||||
Memory::Write_U32(0x8179d500, 0x00003110); // Init
|
||||
Memory::Write_U32(0x04000000, 0x00003118); // Unknown
|
||||
Memory::Write_U32(0x04000000, 0x0000311c); // BAT
|
||||
Memory::Write_U32(0x93400000, 0x00003120); // BAT
|
||||
Memory::Write_U32(0x90000800, 0x00003124); // Init - MEM2 low
|
||||
Memory::Write_U32(0x93ae0000, 0x00003128); // Init - MEM2 high
|
||||
Memory::Write_U32(0x93ae0000, 0x00003130); // IOS MEM2 low
|
||||
Memory::Write_U32(0x93b00000, 0x00003134); // IOS MEM2 high
|
||||
Memory::Write_U32(0x00000012, 0x00003138); // Console type
|
||||
Memory::Write_U32(0x38a00040, 0x00000060); // Exception init
|
||||
Memory::Write_U32(0x8008f7b8, 0x000000e4); // Thread Init
|
||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x000000f0); // "Simulated memory size" (debug mode?)
|
||||
Memory::Write_U32(0x8179b500, 0x000000f4); // __start
|
||||
Memory::Write_U32(0x0e7be2c0, 0x000000f8); // Bus speed
|
||||
Memory::Write_U32(0x2B73A840, 0x000000fc); // CPU speed
|
||||
Memory::Write_U16(0x0000, 0x000030e6); // Console type
|
||||
Memory::Write_U32(0x00000000, 0x000030c0); // EXI
|
||||
Memory::Write_U32(0x00000000, 0x000030c4); // EXI
|
||||
Memory::Write_U32(0x00000000, 0x000030dc); // Time
|
||||
Memory::Write_U32(0x00000000, 0x000030d8); // Time
|
||||
Memory::Write_U16(0x8201, 0x000030e6); // Dev console / debug capable
|
||||
Memory::Write_U32(0x00000000, 0x000030f0); // Apploader
|
||||
Memory::Write_U32(0x01800000, 0x00003100); // BAT
|
||||
Memory::Write_U32(0x01800000, 0x00003104); // BAT
|
||||
Memory::Write_U32(0x00000000, 0x0000310c); // Init
|
||||
Memory::Write_U32(0x8179d500, 0x00003110); // Init
|
||||
Memory::Write_U32(0x04000000, 0x00003118); // Unknown
|
||||
Memory::Write_U32(0x04000000, 0x0000311c); // BAT
|
||||
Memory::Write_U32(0x93400000, 0x00003120); // BAT
|
||||
Memory::Write_U32(0x90000800, 0x00003124); // Init - MEM2 low
|
||||
Memory::Write_U32(0x93ae0000, 0x00003128); // Init - MEM2 high
|
||||
Memory::Write_U32(0x93ae0000, 0x00003130); // IOS MEM2 low
|
||||
Memory::Write_U32(0x93b00000, 0x00003134); // IOS MEM2 high
|
||||
Memory::Write_U32(0x00000012, 0x00003138); // Console type
|
||||
// 40 is copied from 88 after running apploader
|
||||
Memory::Write_U32(0x00090204, 0x00003140); // IOS revision (IOS9, v2.4)
|
||||
Memory::Write_U32(0x00062507, 0x00003144); // IOS date in USA format (June 25, 2007)
|
||||
Memory::Write_U16(0x0113, 0x0000315e); // Apploader
|
||||
Memory::Write_U32(0x0000FF16, 0x00003158); // DDR ram vendor code
|
||||
Memory::Write_U32(0x00000000, 0x00003160); // Init semaphore (sysmenu waits for this to clear)
|
||||
Memory::Write_U32(0x00090204, 0x00003188); // Expected IOS revision
|
||||
Memory::Write_U32(0x00090204, 0x00003140); // IOS revision (IOS9, v2.4)
|
||||
Memory::Write_U32(0x00062507, 0x00003144); // IOS date in USA format (June 25, 2007)
|
||||
Memory::Write_U16(0x0113, 0x0000315e); // Apploader
|
||||
Memory::Write_U32(0x0000FF16, 0x00003158); // DDR ram vendor code
|
||||
Memory::Write_U32(0x00000000, 0x00003160); // Init semaphore (sysmenu waits for this to clear)
|
||||
Memory::Write_U32(0x00090204, 0x00003188); // Expected IOS revision
|
||||
|
||||
Memory::Write_U8(0x80, 0x0000315c); // OSInit
|
||||
Memory::Write_U16(0x0000, 0x000030e0); // PADInit
|
||||
Memory::Write_U32(0x80000000, 0x00003184); // GameID Address
|
||||
Memory::Write_U8(0x80, 0x0000315c); // OSInit
|
||||
Memory::Write_U16(0x0000, 0x000030e0); // PADInit
|
||||
Memory::Write_U32(0x80000000, 0x00003184); // GameID Address
|
||||
|
||||
// Fake the VI Init of the IPL
|
||||
Memory::Write_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC ? 0 : 1, 0x000000CC);
|
||||
|
@ -321,13 +321,13 @@ bool CBoot::EmulatedBS2_Wii()
|
|||
UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr);
|
||||
m_MSR.FP = 1;
|
||||
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // write default FPU Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // Write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000C00); // Write default Syscall Handler: rfi
|
||||
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
|
||||
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
|
||||
PowerPC::ppcState.gpr[1] = 0x816ffff0; // StackPointer
|
||||
|
||||
u32 iAppLoaderOffset = 0x2440; // 0x1c40;
|
||||
|
||||
|
@ -372,9 +372,9 @@ bool CBoot::EmulatedBS2_Wii()
|
|||
|
||||
RunFunction(iAppLoaderMain);
|
||||
|
||||
u32 iRamAddress = Memory::ReadUnchecked_U32(0x81300004);
|
||||
u32 iLength = Memory::ReadUnchecked_U32(0x81300008);
|
||||
u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c) << 2;
|
||||
u32 iRamAddress = Memory::ReadUnchecked_U32(0x81300004);
|
||||
u32 iLength = Memory::ReadUnchecked_U32(0x81300008);
|
||||
u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c) << 2;
|
||||
|
||||
INFO_LOG(BOOT, "DVDRead: offset: %08x memOffset: %08x length: %i", iDVDOffset, iRamAddress, iLength);
|
||||
DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength);
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
return GetPtr(segments[segment].p_offset);
|
||||
}
|
||||
u32 GetSectionAddr(SectionID section) const { return sectionAddrs[section]; }
|
||||
int GetSectionSize(SectionID section) const { return sections[section].sh_size; }
|
||||
int GetSectionSize(SectionID section) const { return sections[section].sh_size; }
|
||||
SectionID GetSectionByName(const char *name, int firstSection = 0) const; //-1 for not found
|
||||
|
||||
bool DidRelocate() {
|
||||
|
|
|
@ -259,7 +259,7 @@ void Stop() // - Hammertime!
|
|||
|
||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Stopping Emu thread ...").c_str());
|
||||
|
||||
g_EmuThread.join(); // Wait for emuthread to close.
|
||||
g_EmuThread.join(); // Wait for emuthread to close.
|
||||
|
||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Main Emu thread stopped").c_str());
|
||||
|
||||
|
@ -678,7 +678,7 @@ void UpdateTitle()
|
|||
float Speed = (float) (DrawnVideo * (100 * 1000.0) / (VideoInterface::TargetRefreshRate * ElapseTime));
|
||||
|
||||
// Settings are shown the same for both extended and summary info
|
||||
std::string SSettings = StringFromFormat("%s %s | %s | %s", cpu_core_base->GetName(), _CoreParameter.bCPUThread ? "DC" : "SC",
|
||||
std::string SSettings = StringFromFormat("%s %s | %s | %s", cpu_core_base->GetName(), _CoreParameter.bCPUThread ? "DC" : "SC",
|
||||
g_video_backend->GetDisplayName().c_str(), _CoreParameter.bDSPHLE ? "HLE" : "LLE");
|
||||
|
||||
// Use extended or summary information. The summary information does not print the ticks data,
|
||||
|
@ -708,7 +708,7 @@ void UpdateTitle()
|
|||
_CoreParameter.bSkipIdle ? "~" : "",
|
||||
TicksPercentage);
|
||||
|
||||
#else // Summary information
|
||||
#else // Summary information
|
||||
std::string SFPS;
|
||||
if (Movie::IsPlayingInput())
|
||||
SFPS = StringFromFormat("VI: %u/%u - Frame: %u/%u - FPS: %.0f - VPS: %.0f - %.0f%%", (u32)Movie::g_currentFrame, (u32)Movie::g_totalFrames, (u32)Movie::g_currentInputCount, (u32)Movie::g_totalInputCount, FPS, VPS, Speed);
|
||||
|
|
|
@ -97,7 +97,7 @@ void SCoreStartupParameter::LoadDefaults()
|
|||
bJITOff = false; // debugger only settings
|
||||
bJITLoadStoreOff = false;
|
||||
bJITLoadStoreFloatingOff = false;
|
||||
bJITLoadStorePairedOff = false; // XXX not 64-bit clean
|
||||
bJITLoadStorePairedOff = false; // XXX not 64-bit clean
|
||||
bJITFloatingPointOff = false;
|
||||
bJITIntegerOff = false;
|
||||
bJITPairedOff = false;
|
||||
|
@ -271,7 +271,8 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2)
|
|||
delete pVolume;
|
||||
}
|
||||
else
|
||||
{ // null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
|
||||
{
|
||||
// null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
|
||||
// if this is the second boot we would be using the Name and id of the last title
|
||||
m_strName.clear();
|
||||
m_strUniqueID.clear();
|
||||
|
|
|
@ -395,8 +395,8 @@ void Advance()
|
|||
{
|
||||
if (first->time <= globalTimer)
|
||||
{
|
||||
// LOG(POWERPC, "[Scheduler] %s (%lld, %lld) ",
|
||||
// event_types[first->type].name ? event_types[first->type].name : "?", (u64)globalTimer, (u64)first->time);
|
||||
//LOG(POWERPC, "[Scheduler] %s (%lld, %lld) ",
|
||||
// event_types[first->type].name ? event_types[first->type].name : "?", (u64)globalTimer, (u64)first->time);
|
||||
Event* evt = first;
|
||||
first = first->next;
|
||||
event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time));
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
bool Assemble(const char *text, std::vector<u16> &code, bool force)
|
||||
{
|
||||
AssemblerSettings settings;
|
||||
// settings.pc = 0;
|
||||
// settings.pc = 0;
|
||||
// settings.decode_registers = false;
|
||||
// settings.decode_names = false;
|
||||
settings.force = force;
|
||||
// settings.print_tabs = false;
|
||||
// settings.ext_separator = '\'';
|
||||
// settings.print_tabs = false;
|
||||
// settings.ext_separator = '\'';
|
||||
|
||||
// TODO: fix the terrible api of the assembler.
|
||||
DSPAssembler assembler(settings);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_interpreter.cpp
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: DSPCore.h
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
|||
#define SR_MUL_UNSIGNED 0x8000 // 0 = normal. 1 = unsigned (CLR15, SET15) If set, treats ax?.l as unsigned (MULX family only).
|
||||
|
||||
// This should be the bits affected by CMP. Does not include logic zero.
|
||||
#define SR_CMP_MASK 0x3f
|
||||
#define SR_CMP_MASK 0x3f
|
||||
|
||||
// exceptions vector
|
||||
#define EXP_STOVF 1 // 0x0002 stack under/over flow
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_interface.h
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_interface.h
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: opcodes.h
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
created: 2005.03.04
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_opcodes_helper.h
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
created: 2005.03.04
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_interpreter.cpp
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_memory.cpp
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_memory.h
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_registers.cpp
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: gdsp_registers.h
|
||||
project: GCemu
|
||||
created: 2004-6-18
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie & Tratax
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ enum partype_t
|
|||
P_REGM19 = P_REG | 0x1910, // used in multiply instructions
|
||||
P_REG1A = P_REG | 0x1a80,
|
||||
P_REG1C = P_REG | 0x1c00,
|
||||
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
|
||||
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
|
||||
P_ACCL = P_REG | 0x1c00, // used for low part of accum
|
||||
P_ACCM = P_REG | 0x1e00, // used for mid part of accum
|
||||
// The following are not in gcdsptool
|
||||
|
|
|
@ -832,7 +832,7 @@ void lsr16(const UDSPInstruction opc)
|
|||
u8 areg = (opc >> 8) & 0x1;
|
||||
|
||||
u64 acc = dsp_get_long_acc(areg);
|
||||
acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum causes
|
||||
acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum causes
|
||||
acc >>= 16;
|
||||
|
||||
zeroWriteBackLog();
|
||||
|
@ -887,7 +887,7 @@ void lsr(const UDSPInstruction opc)
|
|||
u8 rreg = (opc >> 8) & 0x01;
|
||||
u16 shift;
|
||||
u64 acc = dsp_get_long_acc(rreg);
|
||||
acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum causes
|
||||
acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum causes
|
||||
|
||||
if ((opc & 0x3f) == 0)
|
||||
shift = 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
$Id: assemble.cpp,v 1.3 2008-11-11 01:04:26 wntrmute Exp $
|
||||
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
@ -817,11 +817,11 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass)
|
|||
|
||||
if (c == 0x0a || c == 0x0d || c == ';')
|
||||
c = 0x00;
|
||||
if (c == 0x09) // tabs to spaces
|
||||
if (c == 0x09) // tabs to spaces
|
||||
c = ' ';
|
||||
if (c == '"')
|
||||
upper = !upper;
|
||||
if (upper && c >= 'a' && c <= 'z') // convert to uppercase
|
||||
if (upper && c >= 'a' && c <= 'z') // convert to uppercase
|
||||
c = c - 'a' + 'A';
|
||||
line[i] = c;
|
||||
if (c == 0)
|
||||
|
@ -847,7 +847,7 @@ bool DSPAssembler::AssembleFile(const char *fname, int pass)
|
|||
if (valid)
|
||||
{
|
||||
label = std::string(line).substr(0, col_pos);
|
||||
ptr += col_pos + 1;
|
||||
ptr += col_pos + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
created: 2005.03.04
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
|
||||
LabelMap labels;
|
||||
|
||||
u32 code_line;
|
||||
u32 code_line;
|
||||
bool failed;
|
||||
std::string last_error_str;
|
||||
err_t last_error;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
filename: disassemble.cpp
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
created: 2005.03.04
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
@ -221,7 +221,7 @@ bool DSPDisassembler::DisOpcode(const u16 *binbuf, int base_addr, int pass, u16
|
|||
break;
|
||||
}
|
||||
}
|
||||
const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};
|
||||
const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};
|
||||
if (!opc)
|
||||
opc = &fake_op;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project: GameCube DSP Tool (gcdsp)
|
||||
created: 2005.03.04
|
||||
mail: duddie@walla.com
|
||||
mail: duddie@walla.com
|
||||
|
||||
Copyright (c) 2005 Duddie
|
||||
|
||||
|
|
|
@ -190,12 +190,12 @@ void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory &cpMe
|
|||
case DIRECT:
|
||||
switch (colComp[i])
|
||||
{
|
||||
case FORMAT_16B_565: size = 2; break;
|
||||
case FORMAT_24B_888: size = 3; break;
|
||||
case FORMAT_32B_888x: size = 4; break;
|
||||
case FORMAT_16B_4444: size = 2; break;
|
||||
case FORMAT_24B_6666: size = 3; break;
|
||||
case FORMAT_32B_8888: size = 4; break;
|
||||
case FORMAT_16B_565: size = 2; break;
|
||||
case FORMAT_24B_888: size = 3; break;
|
||||
case FORMAT_32B_888x: size = 4; break;
|
||||
case FORMAT_16B_4444: size = 2; break;
|
||||
case FORMAT_24B_6666: size = 3; break;
|
||||
case FORMAT_32B_8888: size = 4; break;
|
||||
default: _assert_(0); break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -309,8 +309,8 @@ void FifoPlayer::WriteFifo(u8 *data, u32 start, u32 end)
|
|||
|
||||
void FifoPlayer::SetupFifo()
|
||||
{
|
||||
WriteCP(0x02, 0); // disable read, BP, interrupts
|
||||
WriteCP(0x04, 7); // clear overflow, underflow, metrics
|
||||
WriteCP(0x02, 0); // disable read, BP, interrupts
|
||||
WriteCP(0x04, 7); // clear overflow, underflow, metrics
|
||||
|
||||
const FifoFrameInfo& frame = m_File->GetFrame(m_CurrentFrame);
|
||||
|
||||
|
@ -344,7 +344,7 @@ void FifoPlayer::SetupFifo()
|
|||
FlushWGP();
|
||||
WritePI(20, frame.fifoStart);
|
||||
|
||||
WriteCP(0x02, 17); // enable read & GP link
|
||||
WriteCP(0x02, 17); // enable read & GP link
|
||||
}
|
||||
|
||||
void FifoPlayer::LoadMemory()
|
||||
|
|
|
@ -161,4 +161,4 @@ void RunCodeHandler()
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace Gecko
|
||||
} // namespace Gecko
|
||||
|
|
|
@ -45,4 +45,4 @@ namespace Gecko
|
|||
bool RunActiveCodes();
|
||||
void RunCodeHandler();
|
||||
|
||||
} // namespace Gecko
|
||||
} // namespace Gecko
|
||||
|
|
|
@ -29,7 +29,7 @@ void LoadCodes(const IniFile& globalIni, const IniFile& localIni, std::vector<Ge
|
|||
if (line.empty())
|
||||
continue;
|
||||
|
||||
std::istringstream ss(line);
|
||||
std::istringstream ss(line);
|
||||
|
||||
switch ((line)[0])
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ void PatchFunctions()
|
|||
}
|
||||
}
|
||||
|
||||
// CBreakPoints::AddBreakPoint(0x8000D3D0, false);
|
||||
// CBreakPoints::AddBreakPoint(0x8000D3D0, false);
|
||||
}
|
||||
|
||||
void Execute(u32 _CurrentPC, u32 _Instruction)
|
||||
|
@ -127,7 +127,7 @@ void Execute(u32 _CurrentPC, u32 _Instruction)
|
|||
PanicAlert("HLE system tried to call an undefined HLE function %i.", FunctionIndex);
|
||||
}
|
||||
|
||||
// _dbg_assert_msg_(HLE,NPC == LR, "Broken HLE function (doesn't set NPC)", OSPatches[pos].m_szPatchName);
|
||||
// _dbg_assert_msg_(HLE,NPC == LR, "Broken HLE function (doesn't set NPC)", OSPatches[pos].m_szPatchName);
|
||||
}
|
||||
|
||||
u32 GetFunctionIndex(u32 addr)
|
||||
|
|
|
@ -332,7 +332,7 @@ unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples
|
|||
{
|
||||
frac &= 0xffff;
|
||||
|
||||
l1 = l2; //current
|
||||
l1 = l2; //current
|
||||
l2 = pcm[pos * 2]; //next
|
||||
}
|
||||
|
||||
|
|
|
@ -376,15 +376,15 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
}
|
||||
|
||||
// Update DSP related flags
|
||||
g_dspState.DSPControl.DSPReset = tmpControl.DSPReset;
|
||||
g_dspState.DSPControl.DSPAssertInt = tmpControl.DSPAssertInt;
|
||||
g_dspState.DSPControl.DSPHalt = tmpControl.DSPHalt;
|
||||
g_dspState.DSPControl.DSPInit = tmpControl.DSPInit;
|
||||
g_dspState.DSPControl.DSPReset = tmpControl.DSPReset;
|
||||
g_dspState.DSPControl.DSPAssertInt = tmpControl.DSPAssertInt;
|
||||
g_dspState.DSPControl.DSPHalt = tmpControl.DSPHalt;
|
||||
g_dspState.DSPControl.DSPInit = tmpControl.DSPInit;
|
||||
|
||||
// Interrupt (mask)
|
||||
g_dspState.DSPControl.AID_mask = tmpControl.AID_mask;
|
||||
g_dspState.DSPControl.ARAM_mask = tmpControl.ARAM_mask;
|
||||
g_dspState.DSPControl.DSP_mask = tmpControl.DSP_mask;
|
||||
g_dspState.DSPControl.AID_mask = tmpControl.AID_mask;
|
||||
g_dspState.DSPControl.ARAM_mask = tmpControl.ARAM_mask;
|
||||
g_dspState.DSPControl.DSP_mask = tmpControl.DSP_mask;
|
||||
|
||||
// Interrupt
|
||||
if (tmpControl.AID) g_dspState.DSPControl.AID = 0;
|
||||
|
@ -392,8 +392,8 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
if (tmpControl.DSP) g_dspState.DSPControl.DSP = 0;
|
||||
|
||||
// unknown
|
||||
g_dspState.DSPControl.unk3 = tmpControl.unk3;
|
||||
g_dspState.DSPControl.pad = tmpControl.pad;
|
||||
g_dspState.DSPControl.unk3 = tmpControl.unk3;
|
||||
g_dspState.DSPControl.pad = tmpControl.pad;
|
||||
if (g_dspState.DSPControl.pad != 0)
|
||||
{
|
||||
PanicAlert("DSPInterface (w) g_dspState.DSPControl (CC00500A) gets a value with junk in the padding %08x", val);
|
||||
|
|
|
@ -34,7 +34,7 @@ CUCode_AX::~CUCode_AX()
|
|||
{
|
||||
if (m_run_on_thread)
|
||||
{
|
||||
m_cmdlist_size = (u16)-1; // Special value to signal end
|
||||
m_cmdlist_size = (u16)-1; // Special value to signal end
|
||||
NotifyAXThread();
|
||||
m_axthread.join();
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void CUCode_AX::AXThread()
|
|||
m_cmdlist_cv.wait(lk);
|
||||
}
|
||||
|
||||
if (m_cmdlist_size == (u16)-1) // End of thread signal
|
||||
if (m_cmdlist_size == (u16)-1) // End of thread signal
|
||||
break;
|
||||
|
||||
m_processing.lock();
|
||||
|
@ -202,7 +202,7 @@ void CUCode_AX::HandleCommandList()
|
|||
SetMainLR(HILO_TO_32(addr));
|
||||
break;
|
||||
|
||||
case CMD_UNK_08: curr_idx += 10; break; // TODO: check
|
||||
case CMD_UNK_08: curr_idx += 10; break; // TODO: check
|
||||
|
||||
case CMD_MIX_AUXB_NOWRITE:
|
||||
addr_hi = m_cmdlist[curr_idx++];
|
||||
|
|
|
@ -41,10 +41,10 @@ void CUCode_AXWii::HandleCommandList()
|
|||
|
||||
u32 pb_addr = 0;
|
||||
|
||||
// WARN_LOG(DSPHLE, "Command list:");
|
||||
// for (u32 i = 0; m_cmdlist[i] != CMD_END; ++i)
|
||||
// WARN_LOG(DSPHLE, "%04x", m_cmdlist[i]);
|
||||
// WARN_LOG(DSPHLE, "-------------");
|
||||
// WARN_LOG(DSPHLE, "Command list:");
|
||||
// for (u32 i = 0; m_cmdlist[i] != CMD_END; ++i)
|
||||
// WARN_LOG(DSPHLE, "%04x", m_cmdlist[i]);
|
||||
// WARN_LOG(DSPHLE, "-------------");
|
||||
|
||||
u32 curr_idx = 0;
|
||||
bool end = false;
|
||||
|
|
|
@ -65,7 +65,7 @@ protected:
|
|||
void UploadAUXMixLRSC(int aux_id, u32* addresses, u16 volume);
|
||||
void OutputSamples(u32 lr_addr, u32 surround_addr, u16 volume,
|
||||
bool upload_auxc);
|
||||
void OutputWMSamples(u32* addresses); // 4 addresses
|
||||
void OutputWMSamples(u32* addresses); // 4 addresses
|
||||
|
||||
private:
|
||||
enum CmdType
|
||||
|
|
|
@ -193,7 +193,7 @@ u16 AcceleratorGetSample()
|
|||
|
||||
switch (acc_pb->audio_addr.sample_format)
|
||||
{
|
||||
case 0x00: // ADPCM
|
||||
case 0x00: // ADPCM
|
||||
{
|
||||
// ADPCM decoding, not much to explain here.
|
||||
if ((*acc_cur_addr & 15) == 0)
|
||||
|
@ -225,14 +225,14 @@ u16 AcceleratorGetSample()
|
|||
break;
|
||||
}
|
||||
|
||||
case 0x0A: // 16-bit PCM audio
|
||||
case 0x0A: // 16-bit PCM audio
|
||||
ret = (DSP::ReadARAM(*acc_cur_addr * 2) << 8) | DSP::ReadARAM(*acc_cur_addr * 2 + 1);
|
||||
acc_pb->adpcm.yn2 = acc_pb->adpcm.yn1;
|
||||
acc_pb->adpcm.yn1 = ret;
|
||||
*acc_cur_addr += 1;
|
||||
break;
|
||||
|
||||
case 0x19: // 8-bit PCM audio
|
||||
case 0x19: // 8-bit PCM audio
|
||||
ret = DSP::ReadARAM(*acc_cur_addr) << 8;
|
||||
acc_pb->adpcm.yn2 = acc_pb->adpcm.yn1;
|
||||
acc_pb->adpcm.yn1 = ret;
|
||||
|
|
|
@ -126,7 +126,7 @@ void CUCode_Zelda::HandleMail(u32 _uMail)
|
|||
void CUCode_Zelda::HandleMail_LightVersion(u32 _uMail)
|
||||
{
|
||||
//ERROR_LOG(DSPHLE, "Light version mail %08X, list in progress: %s, step: %i/%i",
|
||||
// _uMail, m_bListInProgress ? "yes":"no", m_step, m_numSteps);
|
||||
// _uMail, m_bListInProgress ? "yes":"no", m_step, m_numSteps);
|
||||
|
||||
if (m_bSyncCmdPending)
|
||||
{
|
||||
|
@ -199,11 +199,11 @@ void CUCode_Zelda::HandleMail_SMSVersion(u32 _uMail)
|
|||
if (m_CurBuffer == m_NumBuffers)
|
||||
{
|
||||
m_rMailHandler.PushMail(DSP_FRAME_END);
|
||||
// DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
|
||||
// DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP);
|
||||
|
||||
soundStream->GetMixer()->SetHLEReady(true);
|
||||
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
|
||||
// soundStream->Update(); //do it in this thread to avoid sync problems
|
||||
// soundStream->Update(); //do it in this thread to avoid sync problems
|
||||
|
||||
m_bSyncCmdPending = false;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void CUCode_Zelda::HandleMail_NormalVersion(u32 _uMail)
|
|||
|
||||
soundStream->GetMixer()->SetHLEReady(true);
|
||||
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
|
||||
// soundStream->Update(); //do it in this thread to avoid sync problems
|
||||
// soundStream->Update(); //do it in this thread to avoid sync problems
|
||||
|
||||
m_bSyncCmdPending = false;
|
||||
}
|
||||
|
|
|
@ -487,9 +487,9 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
|
|||
}
|
||||
|
||||
// XK: Use this to disable MIDI music (GREAT for testing). Also kills some sound FX.
|
||||
//if(PB.SoundType == 0x0d00) {
|
||||
// PB.NeedsReset = 0;
|
||||
// return;
|
||||
//if (PB.SoundType == 0x0d00) {
|
||||
// PB.NeedsReset = 0;
|
||||
// return;
|
||||
//}
|
||||
|
||||
// The Resample calls actually don't resample yet.
|
||||
|
@ -500,18 +500,18 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
|
|||
// First jump table at ZWW: 2a6
|
||||
switch (PB.Format)
|
||||
{
|
||||
case 0x0005: // AFC with extra low bitrate (32:5 compression).
|
||||
case 0x0009: // AFC with normal bitrate (32:9 compression).
|
||||
case 0x0005: // AFC with extra low bitrate (32:5 compression).
|
||||
case 0x0009: // AFC with normal bitrate (32:9 compression).
|
||||
RenderVoice_AFC(PB, m_ResampleBuffer + 4, _Size);
|
||||
Resample(PB, _Size, m_ResampleBuffer + 4, m_VoiceBuffer, true);
|
||||
break;
|
||||
|
||||
case 0x0008: // PCM8 - normal PCM 8-bit audio. Used in Mario Kart DD + very little in Zelda WW.
|
||||
case 0x0008: // PCM8 - normal PCM 8-bit audio. Used in Mario Kart DD + very little in Zelda WW.
|
||||
RenderVoice_PCM8(PB, m_ResampleBuffer + 4, _Size);
|
||||
Resample(PB, _Size, m_ResampleBuffer + 4, m_VoiceBuffer, true);
|
||||
break;
|
||||
|
||||
case 0x0010: // PCM16 - normal PCM 16-bit audio.
|
||||
case 0x0010: // PCM16 - normal PCM 16-bit audio.
|
||||
RenderVoice_PCM16(PB, m_ResampleBuffer + 4, _Size);
|
||||
Resample(PB, _Size, m_ResampleBuffer + 4, m_VoiceBuffer, true);
|
||||
break;
|
||||
|
@ -535,10 +535,10 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
|
|||
default:
|
||||
// Second jump table
|
||||
// TODO: Cases to find examples of:
|
||||
// -0x0002
|
||||
// -0x0003
|
||||
// -0x0006
|
||||
// -0x000a
|
||||
// -0x0002
|
||||
// -0x0003
|
||||
// -0x0006
|
||||
// -0x000a
|
||||
switch (PB.Format)
|
||||
{
|
||||
// Synthesized sounds
|
||||
|
@ -547,8 +547,7 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
|
|||
RenderSynth_RectWave(PB, m_VoiceBuffer, _Size);
|
||||
break;
|
||||
|
||||
case 0x0001: // Example: "Denied" sound when trying to pull out a sword
|
||||
// indoors in ZWW
|
||||
case 0x0001: // Example: "Denied" sound when trying to pull out a sword indoors in ZWW
|
||||
RenderSynth_SawWave(PB, m_VoiceBuffer, _Size);
|
||||
break;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// TODO: Get rid of this file.
|
||||
|
||||
#define PROFILE 0
|
||||
#define PROFILE 0
|
||||
|
||||
#if PROFILE
|
||||
void ProfilerDump(u64 _count);
|
||||
|
|
|
@ -87,7 +87,7 @@ union UDICVR
|
|||
u32 Hex;
|
||||
struct
|
||||
{
|
||||
u32 CVR : 1; // 0: Cover closed 1: Cover open
|
||||
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;
|
||||
|
@ -249,17 +249,17 @@ void TransferComplete(u64 userdata, int cyclesLate)
|
|||
|
||||
void Init()
|
||||
{
|
||||
m_DISR.Hex = 0;
|
||||
m_DICVR.Hex = 0;
|
||||
m_DICMDBUF[0].Hex= 0;
|
||||
m_DICMDBUF[1].Hex= 0;
|
||||
m_DICMDBUF[2].Hex= 0;
|
||||
m_DIMAR.Hex = 0;
|
||||
m_DILENGTH.Hex = 0;
|
||||
m_DICR.Hex = 0;
|
||||
m_DIIMMBUF.Hex = 0;
|
||||
m_DICFG.Hex = 0;
|
||||
m_DICFG.CONFIG = 1; // Disable bootrom descrambler
|
||||
m_DISR.Hex = 0;
|
||||
m_DICVR.Hex = 0;
|
||||
m_DICMDBUF[0].Hex = 0;
|
||||
m_DICMDBUF[1].Hex = 0;
|
||||
m_DICMDBUF[2].Hex = 0;
|
||||
m_DIMAR.Hex = 0;
|
||||
m_DILENGTH.Hex = 0;
|
||||
m_DICR.Hex = 0;
|
||||
m_DIIMMBUF.Hex = 0;
|
||||
m_DICFG.Hex = 0;
|
||||
m_DICFG.CONFIG = 1; // Disable bootrom descrambler
|
||||
|
||||
AudioPos = 0;
|
||||
LoopStart = 0;
|
||||
|
@ -412,10 +412,10 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
MMIO::ComplexWrite<u32>([](u32, u32 val) {
|
||||
UDISR tmpStatusReg(val);
|
||||
|
||||
m_DISR.DEINITMASK = tmpStatusReg.DEINITMASK;
|
||||
m_DISR.TCINTMASK = tmpStatusReg.TCINTMASK;
|
||||
m_DISR.BRKINTMASK = tmpStatusReg.BRKINTMASK;
|
||||
m_DISR.BREAK = tmpStatusReg.BREAK;
|
||||
m_DISR.DEINITMASK = tmpStatusReg.DEINITMASK;
|
||||
m_DISR.TCINTMASK = tmpStatusReg.TCINTMASK;
|
||||
m_DISR.BRKINTMASK = tmpStatusReg.BRKINTMASK;
|
||||
m_DISR.BREAK = tmpStatusReg.BREAK;
|
||||
|
||||
if (tmpStatusReg.DEINT)
|
||||
m_DISR.DEINT = 0;
|
||||
|
@ -503,10 +503,10 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
if ((m_DISR.DEINT & m_DISR.DEINITMASK) ||
|
||||
(m_DISR.TCINT & m_DISR.TCINTMASK) ||
|
||||
(m_DISR.BRKINT & m_DISR.BRKINTMASK) ||
|
||||
(m_DICVR.CVRINT & m_DICVR.CVRINTMASK))
|
||||
if ((m_DISR.DEINT & m_DISR.DEINITMASK) ||
|
||||
(m_DISR.TCINT & m_DISR.TCINTMASK) ||
|
||||
(m_DISR.BRKINT & m_DISR.BRKINTMASK) ||
|
||||
(m_DICVR.CVRINT & m_DICVR.CVRINTMASK))
|
||||
{
|
||||
ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_DI, true);
|
||||
}
|
||||
|
@ -523,10 +523,10 @@ void GenerateDIInterrupt(DI_InterruptType _DVDInterrupt)
|
|||
{
|
||||
switch(_DVDInterrupt)
|
||||
{
|
||||
case INT_DEINT: m_DISR.DEINT = 1; break;
|
||||
case INT_TCINT: m_DISR.TCINT = 1; break;
|
||||
case INT_BRKINT: m_DISR.BRKINT = 1; break;
|
||||
case INT_CVRINT: m_DICVR.CVRINT = 1; break;
|
||||
case INT_DEINT: m_DISR.DEINT = 1; break;
|
||||
case INT_TCINT: m_DISR.TCINT = 1; break;
|
||||
case INT_BRKINT: m_DISR.BRKINT = 1; break;
|
||||
case INT_CVRINT: m_DICVR.CVRINT = 1; break;
|
||||
}
|
||||
|
||||
UpdateInterrupts();
|
||||
|
@ -534,7 +534,7 @@ void GenerateDIInterrupt(DI_InterruptType _DVDInterrupt)
|
|||
|
||||
void ExecuteCommand(UDICR& _DICR)
|
||||
{
|
||||
// _dbg_assert_(DVDINTERFACE, _DICR.RW == 0); // only DVD to Memory
|
||||
// _dbg_assert_(DVDINTERFACE, _DICR.RW == 0); // only DVD to Memory
|
||||
int GCAM = ((SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_AM_BASEBOARD)
|
||||
&& (SConfig::GetInstance().m_EXIDevice[2] == EXIDEVICE_AM_BASEBOARD))
|
||||
? 1 : 0;
|
||||
|
@ -825,9 +825,9 @@ void ExecuteCommand(UDICR& _DICR)
|
|||
break;
|
||||
|
||||
// Audio Stream (Immediate)
|
||||
// m_DICMDBUF[0].CMDBYTE1 = subcommand
|
||||
// m_DICMDBUF[1].Hex << 2 = offset on disc
|
||||
// m_DICMDBUF[2].Hex = Length of the stream
|
||||
// m_DICMDBUF[0].CMDBYTE1 = Subcommand
|
||||
// m_DICMDBUF[1].Hex << 2 = Offset on disc
|
||||
// m_DICMDBUF[2].Hex = Length of the stream
|
||||
case 0xE1:
|
||||
{
|
||||
u32 pos = m_DICMDBUF[1].Hex << 2;
|
||||
|
|
|
@ -29,15 +29,15 @@ void Init()
|
|||
g_Channels[i] = new CEXIChannel(i);
|
||||
|
||||
if (Movie::IsPlayingInput() && Movie::IsUsingMemcard() && Movie::IsConfigSaved())
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MEMORYCARD, 0); // SlotA
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MEMORYCARD, 0); // SlotA
|
||||
else if(Movie::IsPlayingInput() && !Movie::IsUsingMemcard() && Movie::IsConfigSaved())
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_NONE, 0); // SlotA
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_NONE, 0); // SlotA
|
||||
else
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MASKROM, 1);
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[2], 2); // Serial Port 1
|
||||
g_Channels[1]->AddDevice(SConfig::GetInstance().m_EXIDevice[1], 0); // SlotB
|
||||
g_Channels[2]->AddDevice(EXIDEVICE_AD16, 0);
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MASKROM, 1);
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[2], 2); // Serial Port 1
|
||||
g_Channels[1]->AddDevice(SConfig::GetInstance().m_EXIDevice[1], 0); // SlotB
|
||||
g_Channels[2]->AddDevice(EXIDEVICE_AD16, 0);
|
||||
|
||||
changeDevice = CoreTiming::RegisterEvent("ChangeEXIDevice", ChangeDeviceCallback);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ u32 IEXIDevice::ImmRead(u32 _uSize)
|
|||
|
||||
void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize)
|
||||
{
|
||||
// _dbg_assert_(EXPANSIONINTERFACE, 0);
|
||||
// _dbg_assert_(EXPANSIONINTERFACE, 0);
|
||||
while (_uSize--)
|
||||
{
|
||||
u8 uByte = Memory::Read_U8(_uAddr++);
|
||||
|
@ -53,7 +53,7 @@ void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize)
|
|||
|
||||
void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize)
|
||||
{
|
||||
// _dbg_assert_(EXPANSIONINTERFACE, 0);
|
||||
// _dbg_assert_(EXPANSIONINTERFACE, 0);
|
||||
while (_uSize--)
|
||||
{
|
||||
u8 uByte = 0;
|
||||
|
|
|
@ -136,7 +136,7 @@ void GeckoSockServer::ClientThread()
|
|||
if (client.Send(&packet[0], packet.size()) == sf::Socket::Disconnected)
|
||||
client_running = false;
|
||||
}
|
||||
} // unlock transfer
|
||||
} // unlock transfer
|
||||
|
||||
if (did_nothing)
|
||||
Common::YieldCPU();
|
||||
|
|
|
@ -179,7 +179,7 @@ void CEXIMic::SetCS(int cs)
|
|||
void CEXIMic::UpdateNextInterruptTicks()
|
||||
{
|
||||
next_int_ticks = CoreTiming::GetTicks() +
|
||||
(SystemTimers::GetTicksPerSecond() / sample_rate) * buff_size_samples;
|
||||
(SystemTimers::GetTicksPerSecond() / sample_rate) * buff_size_samples;
|
||||
}
|
||||
|
||||
bool CEXIMic::IsInterruptSet()
|
||||
|
|
|
@ -824,7 +824,7 @@ u32 GCMemcard::ImportGciInternal(FILE* gcih, const char *inputFile, const std::s
|
|||
gci.ReadBytes(tmp, 0xD);
|
||||
if (!strcasecmp(fileType.c_str(), ".gcs"))
|
||||
{
|
||||
if (!memcmp(tmp, "GCSAVE", 6)) // Header must be uppercase
|
||||
if (!memcmp(tmp, "GCSAVE", 6)) // Header must be uppercase
|
||||
offset = GCS;
|
||||
else
|
||||
return GCSFAIL;
|
||||
|
@ -988,7 +988,8 @@ void GCMemcard::Gcs_SavConvert(DEntry &tempDEntry, int saveType, int length)
|
|||
switch(saveType)
|
||||
{
|
||||
case GCS:
|
||||
{ // field containing the Block count as displayed within
|
||||
{
|
||||
// field containing the Block count as displayed within
|
||||
// the GameSaves software is not stored in the GCS file.
|
||||
// It is stored only within the corresponding GSV file.
|
||||
// If the GCS file is added without using the GameSaves software,
|
||||
|
@ -1269,7 +1270,7 @@ void GCMemcard::FormatInternal(GCMC_Header &GCP)
|
|||
p_hdr->SramBias = g_SRAM.counter_bias;
|
||||
p_hdr->SramLang = g_SRAM.lang;
|
||||
// TODO: determine the purpose of Unk2 1 works for slot A, 0 works for both slot A and slot B
|
||||
*(u32*)&p_hdr->Unk2 = 0; // = _viReg[55]; static vu16* const _viReg = (u16*)0xCC002000;
|
||||
*(u32*)&p_hdr->Unk2 = 0; // = _viReg[55]; static vu16* const _viReg = (u16*)0xCC002000;
|
||||
*(u16*)&p_hdr->deviceID = 0;
|
||||
calc_checksumsBE((u16*)p_hdr, 0xFE, &p_hdr->Checksum, &p_hdr->Checksum_Inv);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ bool bMMU = false;
|
|||
// Init() declarations
|
||||
// ----------------
|
||||
// Store the MemArena here
|
||||
u8* base = NULL;
|
||||
u8* base = NULL;
|
||||
|
||||
// The MemArena class
|
||||
MemArena g_arena;
|
||||
|
@ -127,7 +127,7 @@ static const MemoryView views[] =
|
|||
// Don't map any memory for the EFB. We want all access to this area to go
|
||||
// through the hardware access handlers.
|
||||
#ifndef _M_X64
|
||||
// {&m_pEFB, &m_pVirtualEFB, 0xC8000000, EFB_SIZE, 0},
|
||||
// {&m_pEFB, &m_pVirtualEFB, 0xC8000000, EFB_SIZE, 0},
|
||||
#endif
|
||||
{&m_pL1Cache, &m_pVirtualL1Cache, 0xE0000000, L1_CACHE_SIZE, 0},
|
||||
|
||||
|
@ -166,7 +166,7 @@ void DoState(PointerWrap &p)
|
|||
{
|
||||
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||
p.DoArray(m_pPhysicalRAM, RAM_SIZE);
|
||||
// p.DoArray(m_pVirtualEFB, EFB_SIZE);
|
||||
//p.DoArray(m_pVirtualEFB, EFB_SIZE);
|
||||
p.DoArray(m_pVirtualL1Cache, L1_CACHE_SIZE);
|
||||
p.DoMarker("Memory RAM");
|
||||
if (bFakeVMEM)
|
||||
|
|
|
@ -35,15 +35,15 @@ namespace Memory
|
|||
// EFB RE
|
||||
/*
|
||||
GXPeekZ
|
||||
80322de8: rlwinm r0, r3, 2, 14, 29 (0003fffc) a = x << 2 & 0x3fffc
|
||||
80322dec: oris r0, r0, 0xC800 a |= 0xc8000000
|
||||
80322df0: rlwinm r3, r0, 0, 20, 9 (ffc00fff) x = a & 0xffc00fff
|
||||
80322df4: rlwinm r0, r4, 12, 4, 19 (0ffff000) a = (y << 12) & 0x0ffff000;
|
||||
80322df8: or r0, r3, r0 a |= x;
|
||||
80322dfc: rlwinm r0, r0, 0, 10, 7 (ff3fffff) a &= 0xff3fffff
|
||||
80322e00: oris r3, r0, 0x0040 x = a | 0x00400000
|
||||
80322e04: lwz r0, 0 (r3) r0 = *r3
|
||||
80322e08: stw r0, 0 (r5) z =
|
||||
80322de8: rlwinm r0, r3, 2, 14, 29 (0003fffc) a = x << 2 & 0x3fffc
|
||||
80322dec: oris r0, r0, 0xC800 a |= 0xc8000000
|
||||
80322df0: rlwinm r3, r0, 0, 20, 9 (ffc00fff) x = a & 0xffc00fff
|
||||
80322df4: rlwinm r0, r4, 12, 4, 19 (0ffff000) a = (y << 12) & 0x0ffff000;
|
||||
80322df8: or r0, r3, r0 a |= x;
|
||||
80322dfc: rlwinm r0, r0, 0, 10, 7 (ff3fffff) a &= 0xff3fffff
|
||||
80322e00: oris r3, r0, 0x0040 x = a | 0x00400000
|
||||
80322e04: lwz r0, 0 (r3) r0 = *r3
|
||||
80322e08: stw r0, 0 (r5) z =
|
||||
80322e0c: blr
|
||||
*/
|
||||
|
||||
|
@ -148,11 +148,12 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
|
|||
// reason we end up in this function:
|
||||
if (em_address == 0xCC008000)
|
||||
{
|
||||
switch (sizeof(T)) {
|
||||
case 1: GPFifo::Write8((u8)data, em_address); return;
|
||||
case 2: GPFifo::Write16((u16)data, em_address); return;
|
||||
case 4: GPFifo::Write32((u32)data, em_address); return;
|
||||
case 8: GPFifo::Write64((u64)data, em_address); return;
|
||||
switch (sizeof(T))
|
||||
{
|
||||
case 1: GPFifo::Write8((u8)data, em_address); return;
|
||||
case 2: GPFifo::Write16((u16)data, em_address); return;
|
||||
case 4: GPFifo::Write32((u32)data, em_address); return;
|
||||
case 8: GPFifo::Write64((u64)data, em_address); return;
|
||||
}
|
||||
}
|
||||
if ((em_address & 0xC8000000) == 0xC8000000)
|
||||
|
@ -466,23 +467,23 @@ void WriteUnchecked_U32(const u32 _iValue, const u32 _Address)
|
|||
// *********************************************************************************
|
||||
|
||||
/*
|
||||
* PearPC
|
||||
* ppc_mmu.cc
|
||||
* PearPC
|
||||
* ppc_mmu.cc
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Sebastian Biallas (sb@biallas.net)
|
||||
* Copyright (C) 2003, 2004 Sebastian Biallas (sb@biallas.net)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -503,8 +504,8 @@ void WriteUnchecked_U32(const u32 _iValue, const u32 _Address)
|
|||
|
||||
#define EA_SR(v) (((v)>>28)&0xf)
|
||||
#define EA_PageIndex(v) (((v)>>12)&0xffff)
|
||||
#define EA_Offset(v) ((v)&0xfff)
|
||||
#define EA_API(v) (((v)>>22)&0x3f)
|
||||
#define EA_Offset(v) ((v)&0xfff)
|
||||
#define EA_API(v) (((v)>>22)&0x3f)
|
||||
|
||||
#define PA_RPN(v) (((v)>>12)&0xfffff)
|
||||
#define PA_Offset(v) ((v)&0xfff)
|
||||
|
@ -759,10 +760,10 @@ u32 TranslatePageAddress(const u32 _Address, const XCheckTLBFlag _Flag)
|
|||
|
||||
u32 sr = PowerPC::ppcState.sr[EA_SR(_Address)];
|
||||
|
||||
u32 offset = EA_Offset(_Address); // 12 bit
|
||||
u32 page_index = EA_PageIndex(_Address); // 16 bit
|
||||
u32 VSID = SR_VSID(sr); // 24 bit
|
||||
u32 api = EA_API(_Address); // 6 bit (part of page_index)
|
||||
u32 offset = EA_Offset(_Address); // 12 bit
|
||||
u32 page_index = EA_PageIndex(_Address); // 16 bit
|
||||
u32 VSID = SR_VSID(sr); // 24 bit
|
||||
u32 api = EA_API(_Address); // 6 bit (part of page_index)
|
||||
|
||||
u8* pRAM = GetPointer(0);
|
||||
|
||||
|
|
|
@ -98,10 +98,10 @@ union USIChannelIn_Lo
|
|||
// SI Channel
|
||||
struct SSIChannel
|
||||
{
|
||||
USIChannelOut m_Out;
|
||||
USIChannelOut m_Out;
|
||||
USIChannelIn_Hi m_InHi;
|
||||
USIChannelIn_Lo m_InLo;
|
||||
ISIDevice* m_pDevice;
|
||||
ISIDevice* m_pDevice;
|
||||
};
|
||||
|
||||
// SI Poll: Controls how often a device is polled
|
||||
|
@ -333,19 +333,19 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
MMIO::ComplexWrite<u32>([](u32, u32 val) {
|
||||
USIComCSR tmpComCSR(val);
|
||||
|
||||
g_ComCSR.CHANNEL = tmpComCSR.CHANNEL;
|
||||
g_ComCSR.INLNGTH = tmpComCSR.INLNGTH;
|
||||
g_ComCSR.OUTLNGTH = tmpComCSR.OUTLNGTH;
|
||||
g_ComCSR.CHANNEL = tmpComCSR.CHANNEL;
|
||||
g_ComCSR.INLNGTH = tmpComCSR.INLNGTH;
|
||||
g_ComCSR.OUTLNGTH = tmpComCSR.OUTLNGTH;
|
||||
g_ComCSR.RDSTINTMSK = tmpComCSR.RDSTINTMSK;
|
||||
g_ComCSR.TCINTMSK = tmpComCSR.TCINTMSK;
|
||||
g_ComCSR.TCINTMSK = tmpComCSR.TCINTMSK;
|
||||
|
||||
g_ComCSR.COMERR = 0;
|
||||
g_ComCSR.COMERR = 0;
|
||||
|
||||
if (tmpComCSR.RDSTINT) g_ComCSR.RDSTINT = 0;
|
||||
if (tmpComCSR.TCINT) g_ComCSR.TCINT = 0;
|
||||
if (tmpComCSR.RDSTINT) g_ComCSR.RDSTINT = 0;
|
||||
if (tmpComCSR.TCINT) g_ComCSR.TCINT = 0;
|
||||
|
||||
// be careful: run si-buffer after updating the INT flags
|
||||
if (tmpComCSR.TSTART) RunSIBuffer();
|
||||
if (tmpComCSR.TSTART) RunSIBuffer();
|
||||
UpdateInterrupts();
|
||||
})
|
||||
);
|
||||
|
@ -424,8 +424,8 @@ void GenerateSIInterrupt(SIInterruptType _SIInterrupt)
|
|||
{
|
||||
switch(_SIInterrupt)
|
||||
{
|
||||
case INT_RDSTINT: g_ComCSR.RDSTINT = 1; break;
|
||||
case INT_TCINT: g_ComCSR.TCINT = 1; break;
|
||||
case INT_RDSTINT: g_ComCSR.RDSTINT = 1; break;
|
||||
case INT_TCINT: g_ComCSR.TCINT = 1; break;
|
||||
}
|
||||
|
||||
UpdateInterrupts();
|
||||
|
|
|
@ -41,7 +41,7 @@ SRAM sram_dump_german = {{
|
|||
0x00,
|
||||
0x01,
|
||||
0x3C,
|
||||
0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03,
|
||||
0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
|
|
|
@ -20,15 +20,15 @@ Permission is granted to anyone to use this software for any
|
|||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you
|
||||
1. The origin of this software must not be misrepresented; you
|
||||
must not claim that you wrote the original software. If you use
|
||||
this software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ int et_CP;
|
|||
int et_AudioDMA;
|
||||
int et_DSP;
|
||||
int et_IPC_HLE;
|
||||
int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
|
||||
int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
|
||||
int et_Throttle;
|
||||
|
||||
// These are badly educated guesses
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
#include "../InputCommon/InputConfig.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
WIIMOTE_CHAN_0 = 0,
|
||||
WIIMOTE_CHAN_1,
|
||||
WIIMOTE_CHAN_2,
|
||||
|
@ -18,14 +19,14 @@ enum {
|
|||
};
|
||||
|
||||
|
||||
#define WIIMOTE_INI_NAME "WiimoteNew"
|
||||
#define WIIMOTE_INI_NAME "WiimoteNew"
|
||||
|
||||
enum
|
||||
{
|
||||
WIIMOTE_SRC_NONE = 0,
|
||||
WIIMOTE_SRC_EMU = 1,
|
||||
WIIMOTE_SRC_REAL = 2,
|
||||
WIIMOTE_SRC_HYBRID = 3, // emu + real
|
||||
WIIMOTE_SRC_NONE = 0,
|
||||
WIIMOTE_SRC_EMU = 1,
|
||||
WIIMOTE_SRC_REAL = 2,
|
||||
WIIMOTE_SRC_HYBRID = 3, // emu + real
|
||||
};
|
||||
|
||||
extern unsigned int g_wiimote_sources[MAX_BBMOTES];
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace WiimoteEmu
|
|||
|
||||
// Extension device IDs to be written to the last bytes of the extension reg
|
||||
// The id for nothing inserted
|
||||
static const u8 nothing_id[] = { 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e };
|
||||
static const u8 nothing_id[] = { 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e };
|
||||
// The id for a partially inserted extension
|
||||
static const u8 partially_id[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff };
|
||||
static const u8 partially_id[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff };
|
||||
|
||||
Attachment::Attachment( const char* const _name, WiimoteEmu::ExtensionReg& _reg )
|
||||
: name( _name ), reg( _reg )
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
namespace WiimoteEmu
|
||||
{
|
||||
|
||||
static const u8 guitar_id[] = { 0x00, 0x00, 0xa4, 0x20, 0x01, 0x03 };
|
||||
static const u8 guitar_id[] = { 0x00, 0x00, 0xa4, 0x20, 0x01, 0x03 };
|
||||
|
||||
static const u16 guitar_fret_bitmasks[] =
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ void Guitar::GetState(u8* const data, const bool focus)
|
|||
}
|
||||
|
||||
// TODO: touch bar, probably not
|
||||
gdata->tb = 0x0F; // not touched
|
||||
gdata->tb = 0x0F; // not touched
|
||||
|
||||
// whammy bar
|
||||
u8 whammy;
|
||||
|
|
|
@ -358,27 +358,27 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
|
|||
//if(((((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) || ((u8*)&wm->m_reg_motion_plus)[0xf0] == 0xaa) && rdr->address>>8 < 0xf0) {
|
||||
|
||||
//if(!wm->GetMotionPlusActive() && ((u8*)&wm->m_reg_ext)[0xf0] == 0xaa && rdr->address>>8 < 0xf0) {
|
||||
|
||||
|
||||
//if(!wm->GetMotionPlusActive() && ((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) {
|
||||
|
||||
// SWARN_LOG(CONSOLE, "key %s", ArrayToString(((u8*)&wm->m_ext_key), sizeof(wm->m_ext_key), 0, 30).c_str());
|
||||
// SWARN_LOG(CONSOLE, "decrypt %s", ArrayToString(rdr->data, rdr->size+1, 0, 30).c_str());
|
||||
// wiimote_decrypt(&wm->m_ext_key, rdr->data, dataReply[2]&0xffff, rdr->size+1);
|
||||
// SWARN_LOG(CONSOLE, "decrypt %s", ArrayToString(rdr->data, rdr->size+1, 0, 30).c_str());
|
||||
// decrypted = true;
|
||||
|
||||
// SWARN_LOG(CONSOLE, "key %s", ArrayToString(((u8*)&wm->m_ext_key), sizeof(wm->m_ext_key), 0, 30).c_str());
|
||||
// SWARN_LOG(CONSOLE, "decrypt %s", ArrayToString(rdr->data, rdr->size+1, 0, 30).c_str());
|
||||
// wiimote_decrypt(&wm->m_ext_key, rdr->data, dataReply[2]&0xffff, rdr->size+1);
|
||||
// SWARN_LOG(CONSOLE, "decrypt %s", ArrayToString(rdr->data, rdr->size+1, 0, 30).c_str());
|
||||
// decrypted = true;
|
||||
//}
|
||||
|
||||
// save data
|
||||
if (!emu && !rdr->error)
|
||||
{
|
||||
//if (dataReply[1] == 0xa4 && wm->GetMotionPlusActive())
|
||||
//memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
// memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
//if (dataReply[1] == 0xa4 && !wm->GetMotionPlusActive())
|
||||
//if (dataReply[1] == 0xa4)
|
||||
// memcpy(&((u8*)&wm->m_reg_ext)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
// memcpy(&((u8*)&wm->m_reg_ext)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
//if (!wm->GetMotionPlusActive() && wm->GetMotionPlusAttached())
|
||||
//if (dataReply[1] == 0xa6)
|
||||
// memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
// memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1);
|
||||
//INFO_LOG(CONSOLE, "Saving[0x%2x:0x%2x]: %s", dataReply[1], rdr->address>>8, ArrayToString(rdr->data, rdr->size+1).c_str());
|
||||
}
|
||||
|
||||
|
@ -395,39 +395,41 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
|
|||
|
||||
// decrypt
|
||||
//if(((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) {
|
||||
// wiimote_decrypt(&wm->m_ext_key, &data[0x07], 0x00, (data[4] >> 0x04) + 1);
|
||||
// wiimote_decrypt(&wm->m_ext_key, &data[0x07], 0x00, (data[4] >> 0x04) + 1);
|
||||
|
||||
//if (wm->m_extension->name == "NUNCHUCK") {
|
||||
// INFO_LOG(CONSOLE, "\nGame got the Nunchuck calibration:\n");
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.x: %i\n", data[7 + 0]);
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.y: %i\n", data[7 + 1]);
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.z: %i\n", data[7 + 2]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.x: %i\n", data[7 + 4]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.y: %i\n", data[7 + 5]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.z: %i\n", data[7 + 6]);
|
||||
// INFO_LOG(CONSOLE, "Js.Max.x: %i\n", data[7 + 8]);
|
||||
// INFO_LOG(CONSOLE, "Js.Min.x: %i\n", data[7 + 9]);
|
||||
// INFO_LOG(CONSOLE, "Js.Center.x: %i\n", data[7 + 10]);
|
||||
// INFO_LOG(CONSOLE, "Js.Max.y: %i\n", data[7 + 11]);
|
||||
// INFO_LOG(CONSOLE, "Js.Min.y: %i\n", data[7 + 12]);
|
||||
// INFO_LOG(CONSOLE, "JS.Center.y: %i\n\n", data[7 + 13]);
|
||||
//if (wm->m_extension->name == "NUNCHUCK")
|
||||
//{
|
||||
// INFO_LOG(CONSOLE, "\nGame got the Nunchuck calibration:\n");
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.x: %i\n", data[7 + 0]);
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.y: %i\n", data[7 + 1]);
|
||||
// INFO_LOG(CONSOLE, "Cal_zero.z: %i\n", data[7 + 2]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.x: %i\n", data[7 + 4]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.y: %i\n", data[7 + 5]);
|
||||
// INFO_LOG(CONSOLE, "Cal_g.z: %i\n", data[7 + 6]);
|
||||
// INFO_LOG(CONSOLE, "Js.Max.x: %i\n", data[7 + 8]);
|
||||
// INFO_LOG(CONSOLE, "Js.Min.x: %i\n", data[7 + 9]);
|
||||
// INFO_LOG(CONSOLE, "Js.Center.x: %i\n", data[7 + 10]);
|
||||
// INFO_LOG(CONSOLE, "Js.Max.y: %i\n", data[7 + 11]);
|
||||
// INFO_LOG(CONSOLE, "Js.Min.y: %i\n", data[7 + 12]);
|
||||
// INFO_LOG(CONSOLE, "JS.Center.y: %i\n\n", data[7 + 13]);
|
||||
//}
|
||||
//else // g_Config.bClassicControllerConnected {
|
||||
// INFO_LOG(CONSOLE, "\nGame got the Classic Controller calibration:\n");
|
||||
// INFO_LOG(CONSOLE, "Lx.Max: %i\n", data[7 + 0]);
|
||||
// INFO_LOG(CONSOLE, "Lx.Min: %i\n", data[7 + 1]);
|
||||
// INFO_LOG(CONSOLE, "Lx.Center: %i\n", data[7 + 2]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Max: %i\n", data[7 + 3]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Min: %i\n", data[7 + 4]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Center: %i\n", data[7 + 5]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Max.x: %i\n", data[7 + 6]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Min.x: %i\n", data[7 + 7]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Center.x: %i\n", data[7 + 8]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Max.y: %i\n", data[7 + 9]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Min: %i\n", data[7 + 10]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Center: %i\n\n", data[7 + 11]);
|
||||
// INFO_LOG(CONSOLE, "Lt.Neutral: %i\n", data[7 + 12]);
|
||||
// INFO_LOG(CONSOLE, "Rt.Neutral %i\n\n", data[7 + 13]);
|
||||
//else // g_Config.bClassicControllerConnected
|
||||
//{
|
||||
// INFO_LOG(CONSOLE, "\nGame got the Classic Controller calibration:\n");
|
||||
// INFO_LOG(CONSOLE, "Lx.Max: %i\n", data[7 + 0]);
|
||||
// INFO_LOG(CONSOLE, "Lx.Min: %i\n", data[7 + 1]);
|
||||
// INFO_LOG(CONSOLE, "Lx.Center: %i\n", data[7 + 2]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Max: %i\n", data[7 + 3]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Min: %i\n", data[7 + 4]);
|
||||
// INFO_LOG(CONSOLE, "Ly.Center: %i\n", data[7 + 5]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Max.x: %i\n", data[7 + 6]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Min.x: %i\n", data[7 + 7]);
|
||||
// INFO_LOG(CONSOLE, "Rx.Center.x: %i\n", data[7 + 8]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Max.y: %i\n", data[7 + 9]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Min: %i\n", data[7 + 10]);
|
||||
// INFO_LOG(CONSOLE, "Ry.Center: %i\n\n", data[7 + 11]);
|
||||
// INFO_LOG(CONSOLE, "Lt.Neutral: %i\n", data[7 + 12]);
|
||||
// INFO_LOG(CONSOLE, "Rt.Neutral %i\n\n", data[7 + 13]);
|
||||
//}
|
||||
|
||||
// save values
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace WiimoteEmu
|
|||
static const u8 eeprom_data_0[] = {
|
||||
// IR, maybe more
|
||||
// assuming last 2 bytes are checksum
|
||||
0xA1, 0xAA, 0x8B, 0x99, 0xAE, 0x9E, 0x78, 0x30, 0xA7, /*0x74, 0xD3,*/ 0x00, 0x00, // messing up the checksum on purpose
|
||||
0xA1, 0xAA, 0x8B, 0x99, 0xAE, 0x9E, 0x78, 0x30, 0xA7, /*0x74, 0xD3,*/ 0x00, 0x00, // messing up the checksum on purpose
|
||||
0xA1, 0xAA, 0x8B, 0x99, 0xAE, 0x9E, 0x78, 0x30, 0xA7, /*0x74, 0xD3,*/ 0x00, 0x00,
|
||||
// Accelerometer
|
||||
// 0g x,y,z, 1g x,y,z, idk, last byte is a checksum
|
||||
|
@ -131,7 +131,7 @@ void EmulateTilt(AccelData* const accel
|
|||
// 180 degrees
|
||||
tilt_group->GetState(&roll, &pitch, 0, focus ? PI : 0);
|
||||
|
||||
unsigned int ud = 0, lr = 0, fb = 0;
|
||||
unsigned int ud = 0, lr = 0, fb = 0;
|
||||
|
||||
// some notes that no one will understand but me :p
|
||||
// left, forward, up
|
||||
|
@ -156,7 +156,7 @@ void EmulateTilt(AccelData* const accel
|
|||
(&accel->x)[fb] = sin(pitch)*sgn[fb];
|
||||
}
|
||||
|
||||
#define SWING_INTENSITY 2.5f//-uncalibrated(aprox) 0x40-calibrated
|
||||
#define SWING_INTENSITY 2.5f//-uncalibrated(aprox) 0x40-calibrated
|
||||
|
||||
void EmulateSwing(AccelData* const accel
|
||||
, ControllerEmu::Force* const swing_group
|
||||
|
@ -169,9 +169,9 @@ void EmulateSwing(AccelData* const accel
|
|||
u8 axis_map[3];
|
||||
|
||||
// determine which axis is which direction
|
||||
axis_map[0] = upright ? (sideways ? 0 : 1) : 2; // up/down
|
||||
axis_map[1] = sideways; // left|right
|
||||
axis_map[2] = upright ? 2 : (sideways ? 0 : 1); // forward/backward
|
||||
axis_map[0] = upright ? (sideways ? 0 : 1) : 2; // up/down
|
||||
axis_map[1] = sideways; // left|right
|
||||
axis_map[2] = upright ? 2 : (sideways ? 0 : 1); // forward/backward
|
||||
|
||||
// some orientations have up as positive, some as negative
|
||||
// same with forward
|
||||
|
@ -263,7 +263,7 @@ Wiimote::Wiimote( const unsigned int index )
|
|||
: m_index(index)
|
||||
, ir_sin(0)
|
||||
, ir_cos(1)
|
||||
// , m_sound_stream( NULL )
|
||||
// , m_sound_stream( NULL )
|
||||
{
|
||||
// ---- set up all the controls ----
|
||||
|
||||
|
@ -329,7 +329,7 @@ std::string Wiimote::GetName() const
|
|||
}
|
||||
|
||||
// if windows is focused or background input is enabled
|
||||
#define HAS_FOCUS (Host_RendererHasFocus() || (m_options->settings[0]->value != 0))
|
||||
#define HAS_FOCUS (Host_RendererHasFocus() || (m_options->settings[0]->value != 0))
|
||||
|
||||
bool Wiimote::Step()
|
||||
{
|
||||
|
@ -469,9 +469,8 @@ void Wiimote::GetIRData(u8* const data, bool use_accel)
|
|||
nsin=0;
|
||||
ncos=1;
|
||||
}
|
||||
// PanicAlert("%d %d %d\nx:%f\nz:%f\nsin:%f\ncos:%f",accel->x,accel->y,accel->z,ax,az,sin,cos);
|
||||
//PanicAlert("%d %d %d\n%d %d %d\n%d %d %d",accel->x,accel->y,accel->z,calib->zero_g.x,calib->zero_g.y,calib->zero_g.z,
|
||||
// calib->one_g.x,calib->one_g.y,calib->one_g.z);
|
||||
// PanicAlert("%d %d %d\nx:%f\nz:%f\nsin:%f\ncos:%f",accel->x,accel->y,accel->z,ax,az,sin,cos);
|
||||
// PanicAlert("%d %d %d\n%d %d %d\n%d %d %d",accel->x,accel->y,accel->z,calib->zero_g.x,calib->zero_g.y,calib->zero_g.z, calib->one_g.x,calib->one_g.y,calib->one_g.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -530,9 +529,9 @@ void Wiimote::GetIRData(u8* const data, bool use_accel)
|
|||
x[i]=(u16)round((v[i].x+1)/2*(camWidth-1));
|
||||
y[i]=(u16)round((v[i].y+1)/2*(camHeight-1));
|
||||
}
|
||||
// PanicAlert("%f %f\n%f %f\n%f %f\n%f %f\n%d %d\n%d %d\n%d %d\n%d %d",
|
||||
// v[0].x,v[0].y,v[1].x,v[1].y,v[2].x,v[2].y,v[3].x,v[3].y,
|
||||
// x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[38]);
|
||||
// PanicAlert("%f %f\n%f %f\n%f %f\n%f %f\n%d %d\n%d %d\n%d %d\n%d %d",
|
||||
// v[0].x,v[0].y,v[1].x,v[1].y,v[2].x,v[2].y,v[3].x,v[3].y,
|
||||
// x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[38]);
|
||||
}
|
||||
// Fill report with valid data when full handshake was done
|
||||
if (m_reg_ir.data[0x30])
|
||||
|
@ -895,7 +894,7 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface)
|
|||
{
|
||||
ControllerEmu::LoadDefaults(ciface);
|
||||
|
||||
#define set_control(group, num, str) (group)->controls[num]->control_ref->expression = (str)
|
||||
#define set_control(group, num, str) (group)->controls[num]->control_ref->expression = (str)
|
||||
|
||||
// Buttons
|
||||
#if defined HAVE_X11 && HAVE_X11
|
||||
|
|
|
@ -347,8 +347,8 @@ struct wm_speaker_data
|
|||
// Custom structs
|
||||
|
||||
/**
|
||||
* @struct accel_t
|
||||
* @brief Accelerometer struct. For any device with an accelerometer.
|
||||
* @struct accel_t
|
||||
* @brief Accelerometer struct. For any device with an accelerometer.
|
||||
*/
|
||||
struct accel_cal
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
// Used for pair up
|
||||
#undef NTDDI_VERSION
|
||||
#define NTDDI_VERSION NTDDI_WINXPSP2
|
||||
#define NTDDI_VERSION NTDDI_WINXPSP2
|
||||
#include <bthdef.h>
|
||||
#include <BluetoothAPIs.h>
|
||||
|
||||
|
@ -49,7 +49,7 @@ typedef DWORD (__stdcall *PBth_BluetoothGetRadioInfo)(HANDLE, PBLUETOOTH_RADIO_I
|
|||
typedef DWORD (__stdcall *PBth_BluetoothRemoveDevice)(const BLUETOOTH_ADDRESS*);
|
||||
typedef DWORD (__stdcall *PBth_BluetoothSetServiceState)(HANDLE, const BLUETOOTH_DEVICE_INFO*, const GUID*, DWORD);
|
||||
typedef DWORD (__stdcall *PBth_BluetoothAuthenticateDevice)(HWND, HANDLE, BLUETOOTH_DEVICE_INFO*, PWCHAR, ULONG);
|
||||
typedef DWORD (__stdcall *PBth_BluetoothEnumerateInstalledServices)(HANDLE, BLUETOOTH_DEVICE_INFO*, DWORD*, GUID*);
|
||||
typedef DWORD (__stdcall *PBth_BluetoothEnumerateInstalledServices)(HANDLE, BLUETOOTH_DEVICE_INFO*, DWORD*, GUID*);
|
||||
|
||||
PHidD_GetHidGuid HidD_GetHidGuid = NULL;
|
||||
PHidD_GetAttributes HidD_GetAttributes = NULL;
|
||||
|
@ -244,7 +244,7 @@ void WiimoteScanner::FindWiimotes(std::vector<Wiimote*> & found_wiimotes, Wiimot
|
|||
|
||||
// Don't mind me, just a random sleep to fix stuff on Windows
|
||||
//if (!wiimotes.empty())
|
||||
// SLEEP(2000);
|
||||
// SLEEP(2000);
|
||||
|
||||
}
|
||||
int CheckDeviceType_Write(HANDLE &dev_handle, const u8* buf, size_t size, int attempts)
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
protected:
|
||||
Report m_last_input_report;
|
||||
u16 m_channel;
|
||||
u16 m_channel;
|
||||
|
||||
private:
|
||||
void ClearReadQueue();
|
||||
|
@ -123,8 +123,8 @@ private:
|
|||
std::mutex m_thread_ready_mutex;
|
||||
std::condition_variable m_thread_ready_cond;
|
||||
|
||||
Common::FifoQueue<Report> m_read_reports;
|
||||
Common::FifoQueue<Report> m_write_reports;
|
||||
Common::FifoQueue<Report> m_read_reports;
|
||||
Common::FifoQueue<Report> m_write_reports;
|
||||
|
||||
Common::Timer m_last_audio_report;
|
||||
};
|
||||
|
|
|
@ -53,10 +53,10 @@ u16 cksum(const u16 *buffer, int length)
|
|||
int icmp_echo_req(const u32 s, const sockaddr_in *addr, const u8 *data, const u32 data_length)
|
||||
{
|
||||
memset(workspace, 0, sizeof(workspace));
|
||||
icmp_hdr *header = (icmp_hdr *)workspace;
|
||||
header->type = ICMP_ECHOREQ;
|
||||
header->code = 0;
|
||||
header->checksum = 0;
|
||||
icmp_hdr *header = (icmp_hdr *)workspace;
|
||||
header->type = ICMP_ECHOREQ;
|
||||
header->code = 0;
|
||||
header->checksum = 0;
|
||||
memcpy(&header->id, data, data_length);
|
||||
|
||||
header->checksum = cksum((u16 *)header, ICMP_HDR_LEN + data_length);
|
||||
|
|
|
@ -72,8 +72,8 @@ IWII_IPC_HLE_Device* es_handles[ES_MAX_COUNT];
|
|||
|
||||
|
||||
typedef std::deque<u32> ipc_msg_queue;
|
||||
static ipc_msg_queue request_queue; // ppc -> arm
|
||||
static ipc_msg_queue reply_queue; // arm -> ppc
|
||||
static ipc_msg_queue request_queue; // ppc -> arm
|
||||
static ipc_msg_queue reply_queue; // arm -> ppc
|
||||
static std::mutex s_reply_queue;
|
||||
|
||||
static int enque_reply;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#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_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
|
||||
|
@ -33,7 +33,7 @@
|
|||
#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_EESEXHAUSTED (u32)-1016 // Max of 2 ES handles at a time
|
||||
|
||||
// A struct for IOS ioctlv calls
|
||||
struct SIOCtlVBuffer
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
using namespace DVDInterface;
|
||||
|
||||
|
||||
#define DI_COVER_REG_INITIALIZED 0 // Should be 4, but doesn't work correctly...
|
||||
#define DI_COVER_REG_NO_DISC 1
|
||||
#define DI_COVER_REG_INITIALIZED 0 // Should be 4, but doesn't work correctly...
|
||||
#define DI_COVER_REG_NO_DISC 1
|
||||
|
||||
CWII_IPC_HLE_Device_di::CWII_IPC_HLE_Device_di(u32 _DeviceID, const std::string& _rDeviceName )
|
||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||
|
@ -72,11 +72,11 @@ bool CWII_IPC_HLE_Device_di::Close(u32 _CommandAddress, bool _bForce)
|
|||
|
||||
bool CWII_IPC_HLE_Device_di::IOCtl(u32 _CommandAddress)
|
||||
{
|
||||
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14);
|
||||
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
|
||||
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
||||
u32 Command = Memory::Read_U32(BufferIn) >> 24;
|
||||
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14);
|
||||
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
|
||||
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
||||
u32 Command = Memory::Read_U32(BufferIn) >> 24;
|
||||
|
||||
DEBUG_LOG(WII_IPC_DVD, "IOCtl Command(0x%08x) BufferIn(0x%08x, 0x%x) BufferOut(0x%08x, 0x%x)",
|
||||
Command, BufferIn, BufferInSize, BufferOut, BufferOutSize);
|
||||
|
@ -453,8 +453,8 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
|||
|
||||
int CWII_IPC_HLE_Device_di::GetCmdDelay(u32 _CommandAddress)
|
||||
{
|
||||
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
u32 Command = Memory::Read_U32(BufferIn) >> 24;
|
||||
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
u32 Command = Memory::Read_U32(BufferIn) >> 24;
|
||||
|
||||
// Hacks below
|
||||
|
||||
|
@ -477,14 +477,14 @@ int CWII_IPC_HLE_Device_di::GetCmdDelay(u32 _CommandAddress)
|
|||
return SystemTimers::GetTicksPerSecond() / 146;
|
||||
break;
|
||||
|
||||
// case DVDLowAudioBufferConfig:
|
||||
// case DVDLowInquiry:
|
||||
// case DVDLowReadDiskID:
|
||||
// case DVDLowWaitForCoverClose:
|
||||
// case DVDLowGetCoverReg:
|
||||
// case DVDLowGetCoverStatus:
|
||||
// case DVDLowReset:
|
||||
// case DVDLowClosePartition:
|
||||
// case DVDLowAudioBufferConfig:
|
||||
// case DVDLowInquiry:
|
||||
// case DVDLowReadDiskID:
|
||||
// case DVDLowWaitForCoverClose:
|
||||
// case DVDLowGetCoverReg:
|
||||
// case DVDLowGetCoverStatus:
|
||||
// case DVDLowReset:
|
||||
// case DVDLowClosePartition:
|
||||
default:
|
||||
// random numbers here!
|
||||
// More than ~1/2000th of a second hangs DKCR with DSP HLE, maybe.
|
||||
|
|
|
@ -66,7 +66,7 @@ void HLE_IPC_CreateVirtualFATFilesystem()
|
|||
}
|
||||
|
||||
CWII_IPC_HLE_Device_FileIO::CWII_IPC_HLE_Device_FileIO(u32 _DeviceID, const std::string& _rDeviceName)
|
||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName, false) // not a real hardware
|
||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName, false) // not a real hardware
|
||||
, m_Mode(0)
|
||||
, m_SeekPos(0)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ File::IOFile CWII_IPC_HLE_Device_FileIO::OpenFile()
|
|||
|
||||
bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
|
||||
{
|
||||
u32 ReturnValue = FS_RESULT_FATAL;
|
||||
u32 ReturnValue = FS_RESULT_FATAL;
|
||||
const s32 SeekPosition = Memory::Read_U32(_CommandAddress + 0xC);
|
||||
const s32 Mode = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
|
||||
|
@ -210,8 +210,8 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
|
|||
bool CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
|
||||
{
|
||||
u32 ReturnValue = FS_EACCESS;
|
||||
const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Read to this memory address
|
||||
const u32 Size = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Read to this memory address
|
||||
const u32 Size = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
|
||||
|
||||
if (auto file = OpenFile())
|
||||
|
@ -249,9 +249,8 @@ bool CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
|
|||
bool CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
|
||||
{
|
||||
u32 ReturnValue = FS_EACCESS;
|
||||
const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Write data from this memory address
|
||||
const u32 Size = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
|
||||
const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Write data from this memory address
|
||||
const u32 Size = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
|
||||
if (auto file = OpenFile())
|
||||
{
|
||||
|
|
|
@ -857,12 +857,12 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
|||
|
||||
case IOCTL_ES_ENCRYPT:
|
||||
{
|
||||
u32 keyIndex = Memory::Read_U32(Buffer.InBuffer[0].m_Address);
|
||||
u8* IV = Memory::GetPointer(Buffer.InBuffer[1].m_Address);
|
||||
u8* source = Memory::GetPointer(Buffer.InBuffer[2].m_Address);
|
||||
u32 size = Buffer.InBuffer[2].m_Size;
|
||||
u8* newIV = Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
|
||||
u8* destination = Memory::GetPointer(Buffer.PayloadBuffer[1].m_Address);
|
||||
u32 keyIndex = Memory::Read_U32(Buffer.InBuffer[0].m_Address);
|
||||
u8* IV = Memory::GetPointer(Buffer.InBuffer[1].m_Address);
|
||||
u8* source = Memory::GetPointer(Buffer.InBuffer[2].m_Address);
|
||||
u32 size = Buffer.InBuffer[2].m_Size;
|
||||
u8* newIV = Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
|
||||
u8* destination = Memory::GetPointer(Buffer.PayloadBuffer[1].m_Address);
|
||||
|
||||
aes_context AES_ctx;
|
||||
aes_setkey_enc(&AES_ctx, keyTable[keyIndex], 128);
|
||||
|
@ -988,7 +988,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
|||
Memory::Write_U32(0, _CommandAddress + 0x4);
|
||||
|
||||
ERROR_LOG(WII_IPC_ES, "IOCTL_ES_LAUNCH %016" PRIx64 " %08x %016" PRIx64 " %08x %016" PRIx64 " %04x", TitleID,view,ticketid,devicetype,titleid,access);
|
||||
// IOCTL_ES_LAUNCH 0001000248414341 00000001 0001c0fef3df2cfa 00000000 0001000248414341 ffff
|
||||
// IOCTL_ES_LAUNCH 0001000248414341 00000001 0001c0fef3df2cfa 00000000 0001000248414341 ffff
|
||||
|
||||
// This is necessary because Reset(true) above deleted this object. Ew.
|
||||
|
||||
|
@ -1016,7 +1016,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
|||
{
|
||||
WARN_LOG(WII_IPC_ES, "IOCTL_ES_GETDEVICECERT");
|
||||
_dbg_assert_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1);
|
||||
u8* destination = Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
|
||||
u8* destination = Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address);
|
||||
|
||||
EcWii &ec = EcWii::GetInstance();
|
||||
get_ng_cert(destination, ec.getNgId(), ec.getNgKeyId(), ec.getNgPriv(), ec.getNgSig());
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "../VolumeHandler.h"
|
||||
|
||||
#define MAX_NAME (12)
|
||||
#define MAX_NAME 12
|
||||
|
||||
static Common::replace_v replacements;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue