Change the Wiimote plugin a bit since it works in both OSs the way Windows does it, fix a crash that happens in PluginManager.cpp since it was not being checked correctly. and the big one, Break out the JIT core dependency, should be able to remove easily now if added to the Scons settings. This commit WILL break Windows until someone adds the new files to the VS project files

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3734 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2009-07-10 19:25:58 +00:00
parent 4459f5b8c6
commit 3ede866c37
11 changed files with 1121 additions and 583 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ CPluginManager::~CPluginManager()
for (int i = 0; i < MAXPADS; i++)
{
if (m_pad[i] && OkayToInitPlugin(i))
if (m_pad[i] && (OkayToInitPlugin(i) != -1))
{
INFO_LOG(CONSOLE, "Delete: %i\n", i);
delete m_pad[i];
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef INTERPRETER_TABLES_H
#define INTERPRETER_TABLES_H
#include "../Gekko.h"
#include "../PPCTables.h"
#include "Interpreter.h"
namespace InterpreterTables
{
void InitTables();
}
#endif
+2 -1
View File
@@ -35,6 +35,7 @@
#include "Jit.h"
#include "JitAsm.h"
#include "JitRegCache.h"
#include "Jit_Tables.h"
#if defined JITTEST && JITTEST
#error Jit64 cannot have JITTEST define
@@ -555,7 +556,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitB
}
if (!ops[i].skip)
PPCTables::CompileInstruction(ops[i].inst);
JitTables::CompileInstruction(ops[i].inst);
gpr.SanityCheck();
fpr.SanityCheck();
+2 -1
View File
@@ -34,6 +34,7 @@
#include "Jit.h"
#include "JitAsm.h"
#include "../JitCommon/JitCache.h"
#include "../JitCommon/Jit_Tables.h"
#if !defined JITTEST || ! JITTEST
#error JitIL needs JITTEST define
@@ -461,7 +462,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitB
}
if (!ops[i].skip)
PPCTables::CompileInstruction(ops[i].inst);
JitTables::CompileInstruction(ops[i].inst);
}
// Perform actual code generation
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,34 @@
// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef JIT_TABLES_H
#define JIT_TABLES_H
#include "../Gekko.h"
#include "../PPCTables.h"
#if defined JITTEST && JITTEST
#include "../Jit64IL/Jit.h"
#else
#include "../Jit64/Jit.h"
#endif
namespace JitTables
{
void CompileInstruction(UGeckoInstruction _inst);
void InitTables();
}
#endif
File diff suppressed because it is too large Load Diff
+11 -7
View File
@@ -82,7 +82,6 @@ enum {
enum {
OP_BLR = 0x4e800020,
};
struct GekkoOPInfo
{
const char *opname;
@@ -93,18 +92,25 @@ struct GekkoOPInfo
int compileCount;
u32 lastUse;
};
extern GekkoOPInfo *m_infoTable[64];
extern GekkoOPInfo *m_infoTable4[1024];
extern GekkoOPInfo *m_infoTable19[1024];
extern GekkoOPInfo *m_infoTable31[1024];
extern GekkoOPInfo *m_infoTable59[32];
extern GekkoOPInfo *m_infoTable63[1024];
extern GekkoOPInfo *m_allInstructions[512];
extern int m_numInstructions;
GekkoOPInfo *GetOpInfo(UGeckoInstruction _inst);
Interpreter::_interpreterInstruction GetInterpreterOp(UGeckoInstruction _inst);
class Jit64;
class cJit64;
namespace PPCTables
{
typedef void (Jit64::*_recompilerInstruction) (UGeckoInstruction instCode);
typedef void (*_interpreterInstruction)(UGeckoInstruction instCode);
void InitTables();
bool IsValidInstruction(UGeckoInstruction _instCode);
bool UsesFPU(UGeckoInstruction _inst);
@@ -112,9 +118,7 @@ bool UsesFPU(UGeckoInstruction _inst);
void CountInstruction(UGeckoInstruction _inst);
void PrintInstructionRunCounts();
void LogCompiledInstructions();
void CompileInstruction(UGeckoInstruction _inst);
const char *GetInstructionName(UGeckoInstruction _inst);
} // namespace
#endif
+3
View File
@@ -82,6 +82,7 @@ files = ["ActionReplay.cpp",
"PowerPC/Interpreter/Interpreter_LoadStore.cpp",
"PowerPC/Interpreter/Interpreter_LoadStorePaired.cpp",
"PowerPC/Interpreter/Interpreter_SystemRegisters.cpp",
"PowerPC/Interpreter/Interpreter_Tables.cpp",
"PowerPC/JitCommon/JitCache.cpp",
"PowerPC/JitCommon/JitBackpatch.cpp",
"PowerPC/JitCommon/Jit_Util.cpp",
@@ -103,6 +104,7 @@ if env['JITTEST']:
"PowerPC/Jit64IL/Jit_SystemRegisters.cpp",
"PowerPC/Jit64IL/IR.cpp",
"PowerPC/Jit64IL/IR_X86.cpp",
"PowerPC/JitCommon//Jit_Tables.cpp",
]
else:
files += ["PowerPC/Jit64/Jit.cpp",
@@ -116,6 +118,7 @@ else:
"PowerPC/Jit64/Jit_LoadStore.cpp",
"PowerPC/Jit64/Jit_LoadStoreFloating.cpp",
"PowerPC/Jit64/Jit_SystemRegisters.cpp",
"PowerPC/JitCommon/Jit_Tables.cpp",
]
if sys.platform == 'win32':
@@ -125,13 +125,7 @@ void ReadData()
{
//INFO_LOG(CONSOLE, "Writing data to the Wiimote\n");
SEvent& rEvent = m_EventWriteQueue.front();
wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad,
#ifdef _WIN32 // dunno if this is needed, sonic ran away when i found the bug :p
MAX_PAYLOAD
#else
(int)m_EventWriteQueue.size()
#endif
);
wiiuse_io_write(m_pWiiMote, (byte*)rEvent.m_PayLoad, MAX_PAYLOAD);
m_EventWriteQueue.pop();
#ifdef _WIN32