Working on bin/cue support in SheepShaver

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

If I disable the CD-ROM driver, when I try to mount the cue sheet as "cdrom" nothing happens - no disc or message shows up when I start MacOS 7.5.5.

If I mount it as a "disk", then I get the error message about the disk being unreadable and needing to be formatted.

This is my prefs file (Windows 11):

Code: Select all

disk hd.dmg
cdrom Alone in the Dark 3.cue
extfs 
screen dga/640/480
windowmodes 3
screenmodes 63
seriala COM1
serialb COM2
rom Mac OS ROM
bootdrive 0
bootdriver 0
ramsize 536870912
frameskip 0
gfxaccel true
nocdrom true
nonet false
nosound false
nogui false
noclipconversion false
ignoresegv true
ignoreillegal true
jit true
jit68k false
keyboardtype 5
hardcursor true
hotkey 0
scale_nearest true
scale_integer true
cpuclock 0
yearofs 0
dayofs 0
mag_rate 0
swap_opt_cmd false
sound_buffer 0
name_encoding 0
keycodes true
keycodefile pc_keycodes
mousewheelmode 1
mousewheellines 3
idlewait true
keycodes true
keycodefile pc_keycodes
mousewheelmode 1
mousewheellines 3
enableextfs true
debugextfs false
extdrives CDEFGHIJKLMNOPQRSTUVWXYZ
pollmedia true
etherpermanentaddress true
ethermulticastmode 0
routerenabled false
ftp_port_list 21
portfile0 C:\B2TEMP0.OUT
portfile1 C:\B2TEMP1.OUT
sdlrender opengl
sdl_vsync true
reservewindowskey true
User avatar
Cat_7
Expert User
Posts: 6014
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Cat_7 »

I didn't mean disable the cdrom, just to not have the cdrom entry point to a real drive in the prefs.

here are my prefs:

Code: Select all

disk C:\mac-hd\7.53-SheepShaver.img
cdrom C:\Users\hsp\Desktop\Alone in the Dark 3\Alone in the Dark 3.cue
extfs 
screen win/800/600
windowmodes 3
screenmodes 63
seriala COM1
serialb COM2
rom C:\_z_emu_tools\ROM\MacOSROM_oldworld
bootdrive 0
bootdriver 0
ramsize 134217728
frameskip 0
gfxaccel true
nocdrom false
nonet false
nosound false
nogui false
noclipconversion false
ignoresegv true
ignoreillegal true
jit true
jit68k false
keyboardtype 5
hardcursor false
hotkey 0
scale_nearest false
scale_integer false
cpuclock 0
yearofs 0
dayofs 0
mag_rate 0
swap_opt_cmd true
sound_buffer 0
name_encoding 0
ether slirp
keycodes false
mousewheelmode 1
mousewheellines 3
idlewait true
keycodes false
mousewheelmode 1
mousewheellines 3
enableextfs false
debugextfs false
extdrives CDEFGHIJKLMNOPQRSTUVWXYZ
pollmedia false
etherpermanentaddress true
ethermulticastmode 0
routerenabled false
ftp_port_list 21
portfile0 C:\B2TEMP0.OUT
portfile1 C:\B2TEMP1.OUT
sdlrender software
sdl_vsync false
reservewindowskey false
User avatar
Ronald P. Regensburg
Expert User
Posts: 7737
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Ronald P. Regensburg »

This download also works fine in SheepShaver with MacOS 9.0.4 on macOS 13.6 on Apple Silicon. The zip archive contains the expected cue/bin pair. After mounting the cue file as CD-ROM, I can play the game from the mounted CD, no need to install the game. No crash here when the color depth is not yet set to 256 colors. I get a dialog to set the color depth.

It also works fine here when I do not add the cue file in the settings, but simply use the new drop-mount feature to mount the cue file as CD-ROM!
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Disabled CD-ROM driver or not, the issue is that in neither MacOS 7.5.5 or 9.0.4 will this work for me - I do not even see a data partition showing up.

In summary, with CD-ROM enabled but not pointing to the real CD drive:

1. Pointing to cue file as "cdrom" in 7.5.5 - message saying the disc is not readable
2. Pointing to cue file as "disk" in 7.5.5 - message saying the disk is not readable
3. Pointing to cue file as "cdrom" in 9.0.4 - audio CD partition shows up on desktop with only 1 audio track showing of zero KB in size, with no data partition visible
4. Pointing to cue file as "disk" in 9.0.4 - message saying the disc is not readable

