diff options
author | 2014-11-17 17:03:54 -0500 | |
---|---|---|
committer | 2014-11-17 17:03:54 -0500 | |
commit | d68a3a45b3dfc13f92096c0b7d58a49a2ef75f68 (patch) | |
tree | 056e3d80e0d9c2b018909468a7ace963e231e707 /src/emu/video | |
parent | a6d9826322d00e9f55c02d6ee378c0f9bbbf5aed (diff) |
Touching all the candy again: [Alex Jackson]
Fixed an annoying inconsistency between memory_share and memory_region:
the width() method of the former returned the width in bits (8, 16, 32 or 64)
while the width() method of the latter returned the width in bytes
(1, 2, 4 or 8). Now both classes have a bitwidth() method and a bytewidth()
method. Updated all callers to use whichever one was more appropriate.
Removed the implicit-cast-to-any-integer-pointer ability of memory_regions,
which was rather unsafe (if you weren't careful with your * operators and
casts it was easy to accidentally get a pointer to the memory_region object
itself instead of to the data, with no warning from the compiler... or at
least I kept doing it) Updated all devices and drivers that were accessing
regions that way to use a region_ptr_finder when possible, and otherwise to
call base() explicitly.
Diffstat (limited to 'src/emu/video')
-rw-r--r-- | src/emu/video/hd44780.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/video/hd44780.c b/src/emu/video/hd44780.c index f9827f9afe8..b21dc2e04e1 100644 --- a/src/emu/video/hd44780.c +++ b/src/emu/video/hd44780.c @@ -87,9 +87,9 @@ const rom_entry *hd44780_device::device_rom_region() const void hd44780_device::device_start() { if (region()) - m_cgrom = (UINT8*)(*region()); + m_cgrom = region()->base(); else - m_cgrom = (UINT8*)(*memregion("cgrom")); + m_cgrom = memregion("cgrom")->base(); m_busy_timer = timer_alloc(TIMER_BUSY); m_blink_timer = timer_alloc(TIMER_BLINKING); |