Fix drive light not appearing as much as it should

This commit is contained in:
CasualPokePlayer 2024-04-26 13:50:37 -07:00
parent cb41b6512c
commit f9b8a775b0
4 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -12,7 +12,7 @@ extern ECL_ENTRY void (*biz_readcb)(unsigned addr);
extern ECL_ENTRY void (*biz_writecb)(unsigned addr);
extern CDCallback biz_cdcb;
extern ECL_ENTRY void (*cdd_readcallback)(int lba, void *dest, int subcode);
extern ECL_ENTRY void (*cdd_readcallback)(int lba, void *dest, int subcode, int drivelight);
enum eCDLog_AddrType
{

View File

@ -119,7 +119,7 @@ static uint8_t* cdStreamGetSector(cdStream* restrict stream, unsigned* offset)
if (!stream->sectors_cached[stream->current_sector])
{
cdd_readcallback(stream->current_sector, sector_cache, stream->sector_size == SECTOR_SUBCODE_SIZE);
cdd_readcallback(stream->current_sector, sector_cache, stream->sector_size == SECTOR_SUBCODE_SIZE, 0);
stream->sectors_cached[stream->current_sector] = 1;
}
@ -166,6 +166,8 @@ size_t cdStreamRead(void* restrict buffer, size_t size, size_t count, cdStream*
}
}
// signal that the read has finished and the drive light should be turned on
cdd_readcallback(0, NULL, 0, 1);
return ret;
}

View File

@ -58,7 +58,7 @@ ECL_ENTRY void (*biz_execcb)(unsigned addr);
ECL_ENTRY void (*biz_readcb)(unsigned addr);
ECL_ENTRY void (*biz_writecb)(unsigned addr);
CDCallback biz_cdcb = NULL;
ECL_ENTRY void (*cdd_readcallback)(int lba, void *dest, int subcode);
ECL_ENTRY void (*cdd_readcallback)(int lba, void *dest, int subcode, int drivelight);
uint8 *tempsram;
static void update_viewport(void)
@ -136,7 +136,7 @@ GPGX_EX void gpgx_set_input_callback(ECL_ENTRY void (*fecb)(void))
input_callback_cb = fecb;
}
GPGX_EX void gpgx_set_cdd_callback(ECL_ENTRY void (*cddcb)(int lba, void *dest, int subcode))
GPGX_EX void gpgx_set_cdd_callback(ECL_ENTRY void (*cddcb)(int lba, void *dest, int subcode, int drivelight))
{
cdd_readcallback = cddcb;
}