Hi,
OK, so my local mailer's broken (again). Guess we'll have to do without
quotes. Anyway:
Driver subfunction 0 is not called by any particular
DoSound() call. Rather, it is called by the interpreter at initialization
time. The return value from that subfunction is used to load and lock the
correct patch file. After that, the driver is queried for its resident
size, and its memory block resized appropriately - none of which apply to
us.
Regarding the invalid suspend: This pattern (NULL pointer passed, then a
valid pointer, NULL pointer again etc.) looks a lot like a similar pattern
with the Joystick pattern (though the two are not related). It would
perhaps be easier to explain if I mentioned the Joystick call briefly.
The only subfunction implemented on IBM hardware is 0x0C. It is used to
set some kind of value, but can also be used to get the current
value (called when activating the menu system, so I'd guess it's
some kind of movement constraint). Since this call is unimplemented by
FreeSCI, it results in a sequence of calls that look like:
(Joystick 12 30)
(Joystick 12 0)
(Joystick 12 30)
...
Similarly, it would seem that a return value is missing from one of the
DoSound() calls. So I went to investigate that (still not done), and I
found one thing: The SOUND_SET_MUTE call is not complete. It needs to
handle three cases:
(define SOUND_SET_MUTE 4)
(define SOUND_GET_MUTE 4)
(Sound SOUND_SET_MUTE 0) this will turn on sound
(Sound SOUND_SET_MUTE 1) this will mute all channels
(Sound SOUND_GET_MUTE) returns the current mute state
The latter call is not implemented.
Lars