Live data from Hacker News

86Box: Why Not Pentium III?

86box.net

91–100 of 102 posts

Re: 86Box: Why Not Pentium III?

#91
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.

It's because dynamic recompilation as done in VirtualBox & QEmu is on the order of 10x slower than CPU accelerated/supported virtualization. You don't notice that (as much) with DOS or a simple Windows 9x VM. But you will notice that if you're running busy SQLServer, ISS, .Net, Linux, PostgreSQL, MySQL Servers.

Re: 86Box: Why Not Pentium III?

#93

Earlier quoted context omitted.

Do you know a lot of demo scene binaries that only work with accurate instruction timings of a Pentium 3 ?

What's your fixation here? You're wasting a lot of people's time.

Feel free to downvote.

Re: 86Box: Why Not Pentium III?

#94

Arguably, cycle-accurate emulation should be done with FPGA support anyway. The Pentium III is old enough that there should be no legal obstacle to implementing new compatible hardware.

The problem won't be legal, but scale: the Pentium 3 has ~9.5M transistors [1] - and the world's largest FPGA, at a staggering price point of 55.000 dollars, has only 9M logic gates [2]. Probably you could use an FPGA a bit smaller if you use FPGA-native memory for L1-L3 instead of transistors, but you'll nevertheless need an FPGA that is many orders of magnitude too expensive for a hobbyist niche project. Also, you…

I'd love to know who uses a 9M LUT FPGA! The article mentions companies like Arm testing their designs, but do they really test on FPGAs? (And would such a test be useful? ASICs and FPGAs have fairly different timing because of the length of wires).

Re: 86Box: Why Not Pentium III?

#95
post #41

Why do people who write emulators all seem to dislike each other?

A lot of emulators are basically vanity projects written by one person, so it can become super personal. Criticism can feel like an attack. My friend wrote an NES emulator decades ago and he fit this model. Got into flamewars on Zophar's Domain and such lol

TIL https://www.zophar.net/ still exists

Re: 86Box: Why Not Pentium III?

#96
post #67

Why do people who write emulators all seem to dislike each other?

Ego, and a lot of emulation devs have straight-up social problems. IE "do not play well with others". I've been following the 86Box project from the sidelines and seems to be one of the few projects that actually handles people issues well.

I'd add dolphin there, mostly because it's an amazing project and their write-ups are very interesting. Always learning lots of things!

Re: 86Box: Why Not Pentium III?

#97
post #82

Earlier quoted context omitted.

