X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdrom.h;h=860930b10bacc9aeb9ce40b866a51732c21023c7;hb=41e82ad46e60f9c3291ff81ebe4a07512b1194c5;hp=fc1df467175933a8ba59a743a26db13dcf54aeb2;hpb=53598a714ded20ee4bb703dcadaaa7b027d59cf4;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdrom.h b/libpcsxcore/cdrom.h index fc1df467..860930b1 100644 --- a/libpcsxcore/cdrom.h +++ b/libpcsxcore/cdrom.h @@ -34,6 +34,10 @@ extern "C" { #define btoi(b) ((b) / 16 * 10 + (b) % 16) /* BCD to u_char */ #define itob(i) ((i) / 10 * 16 + (i) % 10) /* u_char to BCD */ +#define ABS_CD(x) ((x >= 0) ? x : -x) +#define MIN_VALUE(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +#define MAX_VALUE(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; }) + #define MSF2SECT(m, s, f) (((m) * 60 + (s) - 2) * 75 + (f)) #define CD_FRAMESIZE_RAW 2352 @@ -59,7 +63,8 @@ typedef struct { unsigned char Absolute[3]; } subq; unsigned char TrackChanged; - unsigned char pad1[3]; + boolean m_locationChanged; + unsigned char pad1[2]; unsigned int freeze_ver; unsigned char Prev[4]; @@ -73,13 +78,14 @@ typedef struct { unsigned char ResultReady; unsigned char Cmd; unsigned char Readed; + unsigned char SetlocPending; u32 Reading; unsigned char ResultTN[6]; unsigned char ResultTD[4]; - unsigned char SetSector[4]; - unsigned char SetSectorEnd[4]; unsigned char SetSectorPlay[4]; + unsigned char SetSectorEnd[4]; + unsigned char SetSector[4]; unsigned char Track; boolean Play, Muted; int CurTrack; @@ -92,12 +98,13 @@ typedef struct { int Init; - unsigned char Irq; + u16 Irq; + u8 IrqRepeated; u32 eCycle; u8 Seeked; - u8 LidCheck; + u8 DriveState; u8 FastForward; u8 FastBackward; u8 pad;