1 /***********************************************************
\r
3 * This source file was taken from the Gens project *
\r
4 * Written by Stéphane Dallongeville *
\r
5 * Copyright (c) 2002 by Stéphane Dallongeville *
\r
6 * Modified/adapted for PicoDrive by notaz, 2007 *
\r
8 ***********************************************************/
\r
10 #include "../pico_int.h"
\r
12 #define CDC_DMA_SPEED 256
\r
15 static void CDD_Reset(void)
\r
19 memset(Pico_mcd->s68k_regs+0x34, 0, 2*2); // CDD.Fader, CDD.Control
\r
20 Pico_mcd->cdd.Status = 0;
\r
21 Pico_mcd->cdd.Minute = 0;
\r
22 Pico_mcd->cdd.Seconde = 0;
\r
23 Pico_mcd->cdd.Frame = 0;
\r
24 Pico_mcd->cdd.Ext = 0;
\r
26 // clear receive status and transfer command
\r
27 memset(Pico_mcd->s68k_regs+0x38, 0, 20);
\r
28 Pico_mcd->s68k_regs[0x38+9] = 0xF; // Default checksum
\r
32 static void CDC_Reset(void)
\r
36 memset(Pico_mcd->cdc.Buffer, 0, sizeof(Pico_mcd->cdc.Buffer));
\r
38 Pico_mcd->cdc.COMIN = 0;
\r
39 Pico_mcd->cdc.IFSTAT = 0xFF;
\r
40 Pico_mcd->cdc.DAC.N = 0;
\r
41 Pico_mcd->cdc.DBC.N = 0;
\r
42 Pico_mcd->cdc.HEAD.N = 0x01000000;
\r
43 Pico_mcd->cdc.PT.N = 0;
\r
44 Pico_mcd->cdc.WA.N = 2352 * 2;
\r
45 Pico_mcd->cdc.STAT.N = 0x00000080;
\r
46 Pico_mcd->cdc.SBOUT = 0;
\r
47 Pico_mcd->cdc.IFCTRL = 0;
\r
48 Pico_mcd->cdc.CTRL.N = 0;
\r
50 Pico_mcd->cdc.Decode_Reg_Read = 0;
\r
51 Pico_mcd->scd.Status_CDC &= ~0x08;
\r
55 PICO_INTERNAL void LC89510_Reset(void)
\r
60 // clear DMA_Adr & Stop_Watch
\r
61 memset(Pico_mcd->s68k_regs + 0xA, 0, 4);
\r
65 PICO_INTERNAL void Update_CDC_TRansfer(int which)
\r
67 unsigned int DMA_Adr, dep, length;
\r
68 unsigned short *dest;
\r
71 if (Pico_mcd->cdc.DBC.N <= (CDC_DMA_SPEED * 2))
\r
73 length = (Pico_mcd->cdc.DBC.N + 1) >> 1;
\r
74 Pico_mcd->scd.Status_CDC &= ~0x08; // Last transfer
\r
75 Pico_mcd->s68k_regs[4] |= 0x80; // End data transfer
\r
76 Pico_mcd->s68k_regs[4] &= ~0x40; // no more data ready
\r
77 Pico_mcd->cdc.IFSTAT |= 0x08; // No more data transfer in progress
\r
79 if (Pico_mcd->cdc.IFCTRL & 0x40) // DTEIEN = Data Trasnfer End Interrupt Enable ?
\r
81 Pico_mcd->cdc.IFSTAT &= ~0x40;
\r
83 if (Pico_mcd->s68k_regs[0x33] & (1<<5))
\r
85 elprintf(EL_INTS, "cdc DTE irq 5");
\r
86 SekInterruptS68k(5);
\r
90 else length = CDC_DMA_SPEED;
\r
93 // TODO: dst bounds checking?
\r
94 src = Pico_mcd->cdc.Buffer + Pico_mcd->cdc.DAC.N;
\r
95 DMA_Adr = (Pico_mcd->s68k_regs[0xA]<<8) | Pico_mcd->s68k_regs[0xB];
\r
97 if (which == 7) // WORD RAM
\r
99 if (Pico_mcd->s68k_regs[3] & 4)
\r
101 // test: Final Fight
\r
102 int bank = !(Pico_mcd->s68k_regs[3]&1);
\r
103 dep = ((DMA_Adr & 0x3FFF) << 3);
\r
104 cdprintf("CD DMA # %04x -> word_ram1M # %06x, len=%i",
\r
105 Pico_mcd->cdc.DAC.N, dep, length);
\r
107 dest = (unsigned short *) (Pico_mcd->word_ram1M[bank] + dep);
\r
109 memcpy16bswap(dest, src, length);
\r
112 unsigned char *b1 = Pico_mcd->word_ram1M[bank] + dep;
\r
113 unsigned char *b2 = (unsigned char *)(dest+length) - 8;
\r
114 dprintf("%02x %02x %02x %02x .. %02x %02x %02x %02x",
\r
115 b1[0], b1[1], b1[4], b1[5], b2[0], b2[1], b2[4], b2[5]);
\r
120 dep = ((DMA_Adr & 0x7FFF) << 3);
\r
121 cdprintf("CD DMA # %04x -> word_ram2M # %06x, len=%i",
\r
122 Pico_mcd->cdc.DAC.N, dep, length);
\r
123 dest = (unsigned short *) (Pico_mcd->word_ram2M + dep);
\r
125 memcpy16bswap(dest, src, length);
\r
128 unsigned char *b1 = Pico_mcd->word_ram2M + dep;
\r
129 unsigned char *b2 = (unsigned char *)(dest+length) - 4;
\r
130 dprintf("%02x %02x %02x %02x .. %02x %02x %02x %02x",
\r
131 b1[0], b1[1], b1[2], b1[3], b2[0], b2[1], b2[2], b2[3]);
\r
135 else if (which == 4) // PCM RAM (check: popful Mail)
\r
137 dep = (DMA_Adr & 0x03FF) << 2;
\r
138 cdprintf("CD DMA # %04x -> PCM[%i] # %04x, len=%i",
\r
139 Pico_mcd->cdc.DAC.N, Pico_mcd->pcm.bank, dep, length);
\r
140 dest = (unsigned short *) (Pico_mcd->pcm_ram_b[Pico_mcd->pcm.bank] + dep);
\r
142 if (Pico_mcd->cdc.DAC.N & 1) /* unaligned src? */
\r
143 memcpy(dest, src, length*2);
\r
144 else memcpy16(dest, (unsigned short *) src, length);
\r
146 else if (which == 5) // PRG RAM
\r
148 dep = DMA_Adr << 3;
\r
149 dest = (unsigned short *) (Pico_mcd->prg_ram + dep);
\r
150 cdprintf("CD DMA # %04x -> prg_ram # %06x, len=%i",
\r
151 Pico_mcd->cdc.DAC.N, dep, length);
\r
153 memcpy16bswap(dest, src, length);
\r
156 unsigned char *b1 = Pico_mcd->prg_ram + dep;
\r
157 unsigned char *b2 = (unsigned char *)(dest+length) - 4;
\r
158 dprintf("%02x %02x %02x %02x .. %02x %02x %02x %02x",
\r
159 b1[0], b1[1], b1[2], b1[3], b2[0], b2[1], b2[2], b2[3]);
\r
164 Pico_mcd->cdc.DAC.N = (Pico_mcd->cdc.DAC.N + length) & 0xFFFF;
\r
165 if (Pico_mcd->scd.Status_CDC & 0x08) Pico_mcd->cdc.DBC.N -= length;
\r
166 else Pico_mcd->cdc.DBC.N = 0;
\r
170 if (which != 4) length >>= 1;
\r
172 Pico_mcd->s68k_regs[0xA] = DMA_Adr >> 8;
\r
173 Pico_mcd->s68k_regs[0xB] = DMA_Adr;
\r
177 PICO_INTERNAL_ASM unsigned short Read_CDC_Host(int is_sub)
\r
181 if (!(Pico_mcd->scd.Status_CDC & 0x08))
\r
183 // Transfer data disabled
\r
184 cdprintf("Read_CDC_Host FIXME: Transfer data disabled");
\r
188 if ((is_sub && (Pico_mcd->s68k_regs[4] & 7) != 3) ||
\r
189 (!is_sub && (Pico_mcd->s68k_regs[4] & 7) != 2))
\r
192 cdprintf("Read_CDC_Host FIXME: Wrong setting");
\r
196 Pico_mcd->cdc.DBC.N -= 2;
\r
198 if (Pico_mcd->cdc.DBC.N <= 0)
\r
200 Pico_mcd->cdc.DBC.N = 0;
\r
201 Pico_mcd->scd.Status_CDC &= ~0x08; // Last transfer
\r
202 Pico_mcd->s68k_regs[4] |= 0x80; // End data transfer
\r
203 Pico_mcd->s68k_regs[4] &= ~0x40; // no more data ready
\r
204 Pico_mcd->cdc.IFSTAT |= 0x08; // No more data transfer in progress
\r
206 if (Pico_mcd->cdc.IFCTRL & 0x40) // DTEIEN = Data Transfer End Interrupt Enable ?
\r
208 Pico_mcd->cdc.IFSTAT &= ~0x40;
\r
210 if (Pico_mcd->s68k_regs[0x33]&(1<<5)) {
\r
211 elprintf(EL_INTS, "m68k: s68k irq 5");
\r
212 SekInterruptS68k(5);
\r
215 cdprintf("CDC - DTE interrupt");
\r
219 addr = Pico_mcd->cdc.DAC.N;
\r
220 Pico_mcd->cdc.DAC.N += 2;
\r
222 cdprintf("Read_CDC_Host sub=%i d=%04x dac=%04x dbc=%04x", is_sub,
\r
223 (Pico_mcd->cdc.Buffer[addr]<<8) | Pico_mcd->cdc.Buffer[addr+1], Pico_mcd->cdc.DAC.N, Pico_mcd->cdc.DBC.N);
\r
225 return (Pico_mcd->cdc.Buffer[addr]<<8) | Pico_mcd->cdc.Buffer[addr+1];
\r
229 PICO_INTERNAL void CDC_Update_Header(void)
\r
231 if (Pico_mcd->cdc.CTRL.B.B1 & 0x01) // Sub-Header wanted ?
\r
233 Pico_mcd->cdc.HEAD.B.B0 = 0;
\r
234 Pico_mcd->cdc.HEAD.B.B1 = 0;
\r
235 Pico_mcd->cdc.HEAD.B.B2 = 0;
\r
236 Pico_mcd->cdc.HEAD.B.B3 = 0;
\r
242 LBA_to_MSF(Pico_mcd->scd.Cur_LBA, &MSF);
\r
244 Pico_mcd->cdc.HEAD.B.B0 = INT_TO_BCDB(MSF.M);
\r
245 Pico_mcd->cdc.HEAD.B.B1 = INT_TO_BCDB(MSF.S);
\r
246 Pico_mcd->cdc.HEAD.B.B2 = INT_TO_BCDB(MSF.F);
\r
247 Pico_mcd->cdc.HEAD.B.B3 = 0x01;
\r
252 PICO_INTERNAL unsigned char CDC_Read_Reg(void)
\r
256 switch(Pico_mcd->s68k_regs[5] & 0xF)
\r
259 cdprintf("CDC read reg 00 = %.2X", Pico_mcd->cdc.COMIN);
\r
261 Pico_mcd->s68k_regs[5] = 0x1;
\r
262 return Pico_mcd->cdc.COMIN;
\r
264 case 0x1: // IFSTAT
\r
265 cdprintf("CDC read reg 01 = %.2X", Pico_mcd->cdc.IFSTAT);
\r
267 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 1); // Reg 1 (decoding)
\r
268 Pico_mcd->s68k_regs[5] = 0x2;
\r
269 return Pico_mcd->cdc.IFSTAT;
\r
272 cdprintf("CDC read reg 02 = %.2X", Pico_mcd->cdc.DBC.B.L);
\r
274 Pico_mcd->s68k_regs[5] = 0x3;
\r
275 return Pico_mcd->cdc.DBC.B.L;
\r
278 cdprintf("CDC read reg 03 = %.2X", Pico_mcd->cdc.DBC.B.H);
\r
280 Pico_mcd->s68k_regs[5] = 0x4;
\r
281 return Pico_mcd->cdc.DBC.B.H;
\r
284 cdprintf("CDC read reg 04 = %.2X", Pico_mcd->cdc.HEAD.B.B0);
\r
286 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 4); // Reg 4 (decoding)
\r
287 Pico_mcd->s68k_regs[5] = 0x5;
\r
288 return Pico_mcd->cdc.HEAD.B.B0;
\r
291 cdprintf("CDC read reg 05 = %.2X", Pico_mcd->cdc.HEAD.B.B1);
\r
293 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 5); // Reg 5 (decoding)
\r
294 Pico_mcd->s68k_regs[5] = 0x6;
\r
295 return Pico_mcd->cdc.HEAD.B.B1;
\r
298 cdprintf("CDC read reg 06 = %.2X", Pico_mcd->cdc.HEAD.B.B2);
\r
300 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 6); // Reg 6 (decoding)
\r
301 Pico_mcd->s68k_regs[5] = 0x7;
\r
302 return Pico_mcd->cdc.HEAD.B.B2;
\r
305 cdprintf("CDC read reg 07 = %.2X", Pico_mcd->cdc.HEAD.B.B3);
\r
307 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 7); // Reg 7 (decoding)
\r
308 Pico_mcd->s68k_regs[5] = 0x8;
\r
309 return Pico_mcd->cdc.HEAD.B.B3;
\r
312 cdprintf("CDC read reg 08 = %.2X", Pico_mcd->cdc.PT.B.L);
\r
314 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 8); // Reg 8 (decoding)
\r
315 Pico_mcd->s68k_regs[5] = 0x9;
\r
316 return Pico_mcd->cdc.PT.B.L;
\r
319 cdprintf("CDC read reg 09 = %.2X", Pico_mcd->cdc.PT.B.H);
\r
321 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 9); // Reg 9 (decoding)
\r
322 Pico_mcd->s68k_regs[5] = 0xA;
\r
323 return Pico_mcd->cdc.PT.B.H;
\r
326 cdprintf("CDC read reg 10 = %.2X", Pico_mcd->cdc.WA.B.L);
\r
328 Pico_mcd->s68k_regs[5] = 0xB;
\r
329 return Pico_mcd->cdc.WA.B.L;
\r
332 cdprintf("CDC read reg 11 = %.2X", Pico_mcd->cdc.WA.B.H);
\r
334 Pico_mcd->s68k_regs[5] = 0xC;
\r
335 return Pico_mcd->cdc.WA.B.H;
\r
338 cdprintf("CDC read reg 12 = %.2X", Pico_mcd->cdc.STAT.B.B0);
\r
340 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 12); // Reg 12 (decoding)
\r
341 Pico_mcd->s68k_regs[5] = 0xD;
\r
342 return Pico_mcd->cdc.STAT.B.B0;
\r
345 cdprintf("CDC read reg 13 = %.2X", Pico_mcd->cdc.STAT.B.B1);
\r
347 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 13); // Reg 13 (decoding)
\r
348 Pico_mcd->s68k_regs[5] = 0xE;
\r
349 return Pico_mcd->cdc.STAT.B.B1;
\r
352 cdprintf("CDC read reg 14 = %.2X", Pico_mcd->cdc.STAT.B.B2);
\r
354 Pico_mcd->cdc.Decode_Reg_Read |= (1 << 14); // Reg 14 (decoding)
\r
355 Pico_mcd->s68k_regs[5] = 0xF;
\r
356 return Pico_mcd->cdc.STAT.B.B2;
\r
359 cdprintf("CDC read reg 15 = %.2X", Pico_mcd->cdc.STAT.B.B3);
\r
361 ret = Pico_mcd->cdc.STAT.B.B3;
\r
362 Pico_mcd->cdc.IFSTAT |= 0x20; // decoding interrupt flag cleared
\r
363 if ((Pico_mcd->cdc.CTRL.B.B0 & 0x80) && (Pico_mcd->cdc.IFCTRL & 0x20))
\r
365 if ((Pico_mcd->cdc.Decode_Reg_Read & 0x73F2) == 0x73F2)
\r
366 Pico_mcd->cdc.STAT.B.B3 = 0x80;
\r
375 PICO_INTERNAL void CDC_Write_Reg(unsigned char Data)
\r
377 cdprintf("CDC write reg%02d = %.2X", Pico_mcd->s68k_regs[5] & 0xF, Data);
\r
379 switch (Pico_mcd->s68k_regs[5] & 0xF)
\r
382 Pico_mcd->s68k_regs[5] = 0x1;
\r
383 Pico_mcd->cdc.SBOUT = Data;
\r
387 case 0x1: // IFCTRL
\r
388 Pico_mcd->s68k_regs[5] = 0x2;
\r
389 Pico_mcd->cdc.IFCTRL = Data;
\r
391 if ((Pico_mcd->cdc.IFCTRL & 0x02) == 0) // Stop data transfer
\r
393 Pico_mcd->cdc.DBC.N = 0;
\r
394 Pico_mcd->scd.Status_CDC &= ~0x08;
\r
395 Pico_mcd->cdc.IFSTAT |= 0x08; // No more data transfer in progress
\r
400 Pico_mcd->s68k_regs[5] = 0x3;
\r
401 Pico_mcd->cdc.DBC.B.L = Data;
\r
406 Pico_mcd->s68k_regs[5] = 0x4;
\r
407 Pico_mcd->cdc.DBC.B.H = Data;
\r
412 Pico_mcd->s68k_regs[5] = 0x5;
\r
413 Pico_mcd->cdc.DAC.B.L = Data;
\r
418 Pico_mcd->s68k_regs[5] = 0x6;
\r
419 Pico_mcd->cdc.DAC.B.H = Data;
\r
424 if (Pico_mcd->cdc.IFCTRL & 0x02) // Data transfer enable ?
\r
426 Pico_mcd->cdc.IFSTAT &= ~0x08; // Data transfer in progress
\r
427 Pico_mcd->scd.Status_CDC |= 0x08; // Data transfer in progress
\r
428 Pico_mcd->s68k_regs[4] &= 0x7F; // A data transfer start
\r
430 cdprintf("************** Starting Data Transfer ***********");
\r
431 cdprintf("RS0 = %.4X DAC = %.4X DBC = %.4X DMA adr = %.4X\n\n", Pico_mcd->s68k_regs[4]<<8,
\r
432 Pico_mcd->cdc.DAC.N, Pico_mcd->cdc.DBC.N, (Pico_mcd->s68k_regs[0xA]<<8) | Pico_mcd->s68k_regs[0xB]);
\r
437 Pico_mcd->cdc.IFSTAT |= 0x40; // end data transfer interrupt flag cleared
\r
441 Pico_mcd->s68k_regs[5] = 0x9;
\r
442 Pico_mcd->cdc.WA.B.L = Data;
\r
447 Pico_mcd->s68k_regs[5] = 0xA;
\r
448 Pico_mcd->cdc.WA.B.H = Data;
\r
453 Pico_mcd->s68k_regs[5] = 0xB;
\r
454 Pico_mcd->cdc.CTRL.B.B0 = Data;
\r
459 Pico_mcd->s68k_regs[5] = 0xC;
\r
460 Pico_mcd->cdc.CTRL.B.B1 = Data;
\r
465 Pico_mcd->s68k_regs[5] = 0xD;
\r
466 Pico_mcd->cdc.PT.B.L = Data;
\r
471 Pico_mcd->s68k_regs[5] = 0xE;
\r
472 Pico_mcd->cdc.PT.B.H = Data;
\r
477 Pico_mcd->cdc.CTRL.B.B2 = Data;
\r
487 static int bswapwrite(int a, unsigned short d)
\r
489 *(unsigned short *)(Pico_mcd->s68k_regs + a) = (d>>8)|(d<<8);
\r
490 return d + (d >> 8);
\r
493 PICO_INTERNAL void CDD_Export_Status(void)
\r
497 csum = bswapwrite( 0x38+0, Pico_mcd->cdd.Status);
\r
498 csum += bswapwrite( 0x38+2, Pico_mcd->cdd.Minute);
\r
499 csum += bswapwrite( 0x38+4, Pico_mcd->cdd.Seconde);
\r
500 csum += bswapwrite( 0x38+6, Pico_mcd->cdd.Frame);
\r
501 Pico_mcd->s68k_regs[0x38+8] = Pico_mcd->cdd.Ext;
\r
502 csum += Pico_mcd->cdd.Ext;
\r
503 Pico_mcd->s68k_regs[0x38+9] = ~csum & 0xf;
\r
505 Pico_mcd->s68k_regs[0x37] &= 3; // CDD.Control
\r
507 if (Pico_mcd->s68k_regs[0x33] & (1<<4))
\r
509 elprintf(EL_INTS, "cdd export irq 4");
\r
510 SekInterruptS68k(4);
\r
513 // cdprintf("CDD exported status\n");
\r
514 cdprintf("out: Status=%.4X, Minute=%.4X, Second=%.4X, Frame=%.4X Checksum=%.4X",
\r
515 (Pico_mcd->s68k_regs[0x38+0] << 8) | Pico_mcd->s68k_regs[0x38+1],
\r
516 (Pico_mcd->s68k_regs[0x38+2] << 8) | Pico_mcd->s68k_regs[0x38+3],
\r
517 (Pico_mcd->s68k_regs[0x38+4] << 8) | Pico_mcd->s68k_regs[0x38+5],
\r
518 (Pico_mcd->s68k_regs[0x38+6] << 8) | Pico_mcd->s68k_regs[0x38+7],
\r
519 (Pico_mcd->s68k_regs[0x38+8] << 8) | Pico_mcd->s68k_regs[0x38+9]);
\r
523 PICO_INTERNAL void CDD_Import_Command(void)
\r
525 // cdprintf("CDD importing command\n");
\r
526 cdprintf("in: Command=%.4X, Minute=%.4X, Second=%.4X, Frame=%.4X Checksum=%.4X",
\r
527 (Pico_mcd->s68k_regs[0x38+10+0] << 8) | Pico_mcd->s68k_regs[0x38+10+1],
\r
528 (Pico_mcd->s68k_regs[0x38+10+2] << 8) | Pico_mcd->s68k_regs[0x38+10+3],
\r
529 (Pico_mcd->s68k_regs[0x38+10+4] << 8) | Pico_mcd->s68k_regs[0x38+10+5],
\r
530 (Pico_mcd->s68k_regs[0x38+10+6] << 8) | Pico_mcd->s68k_regs[0x38+10+7],
\r
531 (Pico_mcd->s68k_regs[0x38+10+8] << 8) | Pico_mcd->s68k_regs[0x38+10+9]);
\r
533 switch (Pico_mcd->s68k_regs[0x38+10+0])
\r
535 case 0x0: // STATUS (?)
\r
536 Get_Status_CDD_c0();
\r
539 case 0x1: // STOP ALL (?)
\r
543 case 0x2: // GET TOC INFORMATIONS
\r
544 switch(Pico_mcd->s68k_regs[0x38+10+3])
\r
546 case 0x0: // get current position (MSF format)
\r
547 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00);
\r
551 case 0x1: // get elapsed time of current track played/scanned (relative MSF format)
\r
552 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 1;
\r
553 Get_Track_Pos_CDD_c21();
\r
556 case 0x2: // get current track in RS2-RS3
\r
557 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 2;
\r
558 Get_Current_Track_CDD_c22();
\r
561 case 0x3: // get total length (MSF format)
\r
562 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 3;
\r
563 Get_Total_Lenght_CDD_c23();
\r
566 case 0x4: // first & last track number
\r
567 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 4;
\r
568 Get_First_Last_Track_CDD_c24();
\r
571 case 0x5: // get track addresse (MSF format)
\r
572 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 5;
\r
573 Get_Track_Adr_CDD_c25();
\r
576 default : // invalid, then we return status
\r
577 Pico_mcd->cdd.Status = (Pico_mcd->cdd.Status & 0xFF00) | 0xF;
\r
578 Get_Status_CDD_c0();
\r
591 case 0x6: // PAUSE/STOP
\r
595 case 0x7: // RESUME
\r
599 case 0x8: // FAST FOWARD
\r
600 Fast_Foward_CDD_c8();
\r
603 case 0x9: // FAST REWIND
\r
604 Fast_Rewind_CDD_c9();
\r
607 case 0xA: // RECOVER INITIAL STATE (?)
\r
611 case 0xC: // CLOSE TRAY
\r
612 Close_Tray_CDD_cC();
\r
615 case 0xD: // OPEN TRAY
\r
616 Open_Tray_CDD_cD();
\r
619 default: // UNKNOWN
\r