Commit Graph
22 Commits
Author SHA1 Message Date
Ryan C. Gordon 6821de5ed7 Automate handling of support code for OS/2 binaries.
Now a perl script parses our headers and generates glue code, export tables,
etc. This automates all the macro nonsense and bridge code, and separates
out all the stuff you need for binary compat with OS/2, so you can remove it
all from the build if you want to just build native libraries that supply
the OS/2 API to native apps (like Winelib vs Wine).

This makes upkeep details less nasty, and easier to build native binaries
when implementing and improving APIs, so you can debug directly without
a lot of drama.
2018-02-27 03:25:21 -05:00
Ryan C. Gordon dcf40e843b Added header comments to everything. 2018-02-26 12:54:16 -05:00
Ryan C. Gordon cec77df5d6 Implemented DosSetFileSize().
Info-ZIP's unzip for OS/2 can now unpack .zip files!  :)
2018-01-20 02:03:35 -05:00
Ryan C. Gordon 40b9b9e141 Filled in enough of tcpip32 and doscalls to run OS/2's TCPIP/bin/FTP.EXE.
It crashes right after a completed download, but otherwise seems to
fully work!
2018-01-04 02:50:26 -05:00
Ryan C. Gordon 20d2bfa3ff Split out OS2EXPORT from OS2API.
Otherwise, "SomeObj * OS2API FunctionName()" won't work.
2017-12-20 18:31:48 -05:00
Ryan C. Gordon ceb7900db7 Implemented DosCloseMutexSem().
This gets PhysicsFS's test_physfs.exe to run (although it's still broken in
other ways).
2017-09-14 23:51:04 -04:00
Ryan C. Gordon c4d2d5ee15 Some initial VIOCALLS support via ncurses, other 16-bit updates. 2016-10-29 02:05:01 -04:00
Ryan C. Gordon 2481f59a28 Bunch of work on getting java.exe to start up. Not there yet.
Lots of fixes, improvements, and a few more APIs implemented.
2016-10-27 03:20:02 -04:00
Ryan C. Gordon 26a52988a6 16-bit support!
This gets us everything we need (I hope!) to support 16-bit code in LX
binaries and call into 16-bit OS/2 APIs. This is just enough to call
into VioGetMode() (which isn't otherwise implemented yet) as an example.

If this is ever used Winelib-style to provide an OS/2 API to native Linux
binaries, the 16-bit system APIs are 32-bit clean and C callable, as one
might expect them to be. All the tapdancing is to support existing LX
binaries in the loader and bridge between the 32-bit clean APIs and
existing 16-bit code that expects to call 16-bit APIs.

This was a staggering amount of effort, but yay!

Other fixes and improvements probably leaked into this commit, as a
lot of code got touched and a lot of research and debugging took place.
2016-10-27 01:44:26 -04:00
Ryan C. Gordon 29696db8b3 Implemented Thread Local Storage support.
This is still rough, but the basic idea seems to work!
2016-10-19 03:21:15 -04:00
Ryan C. Gordon 1c1e6de400 Implemented DosQueryAppType(). 2016-10-17 15:44:47 -04:00
Ryan C. Gordon e011e5cec1 Implemented more APIs; a little further into Watcom C's wcc386.exe now... 2016-10-17 10:56:50 -04:00
Ryan C. Gordon dc00a7e998 Implemented more APIs. Watcom C's "wasm.exe" works now. 2016-10-17 02:35:39 -04:00
Ryan C. Gordon 544033f2ae Some APIs that Watcom's wasm.exe needs to start up. 2016-10-15 22:08:00 -04:00
Ryan C. Gordon 0349122bd7 Bunch More Work: more APIs, subprocesses, multithreading.
EMX's GCC compiler can now build hello.c when run from lx_loader!
2016-10-14 02:39:17 -04:00
Ryan C. Gordon b4d0e571e7 Implemented some file i/o APIs and stubbed some threading primitives.
Now EMX's build of cpp.exe (GNU's C preprocessor) runs on Linux...granted,
it picks up the Linux /usr/include headers, but this is still a triumph!
2016-10-09 13:45:58 -04:00
Ryan C. Gordon 086e05dd0c DosFlatToSel() is called like any other OS/2 API.
I must have been reading docs for device drivers, or something...?

Now it returns the top word of the linear pointer, in hopes that this will
just get mushed back together later, knock on wood.
2016-10-09 13:44:10 -04:00
Ryan C. Gordon ccad3a0dbb Hooked up the FS register and TIB support. 2016-10-08 16:34:59 -04:00
Ryan C. Gordon 262b428f51 Implemented DosGetDateTime() and DosOpen(). 2016-10-06 15:56:20 -04:00
Ryan C. Gordon 71653286cd Implemented some more APIs.
This is enough to survive emx.dll intialization and a printf("hello world")
mainline, but note that we need to properly implement DosQueryHType()
before EMX's printf() will work, though (as it currently thinks stdout isn't
open), so we're not quite through a proper C Hello World test yet.
2016-10-02 18:26:27 -04:00
Ryan C. Gordon f681be1b1f Reworked the native module loading code. 2016-10-02 18:18:31 -04:00
Ryan C. Gordon bee2afe62b Bunch More Work, mostly cleanup and organization.
Wanted to do this now before it gets out of hand.

Ideally, this can be used for a Winelib-like option eventually, too, where you
don't load OS/2 binaries at all but rather compile and link your OS/2-based
source code against this API reimplementation.
2016-09-30 15:58:48 -04:00