joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.81k stars 383 forks source link

Porting to non-SDL2 platforms #5162

Open IoIxD opened 3 months ago

IoIxD commented 3 months ago

Question

I'm interested in porting this to Classic Mac OS, the version that, in 2001, was replaced with a more unix-like Mac OS. Why? Because it's funny, and judging by the fact that a Nokia N-Gage port exists in the source I don't think there's much disagreement to be had here.

The problem is that I don't have SDL2. I have SDL1.2, but it's broken in many bizarre ways. I do have GLUT, and more importantly, I do have Retro68, a modern C/C++ compiler.

I was wondering if somebody who works on the code could tell me how integrated SDL is into the code and how hard it would be to make an alternate port to GLUT, which would handle everything that SDL can do except for sound (which I'm currently trying to find out myself how to do)

Have you checked that no similar question(s) exist?

Code of Conduct & Contributing Guidelines

Torinde commented 3 months ago

Most DOSbox-X builds have both SDL1 and SDL2 versions. Some (like the 9x build #4612) have only SDL1. So, I would assume you can make Classic MacOS SDL1 build in a similar way.

IoIxD commented 3 months ago

Problem with that: SDL1 on Mac OS 9 appears to be completely broken and unstable. I may do digging and find a less broken version, but that may prove difficult.

joncampbell123 commented 3 months ago

You might have to do some fixup work for SDL1. Not only is it broken and unstable according to @IoIxD but the version used by DOSBox-X is heavily modified from the original SDL1 source code as well.

However since SDL1 is not stock SDL1 there's no reason you couldn't work directly on the DOSBox-X source tree version to fix it up without having to bother with the SDL project.

IoIxD commented 3 months ago

The version used by DOSBox-X is heavily modified from the original SDL1 source code as well.

How modified, exactly, and in what way? Hearing that SDL1 is in the source is actually good because it means that I can just use the modern Retro68 compiler instead of CodeWarrior or MPW, which would rule out any of those compilers messing up.