Remix.run Logo
SDL Now Supports DOS(github.com)
192 points by Jayschwa 5 hours ago | 67 comments
ronsor 5 hours ago | parent | next [-]

All that's left now is SDL for UEFI, and then all our games can run in a pre-OS environment.

floxy an hour ago | parent | next [-]

What's the latest with Intel's Management Engine / Minix that runs on every Intel chipset? Is that still a thing? Did they harden it? Or can you still get access?

https://www.zdnet.com/article/minix-intels-hidden-in-chip-op...

ssl-3 an hour ago | parent [-]

You're missing the most important question: Can the Intel Management Engine run Doom?

BirAdam 3 hours ago | parent | prev | next [-]

Well… UEFI is kind of modern DOS.

lnx01 2 hours ago | parent [-]

It certainly is not.

rwmj an hour ago | parent [-]

There are a lot of parallels: It has a janky set of buggy drivers. It has backslashes in paths. It has a shell that is "inspired" by COMMAND.COM. And it's basically a program loader where every program immediately replaces it and drives the hardware directly.

mananaysiempre 2 hours ago | parent | prev | next [-]

That... Shouldn’t be terribly difficult? Though I don’t believe UEFI has sound drivers (you’ll have problems writing one yourself because even frickin’ sound-codec chips have NDA-only datasheets these days), and the stupidest thing is that the “graphics output protocol” doesn’t indicate vsync so you can’t do tear-free blitting, which is literally worse than VGA.

chaps 4 hours ago | parent | prev | next [-]

That honestly sounds amazing. Imagine booting into something like a grub menu that's just a list of classic games.

Xirdus 4 hours ago | parent | next [-]

I basically had this setup back in the day. I don't really know how I ended up with it, I was 7 at the time and none of it was intentional - but my bootloader had two entries: I could boot into Windows 98, or I could boot into Worms.

dale_glass 4 hours ago | parent | next [-]

Probably your parents setting it up?

As far as I know, Worms is a normal DOS game, so the only way for that to happen should be a DOS install configured to just auto-start Worms on boot. Which makes sense as a way to keep a kid away from anything that could cause trouble.

I very vaguely recall that there used to be a very few PC games that worked as boot floppies and possibly didn't use DOS at all, but it was a rarity and Worms definitely wasn't one.

Induane 4 hours ago | parent | next [-]

I bet it wasn't actually the bootloader but something with autoexec.bat - you could setup choices in it and windows was just one launch option.

Xirdus 3 hours ago | parent [-]

Well, if you treat DOS as a bootloader for Windows 98 - which it was actually - then modifying autoexec.bat would count as setting up the bootloader.

Xirdus 3 hours ago | parent | prev [-]

No, I set it up. My parents were non-technical. I had a CD-ROM re-release of Worms for DOS from one gaming magazine or another. I guess the installer set it up somewhere somehow but I remember it wasn't easy to get it installed and there were further problems trying to launch it. It's possible the installer itself was a DOS program, not a Windows program.

Dwedit 4 hours ago | parent | prev [-]

It's a similar idea, but that's a DOS menu. At the point when the menu appears, MS-DOS 7.1 has already been loaded.

tetrisgm an hour ago | parent [-]

Stupid question but... would bundling the binary with an ASM port of something that could run this technically make it possible to run without the OS?

I realize this is basically doing docker for DOS games and incredibly stupid, I'm just curious about the thought experiment

Xirdus a minute ago | parent [-]

Well, the "ASM port of something that could run this" would be the OS...

queuebert 4 hours ago | parent | prev [-]

I would guess a modern BIOS chip is as powerful as an NES, right?

snazz 4 hours ago | parent | next [-]

