Jump to content
  • entries
    39
  • comments
    57
  • views
    124,771

Serve Timer


DanBoris

949 views

We have almost looked at the entire Pong circuit, just a few miscellaneous sections to go. This is the server timer circuit

 

2puck.zip

 

During normal play the output of F4, /RUN and STOP G will all be low which will make the output of E5 high, which will keep the SERVE output of B5 low. When the ball is missed, /MISS will go low, pin 6 of E6 will go high which resets the ball speed counter. Pin 3 of E6 will then go low which triggers the 555 timer and sets the output high, and sets the output of E5 low. This low output will clear B5, setting SERVE high which will hold the horizontal ball counter in reset. After 1.7 seconds the output of the 555 timer will return low, setting the output of E5 high. This provides for a small delay between missing the ball and the next serve. The SERVER output of B5 will remain high until the PAD1, at which point SERVE will go low releasing the reset on the horizontal ball counter.

 

The use of PAD1 as a trigger to release the reset on the ball counter may seem a little odd, but it turns out to be a clever trick to get the ball back to the middle of the screen for the next serve. When the reset on the counter is released, the ball counter will be at zero and the horizontal screen counter will be at 128, because that’s the horizontal position of paddle 1. If you look back at the section on the ball horizontal counter you will see that the ball in enabled when the counter reaches a count of 508. When the horizontal screen counter reaches 455 the ball counter will be at 327. There will then be 80 counts during HBLANK when the ball counter doesn’t increment. After HBLANK, the ball counter will count 181 more times, thus displaying the ball at location 261. Since the net is at 256 this starts the ball very close to the net.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

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