Method of creating CD-ROM image of files of different format with proper directories to be read by respective operating systems5359725Abstract A method and apparatus for making a single CD-ROM disc useable on computers having unrelated operating systems or for multi-media platforms, specifically, wherein the two different operating systems are Hierarchical File System (HFS) used by Macintosh computers and MS-DOS which is the operating system used by IBM and compatible personal computers. The resulting compact disc is in ISO 9660 format which is a standard of the International Standards Organization which describes a logical format for organizing data on a Compact Disc Read Only Memory (CD-ROM). In this manner, it is possible to, for example, store two versions of a program on the same CD-ROM, one for execution on Macintosh computers and the other for execution on IBM PC and compatible computers. Thus, data which is to be stored on an ISO 9660 formatted disc can be sent from the producer or supplier of the data to a compact disc presser on a single magnetic medium such as a Bernoulli removable cartridge disk under a single operating system partition. Claims We claim: Description SUMMARY OF THE INVENTION
TABLE I
______________________________________
GUIDEDXX GUIDED.sub.-- TOUR
APPLWILD B
HYPERCAX HYPERCARD.sub.-- 2
STAKWILD R
PICTUREX PICTURE.sub.-- 1
PICTWILD D
______________________________________
The RENAMER file 18 is presently created by first ensuring that HFS files on media 11 are named in a manner which will not create problems when converted to legal MS-DOS names (e.g., two file names should be unique in eight characters or less and should not have imbedded spaces or special characters). It will be readily apparent to persons skilled in the art as to what names can be used without creating problems. The RENAMER file is created manually by, for example, a word processor producing an ASCII file with four columns as described above. The RENAMER file can of course be created by a routine which performs the aforesaid processing to create the RENAMER file. To create the CD-ROM disc, it is first necessary to create a CD-ROM disc image in ISO 9660 format from the data on the Bernoulli cartridge (processing performed by block 19). The creation of the CD-ROM disc image which is also known as pre-mastering, can be performed using readily available commercial software such as Topix from Optical Media. The resulting image of the CD-ROM disc resides on a hard disk 21 which must have sufficient capacity to store the CD-ROM disc image which may be 600 megabytes or larger. Although the CD-ROM can be pressed from the image on hard disk 21, programs on the resulting compact disc would not execute on a Macintosh computer since critical information contained in the resource fork is stored in a separate file in the hidden Resource.FRK directory. The present invention modifies directory records to resolve resource fork/data fork problems and the loss of complete file names, and owner and type information resulting from the temporary storage in an MS-DOS partition. In essence, the present invention performs modifications to the CD-ROM image hard disk directory on disk 21 correcting problems which are not properly handled by the software 19 used by compact disc pressers to create CD-ROM masters. Pre-mastering of the data on the Bernoulli cartridge 17 requires attention to the order of how files are placed in the CD-ROM image hard disk directory on disk 21. As noted above, during the conversion from HFS to MS-DOS format, both the resource and data fork files placed on the Bernoulli cartridge have the same name, but do not conflict with each other because they are in different directories (or folders). At the time of pre-mastering, the two files (data and resource) must be placed in the same directory (folder) level. However, since only a single file name is associated with the data fork and resource fork of an HFS file, a conflict would arise if resource fork and data fork files were created with the same name in the same level directory. To resolve this conflict, each resource fork file name is renamed (using, for example, the MS-DOS RENAME command) to have the letter "X" appended to the name (e.g., old resource fork name ="REQUIEM", new resource fork name ="REQUIEMX"). If the original name is already eight characters long, then to maintain MS-DOS compatibility, the eighth (8th) character is forced to be the letter "X" (e.g. old resource fork name ="SUPERCAR", new resource fork name ="SUPERCAX"). Similarly, and in order to guarantee placement of the data fork file directory entry after the corresponding resource fork file directory entry in the ISO 9660 format directory record, the data fork file is renamed to have the letter "Y" appended to the name (e.g. old data fork name ="REQUIEM", new data fork name ="REQUIEMY"). If the original name is already eight characters long, then to maintain MS-DOS compatibility, the eight (8th) character is forced to be the letter "Y" (e g,. old data fork name ="SUPERCAR", new data fork name="SUPERCAY"). It should be noted that even though the directory entries for the resource and data fork files must be sequential and unseparated, the corresponding data of each resource and data fork file can physically reside anywhere on the CD-ROM disc. Following the convention set forth above, all files on Bernoulli cartridge 17 are processed by program 19 and transferred to the CD-ROM image hard disk 21 on the pre-mastering workstation. Before program 19 is used to transfer data from cartridge 17 to disk 21, the data on cartridge 17 must be pre-processed. The files on cartridge 17 that exist in the hidden resource.FRK directory are moved into the visible data. FRK directory using a standard off-the-shelf program such as XTPRO from Executive Systems. The files in the resource. FRK directory are tagged and moved with the AUTOMATICALLY REPLACE EXISTING FILES switch of XTPRO set to NO so as to verify that none of the moved files will over-write the existing data.FRK directory files. Then, all the files in the data.FRK are sorted by name in ascending order using an off-the-shelf utility such as Norton Utilities from Peter Norton Corporation. Program 19 is used now to transfer files from disk 17 by prompting for the name of the pre-processed directory which now contains both resource and data files which have been sorted in alphabetical order. The processing performed by program 19 also builds the ISO 9660 directory record(s) when the resource and data files are copied from Bernoulli cartridge 17 to CD-ROM image hard disk 21. After all files are transferred to CD-ROM image hard disk 21, the virtual CD-ROM directory block(s) from the CD-ROM image hard disk are written to a conventional MS-DOS file (ISO.DOS) which may be on disk 21 or a separate MS-DOS hard disk. The CD-ROM directory block(s) are transferred to ISO.DOS using a program from Optical Media called VCD2FILE.EXE. This program allows the simple transfer of virtual CD blocks from disk 21 to a file on any destination MS-DOS disk drive. The user prompts the program with name of the file to create. The resultant file will have the contents of the virtual CD-ROM directory blocks specified by the user. The program VCD2FILE.EXE has no knowledge of directory blocks or any other types of blocks, so the user is responsible for identifying the beginning and ending locations on the virtual CD-ROM disk 21 that contain valid directory block(s). The actual locations for the directory blocks are specified by the user at the time of transfer from disk 17 to disk 21 by use of program 19. The directory blocks form the ISO.DOS file which is a directory file that contains the names and location of the HFS files to be converted. As noted above, the ISO.DOS file contains resource fork and data fork file names. If a resource fork file does not have a data fork file part, then only the resource fork file name will be present in the ISO.DOS file. If a data fork file does not have a resource fork file part, then only the data fork file name will be present in the ISO.DOS file. However, if the data fork file does have a resource fork file part, then both file names will be present in the ISO.DOS file. The resource fork file name appears first and is immediately followed by the data fork file name. Each file name (data or resource) in the ISO.DOS file is referred to as an entry. Therefore, in the ISO.DOS file, the resource fork file name is the first entry and is also called the associated entry, so its associated bit is set by the ISO.PC program. The next entry is the data fork file name and is not associated with any other entries, so its associated bit is cleared by the ISO.PC program. For data files which have no resource file and for resource files with no data files, the associated bit is always cleared by the ISO.PC program. The ISO.DOS file is processed using a computer program 23 which forms the present invention (attached hereto as Appendix 1) that customizes the data of the directory records using the RENAMER file and writes the resultant data creating a new file (ISO.ISO). In particular, the program opens the RENAMER file which is read and processed. As noted above, RENAMER contains DOS names, HFS names, and type and owner, and the file fork indicator letter. The file ISO.DOS is processed by looking for a file name that matches one of the file names contained in the RENAMER file. When a match is found, the ISO name is inserted over the DOS name. Padding is added at the end of each file name, the directory record's length is adjusted relative to the ISO name inserted, and all lengths are updated (the ISO directory record is a variable length record). Next the type and owner information is inserted and again the length values are adjusted. This process is repeated on the next entry if the current entry is an associated entry. Then the associated bit of the first entry is set and the corresponding bit of the next entry is cleared. The above process is repeated for each file name match between the ISO.DOS file and the RENAMER file. The customization makes the changes needed to form a proper Macintosh resource and data fork in the ISO 9660 format directory record, with both members of the pair having the same name. The file name for each file pair may also be changed to a name that is not restricted to MS-DOS requirements (that is, greater than 8 characters plus a 3 character extension), and may or may not end with ".;(version#)". The ISO.ISO file is then rewritten back to the CD-ROM image hard disk 21 shown in FIG. 1 as the corrected image of CD-ROM disc in ISO 9660 format on hard disk 25 so that it overwrites the data originally used to make ISO.DOS. This step essentially replaced the old directory records with new modified ones that still point to the correct data somewhere else on the CD-ROM image hard disk 25. FIG. 2 is a hierarchical diagram of the computer and routines (main 31, addext 33, fixfile 35, setupxref 37, dosxref 39 and updatecd 41) utilized by the present invention. The following is a description of each of the routines and the parameters passed to or from each routine. main ([a, [b]]) If no command line parameters are present, Help information is printed to the screen. Parameter (a) is the name of the "source" file (with or without a .dos extension) and is required. Parameter (b) is the name of the "resultant" file (with or without an .iso extension) and is optional. The main() routine tests for the presence of parameter(s) and prints Help information if no parameters are present. If parameters are present, main() (i) creates and adjusts file names using defaults and overrides; (ii) allocates the entire working memory needed for the source and resultant file; (iii) opens the source file and the RENAMER file, reads the contents of the "source" file, fills any extra buffer space with 00's and closes the source file; (iv) calls "setxref" to read in the renaming tables from the RENAMER file and closes the RENAMER file; (v) calls the "fixfile" routine to make the changes to the directory records as described herein; (vi) opens the "resultant" file and writes the same amount of data as read from the "source" file from the working memory area and closes the "resultant" file; and (vii) frees the working memory, prints statistics and exits. addext (a,b) Parameter (a) is a file name and parameter (b) is a file extension. If the file name has no ".", the file extension is added to the file name, otherwise no changes are made. setupxref() The routine setupxref() has no parameters. The routine reads the RENAMER file and puts the four entries into four arrays as follows, where i ranges from 1 to 500: xref[i].old.ltoreq..fwdarw.the source's old ".dos" name. xref[i].new.ltoreq..fwdarw.the resultant's new ".iso" name. sys.sub.-- type[i].ltoreq..fwdarw.the system area TYPE and CREATOR. file-type[i]=.fwdarw.the file fork indicator letter fixfile() The routine fixfile() has no parameters. Zeroes out statistics. During a first pass, the routine loops through the data from the "source file" in the working memory which contains directory records according to the ISO 9660 standard (see Table II) to find all occurrences of ISO directories (based on the directory bit in byte location 26) and stores the number of bytes needed for all the directory records of all of the files contained in each directory in a table called dir.sub.-- end. During a second pass, (i) if a length 0 is found for a directory record, the program guarantees that no records will span a 2K byte boundary (ISO requirement) and no 00's are left between records in a single 2K byte block; (ii) it skips records which describe actual ISO directories (folders); (iii) it makes validity checks on length for overall filesize and directory record entry, and if invalid, returns with an error and terminates; (iv) it determines if filenames for the current entry and the next entry match, then checks that the respective filename lengths match as well; (v) if both match, and the dosxref function finds the new name, the user is informed, and the new name is moved into both entry positions, adjusted for the new size of the names. Various special cases are handled like the end of a 2K byte buffer--if the dosxref function does not return a match, the entry is not modified; (vi) handles file names of less than 7 characters and 00 padding; (vii) deals with the Macintosh system area -TYPE and CREATOR from Table I are concatenated after the sequence <42><41><06> and followed with <01><00> (or <21><00> if the type is appl) and with another <00> if needed to make the directory record even; (viii) if required, it pushes all data starting with the next ISO directory record to the next 2048 byte boundary, and pads the end with 00's; and (ix) handles the change of filenames and system area for, data only (D), and resource only (R) files.
TABLE II
______________________________________
ISO 9660 DIRECTORY RECORD LAYOUT (RELEVANT
FIELDS)
FIELD BYTE
LOCATION
______________________________________
1 Length of current directory record (must be
even)
2-10 (not relevant)
11-18 If this record describes a "directory"
(or "folder") this is the length of the
records for the file within this directory.
19-25 (not relevant)
26 File Flags
27-32 (not relevant)
33 Length of the file name (length)
34-(33+ length)
File name
34+ length System Area (ending in an extra 00 byte
only if needed to make the whole
directory record an even number of
bytes)
______________________________________
updatecd (a) Parameter (a) is an unsigned integer which represents the position of the compact disc directory length. The routine updates the compact disk directory length by adding 1 to the compact disc block count if more space is required. This allocates additional space in 2,048 byte increments. (However, this extension of the directory records will fit in the ISO image only if enough directory record space was reserved for growth during the premastering process.) dosxref (a,b,c) Parameter (a) is the DOS input file name, parameter (b) is the HFS output file name,and parameter (c) is the index of the three arrays created by setupxref(). The routine finds the DOS name in the xref[i].old array and copies the ISO name from the xref[i].new array and returns the index. A source code listing of the routines main 31, addext 33, fixfile 35, setupxref 37, dosxref 39 and updatecd 41 are attached hereto as Appendix 1. ##SPC1##
|
Same subclass Same class Consider this |
||||||||||
