dioscuri.module.video
Class Video

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModuleVideo
          extended by dioscuri.module.video.Video
All Implemented Interfaces:
Addressable, Module, Updateable

public class Video
extends ModuleVideo

An implementation of a video (VGA) module.

See Also:

Metadata module ******************************************** general.type : video general.name : General VGA display adapter general.architecture : Von Neumann general.description : Models a simple VGA adapter general.creator : Tessella Support Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0 general.keywords : VGA, Video Graphics Array, video, graphics, 640, 480 general.relations : Motherboard general.yearOfIntroduction : general.yearOfEnding : general.ancestor : general.successor :

Notes: - This code is based on Bochs code which has been ported to Java.


Nested Class Summary
 class Video.DiosJPCVideoConnect
           
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
 Video.DiosJPCVideoConnect vidMemConnect
           
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
Video(Emulator owner)
          Class constructor
 
Method Summary
 void acceptComponent(HardwareComponent component)
           
 int[] determineScreenSize()
          Determine the screen size in pixels
 byte getAttributePaletteRegister(int index)
          Returns a byte from attribute palette register at position index
 byte getIOPortByte(int portAddress)
          
 byte[] getIOPortDoubleWord(int portAddress)
          
 byte[] getIOPortWord(int portAddress)
          
 byte getTextSnapshot(int index)
          Returns a byte from text snapshot at position index
 int getUpdateInterval()
          Get the update interval.
 byte[] getVideoBuffer()
          Returns a pointer to the whole video buffer
 byte getVideoBufferByte(int index)
          Returns a byte from video buffer at position index
 java.lang.String getVideoBufferCharacters()
          Returns all characters (as Unicode) that are currently in buffer
 byte readMode(int address)
          Video read mode implementations
 boolean reset()
          Reset all parameters of module.
 void setIOPortByte(int portAddress, byte data)
          
 void setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)
          
 void setIOPortWord(int portAddress, byte[] dataWord)
          
 void setTextSnapshot(int index, byte data)
          Stores a byte in text snapshot at position index
 void setUpdateInterval(int interval)
          Defines the interval between subsequent updates
 void setVideoBufferByte(int index, byte data)
          Stores a byte in video buffer at position index
 void update()
          Update the module.
 void writeMode(int address, byte value)
          Video write mode implementations
 
Methods inherited from class dioscuri.module.AbstractModule
getConnection, getConnections, getDebugMode, getDump, 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, getDump, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop
 

Field Detail

vidMemConnect

public Video.DiosJPCVideoConnect vidMemConnect
Constructor Detail

Video

public Video(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

getUpdateInterval

public int getUpdateInterval()
Get the update interval.

Returns:
the update interval
See Also:
Updateable

setUpdateInterval

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

Parameters:
interval - the interval between subsequent updates in ms.
See Also:
Updateable

update

public void update()
Update the module.

See Also:
Updateable

getIOPortByte

public byte getIOPortByte(int portAddress)
                   throws ModuleException,
                          UnknownPortException,
                          WriteOnlyPortException

Returns:
Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
See Also:
Addressable

setIOPortByte

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

Throws:
ModuleException
UnknownPortException
See Also:
Addressable

getIOPortWord

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

Returns:
Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
See Also:
Addressable

setIOPortWord

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

Throws:
ModuleException
UnknownPortException
See Also:
Addressable

getIOPortDoubleWord

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

Returns:
Throws:
ModuleException
UnknownPortException
WriteOnlyPortException
See Also:
Addressable

setIOPortDoubleWord

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

Throws:
ModuleException
UnknownPortException
See Also:
Addressable

getVideoBuffer

public byte[] getVideoBuffer()
Returns a pointer to the whole video buffer

Specified by:
getVideoBuffer in class ModuleVideo
Returns:
byte[] containing the video buffer
See Also:
ModuleVideo

getVideoBufferByte

public byte getVideoBufferByte(int index)
Returns a byte from video buffer at position index

Specified by:
getVideoBufferByte in class ModuleVideo
Returns:
byte from video buffer
See Also:
ModuleVideo

setVideoBufferByte

public void setVideoBufferByte(int index,
                               byte data)
Stores a byte in video buffer at position index

Specified by:
setVideoBufferByte in class ModuleVideo
See Also:
ModuleVideo

getVideoBufferCharacters

public java.lang.String getVideoBufferCharacters()
Returns all characters (as Unicode) that are currently in buffer

Specified by:
getVideoBufferCharacters in class ModuleVideo
Returns:
String containing all characters in the buffer or null when no characters exist
See Also:
ModuleVideo

getTextSnapshot

public byte getTextSnapshot(int index)
Returns a byte from text snapshot at position index

Specified by:
getTextSnapshot in class ModuleVideo
Returns:
byte from textsnapshot
See Also:
ModuleVideo

setTextSnapshot

public void setTextSnapshot(int index,
                            byte data)
Stores a byte in text snapshot at position index

Specified by:
setTextSnapshot in class ModuleVideo
See Also:
ModuleVideo

getAttributePaletteRegister

public byte getAttributePaletteRegister(int index)
Returns a byte from attribute palette register at position index

Specified by:
getAttributePaletteRegister in class ModuleVideo
Returns:
byte from register
See Also:
ModuleVideo

determineScreenSize

public int[] determineScreenSize()
Determine the screen size in pixels

Specified by:
determineScreenSize in class ModuleVideo
Returns:
integer array containing [height, width] of screen in pixels
See Also:
ModuleVideo

readMode

public byte readMode(int address)
Video read mode implementations

Specified by:
readMode in class ModuleVideo
Returns:
-
See Also:
ModuleVideo

writeMode

public void writeMode(int address,
                      byte value)
Video write mode implementations

Specified by:
writeMode in class ModuleVideo
See Also:
ModuleVideo

acceptComponent

public void acceptComponent(HardwareComponent component)
Parameters:
component -