?? plgmmu.h
字號:
/**************************************************************************
* DSemu - The Next Generation *
* Plugin definitions: MMU interface [plgmmu.h] *
* Copyright Imran Nazar, 2005; released under the BSD public licence. *
**************************************************************************/
#ifndef __PLGMMU_H_
#define __PLGMMU_H_
#include "plgbase.h"
#include "plgcpu.h"
#include "datadefs.h"
#include <string>
// Extending the base plugin interface.
class MMUPlugin : public Plugin
{
public:
virtual u8 getCaps() = 0; // What can the MMU do?
virtual void load(std::string) = 0; // Load a ROM file
virtual void priv(u8) = 0; // Change privilege levels
virtual void setCPU(CPUPlugin*) = 0; // CPU for this MMU
virtual void event(int,void*) = 0; // Signal an event occurred
};
#define PLUGIN_TYPE_MMU 2
// Event types to signal the MMU with
#define MMU_EVENT_IMMEDIATE 0
// Capability values
#define PLGMMU_CAPS_SIZEMASK 0x0F // Native MMU sizes:
#define PLGMMU_CAPS_8B 0x01 // 8-bit
#define PLGMMU_CAPS_16B 0x02 // 16-bit
#define PLGMMU_CAPS_32B 0x03 // 32-bit
#define PLGMMU_CAPS_UNALIGNED 0x10 // Allows unaligned access
#define PLGMMU_CAPS_LSBEND 0x00 // Little endian
#define PLGMMU_CAPS_MSBEND 0x20 // Big endian
// Privilege levels
#define MMU_PRIV_HI 255
#define MMU_PRIV_LO 0
// For protection-array elements in a RANGE
#define MMU_ALLOW_RD 1
#define MMU_ALLOW_WR 2
#define ERR_MMU_INIT 0x0201 // Error initing MMU
#define ERR_MMU_LOAD 0x0202
#endif//__PLGMMU_H_
/*** EOF: plgmmu.h *******************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -