From 22513fb6fe281f5ccb75aaddb6417a12a66c313d Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 25 May 2020 16:42:42 +0200 Subject: 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). --- src/devices/sound/aicadsp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/devices/sound/aicadsp.cpp') diff --git a/src/devices/sound/aicadsp.cpp b/src/devices/sound/aicadsp.cpp index 4ff8f6fa7d2..20faff8e5b8 100644 --- a/src/devices/sound/aicadsp.cpp +++ b/src/devices/sound/aicadsp.cpp @@ -273,21 +273,21 @@ void AICADSP::step() ADDR &= 0xFFFF; //ADDR <<= 1; //ADDR += RBP << 13; - //MEMVAL = space->read_word(ADDR >> 1); + //MEMVAL = space.read_word(ADDR >> 1); ADDR += RBP << 10; if (MRD && (step & 1)) //memory only allowed on odd? DoA inserts NOPs on even { if (NOFL) - MEMVAL = cache->read_word(ADDR) << 8; + MEMVAL = cache.read_word(ADDR) << 8; else - MEMVAL = UNPACK(cache->read_word(ADDR)); + MEMVAL = UNPACK(cache.read_word(ADDR)); } if (MWT && (step&1)) { if (NOFL) - space->write_word(ADDR, SHIFTED>>8); + space.write_word(ADDR, SHIFTED>>8); else - space->write_word(ADDR, PACK(SHIFTED)); + space.write_word(ADDR, PACK(SHIFTED)); } } -- cgit v1.2.3-70-g09d2