VOGONS


First post, by dirkmirk

User metadata
Rank Oldbie
Rank
Oldbie

As per title, how would one benefit in having a 387 math coprocessor in a 386DX40?

I've got 64meg of ram on order which hopefully works, would the 387 benefit in windows 3.11 or windows 95 web browsing for instance? I know its going to be painful, ive seen videos on youtube browsing with a 386 and want to see how much quicker a fully specced 386 is.

Apparently no games take advantage of the fpu?

I cant seem to find any list of programmes which use the fpu.

Any advice would be appreciated.

Reply 2 of 14, by elianda

User metadata
Rank l33t
Rank
l33t

Owning a FPU was not common in this days, so applications could not rely on that. Usually apps using a FPU came with a emulation library and thus had two code paths.

What comes to mind is Caddy and FractInt.

Win 3.11, Win95, NT4 and probably not eben Win98 require a FPU.
I am not quite sure if some browser utilizes FPU and runs on a 386. (Opera9?)

If you really have 64 MB running in your 386 system, did you checked if it is covered in the cacheable area?
In my 386X-40 with 32 MB only 16 MB is covered with 64 kB cache.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 3 of 14, by akula65

User metadata
Rank Oldbie
Rank
Oldbie

The thing to understand about the 386 (and earlier) processors is that the processor instruction set only gives you instructions for basic integer arithmetic (add, subtract, multiply, divide) with very limited precision. If you are a programmer, and you want to do ANY real number calculations or any integer calculations with non-trivial precision, you have the following options:

1. Assume a numeric co-processor (internal or external to the CPU) is present, and use the FPU instructions accordingly. This option yields the fastest execution and smallest code size, but back in the day, there were a lot of people who didn't have a FPU or didn't have a clue what a FPU was.
2. Assume there is no FPU and that there is a library of software routines available to provide floating point and high precision integer operations. This option has the advantage of working in any environment, but it is guaranteed to yield the worst possible performance since you never take advantage of the FPU if one is present.
3. Assume that the library of software routines is available, but write the code to make use of the FPU if one is present. Like option 2, this works in any environment, but the code will execute faster on machines with an FPU (which may or may not be advantageous, depending on what you are trying to accomplish). The big disadvantage of this option is that the code size will be larger than the other two options, and we all know how precious every byte was back in those days.

So the answer to your question hinges on two things: (1) how floating-point (or high-precision integer) intensive is the application, and (2) which approach listed above did the software author adopt for that particular application?

For point (1), there were/are applications where virtually all of the processing time is spent on floating point or high precision calculations. One example would be the software used to calculate the position of a satellite above the earth either in real time or in tabular format for some some arbitrary time period. Amateur radio operators use this type of application all the time in order to communicate through non-geostationary satellites or with manned outposts like the International Space Station. Applications which generate maps or map projections are another example of a floating point intensive application. At the other end of the spectrum, you will have programs like word processors that will make minimal use of arithmetic operations as a percentage of total instruction execution.

Games will vary greatly in terms of floating point usage. Real-world simulators like the Falcon 3 combat simulation that leileilol mentioned will require extensive floating point usage for a variety of things like the physics of the vehicles, ballistics calculations for armament, environment rendering, etc. Other games such as text-based dungeon crawls may require few, if any, floating point calculations.

As far as point (2) goes, it isn't always obvious which option the application programmer chose, and the documentation for the application may not explicitly indicate this information (although the answer is obvious if a numeric co-processor is listed as a requirement).

Reply 4 of 14, by elianda

User metadata
Rank l33t
Rank
l33t

Wasn't the usual way to implement this to provide code with FPU instructions and add a emulation library. Now if the CPU encounters a FPU instruction and no FPU was installed an exception occurred. These exception were hooked by the emulation routine. Since emulating the FPU instruction with the CPU did take a lot cycles the overhead due to exception handling was negligible.
The advantage was that the code could be written completely with FPU support and didn't required any FPU checks. Also the emulation library could be updated anytime.

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 5 of 14, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Wasn't the usual way to implement this to provide code with FPU instructions and add a emulation library. Now if the CPU encounters a FPU instruction and no FPU was installed an exception occurred.

I don't know if that was too common. The borland tools worked similar but
used a software interrupt (call to the library hooking) which was replaced by
itself with fpu opcodes if an fpu was installed/the instruction could be performed
on hardware, otherwise the int called the emulation code.

Reply 6 of 14, by akula65

User metadata
Rank Oldbie
Rank
Oldbie

