summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/sed1330.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2020-05-25 16:42:42 +0200
committer Olivier Galibert <galibert@pobox.com>2020-05-25 16:42:57 +0200
commit22513fb6fe281f5ccb75aaddb6417a12a66c313d (patch)
tree3cf84032cc6482d685a8dbb57e015bd17c7f7fdc /src/devices/video/sed1330.cpp
parente42c2d2874cf9c1092c01ab5ce9ef997d465ce25 (diff)
emumem: A little more speedup. cache and specific change syntax, and are not pointers anymore [O. Galibert]
The last(?) two changes are: - Add a template parameter to everything (theoretically the address space width, in practice a level derived from it to keep as much compatibility between widths as possible) so that the shift size becomes a constant. - Change the syntax of declaring and initializing the caches and specifics so that they're embedded in the owner device. Solves lifetime issues and also removes one indirection (looking up the base dispatch pointer through the cache/specific pointer).
Diffstat (limited to 'src/devices/video/sed1330.cpp')
-rw-r--r--src/devices/video/sed1330.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp
index 4b52400142d..101ebe72944 100644
--- a/src/devices/video/sed1330.cpp
+++ b/src/devices/video/sed1330.cpp
@@ -174,7 +174,7 @@ const tiny_rom_entry *sed1330_device::device_rom_region() const
void sed1330_device::device_start()
{
- m_cache = space().cache<0, 0, ENDIANNESS_LITTLE>();
+ space().cache(m_cache);
// register for state saving
save_item(NAME(m_bf));
@@ -611,8 +611,8 @@ void sed1330_device::draw_text_scanline(bitmap_ind16 &bitmap, const rectangle &c
{
if (m_m0 && !m_m1)
{
- uint8_t c = m_cache->read_byte(va + sx);
- uint8_t data = m_cache->read_byte(0xf000 | (m_m2 ? u16(c) << 4 | r : u16(c) << 3 | (r & 7)));
+ uint8_t c = m_cache.read_byte(va + sx);
+ uint8_t data = m_cache.read_byte(0xf000 | (m_m2 ? u16(c) << 4 | r : u16(c) << 3 | (r & 7)));
for (int x = 0; x < m_fx; x++, data <<= 1)
if (BIT(data, 7))
p[x] = 1;