diff options
author | 2011-01-05 12:51:11 +0000 | |
---|---|---|
committer | 2011-01-05 12:51:11 +0000 | |
commit | 249def5363954adeb2b10c280d2cae50bc217995 (patch) | |
tree | e8e5d1cc13527691c69e72beabafdc3dc76294e7 /src/emu/machine/ram.h | |
parent | f8b8f4f26bcff748c77d0eb8b03af9f1edca08ac (diff) |
- Moved RAM device into emu core [Miodrag Milanovic]
- Moved COMP and CONS macros in driver.h
Diffstat (limited to 'src/emu/machine/ram.h')
-rw-r--r-- | src/emu/machine/ram.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/emu/machine/ram.h b/src/emu/machine/ram.h new file mode 100644 index 00000000000..ea7bc50a5b0 --- /dev/null +++ b/src/emu/machine/ram.h @@ -0,0 +1,68 @@ +/************************************************************************* + + RAM device + + Provides a configurable amount of RAM to drivers + +**************************************************************************/ + +#ifndef __RAM_H__ +#define __RAM_H__ + + +/*************************************************************************** + CONSTANTS +***************************************************************************/ + +#define RAM_DEFAULT_VALUE 0xcd +#define RAM_TAG "ram" + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +typedef struct _ram_config ram_config; +struct _ram_config +{ + const char *default_size; + const char *extra_options; + UINT8 default_value; +}; + + +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + +DECLARE_LEGACY_DEVICE(RAM, ram); + +#define MCFG_RAM_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, RAM, 0) \ + MCFG_DEVICE_CONFIG_DATA32(ram_config, default_value, RAM_DEFAULT_VALUE) + +#define MCFG_RAM_REMOVE(_tag) \ + MCFG_DEVICE_REMOVE(_tag) + +#define MCFG_RAM_MODIFY(_tag) \ + MCFG_DEVICE_MODIFY(_tag) \ + MCFG_DEVICE_CONFIG_DATAPTR(ram_config, extra_options, NULL) + +#define MCFG_RAM_DEFAULT_SIZE(_default_size) \ + MCFG_DEVICE_CONFIG_DATAPTR(ram_config, default_size, _default_size) + +#define MCFG_RAM_EXTRA_OPTIONS(_extra_options) \ + MCFG_DEVICE_CONFIG_DATAPTR(ram_config, extra_options, _extra_options) + +#define MCFG_RAM_DEFAULT_VALUE(_default_value) \ + MCFG_DEVICE_CONFIG_DATA32(ram_config, default_value, _default_value) + + +/*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ + +UINT32 ram_get_size(device_t *device); +UINT8 *ram_get_ptr(device_t *device); +UINT32 ram_parse_string(const char *s); + +#endif /* __RAM_H__ */ |