extra hardware!
Received a question via Messager that I'm going to reply to here as others may find it interesting as well:
On 12/11/2016 at 10:04 AM, Tangentg said:
Hey. I was discussing how people overcome Atari 2600 hardware limitations to a friend and I used your Space Rocks as an example, but am unable to offer any explanation. Do you think you could tell me a bit about how it was achieved? Thanks.
Long story short, extra hardware in the cartridge.
Short story long, one or more of the following are added into the cartridge:
Extra ROM
When the Atari was designed ROM was expensive so they only used 2K for the games (think Combat, Air-Sea Battle, etc). They did plan ahead though and designed the Atari so it could use 4K ROMs. As the cost of ROM dropped 4K games like Space Invaders and River Raid could then be written. Having extra ROM gives a game the space to store more detailed graphics.
Bankswitching - AKA even more ROM
Atari thought the successor to the 2600 would be out before they needed to go beyond 4K of ROM. The 2600 turned out to be more popular, and longer lived, than they expected so eventually 4K was no longer enough and they had to figure out a way around the 4K limit. What they came up with is known as bankswitching. For bankswitching you can think of the cartridge as a book, and each page in the book contains 4K. The Atari can turn the page to see different parts of the cartridge. A "2 page book" would be an 8K cartridge, like Asteroids and Ms. Pac-Man. A "4 page book" would be 16K for games like Solaris. I believe the largest game released back in the day was Fatal Run at 32K.
Extra RAM
All that extra ROM allowed for more complex games that needed to keep track of more things. The Atari only has 128 bytes of RAM and the cartridge port does not have the required signals to support RAM in the cartridge; critically it's missing the Read/Write line which is used to determine if the memory being accessed is to be Read From or Written To. Eventually they figured out how to work around that by repurposing an address line as the R/W line. The tradeoff of using an address line is each byte of RAM in the cartridge shows up twice in memory - one location is used for Reading, the other location is used for Writing. Jr. Pac-Man used extra RAM in order to keep track of all those dots in the large scrolling mazes. Games that use extra RAM tend to also use extra ROM.
Coprocessor
The Atari's unique in that the program has to update the video chip in real time, scanline by scanline, in order to create the display. This part of the program is known as the Kernel and is very time critical. Eventually extra ROM and RAM cannot help make a game look better as there just isn't enough processing time to utilize those extra resources.
To solve that, Activision came up with a coprocessor, known as DPC. DPC speeds up common kernel calculations, allowing even more updates to the video chip on every scanline. More updates leads to better graphics, as seen in Pitfall 2.
DPC also includes support for 3 voice music via waveform addition; however, using it requires the audio chip to be updated every scanline. That's a 9.2% hit in processing time in the Kernel, though Pitfall 2 used this feature to great effect.
Sadly the market collapsed before DPC could be used for other games on the 2600, though coprocessors in game cartridges were very common with later systems like the NES.
Space Rocks
Space Rocks uses all of the above - extra ROM, RAM and a "DPC+ coprocessor". Those are air quotes as the DPC+ coprocessor doesn't actually exist.
So how'd we pull that off? Well the Harmony Cart (and Melody board, basically a Harmony without the SD slot or USB port that is used to create stand alone games) has an ARM processor that runs different drivers to emulate the different types of hardware that can be found in an Atari cartridge. One those drivers emulated the DPC chip, allowing you to play Pitfall 2 on it. The Harmony has a lot of unused resources when running the DPC driver so we created a new driver, known as DPC+, in order to unlock those extra resources (extra RAM, ROM, and even running game code on the ARM processor itself).
The Future
As we learn more about the 2600 we can create new drivers for the Harmony/Melody to take advantage of that knowledge. As an example we're currently working on a bus stuffing driver and have created a few demos so people can try it out. Expect to see a lot more activity on this new driver after the holidays.
Bus stuffing in action:
- 16
4 Comments
Recommended Comments