openMSX
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
[legend]
Collaboration diagram for openmsx::CheckedRam:
Collaboration graph
[legend]

Public Member Functions

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

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,
size_t  size 
)

◆ ~CheckedRam()

openmsx::CheckedRam::~CheckedRam ( )

Member Function Documentation

◆ clear()

void openmsx::CheckedRam::clear ( )

Definition at line 85 of file CheckedRam.cc.

References openmsx::Ram::clear().

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

◆ getReadCacheLine()

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

◆ getRWCacheLines()

byte * openmsx::CheckedRam::getRWCacheLines ( size_t  addr,
size_t  size 
)

◆ getUncheckedRam()

Ram & openmsx::CheckedRam::getUncheckedRam ( )
inline

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 ( size_t  addr)

◆ peek()

byte openmsx::CheckedRam::peek ( size_t  addr) const
inline

◆ read()

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

◆ size()

size_t openmsx::CheckedRam::size ( ) const
inline

◆ write()

void openmsx::CheckedRam::write ( size_t  addr,
byte  value 
)

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