Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Rugxulo

Homepage

Usono,
12.05.2026, 16:05
 

SDL 3 officially adds DOS (DJGPP) support (Developers)

SDL 3 for DOS (DJGPP) is now officially supported.

* https://github.com/libsdl-org/SDL/pull/15377

What's supported

* Video: VGA and VESA 1.2+ framebuffer, RGB, and 8-bit indexed color with VGA DAC palette programming, hardware page-flipping with vsync, VBE state save/restore on exit
* Audio: Sound Blaster 16 (16-bit stereo, up to 44.1 kHz), Sound Blaster Pro (8-bit stereo, up to
2kHz), Sound Blaster 2.0/1.x (8-bit mono), all via IRQ-driven DMA with double-buffered auto-init
* Input: PS/2 keyboard with extended scancodes (0xE0 prefix), INT 33h mouse with queried sensitivity, gameport joystick via BIOS INT 15h with auto-calibration
* Threading: Cooperative scheduler using setjmp/longjmp with stack patching. Real mutexes, semaphores, TLS, and condition variables (generic fallback). Yield points in the event pump and delay functions keep audio and other threads responsive.
* Timer: Native PIT-based timer using DJGPP's uclock() at ~1.19 MHz resolution
* Filesystem: GetBasePath / GetPrefPath via DJGPP's searchpath(), POSIX filesystem ops fallback
* Build: CMake cross-compilation toolchain file, DJGPP CI job, preseed cache for faster configure

What's NOT included

* Audio recording playback only
* SDL_TIME native implementation reuses Unix gettimeofday via DJGPP's POSIX layer (works fine)
* Shared library loading support (no SDL_LoadObject).

RayeR

Homepage

CZ,
12.05.2026, 17:37
(edited by RayeR, 13.05.2026, 18:56)

@ Rugxulo

SDL 3 officially adds DOS (DJGPP) support

Interesting. It happens not very often that a DOS target is added as new to a project. Mostly DOS targets are removed as obsolete...
Do they use some better/fixed/usable pthreads or some proprietary code?

Seems it requires Cmake for compiling DOS target, something that I don't want to touch even by 2m rod... :P

---
DOS gives me freedom to unlimited HW access.

Zyzzle

13.05.2026, 00:30
(edited by Rugxulo, 14.05.2026, 22:44)

@ Rugxulo

SDL 3 officially adds DOS (DJGPP) support

Great news. Hopefully, this means a lot of DOS ports of old SDL games will be forthcoming. Perhaps even some new SDL games will be coded entirely for DOS.

This is a way to make great use of those "powerful" modern systems on baremetal. I knew there would come a day when modern DOS systems would be put to their best use...

Rugxulo

Homepage

Usono,
14.05.2026, 22:45

@ Zyzzle

SDL 3 officially adds DOS (DJGPP) support

Finally ... the year of the DOS desktop. :-D

Laaca

Homepage

Czech republic,
15.05.2026, 06:17

@ Rugxulo

SDL 3 officially adds DOS (DJGPP) support

> Finally ... the year of the DOS desktop. :-D

Hm, yes, I can see on GitHub the DOS specific files here
And the website claims that is se the build process (via CMAKE) for DOS. IT seems that it supports not only static libraries but also dynemic DX3 modules.
But I no not see any precompiled libraries (either in .A format either in DXE format) so it is not prepared (at least for me) for wide testing.

---
DOS-u-akbar!

tkchia

Homepage

15.05.2026, 11:43

@ Rugxulo

SDL 3 officially adds DOS (DJGPP) support

Hmm... what is it with the renewed interest lately in running stuff on MS-DOS? Of course I am not totally opposed to it, but I still find it rather weird.

---
https://codeberg.org/tkchia · https://disroot.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"

bocke

16.05.2026, 00:41

@ tkchia

SDL 3 officially adds DOS (DJGPP) support

> Hmm... what is it with the renewed interest lately in running stuff on
> MS-DOS? Of course I am not totally opposed to it, but I still find it
> rather weird.

I guess for today's kids that never had access to a DOS computer, it is something interesting and retro, which makes it cool.

Also, retro hardware builds and emulation got popular. DOS is quite accessible retro platform as there is a lot of software for it. And Windows is often just one command away (For 16-bit Windows anyway).

Increased social media coverage too. And some retro programming interest.

Sure, this all existed in the past, but it slowly accumulated to this point. Kinda like rainwater. :-)

Zyzzle

16.05.2026, 03:32

@ tkchia

SDL 3 officially adds DOS (DJGPP) support

> Hmm... what is it with the renewed interest lately in running stuff on
> MS-DOS? Of course I am not totally opposed to it, but I still find it
> rather weird.

Full control on a hardware level of the system. No walled gardens and no artificial limitations and / or enforced paywalls.

Rugxulo

Homepage

Usono,
16.05.2026, 05:27

@ Laaca

SDL 3 officially adds DOS (DJGPP) support

> Hm, yes, I can see on GitHub the DOS specific files
> here
> And the website claims that is se the build process (via CMAKE) for DOS. IT
> seems that it supports not only static libraries but also dynemic DX3
> modules.
> But I no not see any precompiled libraries (either in .A format either in
> DXE format) so it is not prepared (at least for me) for wide testing.

From what I read, DXE would only possibly be supported later.

It's only cross-compiled right now, last I heard.

RayeR

Homepage

CZ,
18.05.2026, 22:03
(edited by RayeR, 20.05.2026, 18:06)

@ RayeR

SDL 3 officially adds DOS (DJGPP) support - binary build

Well, I know why I hate that crap...
1st followed the wiki page:
https://wiki.libsdl.org/SDL3/README-dos
Indeed the 1st command failed because default CMAKE tries to use MSVC (cl) for some internal stuff. As I have only MinGW installed I had to setup a kludge (1st add mingw32 to path then add djgpp crosscompiler to the path) and modify the 1st command to:
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=build-scripts/i586-pc-msdosdjgpp.cmake

then it finally built without any error. It created static lib libSDL3.a and bunch of test programs. As I'm just sitting at Win11 PC I can test only via Dosbox-X. I tried some random, most of them works, including SB sound test, except qsort.exe that crashes. And obviously GL and Vulkan stuff doesn't work.

Download here: http://sourceforge.net/projects/ffmpeg-x264-dos/files

UPDATE: qsort.exe under plain DOS finished OK, so it's some Dosbox-X bug. BTW SDL DOS port use __djgpp_nearptr_enable so it cannot run in NTVDM (no fallback to banked modes)...

---
DOS gives me freedom to unlimited HW access.

Back to the board
Thread view  Mix view  Order
23397 Postings in 2207 Threads, 406 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum