|
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.swing.KeyboardMatrix
jmce.commodore.vic20.Keyboard
public class Keyboard
VIC20 Keyboard / Joystick
This class emulate the keyboard / joystick for VIC20.
Commodore key | Java Key |
---|---|
Run/Stop | Esc |
The joystick is alternative to the keyboard and can be enable pressing the ALT key. When the joystick is enabled the arrow key simulate a joystick direction button and any other key the fire button.
Field Summary |
---|
Fields inherited from class jmce.swing.KeyboardMatrix |
---|
keysLoc, keyState, numRows |
Fields inherited from class jmce.sim.AbstractPeripheral |
---|
cpu |
Constructor Summary | |
---|---|
Keyboard()
|
Method Summary | |
---|---|
void |
keyEvent(java.awt.event.KeyEvent e,
boolean pressed)
|
void |
registerCPU(CPU cpu)
Register a parent CPU for future reference. |
protected void |
resetJoystick()
Reset the joystick. |
protected void |
resetKeyboard()
Reset the state of the keyboard. |
void |
setVia1(VIA6522 via1)
|
void |
setVia2(VIA6522 via2)
|
void |
writeMemory(Memory memory,
int address,
int value,
int oldValue)
Called when a memory write event occours. |
Methods inherited from class jmce.swing.KeyboardMatrix |
---|
focusGained, focusLost, getRow, keyEvent, keyPressed, keyReleased, keyTyped, setComponent, setKey, setKeyLocation, setNumCols, setNumRows, toString |
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 |
Constructor Detail |
---|
public Keyboard()
Method Detail |
---|
public void setVia1(VIA6522 via1)
public void setVia2(VIA6522 via2)
public void registerCPU(CPU cpu) throws SIMException
Peripheral
registerCPU
in interface Peripheral
registerCPU
in class AbstractPeripheral
SIMException
public void writeMemory(Memory memory, int address, int value, int oldValue) throws SIMException
MemoryWriteListener
This method is called when a memory write operation occours in the specified memory.
writeMemory
in interface MemoryWriteListener
memory
- - Memory involved in the write operation.address
- - Address written.value
- - Value written.oldValue
- - Old value of this memory location.
SIMException
protected void resetJoystick()
public void keyEvent(java.awt.event.KeyEvent e, boolean pressed)
keyEvent
in class KeyboardMatrix
protected void resetKeyboard()
KeyboardMatrix
resetKeyboard
in class KeyboardMatrix
|
jmce - 1_02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |