[Core/CD] added CD hardware model auto-detection when BIOS is loaded as normal ROM file

This commit is contained in:
ekeeke 2023-11-26 17:41:12 +01:00
parent 52b4f78b82
commit 02c9dac337

View File

@ -792,6 +792,28 @@ int load_rom(char *filename)
/* enable CD hardware */ /* enable CD hardware */
system_hw = SYSTEM_MCD; system_hw = SYSTEM_MCD;
/* auto-detect CD hardware model */
if (strstr(rominfo.domestic, "WONDER-MEGA BOOT"))
{
/* Wondermega CD hardware */
scd.type = CD_TYPE_WONDERMEGA;
}
else if (strstr(rominfo.domestic, "WONDERMEGA2 BOOT"))
{
/* Wondermega M2 / X'Eye CD hardware */
scd.type = CD_TYPE_WONDERMEGA_M2;
}
else if (strstr(rominfo.domestic, "CDX BOOT ROM"))
{
/* CDX / Multi-Mega CD hardware */
scd.type = CD_TYPE_CDX;
}
else
{
/* default CD hardware */
scd.type = CD_TYPE_DEFAULT;
}
/* boot from CD hardware */ /* boot from CD hardware */
scd.cartridge.boot = 0x00; scd.cartridge.boot = 0x00;