summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/k051316.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/k051316.cpp')
-rw-r--r--src/mame/video/k051316.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index a927bc6c010..5f59e3f8b83 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -150,6 +150,9 @@ void k051316_device::set_bpp(int bpp)
void k051316_device::device_start()
{
+ // assumes it can make an address mask with .length() - 1
+ assert(!(m_zoom_rom.length() & (m_zoom_rom.length() - 1)));
+
if (!palette().device().started())
throw device_missing_dependencies();
@@ -210,7 +213,7 @@ u8 k051316_device::rom_r(offs_t offset)
{
int addr = offset + (m_ctrlram[0x0c] << 11) + (m_ctrlram[0x0d] << 19);
addr /= m_pixels_per_byte;
- addr &= m_zoom_rom.mask();
+ addr &= m_zoom_rom.length() - 1;
// popmessage("%s: offset %04x addr %04x", machine().describe_context(), offset, addr);