fc100, phc25, phc25j: Possible fix for a reported crash?

This commit is contained in:
Robbbert 2015-12-02 14:00:57 +11:00
parent d999e80d66
commit 1ab7e1edce
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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()