X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcd%2Fbuffering.c;h=8420336939f21a2770769e24916e27640f41bc8f;hb=3f23709ef37c5b3511c1445cbed7b447b56a37e0;hp=dbf7b28436fbe1897e1f0e6b08fe52a2f6c3b6c7;hpb=1cfc5cc4ce06642b9bc45ca3b9d32793718e9455;p=picodrive.git diff --git a/pico/cd/buffering.c b/pico/cd/buffering.c index dbf7b28..8420336 100644 --- a/pico/cd/buffering.c +++ b/pico/cd/buffering.c @@ -1,7 +1,13 @@ -// Buffering handling -// (c) Copyright 2007, Grazvydas "notaz" Ignotas +/* + * Buffering handling + * (C) notaz, 2007,2008 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ #include "../pico_int.h" +#include "../cd/cue.h" int PicoCDBuffers = 0; static unsigned char *cd_buffer = NULL; @@ -9,6 +15,8 @@ static int prev_lba = 0x80000000; static int hits, reads; +#undef dprintf +#define dprintf(...) void PicoCDBufferInit(void) { @@ -59,7 +67,7 @@ PICO_INTERNAL void PicoCDBufferRead(void *dest, int lba) int is_bin, offs, read_len, moved = 0; reads++; - is_bin = Pico_mcd->TOC.Tracks[0].ftype == TYPE_BIN; + is_bin = Pico_mcd->TOC.Tracks[0].ftype == CT_BIN; if (PicoCDBuffers <= 0) { @@ -109,7 +117,7 @@ PICO_INTERNAL void PicoCDBufferRead(void *dest, int lba) if (is_bin) { int i = 0; -#if REDUCE_IO_CALLS +#ifdef _PSP_FW_VERSION int bufs = (read_len*2048) / (2048+304); pm_read(cd_buffer, bufs*(2048+304), Pico_mcd->TOC.Tracks[0].F); for (i = 1; i < bufs; i++)