Page 5 of 5

Re: Coco 2 + Mantra Alice + Dragon 32/64

Posted: Sun Jun 09, 2024 2:25 am
by shodge

CoCo2_20240605

  1. Fixed MiSTer / CoCo2 interface preventing the joysticks ever reaching the
    max value of 63. Specifically '>' was changed to '>=' the DTOA values.
    Additionally, fixed DPAD emulation to reach extremes for all buttoms.
    This is verified in Tandy Diagnostics.

To Do...
1: Get FDC working for dragon
3: Change back to Cycle accurate 09
4: Add Cassette Save
5: Update the Template
6: Add Daily Build Number
7: Create compatible software tested spreadsheet
8: Fix double speed poke in the SAM


Re: Coco 2 + Mantra Alice + Dragon 32/64

Posted: Mon Oct 07, 2024 2:16 pm
by bluearcus

Dragon FDC implementation notes.

The Dragon FDC design differs a bit from the Tandy one. Some of the differences are simple, others are quite fundamental and may mean low level changes to the CoCo design are needed...

The first thing is that the address decoding between the two interfaces is different.

On the Tandy CoCo controllers, an 8 bit latch is used to implement a drive control register at FF40, and the WD floppy controller IC has a base address of FF48. On the Dragon controller, this scheme is reversed, with the floppy controller IC based at FF40 and the latch at FF48.

The latch register bits are also rather different. In particular, note that drive select differs and that side select is internal to the WDC2797, but comes from the latch on the CoCo scheme because the WD1773 doesn't have an ouput pin. The read / write synchronisation / interrupt handling also differ greatly. Both implementations have an interrupt enable bit, but in the CoCo this turns on DRQ based HALT assertion to synchronise sector byte reads and writes. This is auto-disabled by INTRQ, which generates an NMI signal.

On the Dragon, INTRQ is just gated via an enable bit in the latch to NMI, and DRQ is routed directly to the FIRQ/CART line in to the PIA. The sector data read and write loops mask and disable IRQs at source, and mask FIRQ. They can then SYNC on incoming FIRQs to know when to read or write each byte.

This means that the WD2797 implementation must toggle DRQ per byte during sector reads and writes in order to generate the required edge triggers, and it must do this with reasonably realistic timing, because a read of the PIA is needed to reset the FIRQ generation for each byte read. In other words, DRQ must be reset, by reading / writing the data byte and then the PIA FIRQ generation must also be reset by a read before the DRQ triggers again.

Without these DRQ edges being generated with sane timing, there won't be any FIRQs for the Dragon DOS read and write loops to SYNC on, and sector reads/writes will fail. In contrast, a Tandy controller implementation could well ignore DRQ entirely and just let the DOS code spool the entire sector in / out without the HALT mechanism ever being used. I suspect this may be the cause of the problem getting the Dragon controller implementation going.

Hope this helps - it's guesswork of course, but once all the addressing and control bit function changes are done, DRQ behaviour is the likely culprit if things don't start working immediately...

Kind regards,

MikeM