18

Even in the PlayStation/Saturn era, they had like little RAM chips which were dedicated to just "sound", or "video", or "general".

Since they still needed to have the RAM chips, why not have them all combined into a single RAM so that each game could choose to have less sounds loaded in to fit more polygon models and textures instead, etc.?

Why have them segregated completely into different "categories"? It always struck me as limiting for no good reason. Like when people give you a gift in the form of a coupon at a specific store from which you don't wish to have any items.

10
  • 26
    The ram has a limited bandwidth. Having multiple chips allows multiple processes to run in parallel, avoiding contention and reaching high combined throughput that is otherwise impossible when done in single ram device through a single ram interface.
    – Vlad
    Commented Jun 25, 2022 at 18:59
  • 4
    @Vlad Add a tiny bit more detail, and that's enough for an answer! Do you want to post it in the answer box?
    – wizzwizz4
    Commented Jun 25, 2022 at 19:32
  • 8
    Modern PCs still have dedicated video ram more often than not.
    – Hearth
    Commented Jun 26, 2022 at 21:38
  • 2
    Bus contention surely! It's been around way way longer than the PS and Saturn. Special coprocessors like the Amiga had and even video circuity could slow down areas of the RAM I believe. This is one benefit Apples new M1/M2 have in that the on-chip GPU has access to all the RAM the machine has, not just the RAM on the GPU card. Commented Jun 27, 2022 at 2:39
  • 1
    @hippietrail But at the same cost as with the Amiga - every GPU RAM access will slow down CPU access. This is, and will always be the problem of UMA (Unified Memory Access) architectures. That's why high end graphics systems will always have CPU RAM and GPU RAM separated by some bus (like PCIe). All to reduce concurrency to a minimum.
    – Raffzahn
    Commented Jun 27, 2022 at 14:20

5 Answers 5

23

It's not limited to just consoles. Average PC in similar era than PS1 made the same distinction with several specialized memory areas for same reason.

For example in a PC the CPU has memory it can use by itself and other stuff like video or audio generation does not take away that bandwidth.

In PCs the frame buffer memory has always been in the video card. So CPU can write to RAM on video card and the video card just needs to generate the video output from the video RAM.

For example in a PC the CPU can load samples and instruments to the memory in a sound card. The sound card can play music and sound effects from its own memory with nothing to disturb it. Assumes a multichannel wavetable sound card such as GUS or AWE32. Simpler stereo sound cards did use DMA from main CPU memory.

So as generating the video output and sound playback does not consume main CPU memory bandwidth, the CPU can use all the memory bandwidth it has to main memory to perform useful calculations.

So as the video memory size and audio memory size are pre-determined, that are the limitations you have to deal with. But just using single memory for everything that consumes memory bandwidth, the CPU would never have full access to RAM and would have to wait memory access without doing any calculations.

5
  • 15
    Even in a modern PC, most peripherals will have dedicated memory blocks for similar reasons. Its not uncommon for SSDs to have GBs of memory for internal caching for example. Its just considered so standard that its not advertised unless the amount has significant performant implications. Commented Jun 26, 2022 at 1:44
  • 2
    Some peripherals do advertise the amount of dedicated memory - for example display cards' video buffer and mechanical hard drives' caches.
    – Jonathan
    Commented Jun 26, 2022 at 7:51
  • 2
    @user1937198 It's not just for caching. Any modern SSD is actually a tiny computer running fairly complicated firmware. Any device with firmware needs a processor and some RAM of its own to execute it, be it an SSD or just a tiny Bluetooth adapter.
    – TooTea
    Commented Jun 26, 2022 at 9:11
  • 2
    @TooTea Not just SSDs either. Any drive with LBA and S.M.A.R.T. For example, rotating platter drives have one to three ARM cores or, depending on how far along WD is with their plans to save on licensing costs, RISC-V cores. See, for example. this page detailing efforts to hack a hard drive controller to install malicious code as a proof of concept or, more usefully, to demonstrate DIY reuse of free microcontrollers from mechanically-failed drives.
    – ssokolow
    Commented Jun 26, 2022 at 17:05
  • 1
    Ah, the memories! As GUS programmer having dedicated memory made things very simple. Just load the samples to onboard RAM and play as you needed. With small instrument sets you could just load the samples at when initializing the program and play as needed. No need tor DMA transfer or writing stuff to onboard RAM. If writes were needed, you could have the IRQ trigger when half of the sample was played reload the other half. Having 512kB or 1MB onboard soundcard was huge compared to the system RAM (around 4-8MB at the best).
    – vhu
    Commented Jun 27, 2022 at 14:21
