|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdioscuri.module.AbstractModule
dioscuri.module.ModuleMemory
dioscuri.module.memory.Memory
public class Memory
An implementation of a hardware memory module.
Contains an array of 2^20 integers, offering 1MB of RAM.
Metadata module ********************************************
general.type : memory general.name : 1 Megabyte Random Access Memory
general.architecture : Von Neumann general.description : General
implementation of 1 MB of flat RAM. general.creator : Tessella Support
Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands
general.version : 1.0 general.keywords : memory, RAM, 1MB, A20 address
line general.relations : cpu, mainboard general.yearOfIntroduction :
general.yearOfEnding : general.ancestor : general.successor :
memory.size : 1 MB
Notes: none| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
|---|
Module.Type |
| Field Summary | |
|---|---|
protected static long |
A20mask
|
byte[] |
ram
|
| Fields inherited from class dioscuri.module.AbstractModule |
|---|
type |
| Constructor Summary | |
|---|---|
Memory(Emulator owner)
Class constructor |
|
| Method Summary | |
|---|---|
byte |
getByte(int address)
Return a byte from memory at a specific address |
java.lang.String |
getDump()
Return a dump of module status |
byte[] |
getWord(int address)
Returns the value of a word at a specific address Note: words in memory are stored in Little Endian order (LSB, MSB), but this method returns a word in Big Endian order (MSB, LSB) because this is the common way words are used by instructions. |
boolean |
reset()
Reset all parameters of module. |
void |
setA20AddressLine(boolean status)
Set A20 address line toggle |
void |
setByte(int address,
byte value)
Set a byte in memory at given address |
void |
setBytes(int address,
byte[] binaryStream)
Stores an array of bytes in memory starting at a specific address |
void |
setRamSizeInMB(int ramSizeMB)
Set RAM Size in megabytes |
void |
setWatchValueAndAddress(boolean isWatchOn,
int watchAddress)
Set watch toggle and address to trace in memory |
void |
setWord(int address,
byte[] value)
Stores the value of a word at a specific address Note: words in memory are stored in Little Endian order (LSB, MSB), but this method assumes that a word is given in Big Endian order (MSB, LSB) because this is the common way words are used by instructions. |
| Methods inherited from class dioscuri.module.AbstractModule |
|---|
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public byte[] ram
protected static long A20mask
| Constructor Detail |
|---|
public Memory(Emulator owner)
owner - | Method Detail |
|---|
public boolean reset()
reset in interface Modulereset in class AbstractModuleAbstractModulepublic java.lang.String getDump()
getDump in interface ModulegetDump in class AbstractModuleAbstractModulepublic byte getByte(int address)
getByte in class ModuleMemoryaddress - Flat-address where data can be found
ModuleMemory
public void setByte(int address,
byte value)
setByte in class ModuleMemoryModuleMemorypublic byte[] getWord(int address)
getWord in class ModuleMemoryaddress - Flat-address where data can be found
ModuleMemory
public void setWord(int address,
byte[] value)
setWord in class ModuleMemoryModuleMemory
public void setBytes(int address,
byte[] binaryStream)
throws ModuleException
setBytes in class ModuleMemoryaddress - Flat-address where data is stored
ModuleExceptionModuleMemorypublic void setA20AddressLine(boolean status)
setA20AddressLine in class ModuleMemoryModuleMemory
public void setWatchValueAndAddress(boolean isWatchOn,
int watchAddress)
setWatchValueAndAddress in class ModuleMemoryModuleMemorypublic void setRamSizeInMB(int ramSizeMB)
setRamSizeInMB in class ModuleMemoryModuleMemory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||