If someone was to decide to develop a game for a minimum performance requirement of a Pentium III at 500mhz and some GPU, for some reason (which would be a completely arbitrary choice, but that's the hobby, so roll with it) then the only way they can possibly check that out meets that minimum requirement is to test on a machine with that configuration. Either a real machine, or a accurate emulator. It doesn't matter…

> If someone was to decide to develop a game for a minimum performance requirement of a Pentium III at 500mhz and some GPU, for some reason (which would be a completely arbitrary choice, but that's the hobby, so roll with it) then the only way they can possibly check that out meets that minimum requirement is to test on a machine with that configuration. This just doesn't happen in modern PC development, save for hea…

I think the variety in configurations is completely irrelevant.

If you aren't using at least one accurate configuration for your testing, there is a huge risk that you miss your performance target by a huge margin. Your 60fps game could end up running at 20fps on your target minimum hardware. Small performance inaccuracies can massively add up if you have a non-emulated cache-miss or branch miss-predict delay in your inner-most loop.

I think you are massively overestimating how accuracy of timings that you can get though virtualisation or semi-accurate emulation. Yes. They are probably accurate enough for running any historic software from the era, as most code for the PC is well-behaved to not do the wrong thing when running too fast.

It's just for the use-case of developing new software, as soon as you start optimising or profiling, you need accurate timings. And yes, we might be talking about weird demo-scene style projects along the lines of "I want to get the absolute best possible graphics out of the computer I had 25 years ago, no frames dropped, no wasted cpu cycles". I'm talking about the kind of project were someone is writing inner loops with intrinsics or in assembly.

You might argue that such a project is a massive edge case that it's not worth catering too. And if you are writing an emulator, that's a 100% legitimate position to hold, emulators shouldn't have to cater for every possible usecase. My point is only "If you don't have a 100% accurate emulator, and there is some niche use case it can't emulate, then the hardware isn't fully preserved" and that it would be nice if an accurate emulator existed.

> Now on consoles I can see the benefit. Consoles are lots of identical hardware, operating systems that tend to get out of the way, and the people who develop for them only test (for obvious reasons) on the console hardware itself or at most a developer edition which has the same hardware (for obvious reasons again).

Yes, I've chased after bugs in console emulation (Dolphin Emulator) that were impossible to fix correctly without significantly more accurate emulation.

Like the game which memset a staging buffer before data had finished DMAing out. The game was only saved on real hardware because after memsetting, it invalidated the cachelines and in typical situations, none of the memset cachelines had been evicted. Impossible to correctly fix without emulating the existence of an L2 cache. We eventually resorted to patching the game to fix the bug.

Or games where video decoding stutters, because it has a hot inner loop that push the out-of-order CPU and has very few cache misses. It executes faster over the whole frame on real hardware than Dolphin's CPU timing model, which assumes a certain number of cache misses. The game must have tuned it's video codec to use as much CPU time as possible.

We have speed running tricks that don't work in Dolphin, because the depend on lagging the game. And games that freak out when the GPU executes too fast, but when you adjust the timings for those other games freak out because the GPU is executing too slow. It's impossible to calculate accurate GPU timings without running much of vertex transform and a basic depth rasterizer.

These are projects I'd love to work on at some point, accurate CPU and GPU timings for Dolphin, even if they don't run at full speed and bus contention is still ignored. I think might be possible to get within the correct order of magnitude (so 10-50% of realtime), which is workable for some usecases like TASes and testing bugs.

Re: 86Box: Why Not Pentium III?

#98

Earlier quoted context omitted.

Yuzu uses Unicorn, which uses QEMU code for functional, but not cycle accurate CPU emulation. Most software these days don't depend on the exact behavior of the hardware, even on Nintendo Switch, and the emulator can also use application-specific patches to make up for the difference. 86Box is not entirely cycle accurate, but much more accurate than QEMU, so no patches are required. gem5 is on the other end of the sp…

Well that makes pcem and x86box very niche then.. What should people actually use for emulating a recent x86 cpu like found on the PS4/PS5/xbox serie x and get good performance? Because this is where the human resources should be allocated, for enabling the support of hundreds of video games including major console exclusives

Emulating the CPU of those newer consoles would be quite slow. The practical approach would be a translation layer like Wine with many application-specific patches. The translation layer for the graphics would involve a lot of reverse engineering.

Re: 86Box: Why Not Pentium III?

#99
post #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 po…

Chinese companies are making new boards for >=Nehalem Xeons using recycled server chipsets, mostly because they're still OK for gaming on a budget.

If there was a demand they could probably do the same for older models if they can harvest enough chipsets. There were quite a few 430HX's on embedded modules that could be recycled...

Re: 86Box: Why Not Pentium III?

#100
post #67

Why do people who write emulators all seem to dislike each other?

Ego, and a lot of emulation devs have straight-up social problems. IE "do not play well with others". I've been following the 86Box project from the sidelines and seems to be one of the few projects that actually handles people issues well.

You ever go back on the PCem forums and see the old posts where battler would request completely ignorant things from walker? I beg to differ on 86 handling anything well. The constant PCem smearing to the point where walker just left from all the stress. I consider 86box a patchwork mess. They might strive for accuracy but I don't believe there is a full understanding of the original code.
Post reply on HN