summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h8s2655.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h8/h8s2655.cpp')
-rw-r--r--src/devices/cpu/h8/h8s2655.cpp75
1 files changed, 37 insertions, 38 deletions
diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp
index 54dbada716e..f09b08bcab0 100644
--- a/src/devices/cpu/h8/h8s2655.cpp
+++ b/src/devices/cpu/h8/h8s2655.cpp
@@ -188,26 +188,27 @@ void h8s2655_device::map(address_map &map)
map(0xfffff8, 0xfffffb).rw("timer16:2", FUNC(h8_timer16_channel_device::tgr_r), FUNC(h8_timer16_channel_device::tgr_w));
}
-MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
- MCFG_H8S_INTC_ADD("intc")
- MCFG_H8_ADC_2655_ADD("adc", "intc", 28)
- MCFG_H8_PORT_ADD("port1", h8_device::PORT_1, 0x00, 0x00)
- MCFG_H8_PORT_ADD("port2", h8_device::PORT_2, 0x00, 0x00)
- MCFG_H8_PORT_ADD("port3", h8_device::PORT_3, 0xc0, 0xc0)
- MCFG_H8_PORT_ADD("port4", h8_device::PORT_4, 0x00, 0x00)
- MCFG_H8_PORT_ADD("port5", h8_device::PORT_5, 0xf0, 0xf0)
- MCFG_H8_PORT_ADD("port6", h8_device::PORT_6, 0x00, 0x00)
- MCFG_H8_PORT_ADD("porta", h8_device::PORT_A, 0x00, 0x00)
- MCFG_H8_PORT_ADD("portb", h8_device::PORT_B, 0x00, 0x00)
- MCFG_H8_PORT_ADD("portc", h8_device::PORT_C, 0x00, 0x00)
- MCFG_H8_PORT_ADD("portd", h8_device::PORT_D, 0x00, 0x00)
- MCFG_H8_PORT_ADD("porte", h8_device::PORT_E, 0x00, 0x00)
- MCFG_H8_PORT_ADD("portf", h8_device::PORT_F, 0x00, 0x00)
- MCFG_H8_PORT_ADD("portg", h8_device::PORT_G, 0xe0, 0xe0)
- MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_0", "intc", 64, 65, 66, "timer8_1", h8_timer8_channel_device::CHAIN_OVERFLOW, true, false)
- MCFG_H8H_TIMER8_CHANNEL_ADD("timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false)
- MCFG_H8_TIMER16_ADD("timer16", 6, 0x00)
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
+void h8s2655_device::device_add_mconfig(machine_config &config)
+{
+ H8S_INTC(config, "intc");
+ H8_ADC_2655(config, "adc", "intc", 28);
+ H8_PORT(config, "port1", h8_device::PORT_1, 0x00, 0x00);
+ H8_PORT(config, "port2", h8_device::PORT_2, 0x00, 0x00);
+ H8_PORT(config, "port3", h8_device::PORT_3, 0xc0, 0xc0);
+ H8_PORT(config, "port4", h8_device::PORT_4, 0x00, 0x00);
+ H8_PORT(config, "port5", h8_device::PORT_5, 0xf0, 0xf0);
+ H8_PORT(config, "port6", h8_device::PORT_6, 0x00, 0x00);
+ H8_PORT(config, "porta", h8_device::PORT_A, 0x00, 0x00);
+ H8_PORT(config, "portb", h8_device::PORT_B, 0x00, 0x00);
+ H8_PORT(config, "portc", h8_device::PORT_C, 0x00, 0x00);
+ H8_PORT(config, "portd", h8_device::PORT_D, 0x00, 0x00);
+ H8_PORT(config, "porte", h8_device::PORT_E, 0x00, 0x00);
+ H8_PORT(config, "portf", h8_device::PORT_F, 0x00, 0x00);
+ H8_PORT(config, "portg", h8_device::PORT_G, 0xe0, 0xe0);
+ H8H_TIMER8_CHANNEL(config, "timer8_0", "intc", 64, 65, 66, "timer8_1", h8_timer8_channel_device::CHAIN_OVERFLOW, true, false);
+ H8H_TIMER8_CHANNEL(config, "timer8_1", "intc", 68, 69, 70, "timer8_0", h8_timer8_channel_device::CHAIN_A, false, false);
+ H8_TIMER16(config, "timer16", 6, 0x00);
+ H8S_TIMER16_CHANNEL(config, "timer16:0", 4, 0x60, "intc", 32,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -215,8 +216,8 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::INPUT_B,
h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::INPUT_D)
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:1", 2, 0x4c, "intc", 40,
+ h8_timer16_channel_device::INPUT_D);
+ H8S_TIMER16_CHANNEL(config, "timer16:1", 2, 0x4c, "intc", 40,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -224,9 +225,8 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::INPUT_B,
h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::CHAIN)
- MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:2")
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:2", 2, 0x4c, "intc", 44,
+ h8_timer16_channel_device::CHAIN).set_chain("timer16:2");
+ H8S_TIMER16_CHANNEL(config, "timer16:2", 2, 0x4c, "intc", 44,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -234,8 +234,8 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::INPUT_B,
h8_timer16_channel_device::INPUT_C,
- h8_timer16_channel_device::DIV_1024)
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:3", 4, 0x60, "intc", 48,
+ h8_timer16_channel_device::DIV_1024);
+ H8S_TIMER16_CHANNEL(config, "timer16:3", 4, 0x60, "intc", 48,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -243,8 +243,8 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::DIV_1024,
h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::DIV_4096)
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:4", 2, 0x4c, "intc", 56,
+ h8_timer16_channel_device::DIV_4096);
+ H8S_TIMER16_CHANNEL(config, "timer16:4", 2, 0x4c, "intc", 56,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -252,9 +252,8 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::INPUT_C,
h8_timer16_channel_device::DIV_1024,
- h8_timer16_channel_device::CHAIN)
- MCFG_H8S_TIMER16_CHANNEL_SET_CHAIN("timer16:5")
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:5", 2, 0x4c, "intc", 60,
+ h8_timer16_channel_device::CHAIN).set_chain("timer16:5");
+ H8S_TIMER16_CHANNEL(config, "timer16:5", 2, 0x4c, "intc", 60,
h8_timer16_channel_device::DIV_1,
h8_timer16_channel_device::DIV_4,
h8_timer16_channel_device::DIV_16,
@@ -262,12 +261,12 @@ MACHINE_CONFIG_START(h8s2655_device::device_add_mconfig)
h8_timer16_channel_device::INPUT_A,
h8_timer16_channel_device::INPUT_C,
h8_timer16_channel_device::DIV_256,
- h8_timer16_channel_device::INPUT_D)
- MCFG_H8_SCI_ADD("sci0", "intc", 80, 81, 82, 83)
- MCFG_H8_SCI_ADD("sci1", "intc", 84, 85, 86, 87)
- MCFG_H8_SCI_ADD("sci2", "intc", 88, 89, 90, 91)
- MCFG_H8_WATCHDOG_ADD("watchdog", "intc", 25, h8_watchdog_device::S)
-MACHINE_CONFIG_END
+ h8_timer16_channel_device::INPUT_D);
+ H8_SCI(config, "sci0", "intc", 80, 81, 82, 83);
+ H8_SCI(config, "sci1", "intc", 84, 85, 86, 87);
+ H8_SCI(config, "sci2", "intc", 88, 89, 90, 91);
+ H8_WATCHDOG(config, "watchdog", "intc", 25, h8_watchdog_device::S);
+}
void h8s2655_device::execute_set_input(int inputnum, int state)
{