Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Operating Systems

Hobbyist Builds a Modern System That Still Runs MS-DOS (yeokhengmeng.com) 54

He's the long-time Slashdot reader who installed Linux on a 1993 PC — and then installed a 1994 version of MS-DOS on a modern Thinkpad X13. (And somewhere along the way, he even built a ChatGPT client for DOS...)

But in a new blog post, yeokm1 reveals "I recently built myself a PC," salvaging parts from a previous desktop system to bootstrap an upgrade. And "I decided to build one with the ability to still reach back into the past to run MS-DOS..."

The result? A Ryzen 5 7600 and GeForce 4060 Ti system, but with a floppy drive, optical drive, Sound Blaster card, serial, parallel and PS/2 ports — that runs MS-DOS. The fact that a 30-year-old MS-DOS 6.22 can still work well enough on such a modern hardware is testament to the efforts made by the industry to ensure good x86 PC backward compatibility. AMD, Nvidia and Asus deserve to be commended on their efforts here.

I'm also impressed that the modern Nvidia Geforce 4060 Ti still supports some legacy video BIOS modes to a usable level although this is not complete. I didn't document in this blog post but brief tests with other VESA modes and resolutions didn't work so well. I wonder how long more this amount of x86 PC backward-compatibility will continue to last though... It definitely feels like the end is near.

Their blog post includes a video about their system. (And yes, it plays Doom.) But their ultimate goal is to use it to play modern games like Cyberpunk 2077 and Flight Simulator 2020 (as well as the upcoming Flight Simulator 2024) "at reasonably good settings and performance." (And also to experiment with light machine-learning workloads, do basic video editing, run virtual machines.)

After successfully building their DOS-running system, they asked ChatGPT what it thought. Would the system's specs be powerful enough to handle the 30-year-old operation system? And ChatGPT confidently replied:

"Neither the Ryzen 5 7600 nor the GeForce RTX 4060 Ti is designed to run DOS natively. DOS is an older operating system that was primarily used on x86 architecture from the late 20th century, and modern hardware like the Ryzen 5 7600 and GeForce RTX 4060 Ti are not compatible with DOS due to their 64-bit architecture and lack of necessary drivers to interface correctly with DOS, which relied on much older technology..."

yeokm1's blog post concludes: "I think I just proved ChatGPT wrong :P"
This discussion has been archived. No new comments can be posted.

Hobbyist Builds a Modern System That Still Runs MS-DOS

