diff --git a/Source/Core/Common/Log.h b/Source/Core/Common/Log.h
index 3284daabf8..544245e847 100644
--- a/Source/Core/Common/Log.h
+++ b/Source/Core/Common/Log.h
@@ -47,7 +47,6 @@ enum LOG_TYPE
STREAMINGINTERFACE,
VIDEO,
VIDEOINTERFACE,
- WII_IOB,
WII_IPC,
WII_IPC_DVD,
WII_IPC_ES,
diff --git a/Source/Core/Common/LogManager.cpp b/Source/Core/Common/LogManager.cpp
index c73624c68c..246c0e404d 100644
--- a/Source/Core/Common/LogManager.cpp
+++ b/Source/Core/Common/LogManager.cpp
@@ -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");
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index 79f2491d49..71f9a8eb7b 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -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
diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj
index fdf6fc4b53..c5d85d6bf3 100644
--- a/Source/Core/Core/Core.vcxproj
+++ b/Source/Core/Core/Core.vcxproj
@@ -171,7 +171,6 @@
-
@@ -371,7 +370,6 @@
-
diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters
index 99626fecb4..6471169406 100644
--- a/Source/Core/Core/Core.vcxproj.filters
+++ b/Source/Core/Core/Core.vcxproj.filters
@@ -492,9 +492,6 @@
HW %28Flipper/Hollywood%29\Wiimote\Real
-
- HW %28Flipper/Hollywood%29\Wii IO Bridge
-
HW %28Flipper/Hollywood%29\Wii IPC
@@ -1025,9 +1022,6 @@
HW %28Flipper/Hollywood%29\Wiimote\Real
-
- HW %28Flipper/Hollywood%29\Wii IO Bridge
-
HW %28Flipper/Hollywood%29\Wii IPC
diff --git a/Source/Core/Core/HW/AudioInterface.cpp b/Source/Core/Core/HW/AudioInterface.cpp
index 796bac4ecf..b103f7a5f9 100644
--- a/Source/Core/Core/HW/AudioInterface.cpp
+++ b/Source/Core/Core/HW/AudioInterface.cpp
@@ -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(
diff --git a/Source/Core/Core/HW/AudioInterface.h b/Source/Core/Core/HW/AudioInterface.h
index 8bb09b78ae..e79d1c3fc7 100644
--- a/Source/Core/Core/HW/AudioInterface.h
+++ b/Source/Core/Core/HW/AudioInterface.h
@@ -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();
diff --git a/Source/Core/Core/HW/DSP.cpp b/Source/Core/Core/HW/DSP.cpp
index fbf48b66cf..9ab9d3fa49 100644
--- a/Source/Core/Core/HW/DSP.cpp
+++ b/Source/Core/Core/HW/DSP.cpp
@@ -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()
{
diff --git a/Source/Core/Core/HW/DSP.h b/Source/Core/Core/HW/DSP.h
index c9bd622d75..5d6b192538 100644
--- a/Source/Core/Core/HW/DSP.h
+++ b/Source/Core/Core/HW/DSP.h
@@ -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);
diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp
index bef7605fa3..90b5f66c3a 100644
--- a/Source/Core/Core/HW/DVDInterface.cpp
+++ b/Source/Core/Core/HW/DVDInterface.cpp
@@ -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) ||
diff --git a/Source/Core/Core/HW/DVDInterface.h b/Source/Core/Core/HW/DVDInterface.h
index ad612fc5e1..ede1dc6bdc 100644
--- a/Source/Core/Core/HW/DVDInterface.h
+++ b/Source/Core/Core/HW/DVDInterface.h
@@ -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
diff --git a/Source/Core/Core/HW/EXI.cpp b/Source/Core/Core/HW/EXI.cpp
index 850d4812e6..fed520fc11 100644
--- a/Source/Core/Core/HW/EXI.cpp
+++ b/Source/Core/Core/HW/EXI.cpp
@@ -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:
diff --git a/Source/Core/Core/HW/EXI.h b/Source/Core/Core/HW/EXI.h
index 21c33ad16a..f35ed1a191 100644
--- a/Source/Core/Core/HW/EXI.h
+++ b/Source/Core/Core/HW/EXI.h
@@ -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
diff --git a/Source/Core/Core/HW/MMIO.h b/Source/Core/Core/HW/MMIO.h
index b945d6b028..41353b7858 100644
--- a/Source/Core/Core/HW/MMIO.h
+++ b/Source/Core/Core/HW/MMIO.h
@@ -11,9 +11,6 @@
#include "MMIOHandlers.h"
-// HACK: Remove when the new MMIO interface is used.
-#include "Memmap.h"
-
namespace MMIO
{
diff --git a/Source/Core/Core/HW/Memmap.cpp b/Source/Core/Core/HW/Memmap.cpp
index 64aebc5c2e..fea5f6dbd9 100644
--- a/Source/Core/Core/HW/Memmap.cpp
+++ b/Source/Core/Core/HW/Memmap.cpp
@@ -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
-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
-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 void HW_Read_Memory(T &_Data, const u32 _Address)
-{
- _Data = *(T *)&P[_Address & HW_PAGE_MASK];
-}
-
-template 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;
- hwWrite16[i] = HW_Default_Write;
- hwWrite32[i] = HW_Default_Write;
- hwWrite64[i] = HW_Default_Write;
- hwRead8 [i] = HW_Default_Read;
- hwRead16 [i] = HW_Default_Read;
- hwRead32 [i] = HW_Default_Read;
- hwRead64 [i] = HW_Default_Read;
-
- // To prevent Dolphin from crashing when accidentally running Wii
- // executables in GC mode (or running malicious GC executables...)
- hwWriteWii8 [i] = HW_Default_Write;
- hwWriteWii16[i] = HW_Default_Write;
- hwWriteWii32[i] = HW_Default_Write;
- hwWriteWii64[i] = HW_Default_Write;
- hwReadWii8 [i] = HW_Default_Read;
- hwReadWii16 [i] = HW_Default_Read;
- hwReadWii32 [i] = HW_Default_Read;
- hwReadWii64 [i] = HW_Default_Read;
- }
-
- 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;
- hwWrite16[i] = HW_Default_Write;
- hwWrite32[i] = HW_Default_Write;
- hwWrite64[i] = HW_Default_Write;
- hwRead8 [i] = HW_Default_Read;
- hwRead16 [i] = HW_Default_Read;
- hwRead32 [i] = HW_Default_Read;
- hwRead64 [i] = HW_Default_Read;
-
- hwWriteWii8 [i] = HW_Default_Write;
- hwWriteWii16[i] = HW_Default_Write;
- hwWriteWii32[i] = HW_Default_Write;
- hwWriteWii64[i] = HW_Default_Write;
- hwReadWii8 [i] = HW_Default_Read;
- hwReadWii16 [i] = HW_Default_Read;
- hwReadWii32 [i] = HW_Default_Read;
- hwReadWii64 [i] = HW_Default_Read;
- }
-
- // 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
diff --git a/Source/Core/Core/HW/Memmap.h b/Source/Core/Core/HW/Memmap.h
index d2ea967496..77599fbf3d 100644
--- a/Source/Core/Core/HW/Memmap.h
+++ b/Source/Core/Core/HW/Memmap.h
@@ -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;}
diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp
index eb335228a5..404df6aeee 100644
--- a/Source/Core/Core/HW/MemmapFunctions.cpp
+++ b/Source/Core/Core/HW/MemmapFunctions.cpp
@@ -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) ||
diff --git a/Source/Core/Core/HW/MemoryInterface.cpp b/Source/Core/Core/HW/MemoryInterface.cpp
index 2ee221710e..ed38f07d64 100644
--- a/Source/Core/Core/HW/MemoryInterface.cpp
+++ b/Source/Core/Core/HW/MemoryInterface.cpp
@@ -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
diff --git a/Source/Core/Core/HW/MemoryInterface.h b/Source/Core/Core/HW/MemoryInterface.h
index d0b2e499d6..436d822207 100644
--- a/Source/Core/Core/HW/MemoryInterface.h
+++ b/Source/Core/Core/HW/MemoryInterface.h
@@ -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
diff --git a/Source/Core/Core/HW/ProcessorInterface.cpp b/Source/Core/Core/HW/ProcessorInterface.cpp
index 94af1bec99..15244b0b3e 100644
--- a/Source/Core/Core/HW/ProcessorInterface.cpp
+++ b/Source/Core/Core/HW/ProcessorInterface.cpp
@@ -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)
diff --git a/Source/Core/Core/HW/ProcessorInterface.h b/Source/Core/Core/HW/ProcessorInterface.h
index 504117cb0f..8078f64466 100644
--- a/Source/Core/Core/HW/ProcessorInterface.h
+++ b/Source/Core/Core/HW/ProcessorInterface.h
@@ -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; }
diff --git a/Source/Core/Core/HW/SI.cpp b/Source/Core/Core/HW/SI.cpp
index 3182a829bc..47ce14ddb0 100644
--- a/Source/Core/Core/HW/SI.cpp
+++ b/Source/Core/Core/HW/SI.cpp
@@ -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
diff --git a/Source/Core/Core/HW/SI.h b/Source/Core/Core/HW/SI.h
index d0d3ee98cf..1af21c6ed8 100644
--- a/Source/Core/Core/HW/SI.h
+++ b/Source/Core/Core/HW/SI.h
@@ -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
diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp
index b54ccc8e02..808bb1dc1f 100644
--- a/Source/Core/Core/HW/VideoInterface.cpp
+++ b/Source/Core/Core/HW/VideoInterface.cpp
@@ -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) ||
diff --git a/Source/Core/Core/HW/VideoInterface.h b/Source/Core/Core/HW/VideoInterface.h
index 4234a3c781..7363f74968 100644
--- a/Source/Core/Core/HW/VideoInterface.h
+++ b/Source/Core/Core/HW/VideoInterface.h
@@ -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();
diff --git a/Source/Core/Core/HW/WII_IOB.cpp b/Source/Core/Core/HW/WII_IOB.cpp
deleted file mode 100644
index bfcf1024e4..0000000000
--- a/Source/Core/Core/HW/WII_IOB.cpp
+++ /dev/null
@@ -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
diff --git a/Source/Core/Core/HW/WII_IOB.h b/Source/Core/Core/HW/WII_IOB.h
deleted file mode 100644
index ccfd29c3e0..0000000000
--- a/Source/Core/Core/HW/WII_IOB.h
+++ /dev/null
@@ -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
diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp
index 3ffdd39226..49e1fff41f 100644
--- a/Source/Core/Core/HW/WII_IPC.cpp
+++ b/Source/Core/Core/HW/WII_IPC.cpp
@@ -205,18 +205,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
mmio->Register(base | UNK_1D0, MMIO::Constant(0), MMIO::Nop());
}
-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))
diff --git a/Source/Core/Core/HW/WII_IPC.h b/Source/Core/Core/HW/WII_IPC.h
index e407ff4918..ce7119eb4c 100644
--- a/Source/Core/Core/HW/WII_IPC.h
+++ b/Source/Core/Core/HW/WII_IPC.h
@@ -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);
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 1c1955aea6..b48995c410 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -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)
{
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 6d4d73da38..f863a93064 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -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)
{
diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp
index e2f402a040..450ce5712a 100644
--- a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp
+++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp
@@ -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)
diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.h b/Source/Core/VideoBackends/Software/SWCommandProcessor.h
index 1144b66b67..92ca728230 100644
--- a/Source/Core/VideoBackends/Software/SWCommandProcessor.h
+++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.h
@@ -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);
diff --git a/Source/Core/VideoBackends/Software/SWPixelEngine.cpp b/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
index fafa87e015..335a9cb012 100644
--- a/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
+++ b/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
@@ -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);
diff --git a/Source/Core/VideoBackends/Software/SWPixelEngine.h b/Source/Core/VideoBackends/Software/SWPixelEngine.h
index e8d0a3d6c0..37f26be78e 100644
--- a/Source/Core/VideoBackends/Software/SWPixelEngine.h
+++ b/Source/Core/VideoBackends/Software/SWPixelEngine.h
@@ -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);
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 4886d2b221..132b40fa81 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -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()
{
diff --git a/Source/Core/VideoBackends/Software/VideoBackend.h b/Source/Core/VideoBackends/Software/VideoBackend.h
index 9a6d9584c4..89fbc4dd1d 100644
--- a/Source/Core/VideoBackends/Software/VideoBackend.h
+++ b/Source/Core/VideoBackends/Software/VideoBackend.h
@@ -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;
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp
index bf4b97b825..ca70a43703 100644
--- a/Source/Core/VideoCommon/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/CommandProcessor.cpp
@@ -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();
diff --git a/Source/Core/VideoCommon/CommandProcessor.h b/Source/Core/VideoCommon/CommandProcessor.h
index 1d2e09f512..f57402f0ec 100644
--- a/Source/Core/VideoCommon/CommandProcessor.h
+++ b/Source/Core/VideoCommon/CommandProcessor.h
@@ -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);
diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp
index 63655a434d..649f8974b3 100644
--- a/Source/Core/VideoCommon/MainBase.cpp
+++ b/Source/Core/VideoCommon/MainBase.cpp
@@ -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;
-}
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index 98f39f6ff3..9a5137a60e 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -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
diff --git a/Source/Core/VideoCommon/PixelEngine.h b/Source/Core/VideoCommon/PixelEngine.h
index d18cd07ae3..6631f4ea5c 100644
--- a/Source/Core/VideoCommon/PixelEngine.h
+++ b/Source/Core/VideoCommon/PixelEngine.h
@@ -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];
diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h
index e37db767d4..62423b33b4 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.h
+++ b/Source/Core/VideoCommon/VideoBackendBase.h
@@ -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);