diff --git a/core/loadrom.c b/core/loadrom.c index a8b2b08..244635d 100644 --- a/core/loadrom.c +++ b/core/loadrom.c @@ -3,7 +3,7 @@ * ROM Loading Support * * Copyright (C) 1998-2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -726,25 +726,6 @@ int load_rom(char *filename) scd.cartridge.boot = 0x00; } - /* CD BOOTROM */ - else if (strstr(rominfo.ROMType, "BR") != NULL) - { - /* enable CD hardware */ - system_hw = SYSTEM_MCD; - - /* boot from CD hardware */ - scd.cartridge.boot = 0x00; - - /* copy ROM to BOOTROM area */ - memcpy(scd.bootrom, cart.rom, sizeof(scd.bootrom)); - - /* mark CD BIOS as being loaded */ - system_bios = system_bios | 0x10; - - /* loaded CD BIOS region */ - system_bios = (system_bios & 0xf0) | (region_code >> 4); - } - /* 16-bit ROM cartridge (max. 8MB) with optional CD hardware add-on support enabled */ else if ((system_hw == SYSTEM_MD) && (cart.romsize <= 0x800000) && (config.add_on != HW_ADDON_NONE)) { @@ -799,6 +780,25 @@ int load_rom(char *filename) cdd_unload(); } } + + /* CD BOOTROM */ + else if (strstr(rominfo.ROMType, "BR") != NULL) + { + /* enable CD hardware */ + system_hw = SYSTEM_MCD; + + /* boot from CD hardware */ + scd.cartridge.boot = 0x00; + + /* copy ROM to BOOTROM area */ + memcpy(scd.bootrom, cart.rom, sizeof(scd.bootrom)); + + /* mark CD BIOS as being loaded */ + system_bios = system_bios | 0x10; + + /* loaded CD BIOS region */ + system_bios = (system_bios & 0xf0) | (region_code >> 4); + } } /* Force system hardware if requested */ diff --git a/core/loadrom.h b/core/loadrom.h index ce9b5f4..8ca743e 100644 --- a/core/loadrom.h +++ b/core/loadrom.h @@ -3,7 +3,7 @@ * ROM Loading Support * * Copyright (C) 1998-2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: