X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcd%2FLC89510.c;h=05ac5d1a327b2ca4416b60f275d21163d5ec0088;hb=8f8fe01e049d9963523928a910eb4f83aac1da54;hp=a78488bcd03815eb3d8b52667166efff285966ba;hpb=6cadc2da0070781cf2d8fcff84265d3ca1f423b9;p=picodrive.git diff --git a/Pico/cd/LC89510.c b/Pico/cd/LC89510.c index a78488b..05ac5d1 100644 --- a/Pico/cd/LC89510.c +++ b/Pico/cd/LC89510.c @@ -1,6 +1,6 @@ /*********************************************************** * * - * This source was 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 * @@ -9,8 +9,7 @@ #include "../PicoInt.h" -#define cdprintf dprintf -//#define cdprintf(x...) +#define cdprintf(x...) #define CDC_DMA_SPEED 256 @@ -56,7 +55,7 @@ static void CDC_Reset(void) } -void LC89510_Reset(void) +PICO_INTERNAL void LC89510_Reset(void) { CDD_Reset(); CDC_Reset(); @@ -66,7 +65,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 +85,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 +138,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 +177,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 +211,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 +229,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 +252,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 +375,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 +493,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 +509,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 +523,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",