Jump to content
IGNORED

Pokeymax v2


foft

Recommended Posts

5 hours ago, candle said:

this lead me to the conclusion it must be syncing up to the overflow, and then use monothonic property of this counter

whenever there is a diffrence in internal counter value vs monitored pins, state machine is reset and resynced, so frequency doesn't matter

Yes this would certainly work if you have an I/O pin on the PIC with edge state change interrupt capability. If not, then constant polling would be required to do the same thing , which would be difficult at best to maintain accuracy of the count.

 

As I already mentioned, I didn't have this interrupt option available on the I/O pin assignments that had previously been established in the TK-II standard design. So I used the next best thing that was available, a built-in timer interrupt that could be run at a multiple of the original Pokey key scan frequency. Using this method allowed the new firmware to still work in the previous hardware that looked at the entire K0-K5 counter directly for it's comparison.

 

There is nothing wrong with this approach when one assumes that the Pokey key scan frequency will always be the same. And of course it always is, and has been for 40 years.

 

Because Pokeymax a relative new comer changed the rules, the key scan frequency is now different than the estabished standard.

 

Link to comment
Share on other sites

i can tell you already, that my AKI interfaces also do not work with pokeymax, thus the only remainig explenation is that pokeymax counter output is not monothonic

can't say anything more since i don't have pokeymax to test, i must relay on someone has both pokeymax and my aki interface to do tests for me

 

Link to comment
Share on other sites

Perhaps I count in a different order? The state machine does a tight loop: write value, read value. So should be equal periods and read about mid cycle.
 

In terms of fixes:

I think I can do repeated writes really fast, since the command and address do not need repeating. Then an interrupt on kr1/2 change. The problem is I’d then need to stop the counter while I read the kr1/kr2 values. If the count is being guessed then I can’t stop it.

 

The other option is to overclock the io expander. It’s spec is 400KHz but in tests (at least one) works reliably up to 3.5MHz. That would allow it to work at the same frequency. As for long term reliability impact, I expect it won’t make too much difference but... hard to know.

 

Anyway I’m going to look at pokey on the scope and see what I can do.

 

@mytek: Many thanks for offering to send me a tk2. Would be great though I’m not sure how to solve the international shipping. I have relatives there but they are clearly not travelling these days.

Link to comment
Share on other sites

On the CO12294-22 its scanning at constant rate ~64.3uS each code.

 

On the CO12294-22 its a plain upward counter. i.e. k0 is bit 0, k1 is bit 1 and goes 00,01,10,11 etc.

 

Pokeymax is scanning at the moment at 182uS each code. ~3 times slower. i.e. 11ms to scan keyboard vs 4ms with C012294-22.

 

Pokeymax is also scaling with not(bincnt_reg) i.e. 11,10,01,00. I should have checked rather than reading active low on wikipedia ?

 

So a first cut to work with AKI would be to change the not(bincnt_reg). Then I can improve the speed (for keyboard gamers 7ms can be serious!) by doing constant writes to the io expander and briefly pausing it on an interrupt that KR1/KR2 changed.

 

As for TK2, hmmm.

Link to comment
Share on other sites

3 hours ago, foft said:

As for TK2, hmmm.

If you can match Pokey's speed as you mentioned, then it might work ok.

 

Is it possible to update the Pokeymax core by the user? I have a USB Blaster if that'll work.

 

Where can I purchase a Pokeymax that can ship to the US?

 

Link to comment
Share on other sites

35 minutes ago, mytek said:

If you can match Pokey's speed as you mentioned, then it might work ok.

 

Is it possible to update the Pokeymax core by the user? I have a USB Blaster if that'll work.

 

Where can I purchase a Pokeymax that can ship to the US?

 

I will have to overclock to match the speed, I might make that an option. Will experiment tomorrow.

 

Yes the (advanced) user can update the core. In fact it can be done from software on the atari as well as the usb blaster.

  • Like 3
Link to comment
Share on other sites

I couldn't get continuous i2c writes working for some reason, the pins did not change. ie. write address command then a stream of data bytes.

 

However I got this working:

i) write until kr1/kr2 changes (which causes interrupt)

ii) read, register kr1/kr2

 

This doubles the scan speed just leads to a delay when the key is detected. Scan speed is now ~78uS. i.e. 5ms to scan whole keyboard. So even without ps2 adaptors it was worth doing this ?

 

I fixed the inversion, so the order of k0-k5 updates is correct. So I _guess_ AKI will work with this version.

Link to comment
Share on other sites

1 minute ago, candle said:

how about debouncing circuitry? can it be disabled to read multiple keys pressed at once as on real thing?

and why there is a i2c expander used when you have 169 ball device? i'm just curious about various design decisions

 

Debouncing should work as the original, I didn't test this much though...

 

Really it was down to space on the device for level converters. The io expander is super small and can input/output 5v. I used it for pots too on v1, but it was too slow for arcade switch use. I was trying to get it the size of a real pokey chip, 2 layer board and nothing on the underside. So pretty tight.

Link to comment
Share on other sites

15 hours ago, candle said:

this was intended as just pokey replacement (stereo - maybe), no enchancements whatsoever, thus its size

for feature-rich product you need to buy either a pokeymax, or simplestereo v4

If it is a POKEY replacement and is at a good price point, I would buy at least 25. 
 

EDIT: it would have to be a 100% drop in replacement in both form and function. If it did that, 25 would only be the beginning. 

Edited by MacRorie
Add specs
  • Like 1
Link to comment
Share on other sites

55 minutes ago, MacRorie said:

If it is a POKEY replacement and is at a good price point, I would buy at least 25. 
 

EDIT: it would have to be a 100% drop in replacement in both form and function. If it did that, 25 would only be the beginning. 

Best to contact Duddie directly for orders

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...