diff options
author | Michael Zapf <Michael.Zapf@mizapf.de> | 2018-08-21 12:37:55 +0200 |
---|---|---|
committer | Michael Zapf <Michael.Zapf@mizapf.de> | 2018-08-21 12:37:55 +0200 |
commit | dc59de33518d47c5533ec6f158b04665cd2b4183 (patch) | |
tree | fcc8990c45b62fadd5ec540ecd441511df916537 /src/devices | |
parent | f10af0683b603cb0e2414a82102b65cec75d9c52 (diff) |
ti99: Simplified GROM declaration. (nw)
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/bus/ti99/gromport/cartridges.cpp | 32 | ||||
-rw-r--r-- | src/devices/bus/ti99/peb/pcode.cpp | 6 | ||||
-rw-r--r-- | src/devices/machine/tmc0430.h | 6 |
3 files changed, 15 insertions, 29 deletions
diff --git a/src/devices/bus/ti99/gromport/cartridges.cpp b/src/devices/bus/ti99/gromport/cartridges.cpp index 8e3d56369bc..e116d00b6e9 100644 --- a/src/devices/bus/ti99/gromport/cartridges.cpp +++ b/src/devices/bus/ti99/gromport/cartridges.cpp @@ -399,30 +399,14 @@ void ti99_cartridge_device::device_config_complete() /* 5 GROMs that may be contained in a cartridge */ -MACHINE_CONFIG_START(ti99_cartridge_device::device_add_mconfig) - - tmc0430_device& grom3(TMC0430(config, GROM3_TAG, 0)); - grom3.ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); - grom3.set_region_and_ident(CARTGROM_TAG, 0x0000, 3); - - tmc0430_device& grom4(TMC0430(config, GROM4_TAG, 0)); - grom4.ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); - grom4.set_region_and_ident(CARTGROM_TAG, 0x2000, 4); - - tmc0430_device& grom5(TMC0430(config, GROM5_TAG, 0)); - grom5.ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); - grom5.set_region_and_ident(CARTGROM_TAG, 0x4000, 5); - - tmc0430_device& grom6(TMC0430(config, GROM6_TAG, 0)); - grom6.ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); - grom6.set_region_and_ident(CARTGROM_TAG, 0x6000, 6); - - tmc0430_device& grom7(TMC0430(config, GROM7_TAG, 0)); - grom7.ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); - grom7.set_region_and_ident(CARTGROM_TAG, 0x8000, 7); - -MACHINE_CONFIG_END - +void ti99_cartridge_device::device_add_mconfig(machine_config& config) +{ + TMC0430(config, GROM3_TAG, CARTGROM_TAG, 0x0000, 3).ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); + TMC0430(config, GROM4_TAG, CARTGROM_TAG, 0x2000, 4).ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); + TMC0430(config, GROM5_TAG, CARTGROM_TAG, 0x4000, 5).ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); + TMC0430(config, GROM6_TAG, CARTGROM_TAG, 0x6000, 6).ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); + TMC0430(config, GROM7_TAG, CARTGROM_TAG, 0x8000, 7).ready_cb().set(FUNC(ti99_cartridge_device::ready_line)); +} /* Memory area for one cartridge. For most cartridges we only need 8 KiB for diff --git a/src/devices/bus/ti99/peb/pcode.cpp b/src/devices/bus/ti99/peb/pcode.cpp index bdf268013f9..f0a24ad1646 100644 --- a/src/devices/bus/ti99/peb/pcode.cpp +++ b/src/devices/bus/ti99/peb/pcode.cpp @@ -349,11 +349,7 @@ ROM_END void ti_pcode_card_device::device_add_mconfig(machine_config &config) { for (unsigned i = 0; m_groms.size() > i; ++i) - { - TMC0430(config, m_groms[i], 0); - m_groms[i]->ready_cb().set(FUNC(ti_pcode_card_device::ready_line)); - m_groms[i]->set_region_and_ident(PCODE_GROM_TAG, 0x2000 * i, i); - } + TMC0430(config, m_groms[i], PCODE_GROM_TAG, 0x2000 * i, i).ready_cb().set(FUNC(ti_pcode_card_device::ready_line)); LS259(config, m_crulatch); // U12 m_crulatch->q_out_cb<0>().set(FUNC(ti_pcode_card_device::pcpage_w)); diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h index dbbf1757f46..39f0a805d1d 100644 --- a/src/devices/machine/tmc0430.h +++ b/src/devices/machine/tmc0430.h @@ -26,6 +26,12 @@ enum class tmc0430_device : public device_t { public: + tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *regionname, int offset, int ident) + : tmc0430_device(mconfig, tag, owner, 0) + { + set_region_and_ident(regionname, offset, ident); + } + tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); auto ready_cb() { return m_gromready.bind(); } |