Abstract:
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.

Description:
SUMMARY OF THE INVENTION 
     The invention is directed to 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. The concepts of the present invention are intended to work with any operating system which supports the 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). 
     By use of the present invention, 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. By using the present invention, 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. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a diagramatic representation of the processing performed in conjunction with the present invention. 
     FIG. 2 is a hierarchical diagram of the processing performed by block 23 of FIG. 1. 
     FIG. 3 illustrates a typical computer suitable for use in practising the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring first to FIG. 3, a typical computer is illustrated for carrying out the method and apparatus described further herein. As shown, there is a computer 100 which comprises three (3) major components. The first of these is the input/output (I/O) circuit 101 which is used to communicate information in appropriate instruction form to and from other parts of the computer 100. Also shown as part of the computer 100 is the central processing unit (CPU) 102 for executing the computer&#39;s instructions and a memory 103. Also illustrated is an input device 105, shown in a typical embodiment as a keyboard. A display monitor 108 is coupled to computer 100 via the I/O circuit 101. Finally, there is mass memory 104. The mass memory 104 may include hard disk magnetic storage devices, CD-ROMs, Bernoulli memory devices or other removable storage media as well as other well-known memory devices. Of course, computer 100 is just a typical example of a computer and many other configurations known in the art may be suitable for practising the present invention. 
     Referring to FIG. 1, data and programs which are desired to be placed onto the CD-ROM disc are stored in their native file formats, e.g., Macintosh files 11 and PC files 13 on storage media and systems associated with a computer system such as hard disk drives. 
     In the preferred embodiment, both the PC files and the Macintosh files are transferred to an MS-DOS formatted Bernoulli cartridge. This can be accomplished using commercially available products which convert HFS files to MS-DOS format (Block 15 in FIG. 1) and store the converted files on Bernoulli cartridge 17. A suitable software package which performs this function is known as Bernoulli file exchange available from Iomega of Roy, Utah. 
     The conversion simply copies the files in MS-DOS format from PC files 13 to Bernoulli cartridge 17. However, Macintosh HFS files which are physically one file may be logically comprised of a data fork and a resource fork or only a data fork or only a resource fork. When a Macintosh file having both a data fork and a resource fork is copied to an MS-DOS partition, in order to maintain the integrity of the Macintosh file, since MS-DOS does not have a structure analogous to the resource fork, it is necessary to create two physically distinct MS-DOS files, one for the data fork portion of the file and the other for the resource fork portion of the same Macintosh file. Both files have the same name, but the resource fork file is placed in a hidden directory called Resource.FRK at the same level as the data fork file. 
     Inasmuch as some Macintosh files comprise only resource forks, while others comprise only data forks, there may not be entries in the hidden Resource.FRK directory corresponding to a file in the data fork directory on Bernoulli cartridge 17. Conversely, in such situations, there may not be a data fork file which correspond to an entry in the hidden Resource.FRK directory on Bernoulli cartridge 17. 
     Additionally, placing an HFS directory and file on an ISO 9660 formatted compact disc with a name longer than eight characters (e.g., GUIDED --  TOUR), and with the correct file owner (e.g., WILD) and type (e.g., STAK) is ordinarily not possible when an intermediate step in the processing requires the use of an MS-DOS partition since MS-DOS names are limited to 8 characters with an optional, up to 3 character, extension. Additionally, MS-DOS does not maintain file owner and type information. 
     The present invention resolves these problems by referencing an ASCII file called RENAMER having four columns of information. As shown in the following Table I, the first column is a list of filenames of all files to be processed for Macintosh compatibility on Bernoulli cartridge 17, with at least one trailing X added so that the name is eight characters long, the second column is a list of the eventual ISO file names, the third column is the HFS file type and owner concatenated together, and the fourth column is a list of letters B, D, or R, which refer to the data and resource fork parts of the file. B refers to a file having both a data and resource fork, D refers to a file having only a data fork and R refers to a file having only a resource fork. 
     
                       TABLE I______________________________________GUIDEDXX    GUIDED.sub.-- TOUR                     APPLWILD    BHYPERCAX    HYPERCARD.sub.-- 2                     STAKWILD    RPICTUREX    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 &#34;X&#34; appended to the name (e.g., old resource fork name =&#34;REQUIEM&#34;, new resource fork name =&#34;REQUIEMX&#34;). 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 &#34;X&#34; (e.g. old resource fork name =&#34;SUPERCAR&#34;, new resource fork name =&#34;SUPERCAX&#34;). 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 &#34;Y&#34; appended to the name (e.g. old data fork name =&#34;REQUIEM&#34;, new data fork name =&#34;REQUIEMY&#34;). 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 &#34;Y&#34; (e g,. old data fork name =&#34;SUPERCAR&#34;, new data fork name=&#34;SUPERCAY&#34;). 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&#39;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 &#34;.;(version#)&#34;. 
     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 &#34;source&#34; file (with or without a .dos extension) and is required. 
     Parameter (b) is the name of the &#34;resultant&#34; 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 &#34;source&#34; file, fills any extra buffer space with 00&#39;s and closes the source file; (iv) calls &#34;setxref&#34; to read in the renaming tables from the RENAMER file and closes the RENAMER file; (v) calls the &#34;fixfile&#34; routine to make the changes to the directory records as described herein; (vi) opens the &#34;resultant&#34; file and writes the same amount of data as read from the &#34;source&#34; file from the working memory area and closes the &#34;resultant&#34; 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 &#34;.&#34;, 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≦→the source&#39;s old &#34;.dos&#34; name. 
     xref[i].new≦→the resultant&#39;s new &#34;.iso&#34; name. 
     sys --  type[i]≦→the system area TYPE and CREATOR. 
     file-type[i]=→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 &#34;source file&#34; 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 --  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&#39;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 &lt;42&gt;&lt;41&gt;&lt;06&gt; and followed with &lt;01&gt;&lt;00&gt; (or &lt;21&gt;&lt;00&gt; if the type is appl) and with another &lt;00&gt; 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&#39;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 (RELEVANTFIELDS)FIELD BYTELOCATION______________________________________ 1         Length of current directory record (must be      even) 2-10      (not relevant)11-18      If this record describes a &#34;directory&#34;      (or &#34;folder&#34;) this is the length of the      records for the file within this directory.19-25      (not relevant)26         File Flags27-32      (not relevant)33         Length of the file name (length)34-(33+ length)      File name34+ 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##