summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/arcadia/rom.cpp
blob: 60bc4b3a88e4777b091ede92d0f6754caa5eb784 (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:Fabio Priuli
/***********************************************************************************************************


 Emerson Arcadia 2001 cart emulation

 Golf carts have the "extra_rom" handler installed at $4000 instead of $2000

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


#include "emu.h"
#include "rom.h"


//-------------------------------------------------
//  arcadia_rom_device - constructor
//-------------------------------------------------

DEFINE_DEVICE_TYPE(ARCADIA_ROM_STD,  arcadia_rom_device,  "arcadia_rom",  "Emerson Arcadia Standard Carts")
DEFINE_DEVICE_TYPE(ARCADIA_ROM_GOLF, arcadia_golf_device, "arcadia_golf", "Emerson Arcadia Golf Cart")


arcadia_rom_device::arcadia_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_arcadia_cart_interface(mconfig, *this)
{
}

arcadia_rom_device::arcadia_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: arcadia_rom_device(mconfig, ARCADIA_ROM_STD, tag, owner, clock)
{
}

arcadia_golf_device::arcadia_golf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
	: arcadia_rom_device(mconfig, ARCADIA_ROM_GOLF, tag, owner, clock)
{
}


/*-------------------------------------------------
 mapper specific handlers
 -------------------------------------------------*/

uint8_t arcadia_rom_device::read_rom(offs_t offset)
{
	if (offset < m_rom_size)
		return m_rom[offset];
	else
		return 0xff;
}


uint8_t arcadia_rom_device::extra_rom(offs_t offset)
{
	if (offset + 0x1000 < m_rom_size)
		return m_rom[offset + 0x1000];
	else
		return 0xff;
}