Corrected DVD+RW track number and nwa with 52h READ TRACK INFORMATION

This commit is contained in:
Thomas Schmitt 2006-12-20 17:05:33 +00:00
parent 3cfa65388d
commit 17ddc90046
2 changed files with 11 additions and 6 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.20.145222"
#define Cdrskin_timestamP "2006.12.20.170502"

View File

@ -135,9 +135,12 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
c.oplen = sizeof(MMC_TRACK_INFO);
memcpy(c.opcode, MMC_TRACK_INFO, sizeof(MMC_TRACK_INFO));
c.opcode[1] = 1;
if(trackno<=0)
c.opcode[5] = 0xFF;
else
if(trackno<=0) {
if (d->current_profile = 0x1a) /* DVD+RW */
c.opcode[5] = 1;
else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */
c.opcode[5] = 0xFF;
} else
c.opcode[5] = trackno;
c.page = &buf;
c.dir = FROM_DRIVE;
@ -148,8 +151,10 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
+ (data[10] << 8) + data[11];
*nwa = (data[12] << 24) + (data[13] << 16)
+ (data[14] << 8) + data[15];
/* ts A61106 : MMC-1 Table 142 : NWA_V = NWA Valid Flag */
if (!(data[7]&1)) {
if (d->current_profile = 0x1a) { /* DVD+RW */
*nwa = *nwa = 0;
} else if (!(data[7]&1)) {
/* ts A61106 : MMC-1 Table 142 : NWA_V = NWA Valid Flag */
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"mmc_get_nwa: Track Info Block: NWA_V == 0", 0, 0);