Skip to content

Commit b5832f7

Browse files
committed
sh: remove prefixes
1 parent 7221abf commit b5832f7

29 files changed

+249
-245
lines changed

src/devices/cpu/sh/sh7014.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#include "sh7014.h"
1212

1313

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)")
1515

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)
1818
, m_sci(*this, "sci%u", 0u)
1919
, m_bsc(*this, "bsc")
2020
, m_dmac(*this, "dmac")
@@ -25,22 +25,22 @@ sh2_sh7014_device::sh2_sh7014_device(const machine_config &mconfig, const char *
2525
{
2626
}
2727

28-
void sh2_sh7014_device::device_start()
28+
void sh7014_device::device_start()
2929
{
3030
sh2_device::device_start();
3131

3232
save_item(NAME(m_ccr));
3333
}
3434

35-
void sh2_sh7014_device::device_reset()
35+
void sh7014_device::device_reset()
3636
{
3737
sh2_device::device_reset();
3838

3939
// CAC
4040
m_ccr = 0;
4141
}
4242

43-
void sh2_sh7014_device::device_add_mconfig(machine_config &config)
43+
void sh7014_device::device_add_mconfig(machine_config &config)
4444
{
4545
SH7014_SCI(config, m_sci[0], DERIVED_CLOCK(1, 1), m_intc,
4646
0, // id
@@ -61,17 +61,17 @@ void sh2_sh7014_device::device_add_mconfig(machine_config &config)
6161
SH7014_BSC(config, m_bsc);
6262

6363
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));
6565

6666
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));
6868

6969
SH7014_MTU(config, m_mtu, DERIVED_CLOCK(1, 1), m_intc);
7070

7171
SH7014_PORT(config, m_port);
7272
}
7373

74-
void sh2_sh7014_device::sh7014_map(address_map &map)
74+
void sh7014_device::sh7014_map(address_map &map)
7575
{
7676
// SCI - Serial Communication Interface
7777
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)
125125
map(0xffff86b0, 0xffff86df).m(m_dmac, FUNC(sh7014_dmac_device::map));
126126

127127
// 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));
129129

130130
// Cache space
131131
map(0xfffff000, 0xffffffff).ram();
132132
}
133133

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)
135135
{
136136
// IRQ was taken so clear it in the interrupt controller and pass it down
137137
m_intc->set_interrupt(vector, CLEAR_LINE);
138138
sh2_device::sh2_exception_internal(message, irqline, vector);
139139
}
140140

141-
void sh2_sh7014_device::execute_set_input(int irqline, int state)
141+
void sh7014_device::execute_set_input(int irqline, int state)
142142
{
143143
/*
144144
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)
146146
-> sh7014_intc_device::set_input
147-
-> sh2_sh7014_device::set_irq
147+
-> sh7014_device::set_irq
148148
-> sh2_device::execute_set_input (if not internal peripheral IRQ) OR DMA interception OR set sh2_device's internal IRQ flags
149149
*/
150150
m_intc->set_input(irqline, state);
151151
}
152152

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)
154154
{
155155
if (!is_internal) {
156156
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)
169169
m_test_irq = 1;
170170
}
171171

