From 1ab7e1edce191327c8bf435502ecb53f137e1c8a Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 2 Dec 2015 14:00:57 +1100 Subject: [PATCH] fc100, phc25, phc25j: Possible fix for a reported crash? --- src/mame/drivers/fc100.cpp | 2 +- src/mame/drivers/phc25.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp index 65d7c801bee..f5d33065a36 100644 --- a/src/mame/drivers/fc100.cpp +++ b/src/mame/drivers/fc100.cpp @@ -79,7 +79,7 @@ public: MC6847_GET_CHARROM_MEMBER(get_char_rom) { - return m_p_chargen[ch * 16 + line]; + return m_p_chargen[(ch * 16 + line) & 0xfff]; } private: virtual void machine_start(); diff --git a/src/mame/drivers/phc25.cpp b/src/mame/drivers/phc25.cpp index 861f8589201..9f87d0313b1 100644 --- a/src/mame/drivers/phc25.cpp +++ b/src/mame/drivers/phc25.cpp @@ -279,7 +279,7 @@ READ8_MEMBER( phc25_state::video_ram_r ) MC6847_GET_CHARROM_MEMBER(phc25_state::pal_char_rom_r) { - return m_char_rom[((ch - 2) * 12) + line + 4]; + return m_char_rom[(((ch - 2) * 12) + line + 4) & 0xfff]; } // irq is inverted in emulation, so we need this trampoline @@ -290,7 +290,7 @@ WRITE_LINE_MEMBER( phc25_state::irq_w ) MC6847_GET_CHARROM_MEMBER(phc25_state::ntsc_char_rom_r) { - return m_char_rom[(ch * 16) + line]; + return m_char_rom[(ch * 16 + line) & 0xfff]; } void phc25_state::video_start()