You can do substantially more in UEFI than NES-level games. (See https://uefi.org/specs/UEFI/2.9_A/12_Protocols_Console_Suppo...)

fluoridation 4 hours ago | parent | prev [-]

What do you mean by "BIOS chip"? Like, the flash memory that stores the motherboard's firmware? I don't think that contains any processing elements.

sedatk 4 hours ago | parent [-]

BIOS can only manage VESA which is much much slower than the capabilities of a modern GPU, so they might have meant graphical performance in regards to that.

jasomill an hour ago | parent [-]

VESA BIOS Extensions support direct framebuffer access in protected mode, and I don't imagine the lack of accelerated 2D operations would be a practical bottleneck when implementing NES-style graphics on modern PCs.

UEFI GOP additionally supports accelerated bitblt, but again YAGNI for 2D game performance at reasonable framerates on a modern PC.

pjmlp 2 hours ago | parent | prev [-]

Welcome to Amiga games, in many cases the floppy would contain the boot loader that would directly jump into the game.

At least on the Amiga 500 you would not go through the trouble to start Workbench, only to load the game, unless you were a lucky owner of an external hard drive.

markus_zhang 2 hours ago | parent [-]

I recall many IBM-PC games are bootable games. I inserted a floppy , resets the computer, and then it directly boots into the game. The disk must contain a boot sector and drivers and such.

pjmlp an hour ago | parent [-]

As well, although I think in the Amiga this was more common, to buy games that were already prepared like this.

At least on my circle for doing the same with PC games, we built the floppies ourselves, then again, it could be a side effect that you could hardly buy any legal games in Portugal during those days, even regular shops would sell pirated games as originals.

alnwlsn 4 hours ago | parent | prev | next [-]

This is an especially funny screenshot as DosBOX itself is built on SDL.

flykespice 5 minutes ago | parent | next [-]

SDLception

theragra 3 hours ago | parent | prev [-]

Hm, then we need dosbox running in dos!

anthk 3 hours ago | parent | next [-]

Doable maybe with HXDOS.

aruametello 3 hours ago | parent | prev [-]

even better, windows running in dos.

oh wait...

(https://en.wikipedia.org/wiki/Windows_3.0)

jlokier 4 hours ago | parent | prev | next [-]

Perfect! I was just doing some Turbo C development inside DOSBox-X inside Debian GNU/Linux inside VMware Fusion inside macOS this morning.

vodou 3 hours ago | parent | next [-]

Was this a joke? I must know!

bpavuk 3 hours ago | parent | prev [-]

you may also enjoy watching Inception then :)

psychoslave 2 hours ago | parent [-]

Almost but usually I watch live stream of people watching records of people talking about how they remember about it.

vunderba 4 hours ago | parent | prev | next [-]

Awesome. I wonder how this would work with a 386+ targeted MS-DOS executable from FreeBASIC, which supports binding to SDL.

[1] - https://github.com/freebasic/fbc

klik99 an hour ago | parent | prev | next [-]

Awesome. Why? But awesome. There does not need to be a reason why

looneysquash 3 hours ago | parent | prev | next [-]

For a open source project like SDL is, for something like this, it's usually a matter of how invasive it is, and how likely the contributors seem to stick around and maintain it.

Different projects have different policies, and I don't know what SDLs is.

But they already have a lot of ports, so I trust they know what they're getting themselves into.

Dwedit 4 hours ago | parent | prev | next [-]

Technically this already worked with HXDOS, which emulated DirectDraw well enough that SDL could use it.

vintermann 2 hours ago | parent | prev | next [-]

SDL getting back to its Loki roots

whobre an hour ago | parent | prev | next [-]

Love it! Now, let's port it to CP/M (via GSX, maybe?)

shevy-java 3 hours ago | parent | prev | next [-]

Good - now we can play more DOS games again!

raverbashing 4 hours ago | parent | prev | next [-]

Well I guess Allegra was a bit old already /s

sedatk 3 hours ago | parent [-]

I loved Allegra! Saved me a lot of time when I was writing code for our musicdisk. That was 29 years ago though. :)

jan_Sate 4 hours ago | parent | prev [-]

Uhm... excuse me? Why? Is there anyone even using DOS for anything serious these days?

mrweasel 4 hours ago | parent | next [-]

Perhaps not serious, but I think people gravitate towards older systems these days because they are easier to conceptualize. It's not unrealistic for a single person to have a complete grasp of e.g. the C64 and it's programming environment. DOS is similarly constraint, but also easier for you to form a more or less complete mental model around.

Some people love computers and making them do weird stuff, older computers make certain tasks feel more manageable.

sedatk 4 hours ago | parent | prev | next [-]

