mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
fc100, phc25, phc25j: Possible fix for a reported crash?
This commit is contained in:
parent
d999e80d66
commit
1ab7e1edce
@ -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();
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user