de.michab.simulator.mos6502
Class Sid

java.lang.Object
  extended byde.michab.simulator.DefaultChip
      extended byde.michab.simulator.mos6502.Sid
All Implemented Interfaces:
Addressable, Chip

public final class Sid
extends DefaultChip

The MOS 6581 Sound Interface Device.

Version:
$Revision: 1.19 $
Author:
Michael G. Binz
See Also:
Voice

Constructor Summary
Sid()
          Create an instance.
 
Method Summary
 Port[] getPorts()
          Get an array of the chip's ports.
 boolean isSoundOn()
          Check whether sound is active.
 byte read(int portId)
          Read a byte from the given address.
 void reset()
          Reset the chip to a defined state.
 void setSoundOn(boolean what)
          Activate or deactivate sound.
 void write(int portId, byte value)
          Write a byte into the given address.
 
Methods inherited from class de.michab.simulator.DefaultChip
createPorts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sid

public Sid()
Create an instance.

Method Detail

read

public byte read(int portId)
Description copied from interface: Addressable
Read a byte from the given address.

Parameters:
portId - The source address.
Returns:
The byte read.

write

public void write(int portId,
                  byte value)
Description copied from interface: Addressable
Write a byte into the given address.

Parameters:
portId - The target address.
value - The value to be written.

getPorts

public Port[] getPorts()
Description copied from interface: Chip
Get an array of the chip's ports. May return null if this chip does not support ports.

Returns:
An array of the chip's ports.

reset

public void reset()
Description copied from interface: Chip
Reset the chip to a defined state.


isSoundOn

public boolean isSoundOn()
Check whether sound is active.

Returns:
true if the sound is switched on.
See Also:
setSoundOn(boolean)

setSoundOn

public void setSoundOn(boolean what)
Activate or deactivate sound.

Parameters:
what - True if the sound is to be switched on, false to switch sound off.