|
|
|
@ -9,7 +9,7 @@
|
|
|
|
|
Copyright 2007 Thomas Schmitt, <scdbackup@gmx.net>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo = 0,1600
|
|
|
|
|
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo
|
|
|
|
|
#define Hardcoded_cd_rW 1
|
|
|
|
|
#define Hardcoded_cd_rw_c1 12999
|
|
|
|
|
#define Hardcoded_cd_rw_nwA 152660
|
|
|
|
@ -289,20 +289,41 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
|
|
|
|
|
int ret, multi= 1;
|
|
|
|
|
struct isoburn *o;
|
|
|
|
|
struct burn_drive *drive;
|
|
|
|
|
char reasons[BURN_REASONS_LEN];
|
|
|
|
|
enum burn_write_types write_type;
|
|
|
|
|
|
|
|
|
|
drive= burn_write_opts_get_drive(opts);
|
|
|
|
|
ret= isoburn_find_emulator(&o, drive, 0);
|
|
|
|
|
if(ret<0)
|
|
|
|
|
return;
|
|
|
|
|
if(o!=NULL) {
|
|
|
|
|
o->wrote_well= -1;
|
|
|
|
|
if(o->emulation_mode!=0) {
|
|
|
|
|
multi= 0;
|
|
|
|
|
if(o->emulation_mode>0 && o->nwa >= 0)
|
|
|
|
|
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* fprintf(stderr, "isoburn_EXPERIMENTAL: multi = %d\n", multi); */
|
|
|
|
|
/* burn_write_opts_set_simulate(opts, 1); */
|
|
|
|
|
|
|
|
|
|
burn_write_opts_set_multi(opts, multi);
|
|
|
|
|
|
|
|
|
|
write_type= burn_write_opts_auto_write_type(opts, disc, reasons, 0);
|
|
|
|
|
if (write_type == BURN_WRITE_NONE) {
|
|
|
|
|
fprintf(stderr, "Failed to find a suitable write mode:\n%s\n", reasons);
|
|
|
|
|
o->wrote_well= 0;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
sprintf(reasons, "%d", (int) write_type);
|
|
|
|
|
fprintf(stderr, "isoburn_EXPERIMENTAL: write_type = %s\n",
|
|
|
|
|
(write_type == BURN_WRITE_SAO ? "SAO" :
|
|
|
|
|
(write_type == BURN_WRITE_TAO ? "TAO" : reasons)));
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef Hardcoded_cd_rW
|
|
|
|
|
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */
|
|
|
|
|
fprintf(stderr, "Setting write address to LBA %d\n", Hardcoded_cd_rw_nwA);
|
|
|
|
@ -380,24 +401,37 @@ ex:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef Libburn_obsoleted_on_its_way_ouT
|
|
|
|
|
|
|
|
|
|
void isoburn_write_opts_set_start_byte(struct burn_write_opts *opts,
|
|
|
|
|
off_t value)
|
|
|
|
|
int isoburn_drive_wrote_well(struct burn_drive *d)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
struct isoburn *o;
|
|
|
|
|
struct burn_drive *drive;
|
|
|
|
|
|
|
|
|
|
drive= burn_write_opts_get_drive(opts);
|
|
|
|
|
ret= isoburn_find_emulator(&o, drive, 0);
|
|
|
|
|
if(ret<=0) /* no emulation, no burn_write_opts_set_start_byte() */
|
|
|
|
|
return;
|
|
|
|
|
ret = isoburn_set_start_byte(o, value, 0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
return;
|
|
|
|
|
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
|
|
|
|
|
ret= isoburn_find_emulator(&o, d, 0);
|
|
|
|
|
if(ret<0)
|
|
|
|
|
return(-1);
|
|
|
|
|
if(ret>0)
|
|
|
|
|
if(o->wrote_well>=0)
|
|
|
|
|
return(o->wrote_well);
|
|
|
|
|
ret= burn_drive_wrote_well(d);
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes,
|
|
|
|
|
char **status_text)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
struct isoburn *o;
|
|
|
|
|
|
|
|
|
|
ret= isoburn_find_emulator(&o, d, 0);
|
|
|
|
|
if(ret<0)
|
|
|
|
|
return(-1);
|
|
|
|
|
if(o==NULL)
|
|
|
|
|
return(0);
|
|
|
|
|
if(o->fifo==NULL)
|
|
|
|
|
return(0);
|
|
|
|
|
ret= burn_fifo_inquire_status(o->fifo, size, free_bytes, status_text);
|
|
|
|
|
return(ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* Libburn_obsoleted_on_its_way_ouT */
|
|
|
|
|
|
|
|
|
|