summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/hc55516.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/hc55516.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/hc55516.c')
-rw-r--r--src/emu/sound/hc55516.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c
index e6e6d24fc70..41d1d4abc1b 100644
--- a/src/emu/sound/hc55516.c
+++ b/src/emu/sound/hc55516.c
@@ -339,18 +339,18 @@ SND_GET_INFO( hc55516 )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
- case SNDINFO_INT_ALIAS: info->i = SOUND_HC55516; break;
+ case SNDINFO_INT_ALIAS: info->i = SOUND_HC55516; break;
/* --- the following bits of info are returned as pointers to data or functions --- */
- case SNDINFO_PTR_START: info->start = SND_START_NAME( hc55516 ); break;
- case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( hc55516 ); break;
+ case SNDINFO_PTR_START: info->start = SND_START_NAME( hc55516 ); break;
+ case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( hc55516 ); break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
- case SNDINFO_STR_NAME: info->s = "HC-55516"; break;
- case SNDINFO_STR_CORE_FAMILY: info->s = "CVSD"; break;
- case SNDINFO_STR_CORE_VERSION: info->s = "2.1"; 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, "HC-55516"); break;
+ case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "CVSD"); break;
+ case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "2.1"); 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;
}
}
@@ -359,10 +359,10 @@ SND_GET_INFO( mc3417 )
{
switch (state)
{
- case SNDINFO_PTR_START: info->start = SND_START_NAME( mc3417 ); break;
- case SNDINFO_PTR_RESET: /* chip has no reset pin */ break;
- case SNDINFO_STR_NAME: info->s = "MC3417"; break;
- default: SND_GET_INFO_CALL(hc55516); break;
+ case SNDINFO_PTR_START: info->start = SND_START_NAME( mc3417 ); break;
+ case SNDINFO_PTR_RESET: /* chip has no reset pin */ break;
+ case SNDINFO_STR_NAME: strcpy(info->s, "MC3417"); break;
+ default: SND_GET_INFO_CALL(hc55516); break;
}
}
@@ -371,9 +371,9 @@ SND_GET_INFO( mc3418 )
{
switch (state)
{
- case SNDINFO_PTR_START: info->start = SND_START_NAME( mc3418 ); break;
- case SNDINFO_PTR_RESET: /* chip has no reset pin */ break;
- case SNDINFO_STR_NAME: info->s = "MC3418"; break;
- default: SND_GET_INFO_CALL(hc55516); break;
+ case SNDINFO_PTR_START: info->start = SND_START_NAME( mc3418 ); break;
+ case SNDINFO_PTR_RESET: /* chip has no reset pin */ break;
+ case SNDINFO_STR_NAME: strcpy(info->s, "MC3418"); break;
+ default: SND_GET_INFO_CALL(hc55516); break;
}
}