src/mess/devices/messram.c
| r6023 | r6024 | |
| 97 | 97 | { |
| 98 | 98 | messram_state *messram = get_safe_token(device); |
| 99 | 99 | ram_config *config = device->inline_config; |
| 100 | | const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE); |
| 101 | 100 | |
| 102 | | /* if we have a command line option, use it */ |
| 103 | | if ((ramsize_string != NULL) && (ramsize_string[0] != '\0')) |
| 104 | | messram->size = parse_string(ramsize_string); |
| 105 | | else |
| 101 | /* the device named 'messram' can get ram options from command line */ |
| 102 | if (strcmp(device->tag, "messram") == 0) |
| 103 | { |
| 104 | const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE); |
| 105 | |
| 106 | if ((ramsize_string != NULL) && (ramsize_string[0] != '\0')) |
| 107 | messram->size = parse_string(ramsize_string); |
| 108 | } |
| 109 | |
| 110 | /* if we didn't get a size yet, use the default */ |
| 111 | if (messram->size == 0) |
| 106 | 112 | messram->size = parse_string(config->default_size); |
| 107 | 113 | |
| 108 | 114 | /* allocate space for the ram */ |