jmce.altair
Class FDC
java.lang.Object
jmce.sim.AbstractHardware
jmce.sim.AbstractPeripheral
jmce.sim.disk.AbstractDiskController
jmce.altair.FDC
- All Implemented Interfaces:
- AltairConstants, DiskController, Hardware, MemoryReadListener, MemoryWriteListener, Peripheral
public class FDC
- extends AbstractDiskController
- implements MemoryReadListener, MemoryWriteListener, AltairConstants
Altair 8080 Floppy disk controller.
Simulate Altair 88_DISK controller based over FD-400 hard-sectored
floppy disk drive. Can support up to 16 floppy disk with 77 tracks
and 32 sector of 137 byte. The Z80 version support disk with 254
track.
FDC use 3 consucutive I/O port AT 0x08,0x09,0x0A :
- 08 W Select and enable controller and drive. (SELECT)
- 08 R Drive and controller status. (SELECT)
- 09 W Control disk function (CTRL)
- 09 R Current sector position (CTRL)
- 0A W Write data (DATA)
- 0A R Read data (DATA)
Control disk function register (CTRL) :
- BIT0 I - When 1 steps the head IN one track.
- BIT1 O - When 1 steps the head OUT one track.
- BIT2 H - When 1 load head to disk surface.
- BIT3 U - When 1 unload the head from disk surface.
- BIT4 E - Enabled interrupt.
- BIT5 D - Disabled interrupt.
- BIT6 C - When 1 lowers head current.
- BIT7 W - When starts Write enable sequence.
THIS VERSION DO NOT SUPPORT SECTOR WRITING.
- Version:
- 1.01
- Author:
- Mario Viara
Constructor Summary |
FDC()
|
Method Summary |
int |
readMemory(Memory m,
int address,
int value)
Called when the memory is readed. |
void |
registerCPU(CPU cpu)
Register a parent CPU for future reference. |
void |
writeMemory(Memory m,
int address,
int value,
int oldValue)
Called when a memory write event occours. |
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, reset, 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.Hardware |
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, init, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName |
FDC
public FDC()
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
readMemory
public int readMemory(Memory m,
int address,
int value)
throws SIMException
- Description copied from interface:
MemoryReadListener
- Called when the memory is readed.
This is method is called to notify a read at the specified
memory loction.
- Specified by:
readMemory
in interface MemoryReadListener
- Parameters:
m
- - Memory readed.address
- - Address where the operation occours.value
- - Value readed from the phisical memory or
from previus installed listener.
- Returns:
- Value readed from the memory.
- Throws:
SIMException
writeMemory
public void writeMemory(Memory m,
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:
m
- - Memory involved in the write operation.address
- - Address written.value
- - Value written.oldValue
- - Old value of this memory location.
- Throws:
SIMException