Abstract:
A data processing system, which includes a CD-ROM drive, addresses data in a CD-ROM and commands the CD-ROM drive to read the data. The data processing system selects one of a plurality of control programs corresponding to a format of the data in the CD-ROM used, and controls the CD-ROM drive to read the data addressed by using the control programs. Further, the data processing system processes the data read in a accordance with the data format and stores the data processed in a memory.

Description:
This application is a continuation of application Ser. No. 07/817,076, filed Jan. 6, 1992, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a data processing apparatus including a compact-disk read only memory (called CD-ROM) and method thereof. 
     In recent years personal computers have become more and more high-speed and powerful. With the increase in data quantity and diversification of data processing, demand for an external storage medium with a large storage capacity is ever increasing. A personal computer equipped with a CD-ROM, (which is a non-magnetic disk) has a much larger storage capacity than a personal computer equipped with magnetic disks. 
     Although audio data, video data and data for information processing (hereinafter called computer data) can be recorded on a CD-ROM per se, conventional CD-ROMs record these types of data in track units, so that these types of data cannot be read at the same time for use in practically concurrent processing (hereinafter a CD-ROM of this data format is called a CD-ROM format disk). However, demand for a data processing system which can read these types of data simultaneously from a single CD-ROM and can perform data processing, audio-reproducing and graphics-displaying in synchronization, is ever increasing. To meet this demand, a CD-ROM XA (Extended Architecture) system, which is the extention of a the basic capabilities of CD-ROM system, is being established as an international standard. 
     The CD-ROM XA system allows high-quality voices, such as those recorded on audio compact disks to be reproduced in synchronization with graphics being displayed, by recording both audio and video data in continuous sectors of a disk track. It also allows audio, video and computer data to be processed independently with individual processors, therefore reducing the load of a central processing unit (CPU) which processes computer data, by recording such data together in a single track in sector units (hereinafter a CD-ROM of this data format is called a CD-ROM XA format disk). The CD-ROM XA system records audio data in a compressed data format to allow room for other information (i.e., video and computer data). 
     Accordingly, a data processing apparatus including a CD-ROM drive which can control both tile CD-ROM format disk and CD-ROM XA format disk economically and effectively, is in great demand. 
     2. Description of the Related Art 
     Conventionally, two types of CD ROM readers are used to control a CD-ROM drive to read data from a CD-ROM and to provide the data read to a processor. The first type is an individual circuit (including firmware) specifically designed either for a CD-ROM format or CD-ROM XA format disk and the second type has the above two circuits combined, designed for the CD-ROM format disk and the CD-ROM XA format disk. 
     Accordingly, a problem is that, in order to control both CD-ROM format and CD-ROM XA format disks, the first-type CD-ROM reader is inconvenient because two circuits must be changed, these two circuits being the ones for controlling the CD-ROM format disk and the CD-ROM XA format disk, respectively. 
     Another problem is that the second type CD-ROM reader is costly because two circuits of the first-type are required to control both CD-ROM format and CD-ROM XA format disks. 
     Still another problem is that the second-type CD-ROM reader is large-sized and inferior in reliability because of the large amount of circuitry required to control both the CD-ROM format and CD-ROM XA format disks. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a data processing system including a CD-ROM and method thereof, which can control economically and efficiently both CD-ROM format and CD-ROM XA format disks. 
     It is another object of the present invention to provide a small-sized and reliable data processing system including a CD-ROM, which can control both CD-ROM format and CD-ROM XA format disks. 
     To achieve the above and other objects, the present invention provides command means for addressing data in the CD-ROM and commanding a CD-ROM drive to read the data, memory means for storing data read from the CD-ROM, a plurality of control means, each corresponding to different formats of data recorded in the CD-ROM, for controlling the CD-ROM drive to read the data addressed by the command means, for processing the data read in accordance with the data formats and for storing the data processed into the memory means, and selection means for selecting one of the plurality of control means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a CD-ROM reader according to an embodiment of the present invention; 
     FIG. 2 shows an operation to read a CD-ROM format disk in a read-ahead buffering method according to the embodiment of FIG. 1; 
     FIG. 3 shows an operation to read a CD-ROM format disk according to the embodiment of FIG. 1 in a cache control method; and 
     FIG. 4 shows an operation to read s CD-ROM XA format disk. 
     Throughout the above mentioned drawings, identical reference numerals are used to designate the same or similar component parts. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a block diagram of a CD-ROM reader of the present invention, which can read both CD-ROM format and CD-ROM XA format disks. 
     A central processing unit (hereinafter abbreviated CPU) 8, which is a processor unit of a personal computer, etc., performs data processing under control of a program. 
     A main memory 9 is the CPU&#39;s working memory which stores the program and data for data processing. 
     A CD drive 1 (including a CD-ROM which records computer data for the CPU 8 and audio data for an Adaptive Differential Pulse Coded Modulation (ADPCM) decoder 6 for reproducing a voice) comprises a mechanism for driving the disk and for reading data recorded on the CD-ROM by detecting the light which is transmitted from a laser diode and reflected from the disk. 
     A local memory 4 is a buffer for storing the data read from the CD-ROM. The data is stored there along with the sector number where the data is recorded on the CD-ROM. Each storage location of the local memory 4 has its address assigned to the CPU-addressable memory space so that the CPU 8 can access the data in the local memory 4 directly with an instruction. 
     A direct memory access controller (hereinafter abbreviated DMAC) 12 transfers the data read by the CD drive 1 to the main memory 9 in a direct memory access (called DMA) mode, via the local memory 4 and data register 11. 
     The ADPCM decoder 6 reproduces a voice by decoding the ADPCM-modulated data read from the CD-ROM 
     A microprocessor unit (hereinafter abbreviated MPU) 3, with firmware of three control programs 1, 2 and 3 stored singly or in combination, controls the CD drive 1 to read data from the CD-ROM and stores the data read into the local memory 4, for use by the CPU 8 and ADPCM decoder 6 or for transfer to the main memory. The control program 1 stores the data read from a CD-ROM format disk into the local memory 4 in a read-ahead buffering method; the control program 2, in a cache control method; and the control program 3 stores data read from a CD-ROM XA format disk into the local memory 4 for use by the processors such as the CPU 8 and ADPCM decoder 6. Operations performed by each control program are described below with reference to FIGS. 2-4, respectively. 
     A memory controller 5 controls the local memory 4 to write/read data to/from the local memory 4 and activates the DMAC 12 to perform DMA-mode data transfer. 
     A selector 13 selectively connects the output of the local memory 4 or data register 11 with a CPU bus 16 according to a control signal SELECT from the MPU 3. 
     The CD drive 1 requires a longer seek time and, therefore, needs a longer average access time as, compared with a magnetic disk drive such as a hard disk drive. To practically reduce the access time in reading a CD-ROM format disk, the present invention introduces two methods: a read ahead buffering method and a cache control method. 
     FIG. 2 shows an operation to read a CD-ROM format disk in a read-ahead buffering method. 
     The read-ahead buffering method is useful when the CPU 8 needs data stored in physically continuous or adjacent sectors of a CD-ROM track. 
     The read ahead buffering method is performed according to steps (1)-(11) of FIG. 2, as follows: 
     (1) The CPU 8 writes a read command and parameters in a CD command register 7. The read command designates the read-ahead buffering method and an operation to read data from a CD-ROM format disk and to store tile data in main memory 9. The parameters designate the location (a disk track and sector) where data to be read is recorded and the number of sectors to be read. 
     (2) The CPU 8 also writes a data transfer handling condition in the DMAC 12. Then, the DMAC 12 enters a wait state to wait for a data transfer request from memory controller 5. The data transfer handling condition includes a main memory data address (abbreviated DA) where data is to be stored and a byte count (abbreviated BC) which designates the number of bytes to be transferred. 
     (3) The MPU 3 interprets the command and parameters in the CD command register 7 and invokes tile control program 1. 
     (4) The MPU 3 sends the SELECT signal is to the selector 13 to operatively connect the output of the data register 11 with the CPU bus 16. 
     (5) The MPU 3 determines whether the data requested by the CPU 8 is in the local memory 4, by comparing the sector number of the parameters with that stored in the local memory 4. 
     (6) When the data requested is in the local memory 4, the MPU 3 requests the memory controller 5 to read the data from the local memory 4. 
     (7) When the data requested is not in the local memory 4, the MPU 3 requests the CD controller 2 to read the data designated by the parameters and the data recorded in the following sectors, from the CD-ROM. 
     (8) The CD controller 2 controls the CD drive 1 to read the data in the sector designated and the following sectors. The memory controller 5 transfers the data read to the local memory 4 via the local bus 14 in a read-ahead buffering method. The data transfer continues until the local memory 4 becomes full or the CPU 8 requests data to be read from other CD-ROM locations. 
     (9) When the first sector (about 2 kilobytes) of data is transferred to the local memory 4, the MPU 3 requests the memory controller 5 to output the data requested by the CPU 8 from the local memory 4. 
     (10) The memory controller 5 reads the data requested from the local memory 4 and writes it into the data register 11 in units of one or multiple bytes, and issues a data transfer request to the DMAC 12. 
     (11) On responding to the request from the memory controller 5, the DMAC 12 transfers the data in the data register 11 to the main memory 9. The DMAC 12 repeats the above transfer operation the number of times required by the byte count BC. 
     FIG. 3 shows an operation to read a CD-ROM format disk in a cache control method. 
     The cache control method is useful when the CPU 8 repeatedly uses the same data which is stored in the CD-ROM. 
     The cache control method is performed according to steps (1)-(11) of FIG. 3. The cache control method is controlled by using the circuit shown in FIG. 1 almost the same way as the read-ahead buffering method. The only difference is that in step (3), the MPU 3 invokes the control program 2; and in step (8), the CD memory controller 5 write the data read from the CD-ROM into a local memory location designated by the MPU 3 in a cache control method. The MPU 3 designates the location whose data the MPU 3 determines to be least significant, based on statistics of frequency in use, for example. Accordingly, data having a great possibility of being used by the CPU 8 is stored in the local memory 4. 
     Thus, both the read-ahead buffering and cache control methods can be realized by using the same hardware and switching the firmware (or control programs) designed for each method. 
     FIG. 4 shows an operation to read a CD-ROM XA format disk; 
     The present invention allows a CD ROM XA format disk to be read by using the circuit shown in FIG. 1 as well as shown in steps (1)-(9) of FIG. 4. 
     (1) The CPU 8 writes a read command and parameters in a CD command register 7. The read command designates an operation to read data from a CD-ROM XA format disk and to store the data in local memory 4. The parameters designate the location (a disk track and sector) where data to be read from the CD-ROM XA format disk is recorded and the number of sectors to be read. 
     (2) The MPU 3 interprets the command and parameters in the CD command register 7 and invokes the control program 3. 
     (3) The MPU 3 sends the SELECT signal to the selector 13 to operatively connect the output of the local memory 4 with the CPU bus 16. 
     (4) The MPU 3 requests the CD controller 2 to read the data designated by the parameters from the CD-ROM. 
     (5) The CD controller 2 controls the CD drive 1 to read audio, video and/or computer data from the CD-ROM. The memory controller 5 writes the data read into the local memory 4 via the local bus 14. Each of the audio, video and computer data of the CD-ROM XA format includes an attribute byte for every 1 sector (about 2 kilo-bytes) of data. 
     (6) The MPU 3 checks the data in the local memory 4 for an audio attribute. 
     (7) The MPU 3 sends the data having the audio attribute to the ADPCM decoder 6. 
     (8) The ADPCM decoder 6 decodes the audio data by expanding the compressed-format audio data and reproduces a voice. 
     (9) The CPU 8 reads the data having the computer attribute from the local memory 4 for data processing. 
     Thus, by referring to the attribute bytes stored in the local memory 4, the CPU 8 can easily identify the data necessary for its processing, thus reducing the CPU load. Furthermore, by providing a video control processor 10 under the control of the MPU 3 in the same way as tile ADPCM decoder 6 and by using the local memory 4 as a buffer for the audio, video and computer data, voice-reproducing and graphics displaying can be made in synchronization with the operations of the CPU 8, thus reducing the CPU load. 
     As is apparent by the above description, the present invention can provide a data processing system which can control both the CD-ROM format or CD-ROM XA format disks with a single hardware circuit and by selectively using appropriate software. Therefore, the present invention can provide an economical, small-sized and reliable data processing system which can control both the CD-ROM format or CD-ROM XA format disks.