Thanks for the feedback! I've updated the build with a couple improvements: (same link, but re-download to get the new executable)
https://github.com/spolsley/macemu/releases/tag/2.5_20191107- Warcraft II CD audio now works! (due to a change in the "AudioPlay" control call)
- Better Apple CD Player compatibility
- CD scanning is mostly implemented, need to add track bounds
- Sometimes the player issued a duplicate "resume" call, which no longer yields an error
@adespoton, I haven't added a prefs toggle yet. It would be possible, but since the sound input patch doesn't load either way, I'm not sure there's a noticeable difference for pre-OS 9 users. What I'd really like is to get the native driver to load in OS 8.
@almeath, your comments led me to investigate a couple different avenues:
Warcraft I & II NotesI found Warcraft II getting stuck in a loop. It would set the start position, pause, set the end position, and then check status, repeating until playback started, but it never actually initiated playback. I think the problem was in Sheepshaver's implementation of "AudioPlay". Apple's documentation is a bit unclear, but I've changed it to start playback from the current position when being called with an end position.
Unfortunately, Warcraft I is still resistant. In the readme, it notes only an internal Apple CD drive with playthrough will work, and these patch notes from Warcraft II v1.23 provide more context for the problem:
Code:
Warcraft II v1.23 Patch Notes
Reworked CD-ROM code to be compatible with just about every single CD-ROM drive. Also works if you have more than 1 CD-ROM drive plugged in.
That patch was released for Warcraft II about a year after Warcraft I's Mac debut. It suggests to me to WC1 has very rigid expectations in its code for CD audio. The lack of support for multiple drives may be the key problem since Sheepshaver can attach any number of CDs. It's also likely there's still some value being reported incorrectly that doesn't match the game's expectations of an internal Apple CD drive.
Descent II & Nanosaur Audio NotesRegarding Descent II, the sound error is a different issue. I'm not sure if it's tied to the audio output driver or a missing/mis-implemented opcode. The crash is very similar to what happens when launching Nanosaur in Sheepshaver. Both games are open-source (
Nanosaur,
Descent II), and I've found the origin of the error in code: it's an attempt to play a sound before initializing the sound object.
In Nanosaur, it crashes when trying to show the loading screen with a T-Rex running next to the title. The T-Rex skeleton is loaded and attempts to play the footstep sound, despite not having the level sounds loaded at that point, only the menu sounds. I found an
old tool from DescentBB to track down the troublesome file in Descent II, and it appears to be a background hum noise ("de_hum_2") which loads during the enemy overview screen.
To me, it seems like a bug in the games, at least in Nanosaur's case, but somehow they don't crash on real Macs. I can only assume something's wrong in Sheepshaver, maybe it's reporting the incorrect value or not computing something which would prevent the attempt to play unloaded sounds.
For Nanosaur, the fix is to use version 1.1.6, the charityware distribution. Its additional charity title screen apparently prevents the crash, but the game doesn't play correctly due to Quickdraw 3D issues. For Descent II, different versions didn't help, but if you disable sound effects on the launch screen, it will run. Unfortunately, it has similar speed issues to Descent I, making it unplayable.
General CommentsOf the games I've tested, only Warcraft I isn't working, but I'd like to find other games with the same problem. Something open source would be ideal; seeing the code is the most likely way to get it running apart from trial and error.
Then there's the speed issue. It seems many of these mixed-mode games associate their timing with the CPU speed in some way. The gameplay for both warcrafts can be adjusted nicely, but scrolling is way too fast. The game runs ok in Descent I, but the controls are too slow; conversely, the game and controls are too fast in Descent II. I'm beginning to wonder if it would be possible to add a speed control feature like Qemu and DosBox have.