11 ms·
86Box: Why Not Pentium III?
- billyjobob 5y agoArticle claims it’s not possible to emulate a Pentium III at full speed on an Apple M1, and so there’s no point to a fork attempting this feat. But isn’t that exactly what Rosetta 2 does?
- snvzz 5y agoRosetta 2 is not cycle accurate to a Pentium III. That's AIUI what box86 targets on the CPUs it supports emulating.
- kevingadd 5y agoRosetta is not emulating the hardware, it's emulating the instruction set
- Epiphany21 5y ago>isn’t that exactly what Rosetta 2 does? The original Rosetta software provided during the PowerPC to Intel x86 transition was an instruction and system call translation layer. I haven't used Rosetta 2 but it's probably similar. As I understand 86Box is emulating specific chip implementations and all of the peripherals, cards and boards needed to run them, not just translating instructions. This makes the emulated machines appear to the guest OS as real hardware, I assume with all the flaws and quirks included.
- ack_complete 5y agoRosetta 2 only needs to emulate a macOS specific subset of x86-64 user mode. This needs to emulate kernel mode, including paging and the guest OS hosting its own user mode.
- AshamedCaptain 5y agoSorry but not getting to point of cycle-accurate emulation of recent x86 CPUs. What could possibly benefit ? The performance is going to be a disaster compared to say qemu....
- dusted 5y agoThe point of cycle-accurate emulation is to emulate something with accuracy down the the cycle, so that software that relies on some particularity will work on it. Performance is secondary, you can think of the emulation as a lasting documentation, which in time comes usable due to improvements of hardware and software, or can be used as a reference for FPGA, ASIC or alternative implementations.
- AshamedCaptain 5y agoThe question is which software that requires a Pentium III also requires some CPU timing peculiarity. There have been enough CPU vendors that such software would have been difficult to run even at its era. This is not a videogame console where all hardware was the same, or the early PC world were everything was designed for the Intel 8086 timings as on the IBM PC. This is the modern PC world. Which exact CPU model would you even choose to emulate ?
- dusted 5y agoLet's say I want to emulate my first SMP system, a dual p3 with windows 2000, well, without P3 (and smp) emulation, I can't. If there was SMP P3 emulation, then I could (albeit at horrible speed, at the moment) but at some point, it'd become quite reasonable.
- AshamedCaptain 5y agoThere is SMP P3 emulation. qemu is an emulator, not a virtualizer. There is no cycle-accurate emulation, but again the question is: why would need cycle-accurate emulation to run win2k? It runs just fine on virtualizers, even.
- pornel 5y agoPerhaps for games with DRM?
- spijdar 5y agoSomething 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 behaving subtly different, possibly due to differences in "undefined behavior". I doubt there's a binary cutoff point where it's obviously more useful to virtualize or emulate, but it's obvious that emulating an 80386 is ideal, and virtualizing a "Core 2 Duo" is ideal, for running software from those respective periods. Is the Pentium III desirable to emulate, and simply not computationally feasible, or is this just people wanting to make cool things for cool things' sakes? Or a little of both?
- chrononaut 5y ago> 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.)
- AshamedCaptain 5y agoAMD has relaxed a bit coherency behavior after page table manipulation leading to Windows 9x crashes: https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-bug/ 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.
- exfascist 5y agoWindows 9x couldn't even run on ~2007 era Intel Macbooks because of the A20 gate.
- 5y ago
- zozbot234 5y agoArguably, 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.
- actionfromafar 5y agoPatents are 20 years, so if you are unlucky, no. Also there are those infamous "submarine patents". I wonder though about truly ancient x86, why aren't there more clean-room clones of those?
- zozbot234 5y agoThe Pentium III family was launched in Feb 1999. That's more than 20 years ago.
- actionfromafar 5y agoDamn I'm old.
- nitrogen 5y agoThere are some x86 clones embedded in "PC in an ethernet port" style parts for upgrading old industrial designs. IIRC clones do things like a 486 clone clocked at a few hundred MHz.
- mschuster91 5y agoThe 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 would need serious quality photographs of the die... which can be done for old and small chips on a budget, but will be really expensive even for something of the Pentium 3 era. What has always interested me though: how are CPUs and modern GPUs actually developed, given that FPGAs are way, way too small and silicon-making runs extremely expensive? [1] https://www.computerhistory.org/revolution/story/330 https://www.computerhistory.org/revolution/story/330 [2] https://hackaday.com/2019/09/24/who-could-possibly-need-an-fpga-with-9m-logic-cells-and-35b-transistors/ https://hackaday.com/2019/09/24/who-could-possibly-need-an-f...
- cwzwarich 5y agoIt’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.
- phire 5y agoI've actually put quite a lot of thought into this topic (but for a different, non-x86 out-of-order CPU) It might not be possible to do it with an interpreter, but a well-designed JIT should be able to shift the cost of calculating instruction scheduling and cycle-costs from execution time to JIT time. Since OoO CPUs spend long stretches of time between branch miss-predicts and L1 cache misses, you can get long sequence of instructions that executing with the exact same timings every time. A tracing JIT is perfect for this usecase. You just need to normalise the pipeline state on entry (and this since this normally happens after a miss-predict, the pipeline is often drained), and then exit on every branch miss-predict or L1 cache miss and start a new trace. I suspect such a scheme might be fast enough for a Pentium III, I just need to find some time to actually try out my ideas at some point.
- cwzwarich 5y agoHere’s a paper describing a simulator that worked by similar means: https://dl.acm.org/doi/10.1145/384265.291063 https://dl.acm.org/doi/10.1145/384265.291063 It’ll help, but still won’t get you down to the 10-20x cycle overhead range that you need to claim success.
- phire 5y agoThanks, I've never encountered that paper before. You a right, they get a 190-360x overhead, and on today's CPUs, I think I need need to get it down to about 20-30x overhead to get realtime on current CPUs. It's only off by a single order of magnitude. Though, it would be fast enough for some usecases. 10% of realtime would be bearable for some TAS usecases. It might be possible for me to improve on what they have. For starters, they aren't using a trace-based approach and I think they are applying the memorisation on every single branch, correctly predicted or not, and every single memory access (even when they hit L1). But I would need a 10x improvement over what they had, and that's a big ask.
- abdulhaq 5y agoSounds a bit like sour grapes to me.
- jordemort 5y agoWhy do people who write emulators all seem to dislike each other?
- pram 5y agoA 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
- lemmiwinks 5y agoTIL https://www.zophar.net/ https://www.zophar.net/ still exists
- ChrisRR 5y agoFrom what I've seen of the emulation community, I can only think it's because many emulators are small enough that they're feasible for a single person to work on and maybe get too attached to. It's difficult to let go of your code baby, especially when you could technically do it all on your own. It's probably easier when the task is so large there's no way you could do it alone
- rnd0 5y agoEgo, 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.
- touisteur 5y agoI'd add dolphin there, mostly because it's an amazing project and their write-ups are very interesting. Always learning lots of things!
- navjack27 4y agoYou 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.
- The_rationalist 5y agoI 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 https://github.com/intel/haxm
- Comevius 5y agoYuzu 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 spectrum, it can emulate hardware very accurately, but very slowly.
- The_rationalist 5y agoWell 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
- rnd0 5y ago>Because this is where the human resources should be allocated, That's unwarranted hubris. It's not your call to tell developers where to direct their volunteer efforts.
- The_rationalist 5y agoShould does not equal must. Wanting a better world with less suffering and more joy is not the same thing as imposing this world by force. A thought that should have occured to you.
- ChrisRR 5y agoHere's the discussion from reddit. It appears as though the developer is loudly promising PIII emulation but has a history of not delivering. I would guess this article is an effort to distance themselves from this dev if people google it https://www.reddit.com/r/emulation/comments/tjnxg3/why_not_pentium_iii_86box/ https://www.reddit.com/r/emulation/comments/tjnxg3/why_not_p...
- rnd0 5y ago>Here's the discussion from reddit. It appears as though the developer is loudly promising PIII emulation but has a history of not delivering. The developer of 86Box as a rule has a history of backing up their claims -hence 86Box which has gone from strength to strength in the years since being forced to fork from pcem. A *LOT* of people float into the project's discord and ask "pentium III when?" -this addresses that, as well as answering the overly ambitious promises made by a recent fork of 86box.
- dada78641 5y agoFrankly, despite being in r/emulation, most of these people seem like they're new to the emulation scene with how dismissive they're being about this statement. It's as if they're unaware of just how much drama can happen behind the scenes and how it's sometimes useful to just clearly and unambiguously state "this is what happened from our perspective." Having the wrong scope can be very detrimental to a project in general, and although I'm not an emulator developer I feel this is probably especially true in this case.
- smm11 5y agoI have no problem cycling through my other old stuff, but my DEC Celebris GL 5133 will NEVER go away.
- aidenn0 5y agoCompletely OT, but switching to a Firefox tab with TFA loaded takes noticeably longer than switching to other tabs (about 3 seconds vs less than a second).
- navjack27 4y agoThey need to stop adding features and start completing features. Get accurate instruction cycle counts for all the CPUs up to and including the Pentium Pro. Be more clear on what is happening when you disable cache in the bios for platforms that allow this. Just saying that it reverts back to interpreter mode seems false. It allows me to run very fast clock CPUs with no slowdown. It's doing something different than just disabling the dynrec. I still just use PCem every day instead though. I trust that code way more than 86box mainly because of the machine window with the history graph and seemingly way more reproducible behavior in terms of performance. 86box is so wonky. Socket 8 Pentium pro 200 is just universally great for everything. Disable cache and move down to 150 and you can run older stuff quite well with no hyper speed. I have a bunch of old system presets I use every day. I got a win98se setup that is usually socket 7, super 7 or socket 8 for most stuff. It has 4 55GB VHD drives mounted to it. It's great. Every DOS game is just there. Bunch of Windows software ISOs too. Got a bunch of 2gb dos compatible disks and every DOS version installed and ready to go. I'll toy around with all the OS/2s sometimes too, very cool system. But please, just polish what is there!