Preparing an optimized CD-ROM image starts with creating a basic image,
described in Preparing Simple
cdrom.image Files. The following sections discuss the additional steps
needed to produce an optimized image, which include:
The base image for information collection is identical to the simple image
discussed above with the exception of the label field, which should be set
to remote. To create the base image, follow these steps:
The optimizing layout tool requires information about when and how often
the different files your title consists of are accessed when someone uses
the title.
To set up the Debugger to collect file access information, follow these
steps:
Put the Debugger Preferences file into the trash.
Launch the 3DO Debugger.
When prompted for a script to execute, click Cancel.
From the Edit menu, choose Preferences and do the following:
Make sure that RAM is set to Standard
Check the Set Initial Breakpoints
Check Set CD Emulation
Uncheck Auto-Launch Script
Uncheck Serial Port Enable
Make sure that there is no CD-ROM disc in the 3DO Station drive and
that there is only one cdrom.image file on your Macintosh.
From the File menu, choose Directories and then choose Setup, and set
your current data directory to the location of the cdrom.image
file.
With the Debugger running, choose Launch from the Target menu and then
select the boot script.
Since you have turned on Set Initial Breakpoints, the application
should stop at the first instruction.
From the File menu, choose Start CD Access Log and save the
CD_Access.Log file into your /cdrommaster/_version_ folder,
where _version_ is the most recent version of the operating system.
From the Execution menu, choose Go to run the boot script.
The file system mounts the cdrom.image file under the name
/remote. You are informed that because this file system was
mounted, the Macintosh remote folder is not mounted. All of the
system folios are launched from the cdrom.image file. The shell
automatically starts up your LaunchMe application.
You are now set up for collecting the file access information required by
the optimized layout tool. This section steps through running your title
from the CD-ROM image file to collect the information.
Note: The person collecting file access information should be
thoroughly familiar with the title.
With the 3DO Debugger running, follow these steps:
From the File menu, choose Special Mode.
This puts the Debugger into special mode to make CD-ROM emulation as
fast as possible.
With all settings for the Debugger in place, go through your title as
follows:
Go through the title's startup sequence.
At each major user-interaction point, for example, each time a menu
lets the user select a game level, pause for a second or so before making
a selection.
Enter each major branch of the title only once if possible, so that
file access information for that branch can be recorded.
The goal is to "exercise" the set of files used by each level, so that
the optimizer can observe which files are used together.
After "touching" each level or branch in the title, press the Stop
button on the control pad to exit the program.
Click the Macintosh mouse to terminate Debugger special mode.
To create an optimized CD-ROM image file, you have to make the CD access
log available to the cdrom.tcl script file that you run to create a
CD-ROM image.
This section shows how to set up all required files and how to run the
layout tool again to create the optimized image.
To edit the cdrom.tcl file for the optimized image, use the
settings in the table below, which differ from the settings for the
nonoptimized image you used earlier:
Table 1: Variable settings for optimized image creation.
--------------------------------------------------------
Variable |Setting
--------------------------------------------------------
label |cd-rom (the default). Make sure the label is
|NOT set to remote at this stage or you won't
|be able to debug the optimized image.
--------------------------------------------------------
megabytes |Number of megabytes of CD-ROM space your
|software will occupy. Larger is better; the
|more storage space you allocate (in excess of
|the amount actually needed for one copy of
|each file), the more room the optimizer and
|Catapult have to make multiple avatars of
|your title's files, and the more effective
|the optimization and clustering will be.
--------------------------------------------------------
catapultme|Set catapultmegabytes to the number of
gabytes |megabytes of CD-ROM space that you wish to
|make available for the Catapult file. If your
|application already uses most of the space on
|the CD-ROM, you can make this a fairly small
|number (Catapult files as small as 4 or 5 MB
|can make a big difference in startup speed).
|If your application has lots of room to
|spare, request a larger Catapult file (20 to
|30 MB or more).
|
|Since the actual benefit of Catapult varies
|greatly depending on the title, consider
|making several images, one of them with
|catapultmegabytes commented out.
--------------------------------------------------------
If you used Catapult, you can exclude certain files or entire directories, from being included
in the Catapult file (see Catapult). This can make sense for
Cinepak or other full-motion-video files: they take up a lot of space in
the Catapult file and usually don't benefit much from being catapulted. To
do this, include a statement using one of the following formats in your
cdrom.tcl file:
The excludecatapult command accepts a single parameter, the
Portfolio pathname to a file or directory. In either case, the path is
relative to the root directory of the file system being created. The first
format identifies a specific file which is to be excluded from the
Catapult file. The second format (with a trailing "/") identifies a
directory, and specifies that all files found in that directory are to be
excluded from the Catapult file.
Dealing with Large Files
If you have a large Cinepak file, or any other large file which is
"streamed" into memory at high speed, you should do one of two things:
Either exclude the file from the Catapult file using the
excludecatapult command
or make sure that the entire file is included in the Catapult
file.
You need to make sure you don't have half of a file in the Catapult file
and half of it excluded. This can occur if during your test-and-exercise
run you play halfway through the file and then use the control pad to skip
the rest of the introductory sequence. In this case, there may be an extra
seek when the catapulted CD-ROM image accesses the file. It reads the
first portion of the data from the Catapult file, but is forced to find an
avatar of the file itself to get the remainder.
Starting the Image Creation Process
After you've run the title with CD Access Log on, you should find a
filemap.out file and a CD_Access.log file in the
/cdrommaster/_version folder.
Rename the filemap.out file to filemap.in.
Make sure the CD_Access.log file resides in the
/cdrommaster/_version folder.
Delete (or rename and move) the old copy of the cdrom.image
file in the
/cdrommaster/_version folder.
Run the layout tool program again, using the newly edited script. The
CD.Access.log and filemap.in files are automatically used as
input.
The tool goes through several stages of file access analysis:
clustering, file organization, cluster placement, and avatar assignment.
It then writes a new cdrom.image file, which is optimized for the
access performed while testing the first cdrom.image file.