summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2018-10-15 00:46:19 -0400
committer GitHub <noreply@github.com>2018-10-15 00:46:19 -0400
commit6de314ac7c7e001ef6f8c13610aa8d947505545f (patch)
treed622c3fd0e31ba1caa7871df3d784315c405df19
parentfedbee9ddd5a27eb1395bba2043bcea49ca76df2 (diff)
parentb82c608b91c846439588c0ee484f121c0a770108 (diff)
Merge pull request #4143 from pullmoll/pokey
pokey: return most recent m_ALLPOT during SK_RESET
-rw-r--r--src/devices/sound/pokey.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp
index ebeaf344660..f9eb377a136 100644
--- a/src/devices/sound/pokey.cpp
+++ b/src/devices/sound/pokey.cpp
@@ -547,6 +547,10 @@ void pokey_device::step_keyboard()
void pokey_device::step_pot()
{
int pot;
+
+ if( (m_SKCTL & SK_RESET) == 0)
+ return;
+
uint8_t upd = 0;
m_pot_counter++;
for (pot = 0; pot < 8; pot++)
@@ -809,7 +813,7 @@ READ8_MEMBER( pokey_device::read )
****************************************************************/
if( (m_SKCTL & SK_RESET) == 0)
{
- data = 0;
+ data = m_ALLPOT;
LOG(("POKEY '%s' ALLPOT internal $%02x (reset)\n", tag(), data));
}
else if( !m_allpot_r_cb.isnull() )
@@ -1072,6 +1076,9 @@ void pokey_device::pokey_potgo(void)
{
int pot;
+ if( (m_SKCTL & SK_RESET) == 0)
+ return;
+
LOG(("POKEY #%p pokey_potgo\n", (void *) this));
m_ALLPOT = 0x00;