|
openMSX
|
#include <AmdFlash.hh>


Classes | |
| struct | AmdCmd |
Public Types | |
| enum | State { ST_IDLE, ST_IDENT } |
Public Member Functions | |
| AmdFlash (const Rom &rom, const std::vector< unsigned > §orSizes, unsigned writeProtectedFlags, word ID, const DeviceConfig &config, bool load=true) | |
| Create AmdFlash with given configuration. | |
| ~AmdFlash () | |
| void | reset () |
| unsigned | getSize () const |
| byte | read (unsigned address) |
| byte | peek (unsigned address) const |
| void | write (unsigned address, byte value) |
| const byte * | getReadCacheLine (unsigned address) const |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Additional Inherited Members |
Definition at line 17 of file AmdFlash.hh.
Definition at line 63 of file AmdFlash.hh.
| 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.
| rom | The initial content for this flash |
| sectorSizes | A 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). |
| writeProtectedFlags | A bitmask indicating for each sector whether is write-protected or not (a 1-bit means write-wrotected). |
| ID | Contains manufacturer and device ID for this flash. |
| config | The motherboard this flash belongs to |
| load | Load initial content (hack for 'Matra INK') |
Definition at line 20 of file AmdFlash.cc.
References openmsx::SRAM::DONT_LOAD, openmsx::Rom::getName(), openmsx::Rom::getSize(), getSize(), openmsx::Math::isPowerOfTwo(), reset(), openmsx::MemBuffer< T >::resize(), and xrange().
| openmsx::AmdFlash::~AmdFlash | ( | ) |
Definition at line 102 of file AmdFlash.cc.
| const byte * openmsx::AmdFlash::getReadCacheLine | ( | unsigned | address | ) | const |
Definition at line 174 of file AmdFlash.cc.
References ST_IDLE, and openmsx::MSXDevice::unmappedRead.
| unsigned openmsx::AmdFlash::getSize | ( | ) | const |
Definition at line 135 of file AmdFlash.cc.
Referenced by AmdFlash().
| byte openmsx::AmdFlash::peek | ( | unsigned | address | ) | const |
| byte openmsx::AmdFlash::read | ( | unsigned | address | ) |
Definition at line 168 of file AmdFlash.cc.
References peek().
| void openmsx::AmdFlash::reset | ( | ) |
Definition at line 122 of file AmdFlash.cc.
References ST_IDLE.
Referenced by AmdFlash(), and write().
| void openmsx::AmdFlash::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Definition at line 300 of file AmdFlash.cc.
| void openmsx::AmdFlash::write | ( | unsigned | address, |
| byte | value | ||
| ) |
Definition at line 186 of file AmdFlash.cc.
References openmsx::AmdFlash::AmdCmd::addr, reset(), and openmsx::AmdFlash::AmdCmd::value.
1.8.1.2