summaryrefslogtreecommitdiff
path: root/libpcsxcore/cdrom.h
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-07 04:31:29 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-07 04:31:29 +0000
commit2d5a9a02425951f4efed764d135be96867eb532f (patch)
treed94be7649ef8ccb627df551ac69f5d4a6a941cb6 /libpcsxcore/cdrom.h
parent6a4fd490f8c754883bee9468be8d35dc7a651cee (diff)
downloadpcsxr-2d5a9a02425951f4efed764d135be96867eb532f.tar.gz
preparing for refactor/cleanup, moved all definations into .c files, other minor cleanups. (Breaks Mac OS X and maybe windows as well for now, will fix later.)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@47542 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/cdrom.h')
-rw-r--r--libpcsxcore/cdrom.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/libpcsxcore/cdrom.h b/libpcsxcore/cdrom.h
index f817a8f4..f2ea29b1 100644
--- a/libpcsxcore/cdrom.h
+++ b/libpcsxcore/cdrom.h
@@ -27,8 +27,15 @@
#include "psxmem.h"
#include "psxhw.h"
-#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 btoi(b) ((b) / 16 * 10 + (b) % 16) /* BCD to u_char */
+#define itob(i) ((i) / 10 * 16 + (i) % 10) /* u_char to BCD */
+
+#define MSF2SECT(m, s, f) (((m) * 60 + (s) - 2) * 75 + (f))
+
+#define CD_FRAMESIZE_RAW 2352
+#define DATA_SIZE (CD_FRAMESIZE_RAW - 12)
+
+#define SUB_FRAMESIZE 96
typedef struct {
unsigned char OCUP;
@@ -40,7 +47,7 @@ typedef struct {
unsigned char StatP;
- unsigned char Transfer[2352];
+ unsigned char Transfer[CD_FRAMESIZE_RAW];
unsigned char *pTransfer;
unsigned char Prev[4];
@@ -80,7 +87,7 @@ typedef struct {
char Unused[4083];
} cdrStruct;
-cdrStruct cdr;
+extern cdrStruct cdr;
void cdrReset();
void cdrInterrupt();
@@ -95,4 +102,4 @@ void cdrWrite2(unsigned char rt);
void cdrWrite3(unsigned char rt);
int cdrFreeze(gzFile f, int Mode);
-#endif /* __CDROM_H__ */
+#endif