Remove the old MMIO access "interface".

This commit is contained in:
Pierre Bourdon
2014-02-15 03:23:35 +01:00
parent f8f14c83a3
commit 92f8d93e96
43 changed files with 12 additions and 903 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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;
}

View File

@ -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

View File

@ -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];

View File

@ -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);