Skip to content

Commit

Permalink
pokey: return most recent m_ALLPOT during SK_RESET
Browse files Browse the repository at this point in the history
Don't count POT counters as long as SK_RESET is applied, i.e. bit #0
and bit #1 of SKCTL are both clear.
  • Loading branch information
pullmoll committed Oct 14, 2018
1 parent 5a7867e commit b82c608
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/devices/sound/pokey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b82c608

Please sign in to comment.