[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] FPU question

On Fri, 5 Feb 1999 17:24:52 +0100 (EET), Konrad Kokoszkiewicz wrote:

> I know all that. I also know, how to detect a memory mapped FPU. My
> question was a bit another: should a memory mapped FPU be considered by
> MiNT as a 'true' FPU? See below.


> > I'm no expert in this area (either), but it appears that the FPU is handled
> > by reading/writing to a set of memory-mapped FPU-registers and waiting for
> > the result using busy-waiting.
> Yes, but SOMETHING has to read/write these registers, no? :) If FPU is in

Atleast the standard PureC floating-point library does this directly. The
same goes for the HiSoft-libs (HiSoft basic, Lattice C) I've seen.

> work just as an extension to the CPU instruction set. In memory mapped
> mode these registers should be read/written "manually" by Line-F exception
> handler.

I don't think this is the case, since no TOS-version AFAIK contains such
a handler. The normal way to access a memory-mapped FPU is to access it's
registers directly from the user application.

> I know this can be confusing: why the hell an FPU chip might be not
> considered a 'true' FPU? Well, because, as I am seeing this, a memory
> mapped FPU chip is handled by Line-F exception handler code, so from
> MiNT's point of view, it does not differ from a software emulation. So
> what happens, if the task switching code tries to save FPU state using

IIRC "Line F"-FPUs are software-only, I don't think memory-mapped FPUs are
handled by an exception-handler. I could be wrong, but since I've actually
owned a FPU-equipped MSTe once and never encountered any FPU-drivers for
it I believe I'm right.

It might be possible to emulate a real co-processor even on 68000 by hooking
into exception vector 4 (illegal instruction), but again, I don't think
something like this exists.

> Anyways, I will know that without getting all of you deeper in these
> details, once someone will tell me, how does the damn _FPU cookie looks
> like on a 68000 MSTe machine equipped with a coprocessor...

I sold a MSTe with FPU last year, if you're getting really desperate I could
give the new owner a call and ask him to check.

** Jo Even Skarstein    http://www.stud.ntnu.no/~josk/
**    beer - maria mckee - atari falcon - babylon 5