Jump to content
IGNORED

A quick way to check for the existence of POKEY at a specific address?


PacManPlus

Recommended Posts

A thought just occurred to me.

 

When I was putting the Pokey code into Pac-Man 320 / Ms. Pac-Man 320, there was a bug which occurred when the Pokey was not activated; The 'Random' address would always return the same number.

 

Could this be a quick / easy way to check for the existence of a Pokey at a specific address? I.E. read the Random address, say 5 times, and if the same value comes out all 5 times Pokey is not there.

 

Is this reliable?

Edited by PacManPlus
Link to comment
Share on other sites

In the 7800basic pokey detection I do that, more or less...

 

-put pokey in reset and wait a few cycles.

-read in 5 bytes. If any aren't 0xff then return with pokey-not-detected

-take pokey out of reset and wait a few cycles.

-read in 5 bytes. If any aren't 0xff then return with pokey-detected.

 

I wrote it that way, because I was never confident about how universal the "test a specific sequence of pseudo-rand bytes" method was.

 

Your simplified "just" 5 bytes test might work great, but I worry it might be fooled by a floating bus. Most of the time floating values reflect the previous value on the bus, but on some consoles they're a bit less predictable.

 

I had to update my own code to work around previous-on-bus floating values, when someone tested it with a Concerto that didn't have pokey plugged in, and it "detected" a pokey. So I don't think it's a purely theoretical concern.

  • Like 1
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...