summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-03-06 07:30:55 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-03-06 07:30:55 +0000
commit686e8cea5217cbd0a37bff1edaf6f2ebe5d9b0f4 (patch)
treea342570a370776eda46cd146d5a136b06868ef61 /src
parent5f83fb7118405e96ad1597c6c40f53071e70e124 (diff)
Sync with MESS (no whatsnew)
Diffstat (limited to 'src')
-rw-r--r--src/emu/diimage.c14
-rw-r--r--src/emu/diimage.h2
-rw-r--r--src/emu/imagedev/flopdrv.c3
3 files changed, 9 insertions, 10 deletions
diff --git a/src/emu/diimage.c b/src/emu/diimage.c
index 6786a30f1a8..59a5469153f 100644
--- a/src/emu/diimage.c
+++ b/src/emu/diimage.c
@@ -1097,7 +1097,7 @@ void device_image_interface::unload()
update_names - update brief and instance names
-------------------------------------------------*/
-void device_image_interface::update_names()
+void device_image_interface::update_names(const device_type device_type, const char *inst, const char *brief)
{
image_interface_iterator iter(device().mconfig().root_device());
int count = 0;
@@ -1106,18 +1106,20 @@ void device_image_interface::update_names()
{
if (this == image)
index = count;
- if (image->image_type() == image_type())
+ if ((image->image_type() == image_type() && device_type==NULL) || (device_type==image->device().type()))
count++;
}
+ const char *inst_name = (device_type!=NULL) ? inst : device_typename(image_type());
+ const char *brief_name = (device_type!=NULL) ? brief : device_brieftypename(image_type());
if (count > 1)
{
- m_instance_name.printf("%s%d", device_typename(image_type()), index + 1);
- m_brief_instance_name.printf("%s%d", device_brieftypename(image_type()), index + 1);
+ m_instance_name.printf("%s%d", inst_name , index + 1);
+ m_brief_instance_name.printf("%s%d", brief_name, index + 1);
}
else
{
- m_instance_name = device_typename(image_type());
- m_brief_instance_name = device_brieftypename(image_type());
+ m_instance_name = inst_name;
+ m_brief_instance_name = brief_name;
}
}
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 7c85a7462a5..4310b40feca 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -272,7 +272,7 @@ protected:
int read_hash_config(const char *sysname);
void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types);
void image_checkhash();
- void update_names();
+ void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL);
// derived class overrides
// configuration
diff --git a/src/emu/imagedev/flopdrv.c b/src/emu/imagedev/flopdrv.c
index e46ed15345f..8ef5b40eb2b 100644
--- a/src/emu/imagedev/flopdrv.c
+++ b/src/emu/imagedev/flopdrv.c
@@ -117,13 +117,10 @@ static const floppy_error_map errmap[] =
/***************************************************************************
IMPLEMENTATION
***************************************************************************/
-//DECLARE_LEGACY_IMAGE_DEVICE(FLOPPY_APPLE, apple525);
-//DECLARE_LEGACY_IMAGE_DEVICE(FLOPPY_SONY, sonydriv);
INLINE floppy_drive *get_safe_token(device_t *device)
{
assert( device != NULL );
- //assert( device->type() == LEGACY_FLOPPY || device->type() == FLOPPY_APPLE || device->type() == FLOPPY_SONY);
return (floppy_drive *) downcast<legacy_floppy_image_device *>(device)->token();
}