User Tools

Site Tools


sd:256k_vs_512k

256k vs 512k

When I started writing the SD-8516 I wanted it to have 256k of memory, because I had done a cursory review of various 80's consoles and computers and decided 256k was a charming homage to a “more advanced C128”. I now realize that even though I capped performance at 4mhz, it actually operates much faster due to some of the newer CISC-like opcodes. “Four times the MHz, four times the ram” was a nice idea, but it doesn't work out in practice due to a few factors.

1. This isn't an actual computer.
What I mean is, if you compare it to something like a SNES, the SNES had 128k of RAM, plus 64k for video and 64k for sound. Thats 256k, sure, but cartridges like “The Legend of Zelda” had 128k of ROM. It's true that Zelda famously used less than half the ROM on the cart, but most games actually came with far more on-cart memory than that. Even early games like MegaMan started to use over 100kb, and while Super Mario Bros. was 40k, Super Mario Bros. III used over 350k on-cart. These games were not small.

We don't have extra RAM/ROM space on cartridges.

By the SNES era, games like Super Mario World were 500k, and A Link to the Past was 1MB in size. The implication here is that it would be very difficult if not impossible to port A Link to the Past on our 256k system. We don't have as much RAM left over as a SNES after ROM, Video and Audio.

There just wouldn't be enough space in memory to hold the assets, and pulling it in from OPFS would be very expensive. Not like reading data from a cartridge.

2. Twice the speed, twice the RAM
The truth is, we're not just twice as fast as a C128, or four times faster than a C64; we're about ten times faster. The reason is that there is almost no register pressure here, and we have a PPU like 80s era consoles did. Therefore to make use of this speed, we are going to need more ram. Here's a chart explaining the issue by comparing our memory map to various retro-era consoles:

NES SNES TurboGrafix-16 SEGA Genesis Neo Geo GBA SD-8516
RAM 2k 128k 8k 64k 64k 288k 128k
Video 2k 64k 64k 64k 68k 96k 64k
Audio n/a 64k n/a 8k 2k n/a 64k
Total 4k 256k 72k 136k 142k 384k 256k

The SD-8516 has 64k free in each of Bank 0, 2 and 3. Bank 1 is reserved for the operating system – technically you can use that space, but it is not recommended. You can also use parts of bank 2 depending on the graphics mode. It's not used in modes 1, 2 or 6. Then there is bank 3, which can also be used for RAM. But if you do that, then you wont't have any audio memory.

So while we are comparable to many of the era's consoles, we should have at least enough RAM to compare with some of the cartridges. That is the problem; we didn't account for cartridges.

What's in a Cartridge?

A lot of SNES and other cartridges came with extra RAM, APUs, and so on. This all strongly suggests that the system memory here should be more likely 512k or even 1 MB. This would put us squarely between the SNES and the N64, which is actually probably a good place.

For now, i'm just thinking about it. But if I do decide to increase ram, it will be to 512 first. The Amiga 500 came with 512k RAM. You could do a lot with that, you could probably cache enough assets to run most SNES games. The issue is I don't want to give the system too much memory or it might lose it's retro feel. Maybe we can slowly increase the RAM by just 1 or 2 banks and see how it works out.

sd/256k_vs_512k.txt · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki