How did they fit open world games like Zelda and the original Final Fantasy into NES cartridges

840 views

With some basic Googling It looks like that the max size was around 512 KB. How is this even possible to fit games of this size onto such little memory? What is this magic?

In: Technology

13 Answers

Anonymous 0 Comments

All graphical information was stored in 16KiB of memory. This area of memory was divided into sections.

The first was a pattern table. The table was 8KiB in size and divided into 8×8 tiles. The table was usually split vertically, half for backgrounds, half for sprites. A pixel was stored in 4 bits, meaning the NES could display 16 colors. The pattern table only stored the lower 2 bits of each pixel. The other two bits were looked up in one of the other two tables.

The next table was the “name table”, of which there were typically 2 but up to 4. A name table is 960 bytes. This corresponds to a 32×30 grid of 8×8 tiles from the pattern table. The top and bottom 8 scanlines weren’t rendered on a CRT television, so that memory could be used to hold game data. You can see the effect along the top and bottom edges of Tecmo Super Bowl.

A name table has an attribute table 64 bytes in size that maps the upper two bits of every pixel to the lower two bits in the pattern table.

There was also a sprite table, or sprite RAM, that used 4 bytes to map the x and y location, upper color bits, the tile index (meaning the x and y location is relative to a given tile in the background), horizontal or vertical flip, and foreground/background. This table was 256 bytes so there could be 64 sprites on the screen at any given time.

There were two color pallets of 16 colors each, and the color bytes split between the pattern table and the name or sprite tables indexed into these pallets. One was for the background, the other for the sprites. These two 16 color pallets mapped into a 256 color pallet built into the hardware.

If you don’t understand all that, don’t fret. The whole thing works out like a relational database, where one table maps into another. The data is down to packed bits, so while you have addressable bytes, you had to mask and pick out bits and combine them in registers to get complete values out. The hardware was built around all of this and could do it for you, which is how the system was fast enough to actually render this much data onto a CRT. A cartridge was ROM that basically plugged into this memory space, so the data was already laid out and good to go, the video hardware mapped right onto the cartridge data.

You are viewing 1 out of 13 answers, click here to view all answers.