Classes | Public Types | Public Member Functions | List of all members
openmsx::AmdFlash Class Reference

#include <AmdFlash.hh>

Inheritance diagram for openmsx::AmdFlash:
Inheritance graph
Collaboration diagram for openmsx::AmdFlash:
Collaboration graph


struct  AmdCmd

Public Types

enum  State { ST_IDLE, ST_IDENT }

Public Member Functions

 AmdFlash (const Rom &rom, const std::vector< unsigned > &sectorSizes, unsigned writeProtectedFlags, word ID, const DeviceConfig &config, bool load=true)
 Create AmdFlash with given configuration. More...
 ~AmdFlash ()
void reset ()
unsigned getSize () const
byte read (unsigned address)
byte peek (unsigned address) const
void write (unsigned address, byte value)
const bytegetReadCacheLine (unsigned address) const
template<typename Archive >
void serialize (Archive &ar, unsigned version)

Detailed Description

Definition at line 17 of file AmdFlash.hh.

Member Enumeration Documentation


Definition at line 63 of file AmdFlash.hh.

Constructor & Destructor Documentation

openmsx::AmdFlash::AmdFlash ( const Rom rom,
const std::vector< unsigned > &  sectorSizes,
unsigned  writeProtectedFlags,
word  ID,
const DeviceConfig config,
bool  load = true 

Create AmdFlash with given configuration.

romThe initial content for this flash
sectorSizesA vector containing the size of each sector in the flash. This implicitly also communicates the number of sectors (a sector is a region in the flash that can be erased individually). There exist flash roms were the different sectors are not all equally large, that's why it's required to enumerate the size of each sector (instead of simply specifying the size and the number of sectors).
writeProtectedFlagsA bitmask indicating for each sector whether is write-protected or not (a 1-bit means write-wrotected).
IDContains manufacturer and device ID for this flash.
configThe motherboard this flash belongs to
loadLoad initial content (hack for 'Matra INK')

Definition at line 20 of file

References openmsx::SRAM::DONT_LOAD, openmsx::Rom::getName(), openmsx::Rom::getSize(), getSize(), openmsx::Math::isPowerOfTwo(), reset(), openmsx::MemBuffer< T, ALIGNMENT >::resize(), and xrange().

openmsx::AmdFlash::~AmdFlash ( )

Definition at line 102 of file

Member Function Documentation

const byte * openmsx::AmdFlash::getReadCacheLine ( unsigned  address) const

Definition at line 174 of file

References ST_IDLE, and openmsx::MSXDevice::unmappedRead.

unsigned openmsx::AmdFlash::getSize ( ) const

Definition at line 135 of file

Referenced by AmdFlash().

byte openmsx::AmdFlash::peek ( unsigned  address) const

Definition at line 140 of file

References ST_IDLE.

Referenced by read().

byte openmsx::AmdFlash::read ( unsigned  address)

Definition at line 168 of file

References peek().

void openmsx::AmdFlash::reset ( )

Definition at line 122 of file

References ST_IDLE.

Referenced by AmdFlash(), and write().

template<typename Archive >
void openmsx::AmdFlash::serialize ( Archive &  ar,
unsigned  version 

Definition at line 298 of file

void openmsx::AmdFlash::write ( unsigned  address,
byte  value 

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