172-
void sh2_sh7014_device::notify_dma_source(uint32_t source)
172+
void sh7014_device::notify_dma_source(uint32_t source)
173173
{
174174
if (source == sh7014_dmac_channel_device::RS_SCI_TXI0)
175175
m_sci[0]->set_dma_source_tx(true);
@@ -184,13 +184,13 @@ void sh2_sh7014_device::notify_dma_source(uint32_t source)
184184
///////
185185
// CAC
186186

187-
uint16_t sh2_sh7014_device::ccr_r()
187+
uint16_t sh7014_device::ccr_r()
188188
{
189189
// bits 15-5 are undefined
190190
return m_ccr & 0x1f;
191191
}
192192

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)
194194
{
195195
// bit 0 - CECS0 CS0 Space Cache Enable
196196
// bit 1 - CECS1 CS1 Space Cache Enable

src/devices/cpu/sh/sh7014.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#include "sh7014_port.h"
2020
#include "sh7014_sci.h"
2121

22-
class sh2_sh7014_device : public sh2_device
22+
class sh7014_device : public sh2_device
2323
{
2424
public:
25-
sh2_sh7014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
25+
sh7014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
2626

2727
template<int Sci> auto sci_tx_w() {
2828
return m_sci[Sci].lookup()->write_sci_tx();
@@ -78,6 +78,6 @@ class sh2_sh7014_device : public sh2_device
7878
uint16_t m_ccr;
7979
};
8080

81-
DECLARE_DEVICE_TYPE(SH2_SH7014, sh2_sh7014_device)
81+
DECLARE_DEVICE_TYPE(SH7014, sh7014_device)
8282

8383
#endif // MAME_CPU_SH_SH7014_H

src/devices/cpu/sh/sh7032.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@
44
#include "emu.h"
55
#include "sh7032.h"
66

7-
DEFINE_DEVICE_TYPE(SH1_SH7032, sh1_sh7032_device, "sh1_sh7032", "Hitachi SH-1 (SH7032)")
7+
DEFINE_DEVICE_TYPE(SH7032, sh7032_device, "sh7032", "Hitachi SH-1 (SH7032)")
88

99

10-
sh1_sh7032_device::sh1_sh7032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
11-
: sh2_device(mconfig, SH1_SH7032, tag, owner, clock, CPU_TYPE_SH1, address_map_constructor(FUNC(sh1_sh7032_device::sh7032_map), this), 28, 0xc7ffffff)
10+
sh7032_device::sh7032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
11+
: sh2_device(mconfig, SH7032, tag, owner, clock, CPU_TYPE_SH1, address_map_constructor(FUNC(sh7032_device::sh7032_map), this), 28, 0xc7ffffff)
1212
{
1313
}
1414

15-
void sh1_sh7032_device::device_start()
15+
void sh7032_device::device_start()
1616
{
1717
sh2_device::device_start();
1818

1919
save_item(NAME(m_sh7032_regs));
2020
}
2121

22-
void sh1_sh7032_device::device_reset()
22+
void sh7032_device::device_reset()
2323
{
2424
sh2_device::device_reset();
2525

2626
std::fill(std::begin(m_sh7032_regs), std::end(m_sh7032_regs), 0);
2727
}
2828

29-
void sh1_sh7032_device::sh7032_map(address_map &map)
29+
void sh7032_device::sh7032_map(address_map &map)
3030
{
3131
// fall-back
32-
map(0x05fffe00, 0x05ffffff).rw(FUNC(sh1_sh7032_device::sh7032_r), FUNC(sh1_sh7032_device::sh7032_w)); // SH-7032H internal i/o
32+
map(0x05fffe00, 0x05ffffff).rw(FUNC(sh7032_device::sh7032_r), FUNC(sh7032_device::sh7032_w)); // SH-7032H internal i/o
3333
}
3434

35-
uint16_t sh1_sh7032_device::sh7032_r(offs_t offset)
35+
uint16_t sh7032_device::sh7032_r(offs_t offset)
3636
{
3737
return m_sh7032_regs[offset];
3838
}
3939

40-
void sh1_sh7032_device::sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask)
40+
void sh7032_device::sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask)
4141
{
4242
COMBINE_DATA(&m_sh7032_regs[offset]);
4343
}

src/devices/cpu/sh/sh7032.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
// license:BSD-3-Clause
22
// copyright-holders:Angelo Salese
33

4+
// SH7032, sh1 variant
5+
46
#ifndef MAME_CPU_SH_SH7032_H
57
#define MAME_CPU_SH_SH7032_H
68

79
#pragma once
810

911
#include "sh2.h"
1012

11-
class sh1_sh7032_device : public sh2_device
13+
class sh7032_device : public sh2_device
1214
{
1315
public:
14-
sh1_sh7032_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock);
16+
sh7032_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock);
1517

1618
protected:
1719
virtual void device_start() override;
@@ -26,6 +28,6 @@ class sh1_sh7032_device : public sh2_device
2628
uint16_t m_sh7032_regs[0x200];
2729
};
2830

29-
DECLARE_DEVICE_TYPE(SH1_SH7032, sh1_sh7032_device)
31+
DECLARE_DEVICE_TYPE(SH7032, sh7032_device)
3032

3133
#endif // MAME_CPU_SH_SH7032_H

0 commit comments

Comments
 (0)