技術分野 Technical field
本発明は、 情報記憶装置であって、 特に、 静止画像などの画像情報を記憶するた めのデジタルカメラに使用される情報記憶装置に関するものである。 従来技術 The present invention relates to an information storage device, and more particularly to an information storage device used for a digital camera for storing image information such as a still image. Conventional technology
静止画像を主として記録するデジタルカメラの記録装置としては、半導体メモリ、 ハードディスク、光磁気デイスクなどが利用されている。半導体メモリは、比較的、 記録容量が少ないという欠点があり、デジタルカメラにおける静止画から動画記録 への、 機能の移行に伴い、 小型大容量の記録装置が望まれている。 そこで、 ハード ディスクや、光磁気ディスク、 D V Dディスク等の記録媒体をデジタルカメラの記 録装置として利用することが計画され、研究開発が行われている。 このような記録 媒体では、 今までの半導体メモリとは違った処理が必要となり、 例えば、 ハードデ イスクを用いる場合には、ハードディスクの初期化の問題がある。特開平 8— 7 6 9 3 3号公報には、不良セクタを検出しない簡易フォーマツトと不良セクタを検出 する標準フォ一マヅトの二つのフォーマツト動作を用意して、結果的に記録動作の 開始を早めることができるデジタルカメラについて、 開示がある。 As a recording device of a digital camera that mainly records a still image, a semiconductor memory, a hard disk, a magneto-optical disk, and the like are used. Semiconductor memories have the disadvantage that they have a relatively small recording capacity, and with the shift in functions from digital still images to moving image recording in digital cameras, small and large-capacity recording devices are desired. Therefore, it is planned to use a recording medium such as a hard disk, a magneto-optical disk, and a DVD disk as a recording device of a digital camera, and research and development are being conducted. Such a recording medium requires processing different from conventional semiconductor memory. For example, when a hard disk is used, there is a problem of initialization of the hard disk. Japanese Patent Application Laid-Open No. Hei 8-767693 provides two format operations, a simple format that does not detect a bad sector and a standard format that detects a bad sector, and consequently hasten the start of a recording operation. There are disclosures about digital cameras that can.
また、 光磁気ディスクなどの記録媒体を用いた記憶装置については、 デジ夕ルカ メラの画像を記録した場合、 その画像を、 コンピュータなどで利用する場合には、 半導体メモリ力一ド等のように、デジタルカメラからメモリカードを外してデータ を転送することが難しく、デジタルカメラとパーソナルコンピュータを所定のィン 夕一フェースで接続して、 デ一夕の転送を行うことが主な使用方法となる。 発明の概要 In the case of a storage device using a recording medium such as a magneto-optical disk, when an image of a digital camera is recorded, and when the image is used by a computer or the like, a semiconductor memory card is used. It is difficult to transfer data by removing the memory card from the digital camera, and the main usage is to connect the digital camera to a personal computer with a predetermined interface to perform data transfer. . Summary of the Invention
以上のように、パーソナルコンピュータと接続されて使用される場合には、光磁 気ディスクを利用した情報記憶装置に対して、パーソナルコンピュータから、 デ一 夕の読み出しや、 書き込みの要求が出されることになる。 このとき、情報記憶装置 As described above, when used in connection with a personal computer, a request to read or write data from the personal computer to the information storage device using a magneto-optical disk must be issued. become. At this time, the information storage device
一 1一
に装着されている、 光磁気ディスクが、未使用のものである場合でも、 パーソナル コンピュータからの読み出し要求があった場合、読み出しエラーが生じないように、 装置を構成しなければならない。 One one one Even if the magneto-optical disk mounted on the device is unused, the device must be configured so that a read error does not occur when a read request is issued from a personal computer.
本発明においては、光磁気ディスクを用いた情報記憶装置において、外部からの データ読み出し要求に対して、 もし、 光磁気ディスクが未使用の状態であれば、 予 め定められた形式のデータを読み出しデ一夕として、返すものである。そこで、 こ の読み出し要求に対応した、光磁気ディスクの領域が、未使用かどうかを判別する 手段と、未使用である場合に、所定の形式のデ一タを形成し、読み出しデータとし て出力する手段を備えるものである。 According to the present invention, in an information storage device using a magneto-optical disk, in response to an external data read request, if the magneto-optical disk is in an unused state, data of a predetermined format is read. It will be returned as a night. Therefore, means for determining whether or not the area of the magneto-optical disk corresponding to the read request is unused, and forming data in a predetermined format when unused, and outputting the data as read data It is provided with means for performing.
また、本発明の別の特徴によれば、未使用かどうかを判別する手段は、読み出し 処理により得られたデ一夕が所定の形式であるかを検出する手段である。 図面の簡単な説明 According to another feature of the present invention, the means for determining whether or not the data is unused is a means for detecting whether or not the data obtained by the reading process has a predetermined format. BRIEF DESCRIPTION OF THE FIGURES
図 1は本発明の一実施例を示す概略プロック図である。 FIG. 1 is a schematic block diagram showing one embodiment of the present invention.
図 2は、 実施例における初期化処理を示すフローチャートである。 FIG. 2 is a flowchart illustrating an initialization process according to the embodiment.
' 図 3は、 実施例のおける読み出し処理を示すフローチャートである。 - 図 4は、 実施例における書き込み処理を示すフローチャートである。 FIG. 3 is a flowchart showing a reading process according to the embodiment. FIG. 4 is a flowchart illustrating a write process according to the embodiment.
図 5は、 光磁気ディスクを示す平面図である。 FIG. 5 is a plan view showing a magneto-optical disk.
図 6は、 E C Cブロックの概要を示す概略図である。 FIG. 6 is a schematic diagram showing an outline of the ECC block.
図 7は、' I Dデータの下位ビットを表す概略図である。 FIG. 7 is a schematic diagram showing lower bits of 'ID data.
図 8は、各プロックが未使用であるかどうかの判別アルゴリズムを示すフ口ーチ ヤー卜である。 発明を実施するための最良の形態 FIG. 8 is a flowchart showing an algorithm for determining whether each block is unused. BEST MODE FOR CARRYING OUT THE INVENTION
以下、本発明を使用したデジタルカメラについて説明する。デジタルカメラの外 観や、 動作の概略については、 図示及び詳説を省略するが、 光学系により C C D上 に結像されたイメージをデジタル処理し、 J P E Gなどの所定の圧縮処理を施して、 記録に適したフォーマットに変換して、半導体メモリ力一ドなどの記録媒体に記録 するものであり、 周知のものと同様である。
図 1は、デジ夕ルカメラの主要部分とパーソナルコンピュータの関係を示すプロ ック図である。カメラ部 1は、 C C Dからの映像信号に対して所定の処理を行うブ ロック、 C P U 2は、 カメラ部 1や、 光磁気ドライブ 3の動作を制御するマイクロ コンピュータであり、 光磁気ドライブ 3は、 光磁気ディスク 4に対して、 所定の情 報を記録'再生するブロックである。 5は、 I E E E 1 3 9 4のイン夕一フェース 部であり、光磁気ドライブ 3とパーソナルコンピュータ 6の間のデ 夕及びコマン ドの伝送を仲介する。 7は、 デジタルカメラのディスプレイであり、 カメラ操作の ための種々の表示を行う。後で、 説明するが、 光磁気ディスクの欠陥により、 動画 記録を続けられないときなどには、 その旨の表示が行われる。 ディスプレイ 7は、 カメラの制御のためのメニュー表示や、 記録された静止画、 動画の再生表示、 さら には、 撮影の際のビューファインダ一の機能を備える。 · また、 8は、メモリであり、 C P Uの作業用などに用いられる。例えば、後述の、 光磁気ディスク 4の欠陥領域に関する情報を、光磁気ディスクから読み取り、一時 的に保存するなどの用途に使用される。 Hereinafter, a digital camera using the present invention will be described. Although the illustration and detailed description of the appearance and operation of the digital camera are omitted, the image formed on the CCD by the optical system is digitally processed, subjected to predetermined compression processing such as JPEG, and recorded. It is converted into a suitable format and recorded on a recording medium such as a semiconductor memory card, which is the same as a well-known one. Figure 1 is a block diagram showing the relationship between the main parts of a digital camera and a personal computer. The camera unit 1 is a block that performs predetermined processing on the video signal from the CCD, the CPU 2 is a microcomputer that controls the operation of the camera unit 1 and the magneto-optical drive 3, and the magneto-optical drive 3 is This block records and reproduces predetermined information with respect to the magneto-optical disk 4. Reference numeral 5 denotes an interface section of IEEE 1394, which mediates data transmission and command transmission between the magneto-optical drive 3 and the personal computer 6. Reference numeral 7 denotes a display of the digital camera, which performs various displays for operating the camera. As will be described later, when the recording of a moving image cannot be continued due to a defect in the magneto-optical disk, an indication to that effect is displayed. The display 7 has a menu display for controlling the camera, a playback display of recorded still images and moving images, and a viewfinder function for shooting. · Reference numeral 8 denotes a memory, which is used for CPU work. For example, it is used for the purpose of reading information about a defective area of the magneto-optical disk 4 described later from the magneto-optical disk and temporarily storing the information.
デジタルカメラによる撮影動作は、簡単に説明すると、 シャッター操作により C c こ蓄積されたイメージ情報が、 カメラ部 1において、 信号処理され、 C P U 2 の制御に基づき、 光磁気ドライブ 3において記録される。 また、 光磁気ディスク 4 に記録された画像情報は、 C P U 2の制御に基づき読み出されて、 ディスプレイ Ί に表示されたり、 ィン夕一フェース 5を介して、パーソナルコンピュータ 6に伝送 される。 In brief, the photographing operation of the digital camera is as follows. The image information accumulated by the shutter operation is signal-processed in the camera unit 1 and recorded in the magneto-optical drive 3 based on the control of the CPU 2. The image information recorded on the magneto-optical disk 4 is read out under the control of the CPU 2, displayed on the display 、, or transmitted to the personal computer 6 via the interface 5.
光磁気ディスク 4に対する記録及び再生動作は、 よく知られているので、詳しく は説明しないが、 光 (熱)磁気効果を利用して、 記録再生を行うものである。 図 5は、 光磁気ディスク 4を示す正面図であり、 図の内側の領域 5 1が、 ディスク欠 陥管理領域であり、 その外側の領域 5 2に、実際にユーザ一が使用するデ一夕が記 録される。光磁気ディスク 4は、 それを効率よく利用するために、 セクタと呼ばれ る単位領域に論理上分割されており、所定のアドレッシング法により、希望セクタ を指定して、 記録若しくは再生を行うことができる。 また、 個々のセクタは、 製造 工程で、 不良となる可能性があるため、 記録再生ができない場合もある。 そのよう なセクタは、特定しておいて、将来の記録再生に使わないよう管理することが必要
である。 そのために、 ディスク欠陥管理領域 (D MA) が利用される。 The recording and reproducing operations for the magneto-optical disk 4 are well known and will not be described in detail, but the recording and reproducing are performed by using the magneto-optical (thermal) magnetic effect. FIG. 5 is a front view showing the magneto-optical disk 4. The area 51 inside the figure is a disk defect management area, and the area 52 outside the disk defect management area is a disk drive actually used by the user. Is recorded. The magneto-optical disk 4 is logically divided into unit areas called sectors in order to use it efficiently, and it is possible to perform recording or reproduction by designating a desired sector by a predetermined addressing method. it can. In addition, since individual sectors may be defective during the manufacturing process, recording and reproduction may not be possible. Such sectors need to be identified and managed so that they will not be used for future recording and playback. It is. For this purpose, the Disk Defect Management Area (DMA) is used.
すなわち、 不良と判断されたセクタについては、 そのアドレスが(場合によって は代替領域のアドレスも) D MA 5 1に記録される。従って、 次にそのディスクを 利用するときには、 D MA 5 1をチェックすることにより、欠陥領域に記録再生す ることなく、 記録再生処理を行うことができる。 That is, for a sector determined to be bad, its address (and in some cases the address of the replacement area) is recorded in the DMA 51. Therefore, the next time the disc is used, the recording / reproducing process can be performed by checking the DMA 51 without recording / reproducing in the defective area.
ところで、 この欠陥管理の方法にもディスク利用の効率を考えて、 2つの種類が 利用される。 1つは、 光磁気ディスクの初めての利用の前に、 ディスクのサーティ フアイを行うことにより、欠陥領域の検出を行う方法であり、 これを第一欠陥管理 法とする。 この方法によれば、検出された欠陥領域のアドレスは、 D MA領域に記 録され、 以後利用されることはない。 By the way, two types of defect management methods are used in consideration of the efficiency of disk use. One method is to detect defective areas by certifying the disk before using the magneto-optical disk for the first time. This is the first defect management method. According to this method, the address of the detected defective area is recorded in the DMA area and is not used thereafter.
2つめの方法は、主として、サーティフアイ後に発見された欠陥領域を管理する 方法であり、 光磁気ディスクに書き込みを行い、 書き込んだデータを読み出して、 デ一夕の正しさを確認するが、 このとき、 欠陥領域であると判断した場合に、 欠陥' 領域及び代替領域の登録を行う方法 (第二欠陥管理法) である。 この場合、 欠陥情 報は、 一旦、 本体のメモリ 8に記録されていて、 随時、 ディスク 4の D MA領域に 書き込まれることになる。 The second method is mainly to manage the defective area found after the certification, and writes the data to the magneto-optical disk, reads the written data, and checks the correctness of the data. At this time, when it is determined that the area is a defect area, a method of registering a defect area and an alternative area (second defect management method). In this case, the defect information is temporarily recorded in the memory 8 of the main body, and is written to the DMA area of the disk 4 as needed.
この二つの方法は、 代替領域の割り当て方法が異なる。第一の管理方法では、 欠 陥セクタを検出すると、 すく、次の良セクタが利用されることになる。 そのため、 そ の欠陥領域を含んで、記録再生を行う場合でも記録再生のためのピックァップの不 規則な移動が必要ない。一方、 第二の管理方法では、 代替領域として、 専用のスぺ ァ領域を使用するので、 ピックアップの移動が必要となる場合が考えられる。従つ て、 第二の管理方法を用いた場合、 記録再生の見かけのレートが、 低下する可能性 がある。 すなわち、 高いレートで記録再生を行わなければならない、 動画の記録再 生などの場合、記録再生動作がおかしくなってしまう場合の対策が必要である。具 体的には、第二の管理方法による欠陥領域の管理が、多く必要となる光磁気デイス クに対しては、 動画記録ができないようにする必要がある。 These two methods differ in the method of assigning the alternative area. In the first management method, when a defective sector is detected, the next good sector is used immediately. Therefore, even when performing recording and reproduction including the defective area, irregular movement of the pickup for recording and reproduction is not necessary. On the other hand, in the second management method, since a dedicated spare area is used as an alternative area, it may be necessary to move the pickup. Therefore, when the second management method is used, the apparent rate of recording / reproduction may decrease. In other words, in the case of recording / playback at a high rate, recording / playback of moving images, etc., it is necessary to take measures to prevent the recording / playback operation from becoming abnormal. Specifically, it is necessary to make it impossible to record moving images on a magneto-optical disk that requires a large number of defect area management by the second management method.
前述のように、第一の管理方法は、 サーティフアイ動作によって行われる方法で あるから、 処理に時間がかかり、 サーティフアイを不可欠とした場合には、 シャツ 夕一チャンスを逃す恐れもある。そこで、デジタルカメラに本発明のような情報記
憶装置を使用する場合には、第二の管理方法だけで、欠陥管理を行うことができる ことが望ましい。 これが、 サ一ティフアイされていないディスクでも、 本装置が使 用できる理由である。サーティフアイした場合には、 ディスクのユーザ一領域全て に何らかのデ一夕が書き込まれると言うことであり、 この場合には、ュ一ザ一領域 に対するデ一夕読み出し要求があっても、データを読み出すことができる。しかし、 サ一ティフアイされていないディスクでは、 このことは保証されない。 As mentioned above, the first management method is a method performed by a certificate operation, so it takes a long time to perform the process. Therefore, information recording such as the present invention is When using a storage device, it is desirable that defect management can be performed only by the second management method. This is the reason why this unit can be used even on discs that have not been certified. In the case of the certification, some data is written to the entire user area of the disk. In this case, even if there is a data read request for the user area, the data is written. Can be read. However, this is not guaranteed for uncertified discs.
さて、光磁気ドライブ 3における読み書きのデータ単位は、誤り訂正のブロック を単位としている。実施例では、 光磁気ドライブ 3での記録再生は、 3 2キロノ イ トを単位として行われるが、外部からは、見かけ上、 2キロバイト単位で書き込み、 読み出しを行えるように、 制御できる。 つまり、 処理の単位の違いを、 ノ ヅファを 介した処理により吸収しなければならない。 The data unit for reading and writing in the magneto-optical drive 3 is in units of error correction blocks. In the embodiment, recording and reproduction in the magneto-optical drive 3 are performed in units of 32 kilobytes, but externally, control can be performed so that writing and reading can be performed in units of 2 kilobytes apparently. In other words, the difference in the processing unit must be absorbed by the processing via the server.
まず、 図 2に係る動作について説明する。本発明を実施するデジタルカメラにお いて、 光磁気ディスクが光磁気ドライブに設置されている場合に、電源がオンされ ると(ステップ 2 0 )、 まず、 光磁気ドライブ 3において、 ピックァヅプのレーザ一 パワーの調整を行い、 その他の回路の初期化を行う (ステップ 2 1 )。 そして、 D MAのデータをまず読みに行く (ステップ 2 2 )。 そして、 D MAのデ一タをチェ ヅクして、 D MAにデータが記録されているかどうか(D MAが未使用状態かどう か) をチェヅクする (ステヅプ 2 3 )。 チェヅクの方法については、 後述する。 D MAにデ一夕が記録されていないと言うことは、未使用のディスクであると言うこ とであるから、 以降の処理を滞りなく行うために、欠陥がないことを示すデータを 書き込む (ステヅプ 2 4 )。 D MAに正常なデータが記録されているときには、 そ のまま、 次の処理 (例えば、 図 3の処理) に移行する。 First, the operation according to FIG. 2 will be described. In the digital camera embodying the present invention, when the magneto-optical disk is installed in the magneto-optical drive and the power is turned on (step 20), first, in the magneto-optical drive 3, the pickup laser Adjust the power and initialize other circuits (step 21). Then, the data of the DMA is read first (step 22). Then, the data of the DMA is checked to check whether data is recorded in the DMA (whether the DMA is in an unused state) (step 23). The checking method will be described later. Since the fact that no data is recorded in the DMA means that the disc is an unused disc, write data indicating that there is no defect in order to perform the subsequent processing without delay ( Step 24). When normal data is recorded in the DMA, the process proceeds to the next process (for example, the process in FIG. 3).
図 3は、読み出しコマンドの処理を示すフローチャートである。図 2の初期化処 理が終わった後、 コマンド待ちの状態となる (ステップ 3 1 )。 例えば、 パ一ソナ ルコンピュータ 6から、ィン夕一フェース 5を介してコマンドが与えられた場合に、 ディスクからのデ一夕の読み出しコマンドかどうかがチエックされる(ステップ 3 2 )。読み出しコマンドでなければ、他のコマンド、例えば、書き込みコマンド (図 4にて説明される) などの処理が、 ステップ 3 3で行われ、 コマンド待機状態に戻 る。
読み出しコマンドであった場合には、 指定された領域(論理アドレス)のデータ がディスクより読み出されて、所定のバヅファに一時的に保管される(ステヅプ 3 4 )。 そのバッファの内容をチェックすることにより、 指定されたディスク領域が 未使用領域かどうかがチェックされる (ステップ 3 5 )。 未使用領域かどうかのチ エック方法の詳細は、 後述する。判別結果が、 未使用領域であれば、 ステップ 3 6 に進んで、読み出しを指定されたサイズのゼロ、 すなわち、 所定の形式のデータを 読み出しバヅファに設定して、 次のステップに進む。未使用領域でなければ、 その まま読み出したデ一夕を使用することができるので、次のステップ 3 7に進む。ス テヅプ 3 7では、読み出しバッファに設定されたデ一夕を再生デ一夕として、 デー 夕読み出し要求のあったデバイス、 例えば、 パーソナルコンピュータに伝送する。 この処理により、パーソナルコンピュータ 6には、 ディスクが未使用ディスクで ある場合若しくは、 ディスクの指定した領域が未使用である場合でも、所定の形式 のデータが返されることになる。 そのため、 パーソナルコンピュータ側で、 本実施 例の情報記憶装置を故障していると判断することが防止できる。つまり、 I E E E 1 3 9 4や A T A、 S C S Iなどのインターフェースを介して、光磁気ドライブ 3 をコンピュータ用の汎用記憶装置として使用する場合に、コンピュータ側により ド ライブの不調と判断される恐れがない。本光磁気ドライブ 3を利用するコンビユー 夕の O Sには種々のものが考えられ、 ファイルシステムも多様であるので、光磁気 ドライブに対するコマンドの実態も予想できないが、上記対策により、 問題がなぐ なる。 FIG. 3 is a flowchart showing processing of the read command. After the initialization process in Fig. 2 is completed, the system enters a command waiting state (step 31). For example, when a command is given from the personal computer 6 through the interface 5, it is checked whether the command is a read command for data read from the disk (step 32). If it is not a read command, processing of another command, for example, a write command (described in FIG. 4) is performed in step 33, and the process returns to the command waiting state. If it is a read command, the data in the designated area (logical address) is read from the disk and temporarily stored in a predetermined buffer (step 34). By checking the contents of the buffer, it is checked whether the specified disk area is an unused area (step 35). The details of how to check for unused areas will be described later. If the discrimination result indicates that the area is an unused area, the flow advances to step 36 to set the read size to zero of a designated size, that is, data of a predetermined format in a read buffer, and then to the next step. If it is not an unused area, the data read out as it is can be used, and the process proceeds to the next step 37. In step 37, the data set in the read buffer is transmitted as a reproduction data to the device that has requested the data read, for example, a personal computer. By this processing, data in a predetermined format is returned to the personal computer 6 even when the disc is an unused disc or when the designated area of the disc is unused. Therefore, it is possible to prevent the personal computer from determining that the information storage device of the present embodiment is out of order. In other words, when the magneto-optical drive 3 is used as a general-purpose storage device for a computer via an interface such as IEEE1394, ATA, or SCSI, there is no possibility that the computer will determine that the drive is malfunctioning. Various OSs can be considered for the convenience of using the magneto-optical drive 3, and since there are various file systems, the actual status of commands for the magneto-optical drive cannot be predicted, but the above measures will solve the problem.
図 3のフローチャートについての説明では、指定された領域について、未使用で あるかどうかの判別を行ったが、使用するディスク全体が、未使用であるかの判別 を、 例えば、 D MA領域が未使用 (未記録) であるかどうかにより判断することも できる。 In the description of the flowchart in FIG. 3, it is determined whether or not the specified area is unused.However, it is determined whether or not the entire disk to be used is unused. Judgment can also be made based on whether it is used (unrecorded).
図 4は、 書き込み動作を示すフローチャートである。 図 3と同様、 最初は、 コマ ンド待ちの状態であり、 ライ トコマンド以外のコマンドであれば、 ステヅプ 4 3を 経てコマンド待ちの状態に戻る。ライ トコマンドは、書き込みすべき 2キロバイ ト を単位とした量(2キロバイ トの n倍: nは正の整数) のデータと書き込み先の論 理アドレスを伴っており、 コマンドが書き込みコマンドである場合には、 まず、 書
き込みすべき 2キロバイ ト単位のデータがメモリ 8上の所定のバッファ 1に保管 される (ステップ 4 4 )。 FIG. 4 is a flowchart showing the write operation. As in FIG. 3, the command is initially in a command waiting state, and if it is a command other than a write command, it returns to the command waiting state via step 43. A write command is accompanied by an amount in units of 2 kilobytes to be written (n times 2 kilobytes: n is a positive integer) and the logical address of the write destination, and the command is a write command. In case, first, calligraphy The data of 2 kilobytes to be written is stored in the predetermined buffer 1 on the memory 8 (step 44).
先に説明したように、 光磁気ドライブでの書き込み ·読み出しのデータ単位が、 2キロバイ卜より大きい 3 2キロバイ ト単位であるから、バッファ 1のデ一夕をそ のまま記録することはできない。そこで、書き込みすべき論理ァドレスを含む E C Cブロックのデータが'、 まず、 光磁気ディスク 4から読み出され、 メモリ 8上のバ ヅファ 2に保管される(ステップ 4 5 )。そして、 ステップ 4 6において、 読み出さ れた E C Cプロヅクのデータをチヱヅクして、そこが未使用領域かどうかがチ工ヅ クされる (ステヅプ 4 6 )。 チェヅク方法については、 後述する。 As described above, since the data unit of writing and reading in the magneto-optical drive is 32 kilobytes, which is larger than 2 kilobytes, the data in the buffer 1 cannot be recorded as it is. Therefore, the data of the ECC block including the logical address to be written is first read from the magneto-optical disk 4 and stored in the buffer 2 on the memory 8 (step 45). Then, in step 46, the read data of the ECC work is checked to check whether or not the data is an unused area (step 46). The check method will be described later.
未使用領域かどうかのチェックにより、未使用領域であると判別された場合には、 ステップ 4 7に進み、 ノ ヅファ 2の内容を全てゼロとして、次のステヅプ 4 8に進 む。ステップ 4 8においては、書き込みコマンドで指定された論理アドレスに対応 する部分に、 ノ ヅファ 1の書き込みデータを上書きして、 その後、 その E C Cプロ ック全体を光磁気ディスクに書き込む。 そして、 書き込みコマンド処理を終えて、 兀に民る。 If it is determined that the area is an unused area by checking whether or not the area is an unused area, the process proceeds to step 47, where the contents of the buffer 2 are all set to zero, and the process proceeds to the next step 48. In step 48, the data corresponding to the logical address specified by the write command is overwritten with the write data of the buffer 1, and then the whole ECC block is written to the magneto-optical disk. Then, after completing the write command processing, it will be a verge.
次に未使用領域に関するチヱヅク方法について説明する。 先に説明したように、 光磁気ドライブでのデータの書き込み ·読み出しは、誤り訂正の単位である E C C プロヅク単位で行われる。 E C Cプロックは、 さらに複数のプロヅク、 例えば、 1 6個のブロック化されており、 それぞれのブロックに、 そのブロックの論理アドレ スゃデ一夕の種別などを示すデータ I Dが含まれている。 このデ一夕 I D 6 5は、 4バイトの大きさがあり、図 6に示されるようになっている。デ一夕 I Dに対して、 その誤りを検出するためのデ一夕 6 6が、そのブロックに設けられている。そして、 データ I D 6 5と誤り検出データ 6 6の二つを用いて、そのプロヅクのデータ I D が誤っているかどうかが検出できる。誤り検出デ一夕の内容や検出の方法について は、 よく知られた方法があるので、 説明を省略する。 Next, a check method for an unused area will be described. As described above, writing and reading of data in the magneto-optical drive are performed in units of ECC programs, which are units of error correction. The ECC block is further divided into a plurality of blocks, for example, 16 blocks, and each block includes data ID indicating the type of the logical address and the like of the block. This data ID 65 has a size of 4 bytes and is as shown in FIG. For the data ID, a data filter 66 is provided in the block to detect the error. Then, using two of the data ID 65 and the error detection data 66, it can be detected whether or not the data ID of the program is incorrect. There is a well-known method for the details of the error detection and the method of detection, so the description is omitted.
先に触れたように、 I Dデータ 6 5には、 そのブロックの論理アドレスも含まれ ているため、 実装に依存するが、 論理アドレスは、 所定の順序になっているはずで ある。実施例においては、 I Dデータの最下位 4ビヅトは、 図 7に示すように 「0 0 0 0」 から、 「1 1 1 1」 まで、 順番に並んでいる。 また、 更に、 I Dデータ 6
5は、 そのブロックの属性をあらわすデータも含んでいる。 As mentioned above, since the ID data 65 also includes the logical address of the block, it depends on the implementation, but the logical addresses should be in a predetermined order. In the embodiment, the four least significant bits of the ID data are arranged in order from “0000” to “111” as shown in FIG. In addition, ID data 6 5 also includes data representing the attributes of the block.
各ブロックが、 未使用であるかの判別のアルゴリズムは、 図 8に示されている。 読み込まれている E C Cプロックにおける、 1 6個のプロヅクのデータ I D 6 5と 対応する誤り検出データ 6 6とから、それぞれのデータ I Dが正しいかどうかチェ ヅクする。全てのデータ I Dが誤りであると検出した場合には、未使用領域である と判断する (ステップ 8 2 )。 いくつかの I Dデ一夕が正しい場合は、 次のステツ プ 8 3に進んで、 I Dデ一夕の下位 4ビヅトの並びが、正しいと判断された I Dデ —夕において、 全て間違っているかどうかがチヱヅクされ、正しいと判断された I Dデータの全てにおいて間違っている場合には、未使用領域と判断される。順番が 正しいブロックが一つでもある場合には、次のステップ 8 4に進み、 ブロックの属 性データをチェヅクする。 そして、 正しいと判断された I D The algorithm for determining whether each block is unused is shown in FIG. The data ID 65 of the 16 blocks and the corresponding error detection data 66 in the read ECC block are checked for correctness of each data ID. When it is detected that all data IDs are erroneous, it is determined that the area is an unused area (step 82). If some of the ID data are correct, proceed to the next step 83 to determine whether the order of the lower 4 bits of the ID data is correct in the ID data determined to be correct. Is checked, and if all of the ID data determined to be correct are incorrect, it is determined that the area is unused. If there is at least one block in the correct order, proceed to the next step 84 and check the attribute data of the block. And the ID that was determined to be correct
データの全てのデータの属性データが、通常、予定されているデ一夕でない場合は、 未使用領域と判断する。言い換えれば、 上の 3つの条件のうち、 一つでも満足すれ ば、 その E C Cブロックを未使用領域として、 判断することになる。 If the attribute data of all the data is not normally the scheduled data, it is determined to be an unused area. In other words, if at least one of the above three conditions is satisfied, the ECC block is determined as an unused area.
この方法によれば、 未使用領域の判別が、 確実にでき、 使用領域を誤って、 未使 用領域と判別する恐れがなくなる。 According to this method, the unused area can be reliably determined, and there is no possibility that the used area is erroneously determined as the unused area.
さて、上記の光磁気記録再生装置は、デジタルカメラに使用されるものであるが、 デジ夕ルカメラの記録対象として、 静止画と動画が考えられる。一般に、 静止画と 比べて動画のデータ量は多いので、特に、画面サイズの大きい動画を記録する場合 に必要とされる、 記録再生装置の伝送レートは、 非常に大きくなる。一方、 無欠陥 の光磁気ディスクを製造することは難しいので、光磁気記録再生装置に使用される 光磁気ディスケは、 何らかの欠陥領域を含んでいることが多い。先に説明した、 第 一の欠陥管理方法では、ディスクのサーティフアイを行うことが前提となっており、 サーティフアイに時間がかかるため、使用する光磁気デイスクを全てサ一ティファ ィすることは、 撮影を迅速に行うことを考えると、 実用的ではない。 そこで、 本実 施例の光磁気記録再生装置では、光磁気ディスクのサーティフアイは、必要ではな いようになっている。言い換えれば、サ一ティフアイされていない光磁気ディスク を使用することができる。 The above-described magneto-optical recording / reproducing apparatus is used for a digital camera. Still images and moving images can be considered as recording targets of a digital camera. Generally, since the amount of data of a moving image is larger than that of a still image, the transmission rate of a recording / reproducing apparatus required for recording a moving image having a large screen size becomes extremely large. On the other hand, since it is difficult to manufacture a defect-free magneto-optical disk, a magneto-optical disk used in a magneto-optical recording / reproducing apparatus often includes some defective area. The first defect management method described above is based on the premise that the disk is to be certified, and the certification is time-consuming. Therefore, it is difficult to certify all the magneto-optical disks to be used. It is not practical given the quick shooting. Therefore, in the magneto-optical recording / reproducing apparatus of the present embodiment, the certification of the magneto-optical disk is not required. In other words, a magneto-optical disk that has not been certified can be used.
そのため、 データを書き込んだ場合には、 いったん読み出して、 読み出した結果
と書き込みデ一夕を比較し、 一致しない場合には、 そのセクタを欠陥領域と判断し て、 第 2の方法で、 欠陥管理を行う。光磁気ディスクの D MA領域には、 第二の欠 陥管理による、欠陥セクタの個数を保存する領域も設けられており、欠陥領域の個 数が分かるようになつている。 Therefore, when data is written, it is read once and the read result And the write data are compared. If they do not match, the sector is determined to be a defective area, and defect management is performed by the second method. The DMA area of the magneto-optical disk is also provided with an area for storing the number of defective sectors by the second defect management, so that the number of defective areas can be determined.
先に説明したように、第二の欠陥管理方法を利用すると、光磁気ディスクに対し て、記録再生用のピックァヅプを移動(シーク)させなければならないような、代替 領域の割り当てが、 どうしても生じてしまう。 その割り当ての個数が多くなると、 大量のデータを連続して記録しょうとする場合 (例えば、 動画の記録の場合)、 記 録動作の見かけの転送レ一トが、低下してしまい、記録動作が停止してしまうおそ れがある。そこで、本実施例では、欠陥領域の個数が、所定個数を越えた場合には、 高速での動作を必要とする処理、 例えば、 動画の記録を禁止するようにしている。 具体的には、 C P U 2が利用するメモリ 8には、光磁気ディスクの欠陥領域の個 数を記録しているので、 この個数が、 所定個数を超えた場合には、 C P Uのフラグ をセットし、ユーザーからの動画記録要求があった場合でも、所定のメッセージを、 ディスプレイ 7に表示して、 要求を受け入れないようにする。 これにより、 ュ一ザ 一は、 別のディスクを使うなどして、 記録動作が途中で、 中断することを防止でき る。 また、 場合によっては、 動画記録要求を拒否する欠陥領域個数の少し前の個数 になった場合、 ディスプレイ 7により、光磁気ディスクの交換を通知する表示を行 うようにしても良い。 As described above, the use of the second defect management method inevitably results in the assignment of an alternative area to the magneto-optical disk in which the recording / reproducing pickup must be moved (seeked). I will. If the number of assignments increases, the apparent transfer rate of the recording operation will decrease when attempting to record a large amount of data continuously (for example, when recording a moving image), and the recording operation There is a risk of stopping. Therefore, in the present embodiment, when the number of defective areas exceeds a predetermined number, processing that requires high-speed operation, for example, recording of a moving image is prohibited. Specifically, the number of defective areas of the magneto-optical disk is recorded in the memory 8 used by the CPU 2, and if this number exceeds a predetermined number, the CPU flag is set. Even if there is a moving image recording request from the user, a predetermined message is displayed on the display 7 so as not to accept the request. This prevents the user from interrupting the recording operation halfway, such as by using another disk. In some cases, when the number of defective areas becomes slightly before the number of defective areas for which a moving image recording request is rejected, a display notifying that the magneto-optical disk has been replaced may be displayed on the display 7.
以上述べたように本発明では、パーソナルコンピュー夕など外部よりデータの要 求があった場合に、 ディスク全体若しくは、 要求の'あった領域が、 未使用であるか · どうかを判別して、未使用である場合には、所定の形式のデータを返すようにして いるので、パーソナルコンピュータからの要求に対して、適切な対応を行うことが できる。
As described above, according to the present invention, when an external data request such as a personal computer is made, it is determined whether the entire disk or the requested area is unused. When unused, data in a predetermined format is returned, so that an appropriate response can be made to a request from a personal computer.