This all with just loading the cue sheet of the unmodified Alone in the Dark Trilogy (Disc 3) bin/cue pair downloaded from Macintosh Garden, using the prefs file I quoted above.

I do expect his to work better on Macintosh systems as noted above - the point is that in Windows 11 I am experiencing essentially total failure in getting the bin/cue pair to work at all.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7737
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Ronald P. Regensburg »

almeath wrote: Fri Oct 13, 2023 4:20 pm
Ronald P. Regensburg wrote: Fri Oct 13, 2023 3:54 pm 2. Where did you get the files? I can download them, decompress in macOS and again zip them in Windows-compatible zip format.
The CUE sheet referenced above is from the third disc of the "Alone in the Dark Trilogy" at the Macintosh Garden.

I am not sure if that would work, but definitely worth a try at this stage, thanks.
Here are the files re-compressed in Windows-compatible zip format:
https://ronaldpr.home.xs4all.nl/emacula ... Dark_3.zip
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Ronald P. Regensburg wrote: Sat Oct 14, 2023 3:03 pm Here are the files re-compressed in Windows-compatible zip format:
https://ronaldpr.home.xs4all.nl/emacula ... Dark_3.zip
Thanks. Whatever is causing this, it would appear to have nothing to do with the nature of the zip file format. With this download, I am experiencing the exact same outcome as described above.
emendelson
Forum All-Star
Posts: 1677
Joined: Tue Oct 14, 2008 12:12 am

Re: Working on bin/cue support in SheepShaver

Post by emendelson »

Cat_7: This is extremely strange. If I download your Windows builds of BII and SS and use them, then Bin/Cue support works perfectly. However, if I build them myself from source code, following kanjitalk755's instructions exactly, I get the same results that Almeath supports.

I don't make any changes in the prefs file - I simply replace my executable with yours, and bin/cue works perfectly.

I can't expect you to solve my problems, but if you have any idea of what could be going wrong, I'd be grateful.
User avatar
Cat_7
Expert User
Posts: 6014
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Cat_7 »

Does the instruction include: ./configure --with-bincue ?
If not, bin/cue support will not be available (see overview after configure)

Edit: I see, it is not mentioned in the instructions.

I build BasiliskII like this:

git clone https://github.com/kanjitalk755/macemu macemu-kanji
cd macemu-kanji/BasiliskII/src/Windows
NO_CONFIGURE=1 ../Unix/autogen.sh
./configure --with-bincue
make -j12
strip BasiliskIIGUI.exe
strip BasiliskII.exe

Best,
Cat_7
emendelson
Forum All-Star
Posts: 1677
Joined: Tue Oct 14, 2008 12:12 am

Re: Working on bin/cue support in SheepShaver

Post by emendelson »

Yes! That solves it. Thank you. Are those instructions prominently visible on the site (meaning that I missed them...)? They're very useful.

EDIT: And I adapted the instructions so that I could build SheepShaver, and got the right results, of course. Thank you again.
User avatar
Cat_7
Expert User
Posts: 6014
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Cat_7 »

That option is not mentioned on kanjitalk755/macemu

If you do ./configure --help you'll see all options you can set. The ones below determine features and options. Most mention their defaults.

Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-jit-compiler enable JIT compiler default=yes
--enable-jit-debug activate native code disassemblers default=no
--enable-fpe=FPE specify which fpu emulator to use default=auto
--enable-vosf enable video on SEGV signals default=no
--enable-addressing=AM specify the addressing mode to use default=fastest
--disable-gtktest do not try to compile and run a test GTK+ program
--disable-largefile omit support for large files

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gtk use GTK user interface default=yes
--with-bincue Allow cdrom image files in bin/cue mode
--with-sdl3 use SDL 3.x, rather than SDL 2.x default=no
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Yes - that has fixed it for me too. I had no idea that BIN/CUE support was not enabled by default, and I have been building SS/BII from source.

Glad we got to the bottom of that. Thanks to everyone who contributed.
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

I have tried to compile my own build using the instructions above, but I am seeing the following error after running the ./configure command:

Code: Select all

$ ./configure --with-binccd ue
configure: WARNING: you should use --build, --host, --target
configure: WARNING: unrecognized options: --with-binccd
configure: loading site script /etc/config.site
checking build system type... Invalid configuration `ue': machine `ue-unknown' not recognized
configure: error: /bin/sh ./../Unix/config.sub ue failed
I am using the MINGW32 build environment.

To date, this is what I was previously running in MINGW32 to build SheepShaver for Windows:

Code: Select all

cd macemu/SheepShaver
make links
cd src/Windows
../Unix/autogen.sh
make -j4
UPDATE:

I appear to have had success by following this approach:

Code: Select all

cd macemu/SheepShaver
make links
cd src/Windows
../Unix/autogen.sh
./configure --with-bincue
make -j4
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

And after all that .. when playing Alone in the Dark 3, I can see that the "CD audio" option is still greyed out and unavailable. You can only select between low and high quality music, both referring to the digitized tracks stored on the data partition, not the Red Book audio tracks.

While the Red Book audio plays back perfectly from Apple CD Audio Player, the game will not recognize those tracks are available. I recall the same thing happens with Warcraft, and perhaps they have a similar underlying cause.

Anyway, this has not changed in many years - I hope one day we can get to the bottom of it, because it is one of the big remaining gaps in classic Mac emulation. I would love to be able to load Descent, and hear those CD tracks playing. I know there are other game engines that can achieve that to some degree, but not the same way as seeing it run in the actual MacOS environment. :wink:
emendelson
Forum All-Star
Posts: 1677
Joined: Tue Oct 14, 2008 12:12 am

Re: Working on bin/cue support in SheepShaver

Post by emendelson »

Just out of curiosity: when I run the game (in Windows and macOS), the Mac OS menu is unreadable (dark colors on dark colors). Do you know a setting that makes it readable?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7737
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Working on bin/cue support in SheepShaver

Post by Ronald P. Regensburg »

I suppose that is how the game is designed. When you click anywhere in the menu bar and then move the arrow along the menu bar, the menu titles will appear underneath the arrow in white.
User avatar
adespoton
Forum All-Star
Posts: 4076
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Working on bin/cue support in SheepShaver

Post by adespoton »

Just thought I should link our previous discussions from last year on the same topic: viewtopic.php?t=11699

-- Has anyone tried installing the FWB CD-ROM Toolkit extension yet? I'm guessing it will fail as there's no SCSI interface, but I do know that back in the day, it's what I used to get my third-party CD-ROM drive to work with mixed mode CDs.

Also worth reviewing dom's experiments earlier in this thread: viewtopic.php?p=68980#p68980 -- notice that he had to use PowerISO to image the CD, default cdrdao settings wouldn't work. Then later, he discovered that adding --driver generic-mmc:0x20000 made cdrdao work just like PowerISO.

That means that any bin/cue pairs created using the wrong imaging parameters will have issues with the redbook audio as the PREGAP value will be wrong, as will the layout of the data sector. End result will be that all the data is still there, but the audio won't be able to be loaded correctly, which sounds a lot like what we're seeing here.
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

I am going to experiment with FWB CD-ROM Toolkit, as well as various applications that can mount CD images, such as Toast.

On the subject of how the CDs are ripped in the first place..

Isn't the fact that the Apple CD Audio Player can see (and play) the audio tracks a sign that, at least at the OS level, the tracks are properly copied and stored, in terms of data structure?

I got the impression that the physical data is fine, and that it is a programming issue in individual games that was causing the CD tracks not to be recognized.

Sadly, I cannot locate my original Descent and Alone in the Dark 3 CDs, despite that fact that I did own them back in the day. I have Power ISO and ImgBurn and could have done some testing.
User avatar
adespoton
Forum All-Star
Posts: 4076
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Working on bin/cue support in SheepShaver

Post by adespoton »

almeath wrote: Tue Oct 17, 2023 4:49 am I am going to experiment with FWB CD-ROM Toolkit, as well as various applications that can mount CD images, such as Toast.

On the subject of how the CDs are ripped in the first place..

Isn't the fact that the Apple CD Audio Player can see (and play) the audio tracks a sign that, at least at the OS level, the tracks are properly copied and stored, in terms of data structure?

