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

Re: New Math Coprocessor - who has a need for it???



In article <1993Jul14.060915.24034@sinkhole.unf.edu> swarde@unf6.cis.unf.edu (Rico) writes:
> 
> Does the GS automatically invoke the Math Coprocessor when processing
> math functions?

No.  The Coprocessor card acts as a peripheral device, not a
coprocessor.  The 65816 program sends maths commands to be processed by
the 68882, by writing them out to I/O addresses (I don't know the
exact details here).  I assume it then waits for a "finished"
indication from the card, and reads the results back.

There are two ways in which the card can be used:

1. The program specifically looks for the card and communicates
directly with it.  This is supported by ORCA/C and ORCA/Pascal
programs - you can use some compiler directives and a different version
of the library to make direct calls to the FPE card (or compatible).
I think that this requires the card to be present.

2. The FPE card was originally supplied with a program which patched
the SANE toolset so that calls to SANE were re-routed to the floating
point coprocessor (some glue code copied the arguments into the
coprocessor, invoked the appropriate command, and copied the results
back).

The latter method is entirely transparent to existing software -
applications call SANE, as normal, to do their floating point
calculations, and the call gets handled by the coprocessor.

The disadvantage of this method is that it is slower than direct access
to the card (you have the overhead of a toolbox call, plus the glue
code copying the parameters around the place).  It is still very much
faster than the original SANE routines, though.

Another minor problem: you don't get exactly the same answers from a
maths coprocessor as you would have got from the SANE code.


I've never seen one of these cards in operation, so I can't give
benchmarks, but there must have been some kind of review in one of the
magazines a few years ago.
-- 
David Empson                                                               
dempson@swell.actrix.gen.nz                                                
Snail mail: P.O. Box 27-103, Wellington, New Zealand