Re: IEEE protocol under BASIC V4

From: Andre Fachat (
Date: 2003-05-28 23:47:06

Hi Marko,

the IEEE488 state engine started as an interface between the PET and the
virtual drive
emulation in VICE, and evolved into a general IEEE488 bus emulation,
that handles
attached computers, emulated drives and the VICE virtual drive(s).

The original engine used 5 states to emulate the states on the IEEE488
bus, but due
to the different CBM protocol implementations I had to ad two more...

And finally, this is only used for IEEE488, not the C64 serial IEC bus.
On some of the
line/state transitions the state engine calls some methods in the
virtual drive
emulation to retrieve/deliver data for/from the bus. (Similar methods of
the virtual 
drive emulation are called from the code that handles the C64 kernal
traps, and
maybe even from the serial IEC bus emulation.)


from VICE 1.4 parallel.c:

 * State engine for the parallel bus
 * Names here are as seen from a device, not from the PET
 * Possible States
 *      WaitATN         Wait for ATN, ignore everything else
 *      In1             Wait for DAV low when reading a byte
 *      In2             Wait for DAV high when reading a byte
 *      OldPet          The PET 3032 doesn't set NRFD and NDAC low
 *                      before releasing ATN after a TALK command,
 *                      wait for a NDAC low first!
 *      Out1            Wait for NRFD high when sending a byte
 *      Out1a           Wait for NRFD low when sending a byte
 *                      Trying to save this didn't work
 *      Out2            Wait for NDAC high when sending a byte
 * Each state reacts on the different line transitions.
 *      atnlo, atnhi, ndaclo, ndachi, nrfdlo, nrfdhi, davlo, davhi
Marko Mäkelä wrote:
> How many states does the automaton in VICE have?  Is it also needed for
> the computers and drives equipped with a serial bus?

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.