From 0f0e16becd40852863463c849633478787dc830a Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 18 Oct 2024 00:40:49 +0200 Subject: [PATCH] video/upd7220.cpp: return 0xff on FIFO underflows * fix pc9821:skinpan intro hang --- hash/pc98.xml | 4 +++- src/devices/video/upd7220.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hash/pc98.xml b/hash/pc98.xml index 7434865fc2f..e94c5fb2f97 100644 --- a/hash/pc98.xml +++ b/hash/pc98.xml @@ -6767,8 +6767,10 @@ Never output any sound 1993 ガイナックス (Gainax) diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 8b8417e83f2..8bb8a9e8238 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -320,6 +320,12 @@ inline void upd7220_device::dequeue(uint8_t *data, int *flag) if (m_fifo_ptr == -1) m_sr &= ~UPD7220_SR_DATA_READY; } + else + { + // TODO: underflow details + // pc9821:skinpan does SR checks over the wrong port during intro ... + *data = 0xff; + } }