11
11
#include " sh7014.h"
12
12
13
13
14
- DEFINE_DEVICE_TYPE (SH2_SH7014, sh2_sh7014_device , " sh2_sh7014 " , " Hitachi SH-2 (SH7014)" )
14
+ DEFINE_DEVICE_TYPE (SH7014, sh7014_device , " sh7014 " , " Hitachi SH-2 (SH7014)" )
15
15
16
- sh2_sh7014_device::sh2_sh7014_device (const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
17
- : sh2_device(mconfig, SH2_SH7014 , tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh2_sh7014_device ::sh7014_map), this), 32, 0xffffffff)
16
+ sh7014_device::sh7014_device (const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
17
+ : sh2_device(mconfig, SH7014 , tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh7014_device ::sh7014_map), this), 32, 0xffffffff)
18
18
, m_sci(*this , " sci%u" , 0u )
19
19
, m_bsc(*this , " bsc" )
20
20
, m_dmac(*this , " dmac" )
@@ -25,22 +25,22 @@ sh2_sh7014_device::sh2_sh7014_device(const machine_config &mconfig, const char *
25
25
{
26
26
}
27
27
28
- void sh2_sh7014_device ::device_start ()
28
+ void sh7014_device ::device_start ()
29
29
{
30
30
sh2_device::device_start ();
31
31
32
32
save_item (NAME (m_ccr));
33
33
}
34
34
35
- void sh2_sh7014_device ::device_reset ()
35
+ void sh7014_device ::device_reset ()
36
36
{
37
37
sh2_device::device_reset ();
38
38
39
39
// CAC
40
40
m_ccr = 0 ;
41
41
}
42
42
43
- void sh2_sh7014_device ::device_add_mconfig (machine_config &config)
43
+ void sh7014_device ::device_add_mconfig (machine_config &config)
44
44
{
45
45
SH7014_SCI (config, m_sci[0 ], DERIVED_CLOCK (1 , 1 ), m_intc,
46
46
0 , // id
@@ -61,17 +61,17 @@ void sh2_sh7014_device::device_add_mconfig(machine_config &config)
61
61
SH7014_BSC (config, m_bsc);
62
62
63
63
SH7014_DMAC (config, m_dmac, DERIVED_CLOCK (1 , 1 ), *this , m_intc);
64
- m_dmac->set_notify_dma_source_callback (FUNC (sh2_sh7014_device ::notify_dma_source));
64
+ m_dmac->set_notify_dma_source_callback (FUNC (sh7014_device ::notify_dma_source));
65
65
66
66
SH7014_INTC (config, m_intc);
67
- m_intc->set_irq_callback (FUNC (sh2_sh7014_device ::set_irq));
67
+ m_intc->set_irq_callback (FUNC (sh7014_device ::set_irq));
68
68
69
69
SH7014_MTU (config, m_mtu, DERIVED_CLOCK (1 , 1 ), m_intc);
70
70
71
71
SH7014_PORT (config, m_port);
72
72
}
73
73
74
- void sh2_sh7014_device ::sh7014_map (address_map &map)
74
+ void sh7014_device ::sh7014_map (address_map &map)
75
75
{
76
76
// SCI - Serial Communication Interface
77
77
map (0xffff81a0 , 0xffff81af ).m (m_sci[0 ], FUNC (sh7014_sci_device::map));
@@ -125,32 +125,32 @@ void sh2_sh7014_device::sh7014_map(address_map &map)
125
125
map (0xffff86b0 , 0xffff86df ).m (m_dmac, FUNC (sh7014_dmac_device::map));
126
126
127
127
// CAC - Cache Memory
128
- map (0xffff8740 , 0xffff8741 ).rw (FUNC (sh2_sh7014_device ::ccr_r), FUNC (sh2_sh7014_device ::ccr_w));
128
+ map (0xffff8740 , 0xffff8741 ).rw (FUNC (sh7014_device ::ccr_r), FUNC (sh7014_device ::ccr_w));
129
129
130
130
// Cache space
131
131
map (0xfffff000 , 0xffffffff ).ram ();
132
132
}
133
133
134
- void sh2_sh7014_device ::sh2_exception_internal (const char *message, int irqline, int vector)
134
+ void sh7014_device ::sh2_exception_internal (const char *message, int irqline, int vector)
135
135
{
136
136
// IRQ was taken so clear it in the interrupt controller and pass it down
137
137
m_intc->set_interrupt (vector, CLEAR_LINE);
138
138
sh2_device::sh2_exception_internal (message, irqline, vector);
139
139
}
140
140
141
- void sh2_sh7014_device ::execute_set_input (int irqline, int state)
141
+ void sh7014_device ::execute_set_input (int irqline, int state)
142
142
{
143
143
/*
144
144
Flow for SH7014 IRQs:
145
- sh2_sh7014_device ::execute_set_input (for externally triggered IRQs)
145
+ sh7014_device ::execute_set_input (for externally triggered IRQs)
146
146
-> sh7014_intc_device::set_input
147
- -> sh2_sh7014_device ::set_irq
147
+ -> sh7014_device ::set_irq
148
148
-> sh2_device::execute_set_input (if not internal peripheral IRQ) OR DMA interception OR set sh2_device's internal IRQ flags
149
149
*/
150
150
m_intc->set_input (irqline, state);
151
151
}
152
152
153
- void sh2_sh7014_device ::set_irq (int vector, int level, bool is_internal)
153
+ void sh7014_device ::set_irq (int vector, int level, bool is_internal)
154
154
{
155
155
if (!is_internal) {
156
156
sh2_device::execute_set_input (vector, ASSERT_LINE);
@@ -169,7 +169,7 @@ void sh2_sh7014_device::set_irq(int vector, int level, bool is_internal)
169
169
m_test_irq = 1 ;
170
170
}
171
171
172
- void sh2_sh7014_device ::notify_dma_source (uint32_t source)
172
+ void sh7014_device ::notify_dma_source (uint32_t source)
173
173
{
174
174
if (source == sh7014_dmac_channel_device::RS_SCI_TXI0)
175
175
m_sci[0 ]->set_dma_source_tx (true );
@@ -184,13 +184,13 @@ void sh2_sh7014_device::notify_dma_source(uint32_t source)
184
184
// /////
185
185
// CAC
186
186
187
- uint16_t sh2_sh7014_device ::ccr_r ()
187
+ uint16_t sh7014_device ::ccr_r ()
188
188
{
189
189
// bits 15-5 are undefined
190
190
return m_ccr & 0x1f ;
191
191
}
192
192
193
- void sh2_sh7014_device ::ccr_w (offs_t offset, uint16_t data, uint16_t mem_mask)
193
+ void sh7014_device ::ccr_w (offs_t offset, uint16_t data, uint16_t mem_mask)
194
194
{
195
195
// bit 0 - CECS0 CS0 Space Cache Enable
196
196
// bit 1 - CECS1 CS1 Space Cache Enable
0 commit comments