Starting point for the new MMIO interface

Design doc:
    https://docs.google.com/document/d/11qcGCWLne1wYvmtFaSrOKZt_vHxXrcWcZsdWJ-MJnyo/edit

The code is currently not used. Migration plan:
    1. Implement MMIO access via MMIO::Mapping in parallel to the current
       method.
    2. Implement all existing MMIO handlers via the new interface.
    3. Remove the old hwRead/hwReadWii/hwReadIOBridge code.
    4. Implement JIT optimizations for MMIO accesses.
This commit is contained in:
Pierre Bourdon
2014-01-19 13:41:26 +01:00
parent 1e94853301
commit 9fe58d28ba
9 changed files with 766 additions and 1 deletions

View File

@ -34,6 +34,7 @@
#include "../ConfigManager.h"
#include "../Debugger/Debugger_SymbolMap.h"
#include "VideoBackendBase.h"
#include "MMIO.h"
namespace Memory
{
@ -83,6 +84,9 @@ u8 *m_pVirtualUncachedEXRAM; // wii only
u8 *m_pVirtualL1Cache;
u8 *m_pVirtualFakeVMEM;
// MMIO mapping object.
MMIO::Mapping* mmio_mapping;
// =================================
// Read and write shortcuts
// ----------------
@ -348,6 +352,8 @@ void Init()
if (bFakeVMEM) flags |= MV_FAKE_VMEM;
base = MemoryMap_Setup(views, num_views, flags, &g_arena);
mmio_mapping = new MMIO::Mapping();
if (wii)
InitHWMemFuncsWii();
else
@ -382,6 +388,7 @@ void Shutdown()
MemoryMap_Shutdown(views, num_views, flags, &g_arena);
g_arena.ReleaseSpace();
base = NULL;
delete mmio_mapping;
INFO_LOG(MEMMAP, "Memory system shut down.");
}