Re: [hatari-devel] Identifying the presence of Hatari

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


On 24 Mar 2018 at 13:12, Eero Tamminen wrote:
> >> On Montag, 19. März 2018 05:27:35 CET Roger Burrows wrote:
> >>> Would it be possible to add something to Hatari to allow EmuTOS to be
> able
> >>> to detect its presence?
> >>
> > Unfortunately the Falcon SCSI implementation does not report errors, but
> does
> > not behave properly either.  This is mostly because the SCSI chip is
> "behind"
> > the ACSI hardware registers.  I have figured out a reasonable workaround,
> but I
> > hate having to do this every time I'm implementing hardware support.  Thus
> the
> > request.
>
> Hatari is supposed to do what "real HW" does in that case.
>
> Is there any real HW that would be a "Falcon", but would/could lack SCSI
> support?
>
Not as far as I know.

> * If yes, does Hatari behavior differ from that?
>
> * If not, is what Hatari currently does reasonable? If not, why?
>
It does not report the SCSI bus status correctly from the SCSI chip.  Of
course, I know that's because the SCSI chip isn't implemented.  But
nevertheless, the status is not reported correctly.  That's why I raised this
issue.

The specific problem is that when EmuTOS is doing arbitration and sets the ARB
bit in one of the SCSI chip registers, the AIP (arbitration in progress) bit
should be set shortly afterwards in a different register (it's a bit more
complex than that, but that will give you the general idea).

You could fix that I guess with some kludges, but:
a) I've already figured out a workaround
b) it's only likely to be relevant for someone writing a Falcon SCSI driver,
which is a very short list
c) there are likely other problems (related to the lack of chip emulation) that
I would have run into afterwards

So it's pointless IMO to fix that problem on its own.  The best option would
have been for Hatari to emulate the SCSI chip.  The next best option would have
been to be able to detect Hatari so that I could avoid trying to detect SCSI
devices.  But the workaround is OK, it just wasted some of my time figuring one
out.

Roger




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