Some work on changing comments, log messages, and variable and function names to reflect that the plugins are not plugins anymore.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7170 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cd308e2358
commit
0ae8d33149
1034
Languages/da.po
1034
Languages/da.po
File diff suppressed because it is too large
Load Diff
1065
Languages/de.po
1065
Languages/de.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1067
Languages/el.po
1067
Languages/el.po
File diff suppressed because it is too large
Load Diff
1034
Languages/en.po
1034
Languages/en.po
File diff suppressed because it is too large
Load Diff
1067
Languages/es.po
1067
Languages/es.po
File diff suppressed because it is too large
Load Diff
1067
Languages/fr.po
1067
Languages/fr.po
File diff suppressed because it is too large
Load Diff
1035
Languages/he.po
1035
Languages/he.po
File diff suppressed because it is too large
Load Diff
1067
Languages/hu.po
1067
Languages/hu.po
File diff suppressed because it is too large
Load Diff
1067
Languages/it.po
1067
Languages/it.po
File diff suppressed because it is too large
Load Diff
1062
Languages/ja.po
1062
Languages/ja.po
File diff suppressed because it is too large
Load Diff
1067
Languages/ko.po
1067
Languages/ko.po
File diff suppressed because it is too large
Load Diff
1062
Languages/nb.po
1062
Languages/nb.po
File diff suppressed because it is too large
Load Diff
1062
Languages/nl.po
1062
Languages/nl.po
File diff suppressed because it is too large
Load Diff
1065
Languages/pl.po
1065
Languages/pl.po
File diff suppressed because it is too large
Load Diff
1067
Languages/pt.po
1067
Languages/pt.po
File diff suppressed because it is too large
Load Diff
1061
Languages/pt_BR.po
1061
Languages/pt_BR.po
File diff suppressed because it is too large
Load Diff
1064
Languages/ru.po
1064
Languages/ru.po
File diff suppressed because it is too large
Load Diff
1067
Languages/tr.po
1067
Languages/tr.po
File diff suppressed because it is too large
Load Diff
1067
Languages/zh_CN.po
1067
Languages/zh_CN.po
File diff suppressed because it is too large
Load Diff
1067
Languages/zh_TW.po
1067
Languages/zh_TW.po
File diff suppressed because it is too large
Load Diff
|
@ -43,7 +43,7 @@ void AudioCommonConfig::Load()
|
||||||
#else
|
#else
|
||||||
file.Get("Config", "Backend", &sBackend, BACKEND_NULLSOUND);
|
file.Get("Config", "Backend", &sBackend, BACKEND_NULLSOUND);
|
||||||
#endif
|
#endif
|
||||||
file.Get("Config", "Frequency", &sFrequency, 48000);
|
file.Get("Config", "Frequency", &iFrequency, 48000);
|
||||||
file.Get("Config", "Volume", &m_Volume, 100);
|
file.Get("Config", "Volume", &m_Volume, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void AudioCommonConfig::SaveSettings()
|
||||||
file.Set("Config", "EnableJIT", m_EnableJIT);
|
file.Set("Config", "EnableJIT", m_EnableJIT);
|
||||||
file.Set("Config", "DumpAudio", m_DumpAudio);
|
file.Set("Config", "DumpAudio", m_DumpAudio);
|
||||||
file.Set("Config", "Backend", sBackend);
|
file.Set("Config", "Backend", sBackend);
|
||||||
file.Set("Config", "Frequency", sFrequency);
|
file.Set("Config", "Frequency", iFrequency);
|
||||||
file.Set("Config", "Volume", m_Volume);
|
file.Set("Config", "Volume", m_Volume);
|
||||||
|
|
||||||
file.Save((std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str()));
|
file.Save((std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str()));
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct AudioCommonConfig
|
||||||
bool m_DumpAudio;
|
bool m_DumpAudio;
|
||||||
int m_Volume;
|
int m_Volume;
|
||||||
std::string sBackend;
|
std::string sBackend;
|
||||||
int sFrequency;
|
int iFrequency;
|
||||||
|
|
||||||
// Load from given file
|
// Load from given file
|
||||||
void Load();
|
void Load();
|
||||||
|
|
|
@ -194,10 +194,8 @@ void CMixer::PushSamples(const short *samples, unsigned int num_samples)
|
||||||
|
|
||||||
if (m_sampleRate == 32000)
|
if (m_sampleRate == 32000)
|
||||||
Common::AtomicAdd(m_numSamples, num_samples);
|
Common::AtomicAdd(m_numSamples, num_samples);
|
||||||
else if (m_sampleRate == 48000)
|
else // Assume 48000 otherwise
|
||||||
Common::AtomicAdd(m_numSamples, num_samples * 3 / 2);
|
Common::AtomicAdd(m_numSamples, num_samples * 3 / 2);
|
||||||
else
|
|
||||||
PanicAlertT("Mixer: Unsupported sample rate.");
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
// This header contains type definitions that are shared between the Dolphin
|
// This header contains type definitions that are shared between the Dolphin core and
|
||||||
// core and the plugin specs. Any definitions that are only used by the core
|
// other parts of the code. Any definitions that are only used by the core should be
|
||||||
// should be placed in "Common.h" instead.
|
// placed in "Common.h" instead.
|
||||||
|
|
||||||
#ifndef _COMMONTYPES_H_
|
#ifndef _COMMONTYPES_H_
|
||||||
#define _COMMONTYPES_H_
|
#define _COMMONTYPES_H_
|
||||||
|
|
|
@ -129,9 +129,6 @@ bool SetCurrentDir(const char *directory);
|
||||||
// directory. To be used in "multi-user" mode (that is, installed).
|
// directory. To be used in "multi-user" mode (that is, installed).
|
||||||
const char *GetUserPath(int DirIDX);
|
const char *GetUserPath(int DirIDX);
|
||||||
|
|
||||||
// Returns the path to where the plugins are
|
|
||||||
std::string GetPluginsDirectory();
|
|
||||||
|
|
||||||
// Returns the path to where the sys file are
|
// Returns the path to where the sys file are
|
||||||
std::string GetSysDirectory();
|
std::string GetSysDirectory();
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,8 @@ LogManager::LogManager() {
|
||||||
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
|
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
|
||||||
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
|
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
|
||||||
m_Log[LogTypes::DSP_MAIL] = new LogContainer("DSPMails", "DSP Mails");
|
m_Log[LogTypes::DSP_MAIL] = new LogContainer("DSPMails", "DSP Mails");
|
||||||
m_Log[LogTypes::VIDEO] = new LogContainer("Video", "Video Plugin");
|
m_Log[LogTypes::VIDEO] = new LogContainer("Video", "Video Backend");
|
||||||
m_Log[LogTypes::AUDIO] = new LogContainer("Audio", "Audio Plugin");
|
m_Log[LogTypes::AUDIO] = new LogContainer("Audio", "Audio Emulator");
|
||||||
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
|
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
|
||||||
m_Log[LogTypes::CONSOLE] = new LogContainer("CONSOLE", "Dolphin Console");
|
m_Log[LogTypes::CONSOLE] = new LogContainer("CONSOLE", "Dolphin Console");
|
||||||
m_Log[LogTypes::OSREPORT] = new LogContainer("OSREPORT", "OSReport");
|
m_Log[LogTypes::OSREPORT] = new LogContainer("OSREPORT", "OSReport");
|
||||||
|
|
|
@ -157,7 +157,7 @@ float MathFloatVectorSum(const std::vector<float>&);
|
||||||
|
|
||||||
|
|
||||||
// Tiny matrix/vector library.
|
// Tiny matrix/vector library.
|
||||||
// Used for things like Free-Look in the gfx plugin.
|
// Used for things like Free-Look in the gfx backend.
|
||||||
|
|
||||||
class Matrix33
|
class Matrix33
|
||||||
{
|
{
|
||||||
|
|
|
@ -274,7 +274,7 @@ void CpuThread()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Initalize plugins and create emulation thread
|
// Initalize and create emulation thread
|
||||||
// Call browser: Init():g_EmuThread(). See the BootManager.cpp file description for a complete call schedule.
|
// Call browser: Init():g_EmuThread(). See the BootManager.cpp file description for a complete call schedule.
|
||||||
void EmuThread()
|
void EmuThread()
|
||||||
{
|
{
|
||||||
|
@ -367,7 +367,7 @@ void EmuThread()
|
||||||
{
|
{
|
||||||
// the spawned CPU Thread also does the graphics. the EmuThread is
|
// the spawned CPU Thread also does the graphics. the EmuThread is
|
||||||
// thus an idle thread, which sleep wait for the program to terminate.
|
// thus an idle thread, which sleep wait for the program to terminate.
|
||||||
// Without this extra thread, the video plugin window hangs in single
|
// Without this extra thread, the video backend window hangs in single
|
||||||
// core mode since noone is pumping messages.
|
// core mode since noone is pumping messages.
|
||||||
|
|
||||||
cpuThread = std::thread(CpuThread);
|
cpuThread = std::thread(CpuThread);
|
||||||
|
@ -409,8 +409,8 @@ void EmuThread()
|
||||||
VolumeHandler::EjectVolume();
|
VolumeHandler::EjectVolume();
|
||||||
FileMon::Close();
|
FileMon::Close();
|
||||||
|
|
||||||
// Stop audio thread - Actually this does nothing on HLE plugin.
|
// Stop audio thread - Actually this does nothing when using HLE emulation.
|
||||||
// But stops the DSP Interpreter on LLE plugin.
|
// But stops the DSP Interpreter when using LLE emulation.
|
||||||
DSP::GetDSPEmulator()->DSP_StopSoundStream();
|
DSP::GetDSPEmulator()->DSP_StopSoundStream();
|
||||||
|
|
||||||
// We must set up this flag before executing HW::Shutdown()
|
// We must set up this flag before executing HW::Shutdown()
|
||||||
|
@ -426,8 +426,6 @@ void EmuThread()
|
||||||
Pad::Shutdown();
|
Pad::Shutdown();
|
||||||
Wiimote::Shutdown();
|
Wiimote::Shutdown();
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(false, "Plugins shutdown").c_str());
|
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Main thread stopped").c_str());
|
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Main thread stopped").c_str());
|
||||||
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
||||||
|
|
||||||
|
@ -613,7 +611,7 @@ bool report_slow(int skipped)
|
||||||
return fps_slow;
|
return fps_slow;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Callbacks for plugins / engine ---
|
// --- Callbacks for backends / engine ---
|
||||||
|
|
||||||
// Callback_VideoLog
|
// Callback_VideoLog
|
||||||
// WARNING - THIS IS EXECUTED FROM VIDEO THREAD
|
// WARNING - THIS IS EXECUTED FROM VIDEO THREAD
|
||||||
|
@ -660,7 +658,7 @@ void Callback_DSPInterrupt()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Callback_ISOName: Let the DSP plugin get the game name
|
// Callback_ISOName: Let the DSP emulator get the game name
|
||||||
//
|
//
|
||||||
const char *Callback_ISOName()
|
const char *Callback_ISOName()
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,7 +54,6 @@ bool rerecording = false;
|
||||||
|
|
||||||
#include "PowerPC/PowerPC.h"
|
#include "PowerPC/PowerPC.h"
|
||||||
|
|
||||||
#include "PluginManager.h"
|
|
||||||
#include "ConfigManager.h"
|
#include "ConfigManager.h"
|
||||||
|
|
||||||
#include "MemTools.h"
|
#include "MemTools.h"
|
||||||
|
|
|
@ -225,7 +225,7 @@ struct SDSP
|
||||||
|
|
||||||
// This is NOT the same cr as r.cr.
|
// This is NOT the same cr as r.cr.
|
||||||
// This register is shared with the main emulation, see DSP.cpp
|
// This register is shared with the main emulation, see DSP.cpp
|
||||||
// The plugin has control over 0x0C07 of this reg.
|
// The engine has control over 0x0C07 of this reg.
|
||||||
// Bits are defined in a struct in DSP.cpp.
|
// Bits are defined in a struct in DSP.cpp.
|
||||||
u16 cr;
|
u16 cr;
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#ifndef _PLUGINDSP_H_
|
#ifndef _DSPEMULATOR_H_
|
||||||
#define _PLUGINDSP_H_
|
#define _DSPEMULATOR_H_
|
||||||
|
|
||||||
|
|
||||||
#include "ChunkFile.h"
|
#include "ChunkFile.h"
|
||||||
|
@ -47,4 +47,4 @@ public:
|
||||||
|
|
||||||
DSPEmulator *CreateDSPEmulator(bool LLE);
|
DSPEmulator *CreateDSPEmulator(bool LLE);
|
||||||
|
|
||||||
#endif // _PLUGINDSP_H_
|
#endif // _DSPEMULATOR_H_
|
||||||
|
|
|
@ -33,7 +33,7 @@ void DoState(PointerWrap &p);
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
// Called by DSP plugin
|
// Called by DSP emulator
|
||||||
void Callback_GetSampleRate(unsigned int &_AISampleRate, unsigned int &_DACSampleRate);
|
void Callback_GetSampleRate(unsigned int &_AISampleRate, unsigned int &_DACSampleRate);
|
||||||
unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples, unsigned int _sampleRate = 48000);
|
unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples, unsigned int _sampleRate = 48000);
|
||||||
|
|
||||||
|
|
|
@ -412,7 +412,7 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||||
|
|
||||||
// Not really sure if this is correct, but it works...
|
// Not really sure if this is correct, but it works...
|
||||||
// Kind of a hack because DSP_CONTROL_MASK should make this bit
|
// Kind of a hack because DSP_CONTROL_MASK should make this bit
|
||||||
// only viewable to dsp plugin
|
// only viewable to dsp emulator
|
||||||
if (_Value & 1 /*DSPReset*/)
|
if (_Value & 1 /*DSPReset*/)
|
||||||
{
|
{
|
||||||
g_audioDMA.AudioDMAControl.Hex = 0;
|
g_audioDMA.AudioDMAControl.Hex = 0;
|
||||||
|
|
|
@ -196,7 +196,7 @@ u16 DSPHLE::DSP_WriteControlRegister(unsigned short _Value)
|
||||||
AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
|
AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
|
||||||
|
|
||||||
soundStream = AudioCommon::InitSoundStream(
|
soundStream = AudioCommon::InitSoundStream(
|
||||||
new HLEMixer(this, AISampleRate, DACSampleRate, ac_Config.sFrequency), m_hWnd);
|
new HLEMixer(this, AISampleRate, DACSampleRate, ac_Config.iFrequency), m_hWnd);
|
||||||
if(!soundStream) PanicAlert("Error starting up sound stream");
|
if(!soundStream) PanicAlert("Error starting up sound stream");
|
||||||
// Mixer is initialized
|
// Mixer is initialized
|
||||||
m_InitMixer = true;
|
m_InitMixer = true;
|
||||||
|
|
|
@ -94,12 +94,12 @@ IUCode* UCodeFactory(u32 _CRC, DSPHLE *dsp_hle, bool bWii)
|
||||||
default:
|
default:
|
||||||
if (bWii)
|
if (bWii)
|
||||||
{
|
{
|
||||||
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AXWii.\n\nTry LLE plugin if this is homebrew.", _CRC);
|
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AXWii.\n\nTry LLE emulator if this is homebrew.", _CRC);
|
||||||
return new CUCode_AXWii(dsp_hle, _CRC);
|
return new CUCode_AXWii(dsp_hle, _CRC);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AX.\n\nTry LLE plugin if this is homebrew.", _CRC);
|
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AX.\n\nTry LLE emulator if this is homebrew.", _CRC);
|
||||||
return new CUCode_AX(dsp_hle);
|
return new CUCode_AX(dsp_hle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,7 +413,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(VIDEOINTERFACE, "(w16): 0x%04x, 0x%08x",_iValue,_iAddress);
|
DEBUG_LOG(VIDEOINTERFACE, "(w16): 0x%04x, 0x%08x",_iValue,_iAddress);
|
||||||
|
|
||||||
//Somewhere it sets screen width.. we need to communicate this to the gfx plugin...
|
//Somewhere it sets screen width.. we need to communicate this to the gfx backend...
|
||||||
|
|
||||||
switch (_iAddress & 0xFFF)
|
switch (_iAddress & 0xFFF)
|
||||||
{
|
{
|
||||||
|
|
|
@ -477,8 +477,8 @@ void SaveRecording(const char *filename)
|
||||||
// TODO
|
// TODO
|
||||||
header.uniqueID = 0;
|
header.uniqueID = 0;
|
||||||
// header.author;
|
// header.author;
|
||||||
// header.videoPlugin;
|
// header.videoBackend;
|
||||||
// header.audioPlugin;
|
// header.audioEmulator;
|
||||||
|
|
||||||
fwrite(&header, sizeof(DTMHeader), 1, g_recordfd);
|
fwrite(&header, sizeof(DTMHeader), 1, g_recordfd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,9 +81,9 @@ struct DTMHeader {
|
||||||
u32 numRerecords; // Number of rerecords/'cuts' of this TAS
|
u32 numRerecords; // Number of rerecords/'cuts' of this TAS
|
||||||
u8 author[32]; // Author's name (encoded in UTF-8)
|
u8 author[32]; // Author's name (encoded in UTF-8)
|
||||||
|
|
||||||
u8 videoPlugin[16]; // UTF-8 representation of the video plugin
|
u8 videoBackend[16]; // UTF-8 representation of the video backend
|
||||||
u8 audioPlugin[16]; // UTF-8 representation of the audio plugin
|
u8 audioEmulator[16]; // UTF-8 representation of the audio emulator
|
||||||
u8 padPlugin[16]; // UTF-8 representation of the input plugin
|
u8 padBackend[16]; // UTF-8 representation of the input backend
|
||||||
|
|
||||||
u8 padding[7]; // Padding to align the header to 1024 bits
|
u8 padding[7]; // Padding to align the header to 1024 bits
|
||||||
|
|
||||||
|
|
|
@ -353,7 +353,7 @@ void Interpreter::dcba(UGeckoInstruction _inst)
|
||||||
|
|
||||||
void Interpreter::dcbf(UGeckoInstruction _inst)
|
void Interpreter::dcbf(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
//This should tell GFX plugin to throw out any cached data here
|
//This should tell GFX backend to throw out any cached data here
|
||||||
// !!! SPEEDUP HACK for OSProtectRange !!!
|
// !!! SPEEDUP HACK for OSProtectRange !!!
|
||||||
/* u32 tmp1 = Memory::Read_U32(PC+4);
|
/* u32 tmp1 = Memory::Read_U32(PC+4);
|
||||||
u32 tmp2 = Memory::Read_U32(PC+8);
|
u32 tmp2 = Memory::Read_U32(PC+8);
|
||||||
|
|
|
@ -93,7 +93,7 @@ using namespace PowerPC;
|
||||||
// Seldom-happening events is handled by adding a decrement of a counter to all blr instructions (which are
|
// Seldom-happening events is handled by adding a decrement of a counter to all blr instructions (which are
|
||||||
// expensive anyway since we need to return to dispatcher, except when they can be predicted).
|
// expensive anyway since we need to return to dispatcher, except when they can be predicted).
|
||||||
|
|
||||||
// TODO: SERIOUS synchronization problem with the video plugin setting tokens and breakpoints in dual core mode!!!
|
// TODO: SERIOUS synchronization problem with the video backend setting tokens and breakpoints in dual core mode!!!
|
||||||
// Somewhat fixed by disabling idle skipping when certain interrupts are enabled
|
// Somewhat fixed by disabling idle skipping when certain interrupts are enabled
|
||||||
// This is no permanent reliable fix
|
// This is no permanent reliable fix
|
||||||
// TODO: Zeldas go whacko when you hang the gfx thread
|
// TODO: Zeldas go whacko when you hang the gfx thread
|
||||||
|
|
|
@ -88,7 +88,7 @@ using namespace PowerPC;
|
||||||
// Seldom-happening events is handled by adding a decrement of a counter to all blr instructions (which are
|
// Seldom-happening events is handled by adding a decrement of a counter to all blr instructions (which are
|
||||||
// expensive anyway since we need to return to dispatcher, except when they can be predicted).
|
// expensive anyway since we need to return to dispatcher, except when they can be predicted).
|
||||||
|
|
||||||
// TODO: SERIOUS synchronization problem with the video plugin setting tokens and breakpoints in dual core mode!!!
|
// TODO: SERIOUS synchronization problem with the video backend setting tokens and breakpoints in dual core mode!!!
|
||||||
// Somewhat fixed by disabling idle skipping when certain interrupts are enabled
|
// Somewhat fixed by disabling idle skipping when certain interrupts are enabled
|
||||||
// This is no permanent reliable fix
|
// This is no permanent reliable fix
|
||||||
// TODO: Zeldas go whacko when you hang the gfx thread
|
// TODO: Zeldas go whacko when you hang the gfx thread
|
||||||
|
|
|
@ -87,7 +87,7 @@ void DoState(PointerWrap &p)
|
||||||
p.SetMode(PointerWrap::MODE_MEASURE);
|
p.SetMode(PointerWrap::MODE_MEASURE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Begin with video plugin, so that it gets a chance to clear it's caches and writeback modified things to RAM
|
// Begin with video backend, so that it gets a chance to clear it's caches and writeback modified things to RAM
|
||||||
// Pause the video thread in multi-threaded mode
|
// Pause the video thread in multi-threaded mode
|
||||||
g_video_backend->RunLoop(false);
|
g_video_backend->RunLoop(false);
|
||||||
g_video_backend->DoState(p);
|
g_video_backend->DoState(p);
|
||||||
|
|
|
@ -235,7 +235,7 @@ void CConfigMain::UpdateGUI()
|
||||||
ProgressiveScan->Disable();
|
ProgressiveScan->Disable();
|
||||||
NTSCJ->Disable();
|
NTSCJ->Disable();
|
||||||
|
|
||||||
// Disable graphics plugin selection
|
// Disable graphics backend selection
|
||||||
GraphicSelection->Disable();
|
GraphicSelection->Disable();
|
||||||
|
|
||||||
// Disable stuff on AudioPage
|
// Disable stuff on AudioPage
|
||||||
|
@ -403,7 +403,7 @@ void CConfigMain::InitializeGUIValues()
|
||||||
EnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
|
EnableThrottle->SetValue(ac_Config.m_EnableThrottle ? true : false);
|
||||||
DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false);
|
DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false);
|
||||||
FrequencySelection->SetSelection(
|
FrequencySelection->SetSelection(
|
||||||
FrequencySelection->FindString(wxString::Format(_("%d Hz"), ac_Config.sFrequency)));
|
FrequencySelection->FindString(wxString::Format(_("%d Hz"), ac_Config.iFrequency)));
|
||||||
// add backends to the list
|
// add backends to the list
|
||||||
AddAudioBackends();
|
AddAudioBackends();
|
||||||
|
|
||||||
|
@ -1082,7 +1082,7 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
||||||
ac_Config.sBackend = BackendSelection->GetStringSelection().mb_str();
|
ac_Config.sBackend = BackendSelection->GetStringSelection().mb_str();
|
||||||
long int frequency;
|
long int frequency;
|
||||||
FrequencySelection->GetStringSelection().ToLong(&frequency);
|
FrequencySelection->GetStringSelection().ToLong(&frequency);
|
||||||
ac_Config.sFrequency = frequency;
|
ac_Config.iFrequency = frequency;
|
||||||
ac_Config.Update();
|
ac_Config.Update();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,6 @@ extern "C" // Bitmaps
|
||||||
#include "../../resources/toolbar_add_breakpoint.c"
|
#include "../../resources/toolbar_add_breakpoint.c"
|
||||||
}
|
}
|
||||||
|
|
||||||
class CPluginInfo;
|
|
||||||
class CPluginManager;
|
|
||||||
|
|
||||||
// -------
|
// -------
|
||||||
// Main
|
// Main
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ HWND MSWGetParent_(HWND Parent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ---------------
|
// ---------------
|
||||||
// The CPanel class to receive MSWWindowProc messages from the video plugin.
|
// The CPanel class to receive MSWWindowProc messages from the video backend.
|
||||||
|
|
||||||
extern CFrame* main_frame;
|
extern CFrame* main_frame;
|
||||||
|
|
||||||
|
@ -254,8 +254,8 @@ EVT_MENU(IDM_RECORDREADONLY, CFrame::OnRecordReadOnly)
|
||||||
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
|
EVT_MENU(IDM_FRAMESTEP, CFrame::OnFrameStep)
|
||||||
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||||
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
|
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
|
||||||
EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnConfigGFX)
|
EVT_MENU(IDM_CONFIG_GFX_BACKEND, CFrame::OnConfigGFX)
|
||||||
EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnConfigDSP)
|
EVT_MENU(IDM_CONFIG_DSP_EMULATOR, CFrame::OnConfigDSP)
|
||||||
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD)
|
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD)
|
||||||
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote)
|
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote)
|
||||||
EVT_MENU(IDM_CONFIG_HOTKEYS, CFrame::OnConfigHotkey)
|
EVT_MENU(IDM_CONFIG_HOTKEYS, CFrame::OnConfigHotkey)
|
||||||
|
@ -974,7 +974,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
ConnectWiimote(WiimoteId, connect);
|
ConnectWiimote(WiimoteId, connect);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the OSD hotkeys to the video plugin
|
// Send the OSD hotkeys to the video backend
|
||||||
if (event.GetKeyCode() >= '3' && event.GetKeyCode() <= '7' && event.GetModifiers() == wxMOD_NONE)
|
if (event.GetKeyCode() >= '3' && event.GetKeyCode() <= '7' && event.GetModifiers() == wxMOD_NONE)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -983,7 +983,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
X11Utils::SendKeyEvent(X11Utils::XDisplayFromHandle(GetHandle()), event.GetKeyCode());
|
X11Utils::SendKeyEvent(X11Utils::XDisplayFromHandle(GetHandle()), event.GetKeyCode());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// Send the freelook hotkeys to the video plugin
|
// Send the freelook hotkeys to the video backend
|
||||||
if ((event.GetKeyCode() == ')' || event.GetKeyCode() == '(' ||
|
if ((event.GetKeyCode() == ')' || event.GetKeyCode() == '(' ||
|
||||||
event.GetKeyCode() == '0' || event.GetKeyCode() == '9' ||
|
event.GetKeyCode() == '0' || event.GetKeyCode() == '9' ||
|
||||||
event.GetKeyCode() == 'W' || event.GetKeyCode() == 'S' ||
|
event.GetKeyCode() == 'W' || event.GetKeyCode() == 'S' ||
|
||||||
|
|
|
@ -186,8 +186,8 @@ void CFrame::CreateMenu()
|
||||||
wxMenu* pOptionsMenu = new wxMenu;
|
wxMenu* pOptionsMenu = new wxMenu;
|
||||||
pOptionsMenu->Append(wxID_PREFERENCES, _("Co&nfigure..."));
|
pOptionsMenu->Append(wxID_PREFERENCES, _("Co&nfigure..."));
|
||||||
pOptionsMenu->AppendSeparator();
|
pOptionsMenu->AppendSeparator();
|
||||||
pOptionsMenu->Append(IDM_CONFIG_GFX_PLUGIN, _("&Graphics Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_GFX_BACKEND, _("&Graphics Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _("&DSP Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_DSP_EMULATOR, _("&DSP Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _("&Gamecube Pad Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _("&Gamecube Pad Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _("&Wiimote Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _("&Wiimote Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_HOTKEYS, _("&Hotkey Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_HOTKEYS, _("&Hotkey Settings"));
|
||||||
|
@ -444,8 +444,8 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
|
||||||
ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_FullScreen], _("Take Screenshot"));
|
ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_FullScreen], _("Take Screenshot"));
|
||||||
ToolBar->AddSeparator();
|
ToolBar->AddSeparator();
|
||||||
ToolBar->AddTool(wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure..."));
|
ToolBar->AddTool(wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure..."));
|
||||||
ToolBar->AddTool(IDM_CONFIG_GFX_PLUGIN, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings"));
|
ToolBar->AddTool(IDM_CONFIG_GFX_BACKEND, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings"));
|
||||||
ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _("DSP"), m_Bitmaps[Toolbar_ConfigDSP], _("DSP settings"));
|
ToolBar->AddTool(IDM_CONFIG_DSP_EMULATOR, _("DSP"), m_Bitmaps[Toolbar_ConfigDSP], _("DSP settings"));
|
||||||
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _("GCPad"), m_Bitmaps[Toolbar_ConfigPAD], _("Gamecube Pad settings"));
|
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _("GCPad"), m_Bitmaps[Toolbar_ConfigPAD], _("Gamecube Pad settings"));
|
||||||
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _("Wiimote settings"));
|
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _("Wiimote settings"));
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,8 @@ enum
|
||||||
IDM_HELPWEBSITE, // Help menu
|
IDM_HELPWEBSITE, // Help menu
|
||||||
IDM_HELPGOOGLECODE,
|
IDM_HELPGOOGLECODE,
|
||||||
|
|
||||||
IDM_CONFIG_GFX_PLUGIN,
|
IDM_CONFIG_GFX_BACKEND,
|
||||||
IDM_CONFIG_DSP_PLUGIN,
|
IDM_CONFIG_DSP_EMULATOR,
|
||||||
IDM_CONFIG_PAD_PLUGIN,
|
IDM_CONFIG_PAD_PLUGIN,
|
||||||
IDM_CONFIG_WIIMOTE_PLUGIN,
|
IDM_CONFIG_WIIMOTE_PLUGIN,
|
||||||
IDM_CONFIG_HOTKEYS,
|
IDM_CONFIG_HOTKEYS,
|
||||||
|
|
|
@ -88,7 +88,7 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const
|
||||||
|
|
||||||
/* Explanation of the magic behind ClearScreen:
|
/* Explanation of the magic behind ClearScreen:
|
||||||
There's numerous possible formats for the pixel data in the EFB.
|
There's numerous possible formats for the pixel data in the EFB.
|
||||||
However, in the HW accelerated plugins we're always using RGBA8
|
However, in the HW accelerated backends we're always using RGBA8
|
||||||
for the EFB format, which causes some problems:
|
for the EFB format, which causes some problems:
|
||||||
- We're using an alpha channel although the game doesn't
|
- We're using an alpha channel although the game doesn't
|
||||||
- If the actual EFB format is RGBA6_Z24 or R5G6B5_Z16, we are using more bits per channel than the native HW
|
- If the actual EFB format is RGBA6_Z24 or R5G6B5_Z16, we are using more bits per channel than the native HW
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
// Video plugin must define these functions
|
// Video backend must define these functions
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
|
|
||||||
#ifndef _BPFUNCTIONS_H
|
#ifndef _BPFUNCTIONS_H
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// STATE_TO_SAVE
|
// STATE_TO_SAVE
|
||||||
BPMemory bpmem;
|
BPMemory bpmem;
|
||||||
|
|
||||||
// The plugin must implement this.
|
// The backend must implement this.
|
||||||
void BPWritten(const BPCmd& bp);
|
void BPWritten(const BPCmd& bp);
|
||||||
|
|
||||||
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
|
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
// PPC have a frame-finish watchdog. Handled by system timming stuff like the decrementer.
|
// PPC have a frame-finish watchdog. Handled by system timming stuff like the decrementer.
|
||||||
// (DualCore mode): I have observed, after ZTP logos, a fifo-recovery start when DECREMENTER_EXCEPTION is throwned.
|
// (DualCore mode): I have observed, after ZTP logos, a fifo-recovery start when DECREMENTER_EXCEPTION is throwned.
|
||||||
// The frame setting (by GP) took too much time and didn't finish properly due to this watchdog.
|
// The frame setting (by GP) took too much time and didn't finish properly due to this watchdog.
|
||||||
// Faster GX plugins required, indeed :p
|
// Faster GX backends required, indeed :p
|
||||||
|
|
||||||
// * BPs are needed for some game GP/CPU sync.
|
// * BPs are needed for some game GP/CPU sync.
|
||||||
// But it could slowdown (MP1 at least) because our GP in DC is faster than "expected" in some area.
|
// But it could slowdown (MP1 at least) because our GP in DC is faster than "expected" in some area.
|
||||||
|
@ -751,7 +751,7 @@ void CatchUpGPU()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read the data and send it to the VideoPlugin
|
// read the data and send it to the VideoBackend
|
||||||
// We are going to do FP math on the main thread so have to save the current state
|
// We are going to do FP math on the main thread so have to save the current state
|
||||||
SaveSSEState();
|
SaveSSEState();
|
||||||
LoadDefaultSSEState();
|
LoadDefaultSSEState();
|
||||||
|
@ -808,12 +808,12 @@ void UpdateInterrupts(u64 userdata)
|
||||||
interruptWaiting = false;
|
interruptWaiting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateInterruptsFromVideoPlugin(u64 userdata)
|
void UpdateInterruptsFromVideoBackend(u64 userdata)
|
||||||
{
|
{
|
||||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFifoIdleFromVideoPlugin()
|
void SetFifoIdleFromVideoBackend()
|
||||||
{
|
{
|
||||||
s_fifoIdleEvent.Set();
|
s_fifoIdleEvent.Set();
|
||||||
}
|
}
|
||||||
|
@ -901,7 +901,7 @@ void SetStatus()
|
||||||
if (IsOnThread())
|
if (IsOnThread())
|
||||||
{
|
{
|
||||||
interruptWaiting = true;
|
interruptWaiting = true;
|
||||||
CommandProcessor::UpdateInterruptsFromVideoPlugin(userdata);
|
CommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CommandProcessor::UpdateInterrupts(userdata);
|
CommandProcessor::UpdateInterrupts(userdata);
|
||||||
|
|
|
@ -157,9 +157,9 @@ void SetStatus();
|
||||||
void GatherPipeBursted();
|
void GatherPipeBursted();
|
||||||
void UpdateFifoRegister();
|
void UpdateFifoRegister();
|
||||||
void UpdateInterrupts(u64 userdata);
|
void UpdateInterrupts(u64 userdata);
|
||||||
void UpdateInterruptsFromVideoPlugin(u64 userdata);
|
void UpdateInterruptsFromVideoBackend(u64 userdata);
|
||||||
void UpdateInterruptsScMode();
|
void UpdateInterruptsScMode();
|
||||||
void SetFifoIdleFromVideoPlugin();
|
void SetFifoIdleFromVideoBackend();
|
||||||
|
|
||||||
bool AllowIdleSkipping();
|
bool AllowIdleSkipping();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ extern NativeVertexFormat *g_nativeVertexFmt;
|
||||||
|
|
||||||
void GFXDebuggerUpdateScreen()
|
void GFXDebuggerUpdateScreen()
|
||||||
{
|
{
|
||||||
// TODO: Implement this in a plugin-independent way
|
// TODO: Implement this in a backend-independent way
|
||||||
/* // update screen
|
/* // update screen
|
||||||
if (D3D::bFrameInProgress)
|
if (D3D::bFrameInProgress)
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,7 +186,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||||
// This is called when we close the window when we render to a separate window
|
// This is called when we close the window when we render to a separate window
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
// When the user closes the window, we post an event to the main window to call Stop()
|
// When the user closes the window, we post an event to the main window to call Stop()
|
||||||
// Which then handles all the necessary steps to Shutdown the core + the plugins
|
// Which then handles all the necessary steps to Shutdown the core
|
||||||
if (m_hParent == NULL)
|
if (m_hParent == NULL)
|
||||||
{
|
{
|
||||||
// Stop the game
|
// Stop the game
|
||||||
|
|
|
@ -148,7 +148,7 @@ void Fifo_EnterLoop()
|
||||||
|
|
||||||
if (!fifoStateRun) break;
|
if (!fifoStateRun) break;
|
||||||
|
|
||||||
// Create pointer to video data and send it to the VideoPlugin
|
// Create pointer to video data and send it to the VideoBackend
|
||||||
u32 readPtr = _fifo.CPReadPointer;
|
u32 readPtr = _fifo.CPReadPointer;
|
||||||
u8 *uData = Memory::GetPointer(readPtr);
|
u8 *uData = Memory::GetPointer(readPtr);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ void Fifo_EnterLoop()
|
||||||
|
|
||||||
_fifo.isFifoProcesingData = false;
|
_fifo.isFifoProcesingData = false;
|
||||||
|
|
||||||
CommandProcessor::SetFifoIdleFromVideoPlugin();
|
CommandProcessor::SetFifoIdleFromVideoBackend();
|
||||||
|
|
||||||
if (EmuRunning)
|
if (EmuRunning)
|
||||||
Common::YieldCPU();
|
Common::YieldCPU();
|
||||||
|
|
|
@ -43,7 +43,7 @@ void ResetVideoBuffer();
|
||||||
void Fifo_SetRendering(bool bEnabled);
|
void Fifo_SetRendering(bool bEnabled);
|
||||||
bool IsFifoProcesingData();
|
bool IsFifoProcesingData();
|
||||||
|
|
||||||
// Implemented by the Video Plugin
|
// Implemented by the Video Backend
|
||||||
void VideoFifo_CheckAsyncRequest();
|
void VideoFifo_CheckAsyncRequest();
|
||||||
void VideoFifo_CheckStateRequest();
|
void VideoFifo_CheckStateRequest();
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
// This is currently only used by the DX plugin, but it may make sense to
|
// This is currently only used by the DX backend, but it may make sense to
|
||||||
// use it in the GL plugin or a future DX10 plugin too.
|
// use it in the GL backend or a future DX10 backend too.
|
||||||
|
|
||||||
#ifndef _INDEXGENERATOR_H
|
#ifndef _INDEXGENERATOR_H
|
||||||
#define _INDEXGENERATOR_H
|
#define _INDEXGENERATOR_H
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "VideoBackendBase.h"
|
#include "VideoBackendBase.h"
|
||||||
#include "ConfigManager.h"
|
#include "ConfigManager.h"
|
||||||
|
|
||||||
bool s_PluginInitialized = false;
|
bool s_BackendInitialized = false;
|
||||||
|
|
||||||
volatile u32 s_swapRequested = false;
|
volatile u32 s_swapRequested = false;
|
||||||
u32 s_efbAccessRequested = false;
|
u32 s_efbAccessRequested = false;
|
||||||
|
@ -96,7 +96,7 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||||
// Run from the CPU thread (from VideoInterface.cpp)
|
// Run from the CPU thread (from VideoInterface.cpp)
|
||||||
void VideoBackendHLE::Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
void VideoBackendHLE::Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
{
|
{
|
||||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
if (s_BackendInitialized && g_ActiveConfig.bUseXFB)
|
||||||
{
|
{
|
||||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
||||||
VideoFifo_CheckSwapRequest();
|
VideoFifo_CheckSwapRequest();
|
||||||
|
@ -110,7 +110,7 @@ void VideoBackendHLE::Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth
|
||||||
// Run from the CPU thread (from VideoInterface.cpp)
|
// Run from the CPU thread (from VideoInterface.cpp)
|
||||||
void VideoBackendHLE::Video_EndField()
|
void VideoBackendHLE::Video_EndField()
|
||||||
{
|
{
|
||||||
if (s_PluginInitialized)
|
if (s_BackendInitialized)
|
||||||
{
|
{
|
||||||
Common::AtomicStoreRelease(s_swapRequested, true);
|
Common::AtomicStoreRelease(s_swapRequested, true);
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ void VideoFifo_CheckEFBAccess()
|
||||||
|
|
||||||
u32 VideoBackendHLE::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
|
u32 VideoBackendHLE::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
|
||||||
{
|
{
|
||||||
if (s_PluginInitialized)
|
if (s_BackendInitialized)
|
||||||
{
|
{
|
||||||
s_accessEFBArgs.type = type;
|
s_accessEFBArgs.type = type;
|
||||||
s_accessEFBArgs.x = x;
|
s_accessEFBArgs.x = x;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "CommonTypes.h"
|
#include "CommonTypes.h"
|
||||||
|
|
||||||
extern bool s_PluginInitialized;
|
extern bool s_BackendInitialized;
|
||||||
extern u32 s_efbAccessRequested;
|
extern u32 s_efbAccessRequested;
|
||||||
extern volatile u32 s_FifoShuttingDown;
|
extern volatile u32 s_FifoShuttingDown;
|
||||||
extern volatile u32 s_swapRequested;
|
extern volatile u32 s_swapRequested;
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct PortableVertexDeclaration
|
||||||
};
|
};
|
||||||
|
|
||||||
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
|
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
|
||||||
// is in the respective plugin, not here in VideoCommon.
|
// is in the respective backend, not here in VideoCommon.
|
||||||
|
|
||||||
// Note that this class can't just invent arbitrary vertex formats out of its input -
|
// Note that this class can't just invent arbitrary vertex formats out of its input -
|
||||||
// all the data loading code must always be made compatible.
|
// all the data loading code must always be made compatible.
|
||||||
|
|
|
@ -124,7 +124,7 @@ void InterpretDisplayList(u32 address, u32 size)
|
||||||
g_pVideoData = old_pVideoData;
|
g_pVideoData = old_pVideoData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defer to plugin-specific DL cache.
|
// Defer to backend-specific DL cache.
|
||||||
extern bool HandleDisplayList(u32 address, u32 size);
|
extern bool HandleDisplayList(u32 address, u32 size);
|
||||||
|
|
||||||
void ExecuteDisplayList(u32 address, u32 size)
|
void ExecuteDisplayList(u32 address, u32 size)
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#define GX_DRAW_LINES 0x5 // 0xA8
|
#define GX_DRAW_LINES 0x5 // 0xA8
|
||||||
#define GX_DRAW_LINE_STRIP 0x6 // 0xB0
|
#define GX_DRAW_LINE_STRIP 0x6 // 0xB0
|
||||||
#define GX_DRAW_POINTS 0x7 // 0xB8
|
#define GX_DRAW_POINTS 0x7 // 0xB8
|
||||||
#define GX_DRAW_NONE 0x1; //Tis is a fake value to used in the plugins
|
#define GX_DRAW_NONE 0x1; //Tis is a fake value to used in the backends
|
||||||
void OpcodeDecoder_Init();
|
void OpcodeDecoder_Init();
|
||||||
void OpcodeDecoder_Shutdown();
|
void OpcodeDecoder_Shutdown();
|
||||||
void OpcodeDecoder_Run(bool skipped_frame);
|
void OpcodeDecoder_Run(bool skipped_frame);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
// TODO: Make a more centralized version of this (for now every plugin that will use it will create its own context, which is weird). An object maybe?
|
// TODO: Make a more centralized version of this (for now every backend that will use it will create its own context, which is weird). An object maybe?
|
||||||
|
|
||||||
#include "OpenCL.h"
|
#include "OpenCL.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
|
@ -342,13 +342,13 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
||||||
//{
|
//{
|
||||||
g_bSignalTokenInterrupt = true;
|
g_bSignalTokenInterrupt = true;
|
||||||
//_dbg_assert_msg_(PIXELENGINE, (CommandProcessor::fifo.PEToken == (userdata&0xFFFF)), "WTF? BPMEM_PE_TOKEN_INT_ID's token != BPMEM_PE_TOKEN_ID's token" );
|
//_dbg_assert_msg_(PIXELENGINE, (CommandProcessor::fifo.PEToken == (userdata&0xFFFF)), "WTF? BPMEM_PE_TOKEN_INT_ID's token != BPMEM_PE_TOKEN_ID's token" );
|
||||||
INFO_LOG(PIXELENGINE, "VIDEO Plugin raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", CommandProcessor::fifo.PEToken);
|
INFO_LOG(PIXELENGINE, "VIDEO Backend raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", CommandProcessor::fifo.PEToken);
|
||||||
UpdateInterrupts();
|
UpdateInterrupts();
|
||||||
CommandProcessor::interruptTokenWaiting = false;
|
CommandProcessor::interruptTokenWaiting = false;
|
||||||
IncrementCheckContextId();
|
IncrementCheckContextId();
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
// LOGV(PIXELENGINE, 1, "VIDEO Plugin wrote token: %i", CommandProcessor::fifo.PEToken);
|
// LOGV(PIXELENGINE, 1, "VIDEO Backend wrote token: %i", CommandProcessor::fifo.PEToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
|
void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
|
||||||
|
|
|
@ -75,7 +75,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress);
|
||||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||||
|
|
||||||
// gfx plugin support
|
// gfx backend support
|
||||||
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||||
void SetFinish(void);
|
void SetFinish(void);
|
||||||
void ResetSetFinish(void);
|
void ResetSetFinish(void);
|
||||||
|
|
|
@ -10,15 +10,15 @@ public:
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
// values from OGL plugin
|
// values from OGL backend
|
||||||
//MAXVBUFFERSIZE = 0x1FFFF,
|
//MAXVBUFFERSIZE = 0x1FFFF,
|
||||||
//MAXIBUFFERSIZE = 0xFFFF,
|
//MAXIBUFFERSIZE = 0xFFFF,
|
||||||
|
|
||||||
// values from DX9 plugin
|
// values from DX9 backend
|
||||||
//MAXVBUFFERSIZE = 0x50000,
|
//MAXVBUFFERSIZE = 0x50000,
|
||||||
//MAXIBUFFERSIZE = 0xFFFF,
|
//MAXIBUFFERSIZE = 0xFFFF,
|
||||||
|
|
||||||
// values from DX11 plugin
|
// values from DX11 backend
|
||||||
MAXVBUFFERSIZE = 0x50000,
|
MAXVBUFFERSIZE = 0x50000,
|
||||||
MAXIBUFFERSIZE = 0x10000,
|
MAXIBUFFERSIZE = 0x10000,
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,7 +80,7 @@ struct EFBRectangle : public MathUtil::Rectangle<int>
|
||||||
struct TargetRectangle : public MathUtil::Rectangle<int>
|
struct TargetRectangle : public MathUtil::Rectangle<int>
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Only used by D3D plugin.
|
// Only used by D3D backend.
|
||||||
const RECT *AsRECT() const
|
const RECT *AsRECT() const
|
||||||
{
|
{
|
||||||
// The types are binary compatible so this works.
|
// The types are binary compatible so this works.
|
||||||
|
|
|
@ -222,7 +222,7 @@ void VideoConfig::GameIniLoad(const char *ini_file)
|
||||||
void VideoConfig::VerifyValidity()
|
void VideoConfig::VerifyValidity()
|
||||||
{
|
{
|
||||||
// TODO: Check iMaxAnisotropy value
|
// TODO: Check iMaxAnisotropy value
|
||||||
if (iAdapter >= backend_info.Adapters.size()) iAdapter = 0;
|
if (iAdapter >= (int)backend_info.Adapters.size()) iAdapter = 0;
|
||||||
if (!backend_info.bSupportsEFBToRAM) bCopyEFBToTexture = true;
|
if (!backend_info.bSupportsEFBToRAM) bCopyEFBToTexture = true;
|
||||||
if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0;
|
if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0;
|
||||||
if (!backend_info.bSupportsRealXFB) bUseRealXFB = false;
|
if (!backend_info.bSupportsRealXFB) bUseRealXFB = false;
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
// at the start of every frame. Noone should ever change members of g_ActiveConfig
|
// at the start of every frame. Noone should ever change members of g_ActiveConfig
|
||||||
// directly.
|
// directly.
|
||||||
|
|
||||||
#ifndef _PLUGIN_VIDEO_CONFIG_H_
|
#ifndef _VIDEO_CONFIG_H_
|
||||||
#define _PLUGIN_VIDEO_CONFIG_H_
|
#define _VIDEO_CONFIG_H_
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "VideoCommon.h"
|
#include "VideoCommon.h"
|
||||||
|
@ -173,4 +173,4 @@ void UpdateActiveConfig();
|
||||||
|
|
||||||
void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip, TargetRectangle *rc);
|
void ComputeDrawRectangle(int backbuffer_width, int backbuffer_height, bool flip, TargetRectangle *rc);
|
||||||
|
|
||||||
#endif // _PLUGIN_VIDEO_CONFIG_H_
|
#endif // _VIDEO_CONFIG_H_
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
add_subdirectory(Plugin_VideoOGL)
|
add_subdirectory(Plugin_VideoOGL)
|
||||||
add_subdirectory(Plugin_VideoSoftware)
|
add_subdirectory(Plugin_VideoSoftware)
|
||||||
# TODO: Add other plugins here!
|
# TODO: Add other backends here!
|
||||||
|
|
|
@ -112,7 +112,7 @@ HRESULT LoadD3DX()
|
||||||
if (hD3DXDll) return S_OK;
|
if (hD3DXDll) return S_OK;
|
||||||
|
|
||||||
// try to load D3DX11 first to check whether we have proper runtime support
|
// try to load D3DX11 first to check whether we have proper runtime support
|
||||||
// try to use the dll the plugin was compiled against first - don't bother about debug runtimes
|
// try to use the dll the backend was compiled against first - don't bother about debug runtimes
|
||||||
hD3DXDll = LoadLibraryA(StringFromFormat("d3dx11_%d.dll", D3DX11_SDK_VERSION).c_str());
|
hD3DXDll = LoadLibraryA(StringFromFormat("d3dx11_%d.dll", D3DX11_SDK_VERSION).c_str());
|
||||||
if (!hD3DXDll)
|
if (!hD3DXDll)
|
||||||
{
|
{
|
||||||
|
@ -243,14 +243,14 @@ HRESULT Create(HWND wnd)
|
||||||
IDXGIAdapter* adapter;
|
IDXGIAdapter* adapter;
|
||||||
IDXGIOutput* output;
|
IDXGIOutput* output;
|
||||||
hr = PCreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
|
hr = PCreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
|
||||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
|
|
||||||
hr = factory->EnumAdapters(g_ActiveConfig.iAdapter, &adapter);
|
hr = factory->EnumAdapters(g_ActiveConfig.iAdapter, &adapter);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
// try using the first one
|
// try using the first one
|
||||||
hr = factory->EnumAdapters(0, &adapter);
|
hr = factory->EnumAdapters(0, &adapter);
|
||||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Make this configurable
|
// TODO: Make this configurable
|
||||||
|
@ -259,7 +259,7 @@ HRESULT Create(HWND wnd)
|
||||||
{
|
{
|
||||||
// try using the first one
|
// try using the first one
|
||||||
hr = adapter->EnumOutputs(0, &output);
|
hr = adapter->EnumOutputs(0, &output);
|
||||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get supported AA modes
|
// get supported AA modes
|
||||||
|
@ -287,7 +287,7 @@ HRESULT Create(HWND wnd)
|
||||||
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
mode_desc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
mode_desc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
||||||
hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL);
|
hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL);
|
||||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
|
|
||||||
// forcing buffer resolution to xres and yres.. TODO: The new video mode might not actually be supported!
|
// forcing buffer resolution to xres and yres.. TODO: The new video mode might not actually be supported!
|
||||||
swap_chain_desc.BufferDesc.Width = xres;
|
swap_chain_desc.BufferDesc.Width = xres;
|
||||||
|
@ -304,7 +304,7 @@ HRESULT Create(HWND wnd)
|
||||||
&featlevel, &context);
|
&featlevel, &context);
|
||||||
if (FAILED(hr) || !device || !context || !swapchain)
|
if (FAILED(hr) || !device || !context || !swapchain)
|
||||||
{
|
{
|
||||||
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
SAFE_RELEASE(device);
|
SAFE_RELEASE(device);
|
||||||
SAFE_RELEASE(context);
|
SAFE_RELEASE(context);
|
||||||
SAFE_RELEASE(swapchain);
|
SAFE_RELEASE(swapchain);
|
||||||
|
@ -319,7 +319,7 @@ HRESULT Create(HWND wnd)
|
||||||
hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
SAFE_RELEASE(device);
|
SAFE_RELEASE(device);
|
||||||
SAFE_RELEASE(context);
|
SAFE_RELEASE(context);
|
||||||
SAFE_RELEASE(swapchain);
|
SAFE_RELEASE(swapchain);
|
||||||
|
@ -431,7 +431,7 @@ void Reset()
|
||||||
HRESULT hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
HRESULT hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||||
SAFE_RELEASE(device);
|
SAFE_RELEASE(device);
|
||||||
SAFE_RELEASE(context);
|
SAFE_RELEASE(context);
|
||||||
SAFE_RELEASE(swapchain);
|
SAFE_RELEASE(swapchain);
|
||||||
|
|
|
@ -81,8 +81,8 @@ inline void SetDebugObjectName(ID3D11DeviceChild* resource, const char* name)
|
||||||
|
|
||||||
// Used to not require the SDK and runtime versions to match:
|
// Used to not require the SDK and runtime versions to match:
|
||||||
// Linking with d3dx11.lib makes the most recent d3dx11_xx.dll of the
|
// Linking with d3dx11.lib makes the most recent d3dx11_xx.dll of the
|
||||||
// compiler's SDK a requirement, but this plugin works with DX11 runtimes
|
// compiler's SDK a requirement, but this backend works with DX11 runtimes
|
||||||
// back to August 2009 even if the plugin was built with June 2010.
|
// back to August 2009 even if the backend was built with June 2010.
|
||||||
// Add any d3dx11 functions which you want to use here and load them in Create()
|
// Add any d3dx11 functions which you want to use here and load them in Create()
|
||||||
typedef HRESULT (WINAPI* D3DX11COMPILEFROMMEMORYTYPE)(LPCSTR, SIZE_T, LPCSTR, const D3D10_SHADER_MACRO*, LPD3D10INCLUDE, LPCSTR, LPCSTR, UINT, UINT, ID3DX11ThreadPump*, ID3D10Blob**, ID3D10Blob**, HRESULT*);
|
typedef HRESULT (WINAPI* D3DX11COMPILEFROMMEMORYTYPE)(LPCSTR, SIZE_T, LPCSTR, const D3D10_SHADER_MACRO*, LPD3D10INCLUDE, LPCSTR, LPCSTR, UINT, UINT, ID3DX11ThreadPump*, ID3D10Blob**, ID3D10Blob**, HRESULT*);
|
||||||
typedef HRESULT (WINAPI* D3DX11FILTERTEXTURETYPE)(ID3D11DeviceContext*, ID3D11Resource*, UINT, UINT);
|
typedef HRESULT (WINAPI* D3DX11FILTERTEXTURETYPE)(ID3D11DeviceContext*, ID3D11Resource*, UINT, UINT);
|
||||||
|
|
|
@ -77,19 +77,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||||
SetWindowTextA(EmuWindow::GetWnd(), temp);
|
SetWindowTextA(EmuWindow::GetWnd(), temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|
||||||
//{
|
|
||||||
// _PluginInfo->Version = 0x0100;
|
|
||||||
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
|
||||||
//#ifdef DEBUGFAST
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (DebugFast)");
|
|
||||||
//#elif defined _DEBUG
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
|
|
||||||
//#else
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
|
|
||||||
//#endif
|
|
||||||
//}
|
|
||||||
|
|
||||||
std::string VideoBackend::GetName()
|
std::string VideoBackend::GetName()
|
||||||
{
|
{
|
||||||
return "Direct3D11";
|
return "Direct3D11";
|
||||||
|
@ -189,8 +176,8 @@ void VideoBackend::Initialize()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSD::AddMessage("Dolphin Direct3D11 Video Plugin.", 5000);
|
OSD::AddMessage("Dolphin Direct3D11 Video Backend.", 5000);
|
||||||
s_PluginInitialized = true;
|
s_BackendInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackend::Video_Prepare()
|
void VideoBackend::Video_Prepare()
|
||||||
|
@ -225,7 +212,7 @@ void VideoBackend::Video_Prepare()
|
||||||
|
|
||||||
void VideoBackend::Shutdown()
|
void VideoBackend::Shutdown()
|
||||||
{
|
{
|
||||||
s_PluginInitialized = false;
|
s_BackendInitialized = false;
|
||||||
|
|
||||||
s_efbAccessRequested = FALSE;
|
s_efbAccessRequested = FALSE;
|
||||||
s_FifoShuttingDown = FALSE;
|
s_FifoShuttingDown = FALSE;
|
||||||
|
@ -249,7 +236,7 @@ void VideoBackend::Shutdown()
|
||||||
delete g_renderer;
|
delete g_renderer;
|
||||||
EmuWindow::Close();
|
EmuWindow::Close();
|
||||||
|
|
||||||
s_PluginInitialized = false;
|
s_BackendInitialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,7 +412,7 @@ HRESULT Create(int adapter, HWND wnd, int _resolution, int aa_mode, bool auto_de
|
||||||
{
|
{
|
||||||
MessageBox(wnd,
|
MessageBox(wnd,
|
||||||
_T("Failed to initialize Direct3D."),
|
_T("Failed to initialize Direct3D."),
|
||||||
_T("Dolphin Direct3D plugin"), MB_OK | MB_ICONERROR);
|
_T("Dolphin Direct3D Backend"), MB_OK | MB_ICONERROR);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,19 +85,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||||
SetWindowText(EmuWindow::GetWnd(), temp);
|
SetWindowText(EmuWindow::GetWnd(), temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
|
||||||
//{
|
|
||||||
// _PluginInfo->Version = 0x0100;
|
|
||||||
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
|
||||||
//#ifdef DEBUGFAST
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9 (DebugFast)");
|
|
||||||
//#elif defined _DEBUG
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9 (Debug)");
|
|
||||||
//#else
|
|
||||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9");
|
|
||||||
//#endif
|
|
||||||
//}
|
|
||||||
|
|
||||||
std::string VideoBackend::GetName()
|
std::string VideoBackend::GetName()
|
||||||
{
|
{
|
||||||
return "Direct3D9";
|
return "Direct3D9";
|
||||||
|
@ -174,8 +161,8 @@ void VideoBackend::Initialize()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSD::AddMessage("Dolphin Direct3D9 Video Plugin.", 5000);
|
OSD::AddMessage("Dolphin Direct3D9 Video Backend.", 5000);
|
||||||
s_PluginInitialized = true;
|
s_BackendInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackend::Video_Prepare()
|
void VideoBackend::Video_Prepare()
|
||||||
|
@ -200,13 +187,13 @@ void VideoBackend::Video_Prepare()
|
||||||
PixelEngine::Init();
|
PixelEngine::Init();
|
||||||
DLCache::Init();
|
DLCache::Init();
|
||||||
|
|
||||||
// Notify the core that the video plugin is ready
|
// Notify the core that the video backend is ready
|
||||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackend::Shutdown()
|
void VideoBackend::Shutdown()
|
||||||
{
|
{
|
||||||
s_PluginInitialized = false;
|
s_BackendInitialized = false;
|
||||||
|
|
||||||
s_efbAccessRequested = FALSE;
|
s_efbAccessRequested = FALSE;
|
||||||
s_FifoShuttingDown = FALSE;
|
s_FifoShuttingDown = FALSE;
|
||||||
|
|
|
@ -593,7 +593,7 @@ void OpenGL_Update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Close plugin
|
// Close backend
|
||||||
void OpenGL_Shutdown()
|
void OpenGL_Shutdown()
|
||||||
{
|
{
|
||||||
#if defined(USE_WX) && USE_WX
|
#if defined(USE_WX) && USE_WX
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// OpenGL Plugin Documentation
|
// OpenGL Backend Documentation
|
||||||
/*
|
/*
|
||||||
|
|
||||||
1.1 Display settings
|
1.1 Display settings
|
||||||
|
@ -173,8 +173,8 @@ void VideoBackend::Initialize()
|
||||||
if (!OpenGL_Create(640, 480))
|
if (!OpenGL_Create(640, 480))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OSD::AddMessage("Dolphin OpenGL Video Plugin.", 5000);
|
OSD::AddMessage("Dolphin OpenGL Video Backend.", 5000);
|
||||||
s_PluginInitialized = true;
|
s_BackendInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called after Initialize() from the Core
|
// This is called after Initialize() from the Core
|
||||||
|
@ -213,16 +213,16 @@ void VideoBackend::Video_Prepare()
|
||||||
TextureConverter::Init();
|
TextureConverter::Init();
|
||||||
DLCache::Init();
|
DLCache::Init();
|
||||||
|
|
||||||
// Notify the core that the video plugin is ready
|
// Notify the core that the video backend is ready
|
||||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Video plugin initialized.");
|
INFO_LOG(VIDEO, "Video backend initialized.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackend::Shutdown()
|
void VideoBackend::Shutdown()
|
||||||
{
|
{
|
||||||
s_PluginInitialized = false;
|
s_BackendInitialized = false;
|
||||||
|
|
||||||
s_efbAccessRequested = false;
|
s_efbAccessRequested = false;
|
||||||
s_FifoShuttingDown = false;
|
s_FifoShuttingDown = false;
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
bool fifoStateRun;
|
bool fifoStateRun;
|
||||||
|
|
||||||
// set to 0 if using in video common
|
// set to 0 if using in video common
|
||||||
#define SW_PLUGIN 1
|
#define SW_BACKEND 1
|
||||||
|
|
||||||
#if (SW_PLUGIN)
|
#if (SW_BACKEND)
|
||||||
|
|
||||||
#include "OpcodeDecoder.h"
|
#include "OpcodeDecoder.h"
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ void UpdateInterrupts(u64 userdata)
|
||||||
interruptWaiting = false;
|
interruptWaiting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateInterruptsFromVideoPlugin(u64 userdata)
|
void UpdateInterruptsFromVideoBackend(u64 userdata)
|
||||||
{
|
{
|
||||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
||||||
}
|
}
|
||||||
|
@ -405,7 +405,7 @@ void SetStatus()
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
||||||
{
|
{
|
||||||
interruptWaiting = true;
|
interruptWaiting = true;
|
||||||
SWCommandProcessor::UpdateInterruptsFromVideoPlugin(userdata);
|
SWCommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SWCommandProcessor::UpdateInterrupts(userdata);
|
SWCommandProcessor::UpdateInterrupts(userdata);
|
||||||
|
@ -427,7 +427,7 @@ bool RunBuffer()
|
||||||
|
|
||||||
u32 availableBytes = writePos - readPos;
|
u32 availableBytes = writePos - readPos;
|
||||||
|
|
||||||
#if (SW_PLUGIN)
|
#if (SW_BACKEND)
|
||||||
while (OpcodeDecoder::CommandRunnable(availableBytes))
|
while (OpcodeDecoder::CommandRunnable(availableBytes))
|
||||||
{
|
{
|
||||||
cpreg.status.CommandIdle = 0;
|
cpreg.status.CommandIdle = 0;
|
||||||
|
@ -470,7 +470,7 @@ bool RunBuffer()
|
||||||
|
|
||||||
|
|
||||||
// fifo functions
|
// fifo functions
|
||||||
#if (SW_PLUGIN)
|
#if (SW_BACKEND)
|
||||||
|
|
||||||
void SWFifo_EnterLoop()
|
void SWFifo_EnterLoop()
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ void Fifo_EnterLoop();
|
||||||
void Fifo_ExitLoop();
|
void Fifo_ExitLoop();
|
||||||
void Fifo_SetRendering(bool bEnabled);
|
void Fifo_SetRendering(bool bEnabled);
|
||||||
|
|
||||||
// Implemented by the Video Plugin
|
// Implemented by the Video Backend
|
||||||
void VideoFifo_CheckSwapRequest();
|
void VideoFifo_CheckSwapRequest();
|
||||||
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
||||||
void VideoFifo_CheckEFBAccess();
|
void VideoFifo_CheckEFBAccess();
|
||||||
|
@ -162,7 +162,7 @@ namespace SWCommandProcessor
|
||||||
// for CGPFIFO
|
// for CGPFIFO
|
||||||
void GatherPipeBursted();
|
void GatherPipeBursted();
|
||||||
void UpdateInterrupts(u64 userdata);
|
void UpdateInterrupts(u64 userdata);
|
||||||
void UpdateInterruptsFromVideoPlugin(u64 userdata);
|
void UpdateInterruptsFromVideoBackend(u64 userdata);
|
||||||
|
|
||||||
|
|
||||||
} // end of namespace SWCommandProcessor
|
} // end of namespace SWCommandProcessor
|
||||||
|
|
|
@ -140,7 +140,7 @@ void UpdateInterrupts()
|
||||||
void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
||||||
{
|
{
|
||||||
g_bSignalTokenInterrupt = true;
|
g_bSignalTokenInterrupt = true;
|
||||||
INFO_LOG(PIXELENGINE, "VIDEO Plugin raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", pereg.token);
|
INFO_LOG(PIXELENGINE, "VIDEO Backend raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", pereg.token);
|
||||||
UpdateInterrupts();
|
UpdateInterrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace SWPixelEngine
|
||||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||||
|
|
||||||
// gfx plugin support
|
// gfx backend support
|
||||||
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||||
void SetFinish(void);
|
void SetFinish(void);
|
||||||
bool AllowIdleSkipping();
|
bool AllowIdleSkipping();
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#ifndef _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
#ifndef _VIDEOSOFTWARE_CONFIG_H_
|
||||||
#define _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
#define _VIDEOSOFTWARE_CONFIG_H_
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
|
@ -52,4 +52,4 @@ struct SWVideoConfig : NonCopyable
|
||||||
|
|
||||||
extern SWVideoConfig g_SWVideoConfig;
|
extern SWVideoConfig g_SWVideoConfig;
|
||||||
|
|
||||||
#endif // _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
#endif // _VIDEOSOFTWARE_CONFIG_H_
|
||||||
|
|
|
@ -100,7 +100,7 @@ void VideoBackend::Video_Prepare()
|
||||||
{
|
{
|
||||||
SWRenderer::Prepare();
|
SWRenderer::Prepare();
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Video plugin initialized.");
|
INFO_LOG(VIDEO, "Video backend initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run from the CPU thread (from VideoInterface.cpp)
|
// Run from the CPU thread (from VideoInterface.cpp)
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
#ifndef _PLUGIN_VIDEOSOFTWARE_CONFIG_DIAG_H_
|
#ifndef _VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||||
#define _PLUGIN_VIDEOSOFTWARE_CONFIG_DIAG_H_
|
#define _VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
Loading…
Reference in New Issue