summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/saturn/rom.cpp
blob: 5853a7b4bdbfdd24b58fac1126243f5edd7a4d81 (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
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/***********************************************************************************************************

 Saturn ROM cart emulation

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


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


//-------------------------------------------------
//  saturn_rom_device - constructor
//-------------------------------------------------

DEFINE_DEVICE_TYPE(SATURN_ROM, saturn_rom_device, "sat_rom", "Saturn ROM Carts")


saturn_rom_device::saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type)
	: device_t(mconfig, type, tag, owner, clock)
	, device_sat_cart_interface(mconfig, *this, cart_type)
{
}

saturn_rom_device::saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
		: saturn_rom_device(mconfig, SATURN_ROM, tag, owner, clock, 0xff) // actually not clear if ROM carts have a type ID like DRAM/BRAM carts
{
}


//-------------------------------------------------
//  mapper specific start/reset
//-------------------------------------------------

void saturn_rom_device::device_start()
{
}

void saturn_rom_device::device_reset()
{
}


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

uint32_t saturn_rom_device::read_rom(offs_t offset)
{
	return m_rom[offset & (m_rom_size/4 - 1)];
}