int Insert_CD(const char *cdimg_name, int type) { int ret = 1; CD_Present = 0; if (cdimg_name != NULL && type != CIT_NOT_CD) { ret = Load_CD_Image(cdimg_name, type); if (ret == 0) { CD_Present = 1; if (Pico_mcd->scd.Status_CDD == TRAY_OPEN) { if (Pico_mcd->bios[0x122 ^ 1] == '2') Close_Tray_CDD_cC(); // else bios will issue it } else { Pico_mcd->scd.Status_CDD = READY; } } } if (Pico_mcd->scd.Status_CDD != TRAY_OPEN && !CD_Present) Pico_mcd->scd.Status_CDD = NOCD; return ret; }
void Change_CD (void) { if (SCD.Status_CDD == TRAY_OPEN) Close_Tray_CDD_cC (); else Open_Tray_CDD_cD (); }