Elianda, when I enumerated option 3, I was just trying to state the assumptions from a global perspective without specifying particular details about implementation (for dirkmirk's sake since I have no idea if has any kind of programming background). I wasn't trying to suggest that the application programmer had to bear the burden of handling the emulation/real FPU issue (although when I reread my post it does sound that way).

Back in the late 80s/early 90s, I was using Microsoft's Macro Assembler and C and Pascal compilers and doing mixed language programming, and I didn't really have to do anything except make the appropriate command line option selections during compilation and assembly in order to use the emulator or force the use of a numeric coprocessor.

Reply 7 of 14, by swaaye

User metadata
Rank l33t++
Rank
l33t++

Falcon 3 only uses a FPU if you choose the most complex flight model. And I've read that apparently people preferred to use the other flight models because the most complex one had some issues.

Star Trek TNG A Final Unity (1995) can use a FPU for the 3D space combat aspect but it's not really required.

Even if you had a FPU available, integer-based math is faster if you can work with it. Cell phones and PDAs have rekindled integer-based games because the CPUs don't have FPUs (or haven't until recently).

Reply 9 of 14, by dirkmirk

User metadata
Rank Oldbie
Rank
Oldbie

I get the impression the 387 wont make the computer any better for what I want to do with it, ie games & a tinker with internet (Win95/3.11).

I'll still bid on one if it comes up cheap but wont be paying $50 for one.

Reply 12 of 14, by leileilol

User metadata
Rank l33t++
Rank
l33t++
dirkmirk wrote:

I get the impression the 387 wont make the computer any better for what I want to do with it, ie games & a tinker with internet (Win95/3.11).

387 is still very low end even for that. You'd have to aim a bit higher for your non-gopher internet ambitions, i.e. 486dx4, and that's not even considering images - a Pentium II is required in that case.

I should mention although Netscape 1.x and Mosiac were perfectly usable on 386s back in the day albeit slow (even with frames, java clocks, cgi counters, animated gifs going and midis blaring out the crescendo! plugin), but today's javascript-obsessed so-called fast internet is not a good idea to take an old computer on.

apsosig.png
long live PCem

Reply 14 of 14, by elianda

User metadata
Rank l33t
Rank
l33t
leileilol wrote:
dirkmirk wrote:

I get the impression the 387 wont make the computer any better for what I want to do with it, ie games & a tinker with internet (Win95/3.11).

387 is still very low end even for that. You'd have to aim a bit higher for your non-gopher internet ambitions, i.e. 486dx4, and that's not even considering images - a Pentium II is required in that case.

I should mention although Netscape 1.x and Mosiac were perfectly usable on 386s back in the day albeit slow (even with frames, java clocks, cgi counters, animated gifs going and midis blaring out the crescendo! plugin), but today's javascript-obsessed so-called fast internet is not a good idea to take an old computer on.

I guess for real use with images and a modern browser you need at least a mid range P1. Below it is more a tech demo.
The first problem is getting a browser running that is half way supporting current html and runs on a 386.
Ofcourse there is Arachne, but if you go f.e. to Windows you will have Win 3.11 or Win95 running. Win98 runs too with tricks, but requires also more memory and memory is usually short on a 386.

Then IE4 is the last IE that runs on a 386, but its far from current.
Firefox wont run (maybe special builds of FF2?, but requires already alot of memory).
Opera will run.
If you want to go for it try to go stepwise upwards. Maybe start with Opera 5.x (last version) and if you have more than 32 MB go for Opera 9 (classic installer).

Things to consider:
The right setup of the browser is crucial (this applies also for a P1 btw).
First set Javascript, Flash, Java and maybe Multimedia to OFF.
Then current browser tend to render already while loading the page which was kind of an innovation at some time. Turn this OFF or set this time delay to very high values. Just imagine on a slow machine if you say it should render the page while loading every 10 econds, but one rendercalculation takes 30 seconds - guess what happens...
For the 386 it is good enough to let the browser render the page once all the data has loaded.
Review all the memory settings, they are usually optimized for system with much more memory available. Turn down the value for memory cache f.e.. It is better to have the browsers code in memory and the cache on disk. Loading data from disk is negligible in comparison for the calculation times for rendering.
For first tries also switch off that it shows images and set homepage to blank.

Now start with some not too complex pages.
What takes time to calculate on a 386 are tables. Don't worry if the browser looks like frozen after loading while rendering. Such a page here f.e. at vogons should take around 2 mins max. if your browser on 386 is right configured.

If this works fine, reenable images...

Take another cup of coffee.