summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/odyssey2/chess.c
blob: 3cddee48906f4312cf4edde8ac5ca64984be7de3 (plain) (blame)
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
57
58
59
60
// license:BSD-3-Clause
// copyright-holders:etabeta
/***********************************************************************************************************


 Videopac Chess Module emulation

 TODO:
   - this code is just a stub... hence, almost everything is still to do!

 ***********************************************************************************************************/


#include "emu.h"
#include "chess.h"


//-------------------------------------------------
//  o2_chess_device - constructor
//-------------------------------------------------

const device_type O2_ROM_CHESS = &device_creator<o2_chess_device>;


o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
					: o2_rom_device(mconfig, O2_ROM_CHESS, "Odyssey 2 BASIC Carts", tag, owner, clock, "o2_chess", __FILE__),
					m_cpu(*this, "subcpu")
{
}


//-------------------------------------------------
//  MACHINE_CONFIG_FRAGMENT( o2chess )
//-------------------------------------------------

static ADDRESS_MAP_START(chess_mem, AS_PROGRAM, 8, o2_chess_device)
	AM_RANGE(0x0000, 0x07ff) AM_READ(read_rom04)
ADDRESS_MAP_END

static ADDRESS_MAP_START(chess_io, AS_IO, 8, o2_chess_device)
	ADDRESS_MAP_UNMAP_HIGH
	ADDRESS_MAP_GLOBAL_MASK(0xff)
ADDRESS_MAP_END

static MACHINE_CONFIG_FRAGMENT( o2chess )
	MCFG_CPU_ADD("subcpu", NSC800, XTAL_4MHz)
	MCFG_CPU_PROGRAM_MAP(chess_mem)
	MCFG_CPU_IO_MAP(chess_io)
MACHINE_CONFIG_END


//-------------------------------------------------
//  machine_config_additions - device-specific
//  machine configurations
//-------------------------------------------------

machine_config_constructor o2_chess_device::device_mconfig_additions() const
{
	return MACHINE_CONFIG_NAME( o2chess );
}