Re: [hatari-devel] floppy issue

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


----- Thomas Huth wrote:
> Am Thu, 13 Feb 2014 11:49:08 -0500
> schrieb "Roger Burrows" <rfburrows@xxxxxxxxx>:
> 
> > A follow-up ...
> > On 12 Feb 2014 at 22:10, Roger Burrows wrote:
> > 
> > > On 11 Feb 2014 at 22:21, Roger Burrows wrote:
> > > > 
> > > > That's all I can do on this until I get my questions above
> > > > answered.
> > > > 
> > > OK, I lied ;-).  I did some more investigation, including a
> > > disassembly of the TOS 3 & TOS 4 ROMs.  I assume TOS 2 is the same
> > > in this area; I used TOS3/TOS4 because I had them handy.
> > > 
> > > I still believe there is a Hatari problem, but it is hidden with
> > > the TOS ROMs because they do not check the DMA status register
> > > after a floppy write. Hatari 
> > > 1.7.x sets the DMA error bit (i.e. sets bit 0 to 0), which EmuTOS
> > > reports as an 
> > > error.  For *writes*, TOS doesn't check this bit, although it does
> > > so for reads.
> > > 
> > Using the current EmuTOS CVS code, this problem does NOT occur with
> > the latest official Hatari release (1.7.0); therefore it's a
> > regression in the current Hatari development code.
> 
> The only related change to the DMA status that I can see is this patch
> here:
> 
>  http://hg.tuxfamily.org/mercurialroot/hatari/hatari/rev/f84eb81fa309
> 
> Nicolas, any ideas what could be wrong here?
> 
>  Thomas

Hi,

Here is a patch that assumes the DMA error is transient.
EmuTOS works with this patch.

Sincerely,
David Savinkoff
--- hatari/src/fdc.c	2013-12-26 11:14:11.000000000 -0800
+++ hatari/src/fdc.c	2014-02-16 18:11:26.000000000 -0800
@@ -2442,6 +2442,7 @@
 		}
 		else							/* Sector transferred, add the CRC */
 		{
+			FDC_SetDMAStatus ( false );			/* No DMA error (bit 0) */
 			FDC.CommandState = FDCEMU_RUN_WRITESECTORS_CRC;
 			FdcCycles = FDC_TransferByte_FdcCycles ( 2 );	/* Write 2 bytes for CRC */
 		}



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