Using a Sun Studio 11 built binary on Solaris 10 x86,
dosbox starts, but the mounting of drive letters does
not work.
Specifically, the two following commands are put in
.dosboxrc:
mount c /opt/games/data/DOS_oldgames
mount d /cdrom/cdrom0 -t cdrom -usecd 0 -ioctl
In dosbox, they are run, with no error displayed,
either from the .dosboxrc file or typed directly.
But then, when typing either c: or d:, I get the message:
Drive C does not exist!
You must mount it first. etc...
The exact same commands do work when built with GCC.
Any way to debug that?
Logged In: YES
user_id=1304940
MOUNT::Run might be a good place to start, see if the
localDrive object is created correctly.
Is the SunStudio compiler gcc-compatible?
Logged In: YES
user_id=1447460
Thanks for the pointer, I'll try to look at that class, I
hope I know enough of C and Java to do some C++ debugging!
At least I can add a few perror(), I guess.
As for compatibility, I was surprised to discover that yes,
it's gcc-compatible. Whatever that means, since I was not
aware that GCC had any kind of standardization, or even
compatibility to itself between versions :-)
"Multi-platform support, compatible with gcc, Visual C++,
C99, OpenMP, and Fortran 2003."
http://developers.sun.com/sunstudio/index.jsp
Logged In: YES
user_id=1304940
That statement is just about their ide (assuming you don't
use gcc with the ide), not the special sparc compiler.
A compiler being compatible with gcc and visualc++ would
be contradiction.
I'm not sure how far you'd get with a non-gcc compatible
compiler, there might be several places (OS access, libs)
where the compiler differences matter.
Logged In: YES
user_id=1447460
Compatibility issues I know about is a binary
incompatibility with C++ (not possible to link Studio-built
C++ libs to GCC objects, and the other way around).
But here, the libs are in C, so it should be ok.
I'm tracking down the problem, but I'm a bit confused by all
the pointers and wrappers to functions.
Anyway, I can say for sure that, for some reason,
PROGRAMS_Handler() is not called when built with Studio.
Virtual_Drive::FileOpen() is.
I'm trying to understand what is between them.
Logged In: YES
user_id=535630
Programs_handler is the callback code. It gives some pointer
on where it goes wrong.
(it elimates a lot of code afterwards).
It basicly means that the C++ code of mount isn't run.
Now we need to detect wether mount itself is run inside the
emulator.
Try checking: src/dos/dos_execute.cpp:DOS_Execute to see
wether mount is actually being executed (this isn't running
though).
It's probably easiest to add logging message to there.