22

The most peculiar example of RAM dedicated to a single task was the Spanish version of the Amstrad CPC464, the CPC 472. This machine an extra 64kx1 DRAM chip which was not connected to anything. Its sole purpose was to get around an import tax on computers with 64K or less RAM.

11
  • 6
    This does not answer the question at all. If anything it's a nice anecdote for a comment.
    – Num Lock
    Commented Jun 27, 2022 at 11:09
  • 5
    @NumLock you are totally right, and wrong. This is retrocomputing, where the peculiarities of obscure machines are celebrated, not dismissed. Or not. Down-vote if you don't like it. Commented Jun 27, 2022 at 11:36
  • 3
    @BruceAbbott The question specifically asks about RAM for certain technical aspects of old consoles in regards to performance and partial utilization for tasks, and not some tax regulations or legal aspects.
    – Num Lock
    Commented Jun 27, 2022 at 14:08
  • 2
    @BruceAbbott Thinking of it, a few minutes after recommending deletion during review, I'm kinda torn apart, 'cause it's a not only a true fact but a quite funny as well. Maybe save it by further pointing out how it's taking the premise of the question to an extreme :))
    – Raffzahn
    Commented Jun 27, 2022 at 14:14
  • 5
    @Raffzahn: I think "reducing the cost of machines" could be described as a "task". Yes, a stretch, but I would certainly think that situations where a company has chosen to use one part instead of an otherwise-cheaper part that was just as functional for tax purposes would certainly qualify and be interesting. In this case the equivalent alternative part would simply be "nothing".
    – supercat
    Commented Jun 27, 2022 at 15:10
9

The main reason is that memory performance has always been a key part of overall system performance, and when the same memory has to be shared among multiple tasks (like video, audio, and a general-purpose CPU) at least one of these will tend to suffer from decreased bandwidth or increased latency. It's like comparing a modern PC with only integrated graphics vs. one with a separate video card containing its own GDDR6 (or similar) memory. The integrated graphics can't compete because it's memory performance is orders of magnitude less and it causes contention with the CPU as well.

Historically there have been consoles that used a single memory bus, for instance the 8-bit Ataris, the Atari Jaguar, the Nintendo 64, and handhelds like the Gameboy. I think it's fair to say that their performance limitations were widely recognized. An Atari 7800 had a very similar CPU to the competing NES, but the Atari's CPU would halt everytime the video hardware needed to access memory due to the shared bus, resulting in lower effective processing speed.

A secondary reason for using (physically) separate memory for different purposes is that the system components may have been designed specifically with that in mind, or may require a specific type of memory. For instance, if you have a graphics chip designed for dual-port VRAM, and a CPU with a built-in SDRAM controller, then the amount of external logic needed to join these into a single memory pool could result in a board design that was both more expensive and lower performing. Think of it like trying to design a turntable that played both CDs and vinyl records. They are both things that spin but the devil is in the details.

8

The Amiga has 2 types of RAM: chip memory and "other" memory.

Chip memory is on-chip and is accessible by both CPU and custom chips (audio chip, video chip, blitter chip, disk chip). The custom chips use direct memory access (DMA) to access the chip memory.

If you add other memory (also known as "fast"), only the CPU can access it to execute instructions and it is really much faster than running in chip memory because the custom chipset can't steal bus cycles to access that particular memory.

So a properly coded game would install itself in fast/other memory, and would use the CPU to load audio/graphical assets in chip memory only in initialization phase, then leave the custom chips access that memory in the game main loop, while the CPU is alone on the fast memory.