I got the impression that the physical data is fine, and that it is a programming issue in individual games that was causing the CD tracks not to be recognized.

Sadly, I cannot locate my original Descent and Alone in the Dark 3 CDs, despite that fact that I did own them back in the day. I have Power ISO and ImgBurn and could have done some testing.
One thing I do remember from back when SheepShaver could access physical CD-ROM drives on OS X is that I was able to burn a bin/cue to CD and it would work fine, even though the bin/cue mounted directly would have issues like we're experiencing here. This points to multiple issues: issues with how SS/BII are handling the image, plus issues with how the OS is presenting the data to the application, PLUS issues with what the application itself is expecting vs getting.
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Yes, I think this is a multi-faceted issue. The starting point is that I track down some original media so I can experiment with different rips + use of physical media directly. I am dual booting an Intel Mac with Windows 11 + Sonoma, so I can thoroughly test under each environment. The searching of my attic continues.. hopefully I can at least find Descent!
Elyus
Tinkerer
Posts: 94
Joined: Wed Mar 21, 2012 12:35 am

Re: Working on bin/cue support in SheepShaver

Post by Elyus »

almeath wrote: Sun Oct 15, 2023 6:50 am And after all that .. when playing Alone in the Dark 3, I can see that the "CD audio" option is still greyed out and unavailable. You can only select between low and high quality music, both referring to the digitized tracks stored on the data partition, not the Red Book audio tracks.
For the Alone in the Dark games, also make sure to copy the "Video" folder into the game's folder! It's not very well documented, but here's the description from the second game's manual, which remains true for the third:

Code: Select all

If you have about 53MB of free hard disk space, you can enjoy the ultimate Alone In The Dark 2 experience with awesome CD audio!  First install the game application to your hard disk as described above.  Then copy the "Video" folder from the CD-ROM to the "Alone In The Dark 2" folder that was created on your hard disk.
Following these steps for Alone in the Dark 3, I'm able to run it with CD audio from the Macintosh Garden bin/cue pair using the latest Mac build posted by Ronald from kanjitalk's source (August 10, 2023 build). I'm not very familiar with these games, so I can't say all is working for certain, but the track in the first stage of a new game sounds the same as the first track played through CD Audio Player.

One thing to note: CD Audio Player did crash the first time I tried to play a track, but it worked after a restart. I wonder if the Apple Silicon version has a few more instabilities that have cropped up since I don't remember having audio player crashes under the last Intel builds, but I don't have a good reference point since I haven't been using Sheepshaver as much recently. I'm just glad the community is keeping it alive since a lot of software won't necessarily make the jump to Apple Silicon!
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Elyus wrote: Sat Nov 11, 2023 11:21 pm
For the Alone in the Dark games, also make sure to copy the "Video" folder into the game's folder! It's not very well documented, but here's the description from the second game's manual, which remains true for the third:
I'll be damned - that works! There is no installer for Alone in the Dark 3, just an archive to install Sound Manager if you are running early versions of System 7. So, nothing obvious. But if you create a folder called "Alone in the Dark 3" on a hard drive image, and then copy across the main application and the Video folder from the CD into that folder, then yes - you can select CD audio from within the game when you launch it from the hard drive image. Amazing. Thanks so much for this suggestion, it has resolved something bothering me for the last 5 years. :-)
almeath
Mac Mechanic
Posts: 170
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Working on bin/cue support in SheepShaver

Post by almeath »

Elyus wrote: Sat Nov 11, 2023 11:21 pm
For the Alone in the Dark games, also make sure to copy the "Video" folder into the game's folder! It's not very well documented, but here's the description from the second game's manual, which remains true for the third:
Incidentally, I cannot get this to work with Alone in the Dark 2 (from the trilogy disc on Macintosh Garden).

I followed the same method that worked for Alone in the Dark 3, as described above, but the option to use CD audio is still greyed out.

Further, when I use the installation file to install the game to a hard drive, the application then displays an error when launched, that the CD is not inserted in the drive. This is despite the bin/cue mounting properly and being visible on the desktop, and the CD audio tracks from the image playing back properly in Apple CD Audio Player. The only application file that will successfully launch the game, is straight off the CD image on the desktop.

It is odd that the problem only affects the second game and not the third, off the same set of trilogy disc images.
Post Reply