Shannon Posted September 28, 2016 Share Posted September 28, 2016 I'm just curious.. is there a way from within an emulator to detect whether a program, demo or game is attempting to make use of or detect a dual pokey system? I'm thinking mostly from the coding side (aka modifying the code to look for certain behavior). Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 28, 2016 Share Posted September 28, 2016 Second Pokey will live at $D210-$D21F. In a stock machine the hardware registers are mirrored in that entire $D2xx page, the cold/warmstart OS routine zeroes the entire page so simply detecting access won't work. Generating audio on second Pokey involves writing to those addresses mentioned. It's probably not worth the effort to modify emulators to auto-detect when a program expects a stereo system. From the Atari side there's various ways to detect extra Pokeys. Probably the best one is to set the second one into INIT mode (store 00 in SKCTL @ $D21F). Then wait a couple of scanlines (STA WSYNC twice) and read the RANDOM register for the first Pokey. If the value stays the same across 2 reads in fairly quick succession then it means you only have 1 Pokey. Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 29, 2016 Share Posted September 29, 2016 It would probably suffice to simply always emulate both POKEYs and autoswitch the output -- the number of programs that deliberately wrote to $D21x, D23x, etc. for one POKEY for any reason other than hardware initialization is likely small. You would need a toggleable option anyway for true hardware compatibility. 1 Quote Link to comment Share on other sites More sharing options...
Shannon Posted September 29, 2016 Author Share Posted September 29, 2016 (edited) ok. Thanks guys. That info really helped. I just wanted a way to detect potential dual pokey useage so I can display a message somewhere that tells me the program, demo or game might be checking for a dual pokey. It's not always obvious if something being run is stereo capable and I needed a way to make it easier for me to determine that. Edited September 29, 2016 by Shannon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.