summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/h8/h8s2245.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/h8/h8s2245.cpp')
-rw-r--r--src/devices/cpu/h8/h8s2245.cpp109
1 files changed, 52 insertions, 57 deletions
diff --git a/src/devices/cpu/h8/h8s2245.cpp b/src/devices/cpu/h8/h8s2245.cpp
index 3d07aa14ee0..3c9426e9f9b 100644
--- a/src/devices/cpu/h8/h8s2245.cpp
+++ b/src/devices/cpu/h8/h8s2245.cpp
@@ -61,59 +61,6 @@ h8s2246_device::h8s2246_device(const machine_config &mconfig, const char *tag, d
{
}
-static MACHINE_CONFIG_START(h8s2245)
- MCFG_H8S_INTC_ADD("intc")
- MCFG_H8_ADC_2245_ADD("adc", "intc", 28)
- MCFG_H8_DTC_ADD("dtc", "intc", 24)
- 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, 0xf0, 0xf0)
- MCFG_H8_PORT_ADD("port5", h8_device::PORT_5, 0xf0, 0xf0)
- MCFG_H8_PORT_ADD("porta", h8_device::PORT_A, 0xf0, 0xf0)
- 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, 0x00)
- 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", 3, 0x00)
- MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
- h8_timer16_channel_device::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- 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::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- 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::DIV_1,
- h8_timer16_channel_device::DIV_4,
- h8_timer16_channel_device::DIV_16,
- h8_timer16_channel_device::DIV_64,
- 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_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
-
DEVICE_ADDRESS_MAP_START(map, 16, h8s2245_device)
AM_RANGE(ram_start, 0xfffbff) AM_RAM
@@ -228,10 +175,58 @@ DEVICE_ADDRESS_MAP_START(map, 16, h8s2245_device)
AM_RANGE(0xfffff8, 0xfffffb) AM_DEVREADWRITE( "timer16:2", h8_timer16_channel_device, tgr_r, tgr_w )
ADDRESS_MAP_END
-machine_config_constructor h8s2245_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(h8s2245);
-}
+MACHINE_CONFIG_MEMBER(h8s2245_device::device_add_mconfig)
+ MCFG_H8S_INTC_ADD("intc")
+ MCFG_H8_ADC_2245_ADD("adc", "intc", 28)
+ MCFG_H8_DTC_ADD("dtc", "intc", 24)
+ 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, 0xf0, 0xf0)
+ MCFG_H8_PORT_ADD("port5", h8_device::PORT_5, 0xf0, 0xf0)
+ MCFG_H8_PORT_ADD("porta", h8_device::PORT_A, 0xf0, 0xf0)
+ 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, 0x00)
+ 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", 3, 0x00)
+ MCFG_H8S_TIMER16_CHANNEL_ADD("timer16:0", 4, 0x60, "intc", 32,
+ h8_timer16_channel_device::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ 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::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ 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::DIV_1,
+ h8_timer16_channel_device::DIV_4,
+ h8_timer16_channel_device::DIV_16,
+ h8_timer16_channel_device::DIV_64,
+ 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_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
void h8s2245_device::execute_set_input(int inputnum, int state)
{