jmce - 1_02

jmce.commodore.vic20
Class Tape

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.sim.tape.AbstractTape
              extended by jmce.sim.tape.TapeFile
                  extended by jmce.commodore.vic20.Tape
All Implemented Interfaces:
CycleListener, Hardware, MemoryWriteListener, Peripheral, Tape, TapeEventListener

public class Tape
extends TapeFile
implements TapeEventListener, CycleListener, MemoryWriteListener

Tape interface for commodore VIC-20

This version support only play.

Since:
1.01
Version:
1.01
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Constructor Summary
Tape()
           
 
Method Summary
 void cycle(int n)
          Cycle listener.
 void registerCPU(CPU cpu)
          Register a parent CPU for future reference.
 void reset()
          Reset the the device to the initial state.
 void setVia1(VIA6522 via)
           
 void setVia2(VIA6522 via)
           
 void tapePlay(Tape tape)
           
 void tapePower(Tape tape)
           
 void tapeRec(Tape tape)
           
 void tapeStop(Tape tape)
           
 void writeMemory(Memory memory, int address, int value, int oldValue)
          Called when a memory write event occours.
 
Methods inherited from class jmce.sim.tape.TapeFile
addDecoder, getConfig, getCurrentTapeData, getNumTapeData, getTapeData, isPlay, isRecording, nextPulse, play, rec, rewind, setConfig, stop
 
Methods inherited from class jmce.sim.tape.AbstractTape
addTapeEventListener, getPower, notifyPlay, notifyPower, notifyRec, notifyStop, setPower
 
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, setHardware, setHardware, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmce.sim.Peripheral
idle
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, setHardware, setHardware, setName
 

Constructor Detail

Tape

public Tape()
Method Detail

setVia2

public void setVia2(VIA6522 via)

setVia1

public void setVia1(VIA6522 via)

tapeStop

public void tapeStop(Tape tape)
Specified by:
tapeStop in interface TapeEventListener

tapePlay

public void tapePlay(Tape tape)
Specified by:
tapePlay in interface TapeEventListener

tapePower

public void tapePower(Tape tape)
Specified by:
tapePower in interface TapeEventListener

tapeRec

public void tapeRec(Tape tape)
Specified by:
tapeRec in interface TapeEventListener

reset

public void reset()
           throws SIMException
Description copied from interface: Hardware
Reset the the device to the initial state. This method will be called after init.

Specified by:
reset in interface Hardware
Overrides:
reset in class TapeFile
Throws:
SIMException

registerCPU

public void registerCPU(CPU cpu)
                 throws SIMException
Description copied from interface: Peripheral
Register a parent CPU for future reference.

Specified by:
registerCPU in interface Peripheral
Overrides:
registerCPU in class AbstractPeripheral
Throws:
SIMException

cycle

public void cycle(int n)
           throws SIMException
Description copied from interface: CycleListener
Cycle listener. This type of listener is very time consuming and must be used only when necessary because can have great impact on the simulator performance.

Specified by:
cycle in interface CycleListener
Parameters:
n - - The number of microprocessor cycle elapsed from the last call.
Throws:
SIMException
See Also:
CPU.addCycleListener(jmce.sim.CycleListener)

writeMemory

public void writeMemory(Memory memory,
                        int address,
                        int value,
                        int oldValue)
                 throws SIMException
Description copied from interface: MemoryWriteListener
Called when a memory write event occours.

This method is called when a memory write operation occours in the specified memory.

Specified by:
writeMemory in interface MemoryWriteListener
Parameters:
memory - - Memory involved in the write operation.
address - - Address written.
value - - Value written.
oldValue - - Old value of this memory location.
Throws:
SIMException

jmce - 1_02