diff options
author | 2021-06-21 13:53:49 -0700 | |
---|---|---|
committer | 2021-06-21 13:53:49 -0700 | |
commit | 32dbba7d2d4513774b2d877b4c88f2d0760bcf54 (patch) | |
tree | f9e6426cf8dc28413c456bdbcd450c85cb302422 /src/devices/bus/coco/coco_wpk2p.cpp | |
parent | 5522729235b3ce81c839f3932c1aadc14de59e2b (diff) | |
parent | 2709c0143a8c7009715242c135b28403eeffce8b (diff) |
Merge branch 'master' into deprecateddeprecated
Diffstat (limited to 'src/devices/bus/coco/coco_wpk2p.cpp')
-rw-r--r-- | src/devices/bus/coco/coco_wpk2p.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/devices/bus/coco/coco_wpk2p.cpp b/src/devices/bus/coco/coco_wpk2p.cpp new file mode 100644 index 00000000000..62fb2504bf7 --- /dev/null +++ b/src/devices/bus/coco/coco_wpk2p.cpp @@ -0,0 +1,56 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/*************************************************************************** + + CoCo WordPak 2+ + +***************************************************************************/ + +#include "emu.h" +#include "coco_wpk2p.h" +#include "screen.h" + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +DEFINE_DEVICE_TYPE(COCO_WPK2P, coco_wpk2p_device, "coco_wpk2p", "CoCo WordPak 2+") + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// coco_wpk2p_device - constructor +//------------------------------------------------- + +coco_wpk2p_device::coco_wpk2p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, COCO_WPK2P, tag, owner, clock) + , device_cococart_interface(mconfig, *this ) + , m_v9958(*this, "v9958") +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void coco_wpk2p_device::device_start() +{ + install_readwrite_handler(0xff78, 0xff7b, read8sm_delegate(*m_v9958, FUNC(v9958_device::read)), write8sm_delegate(*m_v9958, FUNC(v9958_device::write))); +} + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void coco_wpk2p_device::device_add_mconfig(machine_config &config) +{ + /* video hardware */ + V9958(config, m_v9958, 21.477272_MHz_XTAL); + m_v9958->set_screen_ntsc("screen"); + m_v9958->set_vram_size(0x20000); + m_v9958->int_cb().set([this](int state) { set_line_value(line::NMI, state); }); + SCREEN(config, "screen", SCREEN_TYPE_RASTER); +} |