[hatari-devel] Missing DMA sector count register emulation for ACSI transfers?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello,

I'm testing a (fairly exotic) harddisk driver that was bundled with DDD
harddisks:

Harddisktreiber V4.13
  (C) 1991 by K.R.
Digital Data Deicke

(Digital Data Deicke used to be a popular Atari distributor in Germany.)

.... and I found it not to be working on Hatari. First, I thought that it
was perhaps relying on some non-standard behavior/commands of DDD
harddisks. But meanwhile I've come to the conclusion that there is a
detail missing in Hatari's emulation of ACSI disks.

After completion of a command, the driver reads the DMA status register
at address $FF8606. (Not to be confused with the status byte that is
read over the ACSI bus from the actual drive.) It masks the lower three
bits and checks for 1 (= 3'b001). But Hatari always returns a 3 (=
3'b011), here. Bit 0 means "no DMA error", bit 1 means "sector count
register is not zero". The equivalent lines of code are here:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/fdc.c#n4393

However, it seems that the ACSI code in hdc.c never sets the DMA sector
count register to 0, which makes this particular disk driver fail. I've
tested (by means of a quick hack) that zeroing the sector count register
from Acsi_DmaTransfer() makes Hatari return the expected DMA status of
1, and makes the driver work.

Regards
Christian




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/