bin/cue files

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
geoffreymbrown
Student Driver
Posts: 17
Joined: Tue Aug 03, 2010 1:42 pm

bin/cue files

Post by geoffreymbrown »

I'm working on issues related to digital preservation and had some CD-ROMs that
start with a data track followed by audio tracks. Although these CD-ROMs work in
Basilisk on some platforms, for my work it's important to be able to use image files.

I've had some success modifying Basilisk as follows -- I only did this on the Unix/SDL
platform as compiling for OS X is apparently broken and I don't do windows.

-- add a file to src/Unix to parse and read cue files and bin files
-- add hooks to sys_unix.c to support preferences of the form

cdrom foo.cue

-- modifiy SDL/audo_sdl.cpp
--- add a hook at startup
--- add a hook called whenever an SDL buffer is filled

My implementation has major limitations
-- parsing is incomplete: I only support MODE1/2352 and AUDIO tracks. I don't support various other features
-- audio support is limited. I didn't want to write a mixer so I used the SDL built in one. This means Basilisk had
better be using 44100 samples, stereo, etc. to match the CDROM audio. I haven't bothered to handle CD audio
with pre-emphesis or 4 channels.

To do this I learned a bunch from the dosbox implementation of cdrom images and libcdio's handling of bin/cue.
Unfortunately the latter is very incomplete and the files from the former aren't super portable. So I did this
from "scratch" (obviously some code comes from those projects). To get to this stage required ~700 lines
of new code, and perhaps 50 lines of modification to audio_sdl.cpp and sys_unix.cpp. This is so far
from the quality required for distribution that it's not suitable for rolling into the current sources; however,
if somebody is interested in experimenting, send me a pm.

This code does work for my limited set of test images (3 cdroms published by voyager -- "I photograph to remember",
"All My Hummingbirds have alibies", and "Richard Strauss: Three Tone Poems"). Two of these were built with
macromind director and one with hypercard.

Geoffrey

Geoffrey Brown
User avatar
Cat_7
Expert User
Posts: 5103
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hello Geoffrey,

Sounds great that you were able to solve your own problem!
Perhaps you care to share the code with the development list, so that it is preserved if not imported into the code base. It is locate here: https://lists.sourceforge.net/lists/lis ... lisk-devel

Have you ever looked at the hfsutils for linux?
They can be downloaded from e.g. here: http://www.opensource.apple.com/darwins ... .14.tar.gz

Thanks,
Cat_7
geoffreymbrown
Student Driver
Posts: 17
Joined: Tue Aug 03, 2010 1:42 pm

Post by geoffreymbrown »

Thanks for the link to hfsutil -- looks like just the thing to automate some of the install
process for particular cdroms.

I'll clean up my code a bit before posting anything. Really, it's the diffs to the files I had
to touch that are the most problematic.
Post Reply