diff options
author | 2019-01-19 19:43:31 +0100 | |
---|---|---|
committer | 2019-01-19 19:43:31 +0100 | |
commit | 165e617ca21000f37ddf353b5d5d9f9523d16e11 (patch) | |
tree | 4ab1cdb6c527ffa0ce986144b3e776f7355a45dc /src/devices/bus/vsmile/rom.cpp | |
parent | d48481df909a2925341dc196c02bcf996a9d7784 (diff) |
-spg2xx: Added additional timer logging, nw.
-vsmile: Demoted all drivers to MNW, nw.
This reverts commit d48481df909a2925341dc196c02bcf996a9d7784.
Diffstat (limited to 'src/devices/bus/vsmile/rom.cpp')
-rw-r--r-- | src/devices/bus/vsmile/rom.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/devices/bus/vsmile/rom.cpp b/src/devices/bus/vsmile/rom.cpp new file mode 100644 index 00000000000..49740bc7f37 --- /dev/null +++ b/src/devices/bus/vsmile/rom.cpp @@ -0,0 +1,75 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +/*********************************************************************************************************** + + V.Smile cart emulation + + We support standard carts and one with on-board NVRAM + + ***********************************************************************************************************/ + + +#include "emu.h" +#include "rom.h" + + +//------------------------------------------------- +// vsmile_rom_device - constructor +//------------------------------------------------- + +DEFINE_DEVICE_TYPE(VSMILE_ROM_STD, vsmile_rom_device, "vsmile_rom", "V.Smile Cart") +DEFINE_DEVICE_TYPE(VSMILE_ROM_NVRAM, vsmile_rom_nvram_device, "vsmile_rom_nvram", "V.Smile Cart + NVRAM") + + +vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, type, tag, owner, clock) + , device_vsmile_cart_interface(mconfig, *this) +{ +} + +vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : vsmile_rom_device(mconfig, VSMILE_ROM_STD, tag, owner, clock) +{ +} + +vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : vsmile_rom_device(mconfig, type, tag, owner, clock) +{ +} + +vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : vsmile_rom_nvram_device(mconfig, VSMILE_ROM_NVRAM, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// mapper specific start/reset +//------------------------------------------------- + +void vsmile_rom_device::device_start() +{ +} + +void vsmile_rom_device::device_reset() +{ +} + + +/*------------------------------------------------- + Cart with NVRAM + -------------------------------------------------*/ + +READ16_MEMBER(vsmile_rom_nvram_device::bank2_r) +{ + if (!m_nvram.empty() && offset < m_nvram.size()) + return m_nvram[offset]; + else // this cannot actually happen... + return 0; +} + +WRITE16_MEMBER(vsmile_rom_nvram_device::bank2_w) +{ + if (!m_nvram.empty() && offset < m_nvram.size()) + COMBINE_DATA(&m_nvram[offset]); +} |