Hacker News new | past | comments | ask | show | jobs | submit login

There is no frame buffer. The graphics are all drawn by manipulating a few registers in the video chip.

Everything is scan lines and cycles. You get a one bit per pixel 40 pixel wide background, a couple of single color 8 bit sprites and a couple more two bit wide sprites and that is pretty much it. A lot can be done by simply changing a color register at specific times too. Reusing sprites happens regularly as well. (Sprite drawn at left of screen can be repositioned to the right to be seen again. That is the "racing the beam" part you may have heard people mention.

Most of the CPU run time available for each frame is spent generating the display a scan line at a time.

The real game happens during the vertical blanking period.

Almost everything comes from ROM, leaving ram for game state and the few objects that may need to be dynamic, and even those are in ROM when there is room for all the states.

It is an odd feeling when you run out of room. The phrase, "I used every BIT of RAM" is literal! Happened to me once. No more bits and I had to either leave out a feature, or take a speed penalty by packing multiple states into single bytes.




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

Search: