|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdioscuri.module.AbstractModule
dioscuri.module.ModuleKeyboard
dioscuri.module.keyboard.Keyboard
public class Keyboard
An implementation of a keyboard module.
Metadata module ********************************************
general.type : keyboard general.name : XT/AT/PS2 compatible Keyboard
general.architecture : Von Neumann general.description : Models a
101-key XT/AT/PS2 compatible keyboard general.creator : Tessella Support
Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands
general.version : 1.0 general.keywords : Keyboard, XT, AT, PS/2, Intel
8042 general.relations : Motherboard general.yearOfIntroduction :
general.yearOfEnding : general.ancestor : general.successor :
Notes: - Keyboard can handle XT, AT and PS/2 compatible keyboards - This
class uses a lot (if not all) of Bochs source code from keyboard.{h,cc};
- Conversions from C++ to Java have been made, and will need revising
and/or updating - Aside from handling keystrokes, the keyboard
controller is responsible for: + the status of the PC speaker via 0x61.
This is not implemented yet. + A20 address line (memory looping turned
on or off) to be enabled/disabled. + mouse support - Information used in
this module was taken from: +
http://mudlist.eorbit.net/~adam/pickey/ports.html +
http://homepages.cwi.nl/~aeb/linux/kbd/scancodes.html| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
|---|
Module.Type |
| Field Summary |
|---|
| Fields inherited from class dioscuri.module.AbstractModule |
|---|
type |
| Constructor Summary | |
|---|---|
Keyboard(Emulator owner)
Class constructor |
|
| Method Summary | |
|---|---|
protected void |
clearInterrupt(int irqNumber)
|
void |
enqueueControllerBuffer(byte data,
int source)
Queue data in the keyboard controller buffer |
void |
generateScancode(java.awt.event.KeyEvent keyEvent,
int eventType)
Method generateScancode Generates a scancode from a KeyEvent. The scancode depends on what scancode set is currently active, and whether the key is pressed or released |
java.lang.String |
getDump()
Return a dump of module status |
byte |
getIOPortByte(int portAddress)
|
byte[] |
getIOPortDoubleWord(int portAddress)
|
byte[] |
getIOPortWord(int portAddress)
|
int |
getUpdateInterval()
Get the update interval. |
boolean |
reset()
Reset all parameters of module. |
protected void |
setInterrupt(int irqNumber)
|
void |
setIOPortByte(int portAddress,
byte value)
|
void |
setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
|
void |
setIOPortWord(int portAddress,
byte[] dataWord)
|
void |
setTimeOut(byte status)
|
void |
setUpdateInterval(int interval)
Defines the interval between subsequent updates |
void |
update()
Update device Calls the keyboard controller 'poll' function and raises the IRQs resulting from that call |
| 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 |
| Methods inherited from interface dioscuri.interfaces.Module |
|---|
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
| Constructor Detail |
|---|
public Keyboard(Emulator owner)
| Method Detail |
|---|
public boolean reset()
reset in interface Modulereset in class AbstractModuleAbstractModulepublic java.lang.String getDump()
getDump in interface ModulegetDump in class AbstractModuleAbstractModulepublic int getUpdateInterval()
Updateablepublic void setUpdateInterval(int interval)
interval - the interval between subsequent updates in ms.Updateablepublic void update()
public byte getIOPortByte(int portAddress)
throws UnknownPortException,
WriteOnlyPortException
UnknownPortException
WriteOnlyPortExceptionAddressable
public void setIOPortByte(int portAddress,
byte value)
throws UnknownPortException
UnknownPortExceptionAddressable
public byte[] getIOPortWord(int portAddress)
throws ModuleException,
WriteOnlyPortException
ModuleException
WriteOnlyPortExceptionAddressable
public void setIOPortWord(int portAddress,
byte[] dataWord)
throws ModuleException
ModuleExceptionAddressable
public byte[] getIOPortDoubleWord(int portAddress)
throws ModuleException,
WriteOnlyPortException
ModuleException
WriteOnlyPortExceptionAddressable
public void setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
throws ModuleException
ModuleExceptionAddressableprotected void setInterrupt(int irqNumber)
irqNumber - protected void clearInterrupt(int irqNumber)
irqNumber -
public void generateScancode(java.awt.event.KeyEvent keyEvent,
int eventType)
generateScancode in class ModuleKeyboardkeyEvent - the KeyEvent containing key-press informationeventType - Type of KeyEvent, either pressed (0x00) or released (0x01)ModuleKeyboardpublic void setTimeOut(byte status)
setTimeOut in class ModuleKeyboardModuleKeyboard
public void enqueueControllerBuffer(byte data,
int source)
enqueueControllerBuffer in class ModuleKeyboardModuleKeyboard
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||