From: darcagn <da...@us...> - 2023-11-26 07:26:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 8b119832fcbbaf0b967582e9d90bf581ee210018 (commit) via 5eb1d2484c8d51aa73cfc38b56442a920e93e700 (commit) via 1afd2ae53e12afc6b2cff0e9305e5afbff899423 (commit) via 90fdd6751e67f261c537bc88df462f4f8f3c7f6f (commit) from 73d97a809a2b1cc6319460864272a703e6d84654 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8b119832fcbbaf0b967582e9d90bf581ee210018 Merge: 1afd2ae 5eb1d24 Author: darcagn <da...@pr...> Date: Sun Nov 26 01:25:13 2023 -0600 Merge pull request #390 from DC-SWAT/gd_init_fix Removed GD drive status checks at startup. commit 5eb1d2484c8d51aa73cfc38b56442a920e93e700 Author: DC-SWAT <sw...@21...> Date: Sun Nov 26 14:20:00 2023 +0700 Removed GD drive status checks at startup. commit 1afd2ae53e12afc6b2cff0e9305e5afbff899423 Merge: 73d97a8 90fdd67 Author: darcagn <da...@pr...> Date: Sat Nov 25 23:47:12 2023 -0600 Merge pull request #389 from DC-SWAT/gd_init_fix Added check disc change status for cdrom_reinit_ex() commit 90fdd6751e67f261c537bc88df462f4f8f3c7f6f Author: DC-SWAT <sw...@21...> Date: Sun Nov 26 12:40:30 2023 +0700 Added check disc change status for cdrom_reinit_ex ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/cdrom.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index d287503..2d2f697 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -316,7 +316,10 @@ int cdrom_reinit(void) { /* Enhanced cdrom_reinit, takes the place of the old 'sector_size' function */ int cdrom_reinit_ex(int sector_part, int cdxa, int sector_size) { int r; - r = cdrom_exec_cmd_timed(CMD_INIT, NULL, 10000); + + do { + r = cdrom_exec_cmd_timed(CMD_INIT, NULL, 10000); + } while(r == ERR_DISC_CHG); if(r == ERR_NO_DISC || r == ERR_SYS || r == ERR_TIMEOUT) { return r; @@ -498,16 +501,7 @@ int cdrom_init(void) { gdc_init_system(); mutex_unlock(&_g1_ata_mutex); - cdrom_get_status(&status, &disc_type); - - if(status < CD_STATUS_OPEN && disc_type > CD_CDDA && disc_type < CD_FAIL) { - /* Do an initial initialization */ - cdrom_reinit(); - } else { - dbglog(DBG_INFO, "cdrom_init: No disc inserted\n"); - } - - return 0; + return cdrom_reinit(); } void cdrom_shutdown(void) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |