12 ms·
SDL Now Supports DOS
- jlokier 5mo agoPerfect! I was just doing some Turbo C development inside DOSBox-X inside Debian GNU/Linux inside VMware Fusion inside macOS this morning.
- bpavuk 5mo agoyou may also enjoy watching Inception then :)
- psychoslave 5mo agoAlmost but usually I watch live stream of people watching records of people talking about how they remember about it.
- vodou 5mo agoWas this a joke? I must know!
- jlokier 5mo agoIt was true! I really do have Turbo C, Unix V7 C and Sun C compilers in my CI workflow, alongside modern GCC for C23 and C++26, Clang, MSVC, Fil-C and Tinycc and others.
- mayama 5mo agoIs there a turboc variant for linux, I vaguely remember working on turboc decades ago
- ronsor 5mo agoAll that's left now is SDL for UEFI, and then all our games can run in a pre-OS environment.
- chaps 5mo agoThat honestly sounds amazing. Imagine booting into something like a grub menu that's just a list of classic games.
- queuebert 5mo agoI would guess a modern BIOS chip is as powerful as an NES, right?
- fluoridation 5mo agoWhat 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 5mo agoBIOS 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 5mo agoVESA 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.
- snazz 5mo agoYou can do substantially more in UEFI than NES-level games. (See https://uefi.org/specs/UEFI/2.9_A/12_Protocols_Console_Support.html#graphics-output-protocol https://uefi.org/specs/UEFI/2.9_A/12_Protocols_Console_Suppo...)
- Xirdus 5mo ago
- raverbashing 5mo agoWell I guess Allegra was a bit old already /s
- sedatk 5mo agoI loved Allegra! Saved me a lot of time when I was writing code for our musicdisk. That was 29 years ago though. :)
- jan_Sate 5mo agoUhm... excuse me? Why? Is there anyone even using DOS for anything serious these days?
- benatkin 5mo agoSDL 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.
- zzo38computer 5mo agoThere are several reasons. One possible reason is, if you do not need the functions of other operating systems, then DOS will be much simpler.
- wk_end 5mo agoWho 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 5mo agoMy 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".
- alnwlsn 5mo agoThis is an especially funny screenshot as DosBOX itself is built on SDL.
- theragra 5mo agoHm, then we need dosbox running in dos!
- aruametello 5mo agoeven better, windows running in dos. oh wait... (https://en.wikipedia.org/wiki/Windows_3.0 https://en.wikipedia.org/wiki/Windows_3.0)
- anthk 5mo agoDoable maybe with HXDOS.
- 1313ed01 5mo agoDOSBox-X has DOS as one of its supported host platforms (using HX-DOS that a sibling comment mentioned): https://github.com/joncampbell123/dosbox-x#dosbox-x-supported-platforms-and-releases https://github.com/joncampbell123/dosbox-x#dosbox-x-supporte...
- flykespice 5mo agoSDLception
- deleted 5mo ago[deleted]
- Dwedit 5mo agoTechnically this already worked with HXDOS, which emulated DirectDraw well enough that SDL could use it.
- suprjami 5mo agoWait what. What SDL would you compile for? Win32 with exclusive fullscreen? With a VESA resolution like 640x480?
- vunderba 5mo agoAwesome. 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 https://github.com/freebasic/fbc
- versteegen 5mo agoI'm going to find out. I've been meaning for years to port the OHRRPGCE back to DOS, where it came from. I'm very surprised to see SDL3 re-gain DOS support, since they've aggressively dropped support for almost every port/OS they had in the SDL 1.2 days.
- vunderba 5mo agoVery cool. I'd never heard of OHRRPGCE (Official Hamster Republic Role Playing Game Construction Engine) before. I was going to say it feels like an early predecessor to something like RPG Maker but I think RPG Maker originally came out in the early ’90s for the Japanese PC-98 computers. From the wikipedia entry [1] for OHRRPGCE > It runs at an 8-bit color depth, by default creates games that run at a 320 × 200 resolution. It's funny but I bet anyone else in here who also grew up with the QBASIC interpreter as a kid instantly thinks SCREEN 13 when they read something like this. [1] - https://en.wikipedia.org/wiki/Official_Hamster_Republic_Role_Playing_Game_Construction_Engine https://en.wikipedia.org/wiki/Official_Hamster_Republic_Role...
- versteegen 5mo ago:) SCREEN 13 (VGA Mode 13h) is almost correct, but actually it originally used a 320x200 VGA Mode X assembly graphics library. I believe 320x200 instead of 320x240 to be compatible with earlier pure-QB code for SCREEN 13 reused in the engine. (Mode X isn't a single mode, it has some adjustable parameters.)
- shevy-java 5mo agoGood - now we can play more DOS games again!
- looneysquash 5mo agoFor 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.
- somat 5mo agoThese obscure architectures are almost always one person with a dream, one hero willing to step up make it happen and maintain it. My favorite is the openbsd luna88k https://www.openbsd.org/luna88k.html https://www.openbsd.org/luna88k.html I don't have any real clue how many openbsd luna 88k users there are in the wild, it was an obscure machine released, I think, only in japan, so most users, if they exist, are probably japanese, that is, out of my normal view scope. So as far as I can tell there is one user, the porter. But every release a couple weeks after the standard release date he comes out of the woods and drops the luna88k files and packages. I suspect it takes that long to compile on an actual luna88k. But that is all it takes and luna88k is an official hardware platform of openbsd. I don't have nor do I really want a luna88k but that guy is sort of my hero for keeping it going like this.
- vintermann 5mo agoSDL getting back to its Loki roots
- whobre 5mo agoLove it! Now, let's port it to CP/M (via GSX, maybe?)
- klik99 5mo agoAwesome. Why? But awesome. There does not need to be a reason why
- krapp 5mo agoSDL is a cross-platform multimedia library, and DOS is a platform.
- ashleyn 5mo agoFreeDOS is technically a modern, actively-supported DOS.
- suprjami 5mo agoWith the ease and speed of browser-based DOSBox (look at internet archive), DOS becomes a highly portable target for small games and even non-trivial games. Anything up to the complexity of mid-90s AAA titles can run practically anywhere with a keyboard and mouse. Games like Tomb Raider, Command & Conquer, Quake, etc. This is pretty compelling if you want a "it just works" platform. Having SDL now makes that even easier.
- Pay08 5mo agoSo I can play Dota 2 on DOS.
- deleted 5mo ago[deleted]
- flykespice 5mo agoI'm more impressed by the fact they accepted it upstream, specially for an OS target that is long gone from the market and has virtually no users. Usually upstream projects would reject such PRs under the reason they just increase maintenance cost with little to no benefit to the userbase.
- tom_ 5mo agoLooks like one of the main contributors to the PR is one of the SDL maintainers. That probably helps!
- TacticalCoder 5mo ago> Input: ... gameport joystick via BIOS INT 15h with auto-calibration Joystick calibration: what a blast from the past! Blast from the past I encountered recently... Joysticks had to be "calibrated" and it was something you had to do for each game that supported joysticks. These would give back analog values and they'd depend on the phases of the moon or the room temperature or both. I'm not making this up: this was a serious pain point both for players and coders. FWIW in that DOS game of mine from 1991 or so for which I still had the .ASM source code files (about 30 000 lines of assembly code, 15 000 of which were auto-generated code to do very fast sprites drawing in the VGA 320x200 "tweaked" mode) and which I managed, at long last, to get to compile again a few days ago thanks to UASM (and quite some LLM help), I found lines like these: ul_corner_ch: db 63,"PUT YOUR JOYSTICK IN THE UPPER LEFT CORNER AND PRESS A BUTTON " lr_corner_ch: db 63,"PUT YOUR JOYSTICK IN THE LOWER RIGHT CORNER AND PRESS A BUTTON " p1_choose: dw 1 ;1 keyboard 2 joystick p2_choose: dw 0 ;0 none 1 keyboard 2 joystick And basically a 350 lines assembly file only for joystick calibration. So you can understand that "auto-calibration" as in TFA is quite a selling point!
- cmxch 5mo agoWait, it didn’t already or am I confusing it with the VESA support on Linux?
- suprjami 5mo agoSDL has never supported DOS. You might be thinking of Allegro? https://github.com/superjamie/allegro-4.2.3.1-xc https://github.com/superjamie/allegro-4.2.3.1-xc
- qsera 5mo agoAwesome! This makes me really happy.
- theamk 5mo agoNote this uses DJGPP, which switches processor to 32 bit mode via DPMI. You won't get old-school experience of segmented memory, near pointers and 64KB limits everywhere.
- DeathArrow 5mo ago>Timer: Native PIT-based timer using DJGPP's uclock() I want to commend Dj Delorie for doing a great job. As a poor child at that time having access to a proper compiler which could ran on my old PC which only ran DOS, was awesome and amazing.
- tempodox 5mo agoIf you have to do Microslop, then DOS is a sane option. Windows 11 is just too bloated and too slow in addition to being malware.
- oso2k 5mo agoI remember way back when, there were ports of SDL 1.x to djgpp. Glad to see someone still cares.
- 1313ed01 5mo agoFor making DOS games, there is also an old port of Löve2D. Löve2D normally uses SDL, but the DOS port has its own little (mode 13h VGA) graphics/audio/input library instead. Guess with a proper SDL port it might be possible to make a more complete port of Löve 2D (and of a newer version). https://github.com/SuperIlu/lovedos https://github.com/SuperIlu/lovedos The original upstream version is archived and has not been maintained in 9+ years. The link is to a fork that has fixes as recent as 2025.