Re: [hatari-devel] Emulation of the TT second MFP |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Emulation of the TT second MFP
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 26 May 2019 19:12:57 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1558890779; bh=9J6/C7woFIAVkfRQ2z+sfHRGqtBmvLrSEYxtdzGeYuY=; h=Date:From:To:Subject:From; b=N4tsqN2tF73ts9uqNUAN+2OEUoV07R/pC3cECHdn44kj1JsGMTN6hSaOIZ1sR0mwF EtJgkurWtPOhg+OQFJL1n5oiRR1mlBm0vQxptr7sJctqMTbaMeuhUmfyPzbu/06Iqg Gkw3tq8FF7kzJmwv8GyT/stgW2VjROI8bRGp4jb3NOKswhA9mlxwUK5Ja8NBMudVO2 TK+rVidEfBp87MO09SaGiDGUHO7h37zP01BOygAhT/gWjRoSel8It/4ExzGoXhO2iN 22ZVavkUhtMdl3MzdZchuXoyiyUeFu94yM1btfOjhH/OFzeXifWdEhQQHivvttySXF pDr07x4TXPkOA==
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