Is S-RAM the same as W-RAM?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Is S-RAM the same as W-RAM?
by on (#23686)
Is S-RAM the same as W-RAM?

Thank Ye!

by on (#23689)
Yes. SRAM = Static RAM, WRAM = Work RAM (which tends to be SRAM).

Also, iNES used to not have a way to specify a battery, so sometimes you might see SRAM w/o a battery referred to as WRAM.

by on (#23694)
So on the TNROM conversion, I could use the SRAM instead of WRAM to put into the CHR? Thanks!

by on (#23697)
SRAM, or static random access memory, is a volatile memory technology that uses a flip-flop (four to six transistors) for each bit. DRAM, or dynamic access memory, is a cheaper volatile memory technology . Most DRAM chips need a separate memory controller, but DRAM is also available packaged as PSRAM, or pseudo-static RAM, with a built-in controller that allows use in circuits that expect SRAM.

WRAM is work RAM. This is SRAM or PSRAM mapped into CPU space at $6000-$7FFF. Most boards with WRAM have 8 KiB of WRAM; larger sizes are less common, mostly in a few S*ROM and E*ROM boards.

CHR RAM is SRAM or PSRAM mapped into PPU space at $0000-$1FFF. Most boards with CHR RAM have 8 KiB of CHR RAM; larger sizes are far less common, only in CPROM boards.

No Nintendo board allows a single 8 KiB RAM chip to serve as WRAM and CHR RAM at the same time. But if you have two identical 8 KiB RAM chips, and the board has a pin for CHR /WE (write enable), you can do a bit of rewiring and replace the board's CHR ROM chip with a RAM chip.

by on (#23699)
SRAM rules !! DRAM shuuucks !!

[turning off supid mode]

WRAM is often referd by Nintendo themselves on their boards, while SRAM is mostly used by romhackers and homebrewers. SRAM may also refer more to the chip itself, while WRAM may refer to it's software counterpart (but no clear distinction is made here). (eg. SOROM has 16k of WRAM, with two 8kb SRAM chips).
tepples wrote:
No Nintendo board allows a single 8 KiB RAM chip to serve as WRAM and CHR RAM at the same time. But if you have two identical 8 KiB RAM chips, and the board has a pin for CHR /WE (write enable), you can do a bit of rewiring and replace the board's CHR ROM chip with a RAM chip.

That'd rock so much, but probably need a dual-port SRAM.
Quote:
(four to six transistors)

Hey, this just make me noting something. A 6264 SRAM chip as used in most NES carts have 64*1024*6 transistors, wich is 393 thousands of transistors. This is really impressive, especially considering there is probably almost as much for adress-row decoding. We're almost on the million of transistors in a single chip, so a 8kB SRAM probably have almost as much transistors as microcontrollers. (that's actually why DRAM has been invented, because other than the need of less transistors, it really have no other advantages).

by on (#23705)
Bregalad wrote:
tepples wrote:
No Nintendo board allows a single 8 KiB RAM chip to serve as WRAM and CHR RAM at the same time.

That'd rock so much, but probably need a dual-port SRAM.

That, or a dual-port mapper that wraps a single-port RAM by queueing writes and executing them when, say, the PPU is reading the nametable. We've discussed this before.

by on (#23706)
Tormenter wrote:
So on the TNROM conversion, I could use the SRAM instead of WRAM to put into the CHR? Thanks!


No idea what you are talking about =) But will this quoted statment work? Thank Ya!

by on (#23707)
WRAM is also used to denote internal work RAM (even officially by Nintendo) which in the SNES' case is DRAM.

by on (#23708)
The TNROM board, as I understand it, has two 8KB SRAM chips. One SRAM chip is on the PRG bus and serves as general-purpose RAM (or Work RAM, to use Nintendo's lingo). The other SRAM chip is on the CHR bus and serves as character RAM (CHR-RAM, which holds the graphics for the game). The first SRAM chip (the one on the PRG bus) can have battery backup, while the second chip does not have support for a battery.

In short, yes, you will use an SRAM chip to replace the CHR memory in a TNROM mod.

by on (#23714)
kyuusaku wrote:
WRAM is also used to denote internal work RAM (even officially by Nintendo) which in the SNES' case is DRAM.

WHAT ? This is horrible ! My beloved SNES has a horrible DRAM chip inside it ? This just isn't possible !

As for the TNROM board : http://www.54.org/sage/condev/Famicom_Carts/PB200030.JPG (pic is not mine)

by on (#23719)
Bregalad wrote:
WHAT ? This is horrible ! My beloved SNES has a horrible DRAM chip inside it ? This just isn't possible !

Worse, OAM and palette RAM inside the NES PPU are believed to be embedded DRAM.

by on (#23720)
Yeah, but any decent NES software will keep them in safe 2k WRAM, and copy them to the PPU for DMA (sprites) or manually (palette) regulary.

However, if the whole system RAM on the SNES is DRAM, that means the only "safe" RAM is the one in the cartridge. That'd be horrible. Any SNES game actually have 0.001% to randomly crash when running.

by on (#23723)
Bregalad wrote:
However, if the whole system RAM on the SNES is DRAM, that means the only "safe" RAM is the one in the cartridge. That'd be horrible. Any SNES game actually have 0.001% to randomly crash when running.

You typed your comment into what I'm 99 percent sure is a PC with DRAM. Like the PC, the Super NES is stable because it takes some time out of each scanline to refresh DRAM.

by on (#23724)
Yeah, I know. PCs are a particular case, because having 512MB of SRAM would take an entiere room to store the chip and the adress decoders, and then the access would be too slow for a PC to make. (however, most PCs have still a Bios "CMOS RAM", wich is often a SRAM).
Hower, instead of wasting time and current to "refresh" DRAM, we could wase some transistors to have proper SRAM implemeted. Especially for the SNES, because it has 128k of system RAM and 128k SRAM chips are pretty common (at least today). Even if they were expensive when the SNES was released, the console sold so well in so great quantities that it wouldn't be any great deal for Nintendo to have SRAM in it.

EDIT : Thanks god, I found on the net that the SPC700 has his own 2 chips of external 32k SRAM, making 64k SRAM overall. At least this one is stable.

by on (#23728)
Can I use a SRAM chip for the TNROM conversion instead of using a WRAM chip? Will this work the same???

by on (#23729)
Tormenter wrote:
Can I use a SRAM chip for the TNROM conversion instead of using a WRAM chip? Will this work the same???

Absolutely. For all practical purposes, they're the same thing.

by on (#23731)
dvdmth wrote:
Tormenter wrote:
Can I use a SRAM chip for the TNROM conversion instead of using a WRAM chip? Will this work the same???

Absolutely. For all practical purposes, they're the same thing.

The only difference between SRAM used as WRAM and SRAM used as CHR RAM is that while WRAM always uses a RAM pinout, different CHR forms may have different pinouts. So if you are replacing CHR ROM with CHR RAM, you'll need to do a bit of rewiring (e.g. lift this pin and solder it to that hole) if the pinouts differ.

by on (#25956)
Bregalad wrote:
However, if the whole system RAM on the SNES is DRAM, that means the only "safe" RAM is the one in the cartridge. That'd be horrible. Any SNES game actually have 0.001% to randomly crash when running.

:lol: I just found out NMOS 6502s (probably even the clone in the NES) use DRAM for it's registers! That must be why it won't operate at <1MHz.