Post by Paul S. PersonMy trusty XP machine finally died after 11 years and 8 months of
faithful service (the symptoms suggest that the motherboard failed),
so I replaced it with a new computer, which runs Windows 8.1. 64-bit
Windows 8.1.
I have, in the past, recommended DosBox and, indeed, after installing
D-Fend Reloaded (which includes the current DosBox in its download), I
managed to get a DOS program to run (not anything relevant here, but
not a game either).
Does anyone have any experience using DosBox in the build process? I
know I am working on the 32-bit version of wgml, and I still plan to
get to gendev after that, but it may be a while yet. Have any
environment variables been added to the setup files for the
development environment to accomodate 64-bit machines?
DosBox apparently functions by reading an initialization file. This
suggests that it can be finessed just as wgml is finessed: by copying
a standard configuration file and appending the lines needed to run
wgml with a particular set of parameters. Has anyone tried this?
Hi Paul,
I took a short survey and found a msg sent to you on 2011-06-26 23:40:38.
Here is the main content:
Don't know if someone else did it too, however I tried it a year ago with
dosbox0.74. Had to make some (small) changes to dosbox regarding error
code return (originally 0) and splash screen removal (it was a nuisance).
I'm not sure if the return code problem was because dosbox was designed
mostly for games or for a "business" reason. The guys who wrote dosbox
don't seem to like the use of dosbox as a full emulator for business
purposes (that's my interpretation of some comments regarding the splash
screen), however cannot really do something about it because of GPL
freedom.
It worked in principle, but it took sooome time to compile the wgml stuff.
If I remember correctly it was at least a factor of 3 or 4 to a native
compile under 32 bit.
It was necessary to rework some of the makefiles a bit too, because I didn't
found a way to start dosbox on behalf of windows error 216. This would be
the cleanest way I think to transparently support the emulation. If windows
detects the 16 bit exe it should call a replacement 32 bit dosbox hull exe
(or a shell script). Some support seems to exist in Win7 for special things
like setup.exe but nothing worked for me with this dosbox setup. I hadn't
that much time so I left it alone.
One other problem surfaced. There are 16 bit tests for the 16 bit compiler.
To make it fully work (all of OW) you would have to support the emulation
for them too. This may require some bigger changes to the makefiles, if
transparent emulation isn't possible.
---------------------------------------------------------------
So far I can see I made the following 3 changes (CHG:) to DosBox itself and
compiled it with VisualC.
---------------------------------------------------------------
DosBox 0.74 src/gui/sdlmain.cpp
*** sdlmain.cpp.old
--- sdlmain.cpp
**************
*** 1171,1175
/* Please leave the Splash screen stuff in working order in DOSBox. We
spend a lot of time making DOSBox. */
! SDL_Surface* splash_surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 640,
400, 32, rmask, gmask, bmask, 0);
if (splash_surf) {
SDL_FillRect(splash_surf, NULL,
SDL_MapRGB(splash_surf->format, 0, 0, 0));
--- 1171,1178 -----
/* Please leave the Splash screen stuff in working order in DOSBox. We
spend a lot of time making DOSBox. */
! /*CHG: Sorry, we do appreciate your excellent work.
! But for compiling OpenWatcom this is a no go. */
! // SDL_Surface* splash_surf = SDL_CreateRGBSurface(SDL_SWSURFACE,
640, 400, 32, rmask, gmask, bmask, 0);
! SDL_Surface* splash_surf = NULL;
if (splash_surf) {
SDL_FillRect(splash_surf, NULL,
SDL_MapRGB(splash_surf->format, 0, 0, 0));
**************
*** 1526,1530
bool textonly = true;
#ifdef WIN32
! textonly = false;
if ( !sdl.inited && SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) <
0 ) textonly = true;
sdl.inited = true;
--- 1529,1534 -----
bool textonly = true;
#ifdef WIN32
! /*CHG:*/
! // textonly = false;
if ( !sdl.inited && SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)
< 0 ) textonly = true;
sdl.inited = true;
**************
*** 1897,1901
SDL_Quit();//Let's hope sdl will quit as well when it catches an
exception
! return 0;
}
--- 1901,1909 -----
SDL_Quit();//Let's hope sdl will quit as well when it catches an
exception
!
! /*CHG:*/
! /* Read the error code from DOS */
! return(dos.return_code);
! // return 0;
}
-------------------------------------------------------------------
I don't see anymore (w/o using additional time) what I had to change in the
makefiles, there were more than one version I experimented with. I can only
say it was working in principle but not the nicest experience overall
(needed some hours in dosbox on a 3GHz K10 machine).
If you find a way to intercept the above mentioned win error 216 (with some
self-written windows driver maybe) then it may be possible to start dosbox
with the given exe and command line w/o needing any changes to makefiles.
This solution should even work with any tests of other compiled 16bit
executables.
What I did 4 years ago were only some tests. I didn't compile OWatcom
regularly and only seldom use the compiler itself today so probably cannot
offer much more help.
My recommendation for your special case after my experience is the
following:
Install a VM-Manager like <https://www.virtualbox.org/>.
Make a VM with your WinXP and use this for compiling OWatcom. This should be
the easier way for the time being.
Uwe