mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
(MESS) gb: call_load seems not to be a good moment for saving items,
at least if we want the system to play along with multisession runs. nw.
This commit is contained in:
parent
cf82c6a41e
commit
54db017d7b
@ -68,7 +68,6 @@ void device_gb_cart_interface::rom_alloc(UINT32 size)
|
||||
void device_gb_cart_interface::ram_alloc(UINT32 size)
|
||||
{
|
||||
m_ram.resize(size);
|
||||
device().save_item(NAME(m_ram));
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,13 +41,6 @@ enum
|
||||
};
|
||||
|
||||
|
||||
// ======================> gb_cart_interface
|
||||
|
||||
struct gb_cart_interface
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
// ======================> device_gb_cart_interface
|
||||
|
||||
class device_gb_cart_interface : public device_slot_card_interface
|
||||
@ -78,6 +71,8 @@ public:
|
||||
void set_has_battery(bool val) { has_battery = val; }
|
||||
bool get_has_battery() { return has_battery; }
|
||||
|
||||
void save_ram() { device().save_item(NAME(m_ram)); }
|
||||
|
||||
// internal state
|
||||
dynamic_buffer m_rom;
|
||||
dynamic_buffer m_ram;
|
||||
@ -101,7 +96,6 @@ public:
|
||||
// ======================> base_gb_cart_slot_device
|
||||
|
||||
class base_gb_cart_slot_device : public device_t,
|
||||
public gb_cart_interface,
|
||||
public device_image_interface,
|
||||
public device_slot_interface
|
||||
{
|
||||
@ -127,7 +121,8 @@ public:
|
||||
|
||||
void setup_ram(UINT8 banks);
|
||||
void internal_header_logging(UINT8 *ROM, UINT32 len);
|
||||
|
||||
void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
|
||||
|
||||
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
|
||||
virtual bool is_readable() const { return 1; }
|
||||
virtual bool is_writeable() const { return 0; }
|
||||
|
@ -122,6 +122,8 @@ void gb_state::save_gb_base()
|
||||
save_item(NAME(m_reloading));
|
||||
save_item(NAME(m_sio_count));
|
||||
save_item(NAME(m_bios_disable));
|
||||
if (m_cartslot)
|
||||
m_cartslot->save_ram();
|
||||
}
|
||||
|
||||
void gb_state::save_gbc_only()
|
||||
|
Loading…
Reference in New Issue
Block a user