Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a nice hack. I think this is how Woz did the Apple II paddles, too (albeit with discrete components and a timer IC). It sounds familiar.


Yes, the Apple II also uses a resistor-capacitor timing circuit to determine the paddle position. The big difference, however, is that the Apple II uses the timer and a counter to produce a paddle position 0-255. Software can then use this value to e.g. draw a paddle at a position on the screen.

The game chip, on the other hand, doesn't produce a value. Instead, the timer is synchronized to the screen drawing, so when the timer fires, it indicates to draw the paddle now. So the system never has the paddle position as a digital value and there's no register that holds the paddle position.


How is intersection with the ball detected?


I think that the circuit at the top center of the chip detects collisions. E.g. if the paddle is being drawn at the same screen position as the ball, then you know that the paddle has hit the ball. This way, you don't need to store the paddle position and you don't need to compare the paddle and ball positions, you just check if a paddle pixel and a ball pixel happen at the same time.

I haven't figured out how the ball position is stored. It seems like they'd need a register for the X and Y position, along with an incrementer/decrementer, but I couldn't find that. Maybe there's something tricky going on. Or maybe I haven't looked in the right place.


The brilliance of this is there's no chance of bugs caused by the internal paddle position (that causes the ball to bounce) not matching the drawn position, which would make the ball either pass through the paddle or bounce off nothing. Whether that was any part of a motivation for this design or it was purely driven by technical limitations, it's just a very elegant solution.


capacitor charge/discharge timing is actually pretty common way to make ADC, even precision ones,

https://en.wikipedia.org/wiki/Integrating_ADC


That's sweet. The paddle is a component of the "register" directly. I didn't stop and think about that deep enough. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: