Live data from Hacker News

86Box: Why Not Pentium III?

86box.net

31–40 of 102 posts

Re: 86Box: Why Not Pentium III?

#31
post #5

Something alluded to, but not really elaborated on, is what the motivation is for emulating progressively newer CPUs, versus virtualizing them. With old hardware, the sort I imagine 86Box is mainly used to emulate (it's how I use it, anyway), old OSes rely on specific behavior of old systems and peripherals that can't be easily virtualized through KVM + QEMU or the like. A mixture of processors being too fast and beh…

I recall awhile back Linus Tech Tips pointed out that the primary failure point for old machines wasn't the CPUs which tend to be piling up cheaply (I can't say how true this is for pre PIII parts) but instead the motherboards.

I wonder if in some sense there isn't a market for someone to just make new motherboards instead for this stuff using modern parts. I realize there are some licensing issues after a certain point, but in theory everything up to a PIII should be doable. Particularly since memory controllers are in the chipset there are options to use things like modern ram chips and then 'downgrade' performance to be compatible in the chipset. This could also be used to allow for modern M.2 SATA drives to be run in IDE emulation mode locally or even have SD/CF options directly on the board.

The main downside at that point is space of course, hardware always takes up more space than an emulator ;)

Re: 86Box: Why Not Pentium III?

#32
post #17

Earlier quoted context omitted.

I'm of the belief that hardware is not truly preserved until you have a fully-accurate emulation of it. You are correctly that software doesn't require fully accurate timings. Just accurate enough to bypass any timing bugs and replicate the experience. Especially outside of the console space. If your only goal is running all known software, then you can get away with some massive accuracy bugs. But there is more to h…

> your only goal is running all known software, then you can get away with some massive accuracy bugs. > Some people want to do retro programming and develop new software for a platform. And if you don't have accurate emulation, then the more likely you are to introduce a bug that works in the emulator but not on real hardware. The two things go hand by hand. If era-developed software is unlikely to suffer from timin…

Accurate timing is most useful when you are retro-programming a video game, or something else real time.

How do you know if your game will run at 60 fps if the execution times aren't accurate?

> what CPU timing would you even emulate

Ideally your emulator would support as many CPU + hardware configurations as possible, at many different speeds, so you can test as many as you want.

But just one single accurate hardware configuration is better than none. At least then I can say "I programmed this game it runs on a Pentium III 550E, with a Riva TNT2"

It's exactly the same when doing retro-programming on real hardware. If you only have one PC, then you can only confirm it's working on that exact same hardware configuration. But accurate emulators have advantages due to cost and ability to easily support multiple configurations.

Re: 86Box: Why Not Pentium III?

#33

Earlier quoted context omitted.

> old OSes rely on specific behavior of old systems and peripherals that can't be easily virtualized through KVM + QEMU or the like This sounds interesting. Do you have examples of these behaviors where something is faulty using standard virtualization versus hardware-level emulation? (I know clock speed can make a difference.)

AMD has relaxed a bit coherency behavior after page table manipulation leading to Windows 9x crashes: https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-b... These crashes are not related to clock speed. While Windows 9x already cannot run on these CPU due to clock speed, the clock speed issues have mostly been patched in 9x.

Windows 9x couldn't even run on ~2007 era Intel Macbooks because of the A20 gate.

Re: 86Box: Why Not Pentium III?

#34
post #25
post #17

Earlier quoted context omitted.

I'm of the belief that hardware is not truly preserved until you have a fully-accurate emulation of it. You are correctly that software doesn't require fully accurate timings. Just accurate enough to bypass any timing bugs and replicate the experience. Especially outside of the console space. If your only goal is running all known software, then you can get away with some massive accuracy bugs. But there is more to h…

Neither Xbox or PS2 are emulated at a cycle level though. They mostly rely on recompilation and API emulation, and PCSX2 has gotten pretty far on that. That generation was really the start of cross platform being the norm, and so the start of a dramatic drop off in games requiring very specific hardware details. If your game had to run on Xbox/PS2/WinXP then there has to be some level of portability considered in the…

> Neither Xbox or PS2 are emulated at a cycle level though

Yet... Like I said, you can get pretty far with low-levels of accuracy. PS2 emulation is actually quite timing sensitive.

I have at least one bug in Dolphin that I investigated, that can't get fixed correctly until we get significantly better GPU timings. And also some speed-running strategies that rely on generating enough lag, but don't work in dolphin because it (usually) emulates the CPU and GPU way too fast.

Re: 86Box: Why Not Pentium III?

#35
post #32

Earlier quoted context omitted.

> your only goal is running all known software, then you can get away with some massive accuracy bugs. > Some people want to do retro programming and develop new software for a platform. And if you don't have accurate emulation, then the more likely you are to introduce a bug that works in the emulator but not on real hardware. The two things go hand by hand. If era-developed software is unlikely to suffer from timin…

Accurate timing is most useful when you are retro-programming a video game, or something else real time. How do you know if your game will run at 60 fps if the execution times aren't accurate? > what CPU timing would you even emulate Ideally your emulator would support as many CPU + hardware configurations as possible, at many different speeds, so you can test as many as you want. But just one single accurate hardwar…

> How do you know if your game will run at 60 fps if the execution times aren't accurate?

Again, this is not a console. If you rely on a specific Pentium 3's instruction timings to reach 60 fps, your game is not going to reach 60fps _on any other PC_, not even if someone has an identical CPU, since any single other difference in hardware, configuration, or even layout of the filesystem is going to matter much more.

You just can't get away with the same kinds of bug you can get away with in consoles, because even just trying ATI vs NVIDIA (or any two different brands of accelerator) is already going to be a completely different environment and timings, likely enough to trigger all those bugs (or at least more than different instruction timings will).

i.e. even the simplest of emulators (incl. a virtualizer) with a runtime cap is going to suffice for the usecase of mildly estimating a framerate based on the CPU of some era. And there's very little value to increase the accuracy of such estimation since with so wildly varying PC hardware anything you can produce is going to be irrelevant anyway.

(How to make a similar accurate-enough estimation of GPU performance is a different story).

Re: 86Box: Why Not Pentium III?

#36

It’s probably not even possible to emulate the Pentium Pro (or any other out-of-order x86 CPU) in a cycle-accurate fashion at the original speeds on contemporary hardware. Just attempting to match the original behavior for instruction scheduling, cache models, branch prediction, etc. would blow your CPU budget.

Some anecdata:

gem5 is a simulator that aims to do precisely all that, and yes it is extremely slow. Probably on the order of 100x slower, but I don't have timings to hand.

Similarly booting a small processor compiled into C++ with verilator is very taxing on the processor too.

Re: 86Box: Why Not Pentium III?

#37
I don't understand,the yuzu (switch) emulator has excellent performance and correctness. It perfectly emulate a modern ARM cpus at multiple GHz and properly emulate the Tegra Nvidia GPU.

Why would emulating x86 be so much harder, especially since you can actually use the host x86 cpu... via hardware hyoervisors e.g. https://github.com/intel/haxm

Re: 86Box: Why Not Pentium III?

#38

Earlier quoted context omitted.

AMD has relaxed a bit coherency behavior after page table manipulation leading to Windows 9x crashes: https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-b... These crashes are not related to clock speed. While Windows 9x already cannot run on these CPU due to clock speed, the clock speed issues have mostly been patched in 9x.

Windows 9x couldn't even run on ~2007 era Intel Macbooks because of the A20 gate.

The Intel Macs were a strange not-quite-PC-compatible; the BIOS was EFI, and I believe things like the 8042 (which controls A20) weren't present although I'd have to check the schematic to be sure. That said, I'd be surprised if port 92h "fast A20" wasn't present --- that's been in nearly every chipset since ~386 or so.

Re: 86Box: Why Not Pentium III?

#39
post #5

Something alluded to, but not really elaborated on, is what the motivation is for emulating progressively newer CPUs, versus virtualizing them. With old hardware, the sort I imagine 86Box is mainly used to emulate (it's how I use it, anyway), old OSes rely on specific behavior of old systems and peripherals that can't be easily virtualized through KVM + QEMU or the like. A mixture of processors being too fast and beh…

What about old versions of VirtualBox? As far as I understand, VirtualBox originally used some kind of dynamic recompilation to run on hosts without modern virtualization (like VT-D). It used to run most instructions directly on the host CPU, emulating only certain ones. I think they removed it at some point, though. Is it not accurate enough? I remember it used to run OS-X much better than other virtualizers.

I pulled out my version of 86Box to check, and it does have mandatory dynamic recompilation if you try to emulate later chips.

Re: 86Box: Why Not Pentium III?

#40

Earlier quoted context omitted.

AMD has relaxed a bit coherency behavior after page table manipulation leading to Windows 9x crashes: https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-b... These crashes are not related to clock speed. While Windows 9x already cannot run on these CPU due to clock speed, the clock speed issues have mostly been patched in 9x.

Windows 9x couldn't even run on ~2007 era Intel Macbooks because of the A20 gate.

Yes it can: https://www.youtube.com/watch?v=9si1le2EOGU (2009 iMac, they just use some himem.sys replacement).

And 9x can still be virtualized even on the latest Intel iMac, with nested paging enabled (or not). On AMD, you need to disable nested paging due to the above change in behavior.

Post reply on HN