frontend: update libpicofe, fix missed callbacks
[pcsx_rearmed.git] / libpcsxcore / cdrom.h
index 0cd6c5f..b762738 100644 (file)
@@ -38,18 +38,29 @@ extern "C" {
 #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
 #define DATA_SIZE                              (CD_FRAMESIZE_RAW - 12)
 
+/* CD_FRAMESIZE_RAW aligned to a cache line for DMA buffers
+ * (assuming a cache line of max. 64 bytes) */
+#define CD_FRAMESIZE_RAW_ALIGNED       2368
+
 #define SUB_FRAMESIZE                  96
 
+#define MSF2SECT(m, s, f)              (((m) * 60 + (s) - 2) * 75 + (f))
+
+static inline void lba2msf(unsigned int lba, u8 *m, u8 *s, u8 *f) {
+       *m = lba / 75 / 60;
+       lba = lba - *m * 75 * 60;
+       *s = lba / 75;
+       lba = lba - *s * 75;
+       *f = lba;
+}
+
 void cdrReset();
-void cdrAttenuate(s16 *buf, int samples, int stereo);
 
 void cdrInterrupt(void);
-void cdrPlaySeekReadInterrupt(void);
+void cdrPlayReadInterrupt(void);
 void cdrLidSeekInterrupt(void);
 void cdrDmaInterrupt(void);
 void LidInterrupt(void);