On Sat, Jan 05, 2008 at 01:02:30AM +0000, Stuart Brady wrote:
> On Fri, Jan 04, 2008 at 06:25:25PM -0600, Rob Landley wrote:
> > On Friday 04 January 2008 04:02:07 Carlo Marcelo Arenas Belon wrote:
> > 
> > > > -            buf[7] = total_sectors <= 1433600 ? 0x08 : 0x10; /* current
> > > > profile */
> > 
> > Where does the constant come from, anyway?
> 
> 1433600?  Seems it's the number of 512 KiB blocks in a 700 MiB CD image 
> (700 * 1024 * 2).

yes, that magic constant corresponds to the maximum expected size for a CD-ROM
and is used to detect if the profile used should be for DVD-ROM or not.

It came from the original implementation patch for "GET CONFIGURATION" 
committed in revision 1.66 of ide.c by Filip Navarra as 
"Partial IDE DVD emulation"

http://cvs.savannah.nongnu.org/viewvc/qemu/hw/ide.c?root=qemu&r1=1.65&r2=1.66

Carlo


Reply via email to