Play-/Source/MemoryUtils.cpp
jpd002 5f31206020 Got rid of CCacheBlock.
Cleaned up a lot of code.

git-svn-id: http://svn.purei.org/purei/trunk@293 b36208d7-6611-0410-8bec-b1987f11c4a2
2008-04-09 02:52:38 +00:00

31 lines
845 B
C++

#include "MemoryUtils.h"
uint32 CMemoryUtils::GetByteProxy(CMIPS* pCtx, uint32 nAddress)
{
return (uint32)pCtx->m_pMemoryMap->GetByte(nAddress);
}
uint32 CMemoryUtils::GetHalfProxy(CMIPS* pCtx, uint32 nAddress)
{
return (uint32)pCtx->m_pMemoryMap->GetHalf(nAddress);
}
uint32 CMemoryUtils::GetWordProxy(CMIPS* pCtx, uint32 nAddress)
{
return pCtx->m_pMemoryMap->GetWord(nAddress);
}
void CMemoryUtils::SetByteProxy(CMIPS* pCtx, uint32 nValue, uint32 nAddress)
{
pCtx->m_pMemoryMap->SetByte(nAddress, (uint8)(nValue & 0xFF));
}
void CMemoryUtils::SetHalfProxy(CMIPS* pCtx, uint32 nValue, uint32 nAddress)
{
pCtx->m_pMemoryMap->SetHalf(nAddress, (uint16)(nValue & 0xFFFF));
}
void CMemoryUtils::SetWordProxy(CMIPS* pCtx, uint32 nValue, uint32 nAddress)
{
pCtx->m_pMemoryMap->SetWord(nAddress, nValue);
}