From f43f4b06969176e8afb47965813ad11e0d4b9591 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 6 Jan 2024 00:04:48 +0100 Subject: machine/8364_paula.cpp: assume max size if audlen == 0, fixes missing sound in videokid and wrestlmn --- hash/amigaocs_flop.xml | 10 +++++++--- src/devices/machine/8364_paula.cpp | 5 +++-- src/devices/machine/8364_paula.h | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hash/amigaocs_flop.xml b/hash/amigaocs_flop.xml index 51b9072b43c..a3bca57e897 100644 --- a/hash/amigaocs_flop.xml +++ b/hash/amigaocs_flop.xml @@ -53998,9 +53998,9 @@ ATK test: OK Gremlin Graphics Ocean + + @@ -56432,6 +56434,8 @@ ATK test: failed Pink screen [FDC] dsksync (fixed) ATK test: failed ]]> + + diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp index e6be4c878ad..a06eed90ca4 100644 --- a/src/devices/machine/8364_paula.cpp +++ b/src/devices/machine/8364_paula.cpp @@ -207,8 +207,9 @@ TIMER_CALLBACK_MEMBER( paula_8364_device::signal_irq ) void paula_8364_device::dma_reload(audio_channel *chan, bool startup) { chan->curlocation = chan->loc; - // TODO: how to treat length == 0? - chan->curlength = chan->len; + // TODO: Unconfirmed, assume max size if length is 0. + // cfr. wrestlmn and videokid, where they pratically never get even close to buffer exhaustion. + chan->curlength = chan->len == 0 ? 0x10000 : chan->len; // TODO: on startup=false irq should be delayed two cycles if (startup) chan->irq_timer->adjust(attotime::from_hz(15750), chan->index); // clock() / 227 diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h index 873525f8e0e..b4b371f8a98 100644 --- a/src/devices/machine/8364_paula.h +++ b/src/devices/machine/8364_paula.h @@ -86,7 +86,7 @@ private: { emu_timer *irq_timer; uint32_t curlocation; - uint16_t curlength; + uint32_t curlength; uint16_t curticks; uint8_t index; bool dma_enabled; -- cgit v1.2.3