RetroArch
disc_io.h
Go to the documentation of this file.
1 /*
2  disc_io.h
3  Interface template for low level disc functions.
4 
5  Copyright (c) 2006 Michael "Chishm" Chisholm
6  Based on code originally written by MightyMax
7 
8  Redistribution and use in source and binary forms, with or without modification,
9  are permitted provided that the following conditions are met:
10 
11  1. Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation and/or
15  other materials provided with the distribution.
16  3. The name of the author may not be used to endorse or promote products derived
17  from this software without specific prior written permission.
18 
19  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
20  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
22  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29 
30 #ifndef OGC_DISC_IO_INCLUDE
31 #define OGC_DISC_IO_INCLUDE
32 
33 #include <stdint.h>
34 #include <gctypes.h>
35 
36 
37 #define FEATURE_MEDIUM_CANREAD 0x00000001
38 #define FEATURE_MEDIUM_CANWRITE 0x00000002
39 #define FEATURE_GAMECUBE_SLOTA 0x00000010
40 #define FEATURE_GAMECUBE_SLOTB 0x00000020
41 #define FEATURE_GAMECUBE_DVD 0x00000040
42 #define FEATURE_WII_SD 0x00000100
43 #define FEATURE_WII_USB 0x00000200
44 #define FEATURE_WII_DVD 0x00000400
45 
46 typedef uint32_t sec_t;
47 
48 typedef bool (* FN_MEDIUM_STARTUP)(void) ;
50 typedef bool (* FN_MEDIUM_READSECTORS)(sec_t sector, sec_t numSectors, void* buffer) ;
51 typedef bool (* FN_MEDIUM_WRITESECTORS)(sec_t sector, sec_t numSectors, const void* buffer) ;
54 
55 struct DISC_INTERFACE_STRUCT {
56  unsigned long ioType ;
57  unsigned long features ;
64 } ;
65 
67 
68 #endif // define OGC_DISC_IO_INCLUDE
uint32_t sec_t
Definition: disc_io.h:46
bool(* FN_MEDIUM_CLEARSTATUS)(void)
Definition: disc_io.h:52
GLuint buffer
Definition: glext.h:6555
bool(* FN_MEDIUM_STARTUP)(void)
Definition: disc_io.h:48
Data type definitions.
FN_MEDIUM_CLEARSTATUS clearStatus
Definition: iosuhax_disc_interface.h:59
bool(* FN_MEDIUM_ISINSERTED)(void)
Definition: disc_io.h:49
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
bool(* FN_MEDIUM_WRITESECTORS)(sec_t sector, sec_t numSectors, const void *buffer)
Definition: disc_io.h:51
FN_MEDIUM_STARTUP startup
Definition: iosuhax_disc_interface.h:55
typedef bool(RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index
uint32_t sec_t
Definition: iosuhax_disc_interface.h:40
FN_MEDIUM_SHUTDOWN shutdown
Definition: iosuhax_disc_interface.h:60
FN_MEDIUM_READSECTORS readSectors
Definition: iosuhax_disc_interface.h:57
bool(* FN_MEDIUM_READSECTORS)(sec_t sector, sec_t numSectors, void *buffer)
Definition: disc_io.h:50
unsigned long features
Definition: iosuhax_disc_interface.h:54
Definition: iosuhax_disc_interface.h:52
unsigned long ioType
Definition: iosuhax_disc_interface.h:53
FN_MEDIUM_ISINSERTED isInserted
Definition: iosuhax_disc_interface.h:56
unsigned int uint32_t
Definition: stdint.h:126
FN_MEDIUM_WRITESECTORS writeSectors
Definition: iosuhax_disc_interface.h:58
bool(* FN_MEDIUM_SHUTDOWN)(void)
Definition: disc_io.h:53