2

According to https://snescentral.com/article.php?id=0088 the SNES has the following memory banks:

  • Work RAM for CPU - 128 Kilobytes (CPU temp. storage)
  • Video RAM for PPU - 64 Kilobytes (temp. storage for the PPU)
  • Sound Memory: 64 Kb

Why a bank of RAM for sound? I would've expected that if the sound chip is playing samples, it would fetch them directly from ROM where they are stored. Was it customary to first copy them into the sound RAM? If so, why?

1 Answer 1

4

Why a bank of RAM for sound?

Because the SPC-700 is not just some DMA driven DAC unit, but a separate CPU working on its own 64 KiB address space. It's a greatly enhanced 6502 executing a program loaded from the main CPU to produce sound. In the most simple way this can be just a sample, but already here it can start/stop/chain and modify it according to messages send over by the main CPU. Or, on the other end of capabilities synthesize sound complete on its own.

I would've expected that if the sound chip is playing samples, it would fetch them directly from ROM where they are stored.

It's the same basic reason, why the Video system also has its own 64 KiB RAM. Performance.

Sure, copying each sound whenever played (and played and played) from ROM would work if it was only a simple DAC based system. But even then, fetching will collide with program (and data) fetches of the main CPU, thus dragging down system performance. Keep in mind, the SNES is still a classic 8 bit system with a rather meagre memory performance (1.8..3.5 MiB/s maximum bandwidth) (*1). Using a separate sound RAM is much like the use of sprites for such systems: saving on bandwidth of the main system. Only in this case we have a rather late design with comparable huge resources assigned to the task.

Was it customary to first copy them into the sound RAM? If so, why?

As said, it relieves the main CPU bus from data/program fetches of the sound CPU. Only one access during setup, and zero load thereafter. It can't get better, can it?

In fact, some games even double buffer the transfer by bringing sound data first into main RAM (as ROM may be slow) and then transfer it at high speed into sound RAM.


*1 - Nonetheless, with its PPUs it can be seen as a quite advanced one.

6
  • The SNES is a 16 bit system based on a variation of the 65C816. Just because it has an 8 bit databus does not mean it's only an 8 bit CPU.
    – cbmeeks
    Jan 2, 2019 at 20:10
  • 1
    @cbmeeks THis calls for the age old question: Does that mean a 6800/8080/Z80/6809/etc. is a 16 bit system? After all, they got a swell 16 bit operations, despite having an 8 bit bus. come on It's an age old marketing game played here. Take it as you want, in my book the 65816 is an 8 bit CPU with some 16 bit abilities. But hey, whatever rings your bell :))
    – Raffzahn
    Jan 2, 2019 at 20:15
  • I'm only the messenger. Go over to the 6502.org forums and tell those guys that the '816 is just an 8 bit CPU. Those guys are true experts on those chips. I think you might be surprised at what they say.
    – cbmeeks
    Jan 2, 2019 at 20:17
  • 1
    Serious,they forced you to do go here and spread the word? :)) SCNR, but serious, I do belive I acquired a tiny bit expertise on the 6500 series as well. 40 years of active development do leave a trace :)) And in all of this the 65816 is a rather clumsy 16 bit rucksack dragged along by a 8 bit CPU. - And always good for an argument about :))
    – Raffzahn
    Jan 2, 2019 at 20:23
  • Not hardly. Would take a lot more than some forum members to force me to do anything. I only mention it because those guys also have decades of experience (many of them still use those CPU's in modern designs for a living). I'm not going to argue either way.
    – cbmeeks
    Jan 2, 2019 at 20:36

You must log in to answer this question.

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