Re: [hatari-devel] Emulation of the TT second MFP

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


Am Sun, 26 May 2019 12:46:34 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:

> Le 19/05/2019 à 10:50, Thomas Huth a écrit :
> > Am Sun, 19 May 2019 10:37:40 +0200
> > schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> >   
> >> Le 19/05/2019 à 10:25, Thomas Huth a écrit :
> >>  
> >>> I've checked it now with the SCSI HD images that I have here, and
> >>> it seems to work fine so far. Thanks for implementing this!  
> >>
> >> Do you have some kind of dummy scsi hd image that I could use to
> >> test this myself ? (unless it requires some specific / non free
> >> drivers ?)  
> > 
> > For a quick test, you can use the latest version of EmuTOS with any
> > HD image - since EmuTOS contains a built-in SCSI driver, you don't
> > need a HD image with a dedicated SCSI driver here.  
> 
> Thanks for the hint, I was able to check scsi still works after doing
> some changes.
> 
> BTW, looking at the code in ncr5380.c, I see this in dma_check() :
> 
> 	if (Config_IsMachineFalcon())
> 	{
> 		FDC_SetDMAStatus(ScsiBus.bDmaError);	/* Mark
> DMA error */ FDC_SetIRQ(FDC_IRQ_SOURCE_HDC);
> 	}
> 	else
> 	{
> 		ncr->irq = true;
> 	}
> 
> But unless I missed sthg this means that in the case of the Falcon 
> 'ncr->irq' is not set to true, only MFP bit is changed which could
> lead to some bugs later ?

Yes, maybe ... the interrupt logic there was mostly guesswork.

> Also with the changes I just made in ncr5380_set_irq to use 
> MFP_GPIP_Set_Line_Input() the TT part is not good anymore here
> because MFP_GPIP_Set_Line_Input() should be called too now.
> 
> What do you think of changing the above code to :
> 
> 	if (Config_IsMachineFalcon())
> 	{
> 		FDC_SetDMAStatus(ScsiBus.bDmaError);	/* Mark
> DMA error */ }
> 	ncr5380_set_irq ( ncr );
> 
> ie sets DMA status only in falcon mode and then call
> ncr5380_set_irq() to do the common job ?

Yes, that sounds reasonable.

 Thomas



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