summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Robbbert <pac0446@bigpond.net.au>2015-12-02 14:00:57 +1100
committer Robbbert <pac0446@bigpond.net.au>2015-12-02 14:00:57 +1100
commit1ab7e1edce191327c8bf435502ecb53f137e1c8a (patch)
treea36762eca88949b63e4828cd6f1c4b5574b2ae1b /src
parentd999e80d66bc72ddcfa20afa0b73b33289acce2a (diff)
fc100, phc25, phc25j: Possible fix for a reported crash?
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/fc100.cpp2
-rw-r--r--src/mame/drivers/phc25.cpp4
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()