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

#include <AmdFlash.hh>


struct  AmdCmd
struct  SectorInfo

Public Types

enum  State { ST_IDLE, ST_IDENT }

Public Member Functions

 AmdFlash (const Rom &rom, std::vector< SectorInfo > sectorInfo, word ID, bool use12bitAddressing, const DeviceConfig &config, bool load=true)
 Create AmdFlash with given configuration. More...
 ~AmdFlash ()
void reset ()
void setVppWpPinLow (bool value)
 Setting the Vpp/WP# pin LOW enables a certain kind of write protection of some sectors. More...
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

◆ State


Definition at line 72 of file AmdFlash.hh.

Constructor & Destructor Documentation

◆ AmdFlash()

openmsx::AmdFlash::AmdFlash ( const Rom rom,
std::vector< SectorInfo sectorInfo,
word  ID,
bool  use12bitAddressing,
const DeviceConfig config,
bool  load = true 

Create AmdFlash with given configuration.

romThe initial content for this flash
sectorInfoA vector containing the size and write protected status 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).
IDContains manufacturer and device ID for this flash.
use12bitAddressingset to true for 12-bit command addresses, false for 11-bit command addresses
configThe motherboard this flash belongs to
loadLoad initial content (hack for 'Matra INK')

Definition at line 21 of file

References begin(), openmsx::SRAM::DONT_LOAD, end(), openmsx::Rom::getName(), openmsx::Rom::getSize(), getSize(), Math::isPowerOfTwo(), openmsx::XMLLoader::load(), reset(), openmsx::MemBuffer< T, ALIGNMENT >::resize(), ST_IDLE, xrange(), and ~AmdFlash().

◆ ~AmdFlash()

openmsx::AmdFlash::~AmdFlash ( )

Referenced by AmdFlash().

Member Function Documentation

◆ getReadCacheLine()

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

◆ getSize()

unsigned openmsx::AmdFlash::getSize ( ) const

◆ peek()

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

◆ read()

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

◆ reset()

void openmsx::AmdFlash::reset ( )

◆ serialize()

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

Definition at line 326 of file

Referenced by getSize().

◆ setVppWpPinLow()

void openmsx::AmdFlash::setVppWpPinLow ( bool  value)

Setting the Vpp/WP# pin LOW enables a certain kind of write protection of some sectors.

Currently it is implemented that it will enable protection of the first two sectors. (As for example in Numonix/Micron M29W640FB/M29W640GB.)

Definition at line 52 of file AmdFlash.hh.

Referenced by openmsx::MegaFlashRomSCCPlusSD::getWriteCacheLine().

◆ write()

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

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