| Main > Main Forum |
| How do I build... Pong? |
| << < (4/4) |
| Druin:
So to summarize, I read the first article about Football and other games, in that pong link. I don't know how the television interface itself works to generate tv stuff but I figured out how they make the control logic for fixed and movable characters on the screen. Think of the tv as drawing frames (complete pictures) from left to right, top to bottom, over and over, a gun scanning left to right along the top of the screen for line 1, move down and scan across the next line left to right, until it gets to the bottom, then zoom back to the top left and start over. If you can do whatever it takes to control that gun to fire on and off while it's scanning like that, you generate the picture, pixel by pixel. Suppose the gun has a simple input control for you to interface with, on/off. When it's on, it lights up, off, it is dark. If you turn the gun on and leave it on, you'll just have a solid light screen as the gun moves. If you turn it on and then off you get a pixel. The game hardware will generate the final output pulses that toggle this gun when it's in the right positions. For generating fixed characters, the hardware is set up so that the timers for line position and field/frame position (X-Y screen coordinates) will turn on the gun during those times, otherwise off. For movable characters it's the same timer setup as fixed ones, setting a gun control to fire when coordinates are met, except you get to manually change those coordinate setpoints by interfering with the timing parameters and moving the X-Y set points. If two characters happen to be drawn at the same spot, there is no conflict, the gun is being fired already for character 1 so it simply fires no matter how many sources tell it to. Since you have those logic gun firing signals, you know when each character is being drawn at any point in time, based on which gates are high. If you run those through other gates, you can generate new control signals that are generated when more then 1 character show up in that coordinate (collision) or when some character reaches a certain boundary on the screen, etc. Even though I understand what I'm writing, I still get a little lost in what Im' writing. To me it's like writting assembler vs high level code...instead of just writing the rules of the game and creating character icons to move around, you have to go into the registers and push and pop stuff before you ever get to think about what it actually ends up meaning. Hopefully it makes sense to someone |
| Navigation |
| Message Index |
| Previous page |