What's exactly NVRAM?

General discussion on MAME, MARP, or whatever else that doesn't belong in any of the other forums

Moderators: mahlemiut, seymour, QRS

Post Reply
User avatar
Luja
MARP Serf
MARP Serf
Posts: 182
Joined: Sun Jan 26, 2003 5:42 pm
Location: Bilbao, Basque Country

What's exactly NVRAM?

Post by Luja »

What's exactly NVRAM? And how affects some games?

I see that many inp are desestimated by using of NVRAMs. But i don´t known exactly what are or what's their use...

Thx
User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

Post by Barthax »

NVRAM = Non-Volatile Random Access Memory.

Basically, it's battery-backed up RAM, so that settings can be stored in it.
LN2
MARPaholic
MARPaholic
Posts: 1669
Joined: Wed Jul 24, 2002 4:46 pm

Post by LN2 »

NVRAM is nonvolatile ram(other names are pram-parameter ram, firmware settings, etc.).

On your computer for example, think of the variables and BIOS data saved in ram by the little battery...That's nonvolatile ram(nvram) cuz it has power supplied to it by that battery so the data is saved. The only time that data is lost is if you zap your pram which depending on your hardware resets at least some of those variables stored in nvram, or you can hit a CUDA switch on the motherboard and hold for 15 seconds or so which when held down opens the circuit so the battery isn't supplying power to that nvram...so the values are all lost after 5-10+ seconds...or in some cases to really "zap" it you remove the battery and let the system sit for an hour or so. nvram has the firmware settings as well as some basic os settings like time and a lot more.

Some arcade games have that same kind of thing....for most it was for a hall-of-fame type of high score table you see in games like Robotron and Joust etc. Other games maintain playing statistics you can access in the service mode of the game. Some show the # credits inserted in each slot for the machine and average game play time, #extra men awarded etc. type of things.

In mame to emulate that mame saves that data from games in an .nv file that goes in the nvram folder.

Why does this screw up inp playback for some games? Well, high scores are only 1 of several things games might store in that nvram. Some store a pseudo-random seed number that is used so each time you play the game a different pseudo-random number is selected which will influence how enemies come out or other factors.

So, if you have a .nv file for a game when you make a recording and that .nv state is changed with that seed number as above, then you or anyone else will not be able to successfully play back that inp to show the exact game you had played when you recorded.

By removing the nvram folder from the mame folder, or locking the folder, that data can't be saved so each time you run the game in mame the game reinitializes to some default values for those variables each time which gives consistency of those values for inp playback to work.

I hope that explains it for you.

One of my wishlist things for mame would be when recording or playing back inps it ignores the .nv file if one exists as an option in the miscellaneous settings...with it being to ignore it on by default. For games where the nvram file doesn't affect inp playback, you can have it use that so your high scores for the game are all saved in that hall-of-fame scores area in that particular game...if it has one.
User avatar
mahlemiut
Editor
Posts: 4191
Joined: Mon Feb 04, 2002 10:05 pm
Location: New Zealand
Contact:

Post by mahlemiut »

NVRAM = Non Volatile RAM. It's basically a chip that stores data which survives the board being powered down. Most arcade games (that I've looked at at least) use an EEPROM (Electronically Erasable Programmable ROM, I think) for this. Most arcade games also only use it for storing settings. Some also store high scores too. Theoretically, though, anything at all could be stored.
- Barry Rodewald
MARP Assistant Web Maintainer
Image
Post Reply