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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/***************************************************************************
Hudson/NEC HuC6271 "Rainbow" device
***************************************************************************/
#include "emu.h"
#include "huc6271.h"
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
// device type definition
DEFINE_DEVICE_TYPE(HUC6271, huc6271_device, "huc6271", "Hudson HuC6271 \"Rainbow\"")
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// huc6271_device - constructor
//-------------------------------------------------
static ADDRESS_MAP_START( data_map, AS_DATA, 32, huc6271_device )
AM_RANGE(0x000000, 0x0fffff) AM_RAM
ADDRESS_MAP_END
huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HUC6271, tag, owner, clock)
, device_memory_interface(mconfig, *this)
, m_data_space_config("data", ENDIANNESS_LITTLE, 32, 32, 0, nullptr, *ADDRESS_MAP_NAME(data_map))
{
}
DEVICE_ADDRESS_MAP_START( regs, 16, huc6271_device )
AM_RANGE(0x00, 0x01) AM_WRITENOP // hscroll
AM_RANGE(0x02, 0x03) AM_WRITENOP // control
AM_RANGE(0x04, 0x05) AM_WRITENOP // hsync
AM_RANGE(0x06, 0x07) AM_WRITENOP // base Y
AM_RANGE(0x08, 0x09) AM_WRITENOP // base U
AM_RANGE(0x0a, 0x0b) AM_WRITENOP // base V
ADDRESS_MAP_END
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void huc6271_device::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void huc6271_device::device_reset()
{
}
std::vector<std::pair<int, const address_space_config *>> huc6271_device::memory_space_config() const
{
return std::vector<std::pair<int, const address_space_config *>> {
std::make_pair(AS_DATA, &m_data_space_config)
};
}
//**************************************************************************
// READ/WRITE HANDLERS
//**************************************************************************
#if 0
void huc6271_device::data_transfer(uint32_t offset, uint32_t data)
{
space(AS_DATA).write_dword(offset,data);
}
#endif
|