logoalt Hacker News

SDL Now Supports DOS

260 pointsby Jayschwayesterday at 4:20 PM105 commentsview on HN

Comments

ronsoryesterday at 5:12 PM

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

show 6 replies
alnwlsnyesterday at 5:28 PM

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

show 2 replies
theamktoday at 6:15 AM

Note 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.

vunderbayesterday at 5:49 PM

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

show 1 reply
jlokieryesterday at 5:58 PM

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

show 3 replies
Dwedityesterday at 5:38 PM

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

show 1 reply
looneysquashyesterday at 6:55 PM

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.

vintermannyesterday at 7:32 PM

SDL getting back to its Loki roots

klik99yesterday at 8:41 PM

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

show 3 replies
qseratoday at 4:00 AM

Awesome! This makes me really happy.

DeathArrowtoday at 7:42 AM

>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.

flykespiceyesterday at 9:45 PM

I'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.

show 1 reply
cmxchyesterday at 11:29 PM

Wait, it didn’t already or am I confusing it with the VESA support on Linux?

show 1 reply
TacticalCoderyesterday at 11:06 PM

> 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!

whobreyesterday at 8:19 PM

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

shevy-javayesterday at 6:40 PM

Good - now we can play more DOS games again!

raverbashingyesterday at 5:15 PM

Well I guess Allegra was a bit old already /s

show 1 reply
jan_Sateyesterday at 5:17 PM

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

show 14 replies