|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.SysKit
public final class SysKit
JMCE System kit.
This peripheral permit one iteration from the emulated operating system and the emulator implementing some useful function.
Use only one Read/Write port that can be set using the method port
.
This sample Z80 program track the elapsed time of the function dowork on the console :
ld a,4 ; Start new timer function out (0f0h),a ; call dowork ; Do the work .... ld a,5 ; Stop last timer put (0f0h),a ; Write elapsed time on ; the console (if any!)
Field Summary | |
---|---|
protected int |
port
Default base register |
static int |
SYSKIT_CMD_CHECK
Check SysKit when write this command the 2 successive read will return 0x69 and then 0x96 this permit to check if the syskit is installed |
static int |
SYSKIT_CMD_DEBUG
Enter in debug @since 1.01 |
static int |
SYSKIT_CMD_DELAY
Release control of the cpu to the emulator |
static int |
SYSKIT_CMD_GETVER
Get version this command return the version of the class |
static int |
SYSKIT_CMD_NONE
No command only for internal status |
static int |
SYSKIT_CMD_PRTVER
Print the version on the console |
static int |
SYSKIT_CMD_RESKIT
Reset the internal status command |
static int |
SYSKIT_CMD_TSTART
Create a new millis timer and push on the timer stack |
static int |
SYSKIT_CMD_TSTOP
Pop a timer from the timer stack and display on the console the elapsed time |
static int |
SYSKIT_VERSION
Current version |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
SysKit()
|
Method Summary | |
---|---|
int |
getPort()
Return the current base port. |
void |
print(java.lang.Object o)
|
void |
println()
|
void |
println(java.lang.Object o)
|
void |
putchar(int c)
|
int |
readMemory(Memory m,
int address,
int v)
Called when the memory is readed. |
void |
registerCPU(CPU cpu)
Register a parent CPU for future reference. |
void |
reset(CPU cpu)
|
void |
setPort(int port)
Set the new base port. |
java.lang.String |
toString()
|
void |
writeMemory(Memory m,
int address,
int v,
int oldValue)
Called when a memory write event occours. |
Methods inherited from class jmce.sim.AbstractPeripheral |
---|
idle, setIdle, setLive |
Methods inherited from class jmce.sim.AbstractHardware |
---|
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmce.sim.Hardware |
---|
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
Field Detail |
---|
public static final int SYSKIT_CMD_CHECK
public static final int SYSKIT_CMD_GETVER
public static final int SYSKIT_CMD_RESKIT
public static final int SYSKIT_CMD_DELAY
public static final int SYSKIT_CMD_TSTART
public static final int SYSKIT_CMD_TSTOP
public static final int SYSKIT_CMD_PRTVER
public static final int SYSKIT_CMD_DEBUG
public static final int SYSKIT_CMD_NONE
public static final int SYSKIT_VERSION
protected int port
Constructor Detail |
---|
public SysKit()
Method Detail |
---|
public int getPort()
public void setPort(int port)
port
- public void registerCPU(CPU cpu) throws SIMException
Peripheral
registerCPU
in interface Peripheral
registerCPU
in class AbstractPeripheral
SIMException
public void reset(CPU cpu) throws SIMException
reset
in interface ResetListener
SIMException
public int readMemory(Memory m, int address, int v) throws SIMException
MemoryReadListener
This is method is called to notify a read at the specified memory loction.
readMemory
in interface MemoryReadListener
m
- - Memory readed.address
- - Address where the operation occours.v
- - Value readed from the phisical memory or
from previus installed listener.
SIMException
public void writeMemory(Memory m, int address, int v, int oldValue) throws SIMException
MemoryWriteListener
This method is called when a memory write operation occours in the specified memory.
writeMemory
in interface MemoryWriteListener
m
- - Memory involved in the write operation.address
- - Address written.v
- - Value written.oldValue
- - Old value of this memory location.
SIMException
public void print(java.lang.Object o) throws SIMException
SIMException
public void println() throws SIMException
SIMException
public void println(java.lang.Object o) throws SIMException
SIMException
public void putchar(int c) throws SIMException
SIMException
public java.lang.String toString()
toString
in class AbstractHardware
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |