1. Field of the Invention
The invention relates to a method for extra appending data in a fixed capacity of data zone, and in particular to a method for of extra appending data in a multiple layer disc with a fixed capacity of data zone.
2. Description of the Related Art
Referring to
An exemplary embodiment of a method for extra appending data in a multiple layer disc is provided. The capacity of the data zone in the multiple layer disc is fixed, and each layer comprises a plurality of appended sessions. The multiple layer disc comprises an inner drive area. The multiple layer disc is mounted. It is determined whether data is appended in zones following a middle zone. If the data is appended in the zones following the middle zone, a first jump address is obtained from a table of extended contents to serve a start address of appending the data. Data is appended to the multiple layer disc. An end address of appending the data is recorded in the table of extended contents to serve a second jump address for a next appending operation.
An exemplary embodiment of a method for reading data extra appended in a multiple layer disc is provided. The capacity of data zone in the multiple layer disc is fixed, and each layer comprises a plurality of appended sessions. First, a read command is received. A start address is determined according to start, end, and jump addresses of each session for reading the data, and data of the multiple layer disc is read.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
Methods for extra appending data to the fixed capacity of a data zone are provided.
Referring to
Generally, a host and an operation system use a logic block address (LBA) for addressing. In practice, the logic block address (LBA) must to be transformed to a physical block address (PBA) when an optical disc drive performs an addressing operation, so that the subsequent access operations can be performed. The conventional transformation operation is effective for a session 1 (data zones 203 and 213), but not for the subsequent session 2 (data zones 206 and 216) and session 3 (data zones 207 and 217). In this embodiment, a temporary addressing operation is performed by the layer-jump address recorded in the seventh item with a non-user address (NUA) defined in the following. First, the logic block address (LBA) is transformed to the non-user address (NUA), and then the non-user address (NUA) is transformed to the physical block address (PBA), so that data of the sessions 2 and 3 is addressed. The detail is described in the following:
The logic block addresses (LAB) of each session are defined as follows: start, jump, and end addresses of the logic block address (LAB) of the session 1 are 0x000H (“H” representing the value is hexadecimal), 0x17FH, and 0x2FFH, respectively; start, jump, and end addresses of the logic block address (LAB) of the session 2 are 0x300H, 0x117FH, and 0x1FFFH, respectively; start, jump, and end addresses of the logic block address (LAB) of the session 3 are 0x2000H, 0x3FFFH, and 0x5FFFH, respectively. The corresponding non-user address (NUA) is obtained by adding the logic block address (LAB) and a predetermined value assumed as 0x30000.
Transformation of a logic block address (LAB) of 0x1100H (“H” representing the value is hexadecimal) to a physical block address (PBA) comprises the following. First, the logic block address (LAB) of 0x1100H is added to the predetermined value of 0x30000H to obtain a non-user address (NUA) of 0x31100H. The obtained non-user address (NUA) of 0x31100H is then compared with an end address of the non-user address (NUA) of the session 1. When the obtained non-user address (NUA) is larger than the end address of the non-user address (NUA) of the session 1 (0x31100H>0x302FFH), the obtained non-user address (NUA) is not in the session 1. When the obtained non-user address (NUA) is smaller than the end address of the non-user address (NUA) of the session 2 (0x31100H<0x31FFFH), the obtained non-user address (NUA) is in the session 2. Finally, the capacity of session 1 ((0x30300H-0x30000H)/2=0x180H) is subtracted from the obtained non-user address (NUA) of 0x31100H to obtain a physical block address (PBA) of 0x30F80H. Note that, the obtained physical block address is in the zero layer because 0x31100H is smaller than 0x3117FH.
Transformation of a logic block address (LAB) of 0x5500H to a physical block address (PBA) comprises the following. First, the logic block address (LAB) of 0x5500H is added to the predetermined value of 0x30000H to obtain a non-user address (NUA) of 0x35500H, and then the obtained non-user address (NUA) of 0x35500H is compared with end addresses of the non-user addresses (NUA) of the sessions 1 and 2. When the obtained non-user address (NUA) is larger than the end addresses of the non-user addresses (NUA) of the sessions 1 and 2 (0x35500H>0x302FFH, and 0x35500H>0x31FFFH), the obtained non-user address (NUA) is in neither the session 1 nor the session 2. When the obtained non-user address (NUA) is smaller than the end address of the non-user address (NUA) of the session 3 (0x33300H<0x35FFFH), the obtained non-user address (NUA) is in the session 3. Finally, the capacity of sessions 1 and 2 ((0x32000H−0x30000H)/2=0x1000H) is subtracted from the obtained non-user address (NUA) of 0x35500H to obtain a value of 0x34500H and then obtain a physical block address (PBA) of ˜0x34500H by a negative operation. The negative operation is required because 0x3450H is larger than 0x33FFFH (ump address of the session 3) and the physical block address is in the first layer.
Step 502: starting to mount a disc;
Step 504: reading a table of contents (TOC) of the disc;
Step 506: determining whether the table of contents (TOC) exists or not. If the table of contents (TOC) exists, proceed Step 510; if not, proceed Step 508;
Step 508: reading contents of the table of contents (TOC);
Step 510: reading contents of a table of extended contents (TOEC);
Step 512: transforming a physical block address (PBA) to a non-user address (NUA);
Step 514: finishing mounting to complete an operation of recognizing disc;
Step 516: determining if a read operation or an appending operation is performed. If the read operation is performed, proceed Step 518; if the appending operation is performed, proceed Step 520;
Step 518: transforming an address where data is read from a logic block address (LAB) to a non-user address (NUA), and then from the non-user address (NUA) to a physical block address (PBA) to complete an addressing operation and perform the read operation;
Step 520: determining whether data is appended in zones following a middle zone. If so, proceed Step 522; if not, proceed Step 590;
Step 522: determining whether a specific command from a host indicating that data can be appended in zones following a middle zone is received. If so, go to Step 526; if not, go to Step 524;
Step 524: refusing the appending operation;
Step 526: transforming an address where data is appended from a logic block address (LAB) to a non-user address (NUA), and then from the non-user address (NUA) to a physical block address (PBA) to complete an addressing operation and perform the read operation;
Step 528: writing data in a multiple layer disc;
Step 530: storing a new table of extended contents (TOEC) in an inner drive;
Step 590: end.
Compared with a conventional appending method, in the invention, when data has been appended from a lead-in zone to a lead-out zone (the capacity of the data zone is fixed), data can be appended continuously many times in the outer drive area. Moreover, reading or appending data can be performed via non-user addresses (NUA).
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.