summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/tms5110.h
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-07 18:59:38 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-07 18:59:38 -0400
commitc0f366c61374775f8f8b7661e84705b568134dea (patch)
tree626e95fa31e6e8480983abbe305c0415ded783d2 /src/devices/sound/tms5110.h
parent5933d47ed740fd08c2f66f37fdca4f95e08df3d4 (diff)
Devfind revision phase 1, cleaning out some legacy stuff
- Eliminate the cached device_t::m_region pointer and its region() getter method. Devices that need to bind to a region with the same tag should use optional/required_memory_region or optional/required_region_ptr with DEVICE_SELF as the subtag; this improves error checking. (DEVICE_SELF has been moved to device.h for greater visibility in the source.) - Allow required/optional_region_ptr to specify a specific length which must match that of the region found. - Implement finder_base::finder_tag() getter for diagnostic purposes. - Perform some (not very efficient) validity checks on memory region finders instead of allowing them to automatically pass. - Privatize device_memory_interface::m_addrspace.
Diffstat (limited to 'src/devices/sound/tms5110.h')
-rw-r--r--src/devices/sound/tms5110.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h
index 8eb5306eaf9..8cba11e64f3 100644
--- a/src/devices/sound/tms5110.h
+++ b/src/devices/sound/tms5110.h
@@ -298,7 +298,7 @@ class tmsprom_device : public device_t
public:
tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- static void set_region(device_t &device, const char *region) { downcast<tmsprom_device &>(device).m_prom_region = region; }
+ static void set_region(device_t &device, const char *region) { downcast<tmsprom_device &>(device).m_prom.set_tag(region); }
static void set_rom_size(device_t &device, UINT32 rom_size) { downcast<tmsprom_device &>(device).m_rom_size = rom_size; }
static void set_pdc_bit(device_t &device, UINT8 pdc_bit) { downcast<tmsprom_device &>(device).m_pdc_bit = pdc_bit; }
static void set_ctl1_bit(device_t &device, UINT8 ctl1_bit) { downcast<tmsprom_device &>(device).m_ctl1_bit = ctl1_bit; }
@@ -339,7 +339,8 @@ private:
int m_prom_cnt;
- const char *m_prom_region; /* prom memory region - sound region is automatically assigned */
+ required_region_ptr<UINT8> m_rom;
+ required_region_ptr<UINT8> m_prom;
UINT32 m_rom_size; /* individual rom_size */
UINT8 m_pdc_bit; /* bit # of pdc line */
/* virtual bit 8: constant 0, virtual bit 9:constant 1 */
@@ -353,14 +354,12 @@ private:
devcb_write8 m_ctl_cb; /* tms ctl func */
emu_timer *m_romclk_timer;
- const UINT8 *m_rom;
- const UINT8 *m_prom;
};
extern const device_type TMSPROM;
#define MCFG_TMSPROM_REGION(_region) \
- tmsprom_device::set_region(*device, _region);
+ tmsprom_device::set_region(*device, "^" _region);
#define MCFG_TMSPROM_ROM_SIZE(_size) \
tmsprom_device::set_rom_size(*device, _size);