An even faster setup would be an accelerator board with CPU+memory on the board (the original CPU isn't used when the board is active). But paradoxally, programs that don't use that memory and run fully in chip (there are a lot of them) are even slower on those overpriced boards because accessing chipmem from the on-board CPU is super-slow!

There is also another memory type known as "slow" memory. Not particularly faster than chip memory, but custom chipset can't access it. That's a cheap memory expansion on low-end machines that doesn't bring better speed, which explains partially why a lot of games only use it for storage/disk cache to save up on long in-game loading times, while the code is still running in chip memory.

So it's not sure if the separate memory type was intended at the start. Most amigas were sold with only chipmem, 256k for A1000, 512k for A500, 1MB for A600 and 2MB for A1200, and early models didn't have expansion CPU boards, and their memory expansions weren't that "fast".

But it became a fact when the expansion boards were created and properly coded games can benefit from that fact.

3
  • 1
    A long way of saying that an Amiga with both CHIP+FAST RAM has more bandwidth for code execution, while being the same for DMA/graphics/sound. The major CHIP RAM performance enhancements were increased CPU->CHIP RAM bandwidth with A3000, and increased Chipset->CHIP RAM bandwidth with AGA.
    – Brian H
    Commented Jun 26, 2022 at 17:27
  • 1
    Chip RAM is not on chip, it is accessible by (some of) the custom chips. Chip RAM still consist of regular RAM chips. At least that's my understanding. Commented Jun 27, 2022 at 2:44
  • Atari TT also had the distinction between chip-RAM and Fast-RAM. The address range below 16MiB was STE compatible, i.e. could be used by the DMA chips for sound, the framebuffer by the graphic chips, the floppy DMAs, etc. The memory beyond 16MiB was only accessible to the CPU (and the SCSI DMA afaicr) and was significantly faster access than the low-RAM (burst mode of the FP-RAM made the accesses especially faster). That's why whenyou bought a TT you had the memory displayed as 4+4 or 2+0 (my current TT has 4+32). Commented Jun 27, 2022 at 5:52
5

I don't think other answers have captured the essence here: Different RAM chips are connected to different parts of the computer.

You're looking at it from a software perspective: everything should be designed for flexibility. But have you considered how the hardware works?

Imagine you are designing a programmable sound circuit. Maybe it just reads out PCM sound data from RAM:

            start/stop flag
                 |
                 V
Timer => address incrementer => address register => RAM => DAC => analog filter => speaker
                 ^                     |
                 |                     |
                 \---------------------/

What makes up "RAM"? Well, a RAM chip. The address bus connects to the address register; the data bus connects to the DAC.

This is the core of your circuit - this is what makes the sound. Now you tack on some secondary bits to let the CPU access it. And you have to figure out how to actually do that. Maybe you say that when a sound isn't playing, the DAC is disabled and the CPU has access to the RAM's address and data bus, instead of the sound circuit.

CPU stuff =+=> start/stop flag -----------------------+-----------------\
           |     |                                    |                 |
           V     V                                    V                 V
Timer => address incrementer => address register => muxer => RAM <=+=> DAC => analog filter => speaker
                 ^                     |              ^            |
                 |                     |              |            V
                 \---------------------/              +---> tristate switch
                                                      |            ^
                                                   decoder         |
                                                      ^            V
                                                      |         data bus
                                                 address bus

Now you look at this design and you think "why is there sound RAM?" Well, it's obvious: this RAM is part of the sound circuit! The sound RAM is a RAM chip that's part of the sound circuit. The video RAM is a RAM chip that's part of the video circuit. In fact the video circuit might have more than one RAM chip: a Gameboy-like video circuit will have RAM to store pictures of game tiles, RAM to store sprites and RAM to store the arrangement of tiles on the screen, all in different places in the circuit!

In the arrangement shown above, the CPU has to turn off the sound to access the sound RAM. If it doesn't turn off the sound, the RAM's address bus will be connected to the sound address counter instead of the CPU's address bus, so the CPU won't be reading data from the address it expects to.

This is not the only way to design a peripheral with RAM. Many computers had the video circuit and the CPU take turns accessing the same RAM. Or the CPU's clock would be paused if it tried to access certain RAM chips on clock cycles where a peripheral was using them. Or just paused outright, regardless of what it was accessing. (See: Commodore 64 "bad lines")

There's also dual-ported memory with two separate address and data busses, but it's expensive.


On a modern computer, there is more than enough memory bandwidth to go around. The sound chip can contain a small FIFO buffer (because it does need predictable access) and refill it from the main memory with DMA whenever there is time. The video card, similarly. Retrocomputers did not have that luxury - everything had to be planned around memory cycles, and RAM was expensive, so you couldn't double-buffer your sound RAM to get around it.

2
  • For graphics, considering the bandwidth needs, there was an even better option: dual-ported RAM. The CPU simply had its own address bus, so it didn't need to take turns. Of course, this wasn't viable for low-cost electronics like a C64.
    – MSalters
    Commented Jun 27, 2022 at 15:55
  • 1
    @MSalters: For graphics, the best approach is often a VRAM which augments a DRAM with a secondary sequential-access register that's a row long. While sometimes called a form of "dual-port" memory since the shift register can be read separately from the main memory array, a VRAM will require stealing a cycle from the main memory bus whenever it's necessary to fetch video data. What's special about a VRAM is that when data is being output sequentially, each fetch operation can grab many bytes of data into the buffer simultaneously.
    – supercat
    Commented Jun 27, 2022 at 19:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .