summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/gaelco.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-19 06:46:17 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-19 06:46:17 +0000
commit42c9aeff3943f2e6779d3d125fc014cd96d16d71 (patch)
tree8d681b294d01bf526dd808ed95337cab1b98d101 /src/emu/sound/gaelco.c
parent3fdd1d460aa7b752956237d5e9c8a9ebecf409b9 (diff)
Cleaned up device and sound interfaces to match the CPU
interfaces when handling strings. Namely, the generic get_info functions allocate a temporary string and the device in question copies its string to the target, instead of assigning a const char *. Updated all device and sound cores to operate this way. Added the concept of a cpu_state_table, which is supplied by the CPU cores and which describes all the register state accessible to the debugger and other subsystems. The format of the table is such that most data can be simply fetched from memory without the further involvement of the CPU core, including the display of common formats. Extensibility points are available for custom display and for importing/exporting the data to intermediate variables for more complicated scenarios. Updated the ADSP21xx, TMS340x0, and i86 cores to use this. Removed the old debugger register list, which was never used. Replaced it with using ordering from the cpu_state_table. Renamed REG_PC -> REG_GENPC, REG_SP -> REG_GENSP, and REG_PREVIOUSPC -> REG_GENPCBASE. Updated a few spots that were using these directly. Moved these definitions into the end of the register area rather than leaving them outside which put them in a weird range.
Diffstat (limited to 'src/emu/sound/gaelco.c')
-rw-r--r--src/emu/sound/gaelco.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/emu/sound/gaelco.c b/src/emu/sound/gaelco.c
index e72357ded8a..41cf7f0d67e 100644
--- a/src/emu/sound/gaelco.c
+++ b/src/emu/sound/gaelco.c
@@ -319,14 +319,14 @@ SND_GET_INFO( gaelco_gae1 )
case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( gaelco_gae1 ); break;
case SNDINFO_PTR_START: info->start = SND_START_NAME( gaelco_gae1 ); break;
case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( gaelco ); break;
- case SNDINFO_PTR_RESET: /* nothing */ break;
+ case SNDINFO_PTR_RESET: /* nothing */ break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
- case SNDINFO_STR_NAME: info->s = "Gaelco GAE1"; break;
- case SNDINFO_STR_CORE_FAMILY: info->s = "Gaelco custom"; break;
- case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break;
- case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break;
- case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break;
+ case SNDINFO_STR_NAME: strcpy(info->s, "Gaelco GAE1"); break;
+ case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Gaelco custom"); break;
+ case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break;
+ case SNDINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break;
+ case SNDINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break;
}
}
@@ -355,14 +355,14 @@ SND_GET_INFO( gaelco_cg1v )
case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( gaelco_cg1v ); break;
case SNDINFO_PTR_START: info->start = SND_START_NAME( gaelco_cg1v ); break;
case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( gaelco ); break;
- case SNDINFO_PTR_RESET: /* nothing */ break;
+ case SNDINFO_PTR_RESET: /* nothing */ break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
- case SNDINFO_STR_NAME: info->s = "Gaelco CG1V"; break;
- case SNDINFO_STR_CORE_FAMILY: info->s = "Gaelco custom"; break;
- case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break;
- case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break;
- case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break;
+ case SNDINFO_STR_NAME: strcpy(info->s, "Gaelco CG1V"); break;
+ case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Gaelco custom"); break;
+ case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.0"); break;
+ case SNDINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break;
+ case SNDINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break;
}
}