[Coco] Vcc and real floppy disks

Darren A mechacoco at gmail.com
Sat Sep 27 00:23:45 EDT 2008


I was referring to the FDC command code bits; not the bits for the
Drive / Side select latch.  In the source code I have for rb1773, it
appears that command $80 is always issued for a Read Sector and $A0
for a Write Sector. Ideally, when working with a true double-sided
disk, the FDC commands used would be:

$82 for a Read Sector on Side 0
$86 for a Read Sector on Side 1
$A2 for a Write Sector on Side 0
$A6 for a Write Sector on Side 1

By using $80 and $A0, the driver is telling the WD17x3 that it doesn't
care about the SIDE number in the sector's ID field and that it should
search using only the TRACK and SECTOR numbers.  Unfortunately, on the
PC (or at least with FdRawcmd.sys) the SIDE number is always required
to identify the targeted sector. The VCC emulator needs to know what
to supply for the SIDE number. If it uses bit 6 of $FF40 for this
purpose then it won't be able to access a single-sided format on the
back side of the disk. If the driver used the commands for
side-specific access, then bit 6 of $FF40 can be used solely to
indicate the physical head, and the bits in the command code can be
used to determine the SIDE number for the sector ID field.

Darren

----------
On 9/26/08, Robert Gault wrote:
> Darren A wrote:
>> On 9/26/08, Robert Gault  wrote:
>>>  < snip >
>>>
>>> I should also point out that one can (and I have) expand the OS-9 drive
>>> tables in the same manner so that both true double sided disks and dual
>>> singles can be used at the same time.
>>>
>>
>> ---
>>
>> Looking at the source code for the WD1773 driver in Nitros-9 reveals
>> that the "Side Compare" bits are not being used when commands are
>> issued to the FDC. I imagine the same is probably true for OS-9
>> drivers. If those drivers had been implemented 'properly', VCC could
>> simply use the command bits to determine how to specify the target
>> sector.
>>
>> Since this isn't the case, it looks as though some kind of
>> configuration setting would have to be in place to tell VCC whether a
>> disk is true double-sided or has single-sided formats on each side.
>> VCC could perform the configuration automatically by issuing an
>> IOCTL_FDCMD_READ_ID to fdrawcmd.sys and examine the contents of the ID
>> field returned.
>>
>> Darren
>>
>
> If you look at the latest code for rb1773 you will find
>
> * Drive control register bit mask table
> * May want an option here for double sided SDDD disks ex. RG
> *        fcb   $1      drive0
> *        fcb   $2      drive1
> *        fcb   $41     drive2
> *        fcb   $42     drive3
> *        fcb   $4      drive4
> *        fcb   $44     drive5
>
> L0372    fcb   $01            Drive 0
>           fcb   $02            Drive 1
>           fcb   $04            Drive 2
>           fcb   $40            Drive 3 / Side select
>
> The side select is being used correctly in the current code but Boisy
> has not bought into the need for treating the back side of disks as
> separate singles. Nevertheless, anyone with the source could create a
> custom floppy driver.
> It is even easier to make the change in DOS under Basic. All you need is
> to change the drive table without checking the rest of the code to see
> if it will work.



More information about the Coco mailing list