mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
video/upd7220.cpp: ignore parameters beyond first one for pitch command
* fix pc9801:burai intro MAME crash
This commit is contained in:
parent
8b46595df8
commit
16a5e4eb9e
@ -1376,10 +1376,20 @@ void upd7220_device::process_fifo()
|
||||
break;
|
||||
|
||||
case COMMAND_PITCH: /* pitch specification */
|
||||
if (flag == FIFO_PARAMETER)
|
||||
// pc9801:burai writes a spurious extra value during intro, effectively ignored
|
||||
// (only first value matters)
|
||||
if (flag == FIFO_PARAMETER && m_param_ptr == 2)
|
||||
{
|
||||
m_pitch = (m_pitch & 0x100) | data;
|
||||
|
||||
if (m_pitch < 2)
|
||||
{
|
||||
// TODO: a pitch of zero will lead to a MAME crash in draw_graphics_line
|
||||
// Coerce a fail-safe minimum, what should really happen is to be verified ...
|
||||
popmessage("%s pitch == 0!", this->tag());
|
||||
m_pitch = 2;
|
||||
}
|
||||
|
||||
LOG("uPD7220 PITCH: %u\n", m_pitch);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user