The present invention will be described in detail in conjunction with the appending drawings. In the following descriptions, a double layer (DL) blu-ray rewritable (BD-RW) disc is described as an example. The present invention is also applicable to a single layer (SL) BD-RW disc. The DL BD-RW has two layers, Layer 0 and Layer 1. The DL blu-ray disc has four spare areas, spare areas ISA0, OSA0 in Layer 0, and spare areas ISA1, OSA1 in Layer 1.
A control unit 160 of the disc drive picks a physical address (e.g. PSN code) of the start position of each spare area as a physical start address and stores the start address into a specific location of the memory 140. The specific location can be referred to as a memory start address. The physical start address is the address of an available spare cluster for next use of each spare area. For example, for ISA0, the start address to be recorded is the address of the first spare cluster of the available entries. For OSA0, the start address to be recorded is the address of the last spare cluster of the available entries. This is because ISA0 is used from the least PSN, while OSA0 is used from the greatest PSN according to BD Specification. In addition, the disc drive further comprises a comparing circuit 150. The comparing circuit 150 is used to assist computing the size of each spare area, that is, the available entry number of each spare area. The size is also recorded in the memory 140.In the present embodiment, both the physical start address (e.g. PSN) and the spare area size (e.g. available entry number) for each spare area are recorded in the memory 140. However, in practice, it is possible to only record either the start PSN code or the available entry number into the memory 140. Preferably, such information is recorded into a vendor-specific field defined in a disc specification, for example, a field in a drive-specific area defined in BD Specification. According to BD Specification, some fields of the drive-specific area of a BD are freely usable by a disc drive,
During writing the disc, the physical start address of each spare area may change, and the size of the spare area may vary since the spare clusters of the spare area may be used. The different physical start address is stored in the memory start address the same mentioned above. For example, no matter what the physical start address of spare area ISA0 becomes, the physical start address is always stored in the same specific memory start address. That is, the physical start address stored in the location indicated by the specific memory start address is updated whenever the physical start address changes. However, the latest updated physical start address of the spare area ISA0 can always be obtained from this specific memory start address. By obtaining the start address and the size of each spare area, the boundary of each spare area can be known. Thus, it is possible to more efficiently utilize the spare areas of the disc 100. When the disc 100 is exited from the disc drive, the final physical start address and size of each spare area are written back to a specific location of the disc 100. For example, the new start address and size of each spare area can be recorded in the spare table in the memory 140, and the updated spare table is then written back to cover the old spare table of the disc 100. When the disc is used in the future, the recorded start addresses and sizes of the respective spare areas can be fetched as reference.
Whenever the spare entry is changed (e.g. the start address is different, the size of the spare area is reduced), the change is marked in the spare table stored in the memory 140. Alternatively, the changed data can be stored in another location of the memory 140.
ISA0 size=a (1)
OSA0 size=b-a (2)
OSA1 size=c-b (3)
ISA1 size=d-c (4)
wherein d is the total available size of all spare area, which is recoded in defect list header. It is noted that the comparing circuit 150 can be an individual block or integrated into the control unit 160 in hardware, firmware or software form.
While the preferred embodiments of the present invention have been illustrated and described in detail, various modifications and alterations can be made by persons skilled in this art. The embodiment of the present invention is therefore described in an illustrative but not restrictive sense. It is intended that the present invention should not be limited to the particular forms as illustrated, and that all modifications and alterations which maintain the spirit and realm of the present invention are within the scope as defined in the appended claims.