1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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, const XTAL &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);
}
|