Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Cool and all but what is wrong with qemu, virtualbox, etc?


Why Dosbox/Dosbox-X instead of qemu or VirtualBox in general? Dosbox and Dosbox-X focus much more heavily on accurate emulation, rather than fast virtualization. Peripherals are implemented to match the original period-correct hardware, rather than as a "good enough" view or cooperative facade requiring guest support. Weird CPU errata (like specific carry register behavior) is implemented.

Why the author chose Dosbox-X to try to run Windows XP? It sounds like Because They Can.


Unfortunately, CPU accuracy is not one of DOSBox's focuses.

If you install the "Recommended" build of DOSBox-X from the website, then proceed to install the default "Visual Studio build (64-bit)", you get buggy and inaccurate CPU emulation.

How do you know it's buggy and inaccurate? Run QBasic, and PRINT VAL("5"). You get 4.99999999999.

But...

You get the correct result if you are using a 32-bit build. You get the correct result on all non-MSVC builds. You get the correct result if you have the Dynamic core selected, even on 64-bit MSVC builds. It's just 64-bit MSVC builds with any core other than the Dynamic core that give the wrong result.

So what's going on here?

MSVC 64-bit doesn't support 80-bit floating point math, and doesn't allow you to use inline assembly to manually run the 80-bit floating point instructions. Instead, floating point operations are truncated down to 64-bit.

I think that the MSVC 64-bit build should NOT be the default build recommended to users for just that reason.


Ooh.

This makes me very much want to tinker with DosBox myself.

Qemu can IIRC do similar things with drivers but possibly because it was co-opted to run android emulator imgs (which are all very standard and boring), it seemed difficult to tinker with custom drivers and emulated hardware.

The above could just be my own inexperience talking, but examples are one of the best ways to learn, if DosBox-X takes extra care that's noteworthy at least.


> Because They Can.

It's probably also a great way to find bugs.


One of the primary reasons for using DosBox vs virtualization, at least for actual DOS software, is that lots of old DOS games and apps are designed to run on a specific x86 chip and clock speed.

The classic example is the earlier Wing Commander games - run them on anything faster than the period correct 286/386 CPUs that were out at the time of release, the games timing/speed gets severely messed up. DosBox has nice features to let you control the CPU speed to try and make these games work again.

Software such as Wing Commander were never tested/designed originally to run on faster CPUs that didn't exist back then and software timing can sometimes only be correct on very specific chips and clockspeeds.

Here with XP, its just cool - not a practical or performant choice.


Modern Vintage Gamer recently went over Wing Commander and talked about this in detail. The problem with DosBox is the framerate chugs with lots of enemies on screen and then speeds up as you take them out one by one. He suggests the best way to play is on a PC that it was originally designed for.

https://www.youtube.com/watch?v=LuFNFd8I0WU&t=680s

BTW, I remember playing Wing Commander way back in the day. No game sucked me in like that before or since.


You are absolutely correct that DosBox still doesn't get Wing Commander 100% perfect - it however does at least get a playable experience with the CPU cycle controls, and a much better experience than running it in dos in say VirtualBox.

I run and maintain some old 386/486 boxes as a hobby - I honestly don't think its worth it for almost anyone, DosBox will be just fine for 99% of people.


This is a great info. Thank you! I'll have to find some time to fire it up one of these days knowing that the experience is as good as you say.


Does fixed cycles fail to address that?


Not sure, but he does mention the best way to do it is to run DosBox "at around 3000 cycles". So I take it that means fixed cycles?


>He suggests the best way to play is on a PC that it was originally designed for.

Even Captain Obvious himself is going to sigh something fierce.


I don't think that's fair. There is a ton of software where the experience on the PCs it was designed for is mediocre, but other hardware/software is compatible and much better.


Captain Obvious must have always played games that didn't have a frame limiter, because very often games will run better on higher spec hardware than they were originally designed for. Obviously.


DOSBOX-X and x86box emulate 3d graphics accelerators properly, and the native drivers in Windows support these. That means you can run games that require 3D acceleration. VirtualBox, VMWare often do not support 3d acceleration for older OS - not sure about qemu though.


They are less fun (to the author).

>This is what I like about emulation and playing around with those systems so much.


Nothing. Author wanted to push the limits of unsupported stuff on a ongoing project. Myself I prefer vmware instead of virtualbox and/or qemu. When it comes to virtualization and fast spinning whatever flavor of the month a new OS pops vmware is undisputed king.


This is objectively incorrect: vmware/qemu and dosbox are _not_ interchangeable technologies even if it seems like they try to do the same thing, with various comments on this post nicely explaining why and how =)


IIRC one can have some issues with virtualization - dynamic clocks and sheer speed, where emulation has benefits

One can emulate with the others, sure, but not all equal. Accuracy is a comparison benchmark


In case you ever want to run Windows XP at 1MHz, of course. [1]

(/s, of course, but you get the idea – more control.)

[1] https://www.youtube.com/watch?v=_FxHyofXglI&pp=ygUQd2luZG93c...


Not as much pizzazz.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: