mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
Removed LEGACY_MEMORY_DEVICE and LEGACY_NVRAM_DEVICE support in core, since nothing is using it anymore (no whatsnew)
This commit is contained in:
parent
eeda35d613
commit
61d6c04e85
@ -271,88 +271,3 @@ void legacy_sound_device_base::sound_stream_update(sound_stream &stream, stream_
|
||||
// should never get here
|
||||
fatalerror("legacy_sound_device_base::sound_stream_update called; not applicable to legacy sound devices\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LEGACY MEMORY DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// legacy_memory_device_base - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
legacy_memory_device_base::legacy_memory_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config)
|
||||
: legacy_device_base(mconfig, type, tag, owner, clock, get_config),
|
||||
device_memory_interface(mconfig, *this)
|
||||
{
|
||||
memset(&m_space_config, 0, sizeof(m_space_config));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - update configuration
|
||||
// based on completed device setup
|
||||
//-------------------------------------------------
|
||||
|
||||
void legacy_memory_device_base::device_config_complete()
|
||||
{
|
||||
m_space_config.m_name = "memory";
|
||||
m_space_config.m_endianness = static_cast<endianness_t>(get_legacy_int(DEVINFO_INT_ENDIANNESS));
|
||||
m_space_config.m_databus_width = get_legacy_int(DEVINFO_INT_DATABUS_WIDTH);
|
||||
m_space_config.m_addrbus_width = get_legacy_int(DEVINFO_INT_ADDRBUS_WIDTH);
|
||||
m_space_config.m_addrbus_shift = get_legacy_int(DEVINFO_INT_ADDRBUS_SHIFT);
|
||||
m_space_config.m_logaddr_width = m_space_config.m_addrbus_width;
|
||||
m_space_config.m_page_shift = 0;
|
||||
m_space_config.m_internal_map = reinterpret_cast<address_map_constructor>(get_legacy_fct(DEVINFO_PTR_INTERNAL_MEMORY_MAP));
|
||||
m_space_config.m_default_map = reinterpret_cast<address_map_constructor>(get_legacy_fct(DEVINFO_PTR_DEFAULT_MEMORY_MAP));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LEGACY NVRAM DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// legacy_nvram_device_base - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
legacy_nvram_device_base::legacy_nvram_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config)
|
||||
: legacy_device_base(mconfig, type, tag, owner, clock, get_config),
|
||||
device_nvram_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_default - generate the default NVRAM
|
||||
//-------------------------------------------------
|
||||
|
||||
void legacy_nvram_device_base::nvram_default()
|
||||
{
|
||||
device_nvram_func nvram_func = reinterpret_cast<device_nvram_func>(get_legacy_fct(DEVINFO_FCT_NVRAM));
|
||||
(*nvram_func)(this, NULL, FALSE);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_read - read NVRAM from the given file
|
||||
//-------------------------------------------------
|
||||
|
||||
void legacy_nvram_device_base::nvram_read(emu_file &file)
|
||||
{
|
||||
device_nvram_func nvram_func = reinterpret_cast<device_nvram_func>(get_legacy_fct(DEVINFO_FCT_NVRAM));
|
||||
(*nvram_func)(this, &file, FALSE);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_write - write NVRAM to the given file
|
||||
//-------------------------------------------------
|
||||
|
||||
void legacy_nvram_device_base::nvram_write(emu_file &file)
|
||||
{
|
||||
device_nvram_func nvram_func = reinterpret_cast<device_nvram_func>(get_legacy_fct(DEVINFO_FCT_NVRAM));
|
||||
(*nvram_func)(this, &file, TRUE);
|
||||
}
|
||||
|
@ -215,14 +215,10 @@ device_t *legacy_device_creator(const machine_config &mconfig, const char *tag,
|
||||
// reduced macros that are easier to use, and map to the above two macros
|
||||
#define DECLARE_LEGACY_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device, legacy_device_base)
|
||||
#define DECLARE_LEGACY_SOUND_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device, legacy_sound_device_base)
|
||||
#define DECLARE_LEGACY_MEMORY_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device, legacy_memory_device_base)
|
||||
#define DECLARE_LEGACY_NVRAM_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device, legacy_nvram_device_base)
|
||||
#define DECLARE_LEGACY_IMAGE_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device, legacy_image_device_base)
|
||||
|
||||
#define DEFINE_LEGACY_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device, legacy_device_base)
|
||||
#define DEFINE_LEGACY_SOUND_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device, legacy_sound_device_base)
|
||||
#define DEFINE_LEGACY_MEMORY_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device, legacy_memory_device_base)
|
||||
#define DEFINE_LEGACY_NVRAM_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device, legacy_nvram_device_base)
|
||||
#define DEFINE_LEGACY_IMAGE_DEVICE(name, basename) _DEFINE_LEGACY_DEVICE(name, basename, basename##_device, legacy_image_device_base)
|
||||
|
||||
|
||||
@ -251,11 +247,6 @@ device_t *legacy_device_creator(const machine_config &mconfig, const char *tag,
|
||||
#define DEVICE_EXECUTE(name) INT32 DEVICE_EXECUTE_NAME(name)(device_t *device, INT32 clocks)
|
||||
#define DEVICE_EXECUTE_CALL(name) DEVICE_EXECUTE_NAME(name)(device, clocks)
|
||||
|
||||
#define DEVICE_NVRAM_NAME(name) device_nvram_##name
|
||||
#define DEVICE_NVRAM(name) void DEVICE_NVRAM_NAME(name)(device_t *device, emu_file *file, int read_or_write)
|
||||
#define DEVICE_NVRAM_CALL(name) DEVICE_NVRAM_NAME(name)(device, file, read_or_write)
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE_CONFIGURATION_MACROS
|
||||
@ -466,46 +457,6 @@ protected:
|
||||
|
||||
|
||||
|
||||
// ======================> legacy_memory_device_base
|
||||
|
||||
// legacy_memory_device is a legacy_device_base with a memory interface
|
||||
class legacy_memory_device_base : public legacy_device_base,
|
||||
public device_memory_interface
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
legacy_memory_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config);
|
||||
|
||||
// device overrides
|
||||
virtual void device_config_complete();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == 0) ? &m_space_config : NULL; }
|
||||
|
||||
// internal state
|
||||
address_space_config m_space_config;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ======================> legacy_nvram_device
|
||||
|
||||
// legacy_nvram_device is a legacy_device_base with a nvram interface
|
||||
class legacy_nvram_device_base : public legacy_device_base,
|
||||
public device_nvram_interface
|
||||
{
|
||||
protected:
|
||||
// construction/destruction
|
||||
legacy_nvram_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config);
|
||||
|
||||
// device_nvram_interface overrides
|
||||
virtual void nvram_default();
|
||||
virtual void nvram_read(emu_file &file);
|
||||
virtual void nvram_write(emu_file &file);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// ======================> legacy_image_device
|
||||
|
||||
// legacy_image_device is a legacy_device_base with a image interface
|
||||
|
@ -54,7 +54,6 @@ static const char DEVTEMPLATE_SOURCE[] = __FILE__;
|
||||
#define DT_HAS_RESET 0x0002
|
||||
#define DT_HAS_STOP 0x0004
|
||||
#define DT_HAS_EXECUTE 0x0008
|
||||
#define DT_HAS_NVRAM 0x0010
|
||||
#define DT_HAS_CUSTOM_CONFIG 0x0040
|
||||
#define DT_HAS_ROM_REGION 0x0080
|
||||
#define DT_HAS_MACHINE_CONFIG 0x0100
|
||||
@ -123,9 +122,6 @@ static DEVICE_STOP( DEVTEMPLATE_ID(,) );
|
||||
#if ((DEVTEMPLATE_FEATURES) & DT_HAS_EXECUTE)
|
||||
static DEVICE_EXECUTE( DEVTEMPLATE_ID(,) );
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_FEATURES) & DT_HAS_NVRAM)
|
||||
static DEVICE_NVRAM( DEVTEMPLATE_ID(,) );
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_FEATURES) & DT_HAS_CUSTOM_CONFIG)
|
||||
static DEVICE_CUSTOM_CONFIG( DEVTEMPLATE_ID(,) );
|
||||
#endif
|
||||
@ -211,10 +207,6 @@ DEVICE_GET_INFO( DEVTEMPLATE_ID(,) )
|
||||
#if ((DEVTEMPLATE_FEATURES) & DT_HAS_EXECUTE)
|
||||
case DEVINFO_FCT_EXECUTE: info->execute = DEVTEMPLATE_ID1(DEVICE_EXECUTE_NAME()); break;
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_FEATURES) & DT_HAS_NVRAM)
|
||||
case DEVINFO_FCT_NVRAM: info->nvram = DEVTEMPLATE_ID1(DEVICE_NVRAM_NAME()); break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case DEVINFO_STR_NAME: strcpy(info->s, DEVTEMPLATE_NAME); break;
|
||||
#ifdef DEVTEMPLATE_SHORTNAME
|
||||
@ -240,9 +232,6 @@ static DEVICE_STOP( DEVTEMPLATE_DERIVED_ID(,) );
|
||||
#if ((DEVTEMPLATE_DERIVED_FEATURES) & DT_HAS_EXECUTE)
|
||||
static DEVICE_EXECUTE( DEVTEMPLATE_DERIVED_ID(,) );
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_DERIVED_FEATURES) & DT_HAS_NVRAM)
|
||||
static DEVICE_NVRAM( DEVTEMPLATE_DERIVED_ID(,) );
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_DERIVED_FEATURES) & DT_HAS_CUSTOM_CONFIG)
|
||||
static DEVICE_CUSTOM_CONFIG( DEVTEMPLATE_DERIVED_ID(,) );
|
||||
#endif
|
||||
@ -296,9 +285,6 @@ DEVICE_GET_INFO( DEVTEMPLATE_DERIVED_ID(,) )
|
||||
#if ((DEVTEMPLATE_DERIVED_FEATURES) & DT_HAS_EXECUTE)
|
||||
case DEVINFO_FCT_EXECUTE: info->execute = DEVTEMPLATE_DERIVED_ID1(DEVICE_EXECUTE_NAME()); break;
|
||||
#endif
|
||||
#if ((DEVTEMPLATE_DERIVED_FEATURES) & DT_HAS_NVRAM)
|
||||
case DEVINFO_FCT_NVRAM: info->nvram = DEVTEMPLATE_DERIVED_ID1(DEVICE_NVRAM_NAME()); break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case DEVINFO_STR_NAME: strcpy(info->s, DEVTEMPLATE_DERIVED_NAME); break;
|
||||
@ -313,7 +299,6 @@ DEVICE_GET_INFO( DEVTEMPLATE_DERIVED_ID(,) )
|
||||
#undef DT_HAS_RESET
|
||||
#undef DT_HAS_STOP
|
||||
#undef DT_HAS_EXECUTE
|
||||
#undef DT_HAS_NVRAM
|
||||
#undef DT_HAS_CUSTOM_CONFIG
|
||||
#undef DT_HAS_ROM_REGION
|
||||
#undef DT_HAS_MACHINE_CONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user