First post, by Greyhawk
*Win32 build*
UPDATE and summary
- Found the ioctl bug, and provided solution in 3rd post.
- No solution to SDL found, since SDL doesn't have API for CD data reading, which is required to bypass protection.
END UPDATE
Well I wanted to play Might and Magic: World of Xeen(from RPG collections set), but it said that I had to take out the audio CD and put it the World of Xeen CD in.
I'm a programmer, and even done a NES emulator(unreleased), so I thought I'd look into. After getting the HEAD version, and getting it to compile in debug I started. (Using SDL 1.2.6, SDL net 1.2.5, zlib-1.1.4, and lpng125) (Built under MSVC .net 2003)
What I found out through debugging and research into mscdex IOCTL INPUT, is that dosbox may be setting the wrong bit for data track, in the Audio Track Info(Control Block Code 0x0B). You assign the value directly from SDL, which is 0x04, but according to 2 sources, should really be 0x40.
The two sources are:
http://lrs.fmi.uni-passau.de/support/doc/inte … -57/RB-2760.HTM
(Has some bad formatting, and typo'd)
http://www.he.net/~marcj/ioctl_input_codes.html
(Really definitive)
Now, in an attempt to get it to run, I tried setting that value to every bit, the only time the behavior appears to change is when the bit 0x40 is set. The new behavior is...
General Error
Please insure that a World of Xeen CD-ROM is loaded before re-running!
I will keep looking into this and will post updates when new possible emulation bugs are found during the search, but I noticed that the "digital copy permitted" bit will never be set in the Audio Track Info (Control Block Code 0x0B), which although isn't a cause of the bug, is an unsupported aspect.
BTW, XoZ does the following IOCTL INPUTs(Same order with/without 0x40 fix)...
0x09
0x06
0x09
0x0B
WoZ terminates without anymore calls to MSCDEX_Interrupt_Handler()
PS, Great job so far.