4 ms·
I was actually hoping that by the end of the blog post, the mystery of why the game didn't run would be cleared up, but sadly it wasn't. Looks like it had troub
by rob74 3y ago
I was actually hoping that by the end of the blog post, the mystery of why the game didn't run would be cleared up, but sadly it wasn't. Looks like it had trouble accessing the HDD - but why should HDD access for a DOS game running under OS/2 require a math coprocessor?!
I have my own story of living happily without a math coprocessor for quite some time: from 1992 to 1997, I had an IBM PS/1000 with a "Blue Lightning" CPU which can be best described as a "486SX3" (25 MHz bus clock, 75MHz internal). Then I tried to run the Quake demo and found out that "real" 3D games need an FPU :(
- mobilio 3y agoI have similar experience DX4 overclocked to 120 MHz vs. Pentium running on 75 MHz Hint: Pentium FPU was faster
- consp 3y agoMy Retro-socket3-toy-unit with a P83@100 MHz is fast (40MHz bus), but the DX5x86@150mhz (50MHz bus) beats everything except in quake. Timings aren't that great for the memory but the synchronous PCI bus (and working PCI VGA card at that speed) beats everything you throw at it.
- mobilio 3y agoSame here - all DOS games was faster on DX4, but Pentium was so smooth on Quake.
- TerrifiedMouse 3y agoCarmack and Abrash optimized the heck out of Quake making use of a “quirk” in the Pentium where you can overlap integer operations and floating point DIV to eke out every last drop of performance. Unfortunately the trick doesn’t work on early AMD K5/6 nor Cyrix CPUs - although Cyrix CPUs probably had other more serious problems. https://youtu.be/DWVhIvZlytc?si=DBE9zpTLj_16-GAt https://youtu.be/DWVhIvZlytc?si=DBE9zpTLj_16-GAt
- Sharlin 3y agoYeah. Their perspective correct texture mapping did a perspective div only every 16 pixels drawn – in itself a considerable optimization with almost imperceptible loss in quality – but the big deal was that on the Pentium specifically, the integer pipeline could be almost perfectly cycle-optimized to process sixteen pixels in the time the FPU executed the next perspective division in parallel so the result was ready just as it was needed!
- touisteur 3y agoMore on this in the Black Book graphic shttps://news.ycombinator.com/item?id=35738709 https://news.ycombinator.com/item?id=35738709 . Programming on Pentium is towards the end.
- rasz 3y agoK5/Cyrix could overlap Integer and FPU operations, what they couldnt do was interleave (pipeline) FPU operations so that multiple floating point instructions ran in parallel. https://www.phatcode.net/res/224/files/html/ch63/63-02.html https://www.phatcode.net/res/224/files/html/ch63/63-02.html Here a non perspective correction related Quake FPU code example https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/QW/client/r_drawa.asm#L259 https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac... Lcliploop: fld ds:dword ptr[0+0+esi] fmul ds:dword ptr[0+0+ebx] fld ds:dword ptr[0+4+esi] fmul ds:dword ptr[0+4+ebx] fld ds:dword ptr[0+8+esi] fmul ds:dword ptr[0+8+ebx] fxch st(1) faddp st(2),st(0) fld ds:dword ptr[0+0+edx] fmul ds:dword ptr[0+0+ebx] fld ds:dword ptr[0+4+edx] fmul ds:dword ptr[0+4+ebx] fld ds:dword ptr[0+8+edx] fmul ds:dword ptr[0+8+ebx] fxch st(1) faddp st(2),st(0) fxch st(3) faddp st(2),st(0) faddp st(2),st(0) fsub ds:dword ptr[12+ebx] fxch st(1) fsub ds:dword ptr[12+ebx] fxch st(1) fstp ds:dword ptr[Ld0] fstp ds:dword ptr[Ld1] FXCH instruction is free (zero cycles) on Pentium for most instruction combinations, AMD caught up in late 1998 with CXT revision K6-2. http://www.azillionmonkeys.com/qed/cpuwar.html http://www.azillionmonkeys.com/qed/cpuwar.html
- _the_inflator 3y agoPentium was very significant in comparison to predecessors. In the beginning Intel shipped a Pentium 66 and it smoked the 486 DX 100 easily. We kind of marveled back then because MHz meant speed.
- vikingerik 3y agoPart of that was the bus and memory speed as well. The 486 bus ran at 33 MHz (the "DX4" is actually only clock-tripled to 100), while the Pentium bus and memory ran at 66.
- _the_inflator 3y agoYes, I know. Setting the jumpers for the right bus speed for the multiplication was key. This was the time of the fine tuning and over clocking. Asus boards were the best for this job back then. Some Pentium ran at 60, not 66.
- hurryer 3y agoPentium was the first CPU which could run two integer operations per cycle.
- pak9rabid 3y agoYep. The P5 arch (original Pentium) superscalar design, combined with its much faster FPU and separation of data and code caches meant it could run circles around a 486-based CPU, even if it was running up to twice the speed of a 486 contender.
- mrlonglong 3y agoI had a dual Pentium Pro 166Mhz w/512kb caches running on a Tyan mobo. That thing was fast under Linux. EDIT: Present day, rocking a thread ripper with 48 logical cores. Still running Linux.
- glimshe 3y agoI got a math coprocessor relatively early for my 386SX20 - I wanted to use 3D Studio, the killer app for math processors back in the day! The vast majority of games simply used integer math and didn't require, or could take an advantage from a coprocessor, but I have no idea what was going on in the article. In the early 90s, the only games I can remember that could optionally leverage a coprocessor were the Falcon 3.0 family of simulators.
- Loic 3y ago20+ floppy disks to get 3D Studio and of course you always had a bad one and not the first.
- tecleandor 3y agoAh, I also had a 386SX, and some games (not a lot, maybe three or four) never run properly on my machine. :( Edit: I just remembered one of them was "Eye of the Beholder III"
- danparsonson 3y ago> Edit: I just remembered one of them was "Eye of the Beholder III" If it's any consolation, you didn't miss much - III was a wet rag compared to the majesty of the first two games!
- marhee 3y agoI remember "Dune 2" (1992) could use a co-processor? Not sure, we never had a machine with a co-processor but a friend had and he said that at start-up the game said something like "Co-processor found - let's use it!" and then game could run faster I believe (not sure). Edit- Dune 2, not Dune 2000
- ggambetta 3y agoMy parents were architects and they used AutoCAD. A very early version, maybe 3? So our PC had a math coprocessor... on a 286!!! Yes, the 80287 was a thing.
- NikkiA 3y agoIn the 286 era there were even different types of co-processor, the Weitek implementation (2167) absolutely trounced the official 80287 (and it's second source versions) at CAD, that's most likely what your parents had.
- saltcured 3y agoI searched the comments page to find you were the only one who mentioned them. I think we had a 20 MHz 286 with a Weitek coprocessor when I was a kid. It seems Weitek also had a coprocessor to go with 386.
- NikkiA 3y agoThey had one (4167) for the 486 too, I have no idea if it only worked with 486SX systems, or if it could work alongside a DX (but then who'd have a co-processor socket on a DX board anyway, co-processor sockets had already become scarce in the 386 period). By that era they appear to have mostly pivotted to their own 486 clones and VGA chipsets though. edit: I just realised, it could have been like the Cyrix 487S which installed as a PCB carrier that plugged into the 486DX socket, and then had a socket on the carrier for the CPU itself, alongside the 487S chip.
- lproven 3y agoYep. http://www.weitek.com/textual/products/wtl3167.html http://www.weitek.com/textual/products/wtl3167.html
- selcuka 3y agoI had an 8086 PS/2 clone (Multitech, then rebranded themselves as Acer) with a coprocessor, so yeah, even 8087 was a thing.
- benj111 3y agoI wondered if it was a hardware fault, and the fpu is allowing enough electrons to flow where they need to be. Although the infocom 'boot' step suggests a race condition somewhere? Or some register not being properly set by the os.
- wzdd 3y agoOr installing the coprocessor reseated a slightly-loose cable or created a better connection on a broken trace. The "boot step" could simply result in the system being warmer, which would make marginal connections like this behave differently. To be sure, the author should remove and reinstall the coprocessor 10 times, testing after each. :)
- scruffyherder 3y agoI replaced the 386 today with one from 1990. I was able to boot a disk I keep around that has MS-DOS 3.30a and Windows/386 2.11 on it. I also have Battletech on there and yes it ran with no issues! It didn’t work at all on the older processor. When I pushed it into the socket it made such a loud “ker chunk” noise that I wouldn’t want to constantly pull out and reseat these chips. Especially since I don’t have the Intel “rake” like puller I had to use a pair of card edge blanks to gently rock it out of the socket. Although I do appreciate the 10x humor of it. It’s weird that so many people focus on the software, which runs perfectly fine in emulation, but seem to lose their minds that an $8,000 machine from 1987 shipped with a buggy CPU… Hopefully this tbh t will encourage someone out there with a 386 to try to replicate this.
- consp 3y ago> I was actually hoping that by the end of the blog post, the mystery of why the game didn't run would be cleared up, but sadly it wasn't. My best guess would be something of the following: The software tries to determine if the CPU has a 80(2/3)87 device some way. Thinks it does have it and then tries a FPU instruction to get the error signal firing and getting the eventual INT02 to blow up in it's face. But I'm not limited by any actual knowledge here so this might just as well be something completely different.
- bcoates 3y agoMy guess is that the Infocom game was setting up some sort of FP emulation TSR and not cleaning it up, and BattleTech was coincidentally using it. Or whatever the equivalent of a windows 3.x VxD is for OS/2, if that exists. Or just otherwise messing with the interrupt tables involved in the arcane x87 protocol in a way that un-breaks things. Also it looks like there may be some issues with FP/FP emulation on the OS/2 DOS extender host: https://www.os2museum.com/wp/floating-point-exceptions-and-dos-extenders/ https://www.os2museum.com/wp/floating-point-exceptions-and-d...
- consp 3y agoThat sounds quite more plausible than my idea. FP emulation is always interesting if performed by multiple programs/companies messing with each other's implementation. Lots of fun with layers of interrupts, real/virtual/protected mode switches and all the other magic the original 87 was not designed for.
- mst 3y ago"I'm not limited by any actual knowledge here" is an excellent way of putting it and I shall endeavour to remember it next time I'm in such a situation. Poor though my memory is, it happens often enough that I have a decent chance.
- scruffyherder 3y agoI just got a newer cpu today I just wanted to write something out as I wasn’t expecting this kind of response. There is no problem with the drive on dos, windows or os/2 1.2 so it’s something about it being an early 2.0 beta and probably an older 386 cpu.
- Narishma 3y agoYou didn't actually miss much because even with an FPU, Quake wasn't really playable on a 486. It was optimized for the Pentium.
- Projectiboga 3y agoMight have a been copy protection code requiring the coprocessor?
- jandrese 3y agoThe suggestion in the article was simply that his 386 was a crappy early one that may also be slightly defective seems plausible. IIRC the 387 was a full 386 plus the floating point logic, and when you installed it the coprocessor took over most of the processing and the 386 was reduced to being a data broker.
- _ihaque 3y agoI believe the 387 was an actual coprocessor; the _487_ may be what you're thinking of -- the 487SX contained a whole 486DX inside and just disabled the host processor [1]. [1] https://en.wikipedia.org/wiki/X87#80487 https://en.wikipedia.org/wiki/X87#80487
- ForOldHack 3y agoI would concur: The 386sx was just 16 bit. The 387sx was for that 16 bit processor. The 486sx was no math co-processor, and the 487 was a whole 486 DX, i.e. the vacancy slot, brought to you by Intel Marketing.
- scruffyherder 3y agoThe 487 was the “full” replacement chip upgrade. I still don’t know why the addition of the math coprocessor helped so much
- lproven 3y agoNope, as I commented above: https://news.ycombinator.com/item?id=38275340 https://news.ycombinator.com/item?id=38275340