Comments Filter:
  • by phantomfive ( 622387 ) on Sunday October 06, 2024 @09:50AM (#64843827) Journal
    Maybe he needs to push the Turbo button. But either way I'd like to see a Beowulf cluster of these.
  • Compatibility (Score:4, Interesting)

    by Artem S. Tashkinov ( 764309 ) on Sunday October 06, 2024 @09:54AM (#64843837) Homepage

    Technically ChatGPT is correct: modern PCs by default come with EFI which will not run MS-DOS in any shape or form.

    What about CSM though? It will probably work but MS-DOS doesn't support AHCI, thus your disk drives will be invisible to it. OK, if your BIOS is powerful/old enough, you can enable IDE/ATAPI. Now MS-DOS doesn't support USB, so no USB keyboard or mouse for you. Still there must be PCI-E adapters for both IDE and PS/2.

    As for the GPU, MS-DOS requires so little, I don't see any issues as long as CSM is able to initialize the 80x25 VGA mode and contains VGA support (which will probably be phased out sooner rather than later).

    • Re: Compatibility (Score:5, Insightful)

      by phantomfive ( 622387 ) on Sunday October 06, 2024 @10:01AM (#64843845) Journal
      If you're going to be technical, then get it right. They didn't ask if modern hardware could run the hardware by default. You are thus technically incorrect, which is the worst kind of incorrect.
    • The biggest issue with applications from that era is that many of them have hard limits in terms of how fast your CPU runs and they will simply crash or misbehave if the speed/frequency is too high, e.g. check this thread [stackexchange.com].

      If we are talking about GUI, e.g. Windows 9x is coded incorrectly, is extremely unstable or doesn't work at all. There [kennedysoftware.ie] are patches [github.com] to fix these issues though but they may not always work.

    • by drnb ( 2434720 )

      As for the GPU, MS-DOS requires so little, I don't see any issues as long as CSM is able to initialize the 80x25 VGA mode and contains VGA support (which will probably be phased out sooner rather than later).

      I think a modern system doing software rendering will be favorably comparable to circa 2000 hardware acceleration.

    • by Bert64 ( 520050 )

      You can only really run it in a "lowest common denominator" backwards compatibility mode that's only really intended as a minimal bootstrap environment.
      Only one of your CPU cores will be used and a fraction of your ram even if you choose the smallest available memory capacity, the GPU will be running as a dumb framebuffer losing virtually all of its features and making 99% of its memory inaccessible.

    • by tlhIngan ( 30335 )

      t will probably work but MS-DOS doesn't support AHCI, thus your disk drives will be invisible to it. OK, if your BIOS is powerful/old enough, you can enable IDE/ATAPI.

      That's why SATA controllers come with "Legacy Mode" which turns the SATA disk into an IDE disk. Many BIOSes disable the option because Windows freaks out if you switch the mode - to Windows, they appear as two different disk drivers and Windows needs a driver enabled for the other option.

      But that option exists for legacy operating systems that

    • Re:Compatibility (Score:4, Interesting)

      by mrfaithful ( 1212510 ) on Monday October 07, 2024 @03:09AM (#64845075)
      Having dabbled in this a few times I know that your modern CSM based BIOS contains a surprising amount of emulation to convince DOS it's running on an IBM compatible with PS/2 keyboard and IDE drives. As always, mileage and compatibility may vary. For the mouse strictly speaking DOS didn't support mice at all did it? You always had to load a TSR and thanks to the freedos project there's a USB mouse TSR you can use. The level of compatibility afforded by a relatively recent AMD card was the big surprise. VGA was fine, SVGA worked in the few things I tried. Sound was (as was common back in the day) a much more difficult affair. Your choices are SBEMU which will turn your HD Audio compliant onboard into something vaguely SBPro compatible, but the way it hooks the ports and DMA breaks more games than it works with which is a shame. I had a PCI Live card which should have worked but neither the official DOS driver nor the community one would work and I never figured it out. I suspect there was just some incompatibility with the hardware I had.
    • by AmiMoJo ( 196126 )

      The CSM will usually accept USB keyboard input, so as long as the app uses BIOS calls to read the keyboard (rather than polling the hardware directly) it will work. A lot of motherboards still have PS/2 sockets though, because gamers believe they offer lower latency than USB (and there is a grain of truth to that).

    • Every motherboard I've ever owned including the one I have now has had a PS/2 port. No USB required.

  • by evanh ( 627108 )

    Doesn't the PC implementation of UEFI initially boot similar to MSDOS? I mean it still keeps the files on a BIOS-like FAT32 partition ahead of the GPT.
    Ie: The legacy hardware is actually still used to get the modern OSes booted.

    • Re:UEFI (Score:5, Informative)

      by codebase7 ( 9682010 ) on Sunday October 06, 2024 @11:56AM (#64843989)
      No. It doesn't.

      Modern-ish BIOS systems relied on the Master Boot Record (or the Partition Boot Record) which contained a small 218 byte reserved area outside of the filesystem for raw code to be written that would locate and load the second stage bootloader for the installed OS. (FYI: There are other formats out there, the classical one on Wikipedia allows for 446 bytes of raw code.) The reason for this size limitation is because it needed to fit inside a single sector so the BIOS wouldn't need to implement support for an entire filesystem (and thus make the BIOS easier to implement with a smaller attack surface). Which for legacy storage meant a maximum size of 512 bytes. This raw code is also required to be 16bit by the BIOS specification. Thus a 32bit or even 64bit OS running on a BIOS machine would need to switch into it's more advanced mode after this raw code had run.

      EFI on the other hand uses a regular filesystem partition with a special label that the firmware mounts and reads directly to load the bootloader. Because it's part of the filesystem there is no size limitation on the raw code. (You could even run the entire OS from the EFI System Partition, as it's just a normal FAT32 partition otherwise, but it's not recommended.) This raw code is also allowed to be in the native bitness of the CPU. So 32bit or 64bit code instead of the 16 bit code which was mandatory for BIOS systems.
      • Re:UEFI (Score:4, Insightful)

        by Artem S. Tashkinov ( 764309 ) on Sunday October 06, 2024 @02:25PM (#64844309) Homepage

        EFI on the other hand uses a regular filesystem partition with a special label that the firmware mounts and reads directly to load the bootloader.

        Not a "label", a filesystem GUID, EFI System (partition):

        C12A7328-F81F-11D2-BA4B-00A0C93EC93B

        What's funny is that when a partition with such a GUID is missing, computers (EFI BIOS'es) will often try to boot from the first FAT32 partition on the disk.

      • Re: UEFI (Score:5, Interesting)

        by vbdasc ( 146051 ) on Sunday October 06, 2024 @03:18PM (#64844369)

        UEFI in many ways resembles advanced BIOS bootloader's such as GRUB. In fact, GRUB can do many of the tricks that UEFI is capable of, including running 32- or 64- bit code before loading the OS, without a size limitation, while residing in a designated folder in a supported filesystem (supported filesystems include more robust ones that FAT32 such as ext2/3/4, for example. And yes, GRUB can run complex payloads from its folder, including whole "operating systems". The small first-stage booting stub in the MBR is irrelevant - it can be extremely simple, with its only job being to load GRUB proper.

        The real advantage of UEFI over GRUB is that UEFI has a device driver framework, which allows it to do more with the devices at boot time than GRUB, and also that it's designed to be callable by the OS, while GRUB is "fire and forget" - once it loads and transfers control to the OS, it's finished.

        • That advantage can also be a curse. By definition having a framework to load other modules means it's potential for exploitation increases. As UEFI allows for cryptography, entire device drivers (even custom application PE binaries), and auto updating, it's no surprise that the firmware environment is more heavily targeted these days. It's become an OS in and of itself, thus lowering the bar to entry for those seeking to live above the OS environment. (To say nothing about it's "trusted" nature which makes
  • Emulator or VM (Score:4, Informative)

    by Sebby ( 238625 ) on Sunday October 06, 2024 @10:04AM (#64843851)

    I wonder how long more this amount of x86 PC backward-compatibility will continue to last though... It definitely feels like the end is near.

    That's basically what emulators, or perhaps to some extent also VMs, will end up being useful for.

    While building an actual physical machine that works to do this is really neat, it's not (or will not be, as he suggest) practical - for example I still 'run' an Amiga computer, but through emulation; having a physical Amiga would be neat to have, but there'd be all the extra physical space needed (and costs!) for it, and in the end it wouldn't really enhance my experience much of 'using' the Amiga (in fact I can more easily emulate any Amiga system or hardware than managing the same equivalent physical hardware).

    • I used to have 11 classic game consoles connected at all times for the sake of purism, and I have to agree with you. At this point if you are willing to spend the CPU and have a 4k display you can get a surprisingly convincing facsimile of whatever era's CRT you would like to replicate. The only thing I don't know if anyone has managed to honestly replicate is the best CRT light guns, like on the Saturn or the Playstation. Those were phenomenal, and came alongside some excellent arcade ports. I used to have

  • AI is braindead nonsense.
    In other news: Getting modern hardware to boot MSDOS isn't novel either, but even if you do, it's not like you can do anything too terribly useful with it in that state. You're not going to find MSDOS versions of things like graphics card or network card drivers for modern versions of those, and older versions of those are either going to be on ISA-bus or parallel-PCI bus cards, so you won't be able to integrate them into the system anyway unless you have some sort of bridge from P
    • AI is braindead nonsense. In other news: Getting modern hardware to boot MSDOS isn't novel either, but even if you do, it's not like you can do anything too terribly useful with it in that state. You're not going to find MSDOS versions of things like graphics card or network card drivers for modern versions of those, and older versions of those are either going to be on ISA-bus or parallel-PCI bus cards, so you won't be able to integrate them into the system anyway unless you have some sort of bridge from PCIe to those busses.

      It's not as hopeless as you suggest. Many of us have CDs with our old DOS environments that included 16-bit Borland and MS C/C++ compilers and MASM.

      And given what we were able to do in the late 90s with respect to software rendering of 3D scientific and engineering apps, and games, I think modern hardware could still be quite impressive. Although the return of all those bugs related to far pointers, where the segment register was not pointing at the correct place, would suck.

    • Actually, ISA (8237-style DMA included) is still there hidden in modern PCs as the LPC bus.

  • ... it also must be able to run MS-DOS as all Windows systems first boot into MS-DOS then start Windows as a real or protected mode "application". This only changed with Windows NT which was able to run on "non-IBM PCs". So unless it's a special Windows NT only computer, for example with a PPC, Alpha or ARM CPU, MS-DOS should run.

    • ... it also must be able to run MS-DOS as all Windows systems first boot into MS-DOS then start Windows as a real or protected mode "application". This only changed with Windows NT which was able to run on "non-IBM PCs". So unless it's a special Windows NT only computer, for example with a PPC, Alpha or ARM CPU, MS-DOS should run.

      Win9x and WinNT are hardly comparable. The fact that they implemented a common Win32 API so you only needed one binary was nice, but what happened behind the scenes was completely different. WinNT was a true multithreaded protected environment. Win9x was a kludge, it worked well enough for people to transition from 16-bit DOS and Win3.x apps to 32-bit Win32 apps. Which allowed people's next computer to be WinNT based, which in 2001 would be called Windows XP, succeeding both Windows ME (9x) and Windows 2000

      • Win9x was a kludge, it worked well enough for people to transition from 16-bit DOS and Win3.x apps to 32-bit Win32 apps. Which allowed people's next computer to be WinNT based, which in 2001 would be called Windows XP, succeeding both Windows ME (9x) and Windows 2000 (NT).

        Windows 3.1 had the same functionality, and it was implemented in basically the same way, though in 3.1 it was called win32s. You could run 32 bit programs on Windows 3.1 with it, and those same programs would also run on NT.

        • by drnb ( 2434720 )

          Win9x was a kludge, it worked well enough for people to transition from 16-bit DOS and Win3.x apps to 32-bit Win32 apps. Which allowed people's next computer to be WinNT based, which in 2001 would be called Windows XP, succeeding both Windows ME (9x) and Windows 2000 (NT).

          Windows 3.1 had the same functionality, and it was implemented in basically the same way, though in 3.1 it was called win32s. You could run 32 bit programs on Windows 3.1 with it, and those same programs would also run on NT.

          Win32s was a subset of the functionality in the WinNT 3.1 API. No multi-threading or asynchronous I/O, no protected memory, no DirectX, etc. I have vague recollections of using it for some utilities; but it was not even close to being an alternative to Win95.

          • Win32s predates DirectX, and so does Windows 3.1, so it's no wonder that DirectX didn't work with it. At the time, the only gaming-related API in Windows was WinG.

            • by drnb ( 2434720 )
              Yes, but the point is Win3.1 did not have the same functionality. It had a subset.
    • Windows NT for x86 wasn't started from DOS as a "protected mode application". It could run DOS software (32-bit WinNT only), but only in a special process called NTVDM, using the CPU's V86 mode.

  • I don't get the point of this sort of masochism.

    Running old software on new machines, I get that. It's a nostalgia thing.

    But why run MS-DOS on current hardware and then try to play modern games that way? What's the point?

    And why do other people think it's interesting? Is it a form of sadism, enjoying watching other people suffer?

    • You just don't understand.

    • It's a game. If you understand why people play games, you will understand this.
    • Emulating DOS native games in dosbox or 86box is fine and all but you're not getting the most out of your hardware that those games could have theoretically taken advantage of. Sure, there may be little point in doing so, but to anyone who tried out single digit framerate Quake software rendered at 1280x1024 on a pentium, the idea that you could someday see it at 60fps in its original form, no source ports or GL enhancements, has a certain charm. I did it on a sandy bridge era machine which was almost too e
    • I'm sure someone could say the same thing about your hobbies. /s

      Same reason people climb mountains:

      For the challenge, because it is there, because they can, etc.

      Some "pointless" hobbies are an interesting puzzle to figure out by the few, while everyone else seems them as "stupid" and a waste of time. How much time do YOU waste on social media, watching TV, watching movies, playing games, etc. It is something to distract the brain from work.

      • Would mod you up if I had points. Basically this. If something presents an interesting challenge to someone, there's no further reason needed to question it beyond that. There's no reason to gatekeep what people do with their spare time; if you lack an interest in it, simply move on. Frankly, I thought this was one of the more interesting articles lately and I enjoyed reading through the comments.
  • by Bu11etmagnet ( 1071376 ) on Sunday October 06, 2024 @05:05PM (#64844477)
    I hope they didn't forget to

    SET BLASTER=A220 I5 D1

  • ... into Doom in about 3 seconds with the notably slowest part being the human at the keyboard. So that's nice. :-)

  • Leisure Suit Larry?
  • This could be marketed to the folks that seek out no-novocaine dentists . . . and save them a fortune!

To communicate is the beginning of understanding. -- AT&T

Working...