present invention relates to a method for recovering data; the method recovers data from an optical disc with a damaged table-of-contents (TOC) zone by the use of an optical disc drive.
Every optical information recording medium has a zone for storing session information. For example, the session information of a DVD+R disc is stored in a table-of-contents (TOC) zone. When a DVD+R disc is mounted in a disc drive, the drive retrieves the latest TOC block from the TOC zone to obtain the session information. However, there are occasions that the latest TOC block is missing, unreadable, or incorrect. If such DVD+R disc is mounted in the disc drive, the disc drive will not be able to retrieve the information on the disc because of the incorrect session information, and the data stored in the DVD+R disc could not be retrieved although it is still complete.
To successfully retrieve the information in such discs with invalid TOC block, the present invention provides a method for recovering the data. The method is devised to search the correct session information from other storing zones of the disc; therefore, the data stored in the disc can still be retrieved by the disc drive.
The present invention provides a method for recovering data from an optical disc with a damaged table-of-contents (TOC) zone by the use of an optical disc drive. According to a preferred embodiment of the invention, the latest valid TOC block is first identified from the TOC zone. Next, a last known session is found in accordance with the latest valid TOC block, and the last known session is then considered as the last possible session. A judging step is performed to judge if a zone for recording at least one session disc control block (SDCB) of the last possible session is full. If the zone for recording SDCB of the last possible session is full, a step is performed to detect whether a next session exists, based on the SDCB of the last possible session. If the next session exists, the detected next session is renewedly considered as the last possible session, and the foregoing judging steps are repeated until the last session is founded; in other words, the zone for recording SDCB of this last session is not full.
The method for recovering data of the invention utilizes the characteristic of the optical disc, in which the information is stored in different zones, so as to recover the invalid session information of the TOC zone. When the TOC zone is damaged, the session information can be retrieved from other storing zones of the optical disc. Therefore, the data stored in the optical disc can be retrieved, and the optical disc can be continuously used for recording.
The advantage and spirit of the invention may be understood by the following recitations together with the appended drawings.
The objective of the invention is to provide a method for recovering data; the method utilizes an optical disc drive to recover data from an optical disc with a damaged table-of-contents (TOC) zone.
In the method, a latest valid TOC block is first identified from the TOC zone. Next, a last known session is found in accordance with the latest valid TOC block, and the last known session is then considered as the last possible session. A judging step is performed to judge if a zone for recording at least one session disc control block (SDCB) of the last possible session is full. If the zone for recording SDCB of the last possible session is full, a step is performed to detect whether a next session exists, based on the SDCB of the last possible session. If the next session exists, the detected next session is renewedly considered as the last possible session, and the foregoing judging steps are repeated until the last session is found; in other words, the zone for recording SDCB of this last session is not full.
The invention deduces if a next session exists by judging whether the zone for recording SDCB of the session is full. That is because when the zone for recording SDCB is full, no more fragment information can be recorded in that session; therefore, that session should be closed, and a new session should be opened to allow more data to be added on the optical disc.
Referring to
First, step S10 is performed to retrieve a latest physical TOC block from the TOC zone as a current TOC block. Afterwards, step S11 is performed to judge if the current TOC block is valid. If the current TOC block is invalid, step S12 is performed to retrieve a TOC block before the current TOC block and then to renewedly consider it as the current TOC block, and steps S11 through S12 are repeated until a valid TOC block is found. If the current TOC block is valid, step S13 is performed to consider the current TOC block as the last valid TOC block; also, a last known session is found in accordance with the latest valid TOC block, and the last known session is then considered as a last possible session. Step S14 is then performed to judge if a zone for recording at least one SDCB of the last possible session is full, and, in this embodiment, the area is the inner disc/session identification zone of the last possible session. If NO in step S14, step S16 is performed to terminate the procedure for recovering data. If YES in step S14, step S15 is then performed to detect if a next session exists, based on the SDCB of the last possible session. If the next session does not exist, step S16 is performed to terminate the procedure for recovering data. If the next session exists, the detected next session is renewedly considered as the last possible session, and steps S14 through S15 are repeated until the result of step S15 is negative.
When the optical disc drive finishes the foregoing procedure for recovering data, the completed session information can be obtained. Besides, the optical disc drive can retrieve the data stored in each session of the optical disc in accordance with the session information. The procedure for the optical disc drive to record the recovered session information onto the optical disc is illustrated as follows.
Referring to
The optical disc drive is also used to record new data onto the optical disc, and the management information relative to the new data can be appended into the disc file in the optical disc drive during the recording of the new data onto the optical disc. After recording the new data onto the optical disc, the optical disc drive records the disc file into the TOC zone of the optical disc as a new TOC block.
With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
094116992 | May 2005 | TW | national |