Remove the old MMIO access "interface".
This commit is contained in:
parent
f8f14c83a3
commit
92f8d93e96
|
@ -47,7 +47,6 @@ enum LOG_TYPE
|
|||
STREAMINGINTERFACE,
|
||||
VIDEO,
|
||||
VIDEOINTERFACE,
|
||||
WII_IOB,
|
||||
WII_IPC,
|
||||
WII_IPC_DVD,
|
||||
WII_IPC_ES,
|
||||
|
|
|
@ -60,7 +60,6 @@ LogManager::LogManager()
|
|||
m_Log[LogTypes::CONSOLE] = new LogContainer("CONSOLE", "Dolphin Console");
|
||||
m_Log[LogTypes::OSREPORT] = new LogContainer("OSREPORT", "OSReport");
|
||||
m_Log[LogTypes::WIIMOTE] = new LogContainer("Wiimote", "Wiimote");
|
||||
m_Log[LogTypes::WII_IOB] = new LogContainer("WII_IOB", "WII IO Bridge");
|
||||
m_Log[LogTypes::WII_IPC] = new LogContainer("WII_IPC", "WII IPC");
|
||||
m_Log[LogTypes::WII_IPC_HID] = new LogContainer("WII_IPC_HID", "WII IPC HID");
|
||||
m_Log[LogTypes::WII_IPC_HLE] = new LogContainer("WII_IPC_HLE", "WII IPC HLE");
|
||||
|
|
|
@ -120,7 +120,6 @@ set(SRCS ActionReplay.cpp
|
|||
HW/StreamADPCM.cpp
|
||||
HW/SystemTimers.cpp
|
||||
HW/VideoInterface.cpp
|
||||
HW/WII_IOB.cpp
|
||||
HW/WII_IPC.cpp
|
||||
HW/Wiimote.cpp
|
||||
HW/WiimoteEmu/WiimoteEmu.cpp
|
||||
|
|
|
@ -171,7 +171,6 @@
|
|||
<ClCompile Include="HW\WiimoteEmu\WiimoteEmu.cpp" />
|
||||
<ClCompile Include="HW\WiimoteReal\IOWin.cpp" />
|
||||
<ClCompile Include="HW\WiimoteReal\WiimoteReal.cpp" />
|
||||
<ClCompile Include="HW\WII_IOB.cpp" />
|
||||
<ClCompile Include="HW\WII_IPC.cpp" />
|
||||
<ClCompile Include="IPC_HLE\ICMPWin.cpp" />
|
||||
<ClCompile Include="IPC_HLE\WiiMote_HID_Attr.cpp" />
|
||||
|
@ -371,7 +370,6 @@
|
|||
<ClInclude Include="HW\WiimoteEmu\WiimoteHid.h" />
|
||||
<ClInclude Include="HW\WiimoteReal\WiimoteReal.h" />
|
||||
<ClInclude Include="HW\WiimoteReal\WiimoteRealBase.h" />
|
||||
<ClInclude Include="HW\WII_IOB.h" />
|
||||
<ClInclude Include="HW\WII_IPC.h" />
|
||||
<ClInclude Include="IPC_HLE\fakepoll.h" />
|
||||
<ClInclude Include="IPC_HLE\hci.h" />
|
||||
|
|
|
@ -492,9 +492,6 @@
|
|||
<ClCompile Include="HW\WiimoteReal\WiimoteReal.cpp">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Real</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HW\WII_IOB.cpp">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wii IO Bridge</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HW\WII_IPC.cpp">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wii IPC</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1025,9 +1022,6 @@
|
|||
<ClInclude Include="HW\WiimoteReal\WiimoteRealBase.h">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wiimote\Real</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HW\WII_IOB.h">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wii IO Bridge</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HW\WII_IPC.h">
|
||||
<Filter>HW %28Flipper/Hollywood%29\Wii IPC</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -256,18 +256,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _Value, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Value);
|
||||
}
|
||||
|
||||
static void UpdateInterrupts()
|
||||
{
|
||||
ProcessorInterface::SetInterrupt(
|
||||
|
|
|
@ -26,9 +26,6 @@ void Update(u64 userdata, int cyclesLate);
|
|||
void Callback_GetSampleRate(unsigned int &_AISampleRate, unsigned int &_DACSampleRate);
|
||||
unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples, unsigned int _sampleRate = 48000);
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
// Get the audio rates (48000 or 32000 only)
|
||||
unsigned int GetAIDSampleRate();
|
||||
|
||||
|
|
|
@ -441,31 +441,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
}
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _Value, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Value);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
|
||||
// UpdateInterrupts
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
|
|
|
@ -38,14 +38,6 @@ void DoState(PointerWrap &p);
|
|||
void GenerateDSPInterrupt(DSPInterruptType _DSPInterruptType, bool _bSet = true);
|
||||
void GenerateDSPInterruptFromDSPEmu(DSPInterruptType _DSPInterruptType, bool _bSet = true);
|
||||
|
||||
// Read32
|
||||
void Read16(u16& _uReturnValue, const u32 _uAddress);
|
||||
void Read32(u32& _uReturnValue, const u32 _uAddress);
|
||||
|
||||
// Write
|
||||
void Write16(const u16 _uValue, const u32 _uAddress);
|
||||
void Write32(const u32 _uValue, const u32 _uAddress);
|
||||
|
||||
// Audio/DSP Helper
|
||||
u8 ReadARAM(const u32 _uAddress);
|
||||
void WriteARAM(u8 value, u32 _uAddress);
|
||||
|
|
|
@ -501,18 +501,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
if ((m_DISR.DEINT & m_DISR.DEINITMASK) ||
|
||||
|
|
|
@ -35,12 +35,6 @@ bool DVDRead(u32 _iDVDOffset, u32 _iRamAddress, u32 _iLength);
|
|||
bool DVDReadADPCM(u8* _pDestBuffer, u32 _iNumSamples);
|
||||
extern bool g_bStream;
|
||||
|
||||
// Read32
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
|
||||
// Write32
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
|
||||
// Not sure about endianness here. I'll just name them like this...
|
||||
enum DIErrorLow
|
||||
|
|
|
@ -113,18 +113,6 @@ void Update()
|
|||
g_Channels[2]->Update();
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
// Interrupts are mapped a bit strangely:
|
||||
|
|
|
@ -32,7 +32,4 @@ void ChangeDeviceCallback(u64 userdata, int cyclesLate);
|
|||
void ChangeDevice(const u8 channel, const TEXIDevices device_type, const u8 device_num);
|
||||
IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex=-1);
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
} // end of namespace ExpansionInterface
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
|
||||
#include "MMIOHandlers.h"
|
||||
|
||||
// HACK: Remove when the new MMIO interface is used.
|
||||
#include "Memmap.h"
|
||||
|
||||
namespace MMIO
|
||||
{
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "EXI.h"
|
||||
#include "AudioInterface.h"
|
||||
#include "MemoryInterface.h"
|
||||
#include "WII_IOB.h"
|
||||
#include "WII_IPC.h"
|
||||
#include "../ConfigManager.h"
|
||||
#include "../Debugger/Debugger_SymbolMap.h"
|
||||
|
@ -87,227 +86,6 @@ u8 *m_pVirtualFakeVMEM;
|
|||
// MMIO mapping object.
|
||||
MMIO::Mapping* mmio_mapping;
|
||||
|
||||
// =================================
|
||||
// Read and write shortcuts
|
||||
// ----------------
|
||||
writeFn8 hwWrite8 [NUMHWMEMFUN];
|
||||
writeFn16 hwWrite16[NUMHWMEMFUN];
|
||||
writeFn32 hwWrite32[NUMHWMEMFUN];
|
||||
writeFn64 hwWrite64[NUMHWMEMFUN];
|
||||
|
||||
readFn8 hwRead8 [NUMHWMEMFUN];
|
||||
readFn16 hwRead16[NUMHWMEMFUN];
|
||||
readFn32 hwRead32[NUMHWMEMFUN];
|
||||
readFn64 hwRead64[NUMHWMEMFUN];
|
||||
|
||||
writeFn8 hwWriteWii8 [NUMHWMEMFUN];
|
||||
writeFn16 hwWriteWii16[NUMHWMEMFUN];
|
||||
writeFn32 hwWriteWii32[NUMHWMEMFUN];
|
||||
writeFn64 hwWriteWii64[NUMHWMEMFUN];
|
||||
|
||||
readFn8 hwReadWii8 [NUMHWMEMFUN];
|
||||
readFn16 hwReadWii16[NUMHWMEMFUN];
|
||||
readFn32 hwReadWii32[NUMHWMEMFUN];
|
||||
readFn64 hwReadWii64[NUMHWMEMFUN];
|
||||
|
||||
// Default read and write functions
|
||||
template <class T>
|
||||
void HW_Default_Write(const T _Data, const u32 _Address){ ERROR_LOG(MASTER_LOG, "Illegal HW Write%lu %08x", (unsigned long)sizeof(T)*8, _Address);_dbg_assert_(MEMMAP, 0);}
|
||||
|
||||
template <class T>
|
||||
void HW_Default_Read(T _Data, const u32 _Address){ ERROR_LOG(MASTER_LOG, "Illegal HW Read%lu %08x", (unsigned long)sizeof(T)*8, _Address); _dbg_assert_(MEMMAP, 0);}
|
||||
|
||||
#define HW_PAGE_SHIFT 10
|
||||
#define HW_PAGE_SIZE (1 << HW_PAGE_SHIFT)
|
||||
#define HW_PAGE_MASK (HW_PAGE_SHIFT - 1)
|
||||
|
||||
template <class T, u8 *P> void HW_Read_Memory(T &_Data, const u32 _Address)
|
||||
{
|
||||
_Data = *(T *)&P[_Address & HW_PAGE_MASK];
|
||||
}
|
||||
|
||||
template <class T, u8 *P> void HW_Write_Memory(T _Data, const u32 _Address)
|
||||
{
|
||||
*(T *)&P[_Address & HW_PAGE_MASK] = _Data;
|
||||
}
|
||||
|
||||
// Create shortcuts to the hardware devices' read and write functions.
|
||||
// This can be seen as an alternative to a switch() or if() table.
|
||||
#define BLOCKSIZE 4
|
||||
#define CP_START 0x00 //0x0000 >> 10
|
||||
#define WII_IPC_START 0x00 //0x0000 >> 10
|
||||
#define PE_START 0x04 //0x1000 >> 10
|
||||
#define VI_START 0x08 //0x2000 >> 10
|
||||
#define PI_START 0x0C //0x3000 >> 10
|
||||
#define MI_START 0x10 //0x4000 >> 10
|
||||
#define DSP_START 0x14 //0x5000 >> 10
|
||||
#define DVD_START 0x18 //0x6000 >> 10
|
||||
#define SI_START 0x19 //0x6400 >> 10
|
||||
#define EI_START 0x1A //0x6800 >> 10
|
||||
#define AUDIO_START 0x1B //0x6C00 >> 10
|
||||
#define GP_START 0x20 //0x8000 >> 10
|
||||
|
||||
void InitHWMemFuncs()
|
||||
{
|
||||
for (int i = 0; i < NUMHWMEMFUN; i++)
|
||||
{
|
||||
hwWrite8 [i] = HW_Default_Write<u8>;
|
||||
hwWrite16[i] = HW_Default_Write<u16>;
|
||||
hwWrite32[i] = HW_Default_Write<u32>;
|
||||
hwWrite64[i] = HW_Default_Write<u64>;
|
||||
hwRead8 [i] = HW_Default_Read<u8&>;
|
||||
hwRead16 [i] = HW_Default_Read<u16&>;
|
||||
hwRead32 [i] = HW_Default_Read<u32&>;
|
||||
hwRead64 [i] = HW_Default_Read<u64&>;
|
||||
|
||||
// To prevent Dolphin from crashing when accidentally running Wii
|
||||
// executables in GC mode (or running malicious GC executables...)
|
||||
hwWriteWii8 [i] = HW_Default_Write<u8>;
|
||||
hwWriteWii16[i] = HW_Default_Write<u16>;
|
||||
hwWriteWii32[i] = HW_Default_Write<u32>;
|
||||
hwWriteWii64[i] = HW_Default_Write<u64>;
|
||||
hwReadWii8 [i] = HW_Default_Read<u8&>;
|
||||
hwReadWii16 [i] = HW_Default_Read<u16&>;
|
||||
hwReadWii32 [i] = HW_Default_Read<u32&>;
|
||||
hwReadWii64 [i] = HW_Default_Read<u64&>;
|
||||
}
|
||||
|
||||
for (int i = 0; i < BLOCKSIZE; i++)
|
||||
{
|
||||
hwRead16 [CP_START+i] = g_video_backend->Video_CPRead16();
|
||||
hwWrite16[CP_START+i] = g_video_backend->Video_CPWrite16();
|
||||
|
||||
hwRead16 [PE_START+i] = g_video_backend->Video_PERead16();
|
||||
hwWrite16[PE_START+i] = g_video_backend->Video_PEWrite16();
|
||||
hwWrite32[PE_START+i] = g_video_backend->Video_PEWrite32();
|
||||
|
||||
hwRead8 [VI_START+i] = VideoInterface::Read8;
|
||||
hwRead16 [VI_START+i] = VideoInterface::Read16;
|
||||
hwRead32 [VI_START+i] = VideoInterface::Read32;
|
||||
hwWrite16[VI_START+i] = VideoInterface::Write16;
|
||||
hwWrite32[VI_START+i] = VideoInterface::Write32;
|
||||
|
||||
hwRead16 [PI_START+i] = ProcessorInterface::Read16;
|
||||
hwRead32 [PI_START+i] = ProcessorInterface::Read32;
|
||||
hwWrite32[PI_START+i] = ProcessorInterface::Write32;
|
||||
|
||||
hwRead16 [MI_START+i] = MemoryInterface::Read16;
|
||||
hwRead32 [MI_START+i] = MemoryInterface::Read32;
|
||||
hwWrite32[MI_START+i] = MemoryInterface::Write32;
|
||||
hwWrite16[MI_START+i] = MemoryInterface::Write16;
|
||||
|
||||
hwRead16 [DSP_START+i] = DSP::Read16;
|
||||
hwWrite16[DSP_START+i] = DSP::Write16;
|
||||
hwRead32 [DSP_START+i] = DSP::Read32;
|
||||
hwWrite32[DSP_START+i] = DSP::Write32;
|
||||
}
|
||||
|
||||
hwRead32 [DVD_START] = DVDInterface::Read32;
|
||||
hwWrite32[DVD_START] = DVDInterface::Write32;
|
||||
|
||||
hwRead32 [SI_START] = SerialInterface::Read32;
|
||||
hwWrite32[SI_START] = SerialInterface::Write32;
|
||||
|
||||
hwRead32 [EI_START] = ExpansionInterface::Read32;
|
||||
hwWrite32[EI_START] = ExpansionInterface::Write32;
|
||||
|
||||
hwRead32 [AUDIO_START] = AudioInterface::Read32;
|
||||
hwWrite32[AUDIO_START] = AudioInterface::Write32;
|
||||
|
||||
hwWrite8 [GP_START] = GPFifo::Write8;
|
||||
hwWrite16[GP_START] = GPFifo::Write16;
|
||||
hwWrite32[GP_START] = GPFifo::Write32;
|
||||
hwWrite64[GP_START] = GPFifo::Write64;
|
||||
}
|
||||
|
||||
|
||||
void InitHWMemFuncsWii()
|
||||
{
|
||||
for (int i = 0; i < NUMHWMEMFUN; i++)
|
||||
{
|
||||
hwWrite8 [i] = HW_Default_Write<u8>;
|
||||
hwWrite16[i] = HW_Default_Write<u16>;
|
||||
hwWrite32[i] = HW_Default_Write<u32>;
|
||||
hwWrite64[i] = HW_Default_Write<u64>;
|
||||
hwRead8 [i] = HW_Default_Read<u8&>;
|
||||
hwRead16 [i] = HW_Default_Read<u16&>;
|
||||
hwRead32 [i] = HW_Default_Read<u32&>;
|
||||
hwRead64 [i] = HW_Default_Read<u64&>;
|
||||
|
||||
hwWriteWii8 [i] = HW_Default_Write<u8>;
|
||||
hwWriteWii16[i] = HW_Default_Write<u16>;
|
||||
hwWriteWii32[i] = HW_Default_Write<u32>;
|
||||
hwWriteWii64[i] = HW_Default_Write<u64>;
|
||||
hwReadWii8 [i] = HW_Default_Read<u8&>;
|
||||
hwReadWii16 [i] = HW_Default_Read<u16&>;
|
||||
hwReadWii32 [i] = HW_Default_Read<u32&>;
|
||||
hwReadWii64 [i] = HW_Default_Read<u64&>;
|
||||
}
|
||||
|
||||
// MI, PI, DSP are still mapped to 0xCCxxxxxx
|
||||
for (int i = 0; i < BLOCKSIZE; i++)
|
||||
{
|
||||
hwRead16 [CP_START+i] = g_video_backend->Video_CPRead16();
|
||||
hwWrite16[CP_START+i] = g_video_backend->Video_CPWrite16();
|
||||
|
||||
hwRead16 [PE_START+i] = g_video_backend->Video_PERead16();
|
||||
hwWrite16[PE_START+i] = g_video_backend->Video_PEWrite16();
|
||||
hwWrite32[PE_START+i] = g_video_backend->Video_PEWrite32();
|
||||
|
||||
hwRead16 [PI_START+i] = ProcessorInterface::Read16;
|
||||
hwRead32 [PI_START+i] = ProcessorInterface::Read32;
|
||||
hwWrite32[PI_START+i] = ProcessorInterface::Write32;
|
||||
|
||||
hwRead8 [VI_START+i] = VideoInterface::Read8;
|
||||
hwRead16 [VI_START+i] = VideoInterface::Read16;
|
||||
hwRead32 [VI_START+i] = VideoInterface::Read32;
|
||||
hwWrite16[VI_START+i] = VideoInterface::Write16;
|
||||
hwWrite32[VI_START+i] = VideoInterface::Write32;
|
||||
|
||||
hwRead16 [MI_START+i] = MemoryInterface::Read16;
|
||||
hwRead32 [MI_START+i] = MemoryInterface::Read32;
|
||||
hwWrite32[MI_START+i] = MemoryInterface::Write32;
|
||||
hwWrite16[MI_START+i] = MemoryInterface::Write16;
|
||||
|
||||
hwRead16 [DSP_START+i] = DSP::Read16;
|
||||
hwWrite16[DSP_START+i] = DSP::Write16;
|
||||
hwRead32 [DSP_START+i] = DSP::Read32;
|
||||
hwWrite32[DSP_START+i] = DSP::Write32;
|
||||
}
|
||||
|
||||
hwWrite8 [GP_START] = GPFifo::Write8;
|
||||
hwWrite16[GP_START] = GPFifo::Write16;
|
||||
hwWrite32[GP_START] = GPFifo::Write32;
|
||||
hwWrite64[GP_START] = GPFifo::Write64;
|
||||
|
||||
for (int i = 0; i < BLOCKSIZE; i++)
|
||||
{
|
||||
hwReadWii32[WII_IPC_START+i] = WII_IPCInterface::Read32;
|
||||
hwWriteWii32[WII_IPC_START+i] = WII_IPCInterface::Write32;
|
||||
}
|
||||
|
||||
hwRead32 [DVD_START] = DVDInterface::Read32;
|
||||
hwReadWii32 [DVD_START] = DVDInterface::Read32;
|
||||
hwWrite32 [DVD_START] = DVDInterface::Write32;
|
||||
hwWriteWii32[DVD_START] = DVDInterface::Write32;
|
||||
|
||||
hwRead32 [SI_START] = SerialInterface::Read32;
|
||||
hwReadWii32 [SI_START] = SerialInterface::Read32;
|
||||
hwWrite32 [SI_START] = SerialInterface::Write32;
|
||||
hwWriteWii32[SI_START] = SerialInterface::Write32;
|
||||
|
||||
hwRead32 [EI_START] = ExpansionInterface::Read32;
|
||||
hwReadWii32 [EI_START] = ExpansionInterface::Read32;
|
||||
hwWrite32 [EI_START] = ExpansionInterface::Write32;
|
||||
hwWriteWii32[EI_START] = ExpansionInterface::Write32;
|
||||
|
||||
// [F|RES] i thought this doesn't exist anymore
|
||||
hwRead32 [AUDIO_START] = AudioInterface::Read32;
|
||||
hwReadWii32 [AUDIO_START] = AudioInterface::Read32;
|
||||
hwWrite32 [AUDIO_START] = AudioInterface::Write32;
|
||||
hwWriteWii32[AUDIO_START] = AudioInterface::Write32;
|
||||
}
|
||||
|
||||
void InitMMIO(MMIO::Mapping* mmio)
|
||||
{
|
||||
g_video_backend->RegisterCPMMIO(mmio, 0xCC000000);
|
||||
|
@ -333,11 +111,6 @@ void InitMMIOWii(MMIO::Mapping* mmio)
|
|||
AudioInterface::RegisterMMIO(mmio, 0xCD006C00);
|
||||
}
|
||||
|
||||
writeFn32 GetHWWriteFun32(const u32 _Address)
|
||||
{
|
||||
return hwWrite32[(_Address >> HWSHIFT) & (NUMHWMEMFUN-1)];
|
||||
}
|
||||
|
||||
bool IsInitialized()
|
||||
{
|
||||
return m_IsInitialized;
|
||||
|
@ -379,11 +152,6 @@ void Init()
|
|||
|
||||
mmio_mapping = new MMIO::Mapping();
|
||||
|
||||
if (wii)
|
||||
InitHWMemFuncsWii();
|
||||
else
|
||||
InitHWMemFuncs();
|
||||
|
||||
if (wii)
|
||||
InitMMIOWii(mmio_mapping);
|
||||
else
|
||||
|
|
|
@ -30,16 +30,6 @@
|
|||
class PointerWrap;
|
||||
namespace MMIO { class Mapping; }
|
||||
|
||||
typedef void (*writeFn8 )(const u8, const u32);
|
||||
typedef void (*writeFn16)(const u16,const u32);
|
||||
typedef void (*writeFn32)(const u32,const u32);
|
||||
typedef void (*writeFn64)(const u64,const u32);
|
||||
|
||||
typedef void (*readFn8 )(u8&, const u32);
|
||||
typedef void (*readFn16)(u16&, const u32);
|
||||
typedef void (*readFn32)(u32&, const u32);
|
||||
typedef void (*readFn64)(u64&, const u32);
|
||||
|
||||
namespace Memory
|
||||
{
|
||||
// Base is a pointer to the base of the memory map. Yes, some MMU tricks
|
||||
|
@ -103,11 +93,7 @@ u32 ReadUnchecked_U32(const u32 _Address);
|
|||
void WriteUnchecked_U8(const u8 _Data, const u32 _Address);
|
||||
void WriteUnchecked_U32(const u32 _Data, const u32 _Address);
|
||||
|
||||
void InitHWMemFuncs();
|
||||
void InitHWMemFuncsWii();
|
||||
|
||||
bool IsRAMAddress(const u32 addr, bool allow_locked_cache = false, bool allow_fake_vmem = false);
|
||||
writeFn32 GetHWWriteFun32(const u32 _Address);
|
||||
|
||||
inline u8* GetCachePtr() {return m_pL1Cache;}
|
||||
inline u8* GetMainRAMPtr() {return m_pRAM;}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "GPFifo.h"
|
||||
#include "Memmap.h"
|
||||
#include "WII_IOB.h"
|
||||
#include "../Core.h"
|
||||
#include "../PowerPC/PowerPC.h"
|
||||
#include "VideoBackendBase.h"
|
||||
|
@ -62,28 +61,6 @@ extern u8 *m_pEFB;
|
|||
extern bool m_IsInitialized;
|
||||
extern bool bFakeVMEM;
|
||||
|
||||
// Read and write shortcuts
|
||||
|
||||
// It appears that some clever games use stfd to write 64 bits to the fifo. Hence the hwWrite64.
|
||||
|
||||
extern writeFn8 hwWrite8 [NUMHWMEMFUN];
|
||||
extern writeFn16 hwWrite16[NUMHWMEMFUN];
|
||||
extern writeFn32 hwWrite32[NUMHWMEMFUN];
|
||||
extern writeFn64 hwWrite64[NUMHWMEMFUN];
|
||||
|
||||
extern readFn8 hwRead8 [NUMHWMEMFUN];
|
||||
extern readFn16 hwRead16[NUMHWMEMFUN];
|
||||
extern readFn32 hwRead32[NUMHWMEMFUN];
|
||||
|
||||
extern writeFn8 hwWriteWii8 [NUMHWMEMFUN];
|
||||
extern writeFn16 hwWriteWii16[NUMHWMEMFUN];
|
||||
extern writeFn32 hwWriteWii32[NUMHWMEMFUN];
|
||||
extern writeFn64 hwWriteWii64[NUMHWMEMFUN];
|
||||
|
||||
extern readFn8 hwReadWii8 [NUMHWMEMFUN];
|
||||
extern readFn16 hwReadWii16[NUMHWMEMFUN];
|
||||
extern readFn32 hwReadWii32[NUMHWMEMFUN];
|
||||
|
||||
// Overloaded byteswap functions, for use within the templated functions below.
|
||||
inline u8 bswap(u8 val) {return val;}
|
||||
inline u16 bswap(u16 val) {return Common::swap16(val);}
|
||||
|
@ -92,42 +69,6 @@ inline u64 bswap(u64 val) {return Common::swap64(val);}
|
|||
// =================
|
||||
|
||||
|
||||
// Read and write
|
||||
// ----------------
|
||||
// The read and write macros that direct us to the right functions
|
||||
|
||||
// All these little inline functions are needed because we can't paste symbols together in templates
|
||||
// like we can in macros.
|
||||
inline void hwRead(u8 &var, u32 addr) {hwRead8 [(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwRead(u16 &var, u32 addr) {hwRead16[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwRead(u32 &var, u32 addr) {hwRead32[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwRead(u64 &var, u32 addr) {PanicAlert("hwRead: There's no 64-bit HW read. %08x", addr);}
|
||||
|
||||
inline void hwWrite(u8 var, u32 addr) {hwWrite8[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWrite(u16 var, u32 addr) {hwWrite16[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWrite(u32 var, u32 addr) {hwWrite32[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWrite(u64 var, u32 addr) {hwWrite64[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
|
||||
inline void hwReadWii(u8 &var, u32 addr) {hwReadWii8 [(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwReadWii(u16 &var, u32 addr) {hwReadWii16[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwReadWii(u32 &var, u32 addr) {hwReadWii32[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwReadWii(u64 &var, u32 addr) {PanicAlert("hwReadWii: There's no 64-bit HW read. %08x", addr);}
|
||||
|
||||
inline void hwWriteWii(u8 var, u32 addr) {hwWriteWii8[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWriteWii(u16 var, u32 addr) {hwWriteWii16[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWriteWii(u32 var, u32 addr) {hwWriteWii32[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
inline void hwWriteWii(u64 var, u32 addr) {hwWriteWii64[(addr>>HWSHIFT) & (NUMHWMEMFUN-1)](var, addr);}
|
||||
|
||||
inline void hwReadIOBridge(u8 &var, u32 addr) {WII_IOBridge::Read8(var, addr);}
|
||||
inline void hwReadIOBridge(u16 &var, u32 addr) {WII_IOBridge::Read16(var, addr);}
|
||||
inline void hwReadIOBridge(u32 &var, u32 addr) {WII_IOBridge::Read32(var, addr);}
|
||||
inline void hwReadIOBridge(u64 &var, u32 addr) {PanicAlert("hwReadIOBridge: There's no 64-bit HW read. %08x", addr);}
|
||||
|
||||
inline void hwWriteIOBridge(u8 var, u32 addr) {WII_IOBridge::Write8(var, addr);}
|
||||
inline void hwWriteIOBridge(u16 var, u32 addr) {WII_IOBridge::Write16(var, addr);}
|
||||
inline void hwWriteIOBridge(u32 var, u32 addr) {WII_IOBridge::Write32(var, addr);}
|
||||
inline void hwWriteIOBridge(u64 var, u32 addr) {PanicAlert("hwWriteIOBridge: There's no 64-bit HW write. %08x", addr);}
|
||||
|
||||
// Nasty but necessary. Super Mario Galaxy pointer relies on this stuff.
|
||||
u32 EFB_Read(const u32 addr)
|
||||
{
|
||||
|
@ -156,20 +97,8 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_
|
|||
{
|
||||
if (em_address < 0xcc000000)
|
||||
_var = EFB_Read(em_address);
|
||||
else if (em_address <= 0xcc009000)
|
||||
hwRead(_var, em_address);
|
||||
/* WIIMODE */
|
||||
else if (((em_address & 0xFF000000) == 0xCD000000) &&
|
||||
(em_address <= 0xcd009000))
|
||||
hwReadWii(_var, em_address);
|
||||
else if (((em_address & 0xFFF00000) == 0xCD800000) &&
|
||||
(em_address <= 0xCD809000))
|
||||
hwReadIOBridge(_var, em_address);
|
||||
else
|
||||
{
|
||||
/* Disabled because the debugger makes trouble with */
|
||||
/*_dbg_assert_(MEMMAP,0); */
|
||||
}
|
||||
mmio_mapping->Read(em_address, _var);
|
||||
}
|
||||
else if (((em_address & 0xF0000000) == 0x80000000) ||
|
||||
((em_address & 0xF0000000) == 0xC0000000) ||
|
||||
|
@ -246,28 +175,10 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
|
|||
}
|
||||
return;
|
||||
}
|
||||
else if (em_address <= 0xcc009000)
|
||||
{
|
||||
hwWrite(data, em_address);
|
||||
return;
|
||||
}
|
||||
/* WIIMODE */
|
||||
else if (((em_address & 0xFF000000) == 0xCD000000) &&
|
||||
(em_address <= 0xcd009000))
|
||||
{
|
||||
hwWriteWii(data,em_address);
|
||||
return;
|
||||
}
|
||||
else if (((em_address & 0xFFF00000) == 0xCD800000) &&
|
||||
(em_address <= 0xCD809000))
|
||||
{
|
||||
hwWriteIOBridge(data,em_address);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(MEMMAP, "hwwrite [%08x] := %08x (PC: %08x)", em_address, (u32)data, PC);
|
||||
_dbg_assert_msg_(MEMMAP,0,"Memory - Unknown HW address %08x", em_address);
|
||||
mmio_mapping->Write(em_address, data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (((em_address & 0xF0000000) == 0x80000000) ||
|
||||
|
|
|
@ -211,29 +211,5 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
}
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
} // end of namespace MemoryInterface
|
||||
|
||||
|
|
|
@ -14,9 +14,4 @@ namespace MemoryInterface
|
|||
void DoState(PointerWrap &p);
|
||||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress);
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||
} // end of namespace MemoryInterface
|
||||
|
|
|
@ -155,24 +155,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
}
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _uValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _uValue);
|
||||
}
|
||||
|
||||
void UpdateException()
|
||||
{
|
||||
if ((m_InterruptCause & m_InterruptMask) != 0)
|
||||
|
|
|
@ -47,11 +47,6 @@ void DoState(PointerWrap &p);
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress);
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
inline u32 GetMask() { return m_InterruptMask; }
|
||||
inline u32 GetCause() { return m_InterruptCause; }
|
||||
|
||||
|
|
|
@ -399,18 +399,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
// check if we have to update the RDSTINT flag
|
||||
|
|
|
@ -34,9 +34,6 @@ void AddDevice(ISIDevice* pDevice);
|
|||
void ChangeDeviceCallback(u64 userdata, int cyclesLate);
|
||||
void ChangeDevice(SIDevices device, int channel);
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
int GetTicksToNextSIPoll();
|
||||
|
||||
}; // end of namespace SerialInterface
|
||||
|
|
|
@ -397,36 +397,6 @@ void SetRegionReg(char region)
|
|||
m_DTVStatus.ntsc_j = region == 'J';
|
||||
}
|
||||
|
||||
void Read8(u8& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void Read32(u32& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
if ((m_InterruptRegister[0].IR_INT && m_InterruptRegister[0].IR_MASK) ||
|
||||
|
|
|
@ -328,13 +328,6 @@ union UVIDTVStatus
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void Read8(u8& _uReturnValue, const u32 _uAddress);
|
||||
void Read16(u16& _uReturnValue, const u32 _uAddress);
|
||||
void Read32(u32& _uReturnValue, const u32 _uAddress);
|
||||
|
||||
void Write16(const u16 _uValue, const u32 _uAddress);
|
||||
void Write32(const u32 _uValue, const u32 _uAddress);
|
||||
|
||||
// returns a pointer to the current visible xfb
|
||||
u32 GetXFBAddressTop();
|
||||
u32 GetXFBAddressBottom();
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Common.h"
|
||||
#include "ChunkFile.h"
|
||||
#include "WII_IOB.h"
|
||||
|
||||
namespace WII_IOBridge
|
||||
{
|
||||
|
||||
void Read8(u8& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
_dbg_assert_(WII_IOB, 0);
|
||||
}
|
||||
|
||||
void Read16(u16& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
_dbg_assert_(WII_IOB, 0);
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
switch (_Address & 0xFFFF)
|
||||
{
|
||||
// NAND Loader ... no idea
|
||||
case 0x018:
|
||||
ERROR_LOG(WII_IOB, "IOP: Read32 from 0x18 = 0x%08x (NANDLoader)", _Address);
|
||||
break;
|
||||
// WiiMenu... no idea
|
||||
case 0x24:
|
||||
ERROR_LOG(WII_IOB, "IOP: Read32 from 0x24 = 0x%08x (WiiMenu)", _Address);
|
||||
break;
|
||||
|
||||
|
||||
case 0xc0: // __VISendI2CData
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0xc0 = 0x%08x (__VISendI2CData)", _rReturnValue);
|
||||
break;
|
||||
|
||||
case 0xc4: // __VISendI2CData
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0xc4 = 0x%08x (__VISendI2CData)", _rReturnValue);
|
||||
break;
|
||||
|
||||
case 0xc8: // __VISendI2CData
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0xc8 = 0x%08x (__VISendI2CData)", _rReturnValue);
|
||||
break;
|
||||
|
||||
case 0x180: // __AIClockInit
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0x180 = 0x%08x (__AIClockInit)", _rReturnValue);
|
||||
return;
|
||||
|
||||
case 0x1CC: // __AIClockInit
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0x1CC = 0x%08x (__AIClockInit)", _rReturnValue);
|
||||
return;
|
||||
|
||||
case 0x1D0: // __AIClockInit
|
||||
_rReturnValue = 0;
|
||||
INFO_LOG(WII_IOB, "IOP: Read32 from 0x1D0 = 0x%08x (__AIClockInit)", _rReturnValue);
|
||||
return;
|
||||
|
||||
default:
|
||||
_dbg_assert_msg_(WII_IOB, 0, "IOP: Read32 from 0x%08x", _Address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Read64(u64& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
_dbg_assert_(WII_IOB, 0);
|
||||
}
|
||||
|
||||
void Write8(const u8 _Value, const u32 _Address)
|
||||
{
|
||||
_dbg_assert_(WII_IOB, 0);
|
||||
}
|
||||
|
||||
void Write16(const u16 _Value, const u32 _Address)
|
||||
{
|
||||
_dbg_assert_(WII_IOB, 0);
|
||||
}
|
||||
|
||||
void Write32(const u32 _Value, const u32 _Address)
|
||||
{
|
||||
switch(_Address & 0xFFFF)
|
||||
{
|
||||
// NANDLoader ... no idea
|
||||
case 0x18:
|
||||
ERROR_LOG(WII_IOB, "IOP: Write32 0x%08x to 0x%08x (NANDLoader)", _Value, _Address);
|
||||
break;
|
||||
// WiiMenu... no idea
|
||||
case 0x24:
|
||||
ERROR_LOG(WII_IOB, "IOP: Write32 0x%08x to 0x%08x (WiiMenu)", _Value, _Address);
|
||||
break;
|
||||
|
||||
case 0xc0: // __VISendI2CData
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0xc0 = 0x%08x (__VISendI2CData)", _Value);
|
||||
break;
|
||||
|
||||
case 0xc4: // __VISendI2CData
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0xc4 = 0x%08x (__VISendI2CData)", _Value);
|
||||
break;
|
||||
|
||||
case 0xc8: // __VISendI2CData
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0xc8 = 0x%08x (__VISendI2CData)", _Value);
|
||||
break;
|
||||
|
||||
case 0x180: // __AIClockInit
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0x180 = 0x%08x (__AIClockInit)", _Value);
|
||||
return;
|
||||
|
||||
case 0x1CC: // __AIClockInit
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0x1D0 = 0x%08x (__AIClockInit)", _Value);
|
||||
return;
|
||||
|
||||
case 0x1D0: // __AIClockInit
|
||||
INFO_LOG(WII_IOB, "IOP: Write32 to 0x1D0 = 0x%08x (__AIClockInit)", _Value);
|
||||
return;
|
||||
|
||||
default:
|
||||
_dbg_assert_msg_(WII_IOB, 0, "IOP: Write32 to 0x%08x", _Address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Write64(const u64 _Value, const u32 _Address)
|
||||
{
|
||||
//switch(_Address)
|
||||
//{
|
||||
//default:
|
||||
_dbg_assert_msg_(WII_IOB, 0, "IOP: Write32 to 0x%08x", _Address);
|
||||
//break;
|
||||
//}
|
||||
}
|
||||
|
||||
} // end of namespace AudioInterfac
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
class PointerWrap;
|
||||
|
||||
namespace WII_IOBridge
|
||||
{
|
||||
|
||||
void Init();
|
||||
void Shutdown();
|
||||
void DoState(PointerWrap &p);
|
||||
|
||||
void Update();
|
||||
|
||||
void Read8(u8& _rReturnValue, const u32 _Address);
|
||||
void Read16(u16& _rReturnValue, const u32 _Address);
|
||||
void Read32(u32& _rReturnValue, const u32 _Address);
|
||||
void Read64(u64& _rReturnValue, const u32 _Address);
|
||||
|
||||
void Write8(const u8 _Value, const u32 _Address);
|
||||
void Write16(const u16 _Value, const u32 _Address);
|
||||
void Write32(const u32 _Value, const u32 _Address);
|
||||
void Write64(const u64 _Value, const u32 _Address);
|
||||
|
||||
} // end of namespace AudioInterface
|
|
@ -205,18 +205,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
mmio->Register(base | UNK_1D0, MMIO::Constant<u32>(0), MMIO::Nop<u32>());
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _Value, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Value);
|
||||
}
|
||||
|
||||
void UpdateInterrupts(u64 userdata, int cyclesLate)
|
||||
{
|
||||
if ((ctrl.Y1 & ctrl.IY1) || (ctrl.Y2 & ctrl.IY2))
|
||||
|
|
|
@ -39,9 +39,6 @@ void DoState(PointerWrap &p);
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address);
|
||||
void Write32(const u32 _Value, const u32 _Address);
|
||||
|
||||
void UpdateInterrupts(u64 userdata = 0, int cyclesLate = 0);
|
||||
void GenerateAck(u32 _Address);
|
||||
void GenerateReply(u32 _Address);
|
||||
|
|
|
@ -437,8 +437,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
|||
D3D::context->Unmap(read_tex, 0);
|
||||
|
||||
// check what to do with the alpha channel (GX_PokeAlphaRead)
|
||||
PixelEngine::UPEAlphaReadReg alpha_read_mode;
|
||||
PixelEngine::Read16((u16&)alpha_read_mode, PE_ALPHAREAD);
|
||||
PixelEngine::UPEAlphaReadReg alpha_read_mode = PixelEngine::GetAlphaReadMode();
|
||||
|
||||
if (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24)
|
||||
{
|
||||
|
|
|
@ -1043,8 +1043,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
|||
color = s_efbCache[1][cacheRectIdx][yRect * EFB_CACHE_RECT_SIZE + xRect];
|
||||
|
||||
// check what to do with the alpha channel (GX_PokeAlphaRead)
|
||||
PixelEngine::UPEAlphaReadReg alpha_read_mode;
|
||||
PixelEngine::Read16((u16&)alpha_read_mode, PE_ALPHAREAD);
|
||||
PixelEngine::UPEAlphaReadReg alpha_read_mode = PixelEngine::GetAlphaReadMode();
|
||||
|
||||
if (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24)
|
||||
{
|
||||
|
|
|
@ -174,30 +174,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read16(u16& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _Value, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Value);
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _Data, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Data);
|
||||
}
|
||||
|
||||
void STACKALIGN GatherPipeBursted()
|
||||
{
|
||||
if (cpreg.ctrl.GPLinkEnable)
|
||||
|
|
|
@ -129,12 +129,6 @@ namespace SWCommandProcessor
|
|||
bool RunBuffer();
|
||||
void RunGpu();
|
||||
|
||||
// Read
|
||||
void Read16(u16& _rReturnValue, const u32 _Address);
|
||||
void Write16(const u16 _Data, const u32 _Address);
|
||||
void Read32(u32& _rReturnValue, const u32 _Address);
|
||||
void Write32(const u32 _Data, const u32 _Address);
|
||||
|
||||
// for CGPFIFO
|
||||
void GatherPipeBursted();
|
||||
void UpdateInterrupts(u64 userdata);
|
||||
|
|
|
@ -91,24 +91,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
bool AllowIdleSkipping()
|
||||
{
|
||||
return !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || (!pereg.ctrl.PETokenEnable && !pereg.ctrl.PEFinishEnable);
|
||||
|
|
|
@ -203,13 +203,6 @@ namespace SWPixelEngine
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
// Read
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress);
|
||||
|
||||
// Write
|
||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
// gfx backend support
|
||||
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||
void SetFinish(void);
|
||||
|
|
|
@ -370,29 +370,6 @@ void VideoSoftware::RegisterPEMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
SWPixelEngine::RegisterMMIO(mmio, base);
|
||||
}
|
||||
|
||||
readFn16 VideoSoftware::Video_CPRead16()
|
||||
{
|
||||
return SWCommandProcessor::Read16;
|
||||
}
|
||||
writeFn16 VideoSoftware::Video_CPWrite16()
|
||||
{
|
||||
return SWCommandProcessor::Write16;
|
||||
}
|
||||
|
||||
readFn16 VideoSoftware::Video_PERead16()
|
||||
{
|
||||
return SWPixelEngine::Read16;
|
||||
}
|
||||
writeFn16 VideoSoftware::Video_PEWrite16()
|
||||
{
|
||||
return SWPixelEngine::Write16;
|
||||
}
|
||||
writeFn32 VideoSoftware::Video_PEWrite32()
|
||||
{
|
||||
return SWPixelEngine::Write32;
|
||||
}
|
||||
|
||||
|
||||
// Draw messages on top of the screen
|
||||
unsigned int VideoSoftware::PeekMessages()
|
||||
{
|
||||
|
|
|
@ -49,12 +49,6 @@ class VideoSoftware : public VideoBackend
|
|||
void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) override;
|
||||
void RegisterPEMMIO(MMIO::Mapping* mmio, u32 base) override;
|
||||
|
||||
readFn16 Video_CPRead16() override;
|
||||
writeFn16 Video_CPWrite16() override;
|
||||
readFn16 Video_PERead16() override;
|
||||
writeFn16 Video_PEWrite16() override;
|
||||
writeFn32 Video_PEWrite32() override;
|
||||
|
||||
void UpdateFPSDisplay(const char*) override;
|
||||
unsigned int PeekMessages() override;
|
||||
|
||||
|
|
|
@ -296,30 +296,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
);
|
||||
}
|
||||
|
||||
void Read16(u16& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _Value, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Value);
|
||||
}
|
||||
|
||||
void Read32(u32& _rReturnValue, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_Address, _rReturnValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _Data, const u32 _Address)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_Address, _Data);
|
||||
}
|
||||
|
||||
void STACKALIGN GatherPipeBursted()
|
||||
{
|
||||
ProcessFifoEvents();
|
||||
|
|
|
@ -137,12 +137,6 @@ void DoState(PointerWrap &p);
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
// Read
|
||||
void Read16(u16& _rReturnValue, const u32 _Address);
|
||||
void Write16(const u16 _Data, const u32 _Address);
|
||||
void Read32(u32& _rReturnValue, const u32 _Address);
|
||||
void Write32(const u32 _Data, const u32 _Address);
|
||||
|
||||
void SetCpStatus(bool isCPUThread = false);
|
||||
void GatherPipeBursted();
|
||||
void UpdateInterrupts(u64 userdata);
|
||||
|
|
|
@ -320,25 +320,3 @@ void VideoBackendHardware::RegisterPEMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
{
|
||||
PixelEngine::RegisterMMIO(mmio, base);
|
||||
}
|
||||
|
||||
readFn16 VideoBackendHardware::Video_CPRead16()
|
||||
{
|
||||
return CommandProcessor::Read16;
|
||||
}
|
||||
writeFn16 VideoBackendHardware::Video_CPWrite16()
|
||||
{
|
||||
return CommandProcessor::Write16;
|
||||
}
|
||||
|
||||
readFn16 VideoBackendHardware::Video_PERead16()
|
||||
{
|
||||
return PixelEngine::Read16;
|
||||
}
|
||||
writeFn16 VideoBackendHardware::Video_PEWrite16()
|
||||
{
|
||||
return PixelEngine::Write16;
|
||||
}
|
||||
writeFn32 VideoBackendHardware::Video_PEWrite32()
|
||||
{
|
||||
return PixelEngine::Write32;
|
||||
}
|
||||
|
|
|
@ -253,24 +253,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||
}
|
||||
}
|
||||
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Read(_iAddress, _uReturnValue);
|
||||
}
|
||||
|
||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
void Write32(const u32 _iValue, const u32 _iAddress)
|
||||
{
|
||||
// HACK: Remove this function when the new MMIO interface is used.
|
||||
Memory::mmio_mapping->Write(_iAddress, _iValue);
|
||||
}
|
||||
|
||||
bool AllowIdleSkipping()
|
||||
{
|
||||
return !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
|
||||
|
@ -377,4 +359,10 @@ void ResetSetToken()
|
|||
}
|
||||
CommandProcessor::interruptTokenWaiting = false;
|
||||
}
|
||||
|
||||
UPEAlphaReadReg GetAlphaReadMode()
|
||||
{
|
||||
return m_AlphaRead;
|
||||
}
|
||||
|
||||
} // end of namespace PixelEngine
|
||||
|
|
|
@ -58,18 +58,12 @@ void DoState(PointerWrap &p);
|
|||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
// Read
|
||||
void Read16(u16& _uReturnValue, const u32 _iAddress);
|
||||
|
||||
// Write
|
||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
// gfx backend support
|
||||
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||
void SetFinish(void);
|
||||
void ResetSetFinish(void);
|
||||
void ResetSetToken(void);
|
||||
UPEAlphaReadReg GetAlphaReadMode();
|
||||
|
||||
// Bounding box functionality. Paper Mario (both) are a couple of the few games that use it.
|
||||
extern u16 bbox[4];
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
|
||||
namespace MMIO { class Mapping; }
|
||||
|
||||
typedef void (*writeFn16)(const u16,const u32);
|
||||
typedef void (*writeFn32)(const u32,const u32);
|
||||
typedef void (*readFn16)(u16&, const u32);
|
||||
|
||||
|
||||
enum FieldType
|
||||
{
|
||||
|
@ -116,13 +112,6 @@ public:
|
|||
virtual void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) = 0;
|
||||
virtual void RegisterPEMMIO(MMIO::Mapping* mmio, u32 base) = 0;
|
||||
|
||||
// HACK: Remove these functions when the new MMIO interface is used.
|
||||
virtual readFn16 Video_CPRead16() = 0;
|
||||
virtual writeFn16 Video_CPWrite16() = 0;
|
||||
virtual readFn16 Video_PERead16() = 0;
|
||||
virtual writeFn16 Video_PEWrite16() = 0;
|
||||
virtual writeFn32 Video_PEWrite32() = 0;
|
||||
|
||||
static void PopulateList();
|
||||
static void ClearList();
|
||||
static void ActivateBackend(const std::string& name);
|
||||
|
@ -172,12 +161,6 @@ class VideoBackendHardware : public VideoBackend
|
|||
void RegisterCPMMIO(MMIO::Mapping* mmio, u32 base) override;
|
||||
void RegisterPEMMIO(MMIO::Mapping* mmio, u32 base) override;
|
||||
|
||||
readFn16 Video_CPRead16();
|
||||
writeFn16 Video_CPWrite16();
|
||||
readFn16 Video_PERead16();
|
||||
writeFn16 Video_PEWrite16();
|
||||
writeFn32 Video_PEWrite32();
|
||||
|
||||
void PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
|
||||
void DoState(PointerWrap &p);
|
||||
|
||||
|
|
Loading…
Reference in New Issue