diff options
Diffstat (limited to 'src/mame/includes/nds.h')
-rw-r--r-- | src/mame/includes/nds.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/mame/includes/nds.h b/src/mame/includes/nds.h index 6d1e04a81d9..dd5dbd635e5 100644 --- a/src/mame/includes/nds.h +++ b/src/mame/includes/nds.h @@ -1,10 +1,13 @@ // license:BSD-3-Clause // copyright-holders:Ryan Holtz +#pragma once #ifndef INCLUDES_NDS_H #define INCLUDES_NDS_H #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" +#include "machine/bankdev.h" +#include "machine/timer.h" class nds_state : public driver_device { @@ -13,7 +16,10 @@ public: : driver_device(mconfig, type, tag), m_arm7(*this, "arm7"), m_arm9(*this, "arm9"), - m_firmware(*this, "firmware") + m_firmware(*this, "firmware"), + m_arm7wrambnk(*this, "nds7wram"), + m_arm9wrambnk(*this, "nds9wram"), + m_arm7ram(*this, "arm7ram") { } void machine_start() override; @@ -27,14 +33,25 @@ public: DECLARE_READ32_MEMBER(arm9_io_r); DECLARE_WRITE32_MEMBER(arm9_io_w); + DECLARE_READ32_MEMBER(wram_first_half_r); + DECLARE_READ32_MEMBER(wram_second_half_r); + DECLARE_WRITE32_MEMBER(wram_first_half_w); + DECLARE_WRITE32_MEMBER(wram_second_half_w); + DECLARE_READ32_MEMBER(wram_arm7mirror_r); + DECLARE_WRITE32_MEMBER(wram_arm7mirror_w); + protected: required_device<arm7_cpu_device> m_arm7; required_device<arm946es_cpu_device> m_arm9; - required_region_ptr<uint32_t> m_firmware; + required_device<address_map_bank_device> m_arm7wrambnk, m_arm9wrambnk; + required_shared_ptr<uint32_t> m_arm7ram; enum { IPCSYNC_OFFSET = 0x180/4, + GAMECARD_BUS_CTRL_OFFSET = 0x1a4/4, + WRAMSTAT_OFFSET = 0x241/4, + WRAMCNT_OFFSET = 0x247/4, POSTFLG_OFFSET = 0x300/4, POSTFLG_PBF_SHIFT = 0, POSTFLG_RAM_SHIFT = 1, @@ -45,6 +62,8 @@ protected: uint32_t m_arm7_postflg; uint32_t m_arm9_postflg; uint16_t m_arm7_ipcsync, m_arm9_ipcsync; + uint8_t m_WRAM[0x8000]; + uint8_t m_wramcnt; }; #endif // INCLUDES_NDS_H |