Jump to content
IGNORED

debounce routine


bogax

Recommended Posts

Here's a bit of sillyness.

 

It's a debounce routine using two bit

vertical counters with simulated keypresses.

 

A counter is used for to simulate the

keypresses.

 

The first line at the top is the simulated

keypresses.

 

The first half of each simulated press or

release is random to simulate bounce.

 

That's the second line, the bouncy key signal.

 

The third line is the debounced signal.

 

The last two lines are the two bit debounce

counter.

 

Debounce follows the keypress on the third

good key sample.

 

There's eight channels but only one is shown.

 

It does 32 samples from left to right across

screen then waits for fire and then does it again.

 

debounce.bas

 

 

 

edit

I should point out that debounce is

inverted relative to the key.

On the screen debounce is inverted

to appear the same as the keypress.

A switch reads 0 when closed.

Debounce goes to 1 when the switch

is closed. I thought that would fit

better with how it would be/is used

in bB.

(Although I don't expect that a

debounce is necessary or that this

debounce routine would ever actually

be used :) )

Edited by bogax
Link to comment
Share on other sites

I know not what this be do. I think R.T. uses the word "debounce" to refer to stopping the fire button from repeating immediately. Is that what this is demonstrating?

 

P.S. THANK YOU again for your score debug code. it greatly helped me recently overcome a coding block (like a writers block) I had with chasing enemies around a multi-screen map.

Link to comment
Share on other sites

I think R.T. uses the word "debounce" to refer to stopping the fire button from repeating immediately. Is that what this is demonstrating?

 

That has been changed to Repetition Restrainer:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#repetition_restrainer_for_fire_button

 

A similar thing is used for the reset switch and the select switch.

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