summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2022-10-30 15:20:05 +0100
committer GitHub <noreply@github.com>2022-10-30 15:20:05 +0100
commit026f8c97d97fc7a29bd0e8a0aa518cd2d6987980 (patch)
tree6e7426a5d7a2f4b1e1f2f494fce50c71bdae21ca
parent8d20e0cbc677f2ca552c194c1a1bf894c67fc9a8 (diff)
pokey.cpp: remove m_SKCTL assignment hack in device_start and issue a potgo at device_reset instead (#10462)
- fixes a1200xl booting to self-test no matter J1 setting
-rw-r--r--src/devices/sound/pokey.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp
index e7c50534f76..b490126c0d5 100644
--- a/src/devices/sound/pokey.cpp
+++ b/src/devices/sound/pokey.cpp
@@ -257,11 +257,10 @@ void pokey_device::device_start()
m_KBCODE = 0x09; // Atari 800 'no key'
m_SKCTL = 0;
- // TODO, remove this line:
- m_SKCTL = SK_RESET;
- // It's left in place to accomodate demos that don't explicitly reset pokey.
+ // TODO: several a7800 demos don't explicitly reset pokey at startup
// See https://atariage.com/forums/topic/337317-a7800-52-release/ and
// https://atariage.com/forums/topic/268458-a7800-the-atari-7800-emulator/?do=findComment&comment=5079170)
+ // m_SKCTL = SK_RESET;
m_SKSTAT = 0;
/* This bit should probably get set later. Acid5200 pokey_setoc test tests this. */
@@ -357,6 +356,10 @@ void pokey_device::device_start()
void pokey_device::device_reset()
{
m_stream->update();
+ // a1200xl reads POT4 twice at startup for reading self-test mode jumpers.
+ // we need to update POT counters here otherwise it will boot to self-test
+ // the first time around no matter the setting.
+ pokey_potgo();
}
@@ -979,7 +982,8 @@ void pokey_device::write_internal(offs_t offset, uint8_t data)
case POTGO_C:
LOG("%s: POKEY POTGO $%02x\n", machine().describe_context(), data);
- pokey_potgo();
+ if (m_SKCTL & SK_RESET)
+ pokey_potgo();
break;
case SEROUT_C:
@@ -1104,9 +1108,6 @@ inline void pokey_device::process_channel(int ch)
void pokey_device::pokey_potgo()
{
- if (!(m_SKCTL & SK_RESET))
- return;
-
LOG("pokey_potgo\n");
m_ALLPOT = 0x00;