trunk/src/mess/machine/nes_slot.c
| r21114 | r21115 | |
| 1 | 1 | #include "emu.h" |
| 2 | #include "hashfile.h" |
| 2 | 3 | #include "machine/nes_slot.h" |
| 3 | | #include "hashfile.h" |
| 4 | 4 | |
| 5 | 5 | #define NES_BATTERY_SIZE 0x2000 |
| 6 | 6 | |
| r21114 | r21115 | |
| 1112 | 1112 | |
| 1113 | 1113 | void nes_cart_slot_device::call_unload() |
| 1114 | 1114 | { |
| 1115 | | if (m_cart->get_battery_size()) |
| 1115 | if (m_cart && m_cart->get_battery_size()) |
| 1116 | 1116 | battery_save(m_cart->get_battery_base(), m_cart->get_battery_size()); |
| 1117 | | if (m_cart->get_mapper_bram_size()) |
| 1117 | if (m_cart && m_cart->get_mapper_bram_size()) |
| 1118 | 1118 | battery_save(m_cart->get_mapper_bram_base(), m_cart->get_mapper_bram_size()); |
| 1119 | 1119 | } |
| 1120 | 1120 | |