Jump to content
IGNORED

DanBoris' Tech Blog - Serve Timer


RSS Bot

Recommended Posts

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

 

blog-184-1155251970_thumb.jpg

 

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.

 

 

http://www.atariage.com/forums/index.php?a...;showentry=1830

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...