PacManPlus Posted January 14, 2019 Share Posted January 14, 2019 (edited) 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 January 14, 2019 by PacManPlus Quote Link to comment Share on other sites More sharing options...
RevEng Posted January 14, 2019 Share Posted January 14, 2019 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. 1 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted January 14, 2019 Author Share Posted January 14, 2019 Wow - ok... Thank you for the explanation. 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.