summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gameboy/gb_slot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/gameboy/gb_slot.cpp')
-rw-r--r--src/devices/bus/gameboy/gb_slot.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp
index 158d9b98be9..3b6c30949c2 100644
--- a/src/devices/bus/gameboy/gb_slot.cpp
+++ b/src/devices/bus/gameboy/gb_slot.cpp
@@ -263,12 +263,12 @@ image_init_result base_gb_cart_slot_device::call_load()
if (m_cart)
{
uint32_t offset;
- uint32_t len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ uint32_t len = !loaded_through_softlist() ? length() : get_software_region_length("rom");
uint8_t *ROM;
int rambanks = 0;
// From fullpath, check for presence of a header and skip it + check filesize is valid
- if (software_entry() == nullptr)
+ if (!loaded_through_softlist())
{
if ((len % 0x4000) == 512)
{
@@ -288,7 +288,7 @@ image_init_result base_gb_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == nullptr)
+ if (!loaded_through_softlist())
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
@@ -298,7 +298,7 @@ image_init_result base_gb_cart_slot_device::call_load()
if (get_mmm01_candidate(ROM, len))
offset = len - 0x8000;
- if (software_entry() != nullptr)
+ if (loaded_through_softlist())
m_type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
else
m_type = get_cart_type(ROM + offset, len - offset);
@@ -312,7 +312,7 @@ image_init_result base_gb_cart_slot_device::call_load()
m_cart->set_additional_wirings(0x0f, -1);
// setup RAM/NVRAM/RTC/RUMBLE
- if (software_entry() != nullptr)
+ if (loaded_through_softlist())
{
// from softlist we only rely on xml
if (get_software_region("ram"))
@@ -413,11 +413,11 @@ image_init_result megaduck_cart_slot_device::call_load()
{
if (m_cart)
{
- uint32_t len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ uint32_t len = !loaded_through_softlist() ? length() : get_software_region_length("rom");
m_cart->rom_alloc(len, tag());
- if (software_entry() == nullptr)
+ if (!loaded_through_softlist())
fread(m_cart->get_rom_base(), len);
else
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);