Public Member Functions | List of all members
openmsx::CheckedRam Class Referencefinal

This class keeps track of which bytes in the Ram have been written to. More...

#include <CheckedRam.hh>

Inheritance diagram for openmsx::CheckedRam:
Inheritance graph
Collaboration diagram for openmsx::CheckedRam:
Collaboration graph

Public Member Functions

 CheckedRam (const DeviceConfig &config, const std::string &name, static_string_view description, unsigned size)
 ~CheckedRam ()
byte read (unsigned addr)
byte peek (unsigned addr) const
void write (unsigned addr, byte value)
const bytegetReadCacheLine (unsigned addr) const
bytegetWriteCacheLine (unsigned addr) const
bytegetRWCacheLines (unsigned addr, unsigned size) const
unsigned getSize () const
void clear ()
RamgetUncheckedRam ()
 Give access to the unchecked Ram. More...

Detailed Description

This class keeps track of which bytes in the Ram have been written to.

It can be used for debugging MSX programs, because you can see if you are trying to read/execute uninitialized memory. Currently all normal RAM (MSXRam) and all normal memory mappers (MSXMemoryMappers) use CheckedRam. On the turboR, only the normal memory mapper runs via CheckedRam. The RAM accessed in DRAM mode or via the ROM mapper are unchecked! Note that there is basically no overhead for using CheckedRam over Ram, thanks to Wouter.

Definition at line 27 of file CheckedRam.hh.

Constructor & Destructor Documentation

◆ CheckedRam()

openmsx::CheckedRam::CheckedRam ( const DeviceConfig config,
const std::string &  name,
static_string_view  description,
unsigned  size 

◆ ~CheckedRam()

openmsx::CheckedRam::~CheckedRam ( )

Member Function Documentation

◆ clear()

void openmsx::CheckedRam::clear ( )

Definition at line 84 of file

References openmsx::Ram::clear().

Referenced by openmsx::MSXMemoryMapperBase::powerUp().

◆ getReadCacheLine()

const byte * openmsx::CheckedRam::getReadCacheLine ( unsigned  addr) const

◆ getRWCacheLines()

byte * openmsx::CheckedRam::getRWCacheLines ( unsigned  addr,
unsigned  size 
) const

◆ getSize()

unsigned openmsx::CheckedRam::getSize ( ) const

◆ getUncheckedRam()

Ram & openmsx::CheckedRam::getUncheckedRam ( )

Give access to the unchecked Ram.

No problem to use it, but there will just be no checking done! Keep in mind that you should use this consistently, so that the initialized-administration will be always up to date!

Definition at line 51 of file CheckedRam.hh.

Referenced by openmsx::PanasonicRam::PanasonicRam(), openmsx::ColecoSuperGameModule::serialize(), and openmsx::MSXMemoryMapperBase::serialize().

◆ getWriteCacheLine()

byte * openmsx::CheckedRam::getWriteCacheLine ( unsigned  addr) const

◆ peek()

byte openmsx::CheckedRam::peek ( unsigned  addr) const

◆ read()

byte openmsx::CheckedRam::read ( unsigned  addr)

◆ write()

void openmsx::CheckedRam::write ( unsigned  addr,
byte  value 

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