2 * Copyright (c) 2010, Wei Mingzhi <whistler@openoffice.org>.
5 * Based on: Cdrom for Psemu Pro like Emulators
6 * By: linuzappz <linuzappz@hotmail.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses>.
26 int OpenCdHandle(const char *dev) {
30 void CloseCdHandle() {
33 int IsCdHandleOpen() {
37 long GetTN(unsigned char *buffer) {
43 long GetTD(unsigned char track, unsigned char *buffer) {
44 memset(buffer + 1, 0, 3);
48 long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned char *f) {
52 long ReadSector(crdata *cr) {
56 long PlayCDDA(unsigned char *sector) {
64 long GetStatus(int playing, struct CdrStat *stat) {
68 unsigned char *ReadSub(const unsigned char *time) {