mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
Added a MDRV_EEPROM_NODEFAULT_ADD macro for drivers which do not need default data size / data
I don't like too much this solution, but now the code is self contained: hence, better fixes (e.g. no MDRV_DEVICE_CONFIG_DATAPTR(eeprom_config, default_data, &_data) at all for the NODEFAULT eeprom?) could be added without further modifying the behavior across the drivers.
This commit is contained in:
parent
1a9e28c419
commit
514c637bbe
@ -12,6 +12,9 @@
|
||||
#define SERIAL_BUFFER_LENGTH 40
|
||||
#define MEMORY_SIZE 1024
|
||||
|
||||
/* FIXME: many drivers do not need default_data / default_data_size and put them to 0 in the drivers seems a waste of code */
|
||||
UINT8 *eeprom_empty_default_data = NULL;
|
||||
|
||||
typedef struct _eeprom_state eeprom_state;
|
||||
struct _eeprom_state
|
||||
{
|
||||
|
@ -53,6 +53,11 @@ DEVICE_GET_INFO(eeprom);
|
||||
MDRV_DEVICE_CONFIG_DATAPTR(eeprom_config, default_data, &_data) \
|
||||
MDRV_DEVICE_CONFIG_DATA32(eeprom_config, default_data_size, _size)
|
||||
|
||||
/* FIXME: many drivers do not need default_data / default_data_size and put them to 0 in the drivers seems a waste of code */
|
||||
extern UINT8 *eeprom_empty_default_data;
|
||||
|
||||
#define MDRV_EEPROM_NODEFAULT_ADD(_tag, _interface) \
|
||||
MDRV_EEPROM_ADD(_tag, _interface, 0, eeprom_empty_default_data)
|
||||
|
||||
void eepromdev_write_bit( const device_config *device, int bit );
|
||||
int eepromdev_read_bit( const device_config *device );
|
||||
|
Loading…
Reference in New Issue
Block a user