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_device_base::legacy_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, device_get_config_func get_config) : device_t(mconfig, type, "Legacy Device", tag, owner, clock), m_get_config_func(get_config), m_inline_config(NULL), m_token(NULL) { // allocate a buffer for the inline configuration UINT32 configlen = (UINT32)get_legacy_int(DEVINFO_INT_INLINE_CONFIG_BYTES); if (configlen != 0) m_inline_config = global_alloc_array_clear(UINT8, configlen); // set the proper name m_name = get_legacy_string(DEVINFO_STR_NAME); m_shortname = get_legacy_string(DEVINFO_STR_SHORTNAME); m_searchpath = m_shortname; // create the token int tokenbytes = get_legacy_int(DEVINFO_INT_TOKEN_BYTES); if (tokenbytes != 0) m_token = global_alloc_array_clear(UINT8, tokenbytes); }