Most computers in Turkey come with FreeDOS preinstalled because there's a law that states all computers must be sold with an operating system. FreeDOS turns out to be the cheapest and easiest.

That's why you don't let people who have never touched a computer write tech laws. You get results like this.

Dwedit 4 hours ago | parent | next [-]

The really weird case is where the computer isn't actually compatible with DOS, so they put in a locked-down Linux distro that emulates FreeDOS.

ronsor 4 hours ago | parent [-]

Wasn't it Dell or HP that did this? IIRC it was FreeDOS-on-QEMU-on-X11-on-Linux.

unleaded 4 hours ago | parent | prev | next [-]

Those types of laws aren't all that bad.. they got us this: https://segaretro.org/Dottori_Kun

rwmj an hour ago | parent | prev | next [-]

I wish that was the case where I live. I'm looking for a new laptop and the mainstream ones still come with the Windows Tax.

wk_end 4 hours ago | parent | prev [-]

Is there a reason they don't go with Ubuntu or something like that instead?

jordand 3 hours ago | parent | next [-]

Linux drivers and certification is a whole lot of extra work and complexity compared to FreeDOS. Years ago, Nettops were sold with FreeDOS where the components didn't support Linux that well.

prmoustache 4 hours ago | parent | prev [-]

I guess they don't want to get support's call. DOS looks like firmware for non techies.

wk_end 4 hours ago | parent | prev | next [-]

Who said anything about "serious"?

(FWIW: I suspect there are more than a few old industrial control systems and such out there that are still running DOS, just because of an "if it ain't broke, don't fix it" attitude)

kjs3 3 hours ago | parent [-]

My brother is in manufacturing. DOS is everywhere. Older things too (PDP-11? DG Nova? Seen both, semi-recently). Not just because "ain't broke, don't fix", but because when you have a cloth dying machine or brick forming machine you spent >US$5M for, that is often a bespoke install for your plant, you don't replace it because some guy who prolly slings Javascript all day sez "DOS is oooold, boomer".

ale42 6 minutes ago | parent [-]

Given the implications, I guess nobody is going to touch those setups to put an SDL-based program on them, though...

mikepurvis 4 hours ago | parent | prev | next [-]

Hacker News

gbin 4 hours ago | parent | prev | next [-]

The real question is "why not?" :)

spijdar 4 hours ago | parent [-]

I think this PR is awesome, and I can totally see myself playing around with this at some point. Being able to create DOS executables of SDL projects is just ... cool!

But I do wonder about the practicality. This would, I presume (never done DOS development, never touched a memory extender) only run on 386+ CPUs, and maybe more importantly, probably require a newer CPU than that to run anything non-trivial at acceptable performance. So I wonder how many "real DOS machines" this can practically target.

Still, it is massively cool.

kjs3 3 hours ago | parent | prev | next [-]

Because it's fun, at least for certain folks? Crazy, right?

queuebert 4 hours ago | parent | prev | next [-]

There used to be stock exchanges running happily on DOS. Maybe there still are.

chaps 4 hours ago | parent | next [-]

Worked at an exchange in 2007/2008 and... we had systems still running from the 80s. Mostly tape audit stuff.

BirAdam 3 hours ago | parent | prev [-]

Most use Linux now, and specifically RHEL. I did see some IBM z, but that was specifically for one old DB that handled oil pipeline stuff.

jordand 3 hours ago | parent | prev | next [-]

There's a lot of interesting projects and even innovation going on making new games for old PCs/consoles. James Lambert and Kaze are doing fantastic work in the N64 space as one example (watch their videos on Youtube)

benatkin 3 hours ago | parent | prev | next [-]

SDL is written in C. So it can support it without too much trouble. And some people are compiling stuff to run on DOS. So it makes sense. And your objection doesn't hold any water.

reaperducer 3 hours ago | parent | prev | next [-]

Uhm... excuse me? Why? Is there anyone even using DOS for anything serious these days?

Translation: "Stop liking things I don't like!"

spankibalt 3 hours ago | parent [-]

I suppose it's an issue of ignorance; even IT veterans often don't know that DOS was, and still is, the driver of many highly specialized industry applications, or an OS running the software of individuals as well as small business owners around the world.

alnwlsn 4 hours ago | parent | prev [-]

because you can