]> Shamusworld >> Repos - virtualjaguar/blob - src/cdintf.cpp
Fixed types in types.h to use C99 standard types, also removed all references
[virtualjaguar] / src / cdintf.cpp
1 //
2 // OS agnostic CDROM interface functions
3 //
4 // by James L. Hammons
5 //
6 // This file is basically a shell to keep the front-end clean and also pull in the
7 // appropriate back-end code depending on which target is being compiled for.
8 //
9
10 #include "cdintf.h"                                                             // Every OS has to implement these
11
12 #include <cdio/cdio.h>                                                  // Now using OS agnostic CD access routines!
13 #include "log.h"
14
15 // Not any more!
16 #if 0
17
18 // OS dependent implementations
19
20 #if defined(__GCCWIN32__)
21
22 #include "cdintf_win32.cpp"
23
24 #elif defined(__GCCUNIX__)
25         #if defined(_OSX_)
26
27 #include "cdintf_osx.cpp"
28
29         #else
30
31 #include "cdintf_linux.cpp"
32
33         #endif
34 #endif
35
36 #endif
37
38 static void TestCDIO(void)
39 {
40         // See what (if anything) is installed.
41         CdIo_t * p_cdio = cdio_open(0/*NULL*/, DRIVER_DEVICE);
42         driver_id_t driver_id;
43
44         if (p_cdio != NULL)
45         {
46                 WriteLog("CDIO: The driver selected is %s.\n", cdio_get_driver_name(p_cdio));
47                 WriteLog("CDIO: The default device for this driver is %s.\n\n", cdio_get_default_device(p_cdio));
48                 cdio_destroy(p_cdio);
49         }
50         else
51         {
52                 WriteLog("CDIO: A suitable CD-ROM driver was not found.\n\n");
53         }
54 }
55
56 //
57 // *** OK, here's where we're going to attempt to put the platform agnostic CD interface ***
58 //
59
60 static CdIo_t * cdioPtr = NULL;
61
62 bool CDIntfInit(void)
63 {
64         WriteLog("CDINTF: Init unimplemented!\n");
65         return false;
66 }
67
68 void CDIntfDone(void)
69 {
70 }
71
72 bool CDIntfReadBlock(uint32 sector, uint8 * buffer)
73 {
74         WriteLog("CDINTF: ReadBlock unimplemented!\n");
75         return false;
76 }
77
78 uint32 CDIntfGetNumSessions(void)
79 {
80         // Still need relevant code here... !!! FIX !!!
81         return 2;
82 }
83
84 void CDIntfSelectDrive(uint32 driveNum)
85 {
86         WriteLog("CDINTF: SelectDrive unimplemented!\n");
87 }
88
89 uint32 CDIntfGetCurrentDrive(void)
90 {
91         WriteLog("CDINTF: GetCurrentDrive unimplemented!\n");
92         return 0;
93 }
94
95 const uint8 * CDIntfGetDriveName(uint32)
96 {
97         WriteLog("CDINTF: GetDriveName unimplemented!\n");
98         return NULL;
99 }
100
101 uint8 CDIntfGetSessionInfo(uint32 session, uint32 offset)
102 {
103         WriteLog("CDINTF: GetSessionInfo unimplemented!\n");
104         return 0xFF;
105 }
106
107 uint8 CDIntfGetTrackInfo(uint32 track, uint32 offset)
108 {
109         WriteLog("CDINTF: GetTrackInfo unimplemented!\n");
110         return 0xFF;
111 }