X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcd%2FLC89510.c;h=efad0055d9045fd9a694f66eb93cdcb070626baf;hb=dca310c413517d278898b967cfe610574310acd8;hp=7fd43aa97b42bbf40f7a4b56d7fab13c83c0bfb6;hpb=721cd3963fa4ba82ca218345e8f543703dc46c90;p=picodrive.git diff --git a/Pico/cd/LC89510.c b/Pico/cd/LC89510.c index 7fd43aa..efad005 100644 --- a/Pico/cd/LC89510.c +++ b/Pico/cd/LC89510.c @@ -1,18 +1,14 @@ /*********************************************************** * * - * This source is taken from the Gens project * + * This source file was taken from the Gens project * * Written by Stéphane Dallongeville * * Copyright (c) 2002 by Stéphane Dallongeville * - * Modified/adapted for Picodrive by notaz, 2007 * + * Modified/adapted for PicoDrive by notaz, 2007 * * * ***********************************************************/ #include "../PicoInt.h" -#define cdprintf dprintf -//#define cdprintf(x...) - - #define CDC_DMA_SPEED 256 @@ -56,7 +52,7 @@ static void CDC_Reset(void) } -void LC89510_Reset(void) +PICO_INTERNAL void LC89510_Reset(void) { CDD_Reset(); CDC_Reset(); @@ -66,7 +62,7 @@ void LC89510_Reset(void) } -void Update_CDC_TRansfer(int which) +PICO_INTERNAL void Update_CDC_TRansfer(int which) { unsigned int DMA_Adr, dep, length; unsigned short *dest; @@ -86,7 +82,7 @@ void Update_CDC_TRansfer(int which) if (Pico_mcd->s68k_regs[0x33] & (1<<5)) { - dprintf("cdc DTE irq 5"); + elprintf(EL_INTS, "cdc DTE irq 5"); SekInterruptS68k(5); } } @@ -139,7 +135,7 @@ void Update_CDC_TRansfer(int which) else if (which == 4) // PCM RAM (check: popful Mail) { dep = (DMA_Adr & 0x03FF) << 2; - dprintf("CD DMA # %04x -> PCM[%i] # %04x, len=%i", + cdprintf("CD DMA # %04x -> PCM[%i] # %04x, len=%i", Pico_mcd->cdc.DAC.N, Pico_mcd->pcm.bank, dep, length); dest = (unsigned short *) (Pico_mcd->pcm_ram_b[Pico_mcd->pcm.bank] + dep); @@ -178,7 +174,7 @@ void Update_CDC_TRansfer(int which) } -unsigned short Read_CDC_Host(int is_sub) +PICO_INTERNAL_ASM unsigned short Read_CDC_Host(int is_sub) { int addr; @@ -212,7 +208,7 @@ unsigned short Read_CDC_Host(int is_sub) Pico_mcd->cdc.IFSTAT &= ~0x40; if (Pico_mcd->s68k_regs[0x33]&(1<<5)) { - dprintf("m68k: s68k irq 5"); + elprintf(EL_INTS, "m68k: s68k irq 5"); SekInterruptS68k(5); } @@ -230,7 +226,7 @@ unsigned short Read_CDC_Host(int is_sub) } -void CDC_Update_Header(void) +PICO_INTERNAL void CDC_Update_Header(void) { if (Pico_mcd->cdc.CTRL.B.B1 & 0x01) // Sub-Header wanted ? { @@ -253,7 +249,7 @@ void CDC_Update_Header(void) } -unsigned char CDC_Read_Reg(void) +PICO_INTERNAL unsigned char CDC_Read_Reg(void) { unsigned char ret; @@ -376,7 +372,7 @@ unsigned char CDC_Read_Reg(void) } -void CDC_Write_Reg(unsigned char Data) +PICO_INTERNAL void CDC_Write_Reg(unsigned char Data) { cdprintf("CDC write reg%02d = %.2X", Pico_mcd->s68k_regs[5] & 0xF, Data); @@ -494,7 +490,7 @@ static int bswapwrite(int a, unsigned short d) return d + (d >> 8); } -void CDD_Export_Status(void) +PICO_INTERNAL void CDD_Export_Status(void) { unsigned int csum; @@ -510,7 +506,7 @@ void CDD_Export_Status(void) if (Pico_mcd->s68k_regs[0x33] & (1<<4)) { - dprintf("cdd export irq 4"); + elprintf(EL_INTS, "cdd export irq 4"); SekInterruptS68k(4); } @@ -524,7 +520,7 @@ void CDD_Export_Status(void) } -void CDD_Import_Command(void) +PICO_INTERNAL void CDD_Import_Command(void) { // cdprintf("CDD importing command\n"); cdprintf("in: Command=%.4X, Minute=%.4X, Second=%.4X, Frame=%.4X Checksum=%.4X",