diff options
author | 2013-05-25 11:40:20 +0000 | |
---|---|---|
committer | 2013-05-25 11:40:20 +0000 | |
commit | a7a7aa2011174827adbd1399eaa0c13828ba3903 (patch) | |
tree | 730d9023b7cca14308a07c9fcaff2d36d1c1b904 /src/mess/includes/gba.h | |
parent | 72ce194a52e34df202220eec3e562dd43c14476c (diff) |
(MESS) gba: updated the driver to use slot devices for carts and removed
on-cart flash ram devices from main gba now that they can be properly
implemented on carts which have them [Fabio Priuli]
The main difference for end users is that games using flash ram for saves won't save
anymore progresses in a nvram/game_name.nv file but in a file inside nvram/game_name/
folder. Many thanks to Micko for his recent changes to nvram devices which allowed to
still save these data per-game!
Diffstat (limited to 'src/mess/includes/gba.h')
-rw-r--r-- | src/mess/includes/gba.h | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/src/mess/includes/gba.h b/src/mess/includes/gba.h index d76f315def6..2e73cd06d67 100644 --- a/src/mess/includes/gba.h +++ b/src/mess/includes/gba.h @@ -4,6 +4,7 @@ #include "audio/gb.h" #include "machine/intelfsh.h" #include "sound/dac.h" +#include "machine/gba_slot.h" #define DISPSTAT_VBL 0x0001 #define DISPSTAT_HBL 0x0002 @@ -122,18 +123,6 @@ #define TILEOBJ_VFLIP 0x0800 #define TILEOBJ_PALETTE 0xf000 -enum -{ - EEP_IDLE, - EEP_COMMAND, - EEP_ADDR, - EEP_AFTERADDR, - EEP_READ, - EEP_WRITE, - EEP_AFTERWRITE, - EEP_READFIRST -}; - /* driver state */ class gba_state : public driver_device { @@ -149,6 +138,7 @@ public: m_lbdac(*this, "direct_b_left"), m_rbdac(*this, "direct_b_right"), m_gbsound(*this, "custom"), + m_cartslot(*this, "cartslot"), m_region_maincpu(*this, "maincpu"), m_io_in0(*this, "IN0") { } @@ -162,6 +152,7 @@ public: required_device<dac_device> m_lbdac; required_device<dac_device> m_rbdac; required_device<gameboy_sound_device> m_gbsound; + required_device<gba_cart_slot_device> m_cartslot; void request_irq(UINT32 int_type); void dma_exec(FPTR ch); @@ -221,25 +212,6 @@ public: UINT16 m_timer_reload[4]; int m_timer_recalc[4]; - // Storage - UINT32 m_gba_sram[0x10000/4]; - UINT8 m_gba_eeprom[0x2000]; - UINT32 m_flash_size; - UINT32 m_flash_mask; - intelfsh8_device *m_mFlashDev; - int m_eeprom_state; - int m_eeprom_command; - int m_eeprom_count; - int m_eeprom_addr; - int m_eeprom_bits; - int m_eeprom_addr_bits; - UINT8 m_eep_data; - - /* nvram-specific for MESS */ - UINT8 *m_nvptr; - UINT32 m_nvsize; - device_t *m_nvimage; - emu_timer *m_tmr_timer[4], *m_irq_timer; emu_timer *m_scan_timer, *m_hbl_timer; @@ -256,8 +228,6 @@ public: UINT32 m_bios_last_address; int m_bios_protected; - int m_flash_battery_load; - DIRECT_UPDATE_MEMBER(gba_direct); DECLARE_READ32_MEMBER(gba_io_r); DECLARE_WRITE32_MEMBER(gba_io_w); @@ -281,8 +251,6 @@ public: TIMER_CALLBACK_MEMBER(handle_irq); TIMER_CALLBACK_MEMBER(perform_hbl); TIMER_CALLBACK_MEMBER(perform_scan); - void gba_machine_stop(); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gba_cart); protected: required_memory_region m_region_maincpu; |