X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fcd%2Fcd_sys.c;h=03bf0d222ed8ec1781890c4f3a0bdc0d0cff2b7b;hb=4aed476f2475f40406b4c3da91b3e5e7323e87b2;hp=c0001d2d1fa90b496f62813702e9df464ae29392;hpb=eff55556cff77fd64cff4be32e449e0a58aed6fe;p=picodrive.git diff --git a/Pico/cd/cd_sys.c b/Pico/cd/cd_sys.c index c0001d2..03bf0d2 100644 --- a/Pico/cd/cd_sys.c +++ b/Pico/cd/cd_sys.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 * @@ -13,8 +13,6 @@ #include "cd_sys.h" #include "cd_file.h" -#define cdprintf dprintf -//#define cdprintf(x...) #define DEBUG_CD #define TRAY_OPEN 0x0500 // TRAY OPEN CDD status @@ -198,16 +196,16 @@ PICO_INTERNAL void Reset_CD(void) } -int Insert_CD(char *iso_name, int is_bin) +int Insert_CD(char *cdimg_name, int type) { - int ret = 0; + int ret = 1; CD_Present = 0; Pico_mcd->scd.Status_CDD = NOCD; - if (iso_name != NULL) + if (cdimg_name != NULL && type != CIT_NOT_CD) { - ret = Load_ISO(iso_name, is_bin); + ret = Load_CD_Image(cdimg_name, type); if (ret == 0) { CD_Present = 1; Pico_mcd->scd.Status_CDD = READY; @@ -491,8 +489,7 @@ PICO_INTERNAL int Play_CDD_c3(void) else { Pico_mcd->s68k_regs[0x36] &= ~0x01; // AUDIO - //CD_Audio_Starting = 1; - FILE_Play_CD_LBA(); + cdda_start_play(); } if (Pico_mcd->scd.Cur_Track == 100) Pico_mcd->cdd.Minute = 0x0A02; @@ -594,8 +591,7 @@ PICO_INTERNAL int Resume_CDD_c7(void) else { Pico_mcd->s68k_regs[0x36] &= ~0x01; // AUDIO - //CD_Audio_Starting = 1; - FILE_Play_CD_LBA(); + cdda_start_play(); } if (Pico_mcd->scd.Cur_Track == 100) Pico_mcd->cdd.Minute = 0x0A02; @@ -660,7 +656,7 @@ PICO_INTERNAL int Close_Tray_CDD_cC(void) Pico_mcd->scd.Status_CDC &= ~1; // Stop CDC read - printf("tray close\n"); + elprintf(EL_STATUS, "tray close\n"); if (PicoMCDcloseTray != NULL) CD_Present = PicoMCDcloseTray(); @@ -685,7 +681,7 @@ PICO_INTERNAL int Open_Tray_CDD_cD(void) Pico_mcd->scd.Status_CDC &= ~1; // Stop CDC read - printf("tray open\n"); + elprintf(EL_STATUS, "tray open\n"); Unload_ISO(); CD_Present = 0;