nakee's new logmanager. added a console window for windows builds (prints to parent console on non-win32). also fix some random wxw bugs: main window's position is saved when using debugger, disabling windows from the tools menu are saved settings, some other small fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2675 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib Rpcrt4.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib rpcrt4.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLED.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
@@ -154,7 +154,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib Rpcrt4.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib rpcrt4.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLED.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
@@ -242,7 +242,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLE.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -331,7 +331,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLE.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -420,7 +420,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLEDF.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -509,7 +509,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLEDF.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "ConsoleWindow.h" // Open and close console
|
||||
|
||||
#include "Debugger.h"
|
||||
#include "PBView.h"
|
||||
#include "IniFile.h"
|
||||
@@ -61,7 +59,7 @@ void CDebugger::DoScrollBlocks()
|
||||
else if(GetAsyncKeyState(VK_NUMPAD2))
|
||||
A += 0.11;
|
||||
|
||||
Console::Print("GetScrollPos:%i GetScrollRange:%i GetPosition:%i GetLastPosition:%i GetMaxWidth:%i \
|
||||
DEBUG_LOG(CONSOLE, "GetScrollPos:%i GetScrollRange:%i GetPosition:%i GetLastPosition:%i GetMaxWidth:%i \
|
||||
GetLineLength:%i XYToPosition:%i\n \
|
||||
GetScrollPos * GetLineLength + GetScrollRange:%i A:%f\n",
|
||||
m_bl95->GetScrollPos(wxVERTICAL), m_bl95->GetScrollRange(wxVERTICAL),
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "ConsoleWindow.h" // Open and close console
|
||||
|
||||
#include "Debugger.h"
|
||||
#include "PBView.h"
|
||||
#include "IniFile.h"
|
||||
@@ -165,17 +163,11 @@ void CDebugger::OnClose(wxCloseEvent& /*event*/)
|
||||
file.Save(DEBUGGER_CONFIG_FILE);
|
||||
|
||||
EndModal(0);
|
||||
#ifdef _WIN32
|
||||
Console::Close(); // Take the console window with it
|
||||
#endif
|
||||
}
|
||||
|
||||
void CDebugger::DoHide()
|
||||
{
|
||||
Hide();
|
||||
#ifdef _WIN32
|
||||
Console::Close(); // The console goes with the wx window
|
||||
#endif
|
||||
}
|
||||
|
||||
void CDebugger::DoShow()
|
||||
@@ -683,12 +675,13 @@ void CDebugger::ShowHideConsole(wxCommandEvent& event)
|
||||
|
||||
void CDebugger::DoShowHideConsole()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if(m_options->IsChecked(3))
|
||||
OpenConsole();
|
||||
else
|
||||
CloseConsole();
|
||||
#endif
|
||||
// #ifdef _WIN32
|
||||
// if(m_options->IsChecked(3))
|
||||
// OpenConsole();
|
||||
// else
|
||||
// CloseConsole();
|
||||
// #endif
|
||||
PanicAlert("oh crap");
|
||||
}
|
||||
// ==============
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#endif
|
||||
|
||||
#include "StringUtil.h" // Common
|
||||
#include "ConsoleWindow.h" // Open, close, clear console window
|
||||
|
||||
#include "../Debugger/Debugger.h" // Local
|
||||
#include "../Debugger/PBView.h"
|
||||
@@ -887,8 +886,8 @@ void Logging_(short* _pBuffer, int _iSize, int a, bool Wii, ParamBlockType &PBs,
|
||||
// =======================================================================================
|
||||
// Print
|
||||
// ----------------
|
||||
Console::ClearScreen();
|
||||
Console::Print("%s", sbuff.c_str());
|
||||
// FIXME: Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE, "%s", sbuff.c_str());
|
||||
sbuff.clear(); strcpy(buffer, "");
|
||||
// ================
|
||||
|
||||
|
||||
@@ -21,40 +21,6 @@
|
||||
#include "Globals.h"
|
||||
#include "Common.h"
|
||||
|
||||
void __Log(int, const char *fmt, ...)
|
||||
{
|
||||
DebugLog(fmt);
|
||||
}
|
||||
|
||||
void __Log_(int v, const char *fmt, ...)
|
||||
{
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(Msg, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_dspInitialize.pLog(Msg, v);
|
||||
}
|
||||
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
//if(strncmp (_fmt, "AX", 2)) // match = 0, in that case this is ignored
|
||||
{
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, _fmt);
|
||||
vsprintf(Msg, _fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_dspInitialize.pLog(Msg, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
extern u8* g_pMemory;
|
||||
|
||||
// debugger externals that are needed even in Release builds
|
||||
|
||||
@@ -20,18 +20,9 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "pluginspecs_dsp.h"
|
||||
#include "ConsoleWindow.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
extern DSPInitialize g_dspInitialize;
|
||||
void DebugLog(const char* _fmt, ...);
|
||||
void __Log_(int v, const char *fmt, ...);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
#define LOG_(v, ...) __Log_(v, __VA_ARGS__);
|
||||
#else
|
||||
#define LOG_(_v_, ...)
|
||||
#endif
|
||||
|
||||
extern bool gSSBM;
|
||||
extern bool gSSBMremedy1;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <queue> // System
|
||||
|
||||
#include "Thread.h" // Common
|
||||
#include "ConsoleWindow.h"
|
||||
|
||||
#include "../Config.h" // Local
|
||||
#include "../Globals.h"
|
||||
|
||||
@@ -147,7 +147,7 @@ if(m_frame->ScanMails)
|
||||
#endif
|
||||
TmpMailLog += Msg;
|
||||
TmpMailLog += "\n";
|
||||
LOG_(1, Msg); // also write it to the log
|
||||
DEBUG_LOG(DSPHLE, "%s", Msg); // also write it to the log
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
}
|
||||
}
|
||||
@@ -415,11 +415,11 @@ void CUCode_AX::HandleMail(u32 _uMail)
|
||||
if ((_uMail & 0xFFFF0000) == MAIL_AX_ALIST)
|
||||
{
|
||||
// a new List
|
||||
DebugLog(" >>>> u32 MAIL : General Mail (%08x)", _uMail);
|
||||
DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : General Mail (%08x)", _uMail);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLog(" >>>> u32 MAIL : AXTask Mail (%08x)", _uMail);
|
||||
DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : AXTask Mail (%08x)", _uMail);
|
||||
AXTask(_uMail);
|
||||
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PBs)
|
||||
&& gSequenced) // on and off option
|
||||
{
|
||||
//PanicAlert("Update %i: %i = %04x", i, updpar, upddata);
|
||||
//DebugLog("Update: %i = %04x", updpar, upddata);
|
||||
//DEBUG_LOG(DSPHLE, "Update: %i = %04x", updpar, upddata);
|
||||
pDest[updpar] = upddata;
|
||||
}
|
||||
if (updpar == 7 && upddata == 1) on++;
|
||||
@@ -364,7 +364,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
|
||||
/* case 0x0009:
|
||||
Addr__9 = Memory_Read_U32(uAddress);
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST 6 address: %08x", Addr__9);
|
||||
DEBUG_LOG(DSPHLE, "AXLIST 6 address: %08x", Addr__9);
|
||||
break;*/
|
||||
|
||||
case 0x000a: // AXLIST_COMPRESSORTABLE
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
CUCode_CARD::CUCode_CARD(CMailHandler& _rMailHandler)
|
||||
: IUCode(_rMailHandler)
|
||||
{
|
||||
DebugLog("CUCode_CARD - initialized");
|
||||
DEBUG_LOG(DSPHLE, "CUCode_CARD - initialized");
|
||||
m_rMailHandler.PushMail(DSP_INIT);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void CUCode_CARD::HandleMail(u32 _uMail)
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLog("CUCode_CARD - unknown cmd: %x (size %i)", _uMail);
|
||||
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x (size %i)", _uMail);
|
||||
}
|
||||
|
||||
m_rMailHandler.PushMail(DSP_DONE);
|
||||
|
||||
@@ -26,7 +26,7 @@ CUCode_InitAudioSystem::CUCode_InitAudioSystem(CMailHandler& _rMailHandler)
|
||||
, m_NextParameter(0)
|
||||
, IsInitialized(false)
|
||||
{
|
||||
DebugLog("CUCode_InitAudioSystem - initialized");
|
||||
DEBUG_LOG(DSPHLE, "CUCode_InitAudioSystem - initialized");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ CUCode_Jac::CUCode_Jac(CMailHandler& _rMailHandler)
|
||||
: IUCode(_rMailHandler)
|
||||
, m_bListInProgress(false)
|
||||
{
|
||||
DebugLog("CUCode_Jac: init");
|
||||
DEBUG_LOG(DSPHLE, "CUCode_Jac: init");
|
||||
m_rMailHandler.PushMail(0xDCD10000);
|
||||
m_rMailHandler.PushMail(0x80000000);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ void CUCode_Jac::HandleMail(u32 _uMail)
|
||||
|
||||
default:
|
||||
PanicAlert("UCode Jac");
|
||||
DebugLog("UCode Jac - unknown cmd: %x", _uMail & 0xFFFF);
|
||||
DEBUG_LOG(DSPHLE, "UCode Jac - unknown cmd: %x", _uMail & 0xFFFF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -105,8 +105,8 @@ void CUCode_Jac::ExecuteList()
|
||||
u16 cmd = Read16();
|
||||
u16 sync = Read16();
|
||||
|
||||
DebugLog("==============================================================================");
|
||||
DebugLog("UCode Jac - execute dlist (cmd: 0x%04x : sync: 0x%04x)", cmd, sync);
|
||||
DEBUG_LOG(DSPHLE, "==============================================================================");
|
||||
DEBUG_LOG(DSPHLE, "UCode Jac - execute dlist (cmd: 0x%04x : sync: 0x%04x)", cmd, sync);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@@ -121,11 +121,11 @@ void CUCode_Jac::ExecuteList()
|
||||
tmp[2] = Read32();
|
||||
tmp[3] = Read32();
|
||||
|
||||
DebugLog("DsetupTable");
|
||||
DebugLog("???: 0x%08x", tmp[0]);
|
||||
DebugLog("DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
DebugLog("???: 0x%08x", tmp[3]);
|
||||
DEBUG_LOG(DSPHLE, "DsetupTable");
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[0]);
|
||||
DEBUG_LOG(DSPHLE, "DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
||||
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[3]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -140,16 +140,16 @@ void CUCode_Jac::ExecuteList()
|
||||
tmp[1] = Read32();
|
||||
tmp[2] = Read32();
|
||||
|
||||
DebugLog("UpdateDSPChannel");
|
||||
DebugLog("audiomemory: 0x%08x", tmp[0]);
|
||||
DebugLog("audiomemory: 0x%08x", tmp[1]);
|
||||
DebugLog("DSPADPCM_FILTER (size: 0x40): 0x%08x", tmp[2]);
|
||||
DEBUG_LOG(DSPHLE, "UpdateDSPChannel");
|
||||
DEBUG_LOG(DSPHLE, "audiomemory: 0x%08x", tmp[0]);
|
||||
DEBUG_LOG(DSPHLE, "audiomemory: 0x%08x", tmp[1]);
|
||||
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x40): 0x%08x", tmp[2]);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
PanicAlert("UCode Jac unknown cmd: %s (size %i)", cmd, m_numSteps);
|
||||
DebugLog("Jac UCode - unknown cmd: %x (size %i)", cmd, m_numSteps);
|
||||
DEBUG_LOG(DSPHLE, "Jac UCode - unknown cmd: %x (size %i)", cmd, m_numSteps);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ CUCode_Rom::CUCode_Rom(CMailHandler& _rMailHandler)
|
||||
, m_BootTask_numSteps(0)
|
||||
, m_NextParameter(0)
|
||||
{
|
||||
DebugLog("UCode_Rom - initialized");
|
||||
DEBUG_LOG(DSPHLE, "UCode_Rom - initialized");
|
||||
m_rMailHandler.Clear();
|
||||
m_rMailHandler.PushMail(0x8071FEED);
|
||||
}
|
||||
@@ -98,13 +98,13 @@ void CUCode_Rom::BootUCode()
|
||||
crc = (crc << 3) | (crc >> 29);
|
||||
}
|
||||
|
||||
DebugLog("CurrentUCode SOURCE Addr: 0x%08x", m_CurrentUCode.m_RAMAddress);
|
||||
DebugLog("CurrentUCode Length: 0x%08x", m_CurrentUCode.m_Length);
|
||||
DebugLog("CurrentUCode DEST Addr: 0x%08x", m_CurrentUCode.m_IMEMAddress);
|
||||
DebugLog("CurrentUCode ???: 0x%08x", m_CurrentUCode.m_Unk);
|
||||
DebugLog("CurrentUCode init_vector: 0x%08x", m_CurrentUCode.m_StartPC);
|
||||
DebugLog("CurrentUCode CRC: 0x%08x", crc);
|
||||
DebugLog("BootTask - done");
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode SOURCE Addr: 0x%08x", m_CurrentUCode.m_RAMAddress);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode Length: 0x%08x", m_CurrentUCode.m_Length);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode DEST Addr: 0x%08x", m_CurrentUCode.m_IMEMAddress);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode ???: 0x%08x", m_CurrentUCode.m_Unk);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode init_vector: 0x%08x", m_CurrentUCode.m_StartPC);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode CRC: 0x%08x", crc);
|
||||
DEBUG_LOG(DSPHLE, "BootTask - done");
|
||||
|
||||
CDSPHandler::GetInstance().SetUCode(crc);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler)
|
||||
, m_step(0)
|
||||
, m_readOffset(0)
|
||||
{
|
||||
DebugLog("UCode_Zelda - add boot mails for handshake");
|
||||
DEBUG_LOG(DSPHLE, "UCode_Zelda - add boot mails for handshake");
|
||||
m_rMailHandler.PushMail(DSP_INIT);
|
||||
m_rMailHandler.PushMail(0x80000000); // handshake
|
||||
memset(m_Buffer, 0, sizeof(m_Buffer));
|
||||
@@ -126,8 +126,8 @@ void CUCode_Zelda::ExecuteList()
|
||||
u32 Command = (Temp >> 24) & 0x7f;
|
||||
u32 Sync = Temp >> 16;
|
||||
|
||||
DebugLog("==============================================================================");
|
||||
DebugLog("Zelda UCode - execute dlist (cmd: 0x%04x : sync: 0x%04x)", Command, Sync);
|
||||
DEBUG_LOG(DSPHLE, "==============================================================================");
|
||||
DEBUG_LOG(DSPHLE, "Zelda UCode - execute dlist (cmd: 0x%04x : sync: 0x%04x)", Command, Sync);
|
||||
|
||||
switch (Command)
|
||||
{
|
||||
@@ -140,11 +140,11 @@ void CUCode_Zelda::ExecuteList()
|
||||
tmp[2] = Read32();
|
||||
tmp[3] = Read32();
|
||||
|
||||
DebugLog("DsetupTable");
|
||||
DebugLog("???: 0x%08x", tmp[0]);
|
||||
DebugLog("DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
DebugLog("???: 0x%08x", tmp[3]);
|
||||
DEBUG_LOG(DSPHLE, "DsetupTable");
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[0]);
|
||||
DEBUG_LOG(DSPHLE, "DSPRES_FILTER (size: 0x40): 0x%08x", tmp[1]);
|
||||
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[3]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -159,14 +159,14 @@ void CUCode_Zelda::ExecuteList()
|
||||
// We're ready to mix
|
||||
mixer_HLEready = true;
|
||||
|
||||
DebugLog("Update the SoundThread to be in sync");
|
||||
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
|
||||
soundStream->Update(); //do it in this thread to avoid sync problems
|
||||
|
||||
|
||||
DebugLog("DsyncFrame");
|
||||
DebugLog("???: 0x%08x", tmp[0]);
|
||||
DebugLog("???: 0x%08x", tmp[1]);
|
||||
DebugLog("DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
DEBUG_LOG(DSPHLE, "DsyncFrame");
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[0]);
|
||||
DEBUG_LOG(DSPHLE, "???: 0x%08x", tmp[1]);
|
||||
DEBUG_LOG(DSPHLE, "DSPADPCM_FILTER (size: 0x500): 0x%08x", tmp[2]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -188,9 +188,9 @@ void CUCode_Zelda::ExecuteList()
|
||||
tmp[0] = Read32();
|
||||
tmp[1] = Read32();
|
||||
|
||||
DebugLog("DSetDolbyDelay");
|
||||
DebugLog("DOLBY2_DELAY_BUF (size 0x960): 0x%08x", tmp[0]);
|
||||
DebugLog("DSPRES_FILTER (size 0x500): 0x%08x", tmp[1]);
|
||||
DEBUG_LOG(DSPHLE, "DSetDolbyDelay");
|
||||
DEBUG_LOG(DSPHLE, "DOLBY2_DELAY_BUF (size 0x960): 0x%08x", tmp[0]);
|
||||
DEBUG_LOG(DSPHLE, "DSPRES_FILTER (size 0x500): 0x%08x", tmp[1]);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||
case 0xd73338cf: // IPL
|
||||
case 0x42f64ac4: // Luigi (after fix)
|
||||
case 0x4be6a5cb: // AC, Pikmin (after fix)
|
||||
Console::Print("JAC ucode chosen\n");
|
||||
INFO_LOG(CONSOLE, "JAC ucode chosen\n");
|
||||
return new CUCode_Jac(_rMailHandler);
|
||||
|
||||
case 0x3ad3b7ac: // Naruto3
|
||||
@@ -56,20 +56,20 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||
case 0x07f88145: // bustamove, ikaruga, fzero, robotech battle cry, star soldier, soul calibur2,
|
||||
// Zelda:OOT, Tony hawk, viewtiful joe
|
||||
case 0xe2136399: // billy hatcher, dragonballz, mario party 5, TMNT, ava1080
|
||||
Console::Print("AX ucode chosen, yay!\n");
|
||||
INFO_LOG(CONSOLE, "AX ucode chosen, yay!\n");
|
||||
return new CUCode_AX(_rMailHandler);
|
||||
|
||||
case 0x6CA33A6D: // DK Jungle Beat
|
||||
case 0x86840740: // zelda
|
||||
case 0x56d36052: // mario
|
||||
case 0x2fcdf1ec: // mariokart, zelda 4 swords
|
||||
Console::Print("Zelda ucode chosen\n");
|
||||
INFO_LOG(CONSOLE, "Zelda ucode chosen\n");
|
||||
return new CUCode_Zelda(_rMailHandler);
|
||||
|
||||
// WII CRCs
|
||||
case 0x6c3f6f94: // zelda - PAL
|
||||
case 0xd643001f: // mario galaxy - PAL
|
||||
Console::Print("Zelda Wii ucode chosen\n");
|
||||
INFO_LOG(CONSOLE, "Zelda Wii ucode chosen\n");
|
||||
return new CUCode_Zelda(_rMailHandler);
|
||||
|
||||
case 0x5ef56da3: // AX demo
|
||||
@@ -79,7 +79,7 @@ IUCode* UCodeFactory(u32 _CRC, CMailHandler& _rMailHandler)
|
||||
case 0xb7eb9a9c: // Wii Pikmin - JAP
|
||||
case 0x4cc52064: // Bleach: Versus Crusade
|
||||
case 0xd9c4bf34: // WiiMenu ... pray
|
||||
Console::Print("Wii - AXWii chosen\n");
|
||||
INFO_LOG(CONSOLE, "Wii - AXWii chosen\n");
|
||||
return new CUCode_AXWii(_rMailHandler, _CRC);
|
||||
|
||||
default:
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
CDebugger* m_frame = NULL;
|
||||
#endif
|
||||
|
||||
#include "ConsoleWindow.h" // Common: For the Windows console
|
||||
#include "ChunkFile.h"
|
||||
#include "WaveFile.h"
|
||||
#include "PCHW/Mixer.h"
|
||||
@@ -40,6 +39,7 @@ CDebugger* m_frame = NULL;
|
||||
#include "PCHW/NullSoundStream.h"
|
||||
|
||||
// Declarations and definitions
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
DSPInitialize g_dspInitialize;
|
||||
u8* g_pMemory;
|
||||
extern std::vector<std::string> sMailLog, sMailTime;
|
||||
@@ -127,12 +127,13 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
// Open and close console
|
||||
void OpenConsole()
|
||||
{
|
||||
#if defined (_WIN32)
|
||||
Console::Open(155, 100, "Sound Debugging"); // give room for 100 rows
|
||||
Console::Print("OpenConsole > Console opened\n");
|
||||
DEBUG_LOG(CONSOLE, "OpenConsole > Console opened\n");
|
||||
MoveWindow(Console::GetHwnd(), 0,400, 1280,550, true); // move window, TODO: make this
|
||||
// adjustable from the debugging window
|
||||
#endif
|
||||
@@ -144,7 +145,7 @@ void CloseConsole()
|
||||
FreeConsole();
|
||||
#endif
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// Exported fuctions
|
||||
|
||||
@@ -186,7 +187,11 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_DSP_LLE"
|
||||
ProjectGUID="{C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8}"
|
||||
RootNamespace="Plugin_DSP_LLE"
|
||||
@@ -68,7 +68,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_LLED.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
@@ -153,7 +153,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_LLED.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
@@ -240,7 +240,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_LLE.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -329,7 +329,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_LLE.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -417,7 +417,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_LLEDF.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@@ -506,7 +506,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib"
|
||||
AdditionalDependencies="dxguid.lib dsound.lib winmm.lib"
|
||||
OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_LLEDF.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
|
||||
@@ -23,55 +23,6 @@
|
||||
#include "Globals.h"
|
||||
#include "gdsp_interpreter.h"
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// This is to verbose, it has to be turned on manually for now
|
||||
// --------------
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsprintf( Msg, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
// Only show certain messages
|
||||
std::string sMsg = Msg;
|
||||
if(sMsg.find("Mail") != -1 || sMsg.find("AX") != -1)
|
||||
// no match = -1
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
OutputDebugString(Msg);
|
||||
#endif
|
||||
g_dspInitialize.pLog(Msg,0);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
// =============
|
||||
|
||||
|
||||
void ErrorLog(const char* _fmt, ...)
|
||||
{
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, _fmt);
|
||||
vsprintf(Msg, _fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_dspInitialize.pLog(Msg,0);
|
||||
#ifdef _WIN32
|
||||
::MessageBox(NULL, Msg, "Error", MB_OK);
|
||||
#endif
|
||||
|
||||
DSP_DebugBreak(); // NOTICE: we also break the emulation if this happens
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// For PB address detection
|
||||
// --------------
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#define PROFILE 1
|
||||
|
||||
extern DSPInitialize g_dspInitialize;
|
||||
void DebugLog(const char* _fmt, ...);
|
||||
void ErrorLog(const char* _fmt, ...);
|
||||
void DSP_DebugBreak();
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ extern u32 m_addressPBs;
|
||||
bool AXTask(u32& _uMail)
|
||||
{
|
||||
u32 uAddress = _uMail;
|
||||
DebugLog("AXTask - ================================================================");
|
||||
DebugLog("AXTask - AXCommandList-Addr: 0x%08x", uAddress);
|
||||
DEBUG_LOG(DSPHLE, "AXTask - ================================================================");
|
||||
DEBUG_LOG(DSPHLE, "AXTask - AXCommandList-Addr: 0x%08x", uAddress);
|
||||
|
||||
bool bExecuteList = true;
|
||||
|
||||
@@ -50,7 +50,7 @@ bool AXTask(u32& _uMail)
|
||||
case 0: // AXLIST_STUDIOADDR: //00
|
||||
{
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
DEBUG_LOG(DSPHLE, "AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
}
|
||||
break;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
@@ -61,7 +61,7 @@ bool AXTask(u32& _uMail)
|
||||
{
|
||||
m_addressPBs = Memory_Read_U32(uAddress);
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST PB address: %08x", m_addressPBs);
|
||||
DEBUG_LOG(DSPHLE, "AXLIST PB address: %08x", m_addressPBs);
|
||||
bExecuteList = false;
|
||||
}
|
||||
break;
|
||||
@@ -71,7 +71,7 @@ bool AXTask(u32& _uMail)
|
||||
{
|
||||
// Hopefully this is where in main ram to write.
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
DEBUG_LOG(DSPHLE, "AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -81,7 +81,7 @@ bool AXTask(u32& _uMail)
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Stop the execution of this TaskList
|
||||
DebugLog("AXLIST default: %08x", uAddress);
|
||||
DEBUG_LOG(DSPHLE, "AXLIST default: %08x", uAddress);
|
||||
bExecuteList = false;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
}
|
||||
@@ -89,8 +89,8 @@ bool AXTask(u32& _uMail)
|
||||
} // end of switch
|
||||
}
|
||||
|
||||
DebugLog("AXTask - done, send resume");
|
||||
DebugLog("AXTask - ================================================================");
|
||||
DEBUG_LOG(DSPHLE, "AXTask - done, send resume");
|
||||
DEBUG_LOG(DSPHLE, "AXTask - ================================================================");
|
||||
|
||||
// now resume
|
||||
return true;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include "UCode_AXStructs.h" // they are only in a virtual dir called UCodes AX
|
||||
#include "ConsoleWindow.h" // For Console::Print, Console::ClearScreen
|
||||
// =====================
|
||||
|
||||
|
||||
@@ -362,8 +361,8 @@ void Logging()
|
||||
// =======================================================================================
|
||||
// Print
|
||||
// ---------------
|
||||
Console::ClearScreen();
|
||||
Console::Print("%s", sbuff.c_str());
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(DSPHLE, "%s", sbuff.c_str());
|
||||
sbuff.clear(); strcpy(buffer, "");
|
||||
// ---------------
|
||||
k=0;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "CommonTypes.h" // Pluginspecs
|
||||
|
||||
#include "UCode_AXStructs.h" // For the AXParamBlock structure
|
||||
#include "ConsoleWindow.h" // For Console::Print, Console::ClearScreen
|
||||
|
||||
|
||||
u32 m_addressPBs = 0;
|
||||
@@ -54,7 +53,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
|
||||
|
||||
// reading and 'halfword' swap
|
||||
n++;
|
||||
if (n > 20 && logall) {Console::ClearScreen();}
|
||||
//FIXME if (n > 20 && logall) {Console::ClearScreen();}
|
||||
for (int i = 0; i < _num; i++)
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
@@ -68,7 +67,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
|
||||
// Create a shortcut that let us update struct members
|
||||
short * pDest = (short *) & _pPBs[i];
|
||||
|
||||
if (n > 20 && logall) {Console::Print("%c%i:", 223, i);} // logging
|
||||
if (n > 20 && logall) {DEBUG_LOG(DSPHLE, "%c%i:", 223, i);} // logging
|
||||
|
||||
// --------------
|
||||
// Here we update the PB. We do it by going through all 192 / 2 = 96 u16 values
|
||||
@@ -80,7 +79,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
|
||||
{
|
||||
if (pSrc[p] != 0 && n > 20 && logall)
|
||||
{
|
||||
Console::Print("%i %04x | ", p, Common::swap16(pSrc[p]));
|
||||
DEBUG_LOG(DSPHLE, "%i %04x | ", p, Common::swap16(pSrc[p]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +87,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
|
||||
|
||||
}
|
||||
|
||||
if(n > 20 && logall) {Console::Print("\n");} // logging
|
||||
if(n > 20 && logall) {DEBUG_LOG(DSPHLE, "\n");} // logging
|
||||
// --------------
|
||||
// Here we update the block address to the starting point of the next PB
|
||||
blockAddr = (_pPBs[i].next_pb_hi << 16) | _pPBs[i].next_pb_lo;
|
||||
|
||||
@@ -258,7 +258,7 @@ char* gd_dis_params(gd_globals_t* gdg, opc_t* opc, uint16 op1, uint16 op2, char*
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("Unknown parameter type: %x\n", opc->params[j].type);
|
||||
ERROR_LOG(DSPHLE, "Unknown parameter type: %x\n", opc->params[j].type);
|
||||
exit(-1);
|
||||
break;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ uint16 gd_dis_get_opcode_size(gd_globals_t* gdg)
|
||||
|
||||
if (!opc)
|
||||
{
|
||||
ErrorLog("get_opcode_size ARGH");
|
||||
ERROR_LOG(DSPHLE, "get_opcode_size ARGH");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ uint16 gd_dis_get_opcode_size(gd_globals_t* gdg)
|
||||
|
||||
if (!opc_ext)
|
||||
{
|
||||
ErrorLog("get_opcode_size ext ARGH");
|
||||
ERROR_LOG(DSPHLE, "get_opcode_size ext ARGH");
|
||||
}
|
||||
|
||||
return(opc_ext->size);
|
||||
|
||||
@@ -91,7 +91,7 @@ uint16 dsp_read_aram()
|
||||
default:
|
||||
val = (g_dspInitialize.pARAM_Read_U8(Address) << 8) | g_dspInitialize.pARAM_Read_U8(Address + 1);
|
||||
Address += 2;
|
||||
ErrorLog("Unknown DSP Format %i", gdsp_ifx_regs[DSP_FORMAT]);
|
||||
ERROR_LOG(DSPHLE, "Unknown DSP Format %i", gdsp_ifx_regs[DSP_FORMAT]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void dsp_op_ext_r_epi(uint16 _Opcode)
|
||||
switch (op)
|
||||
{
|
||||
case 0x00:
|
||||
ErrorLog("dsp_op_ext_r_epi");
|
||||
ERROR_LOG(DSPHLE, "dsp_op_ext_r_epi");
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
|
||||
@@ -133,7 +133,7 @@ void gdsp_mbox_write_l(uint8 mbx, uint16 val)
|
||||
|
||||
if (mbx == GDSP_MBOX_DSP)
|
||||
{
|
||||
DebugLog("- Write DSP Mail: 0x%08x (pc=0x%04x)\n", gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.err_pc);
|
||||
DEBUG_LOG(DSPHLE, "- Write DSP Mail: 0x%08x (pc=0x%04x)\n", gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.err_pc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,9 +199,9 @@ void gdsp_ifx_write(uint16 addr, uint16 val)
|
||||
|
||||
default:
|
||||
/* if ((addr & 0xff) >= 0xa0 && reg_names[addr - 0xa0])
|
||||
DebugLog("%04x MW %s (%04x)\n", g_dsp.pc, reg_names[addr - 0xa0], val);
|
||||
DEBUG_LOG(DSPHLE, "%04x MW %s (%04x)\n", g_dsp.pc, reg_names[addr - 0xa0], val);
|
||||
else
|
||||
DebugLog("%04x MW %04x (%04x)\n", g_dsp.pc, addr, val);*/
|
||||
DEBUG_LOG(DSPHLE, "%04x MW %04x (%04x)\n", g_dsp.pc, addr, val);*/
|
||||
gdsp_ifx_regs[addr] = val;
|
||||
break;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ void gdsp_idma_in(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
}
|
||||
|
||||
g_dsp.iram_crc = GenerateCRC(g_dsp.cpu_ram + (addr & 0x0fffffff), size);
|
||||
DebugLog("*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)\n", addr, dsp_addr, g_dsp.iram_crc);
|
||||
DEBUG_LOG(DSPHLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)\n", addr, dsp_addr, g_dsp.iram_crc);
|
||||
|
||||
#if DUMP_DSP_IMEM
|
||||
DumpDSPCode(addr, size, g_dsp.iram_crc );
|
||||
@@ -269,7 +269,7 @@ void gdsp_idma_in(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
|
||||
void gdsp_idma_out(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
{
|
||||
ErrorLog("*** idma_out IRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
|
||||
ERROR_LOG(DSPHLE, "*** idma_out IRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ void gdsp_ddma_in(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
{
|
||||
if ((addr & 0x7FFFFFFF) > 0x01FFFFFF)
|
||||
{
|
||||
ErrorLog("*** ddma_in read from invalid addr (0x%08x)\n", addr);
|
||||
ERROR_LOG(DSPHLE, "*** ddma_in read from invalid addr (0x%08x)\n", addr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ void gdsp_ddma_in(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
*(uint16*)&dst[dsp_addr + i] = *(uint16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF];
|
||||
}
|
||||
|
||||
DebugLog("*** ddma_in RAM (0x%08x) -> DRAM_DSP (0x%04x) : size (0x%08x)\n", addr, dsp_addr / 2, size);
|
||||
DEBUG_LOG(DSPHLE, "*** ddma_in RAM (0x%08x) -> DRAM_DSP (0x%04x) : size (0x%08x)\n", addr, dsp_addr / 2, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ void gdsp_ddma_out(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
{
|
||||
if ((addr & 0x7FFFFFFF) > 0x01FFFFFF)
|
||||
{
|
||||
ErrorLog("*** gdsp_ddma_out to invalid addr (0x%08x)\n", addr);
|
||||
ERROR_LOG(DSPHLE, "*** gdsp_ddma_out to invalid addr (0x%08x)\n", addr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ void gdsp_ddma_out(uint16 dsp_addr, uint32 addr, uint32 size)
|
||||
*(uint16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF] = *(uint16*)&src[dsp_addr + i];
|
||||
}
|
||||
|
||||
DebugLog("*** ddma_out DRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
|
||||
DEBUG_LOG(DSPHLE, "*** ddma_out DRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ void gdsp_dma()
|
||||
|
||||
if ((ctl > 3) || (len > 0x4000))
|
||||
{
|
||||
ErrorLog("DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x\n", g_dsp.pc, ctl, addr, dsp_addr, len);
|
||||
ERROR_LOG(DSPHLE, "DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x\n", g_dsp.pc, ctl, addr, dsp_addr, len);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ uint16 dsp_dmem_read(uint16 addr)
|
||||
break;
|
||||
|
||||
case 0x8: // 8xxx DROM
|
||||
DebugLog("someone reads from ROM\n");
|
||||
DEBUG_LOG(DSPHLE, "someone reads from ROM\n");
|
||||
val = g_dsp.drom[addr & DSP_DROM_MASK];
|
||||
val = dsp_swap16(val);
|
||||
break;
|
||||
@@ -103,7 +103,7 @@ uint16 dsp_dmem_read(uint16 addr)
|
||||
break;
|
||||
|
||||
default: // error
|
||||
// ErrorLog("%04x DSP ERROR: Read from UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
|
||||
// ERROR_LOG(DSPHLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
|
||||
val = 0;
|
||||
break;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ bool dsp_dmem_write(uint16 addr, uint16 val)
|
||||
switch (addr >> 12)
|
||||
{
|
||||
case 0x8: // 8xxx DROM
|
||||
DebugLog("someone writes to ROM\n");
|
||||
DEBUG_LOG(DSPHLE, "someone writes to ROM\n");
|
||||
/* val = dsp_swap16(val);
|
||||
g_dsp.drom[addr & DSP_DROM_MASK] = val;*/
|
||||
break;
|
||||
@@ -132,7 +132,7 @@ bool dsp_dmem_write(uint16 addr, uint16 val)
|
||||
break;
|
||||
|
||||
default: // error
|
||||
DebugLog("%04x DSP ERROR: Write to UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
|
||||
DEBUG_LOG(DSPHLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ bool CheckCondition(uint8 _Condition)
|
||||
break;
|
||||
|
||||
default:
|
||||
// DebugLog("Unknown condition check: 0x%04x\n", _Condition & 0xf);
|
||||
// DEBUG_LOG(DSPHLE, "Unknown condition check: 0x%04x\n", _Condition & 0xf);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ bool CheckCondition(uint8 _Condition)
|
||||
void dsp_op_unknown(uint16 opc)
|
||||
{
|
||||
_assert_msg_(MASTER_LOG, !g_dsp.exception_in_progress_hack, "assert while exception");
|
||||
ErrorLog("dsp_op_unknown somewhere");
|
||||
ERROR_LOG(DSPHLE, "dsp_op_unknown somewhere");
|
||||
g_dsp.pc = g_dsp.err_pc;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ void dsp_opc_jmpa(uint16 opc)
|
||||
|
||||
if ((opc & 0xf) != 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_jmpa");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_jmpa");
|
||||
}
|
||||
|
||||
reg = (opc >> 5) & 0x7;
|
||||
@@ -274,7 +274,7 @@ void dsp_opc_rti(uint16 opc)
|
||||
{
|
||||
if ((opc & 0xf) != 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_rti");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_rti");
|
||||
}
|
||||
|
||||
g_dsp.r[R_SR] = dsp_reg_load_stack(DSP_STACK_D);
|
||||
@@ -452,7 +452,7 @@ void dsp_opc_ilrr(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_opc_ilrr");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_ilrr");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,14 +544,14 @@ void dsp_opc_mulc(uint16 opc)
|
||||
// NEW
|
||||
void dsp_opc_mulcmvz(uint16 opc)
|
||||
{
|
||||
ErrorLog("dsp_opc_mulcmvz ni");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_mulcmvz ni");
|
||||
}
|
||||
|
||||
|
||||
// NEW
|
||||
void dsp_opc_mulcmv(uint16 opc)
|
||||
{
|
||||
ErrorLog("dsp_opc_mulcmv ni");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_mulcmv ni");
|
||||
}
|
||||
|
||||
|
||||
@@ -735,7 +735,7 @@ void dsp_opc_andfc(uint16 opc)
|
||||
{
|
||||
if (opc & 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_andfc");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_andfc");
|
||||
}
|
||||
|
||||
uint8 reg = (opc >> 8) & 0x1;
|
||||
@@ -761,7 +761,7 @@ void dsp_opc_andf(uint16 opc)
|
||||
|
||||
if (opc & 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_andf");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_andf");
|
||||
}
|
||||
|
||||
reg = 0x1e + ((opc >> 8) & 0x1);
|
||||
@@ -783,7 +783,7 @@ void dsp_opc_subf(uint16 opc)
|
||||
{
|
||||
if (opc & 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_subf");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_subf");
|
||||
}
|
||||
|
||||
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
|
||||
@@ -800,7 +800,7 @@ void dsp_opc_xori(uint16 opc)
|
||||
{
|
||||
if (opc & 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_xori");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_xori");
|
||||
}
|
||||
|
||||
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
|
||||
@@ -815,7 +815,7 @@ void dsp_opc_andi(uint16 opc)
|
||||
{
|
||||
if (opc & 0xf)
|
||||
{
|
||||
ErrorLog("dsp_opc_andi");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_andi");
|
||||
}
|
||||
|
||||
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
|
||||
@@ -832,7 +832,8 @@ void dsp_opc_ori(uint16 opc)
|
||||
{
|
||||
if (opc & 0xf)
|
||||
{
|
||||
return(ErrorLog("dsp_opc_ori"));
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_ori");
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
|
||||
@@ -980,7 +981,7 @@ void dsp_opc_neg(uint16 opc)
|
||||
|
||||
void dsp_opc_movnp(uint16 opc)
|
||||
{
|
||||
ErrorLog("dsp_opc_movnp\n");
|
||||
ERROR_LOG(DSPHLE, "dsp_opc_movnp\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -1525,7 +1526,7 @@ void dsp_op0(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op0");
|
||||
ERROR_LOG(DSPHLE, "dsp_op0");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1565,7 +1566,7 @@ void dsp_op0(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op0");
|
||||
ERROR_LOG(DSPHLE, "dsp_op0");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1628,7 +1629,7 @@ void dsp_op0(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op0");
|
||||
ERROR_LOG(DSPHLE, "dsp_op0");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1671,7 +1672,7 @@ void dsp_op0(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op0");
|
||||
ERROR_LOG(DSPHLE, "dsp_op0");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1699,7 +1700,7 @@ void dsp_op0(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op0");
|
||||
ERROR_LOG(DSPHLE, "dsp_op0");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1756,7 +1757,7 @@ void dsp_op1(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op1");
|
||||
ERROR_LOG(DSPHLE, "dsp_op1");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1814,7 +1815,7 @@ void dsp_op3(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op3");
|
||||
ERROR_LOG(DSPHLE, "dsp_op3");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1857,7 +1858,7 @@ void dsp_op4(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op4");
|
||||
ERROR_LOG(DSPHLE, "dsp_op4");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1895,7 +1896,7 @@ void dsp_op5(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op5: %x", (opc >> 8) & 0xf);
|
||||
ERROR_LOG(DSPHLE, "dsp_op5: %x", (opc >> 8) & 0xf);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1933,7 +1934,7 @@ void dsp_op6(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op6");
|
||||
ERROR_LOG(DSPHLE, "dsp_op6");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1985,7 +1986,7 @@ void dsp_op7(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op7");
|
||||
ERROR_LOG(DSPHLE, "dsp_op7");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2032,7 +2033,7 @@ void dsp_op8(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op8");
|
||||
ERROR_LOG(DSPHLE, "dsp_op8");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2078,7 +2079,7 @@ void dsp_op9(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_op9");
|
||||
ERROR_LOG(DSPHLE, "dsp_op9");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2116,7 +2117,7 @@ void dsp_opab(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_opab");
|
||||
ERROR_LOG(DSPHLE, "dsp_opab");
|
||||
}
|
||||
|
||||
dsp_op_ext_ops_epi(opc);
|
||||
@@ -2153,7 +2154,7 @@ void dsp_opcd(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_opcd");
|
||||
ERROR_LOG(DSPHLE, "dsp_opcd");
|
||||
}
|
||||
|
||||
dsp_op_ext_ops_epi(opc);
|
||||
@@ -2183,7 +2184,7 @@ void dsp_ope(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_ope");
|
||||
ERROR_LOG(DSPHLE, "dsp_ope");
|
||||
}
|
||||
|
||||
dsp_op_ext_ops_epi(opc);
|
||||
@@ -2224,7 +2225,7 @@ void dsp_opf(uint16 opc)
|
||||
break;
|
||||
|
||||
default:
|
||||
ErrorLog("dsp_opf");
|
||||
ERROR_LOG(DSPHLE, "dsp_opf");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "WaveFile.h"
|
||||
#include "CommonTypes.h"
|
||||
#include "Mixer.h"
|
||||
#include "ConsoleWindow.h" // For Console::Open, Console::Print
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "gdsp_interpreter.h"
|
||||
@@ -57,6 +56,7 @@
|
||||
// =======================================================================================
|
||||
// Global declarations and definitions
|
||||
// --------------
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
DSPInitialize g_dspInitialize;
|
||||
|
||||
#define GDSP_MBOX_CPU 0
|
||||
@@ -114,7 +114,10 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
void DllAbout(HWND _hParent)
|
||||
@@ -135,13 +138,13 @@ void DllDebugger(HWND _hParent, bool Show)
|
||||
#if defined (_DEBUG) || defined (DEBUGFAST)
|
||||
g_Dialog.Create(NULL); //_hParent);
|
||||
g_Dialog.ShowWindow(SW_SHOW);
|
||||
MoveWindow(g_Dialog.m_hWnd, 450,0, 780,530, true);
|
||||
// MoveWindow(g_Dialog.m_hWnd, 450,0, 780,530, true);
|
||||
|
||||
// Open the console window
|
||||
Console::Open(155, 100, "Sound Debugging"); // give room for 100 rows
|
||||
Console::Print("DllDebugger > Console opened\n");
|
||||
// Console::Open(155, 100, "Sound Debugging"); // give room for 100 rows
|
||||
// Console::Print("DllDebugger > Console opened\n");
|
||||
// Todo: Make this adjustable from the Debugging window
|
||||
MoveWindow(Console::GetHwnd(), 0,400, 1280,500, true);
|
||||
// MoveWindow(Console::GetHwnd(), 0,400, 1280,500, true);
|
||||
#else
|
||||
MessageBox(0, "Can't open debugging window in the Release build of this plugin.", "DSP LLE", 0);
|
||||
#endif
|
||||
@@ -235,14 +238,14 @@ void Initialize(void *init)
|
||||
{
|
||||
bCanWork = false;
|
||||
PanicAlert("No DSP ROM");
|
||||
ErrorLog("Cannot load DSP ROM\n");
|
||||
ERROR_LOG(DSPHLE, "Cannot load DSP ROM\n");
|
||||
}
|
||||
|
||||
if (!gdsp_load_coef((char *)DSP_COEF_FILE))
|
||||
{
|
||||
bCanWork = false;
|
||||
PanicAlert("No DSP COEF");
|
||||
ErrorLog("Cannot load DSP COEF\n");
|
||||
ERROR_LOG(DSPHLE, "Cannot load DSP COEF\n");
|
||||
}
|
||||
|
||||
if(!bCanWork)
|
||||
@@ -350,7 +353,7 @@ void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
|
||||
{
|
||||
if (gdsp_mbox_peek(GDSP_MBOX_CPU) & 0x80000000)
|
||||
{
|
||||
ErrorLog("Mailbox isnt empty ... strange");
|
||||
ERROR_LOG(DSPHLE, "Mailbox isnt empty ... strange");
|
||||
}
|
||||
|
||||
#if PROFILE
|
||||
@@ -364,7 +367,7 @@ void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorLog("CPU cant write to DSP mailbox");
|
||||
ERROR_LOG(DSPHLE, "CPU cant write to DSP mailbox");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +380,7 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
|
||||
u32 uAddress = gdsp_mbox_peek(GDSP_MBOX_CPU);
|
||||
u16 errpc = g_dsp.err_pc;
|
||||
|
||||
DebugLog("Write CPU Mail: 0x%08x (pc=0x%04x)\n", uAddress, errpc);
|
||||
DEBUG_LOG(DSPHLE, "Write CPU Mail: 0x%08x (pc=0x%04x)\n", uAddress, errpc);
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// I couldn't find any better way to detect the AX mails so this had to do. Please feel free
|
||||
@@ -385,13 +388,13 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
|
||||
// --------------
|
||||
if ((errpc == 0x0054 || errpc == 0x0055) && m_addressPBs == 0)
|
||||
{
|
||||
DebugLog("AXTask ======== 0x%08x (pc=0x%04x)", uAddress, errpc);
|
||||
DEBUG_LOG(DSPHLE, "AXTask ======== 0x%08x (pc=0x%04x)", uAddress, errpc);
|
||||
AXTask(uAddress);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorLog("CPU cant write to DSP mailbox");
|
||||
ERROR_LOG(DSPHLE, "CPU cant write to DSP mailbox");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +436,3 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate)
|
||||
|
||||
|
||||
|
||||
void __Log(int, const char *fmt, ...)
|
||||
{
|
||||
//DebugLog(fmt);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_PadSimple"
|
||||
ProjectGUID="{9A183B48-ECC2-4121-876A-9B3793686073}"
|
||||
RootNamespace="Plugin_PadSimple"
|
||||
@@ -86,7 +86,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -188,7 +188,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -285,7 +285,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib rpcrt4.lib"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\Win32/plugins\Plugin_PadSimpleD.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -383,7 +383,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib rpcrt4.lib"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimpleD.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -485,7 +485,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\plugins\Plugin_PadSimpleDF.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -586,7 +586,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib "
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib comctl32.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimpleDF.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
|
||||
@@ -254,7 +254,7 @@ void ConfigDialog::CreateGUIControls()
|
||||
m_CheckRecording[0]->SetValue(pad[0].bRecording);
|
||||
m_CheckPlayback[0]->SetValue(pad[0].bPlayback);
|
||||
|
||||
Console::Print("m_CheckRecording: %i\n", pad[0].bRecording, pad[0].bPlayback);
|
||||
//DEBUG_LOG(CONSOLE, "m_CheckRecording: %i\n", pad[0].bRecording, pad[0].bPlayback);
|
||||
#endif
|
||||
//////////////////////////////////////
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "PadSimple.h"
|
||||
#include "IniFile.h"
|
||||
#include "ConsoleWindow.h"
|
||||
#include "StringUtil.h"
|
||||
#include "FileUtil.h"
|
||||
#include "ChunkFile.h"
|
||||
@@ -80,17 +79,12 @@ SPADInitialize g_PADInitialize;
|
||||
|
||||
// Pre defined maxium storage limit
|
||||
#define RECORD_SIZE (1024 * 128)
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
SPADStatus recordBuffer[RECORD_SIZE];
|
||||
int count = 0;
|
||||
bool g_EmulatorRunning = false;
|
||||
////////////////////////////////
|
||||
|
||||
|
||||
// TODO: fix this dirty hack to stop missing symbols
|
||||
void __Log(int log, const char *format, ...) {}
|
||||
void __Logv(int log, int v, const char *format, ...) {}
|
||||
|
||||
|
||||
//******************************************************************************
|
||||
// Supporting functions
|
||||
//******************************************************************************
|
||||
@@ -612,7 +606,11 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {}
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define __PADSIMPLE_H__
|
||||
|
||||
#include "Setup.h" // Common
|
||||
#include "ConsoleWindow.h"
|
||||
|
||||
// Controls
|
||||
enum
|
||||
|
||||
@@ -67,11 +67,6 @@ SPADInitialize g_PADInitialize;
|
||||
SPADStatus recordBuffer[RECORD_SIZE];
|
||||
int count = 0;
|
||||
|
||||
// TODO: fix this dirty hack to stop missing symbols
|
||||
void __Log(int log, const char *format, ...) {}
|
||||
void __Logv(int log, int v, const char *format, ...) {}
|
||||
|
||||
|
||||
void RecordInput(const SPADStatus& _rPADStatus)
|
||||
{
|
||||
if (count >= RECORD_SIZE)
|
||||
@@ -215,7 +210,9 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
globals = _pPluginGlobals;
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
|
||||
}
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
SVideoInitialize g_VideoInitialize;
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
int initCount = 0;
|
||||
|
||||
|
||||
@@ -163,6 +164,8 @@ void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
void DllAbout(HWND _hParent)
|
||||
@@ -268,32 +271,6 @@ void Video_AddMessage(const char* pstr, u32 milliseconds)
|
||||
Renderer::AddMessage(pstr,milliseconds);
|
||||
}
|
||||
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, _fmt);
|
||||
vsprintf(Msg, _fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_VideoInitialize.pLog(Msg, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __Log(int log, const char *format, ...)
|
||||
{
|
||||
// char temp[512];
|
||||
//va_list args;
|
||||
//va_start(args, format);
|
||||
//CharArrayFromFormatV(temp, 512, format, args);
|
||||
//va_end(args);
|
||||
|
||||
DebugLog(format); //"%s", temp);
|
||||
}
|
||||
|
||||
|
||||
HRESULT ScreenShot(const char *File)
|
||||
{
|
||||
if (D3D::dev == NULL)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "../Globals.h" // The precompiled header
|
||||
#include "IniFile.h" // Common
|
||||
#include "ConsoleWindow.h" // Move console window
|
||||
#include "../Config.h" // Config settings
|
||||
#include "Debugger.h"
|
||||
|
||||
@@ -57,20 +56,21 @@ void CDebugger::OnClose(wxCloseEvent& event)
|
||||
SaveSettings();
|
||||
|
||||
event.Skip(); // This means wxDialog's Destroy is used
|
||||
CloseConsole(); // The console goes with the wx window
|
||||
// CloseConsole(); // The console goes with the wx window
|
||||
}
|
||||
|
||||
void CDebugger::DoShowHideConsole()
|
||||
{
|
||||
if(m_Check[1]->IsChecked()
|
||||
/* if(m_Check[1]->IsChecked()
|
||||
#ifdef _WIN32
|
||||
// Check to see if we already have a console
|
||||
&& Console::GetHwnd() == NULL
|
||||
// && Console::GetHwnd() == NULL
|
||||
#endif
|
||||
)
|
||||
OpenConsole();
|
||||
else
|
||||
CloseConsole();
|
||||
*/
|
||||
}
|
||||
|
||||
void CDebugger::SaveSettings() const
|
||||
@@ -113,9 +113,6 @@ void CDebugger::LoadSettings()
|
||||
file.Get("VideoWindow", "h", &h, GetSize().GetHeight());
|
||||
SetSize(x, y, w, h);
|
||||
|
||||
file.Get("VideoWindow", "WriteToFile", &LocalLogFile, m_Check[0]->IsChecked());
|
||||
m_Check[0]->SetValue(LocalLogFile);
|
||||
|
||||
bool Console;
|
||||
file.Get("VideoWindow", "Console", &Console, m_Check[1]->IsChecked());
|
||||
m_Check[1]->SetValue(Console);
|
||||
@@ -168,9 +165,6 @@ void CDebugger::GeneralSettings(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
{
|
||||
case ID_SAVETOFILE:
|
||||
LocalLogFile = event.IsChecked();
|
||||
break;
|
||||
case ID_SHOWCONSOLE:
|
||||
DoShowHideConsole();
|
||||
break;
|
||||
|
||||
@@ -76,13 +76,13 @@ ConfigDialog::ConfigDialog(wxWindow *parent, wxWindowID id, const wxString &titl
|
||||
// ---------------
|
||||
ConfigDialog::~ConfigDialog()
|
||||
{
|
||||
Console::Print("ConfigDialog Closed\n");
|
||||
INFO_LOG(CONSOLE, "ConfigDialog Closed\n");
|
||||
}
|
||||
void ConfigDialog::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
g_Config.Save();
|
||||
|
||||
Console::Print("OnClose\n");
|
||||
INFO_LOG(CONSOLE, "OnClose\n");
|
||||
|
||||
// notice that we don't run wxEntryCleanup(); here so the dll will still be loaded
|
||||
/* JP: Yes, it seems like Close() does not do that. It only runs EndModal() or something
|
||||
@@ -98,7 +98,7 @@ void ConfigDialog::OnClose(wxCloseEvent& event)
|
||||
|
||||
void ConfigDialog::CloseClick(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
Console::Print("CloseClick\n");
|
||||
INFO_LOG(CONSOLE, "CloseClick\n");
|
||||
|
||||
// If we run wxEntryCleanup() the class will be entirely deleted, and the destructor will be run
|
||||
//g_Config.Save();
|
||||
|
||||
@@ -30,16 +30,17 @@
|
||||
#include "main.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
#include "ConsoleWindow.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
/* FIXME should be done from logmanager
|
||||
// Open and close the Windows console window
|
||||
|
||||
void OpenConsole()
|
||||
{
|
||||
Console::Open(100, 300, "OpenGL Plugin Output"); // give room for 300 rows
|
||||
Console::Print("OpenGL console opened\n");
|
||||
#ifdef _WIN32
|
||||
// Console::Open(100, 300, "OpenGL Plugin Output"); // give room for 300 rows
|
||||
INFO_LOG(CONSOLE, "OpenGL console opened\n");
|
||||
// #ifdef _WIN32
|
||||
MoveWindow(Console::GetHwnd(), 0,400, 1280,550, true); // Move window. Todo: make this
|
||||
// adjustable from the debugging window
|
||||
#endif
|
||||
@@ -47,59 +48,7 @@ void OpenConsole()
|
||||
|
||||
void CloseConsole()
|
||||
{
|
||||
Console::Close();
|
||||
// Console::Close();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Write logs
|
||||
|
||||
// The log file handle
|
||||
static FILE* pfLog = NULL;
|
||||
|
||||
// This is on by default, but can be controlled from the debugging window
|
||||
bool LocalLogFile = true;
|
||||
|
||||
#if LOGLEVEL > 0
|
||||
void __Log(const char *fmt, ...)
|
||||
{
|
||||
size_t len = strlen(fmt);
|
||||
if (!len)
|
||||
return;
|
||||
char* Msg = (char*)alloca(len + 512);
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(Msg, len + 512, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_VideoInitialize.pLog(Msg, FALSE);
|
||||
|
||||
// If we have no file to write to, create one
|
||||
if (pfLog == NULL && LocalLogFile)
|
||||
pfLog = fopen(FULL_LOGS_DIR "oglgfx.txt", "w");
|
||||
|
||||
// Write to file
|
||||
if (pfLog != NULL && LocalLogFile)
|
||||
fwrite(Msg, strlen(Msg), 1, pfLog);
|
||||
|
||||
Console::Print(Msg);
|
||||
}
|
||||
|
||||
void __Log(int type, const char *fmt, ...)
|
||||
{
|
||||
int len = (int)strlen(fmt);
|
||||
if (!len)
|
||||
return;
|
||||
char* Msg = (char*)alloca(len + 512);
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(Msg, len + 512, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
g_VideoInitialize.pLog(Msg, FALSE);
|
||||
Console::Print(Msg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,19 +24,10 @@
|
||||
#include "VideoCommon.h"
|
||||
#include "pluginspecs_video.h"
|
||||
|
||||
#include "ConsoleWindow.h"
|
||||
|
||||
|
||||
// Compile without WxWidgets in Windows to, for debugging purposes
|
||||
//#define HAVE_WX 0
|
||||
|
||||
// Turns file logging on and off
|
||||
extern bool LocalLogFile;
|
||||
|
||||
// A global plugin specification
|
||||
extern PLUGIN_GLOBALS* globals;
|
||||
|
||||
void OpenConsole();
|
||||
void CloseConsole();
|
||||
//void OpenConsole();
|
||||
//void CloseConsole();
|
||||
|
||||
#endif // _GLOBALS_H
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Declarations and definitions
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
void OpenConsole();
|
||||
void CloseConsole();
|
||||
//void OpenConsole();
|
||||
//void CloseConsole();
|
||||
|
||||
HINSTANCE g_hInstance;
|
||||
|
||||
|
||||
@@ -972,7 +972,7 @@ void ComputeBackbufferRectangle(TRectangle *rc)
|
||||
// Adjust the X and Y offset
|
||||
FloatXOffset = FloatXOffset - (IncreasedWidth / 2.0 / WidthRatio / Ratio);
|
||||
FloatYOffset = FloatYOffset - (IncreasedHeight / 2.0 / HeightRatio / Ratio);
|
||||
//Console::Print("Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f\n", Ratio, IncreasedHeight, FloatYOffset);
|
||||
//DEBUG_LOG(CONSOLE, "Crop Ratio:%1.2f IncreasedHeight:%3.0f YOffset:%3.0f\n", Ratio, IncreasedHeight, FloatYOffset);
|
||||
}
|
||||
|
||||
// round(float) = floor(float + 0.5)
|
||||
@@ -1410,15 +1410,15 @@ void UpdateViewport()
|
||||
GetWindowRect(Child, &RcChild);
|
||||
|
||||
//Console::ClearScreen();
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
Console::Print("Top window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcTop.left, RcTop.top, RcTop.right - RcTop.left, RcTop.bottom - RcTop.top);
|
||||
Console::Print("Parent window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcParent.left, RcParent.top, RcParent.right - RcParent.left, RcParent.bottom - RcParent.top);
|
||||
Console::Print("Child window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcChild.left, RcChild.top, RcChild.right - RcChild.left, RcChild.bottom - RcChild.top);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
Console::Print("Res. MValue: X:%f Y:%f XOffs:%f YOffs:%f\n", OpenGL_GetXmax(), OpenGL_GetYmax(), OpenGL_GetXoff(), OpenGL_GetYoff());
|
||||
Console::Print("GLViewPort: X:%03i Y:%03i Width:%03i Height:%03i\n", GLx, GLy, GLWidth, GLHeight);
|
||||
Console::Print("GLDepthRange: Near:%f Far:%f\n", GLNear, GLFar);
|
||||
Console::Print("GLScissor: X:%03i Y:%03i Width:%03i Height:%03i\n", GLScissorX, GLScissorY, GLScissorW, GLScissorH);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
DEBUG_LOG(CONSOLE, "Top window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcTop.left, RcTop.top, RcTop.right - RcTop.left, RcTop.bottom - RcTop.top);
|
||||
DEBUG_LOG(CONSOLE, "Parent window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcParent.left, RcParent.top, RcParent.right - RcParent.left, RcParent.bottom - RcParent.top);
|
||||
DEBUG_LOG(CONSOLE, "Child window: X:%03i Y:%03i Width:%03i Height:%03i\n", RcChild.left, RcChild.top, RcChild.right - RcChild.left, RcChild.bottom - RcChild.top);
|
||||
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
DEBUG_LOG(CONSOLE, "Res. MValue: X:%f Y:%f XOffs:%f YOffs:%f\n", OpenGL_GetXmax(), OpenGL_GetYmax(), OpenGL_GetXoff(), OpenGL_GetYoff());
|
||||
DEBUG_LOG(CONSOLE, "GLViewPort: X:%03i Y:%03i Width:%03i Height:%03i\n", GLx, GLy, GLWidth, GLHeight);
|
||||
DEBUG_LOG(CONSOLE, "GLDepthRange: Near:%f Far:%f\n", GLNear, GLFar);
|
||||
DEBUG_LOG(CONSOLE, "GLScissor: X:%03i Y:%03i Width:%03i Height:%03i\n", GLScissorX, GLScissorY, GLScissorW, GLScissorH);
|
||||
DEBUG_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
// Definitions
|
||||
// --------------------------
|
||||
SVideoInitialize g_VideoInitialize;
|
||||
PLUGIN_GLOBALS* globals;
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
// Logging
|
||||
int GLScissorX, GLScissorY, GLScissorW, GLScissorH;
|
||||
@@ -95,6 +95,8 @@ void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
// This is used for the fuctions right below here, in DllConfig()
|
||||
@@ -318,22 +320,6 @@ void Video_ExitLoop()
|
||||
}
|
||||
/////////////////////////
|
||||
|
||||
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
|
||||
char* Msg = (char*)alloca(strlen(_fmt)+512);
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsnprintf( Msg, strlen(_fmt)+512, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
g_VideoInitialize.pLog(Msg, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Video_Screenshot(const char *_szFilename)
|
||||
{
|
||||
Renderer::SetScreenshot(_szFilename);
|
||||
|
||||
@@ -244,21 +244,6 @@ void Video_EnterLoop()
|
||||
Fifo_EnterLoop(g_VideoInitialize);
|
||||
}
|
||||
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
|
||||
char* Msg = (char*)alloca(strlen(_fmt)+512);
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsnprintf( Msg, strlen(_fmt)+512, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
g_VideoInitialize.pLog(Msg, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ScreenShot(TCHAR *File)
|
||||
{
|
||||
char str[64];
|
||||
|
||||
@@ -214,7 +214,7 @@ void Config::Load(bool ChangePad)
|
||||
// =============================
|
||||
|
||||
// Logging
|
||||
Console::Print("Load()\n");
|
||||
INFO_LOG(CONSOLE, "Load()\n");
|
||||
}
|
||||
|
||||
void Config::Save(int Slot)
|
||||
@@ -352,5 +352,5 @@ void Config::Save(int Slot)
|
||||
// =============================
|
||||
|
||||
// Logging
|
||||
Console::Print("Save()\n");
|
||||
INFO_LOG(CONSOLE, "Save()\n");
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
// Input button clicked
|
||||
void ConfigDialog::OnButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
//Console::Print("OnButtonClick: %i\n", g_Pressed);
|
||||
//INFO_LOG(CONSOLE, "OnButtonClick: %i\n", g_Pressed);
|
||||
|
||||
// Don't allow space to start a new Press Key option, that will interfer with setting a key to space
|
||||
if (g_Pressed == WXK_SPACE) { g_Pressed = 0; return; }
|
||||
@@ -391,7 +391,7 @@ void ConfigDialog::DoSave(bool ChangePad, int Slot)
|
||||
// Then change it back to ""
|
||||
ToBlank();
|
||||
|
||||
Console::Print("WiiMoteEmu::PadMapping[%i].ID = %i\n", Page, m_Joyname[Page]->GetSelection());
|
||||
INFO_LOG(CONSOLE, "WiiMoteEmu::PadMapping[%i].ID = %i\n", Page, m_Joyname[Page]->GetSelection());
|
||||
}
|
||||
//////////////////////////////////////
|
||||
|
||||
@@ -1439,7 +1439,7 @@ void ConfigDialog::DoConnectReal()
|
||||
}
|
||||
else
|
||||
{
|
||||
Console::Print("Post Message: %i\n", g_RealWiiMoteInitialized);
|
||||
INFO_LOG(CONSOLE, "Post Message: %i\n", g_RealWiiMoteInitialized);
|
||||
if (g_RealWiiMoteInitialized)
|
||||
{
|
||||
WiiMoteReal::Shutdown();
|
||||
@@ -1471,11 +1471,11 @@ void ConfigDialog::DoUseReal()
|
||||
if (g_Config.bNunchuckConnected || g_Config.bClassicControllerConnected)
|
||||
UsingExtension = true;
|
||||
|
||||
Console::Print("\nDoUseReal() Connect extension: %i\n", !UsingExtension);
|
||||
INFO_LOG(CONSOLE, "\nDoUseReal() Connect extension: %i\n", !UsingExtension);
|
||||
DoExtensionConnectedDisconnected(UsingExtension ? 0 : 1);
|
||||
|
||||
UsingExtension = !UsingExtension;
|
||||
Console::Print("\nDoUseReal() Connect extension: %i\n", !UsingExtension);
|
||||
INFO_LOG(CONSOLE, "\nDoUseReal() Connect extension: %i\n", !UsingExtension);
|
||||
DoExtensionConnectedDisconnected(UsingExtension ? 1 : 0);
|
||||
|
||||
if(g_EmulatorRunning)
|
||||
@@ -1650,7 +1650,7 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event)
|
||||
if (m_RecordHotKeyNunchuck[i]->GetSelection() == m_RecordHotKeyNunchuck[CurrentChoiceBox]->GetSelection()) m_RecordHotKeyNunchuck[i]->SetSelection(10);
|
||||
if (m_RecordHotKeyIR[i]->GetSelection() == m_RecordHotKeyIR[CurrentChoiceBox]->GetSelection()) m_RecordHotKeyIR[i]->SetSelection(10);
|
||||
|
||||
//Console::Print("HotKey: %i %i\n",
|
||||
//INFO_LOG(CONSOLE, "HotKey: %i %i\n",
|
||||
// m_RecordHotKey[i]->GetSelection(), m_RecordHotKey[CurrentChoiceBox]->GetSelection());
|
||||
}
|
||||
break;
|
||||
@@ -1710,7 +1710,7 @@ void ConfigDialog::UpdateControls()
|
||||
// -------------
|
||||
void ConfigDialog::UpdateGUI(int Slot)
|
||||
{
|
||||
//Console::Print("UpdateGUI: \n");
|
||||
//INFO_LOG(CONSOLE, "UpdateGUI: \n");
|
||||
|
||||
// Update the gamepad settings
|
||||
UpdateGUIButtonMapping(Page);
|
||||
|
||||
@@ -61,12 +61,12 @@ void ConfigDialog::PadOpen(int Open) // Open for slot 1, 2, 3 or 4
|
||||
// Check that we got a good pad
|
||||
if (!WiiMoteEmu::joyinfo.at(WiiMoteEmu::PadMapping[Open].ID).Good)
|
||||
{
|
||||
Console::Print("A bad pad was selected\n");
|
||||
INFO_LOG(CONSOLE, "A bad pad was selected\n");
|
||||
WiiMoteEmu::PadState[Open].joy = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
Console::Print("Update the Slot %i handle to Id %i\n", Page, WiiMoteEmu::PadMapping[Open].ID);
|
||||
INFO_LOG(CONSOLE, "Update the Slot %i handle to Id %i\n", Page, WiiMoteEmu::PadMapping[Open].ID);
|
||||
WiiMoteEmu::PadState[Open].joy = SDL_JoystickOpen(WiiMoteEmu::PadMapping[Open].ID);
|
||||
}
|
||||
void ConfigDialog::PadClose(int Close) // Close for slot 1, 2, 3 or 4
|
||||
@@ -118,7 +118,7 @@ void ConfigDialog::SetButtonTextAll(int id, char text[128])
|
||||
|
||||
void ConfigDialog::SaveButtonMappingAll(int Slot)
|
||||
{
|
||||
//Console::Print("SaveButtonMappingAll()\n");
|
||||
//INFO_LOG(CONSOLE, "SaveButtonMappingAll()\n");
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ void ConfigDialog::UpdateGUIButtonMapping(int controller)
|
||||
m_bCcRd[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Cc.Rd).c_str()));
|
||||
#endif
|
||||
|
||||
//Console::Print("m_bWmA[%i] = %i = %s\n", controller, WiiMoteEmu::PadMapping[controller].Wm.A, InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.A).c_str());
|
||||
//INFO_LOG(CONSOLE, "m_bWmA[%i] = %i = %s\n", controller, WiiMoteEmu::PadMapping[controller].Wm.A, InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.A).c_str());
|
||||
}
|
||||
|
||||
/* Populate the PadMapping array with the dialog items settings (for example
|
||||
@@ -257,7 +257,7 @@ void ConfigDialog::SaveButtonMapping(int controller, bool DontChangeId, int From
|
||||
m_AnalogTriggerL[FromSlot]->GetValue().ToLong(&value); WiiMoteEmu::PadMapping[controller].Axis.Tl = value;
|
||||
m_AnalogTriggerR[FromSlot]->GetValue().ToLong(&value); WiiMoteEmu::PadMapping[controller].Axis.Tr = value;
|
||||
|
||||
//Console::Print("WiiMoteEmu::PadMapping[%i].ID = %i, m_Joyname[%i]->GetSelection() = %i\n",
|
||||
//INFO_LOG(CONSOLE, "WiiMoteEmu::PadMapping[%i].ID = %i, m_Joyname[%i]->GetSelection() = %i\n",
|
||||
// controller, WiiMoteEmu::PadMapping[controller].ID, FromSlot, m_Joyname[FromSlot]->GetSelection());
|
||||
|
||||
// Replace "-1" with ""
|
||||
@@ -320,7 +320,7 @@ void ConfigDialog::SaveKeyboardMapping(int Controller, int Id, int Key)
|
||||
case IDB_CC_RD: WiiMoteEmu::PadMapping[Controller].Cc.Rd = Key; break;
|
||||
}
|
||||
|
||||
//Console::Print("WiiMoteEmu::PadMapping[%i].Wm.A = %i", Controller, WiiMoteEmu::PadMapping[Controller].Wm.A);
|
||||
//INFO_LOG(CONSOLE, "WiiMoteEmu::PadMapping[%i].Wm.A = %i", Controller, WiiMoteEmu::PadMapping[Controller].Wm.A);
|
||||
}
|
||||
|
||||
// Replace the harder to understand -1 with "" for the sake of user friendliness
|
||||
@@ -421,14 +421,14 @@ void ConfigDialog::SetButtonText(int id, char text[128], int _Page)
|
||||
case IDB_CC_RD: m_bCcRd[controller]->SetLabel(wxString::FromAscii(text)); break;
|
||||
default: break;
|
||||
}
|
||||
//Console::Print("SetButtonText: %s\n", text);
|
||||
//INFO_LOG(CONSOLE, "SetButtonText: %s\n", text);
|
||||
}
|
||||
|
||||
// Get the text in the textbox for the buttons
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
wxString ConfigDialog::GetButtonText(int id, int _Page)
|
||||
{
|
||||
//Console::Print("GetButtonText: %i\n", id);
|
||||
//INFO_LOG(CONSOLE, "GetButtonText: %i\n", id);
|
||||
|
||||
// Set controller value
|
||||
int controller;
|
||||
@@ -510,7 +510,7 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||
bool Stop = false; // Stop the timer
|
||||
// =======================
|
||||
|
||||
//Console::Print("Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
//INFO_LOG(CONSOLE, "Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
// GetButtonWaitingTimer, GetButtonWaitingID, GetId, m_ButtonMappingTimer->IsRunning());
|
||||
|
||||
// If the Id has changed or the timer is not running we should start one
|
||||
@@ -539,7 +539,7 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||
#if wxUSE_TIMER
|
||||
m_ButtonMappingTimer->Start( floor((double)(1000 / TimesPerSecond)) );
|
||||
#endif
|
||||
Console::Print("Timer Started for Pad:%i GetId:%i\n"
|
||||
INFO_LOG(CONSOLE, "Timer Started for Pad:%i GetId:%i\n"
|
||||
"Allowed input is Axis:%i LeftRight:%i XInput:%i Button:%i Hat:%i\n",
|
||||
WiiMoteEmu::PadMapping[Controller].ID, GetId,
|
||||
Axis, LeftRight, XInput, Button, Hat);
|
||||
@@ -578,7 +578,7 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||
SetButtonText(GetId, format);
|
||||
|
||||
/* Debug
|
||||
Console::Print("Keyboard: %i\n", g_Pressed);*/
|
||||
INFO_LOG(CONSOLE, "Keyboard: %i\n", g_Pressed);*/
|
||||
}
|
||||
|
||||
// Time's up
|
||||
@@ -610,7 +610,7 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||
several disabled slots. */
|
||||
SaveButtonMappingAll(Controller);
|
||||
|
||||
Console::Print("Timer Stopped for Pad:%i GetId:%i\n",
|
||||
INFO_LOG(CONSOLE, "Timer Stopped for Pad:%i GetId:%i\n",
|
||||
WiiMoteEmu::PadMapping[Controller].ID, GetId);
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ void ConfigDialog::DoGetButtons(int GetId)
|
||||
|
||||
// Debugging
|
||||
/*
|
||||
Console::Print("Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
INFO_LOG(CONSOLE, "Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
WiiMoteEmu::PadMapping[0].halfpress, WiiMoteEmu::PadMapping[1].halfpress, WiiMoteEmu::PadMapping[2].halfpress, WiiMoteEmu::PadMapping[3].halfpress,
|
||||
m_JoyButtonHalfpress[0]->GetValue().c_str(), m_JoyButtonHalfpress[1]->GetValue().c_str(), m_JoyButtonHalfpress[2]->GetValue().c_str(), m_JoyButtonHalfpress[3]->GetValue().c_str()
|
||||
);*/
|
||||
@@ -657,7 +657,7 @@ void ConfigDialog::Convert2Box(int &x)
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void ConfigDialog::PadGetStatus()
|
||||
{
|
||||
//Console::Print("SDL_WasInit: %i\n", SDL_WasInit(0));
|
||||
//INFO_LOG(CONSOLE, "SDL_WasInit: %i\n", SDL_WasInit(0));
|
||||
|
||||
/* Return if it's not detected. The ID should never be less than zero here, it can only be that
|
||||
because of a manual ini file change, but we make that check anway. */
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
void ConfigDialog::LoadFile()
|
||||
{
|
||||
Console::Print("LoadFile()\n");
|
||||
INFO_LOG(CONSOLE, "LoadFile()\n");
|
||||
|
||||
IniFile file;
|
||||
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
@@ -79,7 +79,7 @@ void ConfigDialog::LoadFile()
|
||||
}
|
||||
void ConfigDialog::SaveFile()
|
||||
{
|
||||
Console::Print("SaveFile\n");
|
||||
INFO_LOG(CONSOLE, "SaveFile\n");
|
||||
|
||||
IniFile file;
|
||||
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
@@ -115,7 +115,7 @@ void ConfigDialog::SaveFile()
|
||||
}
|
||||
|
||||
file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
Console::Print("SaveFile()\n");
|
||||
INFO_LOG(CONSOLE, "SaveFile()\n");
|
||||
}
|
||||
/////////////////////////////
|
||||
|
||||
@@ -371,7 +371,7 @@ void ConfigDialog::ConvertToString()
|
||||
TmpStr += StringFromFormat("%s", m_vRecording.at(i).z >= 0 ? StringFromFormat("+%03i", m_vRecording.at(i).z).c_str() : StringFromFormat("%04i", m_vRecording.at(i).z).c_str());
|
||||
if (i < ((int)m_vRecording.size() - 1)) TmpStr += ",";
|
||||
|
||||
//Console::Print("%s\n", TmpStr.c_str());
|
||||
//INFO_LOG(CONSOLE, "%s\n", TmpStr.c_str());
|
||||
|
||||
// Write the IR data
|
||||
TmpIR += ArrayToString(m_vRecording.at(i).IR, IRBytes, 0, 30, false);
|
||||
@@ -391,7 +391,7 @@ void ConfigDialog::ConvertToString()
|
||||
}
|
||||
|
||||
// Debug
|
||||
Console::Print("Saved: [%i / %i] %03i %03i %03i\n", i, m_vRecording.size(), m_vRecording.at(i).x, m_vRecording.at(i).y, m_vRecording.at(i).z);
|
||||
INFO_LOG(CONSOLE, "Saved: [%i / %i] %03i %03i %03i\n", i, m_vRecording.size(), m_vRecording.at(i).x, m_vRecording.at(i).y, m_vRecording.at(i).z);
|
||||
}
|
||||
|
||||
// Recordings per second
|
||||
@@ -424,7 +424,7 @@ void ConfigDialog::ConvertToString()
|
||||
|
||||
file.Save(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
|
||||
Console::Print("Save recording to WiimoteMovement.ini\n");
|
||||
INFO_LOG(CONSOLE, "Save recording to WiimoteMovement.ini\n");
|
||||
}
|
||||
|
||||
// Timeout the recording
|
||||
@@ -493,7 +493,7 @@ void ConfigDialog::DoRecordA(bool Pressed)
|
||||
else
|
||||
{
|
||||
m_RecordButton[m_iRecordTo]->SetLabel(wxT("Done"));
|
||||
Console::Print("Done: %i %i\n", m_bWaitForRecording, m_bRecording);
|
||||
INFO_LOG(CONSOLE, "Done: %i %i\n", m_bWaitForRecording, m_bRecording);
|
||||
//m_bAllowA = true;
|
||||
ConvertToString();
|
||||
}
|
||||
@@ -504,11 +504,11 @@ void ConfigDialog::DoRecordA(bool Pressed)
|
||||
void ConfigDialog::DoRecordMovement(int _x, int _y, int _z, const u8 *_IR, int _IRBytes)
|
||||
{
|
||||
//std::string Tmp1 = ArrayToString(_IR, 20, 0, 30);
|
||||
//Console::Print("DoRecordMovement: %s\n", Tmp1.c_str());
|
||||
//INFO_LOG(CONSOLE, "DoRecordMovement: %s\n", Tmp1.c_str());
|
||||
|
||||
if (!m_bRecording) return;
|
||||
|
||||
//Console::Print("DoRecordMovement: %03i %03i %03i\n", _x, _y, _z);
|
||||
//INFO_LOG(CONSOLE, "DoRecordMovement: %03i %03i %03i\n", _x, _y, _z);
|
||||
|
||||
SRecording Tmp;
|
||||
Tmp.x = _x;
|
||||
|
||||
@@ -95,11 +95,11 @@ void WmDataReporting(u16 _channelID, wm_data_reporting* dr)
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Continuous: %x", dr->continuous);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " All The Time: %x (not only on data change)", dr->all_the_time);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Mode: 0x%02x", dr->mode);
|
||||
Console::Print("Data reporting:\n");
|
||||
Console::Print(" Continuous: %x\n", dr->continuous);
|
||||
Console::Print(" All The Time: %x (not only on data change)\n", dr->all_the_time);
|
||||
Console::Print(" Mode: 0x%02x\n", dr->mode);
|
||||
Console::Print(" Channel: 0x%04x\n", _channelID);
|
||||
INFO_LOG(CONSOLE, "Data reporting:\n");
|
||||
INFO_LOG(CONSOLE, " Continuous: %x\n", dr->continuous);
|
||||
INFO_LOG(CONSOLE, " All The Time: %x (not only on data change)\n", dr->all_the_time);
|
||||
INFO_LOG(CONSOLE, " Mode: 0x%02x\n", dr->mode);
|
||||
INFO_LOG(CONSOLE, " Channel: 0x%04x\n", _channelID);
|
||||
|
||||
g_ReportingMode = dr->mode;
|
||||
g_ReportingChannel = _channelID;
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#include "Logging.h" // for startConsoleWin, Console::Print, GetConsoleHwnd
|
||||
|
||||
extern SWiimoteInitialize g_WiimoteInitialize;
|
||||
//extern void __Log(int log, const char *format, ...);
|
||||
//extern void __Log(int log, int v, const char *format, ...);
|
||||
|
||||
namespace WiiMoteEmu
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ void TiltTest(u8 x, u8 y, u8 z)
|
||||
std::string To = StringFromFormat("%s\nTo: X:%i Y:%i Z:%i Roll:%s Pitch:%s", From.c_str(), x, y, z,
|
||||
(_Roll >= 0) ? StringFromFormat(" %03i", (int)_Roll).c_str() : StringFromFormat("%04i", (int)_Roll).c_str(),
|
||||
(_Pitch >= 0) ? StringFromFormat(" %03i", (int)_Pitch).c_str() : StringFromFormat("%04i", (int)_Pitch).c_str());
|
||||
Console::Print("%s\n", To.c_str());
|
||||
INFO_LOG(CONSOLE, "%s\n", To.c_str());
|
||||
}
|
||||
////////////////////////////////////
|
||||
|
||||
|
||||
@@ -127,10 +127,10 @@ void GetMousePos(float& x, float& y)
|
||||
}
|
||||
// Logging
|
||||
/*
|
||||
Console::ClearScreen();
|
||||
Console::Print("Screen Width:%4.0f Height:%4.0f Ratio:%1.2f\n", WinWidth, WinHeight, Ratio);
|
||||
Console::Print("Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE, "Screen Width:%4.0f Height:%4.0f Ratio:%1.2f\n", WinWidth, WinHeight, Ratio);
|
||||
INFO_LOG(CONSOLE, "Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
INFO_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
*/
|
||||
}
|
||||
// -------------------------------------
|
||||
@@ -157,9 +157,9 @@ void GetMousePos(float& x, float& y)
|
||||
|
||||
// Logging
|
||||
/*
|
||||
Console::Print("Crop Ratio:%1.2f IncrWidth:%3.0f IncrHeight:%3.0f\n", Ratio, IncreasedWidth, IncreasedHeight);
|
||||
Console::Print("Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
Console::Print("----------------------------------------------------------------\n");
|
||||
INFO_LOG(CONSOLE, "Crop Ratio:%1.2f IncrWidth:%3.0f IncrHeight:%3.0f\n", Ratio, IncreasedWidth, IncreasedHeight);
|
||||
INFO_LOG(CONSOLE, "Picture Width:%4.1f Height:%4.1f YOffset:%4.0f XOffset:%4.0f\n", PictureWidth, PictureHeight, YOffset, XOffset);
|
||||
INFO_LOG(CONSOLE, "----------------------------------------------------------------\n");
|
||||
*/
|
||||
}
|
||||
// -------------------------------------
|
||||
@@ -172,9 +172,9 @@ void GetMousePos(float& x, float& y)
|
||||
// Logging
|
||||
// -------------
|
||||
/*
|
||||
Console::Print("GetCursorPos: %i %i\n", point.x, point.y);
|
||||
Console::Print("GetClientRect: %i %i %i %i\n", Rect.left, Rect.right, Rect.top, Rect.bottom);
|
||||
Console::Print("Position X:%1.2f Y:%1.2f\n", x, y);
|
||||
INFO_LOG(CONSOLE, "GetCursorPos: %i %i\n", point.x, point.y);
|
||||
INFO_LOG(CONSOLE, "GetClientRect: %i %i %i %i\n", Rect.left, Rect.right, Rect.top, Rect.bottom);
|
||||
INFO_LOG(CONSOLE, "Position X:%1.2f Y:%1.2f\n", x, y);
|
||||
*/
|
||||
// ---------------------------
|
||||
|
||||
@@ -220,7 +220,7 @@ void GetCalibrationChecksum()
|
||||
sum += nunchuck_calibration[i];
|
||||
u8 Check1 = sum + 0x55;
|
||||
u8 Check2 = sum + 0xaa;
|
||||
Console::Print("0x%02x 0x%02x", Check1, Check2);
|
||||
INFO_LOG(CONSOLE, "0x%02x 0x%02x", Check1, Check2);
|
||||
}
|
||||
// ================
|
||||
|
||||
@@ -230,7 +230,7 @@ void GetCalibrationChecksum()
|
||||
// ----------------
|
||||
void LoadRecordedMovements()
|
||||
{
|
||||
Console::Print("LoadRecordedMovements()\n");
|
||||
INFO_LOG(CONSOLE, "LoadRecordedMovements()\n");
|
||||
|
||||
IniFile file;
|
||||
file.Load(FULL_CONFIG_DIR "WiimoteMovement.ini");
|
||||
@@ -238,7 +238,7 @@ void LoadRecordedMovements()
|
||||
for(int i = 0; i < RECORDING_ROWS; i++)
|
||||
{
|
||||
// Logging
|
||||
//Console::Print("Recording%i ", i + 1);
|
||||
//INFO_LOG(CONSOLE, "Recording%i ", i + 1);
|
||||
|
||||
// Temporary storage
|
||||
int iTmp;
|
||||
@@ -310,10 +310,10 @@ void LoadRecordedMovements()
|
||||
// ---------------------------------
|
||||
// Log results
|
||||
// ---------
|
||||
/*Console::Print("Time:%f\n", Tmp.Time);
|
||||
/*INFO_LOG(CONSOLE, "Time:%f\n", Tmp.Time);
|
||||
std::string TmpIRLog = ArrayToString(Tmp.IR, TmpIRBytes, 0, 30);
|
||||
Console::Print("IR: %s\n", TmpIRLog.c_str());
|
||||
Console::Print("\n");*/
|
||||
INFO_LOG(CONSOLE, "IR: %s\n", TmpIRLog.c_str());
|
||||
INFO_LOG(CONSOLE, "\n");*/
|
||||
}
|
||||
|
||||
// Get HotKey
|
||||
@@ -335,7 +335,7 @@ void LoadRecordedMovements()
|
||||
else
|
||||
TmpIRLog = "";
|
||||
|
||||
Console::Print("Size:%i HotKey:%i PlSpeed:%i IR:%s X:%i Y:%i Z:%i\n",
|
||||
INFO_LOG(CONSOLE, "Size:%i HotKey:%i PlSpeed:%i IR:%s X:%i Y:%i Z:%i\n",
|
||||
VRecording.at(i).Recording.size(), VRecording.at(i).HotKeyWiimote, VRecording.at(i).PlaybackSpeed,
|
||||
TmpIRLog.c_str(),
|
||||
VRecording.at(i).Recording.at(0).x, VRecording.at(i).Recording.at(0).y, VRecording.at(i).Recording.at(0).z
|
||||
@@ -355,7 +355,7 @@ void UpdateEeprom()
|
||||
g_wm.cal_g.y = g_Eeprom[27] - g_Eeprom[24];
|
||||
g_wm.cal_g.z = g_Eeprom[28] - g_Eeprom[24];
|
||||
|
||||
Console::Print("\nUpdateEeprom: %i %i %i\n",
|
||||
INFO_LOG(CONSOLE, "\nUpdateEeprom: %i %i %i\n",
|
||||
WiiMoteEmu::g_Eeprom[22], WiiMoteEmu::g_Eeprom[23], WiiMoteEmu::g_Eeprom[28]);
|
||||
|
||||
if(g_Config.bNunchuckConnected)
|
||||
@@ -373,7 +373,7 @@ void UpdateEeprom()
|
||||
g_nu.jy.min = g_RegExt[0x2c];
|
||||
g_nu.jy.center = g_RegExt[0x2d];
|
||||
|
||||
Console::Print("UpdateNunchuck: %i %i %i %i %i\n\n",
|
||||
INFO_LOG(CONSOLE, "UpdateNunchuck: %i %i %i %i %i\n\n",
|
||||
WiiMoteEmu::g_RegExt[0x2a], WiiMoteEmu::g_RegExt[0x2d],
|
||||
WiiMoteEmu::g_RegExt[0x20], WiiMoteEmu::g_RegExt[0x21], WiiMoteEmu::g_RegExt[0x26]);
|
||||
}
|
||||
@@ -396,7 +396,7 @@ void UpdateEeprom()
|
||||
g_cc.Tl.neutral = g_RegExt[0x2c];
|
||||
g_cc.Tr.neutral = g_RegExt[0x2d];
|
||||
|
||||
Console::Print("UpdateCC: %i %i %i %i %i\n\n",
|
||||
INFO_LOG(CONSOLE, "UpdateCC: %i %i %i %i %i\n\n",
|
||||
WiiMoteEmu::g_RegExt[0x2a], WiiMoteEmu::g_RegExt[0x2d],
|
||||
WiiMoteEmu::g_RegExt[0x20], WiiMoteEmu::g_RegExt[0x21], WiiMoteEmu::g_RegExt[0x26]);
|
||||
}
|
||||
@@ -460,7 +460,7 @@ void SetDefaultExtensionRegistry()
|
||||
memcpy(g_RegExt + 0xfa, classic_id, sizeof(classic_id));
|
||||
}
|
||||
|
||||
Console::Print("\nSetDefaultExtensionRegistry()\n\n");
|
||||
INFO_LOG(CONSOLE, "\nSetDefaultExtensionRegistry()\n\n");
|
||||
|
||||
UpdateEeprom();
|
||||
}
|
||||
@@ -518,7 +518,7 @@ void DoState(void* ptr, int mode)
|
||||
these variables. */
|
||||
void Shutdown(void)
|
||||
{
|
||||
Console::Print("ShutDown\n");
|
||||
INFO_LOG(CONSOLE, "ShutDown\n");
|
||||
|
||||
ResetVariables();
|
||||
|
||||
@@ -529,7 +529,7 @@ void Shutdown(void)
|
||||
if (PadMapping[i].enabled && joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.at(PadMapping[i].ID).Good)
|
||||
{
|
||||
Console::Print("ShutDown: %i\n", PadState[i].joy);
|
||||
INFO_LOG(CONSOLE, "ShutDown: %i\n", PadState[i].joy);
|
||||
/* SDL_JoystickClose() crashes for some reason so I avoid this for now, SDL_Quit() should
|
||||
close the pads to I think */
|
||||
//if(SDL_JoystickOpened(PadMapping[i].ID)) SDL_JoystickClose(PadState[i].joy);
|
||||
@@ -582,7 +582,7 @@ void CheckAckDelay()
|
||||
}
|
||||
AckDelay.at(i).Delay--;
|
||||
|
||||
//Console::Print("%i 0x%04x 0x%02x", i, AckDelay.at(i).ChannelID, AckDelay.at(i).ReportID);
|
||||
//INFO_LOG(CONSOLE, "%i 0x%04x 0x%02x", i, AckDelay.at(i).ChannelID, AckDelay.at(i).ReportID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -595,7 +595,7 @@ void CheckAckDelay()
|
||||
// ----------------
|
||||
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Emu InterruptChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Emu InterruptChannel\n");
|
||||
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, "=============================================================");
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, "Wiimote_Input");
|
||||
@@ -657,7 +657,7 @@ void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
|
||||
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Emu ControlChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Emu ControlChannel\n");
|
||||
|
||||
const u8* data = (const u8*)_pData;
|
||||
// Dump raw data
|
||||
@@ -665,7 +665,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
|
||||
std::string Temp = ArrayToString(data, 0, _Size);
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
Console::Print("\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
#endif
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
|
||||
}
|
||||
@@ -724,7 +724,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
void Update()
|
||||
{
|
||||
//LOG(WII_IPC_WIIMOTE, "Wiimote_Update");
|
||||
//Console::Print("Emu Update: %i\n", g_ReportingMode);
|
||||
//INFO_LOG(CONSOLE, "Emu Update: %i\n", g_ReportingMode);
|
||||
|
||||
// Check if the pad state should be updated
|
||||
if ((g_Config.Trigger.Type == g_Config.Trigger.TRIGGER || g_Config.Trigger.Type == g_Config.Trigger.ANALOG1 || g_Config.Trigger.Type == g_Config.Trigger.ANALOG2
|
||||
|
||||
@@ -171,8 +171,8 @@ void GetJoyState(InputCommon::CONTROLLER_STATE_NEW &_PadState, InputCommon::CONT
|
||||
#endif
|
||||
|
||||
/* Debugging
|
||||
Console::ClearScreen();
|
||||
Console::Print(
|
||||
// Console::ClearScreen();
|
||||
DEBUG_LOG(CONSOLE,
|
||||
"Controller and handle: %i %i\n"
|
||||
|
||||
"Triggers:%i %i %i %i %i\n"
|
||||
|
||||
@@ -96,7 +96,7 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
|
||||
case WM_REQUEST_STATUS: // 0x15
|
||||
if (!g_Config.bUseRealWiimote || !g_RealWiiMotePresent) WmRequestStatus(_channelID, (wm_request_status*)sr->data);
|
||||
//Temp = ArrayToString(sr->data, sizeof(wm_request_status), 0);
|
||||
//Console::Print("\n%s: InterruptChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
//INFO_LOG(CONSOLE, "\n%s: InterruptChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
break;
|
||||
case WM_READ_DATA: // 0x17
|
||||
if (!g_Config.bUseRealWiimote || !g_RealWiiMotePresent) WmReadData(_channelID, (wm_read_data*)sr->data);
|
||||
@@ -107,7 +107,7 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
|
||||
case WM_IR_PIXEL_CLOCK: // 0x13
|
||||
case WM_IR_LOGIC: // 0x1a
|
||||
WARN_LOG(WII_IPC_WIIMOTE, " IR Enable 0x%02x: 0x%02x", sr->channel, sr->data[0]);
|
||||
Console::Print("IR Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
INFO_LOG(CONSOLE, "IR Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
if(sr->data[0] == 0x02) g_IR = 0;
|
||||
else if(sr->data[0] == 0x06) g_IR = 1;
|
||||
break;
|
||||
@@ -118,13 +118,13 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
|
||||
|
||||
case WM_SPEAKER_ENABLE: // 0x14
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " WM Speaker Enable 0x%02x: 0x%02x", sr->channel, sr->data[0]);
|
||||
//Console::Print("Speaker Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
//INFO_LOG(CONSOLE, "Speaker Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
if(sr->data[0] == 0x02) g_Speaker = 0;
|
||||
else if(sr->data[0] == 0x06) g_Speaker = 1;
|
||||
break;
|
||||
case WM_SPEAKER_MUTE: // 0x19
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " WM Mute Enable 0x%02x: 0x%02x", sr->channel, sr->data[0]);
|
||||
//Console::Print("Speaker Mute/Unmute 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
//INFO_LOG(CONSOLE, "Speaker Mute/Unmute 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
if(sr->data[0] == 0x02) g_SpeakerVoice = 0; // g_SpeakerVoice
|
||||
else if(sr->data[0] == 0x06) g_SpeakerVoice = 1;
|
||||
break;
|
||||
@@ -204,13 +204,13 @@ void WmSendAck(u16 _channelID, u8 _reportID, u32 address)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Report ID: %02x", _reportID);
|
||||
//std::string Temp = ArrayToString(DataFrame, Offset, 0);
|
||||
//LOGV(WII_IPC_WIIMOTE, 2, " Data: %s", Temp.c_str());
|
||||
//Console::Print("%s: WMSendAck: %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
//INFO_LOG(CONSOLE, "%s: WMSendAck: %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
|
||||
/* Debug. Write the report for extension registry writes.
|
||||
if((_reportID == 0x16 || _reportID == 0x17) && ((address >> 16) & 0xfe) == 0xa4)
|
||||
{
|
||||
Console::Print("\nWMSendAck Report ID: %02x Encryption: %02x\n", _reportID, g_RegExt[0xf0]);
|
||||
Console::Print("Data: %s\n", Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "\nWMSendAck Report ID: %02x Encryption: %02x\n", _reportID, g_RegExt[0xf0]);
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());
|
||||
}*/
|
||||
|
||||
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
|
||||
@@ -248,7 +248,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
return;
|
||||
}
|
||||
SendReadDataReply(_channelID, g_Eeprom + address, address, (u8)size);
|
||||
/*Console::Print("Read RegEeprom: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
/*INFO_LOG(CONSOLE, "Read RegEeprom: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
size, address, (address & 0xffff));*/
|
||||
}
|
||||
else if(rd->space == WM_SPACE_REGS1 || rd->space == WM_SPACE_REGS2)
|
||||
@@ -263,7 +263,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case 0xa2: g_RegSpeaker");
|
||||
/*Tmp = ArrayToString(g_RegSpeaker, size, (address & 0xffff));
|
||||
//LOGV(WII_IPC_WIIMOTE, 0, " Data: %s", Temp.c_str());
|
||||
Console::Print("Read RegSpkr: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
INFO_LOG(CONSOLE, "Read RegSpkr: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
size, address, (address & 0xffff), Tmp.c_str());*/
|
||||
break;
|
||||
case 0xA4:
|
||||
@@ -272,7 +272,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case 0xa4: Read ExtReg");
|
||||
/*Tmp = ArrayToString(g_RegExt, size, (address & 0xffff), 40);
|
||||
//LOGV(WII_IPC_WIIMOTE, 0, " Data: %s", Temp.c_str());
|
||||
Console::Print("Read RegExt: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
INFO_LOG(CONSOLE, "Read RegExt: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
size, address, (address & 0xffff), Tmp.c_str());*/
|
||||
break;
|
||||
case 0xB0:
|
||||
@@ -281,7 +281,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case: 0xb0 g_RegIr");
|
||||
/*Tmp = ArrayToString(g_RegIr, size, (address & 0xffff));
|
||||
//LOGV(WII_IPC_WIIMOTE, 0, " Data: %s", Temp.c_str());
|
||||
Console::Print("Read RegIR: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
INFO_LOG(CONSOLE, "Read RegIR: Size %i Address %08x Offset %08x\nData %s\n",
|
||||
size, address, (address & 0xffff), Tmp.c_str());*/
|
||||
break;
|
||||
default:
|
||||
@@ -297,12 +297,12 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
if(((address >> 16) & 0xfe) == 0xa4)
|
||||
{
|
||||
/* Debugging
|
||||
Console::Print("\n\nWmReadData Address: %08x Offset: %08x Size: %i byte\n",
|
||||
INFO_LOG(CONSOLE, "\n\nWmReadData Address: %08x Offset: %08x Size: %i byte\n",
|
||||
address, address & 0xffff, (u8)size);
|
||||
// Debugging
|
||||
u32 offset = address & 0xffff;
|
||||
std::string Temp = ArrayToString(g_RegExt, size, offset);
|
||||
Console::Print("Unencrypted data:\n%s\n", Temp.c_str());*/
|
||||
INFO_LOG(CONSOLE, "Unencrypted data:\n%s\n", Temp.c_str());*/
|
||||
|
||||
// Check if encrypted reads is on
|
||||
if(g_RegExt[0xf0] == 0xaa)
|
||||
@@ -319,7 +319,7 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
|
||||
|
||||
/* Debugging: Show the encrypted data
|
||||
std::string Temp = ArrayToString(g_RegExtTmp, size, offset);
|
||||
Console::Print("Encrypted data:\n%s\n", Temp.c_str());*/
|
||||
INFO_LOG(CONSOLE, "Encrypted data:\n%s\n", Temp.c_str());*/
|
||||
}
|
||||
}
|
||||
//-------------
|
||||
@@ -405,14 +405,14 @@ void SendReadDataReply(u16 _channelID, void* _Base, u16 _Address, u8 _Size)
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Error: 0x%x", pReply->error);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Size: 0x%x", pReply->size);
|
||||
DEBUG_LOG(WII_IPC_WIIMOTE, " Address: 0x%04x", pReply->address);
|
||||
/*Console::Print(" SendReadDataReply()\n");
|
||||
Console::Print(" Offset: 0x%x\n", Offset);
|
||||
Console::Print(" dataOffset: 0x%x\n", dataOffset);
|
||||
Console::Print(" copySize: 0x%x\n", copySize);
|
||||
Console::Print(" Size: 0x%x\n", pReply->size);
|
||||
Console::Print(" Address: 0x%04x\n", Common::swap16(pReply->address));*/
|
||||
/*INFO_LOG(CONSOLE, " SendReadDataReply()\n");
|
||||
INFO_LOG(CONSOLE, " Offset: 0x%x\n", Offset);
|
||||
INFO_LOG(CONSOLE, " dataOffset: 0x%x\n", dataOffset);
|
||||
INFO_LOG(CONSOLE, " copySize: 0x%x\n", copySize);
|
||||
INFO_LOG(CONSOLE, " Size: 0x%x\n", pReply->size);
|
||||
INFO_LOG(CONSOLE, " Address: 0x%04x\n", Common::swap16(pReply->address));*/
|
||||
//std::string Temp = ArrayToString(data, 0x40);
|
||||
//Console::Print("Data:\n%s\n", Temp.c_str());
|
||||
//INFO_LOG(CONSOLE, "Data:\n%s\n", Temp.c_str());
|
||||
|
||||
// Send a piece
|
||||
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
|
||||
@@ -456,7 +456,7 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
|
||||
return;
|
||||
}
|
||||
memcpy(g_Eeprom + address, wd->data, wd->size);
|
||||
/*Console::Print("Write RegEeprom: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
/*INFO_LOG(CONSOLE, "Write RegEeprom: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
wd->size, address, (address & 0xffff));*/
|
||||
}
|
||||
// Write to registers
|
||||
@@ -470,9 +470,9 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
|
||||
block = g_RegSpeaker;
|
||||
blockSize = WIIMOTE_REG_SPEAKER_SIZE;
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case 0xa2: RegSpeaker");
|
||||
/*Console::Print("Write RegSpeaker: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
/*INFO_LOG(CONSOLE, "Write RegSpeaker: Size: %i, Address: %08x, Offset: %08x\n",
|
||||
wd->size, address, (address & 0xffff));
|
||||
Console::Print("Data: %s\n", Temp.c_str());*/
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());*/
|
||||
break;
|
||||
case 0xA4:
|
||||
block = g_RegExt; // Extension Controller register
|
||||
@@ -480,17 +480,17 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
|
||||
//LOGV(WII_IPC_WIIMOTE, 0, " *******************************************************");
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case 0xa4: ExtReg");
|
||||
//LOGV(WII_IPC_WIIMOTE, 0, " *******************************************************");
|
||||
/*Console::Print("Write RegExt Size: %i Address: %08x Offset: %08x \n",
|
||||
/*INFO_LOG(CONSOLE, "Write RegExt Size: %i Address: %08x Offset: %08x \n",
|
||||
wd->size, address, (address & 0xffff));
|
||||
Console::Print("Data: %s\n", Temp.c_str());*/
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());*/
|
||||
break;
|
||||
case 0xB0:
|
||||
block = g_RegIr;
|
||||
blockSize = WIIMOTE_REG_IR_SIZE;
|
||||
INFO_LOG(WII_IPC_WIIMOTE, " Case 0xb0: RegIr");
|
||||
/*Console::Print("Write RegIR Size: %i Address: %08x Offset: %08x \n",
|
||||
/*INFO_LOG(CONSOLE, "Write RegIR Size: %i Address: %08x Offset: %08x \n",
|
||||
wd->size, address, (address & 0xffff));
|
||||
Console::Print("Data: %s\n", Temp.c_str());*/
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());*/
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(WII_IPC_WIIMOTE, "WmWriteData: bad register block!");
|
||||
@@ -518,8 +518,8 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
|
||||
if(blockSize == WIIMOTE_REG_EXT_SIZE)
|
||||
{
|
||||
/* Debugging. Write the data.
|
||||
Console::Print("Data: %s\n", Temp.c_str());
|
||||
Console::Print("Current address: %08x\n", address); */
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "Current address: %08x\n", address); */
|
||||
|
||||
/* Run the key generation on all writes in the key area, it doesn't matter
|
||||
that we send it parts of a key, only the last full key will have an
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
// Declarations and definitions
|
||||
// ¯¯¯¯¯¯¯¯¯
|
||||
extern SWiimoteInitialize g_WiimoteInitialize;
|
||||
//extern void __Log(int log, const char *format, ...);
|
||||
//extern void __Log(int log, int v, const char *format, ...);
|
||||
///////////////////////////////
|
||||
|
||||
|
||||
namespace WiiMoteEmu
|
||||
|
||||
@@ -262,8 +262,8 @@ void wiimote_gen_key(wiimote_key *key, u8 *keydata)
|
||||
for(int i=0;i<6;i++)
|
||||
skey[5-i] = keydata[i+10];
|
||||
|
||||
Console::Print("rand: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", rand[0], rand[1], rand[2], rand[3], rand[4], rand[5], rand[6], rand[7], rand[8], rand[9]);
|
||||
Console::Print("key: %02x %02x %02x %02x %02x %02x\n", skey[0], skey[1], skey[2], skey[3], skey[4], skey[5]);
|
||||
INFO_LOG(CONSOLE, "rand: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", rand[0], rand[1], rand[2], rand[3], rand[4], rand[5], rand[6], rand[7], rand[8], rand[9]);
|
||||
INFO_LOG(CONSOLE, "key: %02x %02x %02x %02x %02x %02x\n", skey[0], skey[1], skey[2], skey[3], skey[4], skey[5]);
|
||||
|
||||
for(idx = 0; idx < 7; idx++)
|
||||
{
|
||||
@@ -272,12 +272,12 @@ void wiimote_gen_key(wiimote_key *key, u8 *keydata)
|
||||
break;
|
||||
}
|
||||
// default case is idx = 7 which is valid (homebrew uses it for the 0x17 case)
|
||||
Console::Print("idx: %d\n", idx);
|
||||
INFO_LOG(CONSOLE, "idx: %d\n", idx);
|
||||
|
||||
gentabs(rand, skey, idx, key->ft, key->sb);
|
||||
|
||||
Console::Print("ft: %02x %02x %02x %02x %02x %02x %02x %02x\n", key->ft[0], key->ft[1], key->ft[2], key->ft[3], key->ft[4], key->ft[5], key->ft[6], key->ft[7]);
|
||||
Console::Print("sb: %02x %02x %02x %02x %02x %02x %02x %02x\n", key->sb[0], key->sb[1], key->sb[2], key->sb[3], key->sb[4], key->sb[5], key->sb[6], key->sb[7]);
|
||||
INFO_LOG(CONSOLE, "ft: %02x %02x %02x %02x %02x %02x %02x %02x\n", key->ft[0], key->ft[1], key->ft[2], key->ft[3], key->ft[4], key->ft[5], key->ft[6], key->ft[7]);
|
||||
INFO_LOG(CONSOLE, "sb: %02x %02x %02x %02x %02x %02x %02x %02x\n", key->sb[0], key->sb[1], key->sb[2], key->sb[3], key->sb[4], key->sb[5], key->sb[6], key->sb[7]);
|
||||
|
||||
// for homebrew, ft and sb are all 0x97 which is equivalent to 0x17
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ int G2Accelerometer(int _G, int XYZ, int Wm)
|
||||
int Return = (int)Accelerometer;
|
||||
|
||||
// Logging
|
||||
//Console::Print("G2Accelerometer():%f %f %f %f\n", Neutral, OneG, G, Accelerometer);
|
||||
//INFO_LOG(CONSOLE, "G2Accelerometer():%f %f %f %f\n", Neutral, OneG, G, Accelerometer);
|
||||
|
||||
// Boundaries
|
||||
if (Return > 255) Return = 255;
|
||||
@@ -130,14 +130,14 @@ bool RecordingPlayAccIR(u8 &_x, u8 &_y, u8 &_z, IRReportType &_IR, int Wm)
|
||||
if(VRecording.at(g_RecordingPlaying[Wm]).Recording.size() == 0)
|
||||
{
|
||||
g_RecordingPlaying[Wm] = -1;
|
||||
Console::Print("Empty\n\n");
|
||||
INFO_LOG(CONSOLE, "Empty\n\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return if the playback speed is unset
|
||||
if(VRecording.at(g_RecordingPlaying[Wm]).PlaybackSpeed < 0)
|
||||
{
|
||||
Console::Print("PlaybackSpeed empty: %i\n\n", g_RecordingPlaying[Wm]);
|
||||
INFO_LOG(CONSOLE, "PlaybackSpeed empty: %i\n\n", g_RecordingPlaying[Wm]);
|
||||
g_RecordingPlaying[Wm] = -1;
|
||||
return false;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ bool RecordingPlayAccIR(u8 &_x, u8 &_y, u8 &_z, IRReportType &_IR, int Wm)
|
||||
)
|
||||
)
|
||||
{
|
||||
Console::Print("Wrong IR mode: %i\n\n", g_RecordingPlaying[Wm]);
|
||||
INFO_LOG(CONSOLE, "Wrong IR mode: %i\n\n", g_RecordingPlaying[Wm]);
|
||||
g_RecordingPlaying[Wm] = -1;
|
||||
return false;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ bool RecordingPlayAccIR(u8 &_x, u8 &_y, u8 &_z, IRReportType &_IR, int Wm)
|
||||
// Get starting time
|
||||
if(g_RecordingCounter[Wm] == 0)
|
||||
{
|
||||
Console::Print("\n\nBegin: %i\n", Wm);
|
||||
INFO_LOG(CONSOLE, "\n\nBegin: %i\n", Wm);
|
||||
g_RecordingStart[Wm] = GetDoubleTime();
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ bool RecordingPlayAccIR(u8 &_x, u8 &_y, u8 &_z, IRReportType &_IR, int Wm)
|
||||
g_RecordingPlaying[Wm] = -1;
|
||||
g_RecordingStart[Wm] = 0;
|
||||
g_RecordingCurrentTime[Wm] = 0;
|
||||
Console::Print("End: %i\n\n", Wm);
|
||||
INFO_LOG(CONSOLE, "End: %i\n\n", Wm);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -204,13 +204,13 @@ bool RecordingPlayAccIR(u8 &_x, u8 &_y, u8 &_z, IRReportType &_IR, int Wm)
|
||||
if (g_DebugAccelerometer)
|
||||
{
|
||||
//Console::ClearScreen();
|
||||
Console::Print("Current time: [%i / %i] %f %f\n",
|
||||
INFO_LOG(CONSOLE, "Current time: [%i / %i] %f %f\n",
|
||||
g_RecordingPoint[Wm], VRecording.at(g_RecordingPlaying[Wm]).Recording.size(),
|
||||
VRecording.at(g_RecordingPlaying[Wm]).Recording.at(g_RecordingPoint[Wm]).Time, g_RecordingCurrentTime[Wm]
|
||||
);
|
||||
Console::Print("Accel x, y, z: %03u %03u %03u\n", _x, _y, _z);
|
||||
INFO_LOG(CONSOLE, "Accel x, y, z: %03u %03u %03u\n", _x, _y, _z);
|
||||
}
|
||||
//Console::Print("Accel x, y, z: %03u %03u %03u\n", _x, _y, _z);
|
||||
//INFO_LOG(CONSOLE, "Accel x, y, z: %03u %03u %03u\n", _x, _y, _z);
|
||||
|
||||
g_RecordingCounter[Wm]++;
|
||||
|
||||
@@ -272,7 +272,7 @@ bool IsSwitchPressed(int _Key)
|
||||
int RecordingCheckKeys(int WmNuIr)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
//Console::Print("RecordingCheckKeys: %i\n", Wiimote);
|
||||
//INFO_LOG(CONSOLE, "RecordingCheckKeys: %i\n", Wiimote);
|
||||
|
||||
// Check if we have a HotKey match
|
||||
bool Match = false;
|
||||
@@ -287,7 +287,7 @@ int RecordingCheckKeys(int WmNuIr)
|
||||
|| VRecording.at(i).HotKeyIR == j && WmNuIr == 2 && IsNumericalKeyPressed(j))
|
||||
&& (IsSwitchPressed(VRecording.at(i).HotKeySwitch) || VRecording.at(i).HotKeySwitch == 3))
|
||||
{
|
||||
//Console::Print("Match: %i %i\n", i, Key);
|
||||
//INFO_LOG(CONSOLE, "Match: %i %i\n", i, Key);
|
||||
Match = true;
|
||||
Recording = i;
|
||||
break;
|
||||
@@ -485,7 +485,7 @@ void SingleShake(u8 &_y, u8 &_z, int i)
|
||||
Shake[i] = -1;
|
||||
}
|
||||
#endif
|
||||
//if (Shake[i] > -1) Console::Print("Shake: %i\n", Shake[i]);
|
||||
//if (Shake[i] > -1) INFO_LOG(CONSOLE, "Shake: %i\n", Shake[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -609,7 +609,7 @@ void TiltWiimoteKeyboard(float &Roll, float &Pitch)
|
||||
else
|
||||
{
|
||||
Pitch = KbDegree;
|
||||
//Console::Print("Degree: %2.1f\n", KbDegree);
|
||||
//INFO_LOG(CONSOLE, "Degree: %2.1f\n", KbDegree);
|
||||
}
|
||||
// --------------------
|
||||
#endif
|
||||
@@ -642,9 +642,9 @@ void Tilt(u8 &_x, u8 &_y, u8 &_z)
|
||||
if (g_DebugData)
|
||||
{
|
||||
//Console::ClearScreen();
|
||||
/*Console::Print("L:%2.1f R:%2.1f Lx:%2.1f Range:%2.1f Degree:%2.1f L:%i R:%i\n",
|
||||
/*INFO_LOG(CONSOLE, "L:%2.1f R:%2.1f Lx:%2.1f Range:%2.1f Degree:%2.1f L:%i R:%i\n",
|
||||
Tl, Tr, Lx, Range, Degree, PadState[Page].Axis.Tl, PadState[Page].Axis.Tr);*/
|
||||
/*Console::Print("Roll:%2.1f Pitch:%2.1f\n", Roll, Pitch);*/
|
||||
/*INFO_LOG(CONSOLE, "Roll:%2.1f Pitch:%2.1f\n", Roll, Pitch);*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -662,7 +662,7 @@ void FillReportAcc(wm_accel& _acc)
|
||||
{
|
||||
// If the recording reached the end or failed somehow we will not return
|
||||
if (RecordingPlay(_acc.x, _acc.y, _acc.z, 0)) return;
|
||||
//Console::Print("X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
//INFO_LOG(CONSOLE, "X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
}
|
||||
// ---------------------
|
||||
|
||||
@@ -767,13 +767,13 @@ void FillReportAcc(wm_accel& _acc)
|
||||
|
||||
|
||||
//if(consoleDisplay == 0)
|
||||
Console::Print("x: %03i | y: %03i | z: %03i | A:%i B:%i C:%i a:%i b:%i c:%i d:%i X:%i Y:%i Z:%i\n",
|
||||
INFO_LOG(CONSOLE, "x: %03i | y: %03i | z: %03i | A:%i B:%i C:%i a:%i b:%i c:%i d:%i X:%i Y:%i Z:%i\n",
|
||||
_acc.x, _acc.y, _acc.z,
|
||||
A, B, C,
|
||||
a, b, c, d,
|
||||
X, Y, Z
|
||||
);
|
||||
Console::Print("x: %03i | y: %03i | z: %03i | X:%i Y:%i Z:%i | AX:%i AY:%i AZ:%i \n",
|
||||
INFO_LOG(CONSOLE, "x: %03i | y: %03i | z: %03i | X:%i Y:%i Z:%i | AX:%i AY:%i AZ:%i \n",
|
||||
_acc.x, _acc.y, _acc.z,
|
||||
X, Y, Z,
|
||||
AX, AY, AZ
|
||||
@@ -804,7 +804,7 @@ void FillReportIR(wm_ir_extended& _ir0, wm_ir_extended& _ir1)
|
||||
}
|
||||
else
|
||||
{
|
||||
//Console::Print("X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
//INFO_LOG(CONSOLE, "X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
if (RecordingPlayIR(_ir0)) return;
|
||||
}
|
||||
// ---------------------
|
||||
@@ -857,7 +857,7 @@ void FillReportIR(wm_ir_extended& _ir0, wm_ir_extended& _ir1)
|
||||
|
||||
//Console::ClearScreen();
|
||||
//if(consoleDisplay == 1)
|
||||
Console::Print("x0:%03i x1:%03i y0:%03i y1:%03i | T:%i L:%i R:%i B:%i S:%i\n",
|
||||
INFO_LOG(CONSOLE, "x0:%03i x1:%03i y0:%03i y1:%03i | T:%i L:%i R:%i B:%i S:%i\n",
|
||||
x0, x1, y0, y1, Top, Left, Right, Bottom, SensorBarRadius
|
||||
);*/
|
||||
// ------------------
|
||||
@@ -898,7 +898,7 @@ void FillReportIRBasic(wm_ir_basic& _ir0, wm_ir_basic& _ir1)
|
||||
// We are playing back a recording, we don't accept any manual input this time
|
||||
else
|
||||
{
|
||||
//Console::Print("X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
//INFO_LOG(CONSOLE, "X, Y, Z: %u %u %u\n", _acc.x, _acc.y, _acc.z);
|
||||
if (RecordingPlayIR(_ir0)) return;
|
||||
}
|
||||
// ---------------------
|
||||
@@ -958,11 +958,11 @@ void FillReportIRBasic(wm_ir_basic& _ir0, wm_ir_basic& _ir1)
|
||||
//ClearScreen();
|
||||
//if(consoleDisplay == 1)
|
||||
|
||||
Console::Print("x1:%03i x2:%03i y1:%03i y2:%03i irx1:%02x y1:%02x x2:%02x y2:%02x | T:%i L:%i R:%i B:%i S:%i\n",
|
||||
INFO_LOG(CONSOLE, "x1:%03i x2:%03i y1:%03i y2:%03i irx1:%02x y1:%02x x2:%02x y2:%02x | T:%i L:%i R:%i B:%i S:%i\n",
|
||||
x1, x2, y1, y2, _ir0.x1, _ir0.y1, _ir1.x2, _ir1.y2, Top, Left, Right, Bottom, SensorBarRadius
|
||||
);
|
||||
Console::Print("\n");
|
||||
Console::Print("ir0.x1:%02x x1h:%02x x2:%02x x2h:%02x | ir0.y1:%02x y1h:%02x y2:%02x y2h:%02x | ir1.x1:%02x x1h:%02x x2:%02x x2h:%02x | ir1.y1:%02x y1h:%02x y2:%02x y2h:%02x\n",
|
||||
INFO_LOG(CONSOLE, "\n");
|
||||
INFO_LOG(CONSOLE, "ir0.x1:%02x x1h:%02x x2:%02x x2h:%02x | ir0.y1:%02x y1h:%02x y2:%02x y2h:%02x | ir1.x1:%02x x1h:%02x x2:%02x x2h:%02x | ir1.y1:%02x y1h:%02x y2:%02x y2h:%02x\n",
|
||||
_ir0.x1, _ir0.x1Hi, _ir0.x2, _ir0.x2Hi,
|
||||
_ir0.y1, _ir0.y1Hi, _ir0.y2, _ir0.y2Hi,
|
||||
_ir1.x1, _ir1.x1Hi, _ir1.x2, _ir1.x2Hi,
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
// Includes
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#include <iostream>
|
||||
#include "ConsoleWindow.h"
|
||||
//////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "wiiuse.h" // Externals
|
||||
|
||||
#include "ConsoleWindow.h" // Common
|
||||
#include "StringUtil.h"
|
||||
#include "Timer.h"
|
||||
#include "pluginspecs_wiimote.h"
|
||||
@@ -49,26 +48,26 @@ int GetReportSize(struct wiimote_t* wm)
|
||||
|
||||
void handle_ctrl_status(struct wiimote_t* wm)
|
||||
{
|
||||
Console::Print("\n\n--- CONTROLLER STATUS [wiimote id %i] ---\n", wm->unid);
|
||||
INFO_LOG(CONSOLE, "\n\n--- CONTROLLER STATUS [wiimote id %i] ---\n", wm->unid);
|
||||
|
||||
Console::Print("attachment: %i\n", wm->exp.type);
|
||||
Console::Print("speaker: %i\n", WIIUSE_USING_SPEAKER(wm));
|
||||
Console::Print("ir: %i\n", WIIUSE_USING_IR(wm));
|
||||
Console::Print("leds: %i %i %i %i\n", WIIUSE_IS_LED_SET(wm, 1), WIIUSE_IS_LED_SET(wm, 2), WIIUSE_IS_LED_SET(wm, 3), WIIUSE_IS_LED_SET(wm, 4));
|
||||
Console::Print("battery: %f %%\n", wm->battery_level);
|
||||
INFO_LOG(CONSOLE, "attachment: %i\n", wm->exp.type);
|
||||
INFO_LOG(CONSOLE, "speaker: %i\n", WIIUSE_USING_SPEAKER(wm));
|
||||
INFO_LOG(CONSOLE, "ir: %i\n", WIIUSE_USING_IR(wm));
|
||||
INFO_LOG(CONSOLE, "leds: %i %i %i %i\n", WIIUSE_IS_LED_SET(wm, 1), WIIUSE_IS_LED_SET(wm, 2), WIIUSE_IS_LED_SET(wm, 3), WIIUSE_IS_LED_SET(wm, 4));
|
||||
INFO_LOG(CONSOLE, "battery: %f %%\n", wm->battery_level);
|
||||
}
|
||||
|
||||
bool IRDataOK(struct wiimote_t* wm)
|
||||
{
|
||||
//Console::Print("IRDataOK: ");
|
||||
//INFO_LOG(CONSOLE, "IRDataOK: ");
|
||||
// The report size is 0x33 = 18, 0x37 = 22 withouth the leading (a1) byte
|
||||
int ReportSize = GetReportSize(wm);
|
||||
for(int i = 0; i < ReportSize; i++)
|
||||
{
|
||||
//Console::Print("%02x ", wm->event_buf[i]);
|
||||
//INFO_LOG(CONSOLE, "%02x ", wm->event_buf[i]);
|
||||
if (wm->event_buf[i] > 0)
|
||||
{
|
||||
//Console::Print("\n");
|
||||
//INFO_LOG(CONSOLE, "\n");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -77,21 +76,21 @@ bool IRDataOK(struct wiimote_t* wm)
|
||||
|
||||
void handle_event(struct wiimote_t* wm)
|
||||
{
|
||||
//Console::Print("\n\n--- EVENT [id %i] ---\n", wm->unid);
|
||||
//INFO_LOG(CONSOLE, "\n\n--- EVENT [id %i] ---\n", wm->unid);
|
||||
|
||||
// if a button is pressed, report it
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_A)) Console::Print("A pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_B)) Console::Print("B pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_UP)) Console::Print("UP pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_DOWN)) Console::Print("DOWN pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_LEFT)) Console::Print("LEFT pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_RIGHT)) Console::Print("RIGHT pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_MINUS)) Console::Print("MINUS pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_PLUS)) Console::Print("PLUS pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_ONE)) Console::Print("ONE pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_A)) INFO_LOG(CONSOLE, "A pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_B)) INFO_LOG(CONSOLE, "B pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_UP)) INFO_LOG(CONSOLE, "UP pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_DOWN)) INFO_LOG(CONSOLE, "DOWN pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_LEFT)) INFO_LOG(CONSOLE, "LEFT pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_RIGHT)) INFO_LOG(CONSOLE, "RIGHT pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_MINUS)) INFO_LOG(CONSOLE, "MINUS pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_PLUS)) INFO_LOG(CONSOLE, "PLUS pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_ONE)) INFO_LOG(CONSOLE, "ONE pressed\n");
|
||||
//if (IS_PRESSED(wm, WIIMOTE_BUTTON_ONE)) g_Run = false;
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_TWO)) Console::Print("TWO pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_HOME)) Console::Print("HOME pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_TWO)) INFO_LOG(CONSOLE, "TWO pressed\n");
|
||||
if (IS_PRESSED(wm, WIIMOTE_BUTTON_HOME)) INFO_LOG(CONSOLE, "HOME pressed\n");
|
||||
|
||||
|
||||
// Pressing minus will tell the wiimote we are no longer interested in movement.
|
||||
@@ -168,7 +167,7 @@ void handle_event(struct wiimote_t* wm)
|
||||
//Tmp += "Data: " + TmpData;
|
||||
|
||||
//Console::ClearScreen();
|
||||
//Console::Print("%s\n\n", Tmp.c_str());
|
||||
//INFO_LOG(CONSOLE, "%s\n\n", Tmp.c_str());
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if(frame)
|
||||
@@ -214,8 +213,8 @@ void handle_event(struct wiimote_t* wm)
|
||||
// wxT("Current: %03u %03u %03u"), Gx, Gy, Gz));
|
||||
|
||||
if(frame->m_bRecording)
|
||||
Console::Print("Wiiuse Recorded accel x, y, z: %03i %03i %03i\n", Gx, Gy, Gz);
|
||||
//Console::Print("Wiiuse Recorded accel x, y, z: %02x %02x %02x\n", Gx, Gy, Gz);
|
||||
INFO_LOG(CONSOLE, "Wiiuse Recorded accel x, y, z: %03i %03i %03i\n", Gx, Gy, Gz);
|
||||
//INFO_LOG(CONSOLE, "Wiiuse Recorded accel x, y, z: %02x %02x %02x\n", Gx, Gy, Gz);
|
||||
}
|
||||
|
||||
// Send the data to be saved
|
||||
@@ -233,8 +232,8 @@ void handle_event(struct wiimote_t* wm)
|
||||
/*
|
||||
if(!g_DebugData)
|
||||
{
|
||||
Console::ClearScreen();
|
||||
Console::Print("Roll:%03i Pitch:%03i\n", (int)wm->orient.roll, (int)wm->orient.pitch);
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE, "Roll:%03i Pitch:%03i\n", (int)wm->orient.roll, (int)wm->orient.pitch);
|
||||
}
|
||||
// Convert Roll and Pitch from 180 to 0x8000
|
||||
int Roll = (int)wm->orient.roll * (0x8000 / 180);
|
||||
@@ -337,7 +336,7 @@ void ReadWiimote()
|
||||
{
|
||||
Temp = ArrayToString(g_WiiMotesFromWiiUse[0]->read_req->buf, sizeof(WiiMoteEmu::EepromData_0), 0, 30);
|
||||
memcpy(WiiMoteEmu::g_Eeprom, g_WiiMotesFromWiiUse[0]->read_req->buf, sizeof(WiiMoteEmu::EepromData_0));
|
||||
Console::Print("EEPROM: %s\n", Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "EEPROM: %s\n", Temp.c_str());
|
||||
WiiMoteEmu::UpdateEeprom();
|
||||
g_RunTemporary = false;
|
||||
}
|
||||
@@ -352,17 +351,17 @@ void ReadWiimote()
|
||||
*/
|
||||
//wiiuse_set_nunchuk_orient_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 90.0f);
|
||||
//wiiuse_set_nunchuk_accel_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 100);
|
||||
Console::Print("Nunchuk inserted.\n");
|
||||
INFO_LOG(CONSOLE, "Nunchuk inserted.\n");
|
||||
break;
|
||||
|
||||
case WIIUSE_CLASSIC_CTRL_INSERTED:
|
||||
Console::Print("Classic controller inserted.\n");
|
||||
INFO_LOG(CONSOLE, "Classic controller inserted.\n");
|
||||
break;
|
||||
|
||||
case WIIUSE_GUITAR_HERO_3_CTRL_INSERTED:
|
||||
// some expansion was inserted
|
||||
//handle_ctrl_status(wiimotes[i]);
|
||||
Console::Print("Guitar Hero 3 controller inserted.\n");
|
||||
INFO_LOG(CONSOLE, "Guitar Hero 3 controller inserted.\n");
|
||||
break;
|
||||
|
||||
case WIIUSE_NUNCHUK_REMOVED:
|
||||
@@ -370,7 +369,7 @@ void ReadWiimote()
|
||||
case WIIUSE_GUITAR_HERO_3_CTRL_REMOVED:
|
||||
// some expansion was removed
|
||||
//handle_ctrl_status(wiimotes[i]);
|
||||
Console::Print("An expansion was removed.\n");
|
||||
INFO_LOG(CONSOLE, "An expansion was removed.\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -37,7 +37,6 @@ worked.
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#include "Common.h" // Common
|
||||
#include "StringUtil.h"
|
||||
#include "ConsoleWindow.h" // For Start, Print, GetHwnd
|
||||
#include "Timer.h"
|
||||
|
||||
#define EXCLUDEMAIN_H // Avoid certain declarations in main.h
|
||||
@@ -61,6 +60,7 @@ worked.
|
||||
// Declarations and definitions
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
SWiimoteInitialize g_WiimoteInitialize;
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
// General
|
||||
bool g_EmulatorRunning = false;
|
||||
@@ -170,7 +170,11 @@ extern "C" void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {}
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
void DllDebugger(HWND _hParent, bool Show) {}
|
||||
|
||||
@@ -229,7 +233,7 @@ extern "C" void Initialize(void *init)
|
||||
|
||||
DoInitialize();
|
||||
|
||||
Console::Print("ISOId: %08x %s\n", g_WiimoteInitialize.ISOId, Hex2Ascii(g_WiimoteInitialize.ISOId).c_str());
|
||||
INFO_LOG(CONSOLE, "ISOId: %08x %s\n", g_WiimoteInitialize.ISOId, Hex2Ascii(g_WiimoteInitialize.ISOId).c_str());
|
||||
}
|
||||
|
||||
// If a game is not running this is called by the Configuration window when it's closed
|
||||
@@ -261,7 +265,7 @@ extern "C" void Shutdown(void)
|
||||
#endif
|
||||
WiiMoteEmu::Shutdown();
|
||||
|
||||
Console::Close();
|
||||
// Console::Close();
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +323,7 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
|
||||
// Check for custom communication
|
||||
if(_channelID == 99 && data[0] == WIIMOTE_RECONNECT)
|
||||
{
|
||||
Console::Print("\n\nWiimote Disconnected\n\n");
|
||||
INFO_LOG(CONSOLE, "\n\nWiimote Disconnected\n\n");
|
||||
g_EmulatorRunning = false;
|
||||
g_WiimoteUnexpectedDisconnect = true;
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
@@ -380,10 +384,6 @@ extern "C" void Wiimote_Update()
|
||||
|
||||
// Debugging
|
||||
#ifdef _WIN32
|
||||
// Open console
|
||||
if( GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_INSERT) )
|
||||
OpenConsole();
|
||||
|
||||
if( GetAsyncKeyState(VK_HOME) && g_DebugComm ) g_DebugComm = false; // Page Down
|
||||
else if (GetAsyncKeyState(VK_HOME) && !g_DebugComm ) g_DebugComm = true;
|
||||
|
||||
@@ -393,8 +393,8 @@ extern "C" void Wiimote_Update()
|
||||
if( GetAsyncKeyState(VK_NEXT) && g_DebugAccelerometer ) g_DebugAccelerometer = false; // Home
|
||||
else if (GetAsyncKeyState(VK_NEXT) && !g_DebugAccelerometer ) g_DebugAccelerometer = true;
|
||||
|
||||
if( GetAsyncKeyState(VK_END) && g_DebugCustom ) { g_DebugCustom = false; Console::Print("Custom Debug: Off\n");} // End
|
||||
else if (GetAsyncKeyState(VK_END) && !g_DebugCustom ) {g_DebugCustom = true; Console::Print("Custom Debug: Off\n");}
|
||||
if( GetAsyncKeyState(VK_END) && g_DebugCustom ) { g_DebugCustom = false; INFO_LOG(CONSOLE, "Custom Debug: Off\n");} // End
|
||||
else if (GetAsyncKeyState(VK_END) && !g_DebugCustom ) {g_DebugCustom = true; INFO_LOG(CONSOLE, "Custom Debug: Off\n");}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -417,16 +417,17 @@ extern "C" unsigned int Wiimote_GetAttachedControllers()
|
||||
// ----------------------------------------
|
||||
// Debugging window
|
||||
// ----------
|
||||
/*
|
||||
void OpenConsole(bool Open)
|
||||
{
|
||||
// Close the console window
|
||||
#ifdef _WIN32
|
||||
if (Console::GetHwnd() != NULL && !Open)
|
||||
// if (Console::GetHwnd() != NULL && !Open)
|
||||
#else
|
||||
if (false)
|
||||
#endif
|
||||
{
|
||||
Console::Close();
|
||||
// Console::Close();
|
||||
// Wait here until we have let go of the button again
|
||||
#ifdef _WIN32
|
||||
while(GetAsyncKeyState(VK_INSERT)) {Sleep(10);}
|
||||
@@ -435,16 +436,16 @@ void OpenConsole(bool Open)
|
||||
}
|
||||
|
||||
// Open the console window
|
||||
Console::Open(140, 1000, "Wiimote"); // give room for 20 rows
|
||||
Console::Print("\n\nWiimote console opened\n");
|
||||
// Console::Open(140, 1000, "Wiimote"); // give room for 20 rows
|
||||
INFO_LOG(CONSOLE, "\n\nWiimote console opened\n");
|
||||
|
||||
// Move window
|
||||
#ifdef _WIN32
|
||||
//MoveWindow(Console::GetHwnd(), 0,400, 100*8,10*14, true); // small window
|
||||
//MoveWindow(Console::GetHwnd(), 400,0, 100*8,70*14, true); // big window
|
||||
MoveWindow(Console::GetHwnd(), 200,0, 140*8,70*14, true); // big wide window
|
||||
// MoveWindow(Console::GetHwnd(), 200,0, 140*8,70*14, true); // big wide window
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
// ---------------
|
||||
|
||||
// ----------------------------------------
|
||||
@@ -500,7 +501,7 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
Name = "WM_STATUS_REPORT";
|
||||
{
|
||||
wm_status_report* pStatus = (wm_status_report*)(data + 2);
|
||||
Console::Print("\n"
|
||||
INFO_LOG(CONSOLE, "\n"
|
||||
"Extension Controller: %i\n"
|
||||
//"Speaker enabled: %i\n"
|
||||
//"IR camera enabled: %i\n"
|
||||
@@ -566,8 +567,8 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (frame) frame->UpdateGUI();
|
||||
#endif
|
||||
Console::Print("%s", TmpData.c_str());
|
||||
Console::Print("Game got the decrypted extension ID: %02x%02x\n\n", data[7], data[8]);
|
||||
INFO_LOG(CONSOLE, "%s", TmpData.c_str());
|
||||
INFO_LOG(CONSOLE, "Game got the decrypted extension ID: %02x%02x\n\n", data[7], data[8]);
|
||||
}
|
||||
else if(data[4] == 0x50)
|
||||
{
|
||||
@@ -579,8 +580,8 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (frame) frame->UpdateGUI();
|
||||
#endif
|
||||
Console::Print("%s", TmpData.c_str());
|
||||
Console::Print("Game got the decrypted extension ID: %02x%02x%02x%02x%02x%02x\n\n", data[7], data[8], data[9], data[10], data[11], data[12]);
|
||||
INFO_LOG(CONSOLE, "%s", TmpData.c_str());
|
||||
INFO_LOG(CONSOLE, "Game got the decrypted extension ID: %02x%02x%02x%02x%02x%02x\n\n", data[7], data[8], data[9], data[10], data[11], data[12]);
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------
|
||||
@@ -594,13 +595,13 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
{
|
||||
if(data[6] == 0x10)
|
||||
{
|
||||
Console::Print("\nGame got the Wiimote calibration:\n");
|
||||
Console::Print("Cal_zero.x: %i\n", data[7 + 6]);
|
||||
Console::Print("Cal_zero.y: %i\n", data[7 + 7]);
|
||||
Console::Print("Cal_zero.z: %i\n", data[7 + 8]);
|
||||
Console::Print("Cal_g.x: %i\n", data[7 + 10]);
|
||||
Console::Print("Cal_g.y: %i\n", data[7 + 11]);
|
||||
Console::Print("Cal_g.z: %i\n", data[7 +12]);
|
||||
INFO_LOG(CONSOLE, "\nGame got the Wiimote calibration:\n");
|
||||
INFO_LOG(CONSOLE, "Cal_zero.x: %i\n", data[7 + 6]);
|
||||
INFO_LOG(CONSOLE, "Cal_zero.y: %i\n", data[7 + 7]);
|
||||
INFO_LOG(CONSOLE, "Cal_zero.z: %i\n", data[7 + 8]);
|
||||
INFO_LOG(CONSOLE, "Cal_g.x: %i\n", data[7 + 10]);
|
||||
INFO_LOG(CONSOLE, "Cal_g.y: %i\n", data[7 + 11]);
|
||||
INFO_LOG(CONSOLE, "Cal_g.z: %i\n", data[7 +12]);
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------
|
||||
@@ -619,37 +620,37 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
|
||||
if (g_Config.bNunchuckConnected)
|
||||
{
|
||||
Console::Print("\nGame got the Nunchuck calibration:\n");
|
||||
Console::Print("Cal_zero.x: %i\n", data[7 + 0]);
|
||||
Console::Print("Cal_zero.y: %i\n", data[7 + 1]);
|
||||
Console::Print("Cal_zero.z: %i\n", data[7 + 2]);
|
||||
Console::Print("Cal_g.x: %i\n", data[7 + 4]);
|
||||
Console::Print("Cal_g.y: %i\n", data[7 + 5]);
|
||||
Console::Print("Cal_g.z: %i\n", data[7 + 6]);
|
||||
Console::Print("Js.Max.x: %i\n", data[7 + 8]);
|
||||
Console::Print("Js.Min.x: %i\n", data[7 + 9]);
|
||||
Console::Print("Js.Center.x: %i\n", data[7 + 10]);
|
||||
Console::Print("Js.Max.y: %i\n", data[7 + 11]);
|
||||
Console::Print("Js.Min.y: %i\n", data[7 + 12]);
|
||||
Console::Print("JS.Center.y: %i\n\n", data[7 + 13]);
|
||||
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
|
||||
{
|
||||
Console::Print("\nGame got the Classic Controller calibration:\n");
|
||||
Console::Print("Lx.Max: %i\n", data[7 + 0]);
|
||||
Console::Print("Lx.Min: %i\n", data[7 + 1]);
|
||||
Console::Print("Lx.Center: %i\n", data[7 + 2]);
|
||||
Console::Print("Ly.Max: %i\n", data[7 + 3]);
|
||||
Console::Print("Ly.Min: %i\n", data[7 + 4]);
|
||||
Console::Print("Ly.Center: %i\n", data[7 + 5]);
|
||||
Console::Print("Rx.Max.x: %i\n", data[7 + 6]);
|
||||
Console::Print("Rx.Min.x: %i\n", data[7 + 7]);
|
||||
Console::Print("Rx.Center.x: %i\n", data[7 + 8]);
|
||||
Console::Print("Ry.Max.y: %i\n", data[7 + 9]);
|
||||
Console::Print("Ry.Min: %i\n", data[7 + 10]);
|
||||
Console::Print("Ry.Center: %i\n\n", data[7 + 11]);
|
||||
Console::Print("Lt.Neutral: %i\n", data[7 + 12]);
|
||||
Console::Print("Rt.Neutral %i\n\n", data[7 + 13]);
|
||||
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 the values if they come from the real Wiimote
|
||||
@@ -677,7 +678,7 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
}
|
||||
|
||||
// Show the encrypted data
|
||||
Console::Print("%s", TmpData.c_str());
|
||||
INFO_LOG(CONSOLE, "%s", TmpData.c_str());
|
||||
}
|
||||
// ---------------------------------------------
|
||||
|
||||
@@ -720,7 +721,7 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
break;
|
||||
default:
|
||||
//PanicAlert("%s ReadDebugging: Unknown channel 0x%02x", (Emu ? "Emu" : "Real"), data[1]);
|
||||
Console::Print("%s ReadDebugging: Unknown channel 0x%02x", (Emu ? "Emu" : "Real"), data[1]);
|
||||
INFO_LOG(CONSOLE, "%s ReadDebugging: Unknown channel 0x%02x", (Emu ? "Emu" : "Real"), data[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -728,8 +729,8 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
{
|
||||
std::string TmpData = ArrayToString(data, size + 2, 0, 30);
|
||||
//LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||
Console::Print("Read[%s] %s: %s\n", (Emu ? "Emu" : "Real"), Name.c_str(), TmpData.c_str()); // No timestamp
|
||||
//Console::Print(" (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
INFO_LOG(CONSOLE, "Read[%s] %s: %s\n", (Emu ? "Emu" : "Real"), Name.c_str(), TmpData.c_str()); // No timestamp
|
||||
//INFO_LOG(CONSOLE, " (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
}
|
||||
|
||||
if (DataReport && g_DebugData)
|
||||
@@ -801,7 +802,7 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
// ---------------------------------------------
|
||||
// Test the angles to x, y, z values formula by calculating the values back and forth
|
||||
// -----------
|
||||
/*Console::ClearScreen();
|
||||
/* //Console::ClearScreen();
|
||||
// Show a test of our calculations
|
||||
WiiMoteEmu::TiltTest(data[4], data[5], data[6]);
|
||||
u8 x, y, z;
|
||||
@@ -840,24 +841,24 @@ void ReadDebugging(bool Emu, const void* _pData, int Size)
|
||||
// -------------------------
|
||||
|
||||
// Classic Controller data
|
||||
Console::Print("Read[%s]: %s | %s | %s | %s | %s\n", (Emu ? "Emu" : "Real"),
|
||||
INFO_LOG(CONSOLE, "Read[%s]: %s | %s | %s | %s | %s\n", (Emu ? "Emu" : "Real"),
|
||||
TmpCore.c_str(), TmpAccel.c_str(), TmpIR.c_str(), TmpExt.c_str(), CCData.c_str());
|
||||
// Formatted data only
|
||||
//Console::Print("Read[%s]: 0x%02x | %s | %s | %s\n", (Emu ? "Emu" : "Real"), data[1], RollPitch.c_str(), GForce.c_str(), IRData.c_str());
|
||||
//INFO_LOG(CONSOLE, "Read[%s]: 0x%02x | %s | %s | %s\n", (Emu ? "Emu" : "Real"), data[1], RollPitch.c_str(), GForce.c_str(), IRData.c_str());
|
||||
// IR data
|
||||
//Console::Print("Read[%s]: %s | %s\n", (Emu ? "Emu" : "Real"), TmpData.c_str(), IRData.c_str());
|
||||
//INFO_LOG(CONSOLE, "Read[%s]: %s | %s\n", (Emu ? "Emu" : "Real"), TmpData.c_str(), IRData.c_str());
|
||||
// Accelerometer data
|
||||
//Console::Print("Read[%s]: %s | %s | %s | %s | %s | %s | %s\n", (Emu ? "Emu" : "Real"),
|
||||
//INFO_LOG(CONSOLE, "Read[%s]: %s | %s | %s | %s | %s | %s | %s\n", (Emu ? "Emu" : "Real"),
|
||||
// TmpCore.c_str(), TmpAccel.c_str(), TmpIR.c_str(), TmpExt.c_str(), RollPitch.c_str(), GForce.c_str(), CCData.c_str());
|
||||
// Timestamp
|
||||
//Console::Print(" (%s): %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
//INFO_LOG(CONSOLE, " (%s): %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
|
||||
}
|
||||
if(g_DebugAccelerometer)
|
||||
{
|
||||
// Accelerometer only
|
||||
Console::ClearScreen();
|
||||
Console::Print("Accel x, y, z: %03u %03u %03u\n", data[4], data[5], data[6]);
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE, "Accel x, y, z: %03u %03u %03u\n", data[4], data[5], data[6]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,18 +917,18 @@ void InterruptDebugging(bool Emu, const void* _pData)
|
||||
Name.append(" REG_SPEAKER");
|
||||
if(data[6] == 7)
|
||||
{
|
||||
Console::Print("\nSound configuration:\n");
|
||||
INFO_LOG(CONSOLE, "\nSound configuration:\n");
|
||||
if(data[8] == 0x00)
|
||||
{
|
||||
memcpy(&SampleValue, &data[9], 2);
|
||||
Console::Print(" Data format: 4-bit ADPCM (%i Hz)\n", 6000000 / SampleValue);
|
||||
Console::Print(" Volume: %02i%%\n\n", (data[11] / 0x40) * 100);
|
||||
INFO_LOG(CONSOLE, " Data format: 4-bit ADPCM (%i Hz)\n", 6000000 / SampleValue);
|
||||
INFO_LOG(CONSOLE, " Volume: %02i%%\n\n", (data[11] / 0x40) * 100);
|
||||
}
|
||||
else if (data[8] == 0x40)
|
||||
{
|
||||
memcpy(&SampleValue, &data[9], 2);
|
||||
Console::Print(" Data format: 8-bit PCM (%i Hz)\n", 12000000 / SampleValue);
|
||||
Console::Print(" Volume: %02i%%\n\n", (data[11] / 0xff) * 100);
|
||||
INFO_LOG(CONSOLE, " Data format: 8-bit PCM (%i Hz)\n", 12000000 / SampleValue);
|
||||
INFO_LOG(CONSOLE, " Volume: %02i%%\n\n", (data[11] / 0xff) * 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -941,7 +942,7 @@ void InterruptDebugging(bool Emu, const void* _pData)
|
||||
WiiMoteEmu::g_Encryption = true;
|
||||
else if (data[7] == 0x55)
|
||||
WiiMoteEmu::g_Encryption = false;
|
||||
Console::Print("\nExtension enryption turned %s\n\n", WiiMoteEmu::g_Encryption ? "On" : "Off");
|
||||
INFO_LOG(CONSOLE, "\nExtension enryption turned %s\n\n", WiiMoteEmu::g_Encryption ? "On" : "Off");
|
||||
}
|
||||
break;
|
||||
case 0xb0:
|
||||
@@ -985,10 +986,11 @@ void InterruptDebugging(bool Emu, const void* _pData)
|
||||
case WM_SPEAKER_MUTE: // 0x19
|
||||
if (g_DebugComm) Name.append("WM_SPEAKER");
|
||||
size = 1;
|
||||
if(data[1] == 0x14)
|
||||
Console::Print("\nSpeaker %s\n\n", (data[2] == 0x06) ? "On" : "Off");
|
||||
else if(data[1] == 0x19)
|
||||
Console::Print("\nSpeaker %s\n\n", (data[2] == 0x06) ? "Muted" : "Unmuted");
|
||||
if(data[1] == 0x14) {
|
||||
INFO_LOG(CONSOLE, "\nSpeaker %s\n\n", (data[2] == 0x06) ? "On" : "Off");
|
||||
} else if(data[1] == 0x19) {
|
||||
INFO_LOG(CONSOLE, "\nSpeaker %s\n\n", (data[2] == 0x06) ? "Muted" : "Unmuted");
|
||||
}
|
||||
break;
|
||||
case WM_WRITE_SPEAKER_DATA: // 0x18
|
||||
if (g_DebugComm) Name.append("WM_SPEAKER_DATA");
|
||||
@@ -997,22 +999,22 @@ void InterruptDebugging(bool Emu, const void* _pData)
|
||||
|
||||
default:
|
||||
size = 15;
|
||||
Console::Print("%s InterruptDebugging: Unknown channel 0x%02x", (Emu ? "Emu" : "Real"), data[1]);
|
||||
INFO_LOG(CONSOLE, "%s InterruptDebugging: Unknown channel 0x%02x", (Emu ? "Emu" : "Real"), data[1]);
|
||||
break;
|
||||
}
|
||||
if (g_DebugComm && !SoundData)
|
||||
{
|
||||
std::string Temp = ArrayToString(data, size + 2, 0, 30);
|
||||
//LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||
Console::Print("%s: %s\n", Name.c_str(), Temp.c_str()); // No timestamp
|
||||
//Console::Print(" (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
INFO_LOG(CONSOLE, "%s: %s\n", Name.c_str(), Temp.c_str()); // No timestamp
|
||||
//INFO_LOG(CONSOLE, " (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
}
|
||||
if (g_DebugSoundData && SoundData)
|
||||
{
|
||||
std::string Temp = ArrayToString(data, size + 2, 0, 30);
|
||||
//LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||
Console::Print("%s: %s\n", Name.c_str(), Temp.c_str()); // No timestamp
|
||||
//Console::Print(" (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
INFO_LOG(CONSOLE, "%s: %s\n", Name.c_str(), Temp.c_str()); // No timestamp
|
||||
//INFO_LOG(CONSOLE, " (%s): %s\n", Tm(true).c_str(), Temp.c_str()); // Timestamp
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1058,7 +1060,7 @@ int GetUpdateRate()
|
||||
// Calculate the time and save it
|
||||
int Time = (int)(10 / (GetDoubleTime() - g_UpdateTime));
|
||||
g_UpdateTimeList.push_back(Time);
|
||||
//Console::Print("Time: %i %f\n", Time, GetDoubleTime());
|
||||
//INFO_LOG(CONSOLE, "Time: %i %f\n", Time, GetDoubleTime());
|
||||
|
||||
int TotalTime = 0;
|
||||
for (int i = 0; i < (int)g_UpdateTimeList.size(); i++)
|
||||
@@ -1099,31 +1101,3 @@ void DoInitialize()
|
||||
}
|
||||
|
||||
|
||||
//******************************************************************************
|
||||
// Logging functions
|
||||
//******************************************************************************
|
||||
|
||||
void __Log(int log, const char *_fmt, ...)
|
||||
{
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsprintf( Msg, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
g_WiimoteInitialize.pLog(Msg, 0);
|
||||
}
|
||||
|
||||
|
||||
void __Logv(int log, int v, const char *_fmt, ...)
|
||||
{
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsprintf( Msg, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
g_WiimoteInitialize.pLog(Msg, v);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ int GetUpdateRate();
|
||||
void InterruptDebugging(bool Emu, const void* _pData);
|
||||
void ReadDebugging(bool Emu, const void* _pData, int Size);
|
||||
bool IsFocus();
|
||||
void OpenConsole(bool Open = false);
|
||||
|
||||
|
||||
// Movement recording
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "Common.h"
|
||||
#include "Thread.h"
|
||||
#include "StringUtil.h"
|
||||
#include "ConsoleWindow.h"
|
||||
#include "Timer.h"
|
||||
#include "pluginspecs_wiimote.h"
|
||||
|
||||
@@ -129,7 +128,7 @@ void SendData(u16 _channelID, const u8* _pData, u32 _Size)
|
||||
|
||||
// Debugging
|
||||
//std::string Temp = ArrayToString(WriteEvent.m_PayLoad, 28, 0, 30);
|
||||
//Console::Print("Wiimote Write:\n%s\n", Temp.c_str());
|
||||
//INFO_LOG(CONSOLE, "Wiimote Write:\n%s\n", Temp.c_str());
|
||||
}
|
||||
m_pCriticalSection->Leave();
|
||||
}
|
||||
@@ -146,7 +145,7 @@ void ReadData()
|
||||
// Send data to the Wiimote
|
||||
if (!m_EventWriteQueue.empty())
|
||||
{
|
||||
//Console::Print("Writing data to the Wiimote\n");
|
||||
//INFO_LOG(CONSOLE, "Writing data to the Wiimote\n");
|
||||
SEvent& rEvent = m_EventWriteQueue.front();
|
||||
wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad, MAX_PAYLOAD);
|
||||
m_EventWriteQueue.pop();
|
||||
@@ -194,7 +193,7 @@ void ReadData()
|
||||
//if(GetAsyncKeyState('V'))
|
||||
{
|
||||
std::string Temp = ArrayToString(pBuffer, 20, 0, 30);
|
||||
Console::Print("Data: %s\n", Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "Data: %s\n", Temp.c_str());
|
||||
} */
|
||||
#endif
|
||||
}
|
||||
@@ -309,7 +308,7 @@ void SendAcc(u8 _ReportID)
|
||||
wiiuse_io_write(WiiMoteReal::g_WiiMotesFromWiiUse[0], (byte*)DataAcc, MAX_PAYLOAD);
|
||||
|
||||
std::string Temp = ArrayToString(DataAcc, 28, 0, 30);
|
||||
Console::Print("SendAcc: %s\n", Temp.c_str());
|
||||
INFO_LOG(CONSOLE, "SendAcc: %s\n", Temp.c_str());
|
||||
|
||||
//22 00 00 _reportID 00
|
||||
}
|
||||
@@ -348,7 +347,7 @@ int Initialize()
|
||||
g_WiiMotesFromWiiUse = wiiuse_init(MAX_WIIMOTES);
|
||||
g_NumberOfWiiMotes = wiiuse_find(g_WiiMotesFromWiiUse, MAX_WIIMOTES, 5);
|
||||
if (g_NumberOfWiiMotes > 0) g_RealWiiMotePresent = true;
|
||||
Console::Print("Found No of Wiimotes: %i\n", g_NumberOfWiiMotes);
|
||||
INFO_LOG(CONSOLE, "Found No of Wiimotes: %i\n", g_NumberOfWiiMotes);
|
||||
|
||||
// Remove the wiiuse_poll() threshold
|
||||
wiiuse_set_accel_threshold(g_WiiMotesFromWiiUse[0], 0);
|
||||
@@ -362,7 +361,7 @@ int Initialize()
|
||||
// I don't seem to need wiiuse_connect() in Windows. But Linux needs it.
|
||||
#ifndef _WIN32
|
||||
int Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
|
||||
Console::Print("Connected: %i\n", Connect);
|
||||
INFO_LOG(CONSOLE, "Connected: %i\n", Connect);
|
||||
#endif
|
||||
|
||||
// If we are connecting from the config window without a game running we flash the lights
|
||||
@@ -431,13 +430,13 @@ void Shutdown(void)
|
||||
|
||||
void InterruptChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Real InterruptChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Real InterruptChannel\n");
|
||||
g_WiiMotes[0]->SendData(_channelID, (const u8*)_pData, _Size);
|
||||
}
|
||||
|
||||
void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
//Console::Print("Real ControlChannel\n");
|
||||
//INFO_LOG(CONSOLE, "Real ControlChannel\n");
|
||||
g_WiiMotes[0]->SendData(_channelID, (const u8*)_pData, _Size);
|
||||
}
|
||||
|
||||
@@ -447,7 +446,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||
// ---------------
|
||||
void Update()
|
||||
{
|
||||
//Console::Print("Real Update\n");
|
||||
//INFO_LOG(CONSOLE, "Real Update\n");
|
||||
for (int i = 0; i < g_NumberOfWiiMotes; i++)
|
||||
{
|
||||
g_WiiMotes[i]->Update();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Plugin_nJoy_SDL"
|
||||
ProjectGUID="{521498BE-6089-4780-8223-E67C22F4E068}"
|
||||
RootNamespace="Plugin_nJoy_SDL"
|
||||
@@ -65,7 +65,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib Rpcrt4.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib rpcrt4.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName)D.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -144,7 +144,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib Rpcrt4.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib rpcrt4.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName)D.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
@@ -221,7 +221,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -300,7 +300,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
@@ -379,7 +379,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib Rpcrt4.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib rpcrt4.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName)DF.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -458,7 +458,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib Rpcrt4.lib xinput.lib"
|
||||
AdditionalDependencies="SDL.lib comctl32.lib rpcrt4.lib xinput.lib winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName)DF.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
|
||||
@@ -180,7 +180,7 @@ void Config::Save(int Slot)
|
||||
//if(m_frame) m_frame->LogMsg("Saved: %s %i\n", SectionName.c_str(), PadMapping[i].triggertype);
|
||||
}
|
||||
|
||||
Console::Print("%i: Save: %i\n", 0, PadMapping[0].halfpress);
|
||||
INFO_LOG(CONSOLE, "%i: Save: %i\n", 0, PadMapping[0].halfpress);
|
||||
|
||||
file.Save(FULL_CONFIG_DIR "nJoy.ini");
|
||||
}
|
||||
@@ -272,6 +272,6 @@ void Config::Load(bool ChangePad, bool ChangeSaveByID)
|
||||
//if(m_frame) m_frame->LogMsg("%i: Enabled: %i\n", i, PadMapping[i].buttons[CTL_X_BUTTON]);
|
||||
}
|
||||
|
||||
Console::Print("%i: Load: %i\n", 0, PadMapping[0].halfpress);
|
||||
INFO_LOG(CONSOLE, "%i: Load: %i\n", 0, PadMapping[0].halfpress);
|
||||
}
|
||||
|
||||
|
||||
@@ -605,7 +605,7 @@ void ConfigBox::OnPaint( wxPaintEvent &event )
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void ConfigBox::CreateGUIControls()
|
||||
{
|
||||
Console::Print("CreateGUIControls()\n");
|
||||
INFO_LOG(CONSOLE, "CreateGUIControls()\n");
|
||||
|
||||
#ifndef _DEBUG
|
||||
SetTitle(wxT("Configure: nJoy v"INPUT_VERSION" Input Plugin"));
|
||||
|
||||
@@ -279,7 +279,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
int Axes = SDL_JoystickNumAxes(joy);
|
||||
int Hats = SDL_JoystickNumHats(joy);
|
||||
|
||||
Console::Print("PadID: %i Axes: %i\n", PadID, joyinfo[PadID].NumAxes, joyinfo[PadID].joy);
|
||||
INFO_LOG(CONSOLE, "PadID: %i Axes: %i\n", PadID, joyinfo[PadID].NumAxes, joyinfo[PadID].joy);
|
||||
|
||||
// Get the controller and trigger type
|
||||
int ControllerType = PadMapping[Controller].controllertype;
|
||||
@@ -316,7 +316,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
bool Stop = false; // Stop the timer
|
||||
// =======================
|
||||
|
||||
//Console::Print("Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
//INFO_LOG(CONSOLE, "Before (%i) Id:%i %i IsRunning:%i\n",
|
||||
// GetButtonWaitingTimer, GetButtonWaitingID, GetId, m_ButtonMappingTimer->IsRunning());
|
||||
|
||||
// If the Id has changed or the timer is not running we should start one
|
||||
@@ -426,7 +426,7 @@ void ConfigBox::DoGetButtons(int GetId)
|
||||
|
||||
// Debugging
|
||||
/*
|
||||
Console::Print("Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
INFO_LOG(CONSOLE, "Change: %i %i %i %i '%s' '%s' '%s' '%s'\n",
|
||||
PadMapping[0].halfpress, PadMapping[1].halfpress, PadMapping[2].halfpress, PadMapping[3].halfpress,
|
||||
m_JoyButtonHalfpress[0]->GetValue().c_str(), m_JoyButtonHalfpress[1]->GetValue().c_str(), m_JoyButtonHalfpress[2]->GetValue().c_str(), m_JoyButtonHalfpress[3]->GetValue().c_str()
|
||||
);*/
|
||||
|
||||
@@ -93,10 +93,7 @@ int NumPads = 0, NumGoodPads = 0, LastPad = 0;
|
||||
HWND m_hWnd = NULL, m_hConsole = NULL; // Handle to window
|
||||
#endif
|
||||
SPADInitialize *g_PADInitialize = NULL;
|
||||
|
||||
// TODO: fix this dirty hack to stop missing symbols
|
||||
void __Log(int log, const char *format, ...) {}
|
||||
void __Logv(int log, int v, const char *format, ...) {}
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
// Rumble
|
||||
#ifdef _WIN32
|
||||
@@ -182,17 +179,22 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {}
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
|
||||
// Call config dialog
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
// Debugging
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
Console::Open(100);
|
||||
m_hConsole = Console::GetHwnd();
|
||||
#endif
|
||||
// #ifdef SHOW_PAD_STATUS
|
||||
// Console::Open(100);
|
||||
// m_hConsole = Console::GetHwnd();
|
||||
// #endif
|
||||
|
||||
#ifdef _WIN32
|
||||
// Start the pads so we can use them in the configuration and advanced controls
|
||||
@@ -240,11 +242,11 @@ void DllDebugger(HWND _hParent, bool Show) {}
|
||||
void Initialize(void *init)
|
||||
{
|
||||
// Debugging
|
||||
#ifdef SHOW_PAD_STATUS
|
||||
Console::Open(110);
|
||||
m_hConsole = Console::GetHwnd();
|
||||
#endif
|
||||
Console::Print("Initialize: %i\n", SDL_WasInit(0));
|
||||
// #ifdef SHOW_PAD_STATUS
|
||||
// Console::Open(110);
|
||||
// m_hConsole = Console::GetHwnd();
|
||||
// #endif
|
||||
INFO_LOG(CONSOLE, "Initialize: %i\n", SDL_WasInit(0));
|
||||
g_PADInitialize = (SPADInitialize*)init;
|
||||
g_EmulatorRunning = true;
|
||||
|
||||
@@ -277,7 +279,7 @@ void Initialize(void *init)
|
||||
Called from: The Dolphin Core, ConfigBox::OnClose() */
|
||||
void Shutdown()
|
||||
{
|
||||
Console::Print("Shutdown: %i\n", SDL_WasInit(0));
|
||||
INFO_LOG(CONSOLE, "Shutdown: %i\n", SDL_WasInit(0));
|
||||
|
||||
// -------------------------------------------
|
||||
// Play back input instead of accepting any user input
|
||||
@@ -358,7 +360,7 @@ void PAD_Input(u16 _Key, u8 _UpDown)
|
||||
}
|
||||
|
||||
// Debugging
|
||||
//Console::Print("%i", _Key);
|
||||
//INFO_LOG(CONSOLE, "%i", _Key);
|
||||
}
|
||||
|
||||
|
||||
@@ -385,7 +387,7 @@ unsigned int PAD_GetAttachedPads()
|
||||
if (PadMapping[2].enabled) connected |= 4;
|
||||
if (PadMapping[3].enabled) connected |= 8;
|
||||
|
||||
//Console::Print("PAD_GetAttachedPads: %i %i %i %i\n", PadMapping[0].enabled, PadMapping[1].enabled, PadMapping[2].enabled, PadMapping[3].enabled);
|
||||
//INFO_LOG(CONSOLE, "PAD_GetAttachedPads: %i %i %i %i\n", PadMapping[0].enabled, PadMapping[1].enabled, PadMapping[2].enabled, PadMapping[3].enabled);
|
||||
|
||||
return connected;
|
||||
}
|
||||
@@ -397,7 +399,7 @@ unsigned int PAD_GetAttachedPads()
|
||||
// Function: Gives the current pad status to the Core
|
||||
void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||
{
|
||||
//Console::Print("PAD_GetStatus(): %i %i %i\n", _numPAD, PadMapping[_numPAD].enabled, PadState[_numPAD].joy);
|
||||
//INFO_LOG(CONSOLE, "PAD_GetStatus(): %i %i %i\n", _numPAD, PadMapping[_numPAD].enabled, PadState[_numPAD].joy);
|
||||
|
||||
/* Check if the pad is enabled and avaliable, currently we don't disable pads just because they are
|
||||
disconnected */
|
||||
@@ -561,10 +563,10 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||
// Debugging
|
||||
/*
|
||||
// Show the status of all connected pads
|
||||
if ((LastPad == 0 && _numPAD == 0) || _numPAD < LastPad) Console::ClearScreen();
|
||||
// if ((LastPad == 0 && _numPAD == 0) || _numPAD < LastPad) Console::ClearScreen();
|
||||
LastPad = _numPAD;
|
||||
Console::ClearScreen();
|
||||
Console::Print(
|
||||
// Console::ClearScreen();
|
||||
INFO_LOG(CONSOLE,
|
||||
"Pad | Number:%i Enabled:%i Handle:%i\n"
|
||||
"Trigger | StatusL:%04x StatusR:%04x TriggerL:%04x TriggerR:%04x TriggerValue:%i\n"
|
||||
"Buttons | Overall:%i A:%i X:%i\n"
|
||||
@@ -641,7 +643,7 @@ bool ReloadDLL()
|
||||
// Close SDL
|
||||
if (SDL_WasInit(0)) SDL_Quit();
|
||||
// Log message
|
||||
Console::Print("Error: %s\n", StrError.c_str());
|
||||
INFO_LOG(CONSOLE, "Error: %s\n", StrError.c_str());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,6 @@
|
||||
#include "Setup.h"
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "IniFile.h"
|
||||
#include "ConsoleWindow.h"
|
||||
//#include "Timer.h"
|
||||
|
||||
#include "Config.h" // Local
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="rpcrt4.lib"
|
||||
AdditionalDependencies="winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName)D.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -147,7 +147,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Rpcrt4.lib"
|
||||
AdditionalDependencies="winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName)D.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
@@ -225,6 +225,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -305,7 +306,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="rpcrt4.lib"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName).dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
@@ -385,7 +386,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="rpcrt4.lib"
|
||||
AdditionalDependencies="winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\Win32\Plugins\$(ProjectName)DF.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\win32"
|
||||
@@ -466,7 +467,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Rpcrt4.lib"
|
||||
AdditionalDependencies="winmm.lib rpcrt4.lib"
|
||||
OutputFile="..\..\..\Binary\x64\Plugins\$(ProjectName)DF.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\Externals\SDL\x64"
|
||||
|
||||
@@ -41,9 +41,7 @@ CONTROLLER_STATE joystate[4];
|
||||
CONTROLLER_MAPPING joysticks[4];
|
||||
bool emulator_running = FALSE;
|
||||
|
||||
// TODO: fix this dirty hack to stop missing symbols
|
||||
void __Log(int log, const char *format, ...) {}
|
||||
void __Logv(int log, int v, const char *format, ...) {}
|
||||
PLUGIN_GLOBALS* globals = NULL;
|
||||
|
||||
// Handle to window
|
||||
HWND m_hWnd;
|
||||
@@ -158,9 +156,13 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
|
||||
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
{
|
||||
globals = _pPluginGlobals;
|
||||
LogManager::SetInstance((LogManager *)globals->logManager);
|
||||
}
|
||||
|
||||
|
||||
// Call config dialog
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
void DllConfig(HWND _hParent)
|
||||
|
||||
Reference in New Issue
Block a user