KallistiOS
git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
cd.h
Go to the documentation of this file.
1
#include <
kos.h
>
2
#include <
dc/syscalls.h
>
3
#include <sys/types.h>
4
5
class
cd
{
6
private
:
7
public
:
8
cd
();
9
~cd
();
10
bool
checkStatus
();
11
void
returnToBios
();
12
int
status
,
disc_type
;
13
};
14
15
cd::cd
(){
16
cdrom_get_status
(&
status
, &
disc_type
);
17
}
18
19
cd::~cd
(){
20
}
21
22
// Returns false if we're exiting to the bios
23
bool
cd::checkStatus
(){
24
cdrom_get_status
(&
status
, &
disc_type
);
25
if
(
status
==
CD_STATUS_OPEN
||
26
status
==
CD_STATUS_NO_DISC
||
27
status
==
CD_STATUS_RETRY
||
28
status
==
CD_STATUS_ERROR
||
29
status
==
CD_STATUS_FATAL
) {
30
return
false
;
31
}
32
return
true
;
33
}
34
35
void
cd::returnToBios
(){
36
syscall_system_bios_menu
();
37
}
cd
Definition
cd.h:5
cd::cd
cd()
Definition
cd.h:15
cd::~cd
~cd()
Definition
cd.h:19
cd::status
int status
Definition
cd.h:12
cd::returnToBios
void returnToBios()
Definition
cd.h:35
cd::disc_type
int disc_type
Definition
cd.h:12
cd::checkStatus
bool checkStatus()
Definition
cd.h:23
CD_STATUS_ERROR
#define CD_STATUS_ERROR
System error.
Definition
cdrom.h:214
CD_STATUS_NO_DISC
#define CD_STATUS_NO_DISC
No disc inserted.
Definition
cdrom.h:212
CD_STATUS_RETRY
#define CD_STATUS_RETRY
Retry is needed.
Definition
cdrom.h:213
CD_STATUS_OPEN
#define CD_STATUS_OPEN
Disc tray is open.
Definition
cdrom.h:211
CD_STATUS_FATAL
#define CD_STATUS_FATAL
Need reset syscalls.
Definition
cdrom.h:215
cdrom_get_status
int cdrom_get_status(int *status, int *disc_type)
Get the status of the GD-ROM drive.
syscall_system_bios_menu
void syscall_system_bios_menu(void) __noreturn
Go to the BIOS menu.
kos.h
Include everything KOS has to offer!
syscalls.h
Functions to access the system calls of the Dreamcast ROM.
examples
dreamcast
raylib
raytris
src
system
cd.h
Generated by
1.12.0