summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/ram.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-02-12 03:47:37 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-02-12 03:47:37 +0000
commit1b54456be5fd090b039b3e9f691ac0464ffdff12 (patch)
tree3839c21fada7804940b1c828dcceb6a57ff9c74f /src/emu/machine/ram.c
parent061548d2bec629c46712844ffe459292f3c745f4 (diff)
mame_file is now emu_file and is a class. It is required
to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things.
Diffstat (limited to 'src/emu/machine/ram.c')
-rw-r--r--src/emu/machine/ram.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/emu/machine/ram.c b/src/emu/machine/ram.c
index c659e6e9b4a..397b04e6e3c 100644
--- a/src/emu/machine/ram.c
+++ b/src/emu/machine/ram.c
@@ -100,7 +100,7 @@ static DEVICE_START( ram )
/* the device named 'ram' can get ram options from command line */
if (strcmp(device->tag(), RAM_TAG) == 0)
{
- const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE);
+ const char *ramsize_string = options_get_string(&device->machine->options(), OPTION_RAMSIZE);
if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
ram->size = ram_parse_string(ramsize_string);
@@ -140,10 +140,9 @@ static DEVICE_VALIDITY_CHECK( ram )
/* command line options are only parsed for the device named RAM_TAG */
if (device->tag()!=NULL && strcmp(device->tag(), RAM_TAG) == 0)
{
- if (mame_options()==NULL) return FALSE;
/* verify command line ram option */
- ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE);
- gamename_option = options_get_string(mame_options(), OPTION_GAMENAME);
+ ramsize_string = options_get_string(&options, OPTION_RAMSIZE);
+ gamename_option = options_get_string(&options, OPTION_GAMENAME);
if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
{