ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Types | Public Member Functions | Private Attributes | List of all members
MemMan Class Referencefinal

#include <memman.h>

Public Types

enum  Error : tUBYTE { ErrRamSize =1, ErrMemory =2, ErrCpcRom =4, ErrAmsdos =8 }
 

Public Member Functions

 MemMan (Z80 *z80=nullptr, GateArray *gatearray=nullptr, const tSTRING &cpcrom="", const tSTRING &amsdos="")
 
int init (tUWORD ramsize=128, const tSTRING &cpcrom="", const tSTRING &amsdos="")
 
int init (Z80 *z80, GateArray *gatearray)
 
void initBanking ()
 
void memoryManager ()
 
void toggleLowerRom ()
 
void toggleUpperRom ()
 
tUBYTEmemBankConfig (tUBYTE bank, tUBYTE seg)
 
tUBYTErom (int bank)
 
tUBYTEupperRom ()
 
tUBYTElowerRom ()
 
tUBYTEbase ()
 
bool openRom (int idx, const tSTRING &filename)
 
bool openCpcRom (const tSTRING &filename)
 

Private Attributes

GateArraymGateArray
 
Z80mZ80
 
tUBYTEmRam
 
tUBYTEmRom [256]
 
tUBYTE mCpcRom [2 *16384]
 
tUBYTEmMemBankConfig [8][4]
 
tUBYTEmUpperRom
 
tUBYTEmLowerRom
 
int mRamSize
 

Detailed Description

Author
Fred Klaus

Member Enumeration Documentation

enum Error : tUBYTE
Enumerator
ErrRamSize 
ErrMemory 
ErrCpcRom 
ErrAmsdos 

Constructor & Destructor Documentation

MemMan ( Z80 z80 = nullptr,
GateArray gatearray = nullptr,
const tSTRING cpcrom = "",
const tSTRING amsdos = "" 
)

Member Function Documentation

tUBYTE* base ( )
inline
int init ( tUWORD  ramsize = 128,
const tSTRING cpcrom = "",
const tSTRING amsdos = "" 
)

Referenced by MemMan::init().

int init ( Z80 z80,
GateArray gatearray 
)
void initBanking ( )
inline
tUBYTE* lowerRom ( )
inline

References MemMan::mLowerRom.

tUBYTE* memBankConfig ( tUBYTE  bank,
tUBYTE  seg 
)
inline
void memoryManager ( )
bool openCpcRom ( const tSTRING filename)

Referenced by MemMan::base(), and MemMan::init().

bool openRom ( int  idx,
const tSTRING filename 
)

Referenced by MemMan::base(), and MemMan::init().

tUBYTE* rom ( int  bank)
inline

References MemMan::mRom.

void toggleLowerRom ( )
inline
void toggleUpperRom ( )
inline
tUBYTE* upperRom ( )
inline

References MemMan::mUpperRom.

Member Data Documentation

tUBYTE mCpcRom[2 *16384]
private

Referenced by MemMan::init().

GateArray* mGateArray
private
tUBYTE* mLowerRom
private
tUBYTE* mMemBankConfig[8][4]
private
tUBYTE* mRam
private
int mRamSize
private
tUBYTE* mRom[256]
private
tUBYTE* mUpperRom
private
Z80* mZ80
private

The documentation for this class was generated from the following files: