Q87 - FPU Software Emulator For AO486

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Hello,

Starting from a Discord discussion about FX Fighter (https://discord.com/channels/6479093974 ... 9090175057), after several tests I succeeded to run it with the use of and FPU (math coprocessor) software emulator called QuickWare Q87. That was the beginning of a nice journey of discoveries which I like to share it with you as well.

We all know ao486 lacks FPU and that prevents some game or apps to run. And this post is not about that, but an useful workaround for those who want to play with this.
I started with these links which put me on the right direction: https://www.vogons.org/viewtopic.php?f=46&t=69324 - one of inspirations for Quake and Q87 and viewtopic.php?p=8631#p8631 - another useful convo, "crumbs" for patching Q87

In a nutshell, QuickWare Q87 seems to be the best DOS FPU emulator and it will need EMM386 or QEMM memory managers in order to work (it will not use conventional memory).
So best bet if you don't have your own DOS 7.1 VHD ready, you can use @flynnsbit's Top 300 one, I used it as my inspiration for my own VHDs.

PROs: From all the FPU emulators I tried, this works quite well as you will se below. Also the fact that it doesn't use conventional mem is big plus.

CONs:
Sadly, the solution cannot (to the extent of my google-ing stuff or even BBSing for stuff) be applied fully for all as this software is not free. I did a lot of research on this Q87 (as well as on Terminate - probably the best ANSI terminal, but that is a story for another day) and couldn't find a mean of contacting the authors (all modern references you might find about QuickWare that made this lead to dead-ends)
Also, it is not an universal solution, some games/apps would not run even with this emulator, or would just crawl.

You can :
a) use the 20 mins limited QuickWare Q87 4.13 (shareware version) - https://www.sac.sk/download/utilmisc/q87_413.zip - link is safe, is Slovak Antivirus Center
b) get it/patch it yourselves (3-4 mins of work, involves unpacking/hex modifying certain locations/pack it back, for obvious reasons I will not detail this).

So yeah, "the crumbs" are mentioned in the forum post that I linked, rest is up to each one's behavior.
I do not encourage it and really wish someone (maybe could be possible as MiSTer gets a lot of traction in all retro communities) could reach out and find a better solution (I would pay gladly a sum for this gem if could be made possible again, or declare it abandonware/opensource etc)

