Monday, December 24, 2007

Console Resolution

While for the B8VGC we are treating the television as having a 640x480 resolution, this is not going to be the resolution that the console displays. While I know that the virtual nature of this project allows me to do things that were not possible back when 8-bit was the order, I want my virtual game system to at least be theoretically possible for the time period. This leads to the question of how much memory is available. If you look at the specifications for any of the 8 bit consoles that were on the market, the answer is not very much. A black and white 640x480 image requires 38,400 which is more than half of the address space available to 8 bit processors. In fact if you have the 16 bit address space that most 8-bit processors used, the total accessible memory would be 65536 bytes. Memory was expensive back in those days, so 64K would have been a luxury. To simplify my design, I am going to assume that all the hardware shares the 64K of address space that is available. How much of that memory is available to the graphics system will then be game dependent. A more important point would be that only some of the memory would be ram, with the rest of the addressable memory being ROM. My design goal has to be to allow the graphics to comfortably fit withina small amount of memory, say 8 or 16K.

The first obvious thing that we can do is to reduce the number of pixels that make up the display. By simply doubling up the pixels we can reduce the display requirements to 320x240, which uses 9,600 bytes of memory. While that is on the high side, it will fit within our 16k limit, with room to spare. While this sounds like the perfect solution, remember that this is only a single bit-plane so we are talking about a monochrome display. While most games are not going to be using a bitmap mode, having this capability on our graphics processor can't hurt, though 9600 is not a nice number. If we letterbox the display and get rid of the top and bottom 20 pixels, we can get a nice 8,000 bytes. Combining two bit-planes, for an excessive 16K, would give us a four color mode which would be good for title screens and games that don't need rapid re-drawing.

Remember that 8-bit graphics aren't exactly speed demons, so a faster way of having graphics on the display would be nice. Of course, the logical choice is tile maps. I've covered this concept before. The display is broken into 8x8 blocks, with each of these blocks represented by a single byte. While a display may only have 256 distinct 8x8 blocks, the blocks can be used multiple times. As a nice bonus, using a tile map that is larger than the display, say 64x64, allows for smooth scrolling. The best part is that 64x64 is only 4K! The data that makes up the tiles aren't likely to change so can easily be stored in ROM. A tile map, some palette information, and some sprites could easily fit within 8K making this the mode most likely used in any games.

No comments: