News for hackers. Stuff that matters.
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by Wowfunhappy on Saturday November 14, 2020 @01:09PM (#25094185)
I think fat/universal binary trickery might be able to do it?
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by duskwuff on Saturday November 14, 2020 @03:03PM (#25095159)
"Universal" Mach-O binaries are specific to the Mach-O binary format, which wasn't supported on classic Mac OS. (I'm not even sure that multiplatform executables were even supported by Mac OS X before 10.4 or so, when they started using them for Intel cross-compatibitility.)

"Fat" CFM/PEF binaries existed on classic Mac OS, but used a completely different mechanism that only supported 68k and PowerPC code. And if you wanted to support a Classic II, that rules out a Carbon application bundle too.

About the widest range I can imagine for a single executable is a hybrid CFM/PEF/Carbon executable, which might be able to run on anything from a classic 68k mac up to Mac OS 10.6 (through Rosetta).

Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by setpatchaddress on Saturday November 14, 2020 @04:30PM (#25095815)
For the specific request here (Classic II and current MacBook), you might be able to build an executable with Mach-O data fork and the 68k code in the resource fork. I’m not sure offhand how to make the bundle format work for current macOS, though.

But if you can make that work, you can also add classic PowerPC support, by jumping to it via a 68K CODE stub and perhaps from a separate PEF fragment stored in a section in the Mach-O that would be ignored on current macOS.

Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by icedchai on Saturday November 14, 2020 @03:37PM (#25095423)
I believe multi-platform executables date back to NeXTStep, which supported 68K/x86/Sparc/HPPA binaries.
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by Wowfunhappy on Saturday November 14, 2020 @03:57PM (#25095561)
...Perhaps we’re targeting the wrong product lines. I wonder if you could make a binary that runs across all OS X but also NextStep...
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by saagarjha on Saturday November 14, 2020 @05:35PM (#25096309)
Shameless self-promotion: https://github.com/saagarjha/dummy_thicc. That reminds me that I have left PRs for the NeXTSTEP slices hanging around for quite a while…
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by icedchai on Saturday November 14, 2020 @07:17PM (#25096902)
Neat. I have a NeXT Station Turbo (68040/33, I think?) and am tempted to try this out.
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by Wowfunhappy on Saturday November 14, 2020 @05:54PM (#25096440)
Oh, this is perfect! Thanks for sharing!
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by GrumpyNl on Saturday November 14, 2020 @01:49PM (#25094546)
Java?
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by Lammy on Saturday November 14, 2020 @02:43PM (#25095015)
Macintosh Runtime for Java up to version 1.5.1 requires an ‘030 and System 7.1, so that would be technically possible on a Classic Ⅱ. You would be limited to Java 1.0 API with no JIT, because MRJ 2.0 requires an ‘040 or PPC for that.
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by kzrdude on Saturday November 14, 2020 @02:57PM (#25095115)
<3 that you left the (Motorola) 68k implicit so that those not in the loop will have a hard time figuring out what is actually being discussed
Re:Universal DOOM – a single EXE for DOS 6, and Windows 95 t... by Lammy on Saturday November 14, 2020 @03:10PM (#25095223)
Hard to break old habits :)