⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plgmmu.h

📁 一个任天堂掌上游戏机NDS的源代码
💻 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 + -