1 /////////////////////////////////////////////////////////////////////////
2 // $Id: cdrom.h,v 1.20 2006/03/07 21:11:16 sshwarts Exp $
3 /////////////////////////////////////////////////////////////////////////
5 // Copyright (C) 2002 MandrakeSoft S.A.
9 // 75002 Paris - France
10 // http://www.linux-mandrake.com/
11 // http://www.mandrakesoft.com/
13 // This library is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU Lesser General Public
15 // License as published by the Free Software Foundation; either
16 // version 2 of the License, or (at your option) any later version.
18 // This library is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 // Lesser General Public License for more details.
23 // You should have received a copy of the GNU Lesser General Public
24 // License along with this library; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 // Header file for low-level OS specific CDROM emulation
31 class cdrom_interface
: public logfunctions
{
33 cdrom_interface(char *dev
);
34 virtual ~cdrom_interface(void);
37 // Load CD-ROM. Returns 0 if CD is not ready.
38 bx_bool
insert_cdrom(char *dev
= NULL
);
40 // Logically eject the CD.
43 // Read CD TOC. Returns 0 if start track is out of bounds.
44 bx_bool
read_toc(Bit8u
* buf
, int* length
, bx_bool msf
, int start_track
, int format
);
46 // Return CD-ROM capacity (in 2048 byte frames)
49 // Read a single block from the CD. Returns 0 on failure.
50 bx_bool
read_block(Bit8u
* buf
, int lba
, int blocksize
) BX_CPP_AttrRegparmN(3);
52 // Start (spin up) the CD.
53 bx_bool
start_cdrom();
55 // Seek for new block address.