VOGONS


First post, by digger

User metadata
Rank Oldbie
Rank
Oldbie

The source code of 386MAX, an alternative to EMM386 and QEMM, has been released under the GPLv3 license.

Back in the DOS days, 386MAX was sold by Qualitas.

386MAX supports GEMMIS, which allows Windows 3.x to launch from DOS in 386 Enhanced Mode, even when the EMM manager is loaded.

Also, it supports the same INT 2fh I/O port trapping API as that of Microsoft's EMM386. Emulation TSRs that depend on that API, such as SoftMPU, should therefore (at least in theory) be able to work with 386MAX as well.

The source code can be found here: https://github.com/sudleyplace/386MAX

Reply 1 of 9, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

Last time I checked, the JEMM included in FreeDOS lacked GEMMIS support.
Hopefully the code from 386MAX can be used to add that support to JEMM.
Alternatively, completely replace JEMM with 386MAX...

Reply 2 of 9, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

if the source is anything like the other projects released ages ago, QLink and DPMIOne, the code is terrible to read and build.

--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--

Reply 3 of 9, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Maybe that's why it was good? 😉
Terrible spaghetti code is the most efficient sometimes..

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 9, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++
Jo22 wrote on 2022-07-02, 00:39:

Maybe that's why it was good? 😉
Terrible spaghetti code is the most efficient sometimes..

That really only should apply when the language or compiler doesn't support certain things like inlining a code block.

Because if you can inline or even call functions without having to pass any parameters (global variables), then spaghetti code should not be used... Aka, manual jumps to other blocks of code.

And if you are using a language that can use jump tables you are doing even better because directly mapping to a function via an array of functions instead of using case or nested if statements is pretty much the fastest way.

Manually optimizing the assembly code after that is about the only way to make the compiled code any faster IF the code is already the most efficient way to do things.

Yamaha YMF modified setupds and drivers
Yamaha XG resource repository - updated November 27, 2018
Yamaha YMF7x4 Guide
AW744L II - YMF744 - AOpen Cobra Sound Card - Install SB-Link Header

Reply 5 of 9, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie

It looks like there are binaries under DISK/TMPOUT and LIB, and that those would now be presumably freely redistributable, so that's neat.

Glancing at it, there is something about a custom C runtime library (qlib) that doesn't appear to be here so the C-based components may not be buildable.

When there is an idiosyncratic build system like this with lots of batch files, makefiles, paths hardcoded, etc., the easiest way to understand it could actually be to parse the MAP files and load up the binaries in something like IDA.

Reply 6 of 9, by doshea

User metadata
Rank Member
Rank
Member
jakethompson1 wrote on 2022-07-02, 23:41:

Glancing at it, there is something about a custom C runtime library (qlib) that doesn't appear to be here so the C-based components may not be buildable.

I can't find anything about qlib in the tree in commit 1edc33c, did you misread "qlink" (from the same author) or am I missing something?

Anyway thanks for letting us know digger!

Also, some trivia: this was included with Microsoft C/C++ 7.0; http://www.emsps.com/oldtools/mscppv.htm says it was version 6.02 that was included.

Reply 7 of 9, by CraigAB69

User metadata
Rank Newbie
Rank
Newbie

Ha, the last couple of days I have been messing around with 386MAX.

It appears to use low-level calls to the RAM and to get the disk geometry.
386MAX.sys will sometimes crash the VM on Arch Linux host (Virtualbox "Guru meditation", VMware hangs, QEMU/KVM seems to pause?) and QCache will complain if the disk is larger than 2Gb (maybe int21, 1ch?).
I need to find an old disk, I think I have one but not the laptop version. It seems that the laptop 2Gb drives are getting rare.

It will be nice to look at the code, but to be honest, it's probably beyond me at the moment.

“Wyrd bið ful āræd. Fate is inexorable.”

Reply 8 of 9, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
doshea wrote on 2022-07-03, 07:44:
jakethompson1 wrote on 2022-07-02, 23:41:

Glancing at it, there is something about a custom C runtime library (qlib) that doesn't appear to be here so the C-based components may not be buildable.

I can't find anything about qlib in the tree in commit 1edc33c, did you misread "qlink" (from the same author) or am I missing something?

sorry, it's QDISP. from MAX.MAK as well as some of the others:

# Needed only for C runtime (shared between projects)
!if "$(CATROOT)" == ""
!error CATROOT is not defined. Ex: SET CATROOT=c:\qdisp\
!endif

Reply 9 of 9, by crazii

User metadata
Rank Member
Rank
Member

Talk about good timing. I searched web just now and found this, just open sourced few days ago. 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD