mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
Added tentative PORT_CUSTOM(eepromdev_bit_r) for EEPROM devices.
Not 100% sure this is the better way to implement this (we pass the eeprom tag as parameter of the PORT_CUSTOM), but I haven't been able to find a better solution. No driver uses this yet, so I'm open to any suggestion before to use it extensively ;)
This commit is contained in:
parent
778aebca90
commit
ea72b5770d
@ -279,10 +279,14 @@ int eepromdev_read_bit(const device_config *device)
|
||||
return res;
|
||||
}
|
||||
|
||||
/*CUSTOM_INPUT( eeprom_bit_r )
|
||||
CUSTOM_INPUT( eepromdev_bit_r )
|
||||
{
|
||||
return eeprom_read_bit();
|
||||
}*/
|
||||
const char *devtag = (const char *)param;
|
||||
const device_config *eeprom = devtag_get_device(field->port->machine, devtag);
|
||||
|
||||
/* we test if the device is indeed an eeprom when calling this device handler */
|
||||
return eepromdev_read_bit(eeprom);
|
||||
}
|
||||
|
||||
void eepromdev_set_cs_line(const device_config *device, int state)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ extern UINT8 *eeprom_empty_default_data;
|
||||
|
||||
void eepromdev_write_bit( const device_config *device, int bit );
|
||||
int eepromdev_read_bit( const device_config *device );
|
||||
//CUSTOM_INPUT( eeprom_bit_r );
|
||||
CUSTOM_INPUT( eepromdev_bit_r );
|
||||
void eepromdev_set_cs_line( const device_config *device, int state );
|
||||
void eepromdev_set_clock_line( const device_config *device, int state );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user