Ok, now to the fun part: What works, how good and stuff like that. So far only one game that is really running fine, the aforementioned FX Fighter (https://discord.com/channels/6479093974 ... 1597503488)
The others... not so much. On the applications side, things are better (except ofc mp3 players and some emulators which we don't need anyway as we have those cores :D)

Games:
---FX Fighter - check above Discord findings, suffice to say game runs very well with Q87
---Star Trek - A Final Unity - you would need also to patch the "sttng.ovl" with dos32a ("sb -r sttng.ovl" then rename the executable to .ovl and replace the original). Works fine as far as I can tell.
---Privateer 2 - replace dos4gw with dos32a first. Well, FMVs are running, I could buy a ship and fly out in space. I have never played this, I would guesstimate not quite very playable maybe ? Feel free to try it and comment below
---Humpty's Scramble - works with Q87 on both EMM386 and QEMM. Replacing dos4gw with dos32a seems to have marginal effect on speed
---Battle Arena Toshinden - works with Q87 (on both EMM386 and QEMM setups), but the performance is way suboptimal to play it
---Quake (just for the giggles :D) - not playable but the fact that runs is a feat itself for this core
---Tomb Raider - also for the giggles, it is too slow to be playable on this core even with emulated FPU, same as Quake
---WipeOut - same as Quake and Tomb Raider
---Lands of Lore - Guardians of Destiny (LLGD) - also "works" with Q87 but only with EMM386 (not with QEMM).
At high resolution it crawls, at low res is playable I'd say, but sadly it would also artifact A LOT of the images, so again not much of a solution
---Abe's Oddworld. Apparently also needs FPU but it would be unplayable (1-2 frames) with the use of Q87

Apps:
---XTC-Play version 0.97c - MOD/S3M/IT/669/WAV/MP3 player. Couldn't make it to load mp3s, but wav and a lot types of MODs works flawless (https://modland.com/pub/software/players/DOS/XTC-Play/)
---Autodesk AutoCAD r12 - works fine, renders ok... I am not too familiar with CAD products, but imho this one is a winner for Q87
---Arachne MS-DOS web browser - works also without FPU, but way much slower >>> operating speed gain observed when using Q87
See viewtopic.php?p=72937#p72937 - post about Arachne and links
---Fractint (https://www.fractint.org/) -this works also without FPU, but rendering times for higher res would be atrocious, didn't dare to go over 320x200 without FPU). L.E. Adding here the results of default batch file, 1024x768 version. At some point I will have at higher res rendered

1024x768.zip
(7.7 MiB) Downloaded 248 times

---Imagine 4.0 for DOS (https://winworldpc.com/product/imagine/40) - so far tested OK with EMM386, run executable with "/NOXMS", still under test as I lack much knowledge about this
---FontEdit (https://www.phatcode.net/downloads.php?id=457) - For some reasons this requires FPU. Works fine as far as i can tell
---Lotus Freelance Graphics - Works fine with Q87, I never used this ever before
---FLAC decoding (https://hydrogenaud.io/index.php/topic,123374.0.html) - more of a novelty, but I decoded FLAC files into WAV without issues

Adding to the list (more of a novelty than real use, but still)
+++ Jukemp3 works with EMM386 (needs also a lot of conventional RAM) - mod/s3m/xm play ok, mp3... neah, same as below Aegismp3.
+++ Aegismp3 (this one works only with QEMM, not EMM386 ) - just that it runs, no real use as mp3 decoding is too slow on what i had at hand in terms of mp3s
+++ VICE - DOS version of C64 emulator - runs with QEMM and Q87 FPU emulator. Well... crawls would be more accurate term, but it works :D
+++ M.E.S.S. - Multi-Emulator Super System - seems to work, or crawl as well
+++ PCAE - PC Atari 2600 emulator - seems to work, crawls as well ofc

And some pics (a lot more in those Discord convos) :)

20230505_210214-screen.png
20230505_210214-screen.png (526.07 KiB) Viewed 10169 times
20230505_210240-screen.png
20230505_210240-screen.png (108.05 KiB) Viewed 10169 times
20230505_210403-screen.png
20230505_210403-screen.png (143.32 KiB) Viewed 10169 times
20230506_031819-screen.png
20230506_031819-screen.png (64.65 KiB) Viewed 10169 times

AutoCAD:

My Great Game - My Great Capture_2023-05-05_23-26-25.png
My Great Game - My Great Capture_2023-05-05_23-26-25.png (129.33 KiB) Viewed 10169 times
My Great Game - My Great Capture_2023-05-05_23-32-30.png
My Great Game - My Great Capture_2023-05-05_23-32-30.png (56.75 KiB) Viewed 10169 times

Arachne:

My Great Game - My Great Capture_2023-05-31_17-34-19.png
My Great Game - My Great Capture_2023-05-31_17-34-19.png (39.71 KiB) Viewed 10169 times
My Great Game - My Great Capture_2023-05-31_18-08-29.png
My Great Game - My Great Capture_2023-05-31_18-08-29.png (117.71 KiB) Viewed 10169 times

Fractint results:

JDSG410.GIF
JDSG410.GIF (822.53 KiB) Viewed 10169 times
EJ_01.GIF
EJ_01.GIF (211.15 KiB) Viewed 10169 times
SG82112.GIF
SG82112.GIF (725.48 KiB) Viewed 10169 times
User avatar
bazza_12
Top Contributor
Posts: 443
Joined: Sun May 24, 2020 7:49 pm
Location: Yorkshire, UK
Has thanked: 263 times
Been thanked: 121 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by bazza_12 »

woah, worth checking out just for Autocad 12, I remember using Autocad 13 at uni in the mid 90s.. It's pretty dated now, but at the time was cutting edge stuff.. I remember it took hours to render an image.. nice bit of nostalgia seeing it again :)

The music is reversible but time is not. Turn back. Turn back
Neocaron
Top Contributor
Posts: 375
Joined: Sun Sep 27, 2020 10:16 am
Has thanked: 209 times
Been thanked: 87 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by Neocaron »

thera34 wrote: Thu Jun 15, 2023 9:57 am

Hello,

Have you tested with arm oc and memory oc to see if you get a performance boost? (My guess is that you would) I usually run my Ao486 at 100mhz on my Mister because it's has been stable for well years at this point. Curious if you could test all of these OCs combine to see how much of a performance bump you could get. I know that Dosbox was getting close to double performance with the max OC on the arm CPU (not including memory OC) so this emulator should definitely see quite an improvement with these. Pretty awesome to see the ao486 getting some love in any shape or form!
I wonder ïf Versailles and all these "3d" Sierra point and click aventure games would see a massive boost in performance as well.
SO MANY testing I want to do, but I don't have the time for :cry:

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Neocaron wrote: Thu Jun 15, 2023 12:59 pm
thera34 wrote: Thu Jun 15, 2023 9:57 am

Hello,

Have you tested with arm oc and memory oc to see if you get a performance boost? (My guess is that you would) I usually run my Ao486 at 100mhz on my Mister because it's has been stable for well years at this point. Curious if you could test all of these OCs combine to see how much of a performance bump you could get. I know that Dosbox was getting close to double performance with the max OC on the arm CPU (not including memory OC) so this emulator should definitely see quite an improvement with these. Pretty awesome to see the ao486 getting some love in any shape or form!
I wonder ïf Versailles and all these "3d" Sierra point and click aventure games would see a massive boost in performance as well.
SO MANY testing I want to do, but I don't have the time for :cry:

No, I never tried OC (I know about it, I read on you findings, but didn't went with it yet). Still on my (very-long now) TO DO/CHECK list :D
I dunno about Versailles game and if it really needs FPU at all, worth to check it out, thanks ;)

bazza_12 wrote: Thu Jun 15, 2023 12:17 pm

woah, worth checking out just for Autocad 12, I remember using Autocad 13 at uni in the mid 90s.. It's pretty dated now, but at the time was cutting edge stuff.. I remember it took hours to render an image.. nice bit of nostalgia seeing it again :)

Was a bit of nostalgia for me too, my mom used it in those years (architecture). Rendering was pretty fast on ao486 actually, well, at least for what default samples came with.
For Fractint, oh well, rendering took even 21hrs at 1024x768 with Q87:

Capture.PNG
Capture.PNG (96.55 KiB) Viewed 10068 times
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Neocaron wrote: Thu Jun 15, 2023 12:59 pm
thera34 wrote: Thu Jun 15, 2023 9:57 am

Hello,

I wonder ïf Versailles and all these "3d" Sierra point and click aventure games would see a massive boost in performance as well.

It has some minimal to medium boost, not too much though, but yeah, think it does work a bit of miracle. Note that this is just a very raw direct approximation for just a handful of minutes of testing.
Just tested in DOS 7.1 with QEMM, Q87 and default dos4gw it comes with for 20 or so mins. Seems to be let's say medium playability (all defaults btw)

L.E. Seems a bit more better on Omni3D set to fast/very fast (lower details i guess). Not familiar with it, maybe you have even better results on your OCed setup :)

breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by breiztiger »

hi

how can i test your bench from fractint ? do you have a batch file ?

thanks in advance

CPC-Power Staff
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

breiztiger wrote: Thu Jun 15, 2023 3:23 pm

hi

how can i test your bench from fractint ? do you have a batch file ?

thanks in advance

Hi,

In that package, there is a FRACT19. bat file. The first thing is to specify a "gifdir" (4th line ) to suite your install folder/needs
For example, I have Fractint in C:\Apps, so my it looks like this "set gifdir=c:\apps\fractint
By default, that bat file will allow you to batch render at desired res 7 packs of images (not the full library)
Now, for my very quick and dirty test, I added "echo.|time > name1.txt" and "echo.|time > name2.txt" before and after the execution of each Fractint image from those packs. After that, just time2-time1 gave me the time elapsed (easy check with https://www.calculator.net/time-duratio ... lator.html).
I'm sure it can be a better way to automate it. Also for individual images, at the end of the rendering, Fractint will also show you the elapsed time.
I will add the modified bat, just remember to modify the gifdir to your install :)
L.E. Also added 1024x768 result images from that batch in the original post.

FRACT19.BAT
(12.53 KiB) Downloaded 227 times
20230615_183127-screen.png
20230615_183127-screen.png (76.93 KiB) Viewed 9978 times
Neocaron
Top Contributor
Posts: 375
Joined: Sun Sep 27, 2020 10:16 am
Has thanked: 209 times
Been thanked: 87 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by Neocaron »

thera34 wrote: Thu Jun 15, 2023 2:15 pm
Neocaron wrote: Thu Jun 15, 2023 12:59 pm
thera34 wrote: Thu Jun 15, 2023 9:57 am

Hello,

I wonder ïf Versailles and all these "3d" Sierra point and click aventure games would see a massive boost in performance as well.

It has some minimal to medium boost, not too much though, but yeah, think it does work a bit of miracle. Note that this is just a very raw direct approximation for just a handful of minutes of testing.
Just tested in DOS 7.1 with QEMM, Q87 and default dos4gw it comes with for 20 or so mins. Seems to be let's say medium playability (all defaults btw)

L.E. Seems a bit more better on Omni3D set to fast/very fast (lower details i guess). Not familiar with it, maybe you have even better results on your OCed setup :)

Omni3D was running at 1fps without FPU and the fastest preset in Ao486 so if it's remotely playable it would be a massive boost. And this is all without OC of any kind? :shock:

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Neocaron wrote: Thu Jun 15, 2023 12:59 pm

Omni3D was running at 1fps without FPU and the fastest preset in Ao486 so if it's remotely playable it would be a massive boost. And this is all without OC of any kind? :shock:

As I said, my experience with this game is very limited and very subjective after only 20 mins :) All my tests are done on non OC, very standard core and max settings for what it is. Besides that, my main test environment is so far limited to DOS 7.1, with EMM386/QEMM (again Top 300/Shareware and some other Flynnsbit's work as inspiration for setup) :)

I don't suppose it is a way to easily measure the FPS on this game ? Give it a spin, let me know how your experience is, especially on OCed setup :)

Neocaron
Top Contributor
Posts: 375
Joined: Sun Sep 27, 2020 10:16 am
Has thanked: 209 times
Been thanked: 87 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by Neocaron »

I'll try this weekend and let you know!

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

Neocaron
Top Contributor
Posts: 375
Joined: Sun Sep 27, 2020 10:16 am
Has thanked: 209 times
Been thanked: 87 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by Neocaron »

Looking up in detail QuickWare/Q87, it appears the person behind the project has stopped providing updates, keys, or any information for 20 years and maybe more. Despite numerous attempts to reach out, no one has been able to establish contact with him. So it's probably safe to say and consider that QuickWare/Q87 is more abandonware-friendly than most of the content found on the Misterfpga website. XD

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by breiztiger »

thanks you

i'll try asap

CPC-Power Staff
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Added Star Trek - A Final Unity to the main list in first post.
This game from Spectrum Holobyte requires FPU, will play just nice with Q87 FPU emulator
However, you still need to patch the main executable "STTNG.OVL" (STTNG.EXE is just a wrapper) with DOS32A:

Code: Select all

sb -r sttng.ovl

then rename the resulted EXE back to OVL and replace the original file
Tested with EMM386 and QEMM.

lifewithmatthew
Posts: 13
Joined: Thu Apr 28, 2022 8:55 pm
Been thanked: 2 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by lifewithmatthew »

thera34 wrote: Sun Sep 03, 2023 7:16 am

Added Star Trek - A Final Unity to the main list in first post.
This game from Spectrum Holobyte requires FPU, will play just nice with Q87 FPU emulator
However, you still need to patch the main executable "STTNG.OVL" (STTNG.EXE is just a wrapper) with DOS32A:

Code: Select all

sb -r sttng.ovl

then rename the resulted EXE back to OVL and replace the original file
Tested with EMM386 and QEMM.

When I run that sb command it works right up until it creates the new sttng.exe file from the sttng.le file. At that point it creates a zero byte file and fails. Any idea what could be causing it to fail at that point?

Also are the cut scene all rainbow for you? The normal game play is fine, but the intro cutscene looks like an oil slick :lol:

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

lifewithmatthew wrote: Tue Sep 05, 2023 2:36 pm

When I run that sb command it works right up until it creates the new sttng.exe file from the sttng.le file. At that point it creates a zero byte file and fails. Any idea what could be causing it to fail at that point?

Also are the cut scene all rainbow for you? The normal game play is fine, but the intro cutscene looks like an oil slick :lol:

Do the "sb -r" in another folder. After that, rename the resulted exe file to OVL and move it/overwrite the original sttng.ovl.

Cutscenes looks ok, but I never played this game before..

lifewithmatthew
Posts: 13
Joined: Thu Apr 28, 2022 8:55 pm
Been thanked: 2 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by lifewithmatthew »

thera34 wrote: Tue Sep 05, 2023 4:19 pm

Do the "sb -r" in another folder. After that, rename the resulted exe file to OVL and move it/overwrite the original sttng.ovl.

Cutscenes looks ok, but I never played this game before..

Ah doing a different folder did the trick, I was out of space on the drive I had installed A Final Unity to. Once I copied it to a different drive with sufficient space it worked just fine.

I'm still getting the oil slick look on the intros. I'm booting off the flyn 0-0 DOS98 boot vhd that comes with the top 300 games pack, and I've seen other people have issues with colors at times, but I'm not sure what the solution is quite yet :?

lifewithmatthew
Posts: 13
Joined: Thu Apr 28, 2022 8:55 pm
Been thanked: 2 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by lifewithmatthew »

I think I got the oil slick worked out for the time being. When I did an auto detection for the video card during installation it had selected 65K colors, but when I ran it again from the game directory it only detected 256 colors. I suspect it was trying to interpret all the additional colors and failing. Once I brought it back into its capability range it looks like its working correctly.

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Added Battle Arena Toshinden to main list, unfortunately the performance is not great at all to play this game
Tested as usual under DOS 7.1, EMM386/QEMM setups. Also used DOS32A instead of DOS4GW.

Attachments
My Great Game - My Great Capture_2023-12-16_13-23-35.png
My Great Game - My Great Capture_2023-12-16_13-23-35.png (183.74 KiB) Viewed 5210 times
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Added Humpty's Scramble to the list, it seems to work fine on both EMM386/QEMM setups. As mentioned, DOS32A gives a marginal effect on game speed. Only tested the 2D levels, didn't reach yet to 3D ones, will see how it goes.

Attachments
20231227_091149-screen.png
20231227_091149-screen.png (543.39 KiB) Viewed 5091 times
20231227_080912-screen.png
20231227_080912-screen.png (146.31 KiB) Viewed 5091 times
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Q87 - FPU Software Emulator For AO486

Unread post by thera34 »

Added Imagine 4.0 for DOS, still testing it, but seems to work ok with EMM386 (under QEMM throws some DPMI error) and with "/NOXMS" flag

WIN_20241101_19_09_24_Pro.jpg
WIN_20241101_19_09_24_Pro.jpg (93.5 KiB) Viewed 457 times
WIN_20241101_18_55_29_Pro.jpg
WIN_20241101_18_55_29_Pro.jpg (301.23 KiB) Viewed 457 times
Post Reply