Jump to content
IGNORED

Detecting dual pokey use in an emulator


Shannon

Recommended Posts

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 by Shannon
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...