dioscuri.module.rtc
Class RTC

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModuleRTC
          extended by dioscuri.module.rtc.RTC
All Implemented Interfaces:
Addressable, Module

public class RTC
extends ModuleRTC

An implementation of a Real Time module. This component takes care of updating the date and time settings of the computer.

See Also:

Metadata module ******************************************** general.type : rtc general.name : Real Time Clock (RTC) general.architecture : Von Neumann general.description : Implements an Intel RTC (part of Intel 82801DB I/O Controller Hub 4, ICH4) and is compatible with the Motorola MC146818. Includes 256 bytes of CMOS memory. general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0 general.keywords : rtc, clock, date, time, cmos general.relations : motherboard, pit general.yearOfIntroduction : general.yearOfEnding : general.ancestor : general.successor : rtc.ramsize : 256 bytes


Nested Class Summary
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
protected  int lookupRegister
           
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
RTC(Emulator owner)
          Class constructor
 
Method Summary
 byte getCMOSRegister(int register)
          Return requested CMOS register
 java.lang.String getDump()
          Return a dump of module status
 byte getIOPortByte(int portAddress)
          
 byte[] getIOPortDoubleWord(int portAddress)
          
 byte[] getIOPortWord(int portAddress)
          
 int getUpdateInterval()
          Retrieve the interval between subsequent updates
 boolean reset()
          Reset all parameters of module.
 void setCMOSRegister(int register, byte value)
          Set given CMOS register with value
 void setIOPortByte(int portAddress, byte data)
          
 void setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)
          
 void setIOPortWord(int portAddress, byte[] dataWord)
          
 void setUpdateInterval(int interval)
          Defines the interval between subsequent updates
 void update()
          Update device
 void updateClock()
          Update clock Increment the clock value
 
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
 

Field Detail

lookupRegister

protected int lookupRegister
Constructor Detail

RTC

public RTC(Emulator owner)
Class constructor

Parameters:
owner -
Method Detail

reset

public boolean reset()
Reset all parameters of module.

Specified by:
reset in interface Module
Specified by:
reset in class AbstractModule
Returns:
true iff the AbstractModule was reset properly.
See Also:
AbstractModule

getDump

public java.lang.String getDump()
Return a dump of module status

Provides a dummy implementation since many of the subclasses of this abstract module class do not need or use a getDump() implementation. The ones that do, can override this method.

Specified by:
getDump in interface Module
Overrides:
getDump in class AbstractModule
Returns:
string containing a dump of this module
See Also:
AbstractModule

getUpdateInterval

public int getUpdateInterval()
Retrieve the interval between subsequent updates

Returns:
int interval in microseconds

setUpdateInterval

public void setUpdateInterval(int interval)
Defines the interval between subsequent updates


update

public void update()
Update device


getIOPortByte

public byte getIOPortByte(int portAddress)
                   throws UnknownPortException,
                          WriteOnlyPortException

Returns:
Throws:
UnknownPortException
WriteOnlyPortException
See Also:
Addressable

setIOPortByte

public void setIOPortByte(int portAddress,
                          byte data)
                   throws UnknownPortException

Throws:
UnknownPortException
See Also:
Addressable

getIOPortWord

public byte[] getIOPortWord(int portAddress)
                     throws ModuleException,
                            WriteOnlyPortException

Returns:
Throws:
ModuleException
WriteOnlyPortException
See Also:
Addressable

setIOPortWord

public void setIOPortWord(int portAddress,
                          byte[] dataWord)
                   throws ModuleException

Throws:
ModuleException
See Also:
Addressable

getIOPortDoubleWord

public byte[] getIOPortDoubleWord(int portAddress)
                           throws ModuleException,
                                  WriteOnlyPortException

Returns:
Throws:
ModuleException
WriteOnlyPortException
See Also:
Addressable

setIOPortDoubleWord

public void setIOPortDoubleWord(int portAddress,
                                byte[] dataDoubleWord)
                         throws ModuleException

Throws:
ModuleException
See Also:
Addressable

getCMOSRegister

public byte getCMOSRegister(int register)
Return requested CMOS register

Specified by:
getCMOSRegister in class ModuleRTC
Returns:
byte containing value of register
See Also:
ModuleRTC

setCMOSRegister

public void setCMOSRegister(int register,
                            byte value)
Set given CMOS register with value

Specified by:
setCMOSRegister in class ModuleRTC
See Also:
ModuleRTC

updateClock

public void updateClock()
Update clock Increment the clock value

Specified by:
updateClock in class ModuleRTC
See Also:
ModuleRTC