mempage.h File Reference


Detailed Description

This file contains implementation of simulated paged memory to be used by the emulating CPUs to access simulated memory banks.

Note:
Current implementation does not permit for physical addressing of more than 32 bits or reading or writing more than 32 bit chunks. When it is required, a pagetable64 will be added.

Definition in file mempage.h.

#include <stdlib.h>

Include dependency graph for mempage.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oe_pagetable_ptrtable
 This struct contain set of callbacks called back from the oe_pagetable when exception occurs (such as "page not exist" or "attempting to write to read-only page"). More...
class  oe_pagetable
 Memory page table used to simulate paged memory. More...

Defines

#define OE_PT_FLAG_READABLE   1
 Memory page is READABLE.
#define OE_PT_FLAG_READABLE_MASK   0xFE
 Memory page is READABLE bit mask.
#define OE_PT_FLAG_WRITEABLE   2
 Memory page is WRITEABLE.
#define OE_PT_FLAG_WRITEABLE_MASK   0xFD
 Memory page is WRITEABLE bit mask.
#define OE_PT_FLAG_READ_DIRTY   4
 Memory page is DIRTY.
#define OE_PT_FLAG_READ_DIRTY_MASK   0xFB
 Memory page is DIRTY bit mask.
#define OE_PT_FLAG_WRITE_DIRTY   8
 Memory page is WRITE DIRTY.
#define OE_PT_FLAG_WRITE_DIRTY_MASK   0xF7
 Memory page is WRITE DIRTY bit mask.
#define OE_PT_FLAG_ALLOCATED   16
 Memory page was allocated using oe_mempage::page_allocate().
#define OE_PT_FLAG_ALLOCATED_MASK   0xEF
 Memory page is ALLOCATED bit mask.
#define OE_PAGE(x)   ((x) >> mem.shift)
#define OE_PAGE_MASK(x)   ((x) & mem.mask)
#define OE_PAGE_FLAG(x)   (mem.flags+(x))

Typedefs

typedef uint16 OE_PT_FLAG
 Bitmask used to specify memory protection flags.


Define Documentation

#define OE_PT_FLAG_READABLE   1

Memory page is READABLE.

Definition at line 20 of file mempage.h.

Referenced by RCASTUDIO2::init(), NES::init(), Commodore64::init(), oe_pagetable::read_mem16(), oe_pagetable::read_mem32(), oe_pagetable::read_mem8(), and PPU::setmapper().

#define OE_PT_FLAG_READABLE_MASK   0xFE

Memory page is READABLE bit mask.

Definition at line 21 of file mempage.h.

#define OE_PT_FLAG_WRITEABLE   2

Memory page is WRITEABLE.

Definition at line 22 of file mempage.h.

Referenced by RCASTUDIO2::init(), NES::init(), Commodore64::init(), PPU::setmapper(), oe_pagetable::write_mem16(), oe_pagetable::write_mem32(), and oe_pagetable::write_mem8().

#define OE_PT_FLAG_WRITEABLE_MASK   0xFD

Memory page is WRITEABLE bit mask.

Definition at line 23 of file mempage.h.

#define OE_PT_FLAG_READ_DIRTY   4

Memory page is DIRTY.

Definition at line 24 of file mempage.h.

Referenced by oe_pagetable::forced_read_mem16(), oe_pagetable::forced_read_mem32(), oe_pagetable::forced_read_mem8(), oe_pagetable::read_mem16(), oe_pagetable::read_mem32(), and oe_pagetable::read_mem8().

#define OE_PT_FLAG_READ_DIRTY_MASK   0xFB

Memory page is DIRTY bit mask.

Definition at line 25 of file mempage.h.

#define OE_PT_FLAG_WRITE_DIRTY   8

Memory page is WRITE DIRTY.

Definition at line 26 of file mempage.h.

Referenced by oe_pagetable::forced_write_mem16(), oe_pagetable::forced_write_mem32(), oe_pagetable::forced_write_mem8(), oe_pagetable::write_mem16(), oe_pagetable::write_mem32(), and oe_pagetable::write_mem8().

#define OE_PT_FLAG_WRITE_DIRTY_MASK   0xF7

Memory page is WRITE DIRTY bit mask.

Definition at line 27 of file mempage.h.

#define OE_PT_FLAG_ALLOCATED   16

Memory page was allocated using oe_mempage::page_allocate().

Definition at line 28 of file mempage.h.

Referenced by oe_pagetable::alloc_page(), and oe_pagetable::deallocate_page().

#define OE_PT_FLAG_ALLOCATED_MASK   0xEF

Memory page is ALLOCATED bit mask.

Definition at line 29 of file mempage.h.


Typedef Documentation

typedef uint16 OE_PT_FLAG

Bitmask used to specify memory protection flags.

Definition at line 32 of file mempage.h.


Generated on Sat Sep 9 03:50:48 2006 for Openem APIs by  doxygen 1.4.7