From 42c9aeff3943f2e6779d3d125fc014cd96d16d71 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Fri, 19 Dec 2008 06:46:17 +0000 Subject: [PATCH] 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. --- .gitattributes | 2 +- src/emu/cpu/adsp2100/2100ops.c | 61 ++-- src/emu/cpu/adsp2100/adsp2100.c | 532 +++++++++++++------------------- src/emu/cpu/adsp2100/adsp2100.h | 8 +- src/emu/cpu/drcbex64.c | 1 - src/emu/cpu/drcbex86.c | 1 - src/emu/cpu/g65816/g65816op.h | 12 +- src/emu/cpu/i86/i86.c | 262 ++++++++++------ src/emu/cpu/i86/i86.h | 99 +++--- src/emu/cpu/m37710/m37710op.h | 2 +- src/emu/cpu/minx/minx.c | 12 +- src/emu/cpu/sm8500/sm8500.c | 12 +- src/emu/cpu/tms34010/34010ops.c | 8 +- src/emu/cpu/tms34010/tms34010.c | 211 +++++-------- src/emu/cpu/tms34010/tms34010.h | 8 +- src/emu/cpuexec.c | 395 +++++++++++++++++++++++- src/emu/cpuintrf.h | 189 +++++++----- src/emu/debug/debugcpu.c | 13 +- src/emu/debug/debugvw.c | 17 +- src/emu/debug/express.c | 5 + src/emu/devintrf.c | 2 +- src/emu/devintrf.h | 2 +- src/emu/machine/6522via.c | 8 +- src/emu/machine/6526cia.c | 12 +- src/emu/machine/6532riot.c | 10 +- src/emu/machine/6850acia.c | 8 +- src/emu/machine/68681.c | 10 +- src/emu/machine/74123.c | 10 +- src/emu/machine/8237dma.c | 10 +- src/emu/machine/8255ppi.c | 10 +- src/emu/machine/8257dma.c | 12 +- src/emu/machine/at28c16.c | 10 +- src/emu/machine/cdp1852.c | 10 +- src/emu/machine/idectrl.c | 10 +- src/emu/machine/latch8.c | 10 +- src/emu/machine/ldcore.c | 10 +- src/emu/machine/msm6242.c | 10 +- src/emu/machine/pci.c | 10 +- src/emu/machine/pic8259.c | 10 +- src/emu/machine/pit8253.c | 12 +- src/emu/machine/smc91c9x.c | 12 +- src/emu/machine/timekpr.c | 26 +- src/emu/machine/x2212.c | 10 +- src/emu/machine/z80ctc.c | 10 +- src/emu/machine/z80dma.c | 10 +- src/emu/machine/z80pio.c | 10 +- src/emu/machine/z80sio.c | 10 +- src/emu/sndintrf.c | 19 +- src/emu/sndintrf.h | 2 +- src/emu/sound.c | 10 +- src/emu/sound/2151intf.c | 10 +- src/emu/sound/2203intf.c | 10 +- src/emu/sound/2413intf.c | 10 +- src/emu/sound/2608intf.c | 10 +- src/emu/sound/2610intf.c | 20 +- src/emu/sound/2612intf.c | 20 +- src/emu/sound/262intf.c | 10 +- src/emu/sound/3812intf.c | 30 +- src/emu/sound/5110intf.c | 56 ++-- src/emu/sound/5220intf.c | 32 +- src/emu/sound/aica.c | 18 +- src/emu/sound/astrocde.c | 12 +- src/emu/sound/ay8910.c | 60 ++-- src/emu/sound/beep.c | 18 +- src/emu/sound/bsmt2000.c | 12 +- src/emu/sound/c140.c | 18 +- src/emu/sound/c352.c | 18 +- src/emu/sound/c6280.c | 18 +- src/emu/sound/cdda.c | 18 +- src/emu/sound/cdp1869.c | 18 +- src/emu/sound/cem3394.c | 18 +- src/emu/sound/custom.c | 18 +- src/emu/sound/dac.c | 18 +- src/emu/sound/discrete.c | 10 +- src/emu/sound/dmadac.c | 18 +- src/emu/sound/es5503.c | 18 +- src/emu/sound/es5506.c | 20 +- src/emu/sound/es8712.c | 18 +- src/emu/sound/flt_rc.c | 14 +- src/emu/sound/flt_vol.c | 16 +- src/emu/sound/gaelco.c | 24 +- src/emu/sound/hc55516.c | 32 +- src/emu/sound/ics2115.c | 18 +- src/emu/sound/iremga20.c | 18 +- src/emu/sound/k005289.c | 18 +- src/emu/sound/k007232.c | 18 +- src/emu/sound/k051649.c | 18 +- src/emu/sound/k053260.c | 18 +- src/emu/sound/k054539.c | 18 +- src/emu/sound/msm5205.c | 18 +- src/emu/sound/msm5232.c | 16 +- src/emu/sound/multipcm.c | 18 +- src/emu/sound/n63701x.c | 14 +- src/emu/sound/namco.c | 46 +-- src/emu/sound/namco52.c | 12 +- src/emu/sound/nes_apu.c | 18 +- src/emu/sound/nile.c | 18 +- src/emu/sound/okim6258.c | 16 +- src/emu/sound/okim6295.c | 12 +- src/emu/sound/pokey.c | 18 +- src/emu/sound/psx.c | 18 +- src/emu/sound/qsound.c | 18 +- src/emu/sound/rf5c400.c | 18 +- src/emu/sound/rf5c68.c | 18 +- src/emu/sound/s14001a.c | 10 +- src/emu/sound/saa1099.c | 18 +- src/emu/sound/samples.c | 18 +- src/emu/sound/scsp.c | 18 +- src/emu/sound/segapcm.c | 18 +- src/emu/sound/sid6581.c | 24 +- src/emu/sound/sn76477.c | 10 +- src/emu/sound/sn76496.c | 50 +-- src/emu/sound/snkwave.c | 18 +- src/emu/sound/sp0250.c | 18 +- src/emu/sound/sp0256.c | 18 +- src/emu/sound/speaker.c | 18 +- src/emu/sound/st0016.c | 18 +- src/emu/sound/tiaintf.c | 18 +- src/emu/sound/tms3615.c | 18 +- src/emu/sound/tms36xx.c | 18 +- src/emu/sound/upd7759.c | 18 +- src/emu/sound/vlm5030.c | 18 +- src/emu/sound/votrax.c | 18 +- src/emu/sound/vrender0.c | 18 +- src/emu/sound/wave.c | 18 +- src/emu/sound/x1_010.c | 18 +- src/emu/sound/ymf271.c | 18 +- src/emu/sound/ymf278b.c | 18 +- src/emu/sound/ymz280b.c | 18 +- src/emu/timer.c | 10 +- src/emu/video.c | 10 +- src/emu/video/cdp1869.c | 10 +- src/emu/video/mc6845.c | 22 +- src/emu/video/voodoo.c | 16 +- src/mame/machine/fddebug.c | 5 +- src/mame/machine/naomibd.c | 12 +- 136 files changed, 2085 insertions(+), 1673 deletions(-) diff --git a/.gitattributes b/.gitattributes index e3e6fda992e..64467e83aa8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -147,7 +147,7 @@ src/emu/cpu/i86/host.h svneol=native#text/plain src/emu/cpu/i86/i286.c svneol=native#text/plain src/emu/cpu/i86/i286.h svneol=native#text/plain src/emu/cpu/i86/i86.c svneol=native#text/plain -src/emu/cpu/i86/i86.h svneol=native#text/plain +src/emu/cpu/i86/i86.h -text svneol=native#text/plain src/emu/cpu/i86/i86.txt svneol=native#text/plain src/emu/cpu/i86/i86mem.c svneol=native#text/plain src/emu/cpu/i86/i86mem.h svneol=native#text/plain diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c index dd7e3bee09d..6dc62fe43c3 100644 --- a/src/emu/cpu/adsp2100/2100ops.c +++ b/src/emu/cpu/adsp2100/2100ops.c @@ -81,22 +81,22 @@ static const INT32 constants[] = #define MSTAT_GOMODE 0x40 /* go mode enable */ /* you must call this in order to change MSTAT */ -INLINE void set_mstat(adsp2100_state *adsp, int new_value) +INLINE void update_mstat(adsp2100_state *adsp) { - if ((new_value ^ adsp->mstat) & MSTAT_BANK) + if ((adsp->mstat ^ adsp->mstat_prev) & MSTAT_BANK) { ADSPCORE temp = adsp->core; adsp->core = adsp->alt; adsp->alt = temp; } - if ((new_value ^ adsp->mstat) & MSTAT_TIMER) + if ((adsp->mstat ^ adsp->mstat_prev) & MSTAT_TIMER) if (adsp->timer_fired != NULL) - (*adsp->timer_fired)(adsp->device, (new_value & MSTAT_TIMER) != 0); - if (new_value & MSTAT_STICKYV) + (*adsp->timer_fired)(adsp->device, (adsp->mstat & MSTAT_TIMER) != 0); + if (adsp->mstat & MSTAT_STICKYV) adsp->astat_clear = ~(CFLAG | NFLAG | ZFLAG); else adsp->astat_clear = ~(CFLAG | VFLAG | NFLAG | ZFLAG); - adsp->mstat = new_value; + adsp->mstat_prev = adsp->mstat; } @@ -291,7 +291,8 @@ INLINE void stat_stack_pop(adsp2100_state *adsp) if (adsp->stat_sp == 0) adsp->sstat |= STATUS_EMPTY; } - set_mstat(adsp, adsp->stat_stack[adsp->stat_sp][0]); + adsp->mstat = adsp->stat_stack[adsp->stat_sp][0]; + update_mstat(adsp); adsp->imask = adsp->stat_stack[adsp->stat_sp][1]; adsp->astat = adsp->stat_stack[adsp->stat_sp][2]; check_irqs(adsp); @@ -322,6 +323,17 @@ INLINE int CONDITION(adsp2100_state *adsp, int c) register writing ===========================================================================*/ +INLINE void update_i(adsp2100_state *adsp, int which) +{ + adsp->base[which] = adsp->i[which] & adsp->lmask[which]; +} + +INLINE void update_l(adsp2100_state *adsp, int which) +{ + adsp->lmask[which] = mask_table[adsp->l[which] & 0x3fff]; + adsp->base[which] = adsp->i[which] & adsp->lmask[which]; +} + static void wr_inval(adsp2100_state *adsp, INT32 val) { logerror( "ADSP %04x: Writing to an invalid register!\n", adsp->ppc ); } static void wr_ax0(adsp2100_state *adsp, INT32 val) { adsp->core.ax0.s = val; } static void wr_ax1(adsp2100_state *adsp, INT32 val) { adsp->core.ax1.s = val; } @@ -339,14 +351,14 @@ static void wr_mr1(adsp2100_state *adsp, INT32 val) { adsp->core.mr.mrx.mr1.s static void wr_mr2(adsp2100_state *adsp, INT32 val) { adsp->core.mr.mrx.mr2.s = (INT8)val; } static void wr_sr0(adsp2100_state *adsp, INT32 val) { adsp->core.sr.srx.sr0.s = val; } static void wr_sr1(adsp2100_state *adsp, INT32 val) { adsp->core.sr.srx.sr1.s = val; } -static void wr_i0(adsp2100_state *adsp, INT32 val) { adsp->i[0] = val & 0x3fff; adsp->base[0] = val & adsp->lmask[0]; } -static void wr_i1(adsp2100_state *adsp, INT32 val) { adsp->i[1] = val & 0x3fff; adsp->base[1] = val & adsp->lmask[1]; } -static void wr_i2(adsp2100_state *adsp, INT32 val) { adsp->i[2] = val & 0x3fff; adsp->base[2] = val & adsp->lmask[2]; } -static void wr_i3(adsp2100_state *adsp, INT32 val) { adsp->i[3] = val & 0x3fff; adsp->base[3] = val & adsp->lmask[3]; } -static void wr_i4(adsp2100_state *adsp, INT32 val) { adsp->i[4] = val & 0x3fff; adsp->base[4] = val & adsp->lmask[4]; } -static void wr_i5(adsp2100_state *adsp, INT32 val) { adsp->i[5] = val & 0x3fff; adsp->base[5] = val & adsp->lmask[5]; } -static void wr_i6(adsp2100_state *adsp, INT32 val) { adsp->i[6] = val & 0x3fff; adsp->base[6] = val & adsp->lmask[6]; } -static void wr_i7(adsp2100_state *adsp, INT32 val) { adsp->i[7] = val & 0x3fff; adsp->base[7] = val & adsp->lmask[7]; } +static void wr_i0(adsp2100_state *adsp, INT32 val) { adsp->i[0] = val & 0x3fff; update_i(adsp, 0); } +static void wr_i1(adsp2100_state *adsp, INT32 val) { adsp->i[1] = val & 0x3fff; update_i(adsp, 1); } +static void wr_i2(adsp2100_state *adsp, INT32 val) { adsp->i[2] = val & 0x3fff; update_i(adsp, 2); } +static void wr_i3(adsp2100_state *adsp, INT32 val) { adsp->i[3] = val & 0x3fff; update_i(adsp, 3); } +static void wr_i4(adsp2100_state *adsp, INT32 val) { adsp->i[4] = val & 0x3fff; update_i(adsp, 4); } +static void wr_i5(adsp2100_state *adsp, INT32 val) { adsp->i[5] = val & 0x3fff; update_i(adsp, 5); } +static void wr_i6(adsp2100_state *adsp, INT32 val) { adsp->i[6] = val & 0x3fff; update_i(adsp, 6); } +static void wr_i7(adsp2100_state *adsp, INT32 val) { adsp->i[7] = val & 0x3fff; update_i(adsp, 7); } static void wr_m0(adsp2100_state *adsp, INT32 val) { adsp->m[0] = (INT32)(val << 18) >> 18; } static void wr_m1(adsp2100_state *adsp, INT32 val) { adsp->m[1] = (INT32)(val << 18) >> 18; } static void wr_m2(adsp2100_state *adsp, INT32 val) { adsp->m[2] = (INT32)(val << 18) >> 18; } @@ -355,17 +367,16 @@ static void wr_m4(adsp2100_state *adsp, INT32 val) { adsp->m[4] = (INT32)(val static void wr_m5(adsp2100_state *adsp, INT32 val) { adsp->m[5] = (INT32)(val << 18) >> 18; } static void wr_m6(adsp2100_state *adsp, INT32 val) { adsp->m[6] = (INT32)(val << 18) >> 18; } static void wr_m7(adsp2100_state *adsp, INT32 val) { adsp->m[7] = (INT32)(val << 18) >> 18; } -static void wr_l0(adsp2100_state *adsp, INT32 val) { adsp->l[0] = val & 0x3fff; adsp->lmask[0] = mask_table[val & 0x3fff]; adsp->base[0] = adsp->i[0] & adsp->lmask[0]; } -static void wr_l1(adsp2100_state *adsp, INT32 val) { adsp->l[1] = val & 0x3fff; adsp->lmask[1] = mask_table[val & 0x3fff]; adsp->base[1] = adsp->i[1] & adsp->lmask[1]; } -static void wr_l2(adsp2100_state *adsp, INT32 val) { adsp->l[2] = val & 0x3fff; adsp->lmask[2] = mask_table[val & 0x3fff]; adsp->base[2] = adsp->i[2] & adsp->lmask[2]; } -static void wr_l3(adsp2100_state *adsp, INT32 val) { adsp->l[3] = val & 0x3fff; adsp->lmask[3] = mask_table[val & 0x3fff]; adsp->base[3] = adsp->i[3] & adsp->lmask[3]; } -static void wr_l4(adsp2100_state *adsp, INT32 val) { adsp->l[4] = val & 0x3fff; adsp->lmask[4] = mask_table[val & 0x3fff]; adsp->base[4] = adsp->i[4] & adsp->lmask[4]; } -static void wr_l5(adsp2100_state *adsp, INT32 val) { adsp->l[5] = val & 0x3fff; adsp->lmask[5] = mask_table[val & 0x3fff]; adsp->base[5] = adsp->i[5] & adsp->lmask[5]; } -static void wr_l6(adsp2100_state *adsp, INT32 val) { adsp->l[6] = val & 0x3fff; adsp->lmask[6] = mask_table[val & 0x3fff]; adsp->base[6] = adsp->i[6] & adsp->lmask[6]; } -static void wr_l7(adsp2100_state *adsp, INT32 val) { adsp->l[7] = val & 0x3fff; adsp->lmask[7] = mask_table[val & 0x3fff]; adsp->base[7] = adsp->i[7] & adsp->lmask[7]; } +static void wr_l0(adsp2100_state *adsp, INT32 val) { adsp->l[0] = val & 0x3fff; update_l(adsp, 0); } +static void wr_l1(adsp2100_state *adsp, INT32 val) { adsp->l[1] = val & 0x3fff; update_l(adsp, 1); } +static void wr_l2(adsp2100_state *adsp, INT32 val) { adsp->l[2] = val & 0x3fff; update_l(adsp, 2); } +static void wr_l3(adsp2100_state *adsp, INT32 val) { adsp->l[3] = val & 0x3fff; update_l(adsp, 3); } +static void wr_l4(adsp2100_state *adsp, INT32 val) { adsp->l[4] = val & 0x3fff; update_l(adsp, 4); } +static void wr_l5(adsp2100_state *adsp, INT32 val) { adsp->l[5] = val & 0x3fff; update_l(adsp, 5); } +static void wr_l6(adsp2100_state *adsp, INT32 val) { adsp->l[6] = val & 0x3fff; update_l(adsp, 6); } +static void wr_l7(adsp2100_state *adsp, INT32 val) { adsp->l[7] = val & 0x3fff; update_l(adsp, 7); } static void wr_astat(adsp2100_state *adsp, INT32 val) { adsp->astat = val & 0x00ff; } -static void wr_mstat(adsp2100_state *adsp, INT32 val) { set_mstat(adsp, val & adsp->mstat_mask); } -static void wr_sstat(adsp2100_state *adsp, INT32 val) { adsp->sstat = val & 0x00ff; } +static void wr_mstat(adsp2100_state *adsp, INT32 val) { adsp->mstat = val & adsp->mstat_mask; update_mstat(adsp); } static void wr_imask(adsp2100_state *adsp, INT32 val) { adsp->imask = val & adsp->imask_mask; check_irqs(adsp); } static void wr_icntl(adsp2100_state *adsp, INT32 val) { adsp->icntl = val & 0x001f; check_irqs(adsp); } static void wr_cntr(adsp2100_state *adsp, INT32 val) { cntr_stack_push(adsp); adsp->cntr = val & 0x3fff; } diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index 19c55fb6af3..41a60973e8d 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -211,6 +211,7 @@ typedef struct UINT32 astat; UINT32 sstat; UINT32 mstat; + UINT32 mstat_prev; UINT32 astat_clear; UINT32 idle; @@ -261,10 +262,11 @@ typedef struct adsp21xx_tx_func sport_tx_callback; adsp21xx_timer_func timer_fired; - /* Memory spaces */ + /* memory spaces */ const address_space *program; const address_space *data; const address_space *io; + cpu_state_table state; } adsp2100_state; @@ -283,6 +285,133 @@ static UINT32 pcbucket[0x4000]; #endif + +/*************************************************************************** + CPU STATE DESCRIPTION +***************************************************************************/ + +#define ADSP21XX_STATE_ENTRY(_name, _format, _member, _datamask, _flags) \ + CPU_STATE_ENTRY(ADSP2100_##_name, #_name, _format, adsp2100_state, _member, _datamask, ~0, _flags) + +#define ADSP21XX_STATE_ENTRY_MASK(_name, _format, _member, _datamask, _flags, _validmask) \ + CPU_STATE_ENTRY(ADSP2100_##_name, #_name, _format, adsp2100_state, _member, _datamask, _validmask, _flags) + +static const cpu_state_entry state_array[] = +{ + ADSP21XX_STATE_ENTRY(PC, "%04X", pc, 0xffff, 0) + ADSP21XX_STATE_ENTRY(GENPC, "%04X", pc, 0xffff, CPUSTATE_NOSHOW) + ADSP21XX_STATE_ENTRY(GENPCBASE, "%04X", ppc, 0xffff, CPUSTATE_NOSHOW) + + ADSP21XX_STATE_ENTRY(AX0, "%04X", core.ax0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AX1, "%04X", core.ax1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AY0, "%04X", core.ay0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AY1, "%04X", core.ay1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AR, "%04X", core.ar.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AF, "%04X", core.af.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(MX0, "%04X", core.mx0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MX1, "%04X", core.mx1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MY0, "%04X", core.my0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MY1, "%04X", core.my1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR0, "%04X", core.mr.mrx.mr0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR1, "%04X", core.mr.mrx.mr1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR2, "%02X", core.mr.mrx.mr2.u, 0xff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(MF, "%04X", core.mf.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(SI, "%04X", core.si.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(SE, "%02X", core.se.u, 0xff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(SB, "%02X", core.sb.u, 0x1f, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(SR0, "%04X", core.sr.srx.sr0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(SR1, "%04X", core.sr.srx.sr0.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(AX0_SEC, "%04X", alt.ax0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AX1_SEC, "%04X", alt.ax1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AY0_SEC, "%04X", alt.ay0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AY1_SEC, "%04X", alt.ay1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AR_SEC, "%04X", alt.ar.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(AF_SEC, "%04X", alt.af.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(MX0_SEC, "%04X", alt.mx0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MX1_SEC, "%04X", alt.mx1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MY0_SEC, "%04X", alt.my0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MY1_SEC, "%04X", alt.my1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR0_SEC, "%04X", alt.mr.mrx.mr0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR1_SEC, "%04X", alt.mr.mrx.mr1.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(MR2_SEC, "%02X", alt.mr.mrx.mr2.u, 0xff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(MF_SEC, "%04X", alt.mf.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(SI_SEC, "%04X", alt.si.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(SE_SEC, "%02X", alt.se.u, 0xff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(SB_SEC, "%02X", alt.sb.u, 0x1f, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(SR0_SEC, "%04X", alt.sr.srx.sr0.u, 0xffff, 0) + ADSP21XX_STATE_ENTRY(SR1_SEC, "%04X", alt.sr.srx.sr0.u, 0xffff, 0) + + ADSP21XX_STATE_ENTRY(I0, "%04X", i[0], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I1, "%04X", i[1], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I2, "%04X", i[2], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I3, "%04X", i[3], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I4, "%04X", i[4], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I5, "%04X", i[5], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I6, "%04X", i[6], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(I7, "%04X", i[7], 0x3fff, CPUSTATE_IMPORT) + + ADSP21XX_STATE_ENTRY(L0, "%04X", l[0], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L1, "%04X", l[1], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L2, "%04X", l[2], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L3, "%04X", l[3], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L4, "%04X", l[4], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L5, "%04X", l[5], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L6, "%04X", l[6], 0x3fff, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(L7, "%04X", l[7], 0x3fff, CPUSTATE_IMPORT) + + ADSP21XX_STATE_ENTRY(M0, "%04X", m[0], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M1, "%04X", m[1], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M2, "%04X", m[2], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M3, "%04X", m[3], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M4, "%04X", m[4], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M5, "%04X", m[5], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M6, "%04X", m[6], 0x3fff, CPUSTATE_IMPORT_SEXT) + ADSP21XX_STATE_ENTRY(M7, "%04X", m[7], 0x3fff, CPUSTATE_IMPORT_SEXT) + + ADSP21XX_STATE_ENTRY(PX, "%02X", px, 0xff, 0) + ADSP21XX_STATE_ENTRY(CNTR, "%04X", cntr, 0x3fff, 0) + ADSP21XX_STATE_ENTRY(ASTAT, "%02X", astat, 0xff, 0) + ADSP21XX_STATE_ENTRY(SSTAT, "%02X", sstat, 0xff, 0) + ADSP21XX_STATE_ENTRY_MASK(MSTAT, "%01X", mstat, 0x0f, CPUSTATE_IMPORT, (1 << CHIP_TYPE_ADSP2100)) + ADSP21XX_STATE_ENTRY_MASK(MSTAT, "%02X", mstat, 0x7f, CPUSTATE_IMPORT, ~(1 << CHIP_TYPE_ADSP2100)) + + ADSP21XX_STATE_ENTRY(PCSP, "%02X", pc_sp, 0xff, 0) + ADSP21XX_STATE_ENTRY(GENSP, "%02X", pc_sp, 0xff, CPUSTATE_NOSHOW) + ADSP21XX_STATE_ENTRY(CNTRSP, "%01X", cntr_sp, 0xf, 0) + ADSP21XX_STATE_ENTRY(STATSP, "%01X", stat_sp, 0xf, 0) + ADSP21XX_STATE_ENTRY(LOOPSP, "%01X", loop_sp, 0xf, 0) + + ADSP21XX_STATE_ENTRY_MASK(IMASK, "%01X", imask, 0x00f, CPUSTATE_IMPORT, (1 << CHIP_TYPE_ADSP2100)) + ADSP21XX_STATE_ENTRY_MASK(IMASK, "%02X", imask, 0x03f, CPUSTATE_IMPORT, ~((1 << CHIP_TYPE_ADSP2100) | (1 << CHIP_TYPE_ADSP2181))) + ADSP21XX_STATE_ENTRY_MASK(IMASK, "%03X", imask, 0x3ff, CPUSTATE_IMPORT, (1 << CHIP_TYPE_ADSP2181)) + ADSP21XX_STATE_ENTRY(ICNTL, "%02X", icntl, 0x1f, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(IRQSTATE0, "%1u", irq_state[0], 0x1, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(IRQSTATE1, "%1u", irq_state[1], 0x1, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY(IRQSTATE2, "%1u", irq_state[2], 0x1, CPUSTATE_IMPORT) + ADSP21XX_STATE_ENTRY_MASK(IRQSTATE3, "%1u", irq_state[3], 0x1, CPUSTATE_IMPORT, (1 << CHIP_TYPE_ADSP2100)) + + ADSP21XX_STATE_ENTRY(FLAGIN, "%1u", flagin, 0x1, 0) + ADSP21XX_STATE_ENTRY(FLAGOUT, "%1u", flagout, 0x1, 0) + ADSP21XX_STATE_ENTRY(FL0, "%1u", fl0, 0x1, 0) + ADSP21XX_STATE_ENTRY(FL1, "%1u", fl1, 0x1, 0) + ADSP21XX_STATE_ENTRY(FL2, "%1u", fl2, 0x1, 0) +}; + +static const cpu_state_table state_table_template = +{ + NULL, /* pointer to the base of state (offsets are relative to this) */ + 0, /* subtype this table refers to */ + ARRAY_LENGTH(state_array), /* number of entries */ + state_array /* array of entries */ +}; + + + /*************************************************************************** PRIVATE FUNCTION PROTOTYPES ***************************************************************************/ @@ -544,7 +673,7 @@ static void set_irq_line(adsp2100_state *adsp, int irqline, int state) INITIALIZATION AND SHUTDOWN ***************************************************************************/ -static adsp2100_state *adsp21xx_init(const device_config *device, cpu_irq_callback irqcallback) +static adsp2100_state *adsp21xx_init(const device_config *device, cpu_irq_callback irqcallback, int chiptype) { adsp2100_state *adsp = device->token; @@ -553,14 +682,18 @@ static adsp2100_state *adsp21xx_init(const device_config *device, cpu_irq_callba fatalerror("creating adsp2100 tables failed"); /* set the IRQ callback */ + adsp->chip_type = chiptype; adsp->irq_callback = irqcallback; - adsp->device = device; + adsp->device = device; adsp->program = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); adsp->data = cpu_get_address_space(device, ADDRESS_SPACE_DATA); adsp->io = cpu_get_address_space(device, ADDRESS_SPACE_IO); - + /* set up the state table */ + adsp->state = state_table_template; + adsp->state.baseptr = adsp; + adsp->state.subtypemask = 1 << chiptype; /* set up ALU register pointers */ adsp->alu_xregs[0] = &adsp->core.ax0; @@ -653,6 +786,7 @@ static adsp2100_state *adsp21xx_init(const device_config *device, cpu_irq_callba state_save_register_device_item(device, 0, adsp->astat); state_save_register_device_item(device, 0, adsp->sstat); state_save_register_device_item(device, 0, adsp->mstat); + state_save_register_device_item(device, 0, adsp->mstat_prev); state_save_register_device_item(device, 0, adsp->astat_clear); state_save_register_device_item(device, 0, adsp->idle); @@ -734,6 +868,7 @@ static CPU_RESET( adsp21xx ) adsp->mstat = 0; adsp->sstat = 0x55; adsp->idle = 0; + update_mstat(adsp); /* reset stacks */ adsp->pc_sp = 0; @@ -892,9 +1027,6 @@ static CPU_EXECUTE( adsp21xx ) check_irqs(adsp); - /* reset the core */ - set_mstat(adsp, adsp->mstat); - /* count cycles and interrupt cycles */ adsp->icount = cycles; @@ -1086,18 +1218,17 @@ static CPU_EXECUTE( adsp21xx ) break; case 0x0c: /* 00001100 xxxxxxxx xxxxxxxx mode control */ - temp = adsp->mstat; if (adsp->chip_type >= CHIP_TYPE_ADSP2101) { - if (op & 0x000008) temp = (temp & ~MSTAT_GOMODE) | ((op << 5) & MSTAT_GOMODE); - if (op & 0x002000) temp = (temp & ~MSTAT_INTEGER) | ((op >> 8) & MSTAT_INTEGER); - if (op & 0x008000) temp = (temp & ~MSTAT_TIMER) | ((op >> 9) & MSTAT_TIMER); + if (op & 0x000008) adsp->mstat = (adsp->mstat & ~MSTAT_GOMODE) | ((op << 5) & MSTAT_GOMODE); + if (op & 0x002000) adsp->mstat = (adsp->mstat & ~MSTAT_INTEGER) | ((op >> 8) & MSTAT_INTEGER); + if (op & 0x008000) adsp->mstat = (adsp->mstat & ~MSTAT_TIMER) | ((op >> 9) & MSTAT_TIMER); } - if (op & 0x000020) temp = (temp & ~MSTAT_BANK) | ((op >> 4) & MSTAT_BANK); - if (op & 0x000080) temp = (temp & ~MSTAT_REVERSE) | ((op >> 5) & MSTAT_REVERSE); - if (op & 0x000200) temp = (temp & ~MSTAT_STICKYV) | ((op >> 6) & MSTAT_STICKYV); - if (op & 0x000800) temp = (temp & ~MSTAT_SATURATE) | ((op >> 7) & MSTAT_SATURATE); - set_mstat(adsp, temp); + if (op & 0x000020) adsp->mstat = (adsp->mstat & ~MSTAT_BANK) | ((op >> 4) & MSTAT_BANK); + if (op & 0x000080) adsp->mstat = (adsp->mstat & ~MSTAT_REVERSE) | ((op >> 5) & MSTAT_REVERSE); + if (op & 0x000200) adsp->mstat = (adsp->mstat & ~MSTAT_STICKYV) | ((op >> 6) & MSTAT_STICKYV); + if (op & 0x000800) adsp->mstat = (adsp->mstat & ~MSTAT_SATURATE) | ((op >> 7) & MSTAT_SATURATE); + update_mstat(adsp); break; case 0x0d: /* 00001101 0000xxxx xxxxxxxx internal data move */ @@ -1641,6 +1772,58 @@ extern CPU_DISASSEMBLE( adsp21xx ); +/*************************************************************************** + STATE HANDLING CALLBACKS +***************************************************************************/ + +static CPU_IMPORT_STATE( adsp21xx ) +{ + adsp2100_state *adsp = device->token; + switch (entry->index) + { + case ADSP2100_MSTAT: + update_mstat(adsp); + break; + + case ADSP2100_IMASK: + case ADSP2100_ICNTL: + case ADSP2100_IRQSTATE0: + case ADSP2100_IRQSTATE1: + case ADSP2100_IRQSTATE2: + case ADSP2100_IRQSTATE3: + check_irqs(adsp); + break; + + case ADSP2100_I0: + case ADSP2100_I1: + case ADSP2100_I2: + case ADSP2100_I3: + case ADSP2100_I4: + case ADSP2100_I5: + case ADSP2100_I6: + case ADSP2100_I7: + update_i(adsp, entry->index - ADSP2100_I0); + break; + + case ADSP2100_L0: + case ADSP2100_L1: + case ADSP2100_L2: + case ADSP2100_L3: + case ADSP2100_L4: + case ADSP2100_L5: + case ADSP2100_L6: + case ADSP2100_L7: + update_l(adsp, entry->index - ADSP2100_L0); + break; + + default: + fatalerror("CPU_IMPORT_STATE(adsp21xx) called for unexpected value\n"); + break; + } +} + + + /************************************************************************** * Generic set_info **************************************************************************/ @@ -1651,104 +1834,8 @@ static CPU_SET_INFO( adsp21xx ) switch (state) { /* --- the following bits of info are set as 64-bit signed integers --- */ - case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + ADSP2100_PC: adsp->pc = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_AX0: wr_ax0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_AX1: wr_ax1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_AY0: wr_ay0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_AY1: wr_ay1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_AR: wr_ar(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_AF: adsp->core.af.u = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_MX0: wr_mx0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MX1: wr_mx1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MY0: wr_my0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MY1: wr_my1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MR0: wr_mr0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MR1: wr_mr1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MR2: wr_mr2(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MF: adsp->core.mf.u = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_SI: wr_si(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_SE: wr_se(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_SB: wr_sb(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_SR0: wr_sr0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_SR1: wr_sr1(adsp, info->i); break; - - case CPUINFO_INT_REGISTER + ADSP2100_AX0_SEC: adsp->alt.ax0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_AX1_SEC: adsp->alt.ax1.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY0_SEC: adsp->alt.ay0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY1_SEC: adsp->alt.ay1.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_AR_SEC: adsp->alt.ar.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_AF_SEC: adsp->alt.af.u = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_MX0_SEC: adsp->alt.mx0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MX1_SEC: adsp->alt.mx1.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY0_SEC: adsp->alt.my0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY1_SEC: adsp->alt.my1.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR0_SEC: adsp->alt.mr.mrx.mr0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR1_SEC: adsp->alt.mr.mrx.mr1.s = info->i; adsp->alt.mr.mrx.mr2.s = (INT16)info->i >> 15; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR2_SEC: adsp->alt.mr.mrx.mr2.s = (INT8)info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_MF_SEC: adsp->alt.mf.u = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_SI_SEC: adsp->alt.si.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_SE_SEC: adsp->alt.se.s = (INT8)info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_SB_SEC: adsp->alt.sb.s = (INT32)(info->i << 27) >> 27; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR0_SEC: adsp->alt.sr.srx.sr0.s = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR1_SEC: adsp->alt.sr.srx.sr1.s = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_I0: wr_i0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I1: wr_i1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I2: wr_i2(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I3: wr_i3(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I4: wr_i4(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I5: wr_i5(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I6: wr_i6(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_I7: wr_i7(adsp, info->i); break; - - case CPUINFO_INT_REGISTER + ADSP2100_L0: wr_l0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L1: wr_l1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L2: wr_l2(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L3: wr_l3(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L4: wr_l4(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L5: wr_l5(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L6: wr_l6(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_L7: wr_l7(adsp, info->i); break; - - case CPUINFO_INT_REGISTER + ADSP2100_M0: wr_m0(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M1: wr_m1(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M2: wr_m2(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M3: wr_m3(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M4: wr_m4(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M5: wr_m5(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M6: wr_m6(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_M7: wr_m7(adsp, info->i); break; - - case CPUINFO_INT_REGISTER + ADSP2100_PX: wr_px(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_CNTR: adsp->cntr = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_ASTAT: wr_astat(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_SSTAT: wr_sstat(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_MSTAT: wr_mstat(adsp, info->i); break; - - case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + ADSP2100_PCSP: adsp->pc_sp = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_CNTRSP: adsp->cntr_sp = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_STATSP: adsp->stat_sp = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_LOOPSP: adsp->loop_sp = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_IMASK: wr_imask(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_ICNTL: wr_icntl(adsp, info->i); break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE0: adsp->irq_state[0] = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE1: adsp->irq_state[1] = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE2: adsp->irq_state[2] = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE3: adsp->irq_state[3] = info->i; break; - - case CPUINFO_INT_REGISTER + ADSP2100_FLAGIN: adsp->flagin = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_FLAGOUT: adsp->flagout = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL0: adsp->fl0 = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL1: adsp->fl1 = info->i; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL2: adsp->fl2 = info->i; break; + case CPUINFO_INT_PC: adsp->pc = info->i; break; + case CPUINFO_INT_SP: adsp->pc_sp = info->i; break; } } @@ -1786,104 +1873,8 @@ static CPU_GET_INFO( adsp21xx ) case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; case CPUINFO_INT_PREVIOUSPC: info->i = adsp->ppc; break; - case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + ADSP2100_PC: info->i = adsp->pc; break; - - case CPUINFO_INT_REGISTER + ADSP2100_AX0: info->i = adsp->core.ax0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AX1: info->i = adsp->core.ax1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY0: info->i = adsp->core.ay0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY1: info->i = adsp->core.ay1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AR: info->i = adsp->core.ar.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AF: info->i = adsp->core.af.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_MX0: info->i = adsp->core.mx0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MX1: info->i = adsp->core.mx1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY0: info->i = adsp->core.my0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY1: info->i = adsp->core.my1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR0: info->i = adsp->core.mr.mrx.mr0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR1: info->i = adsp->core.mr.mrx.mr1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR2: info->i = adsp->core.mr.mrx.mr2.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MF: info->i = adsp->core.mf.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_SI: info->i = adsp->core.si.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SE: info->i = adsp->core.se.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SB: info->i = adsp->core.sb.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR0: info->i = adsp->core.sr.srx.sr0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR1: info->i = adsp->core.sr.srx.sr1.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_AX0_SEC: info->i = adsp->alt.ax0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AX1_SEC: info->i = adsp->alt.ax1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY0_SEC: info->i = adsp->alt.ay0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AY1_SEC: info->i = adsp->alt.ay1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AR_SEC: info->i = adsp->alt.ar.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_AF_SEC: info->i = adsp->alt.af.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_MX0_SEC: info->i = adsp->alt.mx0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MX1_SEC: info->i = adsp->alt.mx1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY0_SEC: info->i = adsp->alt.my0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MY1_SEC: info->i = adsp->alt.my1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR0_SEC: info->i = adsp->alt.mr.mrx.mr0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR1_SEC: info->i = adsp->alt.mr.mrx.mr1.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MR2_SEC: info->i = adsp->alt.mr.mrx.mr2.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_MF_SEC: info->i = adsp->alt.mf.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_SI_SEC: info->i = adsp->alt.si.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SE_SEC: info->i = adsp->alt.se.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SB_SEC: info->i = adsp->alt.sb.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR0_SEC: info->i = adsp->alt.sr.srx.sr0.u; break; - case CPUINFO_INT_REGISTER + ADSP2100_SR1_SEC: info->i = adsp->alt.sr.srx.sr1.u; break; - - case CPUINFO_INT_REGISTER + ADSP2100_I0: info->i = adsp->i[0]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I1: info->i = adsp->i[1]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I2: info->i = adsp->i[2]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I3: info->i = adsp->i[3]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I4: info->i = adsp->i[4]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I5: info->i = adsp->i[5]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I6: info->i = adsp->i[6]; break; - case CPUINFO_INT_REGISTER + ADSP2100_I7: info->i = adsp->i[7]; break; - - case CPUINFO_INT_REGISTER + ADSP2100_L0: info->i = adsp->l[0]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L1: info->i = adsp->l[1]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L2: info->i = adsp->l[2]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L3: info->i = adsp->l[3]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L4: info->i = adsp->l[4]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L5: info->i = adsp->l[5]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L6: info->i = adsp->l[6]; break; - case CPUINFO_INT_REGISTER + ADSP2100_L7: info->i = adsp->l[7]; break; - - case CPUINFO_INT_REGISTER + ADSP2100_M0: info->i = adsp->m[0]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M1: info->i = adsp->m[1]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M2: info->i = adsp->m[2]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M3: info->i = adsp->m[3]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M4: info->i = adsp->m[4]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M5: info->i = adsp->m[5]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M6: info->i = adsp->m[6]; break; - case CPUINFO_INT_REGISTER + ADSP2100_M7: info->i = adsp->m[7]; break; - - case CPUINFO_INT_REGISTER + ADSP2100_PX: info->i = adsp->px; break; - case CPUINFO_INT_REGISTER + ADSP2100_CNTR: info->i = adsp->cntr; break; - case CPUINFO_INT_REGISTER + ADSP2100_ASTAT: info->i = adsp->astat; break; - case CPUINFO_INT_REGISTER + ADSP2100_SSTAT: info->i = adsp->sstat; break; - case CPUINFO_INT_REGISTER + ADSP2100_MSTAT: info->i = adsp->mstat; break; - - case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + ADSP2100_PCSP: info->i = adsp->pc_sp; break; - case CPUINFO_INT_REGISTER + ADSP2100_CNTRSP: info->i = adsp->cntr_sp; break; - case CPUINFO_INT_REGISTER + ADSP2100_STATSP: info->i = adsp->stat_sp; break; - case CPUINFO_INT_REGISTER + ADSP2100_LOOPSP: info->i = adsp->loop_sp; break; - - case CPUINFO_INT_REGISTER + ADSP2100_IMASK: info->i = adsp->imask; break; - case CPUINFO_INT_REGISTER + ADSP2100_ICNTL: info->i = adsp->icntl; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE0: info->i = adsp->irq_state[0]; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE1: info->i = adsp->irq_state[1]; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE2: info->i = adsp->irq_state[2]; break; - case CPUINFO_INT_REGISTER + ADSP2100_IRQSTATE3: info->i = adsp->irq_state[3]; break; - - case CPUINFO_INT_REGISTER + ADSP2100_FLAGIN: info->i = adsp->flagin; break; - case CPUINFO_INT_REGISTER + ADSP2100_FLAGOUT: info->i = adsp->flagout; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL0: info->i = adsp->fl0; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL1: info->i = adsp->fl1; break; - case CPUINFO_INT_REGISTER + ADSP2100_FL2: info->i = adsp->fl2; break; + case CPUINFO_INT_PC: info->i = adsp->pc; break; + case CPUINFO_INT_SP: info->i = adsp->pc_sp; break; /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: /* set per CPU */ break; @@ -1893,7 +1884,9 @@ static CPU_GET_INFO( adsp21xx ) case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(adsp21xx); break; case CPUINFO_PTR_BURN: info->burn = NULL; break; case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(adsp21xx); break; + case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(adsp21xx); break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &adsp->icount; break; + case CPUINFO_PTR_STATE_TABLE: info->state_table = &adsp->state; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: /* set per CPU */ break; @@ -1913,103 +1906,6 @@ static CPU_GET_INFO( adsp21xx ) adsp->astat & 0x02 ? 'N':'.', adsp->astat & 0x01 ? 'Z':'.'); break; - - case CPUINFO_STR_REGISTER + ADSP2100_PC: sprintf(info->s, "PC: %04X", adsp->pc); break; - - case CPUINFO_STR_REGISTER + ADSP2100_AX0: sprintf(info->s, "AX0: %04X", adsp->core.ax0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AX1: sprintf(info->s, "AX1: %04X", adsp->core.ax1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AY0: sprintf(info->s, "AY0: %04X", adsp->core.ay0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AY1: sprintf(info->s, "AY1: %04X", adsp->core.ay1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AR: sprintf(info->s, "AR: %04X", adsp->core.ar.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AF: sprintf(info->s, "AF: %04X", adsp->core.af.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_MX0: sprintf(info->s, "MX0: %04X", adsp->core.mx0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MX1: sprintf(info->s, "MX1: %04X", adsp->core.mx1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MY0: sprintf(info->s, "MY0: %04X", adsp->core.my0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MY1: sprintf(info->s, "MY1: %04X", adsp->core.my1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR0: sprintf(info->s, "MR0: %04X", adsp->core.mr.mrx.mr0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR1: sprintf(info->s, "MR1: %04X", adsp->core.mr.mrx.mr1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR2: sprintf(info->s, "MR2: %02X", adsp->core.mr.mrx.mr2.u & 0x00ff); break; - case CPUINFO_STR_REGISTER + ADSP2100_MF: sprintf(info->s, "MF: %04X", adsp->core.mf.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_SI: sprintf(info->s, "SI: %04X", adsp->core.si.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_SE: sprintf(info->s, "SE: %02X ", adsp->core.se.u & 0x00ff); break; - case CPUINFO_STR_REGISTER + ADSP2100_SB: sprintf(info->s, "SB: %02X ", adsp->core.sb.u & 0x001f); break; - case CPUINFO_STR_REGISTER + ADSP2100_SR0: sprintf(info->s, "SR0: %04X", adsp->core.sr.srx.sr0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_SR1: sprintf(info->s, "SR1: %04X", adsp->core.sr.srx.sr1.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_AX0_SEC: sprintf(info->s, "AX0_SEC: %04X", adsp->alt.ax0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AX1_SEC: sprintf(info->s, "AX1_SEC: %04X", adsp->alt.ax1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AY0_SEC: sprintf(info->s, "AY0_SEC: %04X", adsp->alt.ay0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AY1_SEC: sprintf(info->s, "AY1_SEC: %04X", adsp->alt.ay1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AR_SEC: sprintf(info->s, "AR_SEC: %04X", adsp->alt.ar.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_AF_SEC: sprintf(info->s, "AF_SEC: %04X", adsp->alt.af.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_MX0_SEC: sprintf(info->s, "MX0_SEC: %04X", adsp->alt.mx0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MX1_SEC: sprintf(info->s, "MX1_SEC: %04X", adsp->alt.mx1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MY0_SEC: sprintf(info->s, "MY0_SEC: %04X", adsp->alt.my0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MY1_SEC: sprintf(info->s, "MY1_SEC: %04X", adsp->alt.my1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR0_SEC: sprintf(info->s, "MR0_SEC: %04X", adsp->alt.mr.mrx.mr0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR1_SEC: sprintf(info->s, "MR1_SEC: %04X", adsp->alt.mr.mrx.mr1.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_MR2_SEC: sprintf(info->s, "MR2_SEC: %02X", adsp->alt.mr.mrx.mr2.u & 0x00ff); break; - case CPUINFO_STR_REGISTER + ADSP2100_MF_SEC: sprintf(info->s, "MF_SEC: %04X", adsp->alt.mf.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_SI_SEC: sprintf(info->s, "SI_SEC: %04X", adsp->alt.si.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_SE_SEC: sprintf(info->s, "SE_SEC: %02X ", adsp->alt.se.u & 0x00ff); break; - case CPUINFO_STR_REGISTER + ADSP2100_SB_SEC: sprintf(info->s, "SB_SEC: %02X ", adsp->alt.sb.u & 0x001f); break; - case CPUINFO_STR_REGISTER + ADSP2100_SR0_SEC: sprintf(info->s, "SR0_SEC: %04X", adsp->alt.sr.srx.sr0.u); break; - case CPUINFO_STR_REGISTER + ADSP2100_SR1_SEC: sprintf(info->s, "SR1_SEC: %04X", adsp->alt.sr.srx.sr1.u); break; - - case CPUINFO_STR_REGISTER + ADSP2100_I0: sprintf(info->s, "I0: %04X", adsp->i[0]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I1: sprintf(info->s, "I1: %04X", adsp->i[1]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I2: sprintf(info->s, "I2: %04X", adsp->i[2]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I3: sprintf(info->s, "I3: %04X", adsp->i[3]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I4: sprintf(info->s, "I4: %04X", adsp->i[4]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I5: sprintf(info->s, "I5: %04X", adsp->i[5]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I6: sprintf(info->s, "I6: %04X", adsp->i[6]); break; - case CPUINFO_STR_REGISTER + ADSP2100_I7: sprintf(info->s, "I7: %04X", adsp->i[7]); break; - - case CPUINFO_STR_REGISTER + ADSP2100_L0: sprintf(info->s, "L0: %04X", adsp->l[0]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L1: sprintf(info->s, "L1: %04X", adsp->l[1]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L2: sprintf(info->s, "L2: %04X", adsp->l[2]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L3: sprintf(info->s, "L3: %04X", adsp->l[3]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L4: sprintf(info->s, "L4: %04X", adsp->l[4]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L5: sprintf(info->s, "L5: %04X", adsp->l[5]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L6: sprintf(info->s, "L6: %04X", adsp->l[6]); break; - case CPUINFO_STR_REGISTER + ADSP2100_L7: sprintf(info->s, "L7: %04X", adsp->l[7]); break; - - case CPUINFO_STR_REGISTER + ADSP2100_M0: sprintf(info->s, "M0: %04X", adsp->m[0]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M1: sprintf(info->s, "M1: %04X", adsp->m[1]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M2: sprintf(info->s, "M2: %04X", adsp->m[2]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M3: sprintf(info->s, "M3: %04X", adsp->m[3]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M4: sprintf(info->s, "M4: %04X", adsp->m[4]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M5: sprintf(info->s, "M5: %04X", adsp->m[5]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M6: sprintf(info->s, "M6: %04X", adsp->m[6]); break; - case CPUINFO_STR_REGISTER + ADSP2100_M7: sprintf(info->s, "M7: %04X", adsp->m[7]); break; - - case CPUINFO_STR_REGISTER + ADSP2100_PX: sprintf(info->s, "PX: %02X ", adsp->px); break; - case CPUINFO_STR_REGISTER + ADSP2100_CNTR: sprintf(info->s, "CNTR:%04X", adsp->cntr); break; - case CPUINFO_STR_REGISTER + ADSP2100_ASTAT: sprintf(info->s, "ASTA:%02X ", adsp->astat); break; - case CPUINFO_STR_REGISTER + ADSP2100_SSTAT: sprintf(info->s, "SSTA:%02X ", adsp->sstat); break; - case CPUINFO_STR_REGISTER + ADSP2100_MSTAT: sprintf(info->s, "MSTA:%02X ", adsp->mstat); break; - - case CPUINFO_STR_REGISTER + ADSP2100_PCSP: sprintf(info->s, "PCSP:%02X ", adsp->pc_sp); break; - case CPUINFO_STR_REGISTER + ADSP2100_CNTRSP: sprintf(info->s, "CTSP:%01X ", adsp->cntr_sp); break; - case CPUINFO_STR_REGISTER + ADSP2100_STATSP: sprintf(info->s, "STSP:%01X ", adsp->stat_sp); break; - case CPUINFO_STR_REGISTER + ADSP2100_LOOPSP: sprintf(info->s, "LPSP:%01X ", adsp->loop_sp); break; - - case CPUINFO_STR_REGISTER + ADSP2100_IMASK: sprintf(info->s, "IMSK:%03X ", adsp->imask); break; - case CPUINFO_STR_REGISTER + ADSP2100_ICNTL: sprintf(info->s, "ICTL:%02X ", adsp->icntl); break; - case CPUINFO_STR_REGISTER + ADSP2100_IRQSTATE0: sprintf(info->s, "IRQ0:%X ", adsp->irq_state[0]); break; - case CPUINFO_STR_REGISTER + ADSP2100_IRQSTATE1: sprintf(info->s, "IRQ1:%X ", adsp->irq_state[1]); break; - case CPUINFO_STR_REGISTER + ADSP2100_IRQSTATE2: sprintf(info->s, "IRQ2:%X ", adsp->irq_state[2]); break; - case CPUINFO_STR_REGISTER + ADSP2100_IRQSTATE3: sprintf(info->s, "IRQ3:%X ", adsp->irq_state[3]); break; - - case CPUINFO_STR_REGISTER + ADSP2100_FLAGIN: sprintf(info->s, "FI: %X ", adsp->flagin); break; - case CPUINFO_STR_REGISTER + ADSP2100_FLAGOUT: sprintf(info->s, "FO: %X ", adsp->flagout); break; - case CPUINFO_STR_REGISTER + ADSP2100_FL0: sprintf(info->s, "FL0: %X ", adsp->fl0); break; - case CPUINFO_STR_REGISTER + ADSP2100_FL1: sprintf(info->s, "FL1: %X ", adsp->fl1); break; - case CPUINFO_STR_REGISTER + ADSP2100_FL2: sprintf(info->s, "FL2: %X ", adsp->fl2); break; } } @@ -2034,8 +1930,7 @@ static void adsp21xx_load_boot_data(UINT8 *srcdata, UINT32 *dstdata) static CPU_INIT( adsp2100 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2100; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2100); adsp->mstat_mask = 0x0f; adsp->imask_mask = 0x0f; } @@ -2091,8 +1986,7 @@ CPU_GET_INFO( adsp2100 ) static CPU_INIT( adsp2101 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2101; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2101); adsp->mstat_mask = 0x7f; adsp->imask_mask = 0x3f; } @@ -2161,8 +2055,7 @@ CPU_GET_INFO( adsp2101 ) static CPU_INIT( adsp2104 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2104; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2104); adsp->mstat_mask = 0x7f; adsp->imask_mask = 0x3f; } @@ -2236,8 +2129,7 @@ CPU_GET_INFO( adsp2104 ) static CPU_INIT( adsp2105 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2105; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2105); adsp->mstat_mask = 0x7f; adsp->imask_mask = 0x3f; } @@ -2305,8 +2197,7 @@ CPU_GET_INFO( adsp2105 ) static CPU_INIT( adsp2115 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2115; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2115); adsp->mstat_mask = 0x7f; adsp->imask_mask = 0x3f; } @@ -2380,8 +2271,7 @@ CPU_GET_INFO( adsp2115 ) static CPU_INIT( adsp2181 ) { - adsp2100_state *adsp = adsp21xx_init(device, irqcallback); - adsp->chip_type = CHIP_TYPE_ADSP2181; + adsp2100_state *adsp = adsp21xx_init(device, irqcallback, CHIP_TYPE_ADSP2181); adsp->mstat_mask = 0x7f; adsp->imask_mask = 0x3ff; } diff --git a/src/emu/cpu/adsp2100/adsp2100.h b/src/emu/cpu/adsp2100/adsp2100.h index 1b4be0b17c3..c05183ad4b7 100644 --- a/src/emu/cpu/adsp2100/adsp2100.h +++ b/src/emu/cpu/adsp2100/adsp2100.h @@ -30,7 +30,7 @@ typedef void (*adsp21xx_timer_func)(const device_config *device, int enable); enum { - ADSP2100_PC=1, + ADSP2100_PC, ADSP2100_AX0, ADSP2100_AX1, ADSP2100_AY0, ADSP2100_AY1, ADSP2100_AR, ADSP2100_AF, ADSP2100_MX0, ADSP2100_MX1, ADSP2100_MY0, ADSP2100_MY1, ADSP2100_MR0, ADSP2100_MR1, ADSP2100_MR2, ADSP2100_MF, ADSP2100_SI, ADSP2100_SE, ADSP2100_SB, ADSP2100_SR0, ADSP2100_SR1, @@ -43,7 +43,11 @@ enum ADSP2100_FLAGIN, ADSP2100_FLAGOUT, ADSP2100_FL0, ADSP2100_FL1, ADSP2100_FL2, ADSP2100_AX0_SEC, ADSP2100_AX1_SEC, ADSP2100_AY0_SEC, ADSP2100_AY1_SEC, ADSP2100_AR_SEC, ADSP2100_AF_SEC, ADSP2100_MX0_SEC, ADSP2100_MX1_SEC, ADSP2100_MY0_SEC, ADSP2100_MY1_SEC, ADSP2100_MR0_SEC, ADSP2100_MR1_SEC, ADSP2100_MR2_SEC, ADSP2100_MF_SEC, - ADSP2100_SI_SEC, ADSP2100_SE_SEC, ADSP2100_SB_SEC, ADSP2100_SR0_SEC, ADSP2100_SR1_SEC + ADSP2100_SI_SEC, ADSP2100_SE_SEC, ADSP2100_SB_SEC, ADSP2100_SR0_SEC, ADSP2100_SR1_SEC, + + ADSP2100_GENPC = REG_GENPC, + ADSP2100_GENSP = REG_GENSP, + ADSP2100_GENPCBASE = REG_GENPCBASE }; enum diff --git a/src/emu/cpu/drcbex64.c b/src/emu/cpu/drcbex64.c index 4ebbbe907c1..bb293eb16dc 100644 --- a/src/emu/cpu/drcbex64.c +++ b/src/emu/cpu/drcbex64.c @@ -175,7 +175,6 @@ #include "debugger.h" #include "x86emit.h" #include "eminline.h" -#undef REG_SP #include "x86log.h" #include #include diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c index 3f4dd2e5790..5413b144159 100644 --- a/src/emu/cpu/drcbex86.c +++ b/src/emu/cpu/drcbex86.c @@ -91,7 +91,6 @@ #include "debugger.h" #include "x86emit.h" #include "eminline.h" -#undef REG_SP #include "x86log.h" #include #include diff --git a/src/emu/cpu/g65816/g65816op.h b/src/emu/cpu/g65816/g65816op.h index 13196a5e92b..a45c250983c 100644 --- a/src/emu/cpu/g65816/g65816op.h +++ b/src/emu/cpu/g65816/g65816op.h @@ -2351,9 +2351,9 @@ TABLE_FUNCTION(uint, get_reg, (g65816i_cpu_struct *cpustate, int regnum)) case G65816_A: return REGISTER_B | REGISTER_A; case G65816_X: return REGISTER_X; case G65816_Y: return REGISTER_Y; - case REG_SP: return REGISTER_S; + case REG_GENSP: return REGISTER_S; case G65816_S: return REGISTER_S; - case REG_PC: return REGISTER_PC; + case REG_GENPC: return REGISTER_PC; case G65816_PC: return REGISTER_PC; case G65816_PB: return REGISTER_PB >> 16; case G65816_DB: return REGISTER_DB >> 16; @@ -2361,7 +2361,7 @@ TABLE_FUNCTION(uint, get_reg, (g65816i_cpu_struct *cpustate, int regnum)) case G65816_P: return g65816i_get_reg_p(cpustate); case G65816_NMI_STATE: return LINE_NMI; case G65816_IRQ_STATE: return LINE_IRQ; - case REG_PREVIOUSPC: return REGISTER_PPC; + case REG_GENPCBASE: return REGISTER_PPC; } return 0; } @@ -2372,11 +2372,11 @@ TABLE_FUNCTION(void, set_reg, (g65816i_cpu_struct *cpustate, int regnum, uint va { switch(regnum) { - case REG_PC: case G65816_PC: REGISTER_PC = MAKE_UINT_16(val); break; + case REG_GENPC: case G65816_PC: REGISTER_PC = MAKE_UINT_16(val); break; #if FLAG_SET_E - case REG_SP: case G65816_S: REGISTER_S = MAKE_UINT_8(val) | 0x100; break; + case REG_GENSP: case G65816_S: REGISTER_S = MAKE_UINT_8(val) | 0x100; break; #else - case REG_SP: case G65816_S: REGISTER_S = MAKE_UINT_16(val); break; + case REG_GENSP: case G65816_S: REGISTER_S = MAKE_UINT_16(val); break; #endif case G65816_P: g65816i_set_reg_p(cpustate, val); break; #if FLAG_SET_M diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 58f5ac48db3..639c0f6b2d6 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -50,6 +50,9 @@ struct _i8086_state INT8 irq_state; INT8 test_state; /* PJB 03/05 */ INT32 extra_cycles; /* extra cycles for interrupts */ + + UINT16 ip; + UINT32 sp; memory_interface mem; @@ -57,6 +60,7 @@ struct _i8086_state const address_space *program; const address_space *io; int icount; + cpu_state_table state; unsigned prefix_base; /* base address of the latest prefix segment */ char seg_prefix; /* prefix segment indicator */ @@ -65,6 +69,55 @@ struct _i8086_state }; +/*************************************************************************** + CPU STATE DESCRIPTION +***************************************************************************/ + +#define I86_STATE_ENTRY(_name, _format, _member, _datamask, _flags) \ + CPU_STATE_ENTRY(I8086_##_name, #_name, _format, i8086_state, _member, _datamask, ~0, _flags) + +static const cpu_state_entry state_array[] = +{ + I86_STATE_ENTRY(GENPC, "%9s", pc, 0xfffff, CPUSTATE_IMPORT) + I86_STATE_ENTRY(GENPCBASE, "%08X", pc, 0xfffff, CPUSTATE_NOSHOW) /* not implemented */ + I86_STATE_ENTRY(IP, "%04X", ip, 0xffff, CPUSTATE_IMPORT | CPUSTATE_EXPORT) + + I86_STATE_ENTRY(FLAGS, "%04X", flags, 0xffff, CPUSTATE_NOSHOW | CPUSTATE_IMPORT | CPUSTATE_EXPORT) + + I86_STATE_ENTRY(AX, "%04X", regs.w[AX], 0xffff, 0) + I86_STATE_ENTRY(BX, "%04X", regs.w[BX], 0xffff, 0) + I86_STATE_ENTRY(CX, "%04X", regs.w[CX], 0xffff, 0) + I86_STATE_ENTRY(DX, "%04X", regs.w[DX], 0xffff, 0) + I86_STATE_ENTRY(SI, "%04X", regs.w[SI], 0xffff, 0) + I86_STATE_ENTRY(DI, "%04X", regs.w[DI], 0xffff, 0) + I86_STATE_ENTRY(BP, "%04X", regs.w[BP], 0xffff, 0) + I86_STATE_ENTRY(SP, "%04X", regs.w[SP], 0xffff, 0) + I86_STATE_ENTRY(GENSP, "%9s", sp, 0xfffff, CPUSTATE_IMPORT | CPUSTATE_EXPORT) + + I86_STATE_ENTRY(AL, "%02X", regs.b[AL], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(BL, "%02X", regs.b[BL], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(CL, "%02X", regs.b[CL], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(DL, "%02X", regs.b[DL], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(AH, "%02X", regs.b[AH], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(BH, "%02X", regs.b[BH], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(CH, "%02X", regs.b[CH], 0xff, CPUSTATE_NOSHOW) + I86_STATE_ENTRY(DH, "%02X", regs.b[DH], 0xff, CPUSTATE_NOSHOW) + + I86_STATE_ENTRY(CS, "%04X", sregs[CS], 0xffff, CPUSTATE_IMPORT) + I86_STATE_ENTRY(DS, "%04X", sregs[DS], 0xffff, CPUSTATE_IMPORT) + I86_STATE_ENTRY(ES, "%04X", sregs[ES], 0xffff, CPUSTATE_IMPORT) + I86_STATE_ENTRY(SS, "%04X", sregs[SS], 0xffff, CPUSTATE_IMPORT) +}; + +static const cpu_state_table state_table_template = +{ + NULL, /* pointer to the base of state (offsets are relative to this) */ + 0, /* subtype this table refers to */ + ARRAY_LENGTH(state_array), /* number of entries */ + state_array /* array of entries */ +}; + + #include "i86time.c" @@ -152,6 +205,11 @@ static CPU_INIT( i8086 ) cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); cpustate->io = memory_find_address_space(device, ADDRESS_SPACE_IO); + /* set up the state table */ + cpustate->state = state_table_template; + cpustate->state.baseptr = cpustate; + cpustate->state.subtypemask = 1; + i8086_state_register(device); configure_memory_16bit(cpustate); } @@ -170,12 +228,15 @@ static CPU_RESET( i8086 ) i8086_state *cpustate = device->token; cpu_irq_callback save_irqcallback; memory_interface save_mem; + cpu_state_table save_state; save_irqcallback = cpustate->irq_callback; save_mem = cpustate->mem; + save_state = cpustate->state; memset(cpustate, 0, sizeof(*cpustate)); cpustate->irq_callback = save_irqcallback; cpustate->mem = save_mem; + cpustate->state = save_state; cpustate->device = device; cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); cpustate->io = memory_find_address_space(device, ADDRESS_SPACE_IO); @@ -225,11 +286,6 @@ static CPU_EXECUTE( i8086 ) { i8086_state *cpustate = device->token; - cpustate->base[CS] = SegBase(CS); - cpustate->base[DS] = SegBase(DS); - cpustate->base[ES] = SegBase(ES); - cpustate->base[SS] = SegBase(SS); - /* copy over the cycle counts if they're not correct */ if (timing.id != 8086) timing = i8086_cycles; @@ -286,11 +342,6 @@ static CPU_EXECUTE( i80186 ) { i8086_state *cpustate = device->token; - cpustate->base[CS] = SegBase(CS); - cpustate->base[DS] = SegBase(DS); - cpustate->base[ES] = SegBase(ES); - cpustate->base[SS] = SegBase(SS); - /* copy over the cycle counts if they're not correct */ if (timing.id != 80186) timing = i80186_cycles; @@ -323,6 +374,110 @@ static CPU_EXECUTE( i80186 ) +/************************************************************************** + * STATE IMPORT/EXPORT + **************************************************************************/ + +static CPU_IMPORT_STATE( i8086 ) +{ + i8086_state *cpustate = device->token; + + switch (entry->index) + { + case I8086_GENPC: + if (cpustate->pc - cpustate->base[CS] >= 0x10000) + { + cpustate->base[CS] = cpustate->pc & 0xffff0; + cpustate->sregs[CS] = cpustate->base[CS] >> 4; + } + break; + + case I8086_IP: + cpustate->pc = cpustate->base[CS] + cpustate->ip; + break; + + case I8086_GENSP: + if (cpustate->sp - cpustate->base[SS] >= 0x10000) + { + cpustate->base[SS] = cpustate->sp & 0xffff0; + cpustate->sregs[SS] = cpustate->base[SS] >> 4; + } + cpustate->regs.w[SP] = cpustate->sp - cpustate->base[SS]; + break; + + case I8086_FLAGS: + ExpandFlags(cpustate->flags); + break; + + case I8086_ES: + cpustate->base[ES] = SegBase(ES); + break; + + case I8086_CS: + cpustate->base[CS] = SegBase(CS); + break; + + case I8086_SS: + cpustate->base[SS] = SegBase(SS); + break; + + case I8086_DS: + cpustate->base[DS] = SegBase(DS); + break; + + default: + fatalerror("CPU_IMPORT_STATE(i8086) called for unexpected value\n"); + break; + } +} + + +static CPU_EXPORT_STATE( i8086 ) +{ + i8086_state *cpustate = device->token; + + switch (entry->index) + { + case I8086_IP: + cpustate->ip = cpustate->pc - cpustate->base[CS]; + break; + + case I8086_FLAGS: + cpustate->flags = CompressFlags(); + break; + + case I8086_GENSP: + cpustate->sp = cpustate->base[SS] + cpustate->regs.w[SP]; + break; + + default: + fatalerror("CPU_EXPORT_STATE(i8086) called for unexpected value\n"); + break; + } +} + + +static CPU_EXPORT_STRING( i8086 ) +{ + i8086_state *cpustate = device->token; + + switch (entry->index) + { + case I8086_GENPC: + sprintf(string, "%04X:%04X", cpustate->sregs[CS] & 0xffff, (cpustate->pc - cpustate->base[CS]) & 0xffff); + break; + + case I8086_GENSP: + sprintf(string, "%04X:%04X", cpustate->sregs[SS] & 0xffff, cpustate->regs.w[SP] & 0xffff); + break; + + default: + fatalerror("CPU_EXPORT_STRING(i8086) called for unexpected value\n"); + break; + } +} + + /************************************************************************** * Generic set_info **************************************************************************/ @@ -337,43 +492,6 @@ static CPU_SET_INFO( i8086 ) case CPUINFO_INT_INPUT_STATE + 0: set_irq_line(cpustate, 0, info->i); break; case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: set_irq_line(cpustate, INPUT_LINE_NMI, info->i); break; case CPUINFO_INT_INPUT_STATE + INPUT_LINE_TEST: set_test_line(cpustate, info->i); break; /* PJB 03/05 */ - - case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + I8086_PC: - if (info->i - cpustate->base[CS] >= 0x10000) - { - cpustate->base[CS] = info->i & 0xffff0; - cpustate->sregs[CS] = cpustate->base[CS] >> 4; - } - cpustate->pc = info->i; - break; - case CPUINFO_INT_REGISTER + I8086_IP: cpustate->pc = cpustate->base[CS] + info->i; break; - case CPUINFO_INT_SP: - if (info->i - cpustate->base[SS] < 0x10000) - { - cpustate->regs.w[SP] = info->i - cpustate->base[SS]; - } - else - { - cpustate->base[SS] = info->i & 0xffff0; - cpustate->sregs[SS] = cpustate->base[SS] >> 4; - cpustate->regs.w[SP] = info->i & 0x0000f; - } - break; - case CPUINFO_INT_REGISTER + I8086_SP: cpustate->regs.w[SP] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_FLAGS: cpustate->flags = info->i; ExpandFlags(info->i); break; - case CPUINFO_INT_REGISTER + I8086_AX: cpustate->regs.w[AX] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_CX: cpustate->regs.w[CX] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_DX: cpustate->regs.w[DX] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_BX: cpustate->regs.w[BX] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_BP: cpustate->regs.w[BP] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_SI: cpustate->regs.w[SI] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_DI: cpustate->regs.w[DI] = info->i; break; - case CPUINFO_INT_REGISTER + I8086_ES: cpustate->sregs[ES] = info->i; cpustate->base[ES] = SegBase(ES); break; - case CPUINFO_INT_REGISTER + I8086_CS: cpustate->sregs[CS] = info->i; cpustate->base[CS] = SegBase(CS); break; - case CPUINFO_INT_REGISTER + I8086_SS: cpustate->sregs[SS] = info->i; cpustate->base[SS] = SegBase(SS); break; - case CPUINFO_INT_REGISTER + I8086_DS: cpustate->sregs[DS] = info->i; cpustate->base[DS] = SegBase(DS); break; - case CPUINFO_INT_REGISTER + I8086_VECTOR: cpustate->int_vector = info->i; break; } } @@ -418,34 +536,19 @@ CPU_GET_INFO( i8086 ) case CPUINFO_INT_PREVIOUSPC: info->i = cpustate->prevpc; break; - case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + I8086_PC: info->i = cpustate->pc; break; - case CPUINFO_INT_REGISTER + I8086_IP: info->i = cpustate->pc - cpustate->base[CS]; break; - case CPUINFO_INT_SP: info->i = cpustate->base[SS] + cpustate->regs.w[SP]; break; - case CPUINFO_INT_REGISTER + I8086_SP: info->i = cpustate->regs.w[SP]; break; - case CPUINFO_INT_REGISTER + I8086_FLAGS: cpustate->flags = CompressFlags(); info->i = cpustate->flags; break; - case CPUINFO_INT_REGISTER + I8086_AX: info->i = cpustate->regs.w[AX]; break; - case CPUINFO_INT_REGISTER + I8086_CX: info->i = cpustate->regs.w[CX]; break; - case CPUINFO_INT_REGISTER + I8086_DX: info->i = cpustate->regs.w[DX]; break; - case CPUINFO_INT_REGISTER + I8086_BX: info->i = cpustate->regs.w[BX]; break; - case CPUINFO_INT_REGISTER + I8086_BP: info->i = cpustate->regs.w[BP]; break; - case CPUINFO_INT_REGISTER + I8086_SI: info->i = cpustate->regs.w[SI]; break; - case CPUINFO_INT_REGISTER + I8086_DI: info->i = cpustate->regs.w[DI]; break; - case CPUINFO_INT_REGISTER + I8086_ES: info->i = cpustate->sregs[ES]; break; - case CPUINFO_INT_REGISTER + I8086_CS: info->i = cpustate->sregs[CS]; break; - case CPUINFO_INT_REGISTER + I8086_SS: info->i = cpustate->sregs[SS]; break; - case CPUINFO_INT_REGISTER + I8086_DS: info->i = cpustate->sregs[DS]; break; - case CPUINFO_INT_REGISTER + I8086_VECTOR: info->i = cpustate->int_vector; break; - /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(i8086); break; - case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(i8086); break; + case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(i8086); break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(i8086); break; - case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(i8086); break; + case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(i8086); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(i8086); break; - case CPUINFO_PTR_BURN: info->burn = NULL; break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(i8086); break; - case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break; + case CPUINFO_PTR_BURN: info->burn = NULL; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(i8086); break; + case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cpustate->icount; break; + case CPUINFO_PTR_STATE_TABLE: info->state_table = &cpustate->state; break; + case CPUINFO_FCT_IMPORT_STATE: info->import_state = CPU_IMPORT_STATE_NAME(i8086); break; + case CPUINFO_FCT_EXPORT_STATE: info->export_state = CPU_EXPORT_STATE_NAME(i8086); break; + case CPUINFO_FCT_EXPORT_STRING: info->export_string = CPU_EXPORT_STRING_NAME(i8086);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "8086"); break; @@ -474,23 +577,6 @@ CPU_GET_INFO( i8086 ) cpustate->flags & 0x0002 ? 'N' : '.', cpustate->flags & 0x0001 ? 'C' : '.'); break; - - case CPUINFO_STR_REGISTER + I8086_PC: sprintf(info->s, "PC:%04X", cpustate->pc); break; - case CPUINFO_STR_REGISTER + I8086_IP: sprintf(info->s, "IP: %04X", cpustate->pc - cpustate->base[CS]); break; - case CPUINFO_STR_REGISTER + I8086_SP: sprintf(info->s, "SP: %04X", cpustate->regs.w[SP]); break; - case CPUINFO_STR_REGISTER + I8086_FLAGS: sprintf(info->s, "F:%04X", cpustate->flags); break; - case CPUINFO_STR_REGISTER + I8086_AX: sprintf(info->s, "AX:%04X", cpustate->regs.w[AX]); break; - case CPUINFO_STR_REGISTER + I8086_CX: sprintf(info->s, "CX:%04X", cpustate->regs.w[CX]); break; - case CPUINFO_STR_REGISTER + I8086_DX: sprintf(info->s, "DX:%04X", cpustate->regs.w[DX]); break; - case CPUINFO_STR_REGISTER + I8086_BX: sprintf(info->s, "BX:%04X", cpustate->regs.w[BX]); break; - case CPUINFO_STR_REGISTER + I8086_BP: sprintf(info->s, "BP:%04X", cpustate->regs.w[BP]); break; - case CPUINFO_STR_REGISTER + I8086_SI: sprintf(info->s, "SI: %04X", cpustate->regs.w[SI]); break; - case CPUINFO_STR_REGISTER + I8086_DI: sprintf(info->s, "DI: %04X", cpustate->regs.w[DI]); break; - case CPUINFO_STR_REGISTER + I8086_ES: sprintf(info->s, "ES:%04X", cpustate->sregs[ES]); break; - case CPUINFO_STR_REGISTER + I8086_CS: sprintf(info->s, "CS:%04X", cpustate->sregs[CS]); break; - case CPUINFO_STR_REGISTER + I8086_SS: sprintf(info->s, "SS:%04X", cpustate->sregs[SS]); break; - case CPUINFO_STR_REGISTER + I8086_DS: sprintf(info->s, "DS:%04X", cpustate->sregs[DS]); break; - case CPUINFO_STR_REGISTER + I8086_VECTOR: sprintf(info->s, "V:%02X", cpustate->int_vector); break; } } diff --git a/src/emu/cpu/i86/i86.h b/src/emu/cpu/i86/i86.h index 5f38c87521b..be66b5da320 100644 --- a/src/emu/cpu/i86/i86.h +++ b/src/emu/cpu/i86/i86.h @@ -1,44 +1,55 @@ -/* ASG 971222 -- rewrote this interface */ -#pragma once - -#ifndef __I86INTF_H__ -#define __I86INTF_H__ - -#include "cpuintrf.h" - -#define INPUT_LINE_TEST 20 /* PJB 03/05 */ - -enum -{ - I8086_PC=0, - I8086_IP, - I8086_AX, - I8086_CX, - I8086_DX, - I8086_BX, - I8086_SP, - I8086_BP, - I8086_SI, - I8086_DI, - I8086_FLAGS, - I8086_ES, - I8086_CS, - I8086_SS, - I8086_DS, - I8086_VECTOR -}; - -/* Public functions */ -CPU_GET_INFO( i8086 ); -#define CPU_I8086 CPU_GET_INFO_NAME( i8086 ) - -CPU_GET_INFO( i8088 ); -#define CPU_I8088 CPU_GET_INFO_NAME( i8088 ) - -CPU_GET_INFO( i80186 ); -#define CPU_I80186 CPU_GET_INFO_NAME( i80186 ) - -CPU_GET_INFO( i80188 ); -#define CPU_I80188 CPU_GET_INFO_NAME( i80188 ) - -#endif /* __I86INTF_H__ */ +/* ASG 971222 -- rewrote this interface */ +#pragma once + +#ifndef __I86INTF_H__ +#define __I86INTF_H__ + +#include "cpuintrf.h" + +#define INPUT_LINE_TEST 20 /* PJB 03/05 */ + +enum +{ + I8086_IP, + I8086_AX, + I8086_CX, + I8086_DX, + I8086_BX, + I8086_SP, + I8086_BP, + I8086_SI, + I8086_DI, + I8086_AL, + I8086_CL, + I8086_DL, + I8086_BL, + I8086_AH, + I8086_CH, + I8086_DH, + I8086_BH, + I8086_FLAGS, + I8086_ES, + I8086_CS, + I8086_SS, + I8086_DS, + I8086_VECTOR, + + I8086_GENPC = REG_GENPC, + I8086_GENSP = REG_GENSP, + I8086_GENPCBASE = REG_GENPCBASE +}; + +/* Public functions */ +CPU_GET_INFO( i8086 ); +#define CPU_I8086 CPU_GET_INFO_NAME( i8086 ) + +CPU_GET_INFO( i8088 ); +#define CPU_I8088 CPU_GET_INFO_NAME( i8088 ) + +CPU_GET_INFO( i80186 ); +#define CPU_I80186 CPU_GET_INFO_NAME( i80186 ) + +CPU_GET_INFO( i80188 ); +#define CPU_I80188 CPU_GET_INFO_NAME( i80188 ) + +#endif /* __I86INTF_H__ */ diff --git a/src/emu/cpu/m37710/m37710op.h b/src/emu/cpu/m37710/m37710op.h index 8dd36694f86..5e84c6ceba6 100644 --- a/src/emu/cpu/m37710/m37710op.h +++ b/src/emu/cpu/m37710/m37710op.h @@ -2903,7 +2903,7 @@ TABLE_FUNCTION(uint, get_reg, (m37710i_cpu_struct *cpustate, int regnum)) case M37710_D: return REG_D; case M37710_P: return m37710i_get_reg_p(cpustate); case M37710_IRQ_STATE: return LINE_IRQ; - case REG_PREVIOUSPC: return REG_PPC; + case REG_GENPCBASE: return REG_PPC; } return 0; } diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index 74a5615fca2..3d5c65d1021 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -214,9 +214,9 @@ static unsigned minx_get_reg( int regnum ) { switch( regnum ) { - case REG_PC: return GET_MINX_PC; + case REG_GENPC: return GET_MINX_PC; case MINX_PC: return regs.PC; - case REG_SP: + case REG_GENSP: case MINX_SP: return regs.SP; case MINX_BA: return regs.BA; case MINX_HL: return regs.HL; @@ -239,9 +239,9 @@ static void minx_set_reg( int regnum, unsigned val ) { switch( regnum ) { - case REG_PC: break; + case REG_GENPC: break; case MINX_PC: regs.PC = val; break; - case REG_SP: + case REG_GENSP: case MINX_SP: regs.SP = val; break; case MINX_BA: regs.BA = val; break; case MINX_HL: regs.HL = val; break; @@ -322,8 +322,8 @@ CPU_GET_INFO( minx ) case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; case CPUINFO_INT_INPUT_STATE + 0: info->i = 0; break; - case CPUINFO_INT_REGISTER + REG_PC: info->i = GET_MINX_PC; break; - case CPUINFO_INT_REGISTER + REG_SP: + case CPUINFO_INT_REGISTER + REG_GENPC: info->i = GET_MINX_PC; break; + case CPUINFO_INT_REGISTER + REG_GENSP: case CPUINFO_INT_REGISTER + MINX_PC: case CPUINFO_INT_REGISTER + MINX_SP: case CPUINFO_INT_REGISTER + MINX_BA: diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index a737af4f20f..505309fed8a 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -271,9 +271,9 @@ unsigned sm8500_get_reg( sm8500_state *cpustate, int regnum ) { switch( regnum ) { - case REG_PC: + case REG_GENPC: case SM8500_PC: return cpustate->PC; - case REG_SP: + case REG_GENSP: case SM8500_SP: return ( cpustate->SYS & 0x40 ) ? cpustate->SP : cpustate->SP & 0xFF ; case SM8500_PS: return ( cpustate->PS0 << 8 ) | cpustate->PS1; case SM8500_SYS16: return cpustate->SYS; @@ -311,9 +311,9 @@ static void sm8500_set_reg( sm8500_state *cpustate, int regnum, unsigned val ) { switch( regnum ) { - case REG_PC: + case REG_GENPC: case SM8500_PC: cpustate->PC = val; break; - case REG_SP: + case REG_GENSP: case SM8500_SP: cpustate->SP = val; break; case SM8500_PS: sm8500_set_reg( cpustate, SM8500_PS0, ( val >> 8 ) & 0xFF ); sm8500_set_reg( cpustate, SM8500_PS1, val & 0xFF ); break; case SM8500_SYS16: cpustate->SYS = val; break; @@ -497,8 +497,8 @@ CPU_GET_INFO( sm8500 ) case CPUINFO_INT_REGISTER + SM8500_P2C: case CPUINFO_INT_REGISTER + SM8500_P3C: info->i = sm8500_get_reg( cpustate, state - CPUINFO_INT_REGISTER ); break; - case CPUINFO_INT_REGISTER + REG_PC: info->i = sm8500_get_reg( cpustate, SM8500_PC ); break; - case CPUINFO_INT_REGISTER + REG_SP: info->i = sm8500_get_reg( cpustate, SM8500_SP ); break; + case CPUINFO_INT_REGISTER + REG_GENPC: info->i = sm8500_get_reg( cpustate, SM8500_PC ); break; + case CPUINFO_INT_REGISTER + REG_GENSP: info->i = sm8500_get_reg( cpustate, SM8500_SP ); break; case CPUINFO_INT_PREVIOUSPC: info->i = 0x0000; break; diff --git a/src/emu/cpu/tms34010/34010ops.c b/src/emu/cpu/tms34010/34010ops.c index e1b68b206fb..6c84915ddee 100644 --- a/src/emu/cpu/tms34010/34010ops.c +++ b/src/emu/cpu/tms34010/34010ops.c @@ -88,7 +88,7 @@ static void unimpl(tms34010_state *tms, UINT16 op) return; PUSH(tms, tms->pc); - PUSH(tms, GET_ST(tms)); + PUSH(tms, tms->st); RESET_ST(tms); tms->pc = RLONG(tms, 0xfffffc20); COUNT_UNKNOWN_CYCLES(tms,16); @@ -1562,7 +1562,7 @@ static void getpc_b (tms34010_state *tms, UINT16 op) { GETPC(B); } #define GETST(R) \ { \ - R##REG(tms,DSTREG(op)) = GET_ST(tms); \ + R##REG(tms,DSTREG(op)) = tms->st; \ COUNT_CYCLES(tms,1); \ } static void getst_a (tms34010_state *tms, UINT16 op) { GETST(A); } @@ -1844,7 +1844,7 @@ static void popst(tms34010_state *tms, UINT16 op) static void pushst(tms34010_state *tms, UINT16 op) { - PUSH(tms, GET_ST(tms)); + PUSH(tms, tms->st); COUNT_CYCLES(tms,2); } @@ -1892,7 +1892,7 @@ static void trap(tms34010_state *tms, UINT16 op) if (t) { PUSH(tms, tms->pc); - PUSH(tms, GET_ST(tms)); + PUSH(tms, tms->st); } RESET_ST(tms); tms->pc = RLONG(tms, 0xffffffe0-(t<<5)); diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index 610a94cd3c6..1fa5378092a 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -45,6 +45,7 @@ typedef struct _tms34010_state tms34010_state; struct _tms34010_state { UINT32 pc; + UINT32 ppc; UINT32 st; void (*pixel_write)(tms34010_state *tms, offs_t offset, UINT32 data); UINT32 (*pixel_read)(tms34010_state *tms, offs_t offset); @@ -76,13 +77,15 @@ struct _tms34010_state XY xy; } regs[31]; - /* for the 34010, we only copy 32 of these into the new state */ UINT16 IOregs[64]; + + cpu_state_table state; }; #include "34010ops.h" + /*************************************************************************** GLOBAL VARIABLES ***************************************************************************/ @@ -98,6 +101,7 @@ static TIMER_CALLBACK( scanline_callback ); static STATE_POSTLOAD( tms34010_state_postload ); + /*************************************************************************** MACROS ***************************************************************************/ @@ -188,14 +192,68 @@ static STATE_POSTLOAD( tms34010_state_postload ); /*************************************************************************** - INLINE SHORTCUTS + CPU STATE DESCRIPTION ***************************************************************************/ -/* Combine indiviual flags into the Status Register */ -INLINE UINT32 GET_ST(tms34010_state *tms) +#define TMS340X0_STATE_ENTRY(_name, _format, _member, _datamask, _flags) \ + CPU_STATE_ENTRY(TMS34010_##_name, #_name, _format, tms34010_state, _member, _datamask, ~0, _flags) + +static const cpu_state_entry state_array[] = { - return tms->st; -} + TMS340X0_STATE_ENTRY(PC, "%08X", pc, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(GENPC, "%08X", pc, 0xffffffff, CPUSTATE_NOSHOW) + TMS340X0_STATE_ENTRY(GENPCBASE, "%08X", ppc, 0xffffffff, CPUSTATE_NOSHOW) + + TMS340X0_STATE_ENTRY(SP, "%08X", regs[15].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(GENSP, "%08X", regs[15].reg, 0xffffffff, CPUSTATE_NOSHOW) + + TMS340X0_STATE_ENTRY(ST, "%08X", st, 0xffffffff, 0) + + TMS340X0_STATE_ENTRY(A0, "%08X", regs[0].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A1, "%08X", regs[1].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A2, "%08X", regs[2].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A3, "%08X", regs[3].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A4, "%08X", regs[4].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A5, "%08X", regs[5].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A6, "%08X", regs[6].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A7, "%08X", regs[7].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A8, "%08X", regs[8].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A9, "%08X", regs[9].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A10, "%08X", regs[10].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A11, "%08X", regs[11].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A12, "%08X", regs[12].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A13, "%08X", regs[13].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(A14, "%08X", regs[14].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B0, "%08X", regs[30-0].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B1, "%08X", regs[30-1].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B2, "%08X", regs[30-2].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B3, "%08X", regs[30-3].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B4, "%08X", regs[30-4].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B5, "%08X", regs[30-5].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B6, "%08X", regs[30-6].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B7, "%08X", regs[30-7].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B8, "%08X", regs[30-8].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B9, "%08X", regs[30-9].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B10, "%08X", regs[30-10].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B11, "%08X", regs[30-11].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B12, "%08X", regs[30-12].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B13, "%08X", regs[30-13].reg, 0xffffffff, 0) + TMS340X0_STATE_ENTRY(B14, "%08X", regs[30-14].reg, 0xffffffff, 0) +}; + +static const cpu_state_table state_table_template = +{ + NULL, /* pointer to the base of state (offsets are relative to this) */ + 0, /* subtype this table refers to */ + ARRAY_LENGTH(state_array), /* number of entries */ + state_array /* array of entries */ +}; + + + +/*************************************************************************** + INLINE SHORTCUTS +***************************************************************************/ /* Break up Status Register into indiviual flags */ INLINE void SET_ST(tms34010_state *tms, UINT32 st) @@ -326,7 +384,7 @@ static UINT32 read_pixel_shiftreg(tms34010_state *tms, offs_t offset) ***************************************************************************/ /* No Raster Op + No Transparency */ -#define WP(T,m1,m2) \ +#define WP(T,m1,m2) \ UINT32 a = TOBYTE(offset & 0xfffffff0); \ UINT32 pix = TMS34010_RDMEM_WORD(T,a); \ UINT32 shiftcount = offset & m1; \ @@ -363,7 +421,7 @@ static UINT32 read_pixel_shiftreg(tms34010_state *tms, offs_t offset) TMS34010_WRMEM_WORD(T, a, pix); \ /* Raster Op + Transparency */ -#define WP_R_T(T,m1,m2) \ +#define WP_R_T(T,m1,m2) \ UINT32 a = TOBYTE(offset & 0xfffffff0); \ UINT32 pix = TMS34010_RDMEM_WORD(T,a); \ UINT32 shiftcount = offset & m1; \ @@ -540,7 +598,7 @@ static void check_interrupt(tms34010_state *tms) if (!(IOREG(tms, REG_HSTCTLH) & 0x0200)) { PUSH(tms, tms->pc); - PUSH(tms, GET_ST(tms)); + PUSH(tms, tms->st); } /* leap to the vector */ @@ -596,7 +654,7 @@ static void check_interrupt(tms34010_state *tms) if (vector) { PUSH(tms, tms->pc); - PUSH(tms, GET_ST(tms)); + PUSH(tms, tms->st); RESET_ST(tms); tms->pc = RLONG(tms, vector); COUNT_CYCLES(tms,16); @@ -624,7 +682,12 @@ static CPU_INIT( tms34010 ) tms->irq_callback = irqcallback; tms->device = device; tms->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); - tms->screen = device_list_find_by_tag(device->machine->config->devicelist, VIDEO_SCREEN, configdata->screen_tag); + tms->screen = devtag_get_device(device->machine, VIDEO_SCREEN, configdata->screen_tag); + + /* set up the state table */ + tms->state = state_table_template; + tms->state.baseptr = tms; + tms->state.subtypemask = 1; /* allocate a scanline timer and set it to go off at the start */ tms->scantimer = timer_alloc(device->machine, scanline_callback, tms); @@ -656,6 +719,7 @@ static CPU_RESET( tms34010 ) UINT16 *shiftreg = tms->shiftreg; cpu_irq_callback save_irqcallback = tms->irq_callback; emu_timer *save_scantimer = tms->scantimer; + cpu_state_table savetable = tms->state; memset(tms, 0, sizeof(*tms)); @@ -666,6 +730,7 @@ static CPU_RESET( tms34010 ) tms->scantimer = save_scantimer; tms->device = device; tms->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); + tms->state = savetable; /* fetch the initial PC and reset the state */ tms->pc = RLONG(tms, 0xffffffe0) & 0xfffffff0; @@ -777,7 +842,9 @@ static CPU_EXECUTE( tms34010 ) { do { - UINT16 op = ROPCODE(tms); + UINT16 op; + tms->ppc = tms->pc; + op = ROPCODE(tms); (*opcode_table[op >> 4])(tms, op); } while (tms->icount > 0); } @@ -786,11 +853,8 @@ static CPU_EXECUTE( tms34010 ) do { UINT16 op; - if ((tms->device->machine->debug_flags & DEBUG_FLAG_CALL_HOOK) != 0) - { - tms->st = GET_ST(tms); - debugger_instruction_hook(tms->device, tms->pc); - } + debugger_instruction_hook(tms->device, tms->pc); + tms->ppc = tms->pc; op = ROPCODE(tms); (*opcode_table[op >> 4])(tms, op); } while (tms->icount > 0); @@ -1657,42 +1721,6 @@ static CPU_SET_INFO( tms34010 ) /* --- the following bits of info are set as 64-bit signed integers --- */ case CPUINFO_INT_INPUT_STATE + 0: set_irq_line(tms, 0, info->i); break; case CPUINFO_INT_INPUT_STATE + 1: set_irq_line(tms, 1, info->i); break; - - case CPUINFO_INT_PC: tms->pc = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_PC: tms->pc = info->i; break; - case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + TMS34010_SP: SP(tms) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_ST: tms->st = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A0: AREG(tms, 0) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A1: AREG(tms, 1) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A2: AREG(tms, 2) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A3: AREG(tms, 3) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A4: AREG(tms, 4) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A5: AREG(tms, 5) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A6: AREG(tms, 6) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A7: AREG(tms, 7) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A8: AREG(tms, 8) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A9: AREG(tms, 9) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A10: AREG(tms, 10) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A11: AREG(tms, 11) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A12: AREG(tms, 12) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A13: AREG(tms, 13) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_A14: AREG(tms, 14) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B0: BREG(tms, 0) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B1: BREG(tms, 1) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B2: BREG(tms, 2) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B3: BREG(tms, 3) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B4: BREG(tms, 4) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B5: BREG(tms, 5) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B6: BREG(tms, 6) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B7: BREG(tms, 7) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B8: BREG(tms, 8) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B9: BREG(tms, 9) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B10: BREG(tms, 10) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B11: BREG(tms, 11) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B12: BREG(tms, 12) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B13: BREG(tms, 13) = info->i; break; - case CPUINFO_INT_REGISTER + TMS34010_B14: BREG(tms, 14) = info->i; break; } } @@ -1733,44 +1761,6 @@ CPU_GET_INFO( tms34010 ) case CPUINFO_INT_INPUT_STATE + 0: info->i = (IOREG(tms, REG_INTPEND) & TMS34010_INT1) ? ASSERT_LINE : CLEAR_LINE; break; case CPUINFO_INT_INPUT_STATE + 1: info->i = (IOREG(tms, REG_INTPEND) & TMS34010_INT2) ? ASSERT_LINE : CLEAR_LINE; break; - case CPUINFO_INT_PREVIOUSPC: /* not implemented */ break; - - case CPUINFO_INT_PC: - case CPUINFO_INT_REGISTER + TMS34010_PC: info->i = tms->pc; break; - case CPUINFO_INT_SP: - case CPUINFO_INT_REGISTER + TMS34010_SP: info->i = SP(tms); break; - case CPUINFO_INT_REGISTER + TMS34010_ST: info->i = tms->st; break; - case CPUINFO_INT_REGISTER + TMS34010_A0: info->i = AREG(tms, 0); break; - case CPUINFO_INT_REGISTER + TMS34010_A1: info->i = AREG(tms, 1); break; - case CPUINFO_INT_REGISTER + TMS34010_A2: info->i = AREG(tms, 2); break; - case CPUINFO_INT_REGISTER + TMS34010_A3: info->i = AREG(tms, 3); break; - case CPUINFO_INT_REGISTER + TMS34010_A4: info->i = AREG(tms, 4); break; - case CPUINFO_INT_REGISTER + TMS34010_A5: info->i = AREG(tms, 5); break; - case CPUINFO_INT_REGISTER + TMS34010_A6: info->i = AREG(tms, 6); break; - case CPUINFO_INT_REGISTER + TMS34010_A7: info->i = AREG(tms, 7); break; - case CPUINFO_INT_REGISTER + TMS34010_A8: info->i = AREG(tms, 8); break; - case CPUINFO_INT_REGISTER + TMS34010_A9: info->i = AREG(tms, 9); break; - case CPUINFO_INT_REGISTER + TMS34010_A10: info->i = AREG(tms, 10); break; - case CPUINFO_INT_REGISTER + TMS34010_A11: info->i = AREG(tms, 11); break; - case CPUINFO_INT_REGISTER + TMS34010_A12: info->i = AREG(tms, 12); break; - case CPUINFO_INT_REGISTER + TMS34010_A13: info->i = AREG(tms, 13); break; - case CPUINFO_INT_REGISTER + TMS34010_A14: info->i = AREG(tms, 14); break; - case CPUINFO_INT_REGISTER + TMS34010_B0: info->i = BREG(tms, 0); break; - case CPUINFO_INT_REGISTER + TMS34010_B1: info->i = BREG(tms, 1); break; - case CPUINFO_INT_REGISTER + TMS34010_B2: info->i = BREG(tms, 2); break; - case CPUINFO_INT_REGISTER + TMS34010_B3: info->i = BREG(tms, 3); break; - case CPUINFO_INT_REGISTER + TMS34010_B4: info->i = BREG(tms, 4); break; - case CPUINFO_INT_REGISTER + TMS34010_B5: info->i = BREG(tms, 5); break; - case CPUINFO_INT_REGISTER + TMS34010_B6: info->i = BREG(tms, 6); break; - case CPUINFO_INT_REGISTER + TMS34010_B7: info->i = BREG(tms, 7); break; - case CPUINFO_INT_REGISTER + TMS34010_B8: info->i = BREG(tms, 8); break; - case CPUINFO_INT_REGISTER + TMS34010_B9: info->i = BREG(tms, 9); break; - case CPUINFO_INT_REGISTER + TMS34010_B10: info->i = BREG(tms, 10); break; - case CPUINFO_INT_REGISTER + TMS34010_B11: info->i = BREG(tms, 11); break; - case CPUINFO_INT_REGISTER + TMS34010_B12: info->i = BREG(tms, 12); break; - case CPUINFO_INT_REGISTER + TMS34010_B13: info->i = BREG(tms, 13); break; - case CPUINFO_INT_REGISTER + TMS34010_B14: info->i = BREG(tms, 14); break; - /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(tms34010); break; case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(tms34010); break; @@ -1779,7 +1769,8 @@ CPU_GET_INFO( tms34010 ) case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(tms34010); break; case CPUINFO_PTR_BURN: info->burn = NULL; break; case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(tms34010); break; - case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms->icount; break; + case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms->icount; break; + case CPUINFO_PTR_STATE_TABLE: info->state_table = &tms->state; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "TMS34010"); break; @@ -1809,40 +1800,6 @@ CPU_GET_INFO( tms34010 ) tms->st & 0x00000002 ? 'F':'.', tms->st & 0x00000001 ? 'F':'.'); break; - - case CPUINFO_STR_REGISTER + TMS34010_PC: sprintf(info->s, "PC :%08X", tms->pc); break; - case CPUINFO_STR_REGISTER + TMS34010_SP: sprintf(info->s, "SP :%08X", AREG(tms, 15)); break; - case CPUINFO_STR_REGISTER + TMS34010_ST: sprintf(info->s, "ST :%08X", tms->st); break; - case CPUINFO_STR_REGISTER + TMS34010_A0: sprintf(info->s, "A0 :%08X", AREG(tms, 0)); break; - case CPUINFO_STR_REGISTER + TMS34010_A1: sprintf(info->s, "A1 :%08X", AREG(tms, 1)); break; - case CPUINFO_STR_REGISTER + TMS34010_A2: sprintf(info->s, "A2 :%08X", AREG(tms, 2)); break; - case CPUINFO_STR_REGISTER + TMS34010_A3: sprintf(info->s, "A3 :%08X", AREG(tms, 3)); break; - case CPUINFO_STR_REGISTER + TMS34010_A4: sprintf(info->s, "A4 :%08X", AREG(tms, 4)); break; - case CPUINFO_STR_REGISTER + TMS34010_A5: sprintf(info->s, "A5 :%08X", AREG(tms, 5)); break; - case CPUINFO_STR_REGISTER + TMS34010_A6: sprintf(info->s, "A6 :%08X", AREG(tms, 6)); break; - case CPUINFO_STR_REGISTER + TMS34010_A7: sprintf(info->s, "A7 :%08X", AREG(tms, 7)); break; - case CPUINFO_STR_REGISTER + TMS34010_A8: sprintf(info->s, "A8 :%08X", AREG(tms, 8)); break; - case CPUINFO_STR_REGISTER + TMS34010_A9: sprintf(info->s, "A9 :%08X", AREG(tms, 9)); break; - case CPUINFO_STR_REGISTER + TMS34010_A10: sprintf(info->s,"A10:%08X", AREG(tms, 10)); break; - case CPUINFO_STR_REGISTER + TMS34010_A11: sprintf(info->s,"A11:%08X", AREG(tms, 11)); break; - case CPUINFO_STR_REGISTER + TMS34010_A12: sprintf(info->s,"A12:%08X", AREG(tms, 12)); break; - case CPUINFO_STR_REGISTER + TMS34010_A13: sprintf(info->s,"A13:%08X", AREG(tms, 13)); break; - case CPUINFO_STR_REGISTER + TMS34010_A14: sprintf(info->s,"A14:%08X", AREG(tms, 14)); break; - case CPUINFO_STR_REGISTER + TMS34010_B0: sprintf(info->s, "B0 :%08X", BREG(tms, 0)); break; - case CPUINFO_STR_REGISTER + TMS34010_B1: sprintf(info->s, "B1 :%08X", BREG(tms, 1)); break; - case CPUINFO_STR_REGISTER + TMS34010_B2: sprintf(info->s, "B2 :%08X", BREG(tms, 2)); break; - case CPUINFO_STR_REGISTER + TMS34010_B3: sprintf(info->s, "B3 :%08X", BREG(tms, 3)); break; - case CPUINFO_STR_REGISTER + TMS34010_B4: sprintf(info->s, "B4 :%08X", BREG(tms, 4)); break; - case CPUINFO_STR_REGISTER + TMS34010_B5: sprintf(info->s, "B5 :%08X", BREG(tms, 5)); break; - case CPUINFO_STR_REGISTER + TMS34010_B6: sprintf(info->s, "B6 :%08X", BREG(tms, 6)); break; - case CPUINFO_STR_REGISTER + TMS34010_B7: sprintf(info->s, "B7 :%08X", BREG(tms, 7)); break; - case CPUINFO_STR_REGISTER + TMS34010_B8: sprintf(info->s, "B8 :%08X", BREG(tms, 8)); break; - case CPUINFO_STR_REGISTER + TMS34010_B9: sprintf(info->s, "B9 :%08X", BREG(tms, 9)); break; - case CPUINFO_STR_REGISTER + TMS34010_B10: sprintf(info->s,"B10:%08X", BREG(tms, 10)); break; - case CPUINFO_STR_REGISTER + TMS34010_B11: sprintf(info->s,"B11:%08X", BREG(tms, 11)); break; - case CPUINFO_STR_REGISTER + TMS34010_B12: sprintf(info->s,"B12:%08X", BREG(tms, 12)); break; - case CPUINFO_STR_REGISTER + TMS34010_B13: sprintf(info->s,"B13:%08X", BREG(tms, 13)); break; - case CPUINFO_STR_REGISTER + TMS34010_B14: sprintf(info->s,"B14:%08X", BREG(tms, 14)); break; } } @@ -1856,8 +1813,6 @@ CPU_GET_INFO( tms34020 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(tms34010_state); break; - case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; case CPUINFO_INT_CLOCK_DIVIDER: info->i = 4; break; /* --- the following bits of info are returned as pointers to data or functions --- */ diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 34ce3ad7e25..7a3499aed90 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -19,7 +19,7 @@ /* register indexes for get_reg and set_reg */ enum { - TMS34010_PC = 1, + TMS34010_PC, TMS34010_SP, TMS34010_ST, TMS34010_A0, @@ -51,7 +51,11 @@ enum TMS34010_B11, TMS34010_B12, TMS34010_B13, - TMS34010_B14 + TMS34010_B14, + + TMS34010_GENPC = REG_GENPC, + TMS34010_GENSP = REG_GENSP, + TMS34010_GENPCBASE = REG_GENPCBASE }; diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 097499eebe5..75c9281319f 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -88,6 +88,10 @@ struct _cpu_class_data UINT32 cycles_per_second; /* cycles per second, adjusted for multipliers */ attoseconds_t attoseconds_per_cycle; /* attoseconds per adjusted clock cycle */ + /* internal state reflection */ + const cpu_state_table *state; /* pointer to the base table */ + const cpu_state_entry *regstate[MAX_REGS];/* pointer to the state entry for each register */ + /* these below are hacks to support multiple interrupts per frame */ INT32 iloops; /* number of interrupts remaining this frame */ emu_timer * partial_frame_timer; /* the timer that triggers partial frame interrupts */ @@ -118,7 +122,12 @@ static TIMER_CALLBACK( triggertime_callback ); static TIMER_CALLBACK( empty_event_queue ); static IRQ_CALLBACK( standard_irq_callback ); static void register_save_states(const device_config *device); - +static UINT64 get_register_value(const device_config *device, void *baseptr, const cpu_state_entry *entry); +static void set_register_value(const device_config *device, void *baseptr, const cpu_state_entry *entry, UINT64 value); +static void get_register_string_value(const device_config *device, void *baseptr, const cpu_state_entry *entry, char *dest); +#ifdef UNUSED_FUNCTION +static int get_register_string_max_width(const device_config *device, void *baseptr, const cpu_state_entry *entry); +#endif /*************************************************************************** @@ -430,6 +439,25 @@ static DEVICE_START( cpu ) inputline->curvector = inputline->vector; } update_clock_information(device); + + /* fetch information about the CPU states */ + classdata->state = cpu_get_state_table(device); + if (classdata->state != NULL) + { + int stateindex; + + /* loop over all states specified, and work with any that apply */ + for (stateindex = 0; stateindex < classdata->state->entrycount; stateindex++) + { + const cpu_state_entry *entry = &classdata->state->entrylist[stateindex]; + if (entry->validmask == 0 || (entry->validmask & classdata->state->subtypemask) != 0) + { + assert(entry->index < MAX_REGS); + assert(classdata->regstate[entry->index] == NULL); + classdata->regstate[entry->index] = entry; + } + } + } /* if no state registered for saving, we can't save */ if (num_regs == 0) @@ -544,6 +572,20 @@ static DEVICE_SET_INFO( cpu ) /* no parameters to set */ default: + /* if we have a state pointer, we can handle some stuff for free */ + if (device->token != NULL) + { + const cpu_class_data *classdata = cpu_get_class_data(device); + if (classdata->state != NULL) + { + if (state >= CPUINFO_INT_REGISTER && state <= CPUINFO_INT_REGISTER_LAST) + { + set_register_value(device, classdata->state->baseptr, classdata->regstate[state - CPUINFO_INT_REGISTER], info->i); + return; + } + } + } + /* integer data */ if (state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST) { @@ -593,6 +635,27 @@ DEVICE_GET_INFO( cpu ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cpu); break; default: + /* if we have a state pointer, we can handle some stuff for free */ + if (device->token != NULL) + { + const cpu_class_data *classdata = cpu_get_class_data(device); + if (classdata->state != NULL) + { + if (state >= CPUINFO_INT_REGISTER && state <= CPUINFO_INT_REGISTER_LAST) + { + info->i = get_register_value(device, classdata->state->baseptr, classdata->regstate[state - CPUINFO_INT_REGISTER]); + return; + } + else if (state >= CPUINFO_STR_REGISTER && state <= CPUINFO_STR_REGISTER_LAST) + { + cinfo.s = info->s; + get_register_string_value(device, classdata->state->baseptr, classdata->regstate[state - CPUINFO_STR_REGISTER], cinfo.s); + info->s = cinfo.s; + return; + } + } + } + /* integer data */ if (state >= DEVINFO_INT_FIRST && state <= DEVINFO_INT_LAST) { @@ -1471,3 +1534,333 @@ static void register_save_states(const device_config *device) } } + +/*------------------------------------------------- + get_register_value - return a register value + of a CPU using the state table +-------------------------------------------------*/ + +static UINT64 get_register_value(const device_config *device, void *baseptr, const cpu_state_entry *entry) +{ + void *dataptr; + UINT64 result; + + /* NULL entry returns 0 */ + if (entry == NULL || baseptr == NULL) + return 0; + + /* if we have an exporter, call it now */ + if ((entry->flags & CPUSTATE_EXPORT) != 0) + { + cpu_state_io_func exportcb = (cpu_state_io_func)device_get_info_fct(device, CPUINFO_FCT_EXPORT_STATE); + assert(exportcb != NULL); + (*exportcb)(device, baseptr, entry); + } + + /* pick up the value */ + dataptr = (UINT8 *)baseptr + entry->dataoffs; + switch (entry->datasize) + { + default: + case 1: result = *(UINT8 *)dataptr; break; + case 2: result = *(UINT16 *)dataptr; break; + case 4: result = *(UINT32 *)dataptr; break; + case 8: result = *(UINT64 *)dataptr; break; + } + return result & entry->mask; +} + + +/*------------------------------------------------- + set_register_value - set the value of a + CPU register using the state table +-------------------------------------------------*/ + +static void set_register_value(const device_config *device, void *baseptr, const cpu_state_entry *entry, UINT64 value) +{ + void *dataptr; + + /* NULL entry is a no-op */ + if (entry == NULL || baseptr == NULL) + return; + + /* apply the mask */ + value &= entry->mask; + + /* sign-extend if necessary */ + if ((entry->flags & CPUSTATE_IMPORT_SEXT) != 0 && value > (entry->mask >> 1)) + value |= ~entry->mask; + + /* store the value */ + dataptr = (UINT8 *)baseptr + entry->dataoffs; + switch (entry->datasize) + { + default: + case 1: *(UINT8 *)dataptr = value; break; + case 2: *(UINT16 *)dataptr = value; break; + case 4: *(UINT32 *)dataptr = value; break; + case 8: *(UINT64 *)dataptr = value; break; + } + + /* if we have an importer, call it now */ + if ((entry->flags & CPUSTATE_IMPORT) != 0) + { + cpu_state_io_func importcb = (cpu_state_io_func)device_get_info_fct(device, CPUINFO_FCT_IMPORT_STATE); + assert(importcb != NULL); + (*importcb)(device, baseptr, entry); + } +} + + +/*------------------------------------------------- + get_register_string_value - return a string + representation of a CPU register using the + state table +-------------------------------------------------*/ + +static void get_register_string_value(const device_config *device, void *baseptr, const cpu_state_entry *entry, char *dest) +{ + static const UINT64 decdivisor[] = { + 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, + U64(10000000000), U64(100000000000), U64(1000000000000), + U64(10000000000000), U64(100000000000000), U64(1000000000000000), + U64(10000000000000000), U64(100000000000000000), U64(1000000000000000000), + U64(10000000000000000000) + }; + static const char hexchars[] = "0123456789ABCDEF"; + int leadzero = 0, width = 0, percent = 0, explicitsign = 0, hitnonzero = 0, reset; + const char *fptr; + UINT64 result; + + /* NULL entry does nothing */ + if (entry == NULL || entry->symbol == NULL || entry->format == NULL) + return; + + /* fetch the data */ + result = get_register_value(device, baseptr, entry); + + /* start with the basics */ + dest += sprintf(dest, "%s%s:", (entry->flags & CPUSTATE_NOSHOW) ? "~" : "", entry->symbol); + + /* parse the format */ + reset = TRUE; + for (fptr = entry->format; *fptr != 0; fptr++) + { + int digitnum; + + /* reset any accumulated state */ + if (reset) + leadzero = width = percent = explicitsign = reset = 0; + + /* if we're not within a format, then anything other than a % outputs directly */ + if (!percent && *fptr != '%') + { + *dest++ = *fptr; + continue; + } + + /* handle each character in turn */ + switch (*fptr) + { + /* % starts a format; %% outputs a single % */ + case '%': + if (!percent) + percent = TRUE; + else + { + *dest++ = *fptr; + percent = FALSE; + } + break; + + /* 0 means insert leading 0s, unless it follows another width digit */ + case '0': + if (width == 0) + leadzero = TRUE; + else + width *= 10; + break; + + /* 1-9 accumulate into the width */ + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + width = width * 10 + (*fptr - '0'); + break; + + /* + means explicit sign */ + case '+': + explicitsign = TRUE; + break; + + /* X outputs as hexadecimal */ + case 'X': + if (width == 0) + fatalerror("Width required for %%X formats\n"); + hitnonzero = FALSE; + while (leadzero && width > 16) + { + *dest++ = ' '; + width--; + } + for (digitnum = 15; digitnum >= 0; digitnum--) + { + int digit = (result >> (4 * digitnum)) & 0x0f; + if (digit != 0) + *dest++ = hexchars[digit]; + else if (hitnonzero || (leadzero && digitnum < width) || digitnum == 0) + *dest++ = '0'; + hitnonzero |= digit; + } + reset = TRUE; + break; + + /* d outputs as signed decimal */ + case 'd': + if (width == 0) + fatalerror("Width required for %%d formats\n"); + if ((result & entry->mask) > (entry->mask >> 1)) + { + result = -result & entry->mask; + *dest++ = '-'; + width--; + } + else if (explicitsign) + { + *dest++ = '+'; + width--; + } + /* fall through to unsigned case */ + + /* u outputs as unsigned decimal */ + case 'u': + if (width == 0) + fatalerror("Width required for %%u formats\n"); + hitnonzero = FALSE; + while (leadzero && width > ARRAY_LENGTH(decdivisor)) + { + *dest++ = ' '; + width--; + } + for (digitnum = ARRAY_LENGTH(decdivisor); digitnum >= 0; digitnum--) + { + int digit = (result >= decdivisor[digitnum]) ? (result / decdivisor[digitnum]) % 10 : 0; + if (digit != 0) + *dest++ = '0' + digit; + else if (hitnonzero || (leadzero && digitnum < width) || digitnum == 0) + *dest++ = '0'; + hitnonzero |= digit; + } + reset = TRUE; + break; + + /* s is a custom format */ + case 's': + { + cpu_string_io_func exportstring = (cpu_string_io_func)device_get_info_fct(device, CPUINFO_FCT_EXPORT_STRING); + assert(exportstring != NULL); + (*exportstring)(device, baseptr, entry, dest); + dest += strlen(dest); + break; + } + + /* other formats unknown */ + default: + fatalerror("Unknown format character '%c'\n", *fptr); + break; + } + } + *dest = 0; +} + + +/*------------------------------------------------- + get_register_string_max_width - return the + maximum width of a string described by a + format +-------------------------------------------------*/ + +#ifdef UNUSED_FUNCTION +static int get_register_string_max_width(const device_config *device, void *baseptr, const cpu_state_entry *entry) +{ + int leadzero = 0, width = 0, percent = 0, explicitsign = 0, reset; + int totalwidth = 0; + const char *fptr; + + /* NULL entry does nothing */ + if (entry == NULL || entry->symbol == NULL || entry->format == NULL) + return 0; + + /* parse the format */ + reset = TRUE; + for (fptr = entry->format; *fptr != 0; fptr++) + { + /* reset any accumulated state */ + if (reset) + leadzero = width = percent = explicitsign = reset = 0; + + /* if we're not within a format, then anything other than a % outputs directly */ + if (!percent && *fptr != '%') + { + totalwidth++; + continue; + } + + /* handle each character in turn */ + switch (*fptr) + { + /* % starts a format; %% outputs a single % */ + case '%': + if (!percent) + percent = TRUE; + else + { + totalwidth++; + percent = FALSE; + } + break; + + /* 0 means insert leading 0s, unless it follows another width digit */ + case '0': + if (width == 0) + leadzero = TRUE; + else + width *= 10; + break; + + /* 1-9 accumulate into the width */ + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + width = width * 10 + (*fptr - '0'); + break; + + /* + means explicit sign */ + case '+': + explicitsign = TRUE; + break; + + /* X outputs as hexadecimal */ + /* d outputs as signed decimal */ + /* u outputs as unsigned decimal */ + /* s outputs as custom format */ + case 'X': + case 'd': + case 'u': + case 's': + totalwidth += width; + reset = TRUE; + break; + + if (width == 0) + fatalerror("Width required for %%d formats\n"); + totalwidth += width; + break; + + /* other formats unknown */ + default: + fatalerror("Unknown format character '%c'\n", *fptr); + break; + } + } + return totalwidth; +} +#endif diff --git a/src/emu/cpuintrf.h b/src/emu/cpuintrf.h index 55f850dd117..3e707357341 100644 --- a/src/emu/cpuintrf.h +++ b/src/emu/cpuintrf.h @@ -18,6 +18,7 @@ #include "memory.h" #include "watchdog.h" #include "state.h" +#include // mingw has this defined for 32-bit compiles @@ -67,7 +68,11 @@ enum /* Maximum number of registers of any CPU */ enum { - MAX_REGS = 256 + MAX_REGS = 256, + + REG_GENPCBASE = MAX_REGS - 1, + REG_GENPC = MAX_REGS - 2, + REG_GENSP = MAX_REGS - 3 }; @@ -101,14 +106,14 @@ enum CPUINFO_INT_PAGE_SHIFT, /* R/O: size of a page log 2 (i.e., 12=4096), or 0 if paging not supported */ CPUINFO_INT_PAGE_SHIFT_LAST = CPUINFO_INT_PAGE_SHIFT + ADDRESS_SPACES - 1, - CPUINFO_INT_SP, /* R/W: the current stack pointer value */ - CPUINFO_INT_PC, /* R/W: the current PC value */ - CPUINFO_INT_PREVIOUSPC, /* R/W: the previous PC value */ CPUINFO_INT_INPUT_STATE, /* R/W: states for each input line */ CPUINFO_INT_INPUT_STATE_LAST = CPUINFO_INT_INPUT_STATE + MAX_INPUT_LINES - 1, CPUINFO_INT_OUTPUT_STATE, /* R/W: states for each output line */ CPUINFO_INT_OUTPUT_STATE_LAST = CPUINFO_INT_OUTPUT_STATE + MAX_OUTPUT_LINES - 1, CPUINFO_INT_REGISTER, /* R/W: values of up to MAX_REGs registers */ + CPUINFO_INT_SP = CPUINFO_INT_REGISTER + REG_GENSP, /* R/W: the current stack pointer value */ + CPUINFO_INT_PC = CPUINFO_INT_REGISTER + REG_GENPC, /* R/W: the current PC value */ + CPUINFO_INT_PREVIOUSPC = CPUINFO_INT_REGISTER + REG_GENPCBASE, /* R/W: the previous PC value */ CPUINFO_INT_REGISTER_LAST = CPUINFO_INT_REGISTER + MAX_REGS - 1, CPUINFO_INT_CPU_SPECIFIC = 0x08000, /* R/W: CPU-specific values start here */ @@ -121,7 +126,7 @@ enum /* R/O: int *icount */ CPUINFO_PTR_INTERNAL_MEMORY_MAP, /* R/O: const addrmap_token *map */ CPUINFO_PTR_INTERNAL_MEMORY_MAP_LAST = CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACES - 1, - CPUINFO_PTR_DEBUG_REGISTER_LIST, /* R/O: int *list: list of registers for the debugger */ + CPUINFO_PTR_STATE_TABLE, /* R/O: cpu_state_table *state */ CPUINFO_PTR_CPU_SPECIFIC = DEVINFO_PTR_DEVICE_SPECIFIC, /* R/W: CPU-specific values start here */ @@ -142,6 +147,10 @@ enum CPUINFO_PTR_READOP, /* R/O: int (*readop)(const device_config *device, UINT32 offset, int size, UINT64 *value) */ CPUINFO_PTR_DEBUG_INIT, /* R/O: void (*debug_init)(const device_config *device) */ CPUINFO_PTR_VALIDITY_CHECK, /* R/O: int (*validity_check)(const game_driver *driver, const void *config) */ + CPUINFO_FCT_IMPORT_STATE, /* R/O: void (*import_state)(const device_config *device, void *baseptr, const cpu_state_entry *entry) */ + CPUINFO_FCT_EXPORT_STATE, /* R/O: void (*export_state)(const device_config *device, void *baseptr, const cpu_state_entry *entry) */ + CPUINFO_FCT_IMPORT_STRING, /* R/O: void (*import_string)(const device_config *device, void *baseptr, const cpu_state_entry *entry, const char *format, char *string) */ + CPUINFO_FCT_EXPORT_STRING, /* R/O: void (*export_string)(const device_config *device, void *baseptr, const cpu_state_entry *entry, const char *format, char *string) */ CPUINFO_FCT_CPU_SPECIFIC = DEVINFO_FCT_DEVICE_SPECIFIC, /* R/W: CPU-specific values start here */ @@ -164,24 +173,6 @@ enum }; -/* get_reg/set_reg constants */ -enum -{ - /* This value is passed to cpu_get_reg to retrieve the previous - * program counter value, ie. before a CPU emulation started - * to fetch opcodes and arguments for the current instrution. */ - REG_PREVIOUSPC = CPUINFO_INT_PREVIOUSPC - CPUINFO_INT_REGISTER, - - /* This value is passed to cpu_get_reg to retrieve the current - * program counter value. */ - REG_PC = CPUINFO_INT_PC - CPUINFO_INT_REGISTER, - - /* This value is passed to cpu_get_reg to retrieve the current - * stack pointer value. */ - REG_SP = CPUINFO_INT_SP - CPUINFO_INT_REGISTER -}; - - /* Translation intentions */ #define TRANSLATE_TYPE_MASK 0x03 /* read write or fetch */ #define TRANSLATE_USER_MASK 0x04 /* user mode or fully privileged */ @@ -208,6 +199,13 @@ enum #define DASMFLAG_STEP_OVER_EXTRA(x) ((x) << DASMFLAG_OVERINSTSHIFT) +/* state table flags */ +#define CPUSTATE_NOSHOW 0x01 /* don't display this entry in the registers view */ +#define CPUSTATE_IMPORT 0x02 /* call the import function after writing new data */ +#define CPUSTATE_IMPORT_SEXT 0x04 /* sign-extend the data when writing new data */ +#define CPUSTATE_EXPORT 0x08 /* call the export function prior to fetching the data */ + + /*************************************************************************** MACROS @@ -215,62 +213,78 @@ enum #define IRQ_CALLBACK(func) int func(const device_config *device, int irqline) -#define CPU_GET_INFO_NAME(name) cpu_get_info_##name -#define CPU_GET_INFO(name) void CPU_GET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info) -#define CPU_GET_INFO_CALL(name) CPU_GET_INFO_NAME(name)(device, state, info) +#define CPU_GET_INFO_NAME(name) cpu_get_info_##name +#define CPU_GET_INFO(name) void CPU_GET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info) +#define CPU_GET_INFO_CALL(name) CPU_GET_INFO_NAME(name)(device, state, info) -#define CPU_SET_INFO_NAME(name) cpu_set_info_##name -#define CPU_SET_INFO(name) void CPU_SET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info) -#define CPU_SET_INFO_CALL(name) CPU_SET_INFO_NAME(name)(device, state, info) +#define CPU_SET_INFO_NAME(name) cpu_set_info_##name +#define CPU_SET_INFO(name) void CPU_SET_INFO_NAME(name)(const device_config *device, UINT32 state, cpuinfo *info) +#define CPU_SET_INFO_CALL(name) CPU_SET_INFO_NAME(name)(device, state, info) -#define CPU_INIT_NAME(name) cpu_init_##name -#define CPU_INIT(name) void CPU_INIT_NAME(name)(const device_config *device, cpu_irq_callback irqcallback) -#define CPU_INIT_CALL(name) CPU_INIT_NAME(name)(device, irqcallback) +#define CPU_INIT_NAME(name) cpu_init_##name +#define CPU_INIT(name) void CPU_INIT_NAME(name)(const device_config *device, cpu_irq_callback irqcallback) +#define CPU_INIT_CALL(name) CPU_INIT_NAME(name)(device, irqcallback) -#define CPU_RESET_NAME(name) cpu_reset_##name -#define CPU_RESET(name) void CPU_RESET_NAME(name)(const device_config *device) -#define CPU_RESET_CALL(name) CPU_RESET_NAME(name)(device) +#define CPU_RESET_NAME(name) cpu_reset_##name +#define CPU_RESET(name) void CPU_RESET_NAME(name)(const device_config *device) +#define CPU_RESET_CALL(name) CPU_RESET_NAME(name)(device) -#define CPU_EXIT_NAME(name) cpu_exit_##name -#define CPU_EXIT(name) void CPU_EXIT_NAME(name)(const device_config *device) -#define CPU_EXIT_CALL(name) CPU_EXIT_NAME(name)(device) +#define CPU_EXIT_NAME(name) cpu_exit_##name +#define CPU_EXIT(name) void CPU_EXIT_NAME(name)(const device_config *device) +#define CPU_EXIT_CALL(name) CPU_EXIT_NAME(name)(device) -#define CPU_EXECUTE_NAME(name) cpu_execute_##name -#define CPU_EXECUTE(name) int CPU_EXECUTE_NAME(name)(const device_config *device, int cycles) -#define CPU_EXECUTE_CALL(name) CPU_EXECUTE_NAME(name)(device, cycles) +#define CPU_EXECUTE_NAME(name) cpu_execute_##name +#define CPU_EXECUTE(name) int CPU_EXECUTE_NAME(name)(const device_config *device, int cycles) +#define CPU_EXECUTE_CALL(name) CPU_EXECUTE_NAME(name)(device, cycles) -#define CPU_BURN_NAME(name) cpu_burn_##name -#define CPU_BURN(name) void CPU_BURN_NAME(name)(const device_config *device, int cycles) -#define CPU_BURN_CALL(name) CPU_BURN_NAME(name)(device, cycles) +#define CPU_BURN_NAME(name) cpu_burn_##name +#define CPU_BURN(name) void CPU_BURN_NAME(name)(const device_config *device, int cycles) +#define CPU_BURN_CALL(name) CPU_BURN_NAME(name)(device, cycles) -#define CPU_TRANSLATE_NAME(name) cpu_translate_##name -#define CPU_TRANSLATE(name) int CPU_TRANSLATE_NAME(name)(const device_config *device, int space, int intention, offs_t *address) -#define CPU_TRANSLATE_CALL(name) CPU_TRANSLATE_NAME(name)(device, space, intention, address) +#define CPU_TRANSLATE_NAME(name) cpu_translate_##name +#define CPU_TRANSLATE(name) int CPU_TRANSLATE_NAME(name)(const device_config *device, int space, int intention, offs_t *address) +#define CPU_TRANSLATE_CALL(name) CPU_TRANSLATE_NAME(name)(device, space, intention, address) -#define CPU_READ_NAME(name) cpu_read_##name -#define CPU_READ(name) int CPU_READ_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 *value) -#define CPU_READ_CALL(name) CPU_READ_NAME(name)(device, space, offset, size, value) +#define CPU_READ_NAME(name) cpu_read_##name +#define CPU_READ(name) int CPU_READ_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 *value) +#define CPU_READ_CALL(name) CPU_READ_NAME(name)(device, space, offset, size, value) -#define CPU_WRITE_NAME(name) cpu_write_##name -#define CPU_WRITE(name) int CPU_WRITE_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 value) -#define CPU_WRITE_CALL(name) CPU_WRITE_NAME(name)(device, space, offset, size, value) +#define CPU_WRITE_NAME(name) cpu_write_##name +#define CPU_WRITE(name) int CPU_WRITE_NAME(name)(const device_config *device, int space, UINT32 offset, int size, UINT64 value) +#define CPU_WRITE_CALL(name) CPU_WRITE_NAME(name)(device, space, offset, size, value) -#define CPU_READOP_NAME(name) cpu_readop_##name -#define CPU_READOP(name) int CPU_READOP_NAME(name)(const device_config *device, UINT32 offset, int size, UINT64 *value) -#define CPU_READOP_CALL(name) CPU_READOP_NAME(name)(device, offset, size, value) +#define CPU_READOP_NAME(name) cpu_readop_##name +#define CPU_READOP(name) int CPU_READOP_NAME(name)(const device_config *device, UINT32 offset, int size, UINT64 *value) +#define CPU_READOP_CALL(name) CPU_READOP_NAME(name)(device, offset, size, value) -#define CPU_DEBUG_INIT_NAME(name) cpu_debug_init_##name -#define CPU_DEBUG_INIT(name) void CPU_DEBUG_INIT_NAME(name)(const device_config *device) -#define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)(device) +#define CPU_DEBUG_INIT_NAME(name) cpu_debug_init_##name +#define CPU_DEBUG_INIT(name) void CPU_DEBUG_INIT_NAME(name)(const device_config *device) +#define CPU_DEBUG_INIT_CALL(name) CPU_DEBUG_INIT_NAME(name)(device) -#define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name -#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(const device_config *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) -#define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(device, buffer, pc, oprom, opram) +#define CPU_DISASSEMBLE_NAME(name) cpu_disassemble_##name +#define CPU_DISASSEMBLE(name) offs_t CPU_DISASSEMBLE_NAME(name)(const device_config *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) +#define CPU_DISASSEMBLE_CALL(name) CPU_DISASSEMBLE_NAME(name)(device, buffer, pc, oprom, opram) #define CPU_VALIDITY_CHECK_NAME(name) cpu_validity_check_##name #define CPU_VALIDITY_CHECK(name) int CPU_VALIDITY_CHECK_NAME(name)(const game_driver *driver, const void *config) #define CPU_VALIDITY_CHECK_CALL(name) CPU_VALIDITY_CHECK_NAME(name)(driver, config) +#define CPU_IMPORT_STATE_NAME(name) cpu_state_import_##name +#define CPU_IMPORT_STATE(name) void CPU_IMPORT_STATE_NAME(name)(const device_config *device, void *baseptr, const cpu_state_entry *entry) +#define CPU_IMPORT_STATE_CALL(name) CPU_IMPORT_STATE_NAME(name)(device, baseptr, entry) + +#define CPU_EXPORT_STATE_NAME(name) cpu_state_export_##name +#define CPU_EXPORT_STATE(name) void CPU_EXPORT_STATE_NAME(name)(const device_config *device, void *baseptr, const cpu_state_entry *entry) +#define CPU_EXPORT_STATE_CALL(name) CPU_EXPORT_STATE_NAME(name)(device, baseptr, entry) + +#define CPU_IMPORT_STRING_NAME(name) cpu_string_import_##name +#define CPU_IMPORT_STRING(name) void CPU_IMPORT_STRING_NAME(name)(const device_config *device, void *baseptr, const cpu_state_entry *entry, char *string) +#define CPU_IMPORT_STRING_CALL(name) CPU_IMPORT_STRING_NAME(name)(device, baseptr, entry, string) + +#define CPU_EXPORT_STRING_NAME(name) cpu_string_export_##name +#define CPU_EXPORT_STRING(name) void CPU_EXPORT_STRING_NAME(name)(const device_config *device, void *baseptr, const cpu_state_entry *entry, char *string) +#define CPU_EXPORT_STRING_CALL(name) CPU_EXPORT_STRING_NAME(name)(device, baseptr, entry, string) + #define cpu_get_index(cpu) device_list_index((cpu)->machine->config->devicelist, CPU, (cpu)->tag) @@ -294,11 +308,11 @@ enum #define cpu_get_logaddr_width(cpu, space) device_get_info_int(cpu, CPUINFO_INT_LOGADDR_WIDTH + (space)) #define cpu_get_page_shift(cpu, space) device_get_info_int(cpu, CPUINFO_INT_PAGE_SHIFT + (space)) #define cpu_get_reg(cpu, reg) device_get_info_int(cpu, CPUINFO_INT_REGISTER + (reg)) -#define cpu_get_previouspc(cpu) ((offs_t)cpu_get_reg(cpu, REG_PREVIOUSPC)) -#define cpu_get_pc(cpu) ((offs_t)cpu_get_reg(cpu, REG_PC)) -#define cpu_get_sp(cpu) cpu_get_reg(cpu, REG_SP) +#define cpu_get_previouspc(cpu) ((offs_t)cpu_get_reg(cpu, REG_GENPCBASE)) +#define cpu_get_pc(cpu) ((offs_t)cpu_get_reg(cpu, REG_GENPC)) +#define cpu_get_sp(cpu) cpu_get_reg(cpu, REG_GENSP) #define cpu_get_icount_ptr(cpu) (int *)device_get_info_ptr(cpu, CPUINFO_PTR_INSTRUCTION_COUNTER) -#define cpu_get_debug_register_list(cpu) device_get_info_ptr(cpu, CPUINFO_PTR_DEBUG_REGISTER_LIST) +#define cpu_get_state_table(cpu) (const cpu_state_table *)device_get_info_ptr(cpu, CPUINFO_PTR_STATE_TABLE) #define cpu_get_name(cpu) device_get_info_string(cpu, CPUINFO_STR_NAME) #define cpu_get_core_family(cpu) device_get_info_string(cpu, CPUINFO_STR_CORE_FAMILY) #define cpu_get_core_version(cpu) device_get_info_string(cpu, CPUINFO_STR_CORE_VERSION) @@ -316,6 +330,10 @@ enum #define cputag_get_address_space(mach, tag, space) cpu_get_address_space(cputag_get_cpu(mach, tag), space) +#define CPU_STATE_ENTRY(_index, _symbol, _format, _struct, _member, _datamask, _validmask, _flags) \ + { _index, _validmask, offsetof(_struct, _member), _datamask, sizeof(((_struct *)0)->_member), _flags, _symbol, _format }, + + /*************************************************************************** TYPE DEFINITIONS @@ -325,8 +343,9 @@ enum typedef struct _cpu_debug_data cpu_debug_data; -/* forward declaration of this union */ +/* forward declaration of types */ typedef union _cpuinfo cpuinfo; +typedef struct _cpu_state_entry cpu_state_entry; /* define the various callback functions */ @@ -346,6 +365,33 @@ typedef int (*cpu_readop_func)(const device_config *device, UINT32 offset, int s typedef void (*cpu_debug_init_func)(const device_config *device); typedef offs_t (*cpu_disassemble_func)(const device_config *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); typedef int (*cpu_validity_check_func)(const game_driver *driver, const void *config); +typedef void (*cpu_state_io_func)(const device_config *device, void *baseptr, const cpu_state_entry *entry); +typedef void (*cpu_string_io_func)(const device_config *device, void *baseptr, const cpu_state_entry *entry, char *string); + + +/* structure describing a single item of exposed CPU state */ +struct _cpu_state_entry +{ + UINT32 index; /* state index this entry applies to */ + UINT32 validmask; /* mask for which CPU subtypes this entry is valid */ + FPTR dataoffs; /* offset to the data, relative to the baseptr */ + UINT64 mask; /* mask applied to the data */ + UINT8 datasize; /* size of the data item in memory */ + UINT8 flags; /* flags */ + const char * symbol; /* symbol for display; all lower-case version for expressions */ + const char * format; /* supported formats */ +}; + + +/* structure describing a table of exposed CPU state */ +typedef struct _cpu_state_table cpu_state_table; +struct _cpu_state_table +{ + void * baseptr; /* pointer to the base of state (offsets are relative to this) */ + UINT32 subtypemask; /* mask of subtypes that apply to this CPU */ + UINT32 entrycount; /* number of entries */ + const cpu_state_entry * entrylist; /* array of entries */ +}; /* a cpu_type is just a pointer to the CPU's get_info function */ @@ -373,7 +419,12 @@ union _cpuinfo cpu_debug_init_func debug_init; /* CPUINFO_PTR_DEBUG_INIT */ cpu_disassemble_func disassemble; /* CPUINFO_PTR_DISASSEMBLE */ cpu_validity_check_func validity_check; /* CPUINFO_PTR_VALIDITY_CHECK */ + cpu_state_io_func import_state; /* CPUINFO_FCT_IMPORT_STATE */ + cpu_state_io_func export_state; /* CPUINFO_FCT_EXPORT_STATE */ + cpu_string_io_func import_string; /* CPUINFO_FCT_IMPORT_STRING */ + cpu_string_io_func export_string; /* CPUINFO_FCT_EXPORT_STRING */ int * icount; /* CPUINFO_PTR_INSTRUCTION_COUNTER */ + const cpu_state_table * state_table; /* CPUINFO_PTR_STATE_TABLE */ const addrmap8_token * internal_map8; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */ const addrmap16_token * internal_map16; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */ const addrmap32_token * internal_map32; /* CPUINFO_PTR_INTERNAL_MEMORY_MAP */ @@ -385,8 +436,8 @@ union _cpuinfo typedef struct _cpu_class_header cpu_class_header; struct _cpu_class_header { - cpu_debug_data * debug; /* debugging data */ - const address_space * space[ADDRESS_SPACES]; /* address spaces */ + cpu_debug_data * debug; /* debugging data */ + const address_space * space[ADDRESS_SPACES]; /* address spaces */ /* table of core functions */ cpu_set_info_func set_info; diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 95ecfc666cc..bcc993bb4e4 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -78,12 +78,6 @@ struct _debugcpu_private -/*************************************************************************** - LOCAL VARIABLES -***************************************************************************/ - - - /*************************************************************************** FUNCTION PROTOTYPES ***************************************************************************/ @@ -214,7 +208,6 @@ void debug_cpu_init(running_machine *machine) info->symtable = symtable_alloc(global->symtable, (void *)cpu); /* add a global symbol for the current instruction pointer */ - symtable_add_register(info->symtable, "curpc", NULL, get_current_pc, 0); symtable_add_register(info->symtable, "cycles", NULL, get_cycles, NULL); if (classheader->space[ADDRESS_SPACE_PROGRAM] != NULL) symtable_add_register(info->symtable, "logunmap", (void *)classheader->space[ADDRESS_SPACE_PROGRAM], get_logunmap, set_logunmap); @@ -249,6 +242,10 @@ void debug_cpu_init(running_machine *machine) /* add the symbol to the table */ symtable_add_register(info->symtable, symname, (void *)(FPTR)regnum, get_cpu_reg, set_cpu_reg); } + + /* if no curpc, add one */ + if (symtable_find(info->symtable, "curpc") == NULL) + symtable_add_register(info->symtable, "curpc", NULL, get_current_pc, 0); } /* first CPU is visible by default */ @@ -319,7 +316,7 @@ int debug_cpu_within_instruction_hook(running_machine *machine) int debug_cpu_is_stopped(running_machine *machine) { debugcpu_private *global = machine->debugcpu_data; - return global->execution_state == EXECUTION_STATE_STOPPED; + return (global != NULL) ? (global->execution_state == EXECUTION_STATE_STOPPED) : FALSE; } diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c index 7c60e86b0a0..97ddbb37ed8 100644 --- a/src/emu/debug/debugvw.c +++ b/src/emu/debug/debugvw.c @@ -1185,12 +1185,12 @@ static void registers_view_recompute(debug_view *view) { debug_view_registers *regdata = view->extra_data; int regnum, maxtaglen, maxvallen; - const int *list; + const cpu_state_table *table; /* if no CPU, reset to the first one */ if (regdata->device == NULL) regdata->device = view->machine->cpu[0]; - list = cpu_get_debug_register_list(regdata->device); + table = cpu_get_state_table(regdata->device); /* reset the view parameters */ view->topleft.y = 0; @@ -1264,15 +1264,20 @@ static void registers_view_recompute(debug_view *view) int regid; /* identify the register id */ - regid = list ? list[regnum] : regnum; - if (regid < 0) - break; + if (table != NULL) + { + if (regnum >= table->entrycount) + break; + regid = table->entrylist[regnum].index; + } + else + regid = regnum; /* retrieve the string for this register */ str = cpu_get_reg_string(regdata->device, regid); /* did we get a string? */ - if (str && str[0] != '\0' && str[0] != '~') + if (str != NULL && str[0] != 0 && str[0] != '~') registers_view_add_register(view, regid, str); } diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c index ccba47c0547..61c20861abc 100644 --- a/src/emu/debug/express.c +++ b/src/emu/debug/express.c @@ -1953,6 +1953,8 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr int strindex; int all_digits, i; + assert_always(entry->table == table, "Mismatched symbol tables"); + /* we cannot add numeric symbols */ all_digits = TRUE; for (i = 0; name[i]; i++) @@ -2018,6 +2020,7 @@ int symtable_add_register(symbol_table *table, const char *name, void *symref, s symbol.type = SMT_REGISTER; symbol.info.reg.getter = getter; symbol.info.reg.setter = setter; + symbol.table = table; return symtable_add(table, name, &symbol); } @@ -2036,6 +2039,7 @@ int symtable_add_function(symbol_table *table, const char *name, void *symref, U symbol.info.func.minparams = minparams; symbol.info.func.maxparams = maxparams; symbol.info.func.execute = execute; + symbol.table = table; return symtable_add(table, name, &symbol); } @@ -2052,6 +2056,7 @@ int symtable_add_value(symbol_table *table, const char *name, UINT64 value) symbol.ref = NULL; symbol.type = SMT_VALUE; symbol.info.gen.value = value; + symbol.table = table; return symtable_add(table, name, &symbol); } diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index d35216b9330..36586bdb22a 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -50,7 +50,7 @@ static void device_list_reset(running_machine *machine); a temporary string buffer -------------------------------------------------*/ -INLINE char *get_temp_string_buffer(void) +char *get_temp_string_buffer(void) { char *string = &temp_string_pool[temp_string_pool_index++ % TEMP_STRING_POOL_ENTRIES][0]; string[0] = 0; diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h index d805b9cf0f9..b7cb0c17ad5 100644 --- a/src/emu/devintrf.h +++ b/src/emu/devintrf.h @@ -212,7 +212,7 @@ union _deviceinfo INT64 i; /* generic integers */ void * p; /* generic pointers */ genf * f; /* generic function pointers */ - const char * s; /* generic strings */ + char * s; /* generic strings */ device_set_info_func set_info; /* DEVINFO_FCT_SET_INFO */ device_start_func start; /* DEVINFO_FCT_START */ diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c index 45ed7bec0a2..4418111badf 100644 --- a/src/emu/machine/6522via.c +++ b/src/emu/machine/6522via.c @@ -1219,10 +1219,10 @@ DEVICE_GET_INFO(via6522) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(via6522); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6522 VIA"; break; - case DEVINFO_STR_FAMILY: info->s = "6522 VIA"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; + case DEVINFO_STR_NAME: strcpy(info->s, "6522 VIA"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "6522 VIA"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; case DEVINFO_STR_CREDITS: /* Nothing */ break; } } diff --git a/src/emu/machine/6526cia.c b/src/emu/machine/6526cia.c index 27a0b45ae3b..783933d84a4 100644 --- a/src/emu/machine/6526cia.c +++ b/src/emu/machine/6526cia.c @@ -854,10 +854,10 @@ DEVICE_GET_INFO(cia6526r1) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cia); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6526 CIA rev1"; break; - case DEVINFO_STR_FAMILY: info->s = "6526 CIA"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; + case DEVINFO_STR_NAME: strcpy(info->s, "6526 CIA rev1"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "6526 CIA"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; case DEVINFO_STR_CREDITS: /* Nothing */ break; } } @@ -872,7 +872,7 @@ DEVICE_GET_INFO(cia6526r2) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6526 CIA rev2"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "6526 CIA rev2"); break; default: DEVICE_GET_INFO_CALL(cia6526r1); break; } } @@ -887,7 +887,7 @@ DEVICE_GET_INFO(cia8520) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "8520 CIA"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "8520 CIA"); break; default: DEVICE_GET_INFO_CALL(cia6526r1); break; } } diff --git a/src/emu/machine/6532riot.c b/src/emu/machine/6532riot.c index e651e1fe674..99591077548 100644 --- a/src/emu/machine/6532riot.c +++ b/src/emu/machine/6532riot.c @@ -518,10 +518,10 @@ DEVICE_GET_INFO( riot6532 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(riot6532);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6532 (RIOT)"; break; - case DEVINFO_STR_FAMILY: info->s = "I/O devices"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "6532 (RIOT)"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "I/O devices"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c index 1851ab7d5f4..fbf90aa4f8a 100644 --- a/src/emu/machine/6850acia.c +++ b/src/emu/machine/6850acia.c @@ -862,10 +862,10 @@ DEVICE_GET_INFO( acia6850 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(acia6850); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "6850 ACIA"; break; - case DEVINFO_STR_FAMILY: info->s = "6850 ACIA"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; + case DEVINFO_STR_NAME: strcpy(info->s, "6850 ACIA"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "6850 ACIA"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; case DEVINFO_STR_CREDITS: /* Nothing */ break; } } diff --git a/src/emu/machine/68681.c b/src/emu/machine/68681.c index 4c9efae0857..44143127a16 100644 --- a/src/emu/machine/68681.c +++ b/src/emu/machine/68681.c @@ -640,10 +640,10 @@ DEVICE_GET_INFO(duart68681) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(duart68681);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "DUART 68681"; break; - case DEVINFO_STR_FAMILY: info->s = "DUART"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "DUART 68681"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "DUART"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/74123.c b/src/emu/machine/74123.c index 4258ca896cb..475281eb5b0 100644 --- a/src/emu/machine/74123.c +++ b/src/emu/machine/74123.c @@ -244,10 +244,10 @@ DEVICE_GET_INFO( ttl74123 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ttl74123); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "74123"; break; - case DEVINFO_STR_FAMILY: info->s = "TTL"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "74123"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "TTL"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/8237dma.c b/src/emu/machine/8237dma.c index 2a56252635f..ebb659aa6f5 100644 --- a/src/emu/machine/8237dma.c +++ b/src/emu/machine/8237dma.c @@ -440,11 +440,11 @@ DEVICE_GET_INFO( dma8237 ) { case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(dma8237); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Intel DMA8237"; break; - case DEVINFO_STR_FAMILY: info->s = "DMA8237"; break; - case DEVINFO_STR_VERSION: info->s = "1.00"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright the MAME and MESS Teams"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Intel DMA8237"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "DMA8237"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.00"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MAME and MESS Teams"); break; } } diff --git a/src/emu/machine/8255ppi.c b/src/emu/machine/8255ppi.c index 9a2dc39e598..7e191d61bf4 100644 --- a/src/emu/machine/8255ppi.c +++ b/src/emu/machine/8255ppi.c @@ -581,11 +581,11 @@ DEVICE_GET_INFO(ppi8255) { case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ppi8255); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Intel PPI8255"; break; - case DEVINFO_STR_FAMILY: info->s = "PPI8255"; break; - case DEVINFO_STR_VERSION: info->s = "1.00"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright the MAME and MESS Teams"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Intel PPI8255"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "PPI8255"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.00"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MAME and MESS Teams"); break; } } diff --git a/src/emu/machine/8257dma.c b/src/emu/machine/8257dma.c index 5587389816d..e508302fe5b 100644 --- a/src/emu/machine/8257dma.c +++ b/src/emu/machine/8257dma.c @@ -413,7 +413,7 @@ DEVICE_GET_INFO( dma8257 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(dma8257_t); break; + case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(dma8257_t); break; case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; @@ -424,10 +424,10 @@ DEVICE_GET_INFO( dma8257 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(dma8257);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "DMA8257"; break; - case DEVINFO_STR_FAMILY: info->s = "DMA controllers"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "DMA8257"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "DMA controllers"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/at28c16.c b/src/emu/machine/at28c16.c index 567d64f9dbb..c96a8aa1ace 100644 --- a/src/emu/machine/at28c16.c +++ b/src/emu/machine/at28c16.c @@ -230,10 +230,10 @@ DEVICE_GET_INFO(at28c16) case DEVINFO_FCT_NVRAM: info->nvram = DEVICE_NVRAM_NAME(at28c16); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "AT28C16"; break; - case DEVINFO_STR_FAMILY: info->s = "EEPROM"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "AT28C16"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "EEPROM"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/cdp1852.c b/src/emu/machine/cdp1852.c index e660ca5803d..404ebdaf7ae 100644 --- a/src/emu/machine/cdp1852.c +++ b/src/emu/machine/cdp1852.c @@ -202,10 +202,10 @@ DEVICE_GET_INFO( cdp1852 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(cdp1852); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "RCA CDP1852"; break; - case DEVINFO_STR_FAMILY: info->s = "RCA CDP1800"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "RCA CDP1852"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "RCA CDP1800"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index 907f4b90f3e..75df5adf936 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -1824,10 +1824,10 @@ DEVICE_GET_INFO( ide_controller ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(ide_controller);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "IDE Controller"; break; - case DEVINFO_STR_FAMILY: info->s = "Disk Controller"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "IDE Controller"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Disk Controller"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index 8079328ae5f..7fd9b840bf2 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -260,10 +260,10 @@ DEVICE_GET_INFO( latch8 ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(latch8);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "8 bit latch"; break; - case DEVINFO_STR_FAMILY: info->s = "Latches"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "8 bit latch"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Latches"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/ldcore.c b/src/emu/machine/ldcore.c index a03e0bd7e42..337856fd30b 100644 --- a/src/emu/machine/ldcore.c +++ b/src/emu/machine/ldcore.c @@ -1634,10 +1634,10 @@ DEVICE_GET_INFO( laserdisc ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(laserdisc); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = (intf != NULL) ? intf->name : "Unknown Laserdisc Player"; break; - case DEVINFO_STR_FAMILY: info->s = "Laserdisc Player"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, (intf != NULL) ? intf->name : "Unknown Laserdisc Player"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Laserdisc Player"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/msm6242.c b/src/emu/machine/msm6242.c index 201e8c260b3..04b2a637ac0 100644 --- a/src/emu/machine/msm6242.c +++ b/src/emu/machine/msm6242.c @@ -183,11 +183,11 @@ DEVICE_GET_INFO( msm6242 ) case DEVINFO_FCT_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "OKI MSM6242"; break; - case DEVINFO_STR_FAMILY: info->s = "MSM6242 RTC"; break; - case DEVINFO_STR_VERSION: info->s = "1.00"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "OKI MSM6242"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "MSM6242 RTC"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.00"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c index fa165a6ba33..e62b65db9e3 100644 --- a/src/emu/machine/pci.c +++ b/src/emu/machine/pci.c @@ -274,10 +274,10 @@ DEVICE_GET_INFO( pci_bus ) case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pci_bus);break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "PCI Bus"; break; - case DEVINFO_STR_FAMILY: info->s = "Peripherial Bus"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "PCI Bus"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Peripherial Bus"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c index 71215bc5e74..494d05e1f0b 100644 --- a/src/emu/machine/pic8259.c +++ b/src/emu/machine/pic8259.c @@ -450,11 +450,11 @@ DEVICE_GET_INFO( pic8259 ) { case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pic8259); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Intel PIC8259"; break; - case DEVINFO_STR_FAMILY: info->s = "PIC8259"; break; - case DEVINFO_STR_VERSION: info->s = "1.00"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright the MAME and MESS Teams"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Intel PIC8259"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "PIC8259"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.00"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MAME and MESS Teams"); break; } } diff --git a/src/emu/machine/pit8253.c b/src/emu/machine/pit8253.c index 45350e6c56a..a09714de099 100644 --- a/src/emu/machine/pit8253.c +++ b/src/emu/machine/pit8253.c @@ -1142,11 +1142,11 @@ DEVICE_GET_INFO( pit8253 ) { case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(pit8253); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Intel PIT8253"; break; - case DEVINFO_STR_FAMILY: info->s = "PIT8253"; break; - case DEVINFO_STR_VERSION: info->s = "1.00"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright the MAME and MESS Teams"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Intel PIT8253"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "PIT8253"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.00"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MAME and MESS Teams"); break; } } @@ -1154,7 +1154,7 @@ DEVICE_GET_INFO( pit8253 ) { DEVICE_GET_INFO( pit8254 ) { switch ( state ) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case DEVINFO_STR_NAME: info->s = "Intel PIT8254"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Intel PIT8254"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(pit8254); break; diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c index c70ee86374d..0a8c07d56c3 100644 --- a/src/emu/machine/smc91c9x.c +++ b/src/emu/machine/smc91c9x.c @@ -624,10 +624,10 @@ static DEVICE_GET_INFO( smc91c9x ) /* --- the following bits of info are returned as NULL-terminated strings --- */ case DEVINFO_STR_NAME: /* provided by subclasses */ break; - case DEVINFO_STR_FAMILY: info->s = "SMC91C9X Ethernet Controller";break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "SMC91C9X Ethernet Controller");break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } @@ -636,7 +636,7 @@ DEVICE_GET_INFO( smc91c94 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "SMC91C94"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "SMC91C94"); break; default: DEVICE_GET_INFO_CALL(smc91c9x); break; } } @@ -646,7 +646,7 @@ DEVICE_GET_INFO( smc91c96 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "SMC91C96"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "SMC91C96"); break; default: DEVICE_GET_INFO_CALL(smc91c9x); break; } } diff --git a/src/emu/machine/timekpr.c b/src/emu/machine/timekpr.c index ed7d4fc103d..695e04ea3e3 100644 --- a/src/emu/machine/timekpr.c +++ b/src/emu/machine/timekpr.c @@ -481,11 +481,11 @@ static DEVICE_GET_INFO(timekeeper) case DEVINFO_FCT_NVRAM: info->nvram = DEVICE_NVRAM_NAME(timekeeper); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Timekeeper"; break; - case DEVINFO_STR_FAMILY: info->s = "EEPROM"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Timekeeper"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "EEPROM"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } @@ -494,12 +494,12 @@ DEVICE_GET_INFO( m48t02 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "M48T02"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "M48T02"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t02); break; - default: DEVICE_GET_INFO_CALL(timekeeper); break; + default: DEVICE_GET_INFO_CALL(timekeeper); break; } } @@ -508,12 +508,12 @@ DEVICE_GET_INFO( m48t35 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "M48T35"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "M48T35"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t35); break; - default: DEVICE_GET_INFO_CALL(timekeeper); break; + default: DEVICE_GET_INFO_CALL(timekeeper); break; } } @@ -522,12 +522,12 @@ DEVICE_GET_INFO( m48t58 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "M48T58"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "M48T58"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(m48t58); break; - default: DEVICE_GET_INFO_CALL(timekeeper); break; + default: DEVICE_GET_INFO_CALL(timekeeper); break; } } @@ -536,11 +536,11 @@ DEVICE_GET_INFO( mk48t08 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "MK48T08"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "MK48T08"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mk48t08); break; - default: DEVICE_GET_INFO_CALL(timekeeper); break; + default: DEVICE_GET_INFO_CALL(timekeeper); break; } } diff --git a/src/emu/machine/x2212.c b/src/emu/machine/x2212.c index 9b92dd32b52..7a30e5f9722 100644 --- a/src/emu/machine/x2212.c +++ b/src/emu/machine/x2212.c @@ -178,10 +178,10 @@ DEVICE_GET_INFO(x2212) case DEVINFO_FCT_NVRAM: info->nvram = DEVICE_NVRAM_NAME(x2212); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "X2212"; break; - case DEVINFO_STR_FAMILY: info->s = "EEPROM"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "X2212"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "EEPROM"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/z80ctc.c b/src/emu/machine/z80ctc.c index 3d020b2cc9f..77928b8a5bd 100644 --- a/src/emu/machine/z80ctc.c +++ b/src/emu/machine/z80ctc.c @@ -545,11 +545,11 @@ DEVICE_GET_INFO( z80ctc ) case DEVINFO_FCT_IRQ_RETI: info->f = (genf *)z80ctc_irq_reti; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Zilog Z80 CTC"; break; - case DEVINFO_STR_FAMILY: info->s = "Z80"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Zilog Z80 CTC"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Z80"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c index fe520e91b29..69ca4b2cb8d 100644 --- a/src/emu/machine/z80dma.c +++ b/src/emu/machine/z80dma.c @@ -511,11 +511,11 @@ DEVICE_GET_INFO( z80dma ) case DEVINFO_FCT_IRQ_RETI: info->f = (genf *)z80dma_irq_reti; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Z80DMA"; break; - case DEVINFO_STR_FAMILY: info->s = "DMA controllers"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Z80DMA"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "DMA controllers"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c index 58da4a6891d..1b882908709 100644 --- a/src/emu/machine/z80pio.c +++ b/src/emu/machine/z80pio.c @@ -610,11 +610,11 @@ DEVICE_GET_INFO( z80pio ) case DEVINFO_FCT_IRQ_RETI: info->f = (genf *)z80pio_irq_reti; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Zilog Z80 PIO"; break; - case DEVINFO_STR_FAMILY: info->s = "Z80"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Zilog Z80 PIO"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Z80"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/machine/z80sio.c b/src/emu/machine/z80sio.c index ea2ea63f21d..8798783aeb7 100644 --- a/src/emu/machine/z80sio.c +++ b/src/emu/machine/z80sio.c @@ -840,11 +840,11 @@ DEVICE_GET_INFO( z80sio ) case DEVINFO_FCT_IRQ_RETI: info->f = (genf *)z80sio_irq_reti; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Zilog Z80 SIO"; break; - case DEVINFO_STR_FAMILY: info->s = "Z80"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Zilog Z80 SIO"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Z80"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/sndintrf.c b/src/emu/sndintrf.c index 5571f8098a0..31512ab96d2 100644 --- a/src/emu/sndintrf.c +++ b/src/emu/sndintrf.c @@ -753,10 +753,11 @@ genf *sndnum_get_info_fct(int sndnum, UINT32 state) const char *sndnum_get_info_string(int sndnum, UINT32 state) { + extern char *get_temp_string_buffer(void); sndinfo info; VERIFY_SNDNUM(sndnum_get_info_string); - info.s = NULL; + info.s = get_temp_string_buffer(); (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.s; } @@ -862,12 +863,13 @@ genf *sndti_get_info_fct(sound_type sndtype, int sndindex, UINT32 state) const char *sndti_get_info_string(sound_type sndtype, int sndindex, UINT32 state) { + extern char *get_temp_string_buffer(void); sndinfo info; int sndnum; VERIFY_SNDTI(sndti_get_info_string); sndnum = sound_matrix[sndtype][sndindex] - 1; - info.s = NULL; + info.s = get_temp_string_buffer(); (*sound[sndnum].intf.get_info)(sound[sndnum].device, state, &info); return info.s; } @@ -986,11 +988,12 @@ genf *sndtype_get_info_fct(sound_type sndtype, UINT32 state) const char *sndtype_get_info_string(sound_type sndtype, UINT32 state) { + extern char *get_temp_string_buffer(void); snd_class_header *classheader = &snd_type_header[sndtype]; sndinfo info; VERIFY_SNDTYPE(sndtype_get_info_string); - info.s = NULL; + info.s = get_temp_string_buffer(); (*classheader->get_info)(NULL, state, &info); return info.s; } @@ -1030,10 +1033,10 @@ static SND_GET_INFO( dummy_sound ) case SNDINFO_PTR_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Dummy"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Dummy"; 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, "Dummy"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Dummy"); 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; } } diff --git a/src/emu/sndintrf.h b/src/emu/sndintrf.h index 08d9502ccc5..6cd4f5f90bb 100644 --- a/src/emu/sndintrf.h +++ b/src/emu/sndintrf.h @@ -235,7 +235,7 @@ union _sndinfo INT64 i; /* generic integers */ void * p; /* generic pointers */ genf * f; /* generic function pointers */ - const char *s; /* generic strings */ + char * s; /* generic strings */ snd_set_info_func set_info; /* SNDINFO_PTR_SET_INFO */ snd_start_func start; /* SNDINFO_PTR_START */ diff --git a/src/emu/sound.c b/src/emu/sound.c index db52ac20671..e4e687af078 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -878,11 +878,11 @@ DEVICE_GET_INFO( speaker_output ) case DEVINFO_FCT_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Speaker"; break; - case DEVINFO_STR_FAMILY: info->s = "Sound"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Speaker"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Sound"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/sound/2151intf.c b/src/emu/sound/2151intf.c index e3abe82f63a..bff659efc07 100644 --- a/src/emu/sound/2151intf.c +++ b/src/emu/sound/2151intf.c @@ -230,10 +230,10 @@ SND_GET_INFO( ym2151 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2151 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2151"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2151"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/2203intf.c b/src/emu/sound/2203intf.c index 5f106ebdb4c..056cb1065f8 100644 --- a/src/emu/sound/2203intf.c +++ b/src/emu/sound/2203intf.c @@ -349,10 +349,10 @@ SND_GET_INFO( ym2203 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2203 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2203"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2203"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/2413intf.c b/src/emu/sound/2413intf.c index a957994aa4a..2830cc5141c 100644 --- a/src/emu/sound/2413intf.c +++ b/src/emu/sound/2413intf.c @@ -177,10 +177,10 @@ SND_GET_INFO( ym2413 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2413 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2413"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2413"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/2608intf.c b/src/emu/sound/2608intf.c index 12b6d5b2eef..3f88f733f15 100644 --- a/src/emu/sound/2608intf.c +++ b/src/emu/sound/2608intf.c @@ -317,10 +317,10 @@ SND_GET_INFO( ym2608 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2608 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2608"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2608"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c index 1ac4fa5b240..1b6563b5c1b 100644 --- a/src/emu/sound/2610intf.c +++ b/src/emu/sound/2610intf.c @@ -503,11 +503,11 @@ SND_GET_INFO( ym2610 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2610 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2610"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2610"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } #endif @@ -540,11 +540,11 @@ SND_GET_INFO( ym2610b ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2610 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2610B"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2610B"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/2612intf.c b/src/emu/sound/2612intf.c index 4fcf173843a..ec77d93bdbb 100644 --- a/src/emu/sound/2612intf.c +++ b/src/emu/sound/2612intf.c @@ -370,11 +370,11 @@ SND_GET_INFO( ym2612 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2612 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM2612"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM2612"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } @@ -406,11 +406,11 @@ SND_GET_INFO( ym3438 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym2612 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM3438"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM3438"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/262intf.c b/src/emu/sound/262intf.c index e8ed4df69d3..793ba451823 100644 --- a/src/emu/sound/262intf.c +++ b/src/emu/sound/262intf.c @@ -181,11 +181,11 @@ SND_GET_INFO( ymf262 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ymf262 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YMF262"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YMF262"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c index ee81eb60c89..f108d9b67ff 100644 --- a/src/emu/sound/3812intf.c +++ b/src/emu/sound/3812intf.c @@ -182,11 +182,11 @@ SND_GET_INFO( ym3812 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym3812 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM3812"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM3812"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } @@ -352,11 +352,11 @@ SND_GET_INFO( ym3526 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ym3526 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YM3526"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YM3526"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } @@ -566,11 +566,11 @@ SND_GET_INFO( y8950 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( y8950 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Y8950"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "Y8950"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/5110intf.c b/src/emu/sound/5110intf.c index 08288ee48a0..e02149b71a4 100644 --- a/src/emu/sound/5110intf.c +++ b/src/emu/sound/5110intf.c @@ -298,20 +298,20 @@ SND_GET_INFO( tms5110 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5110; break; + case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5110; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5110 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5110 ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tms5110 ); break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( tms5110 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5110 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5110 ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tms5110 ); break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( tms5110 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "TMS5110"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; 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, "TMS5110"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TI Speech"); 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; } } @@ -319,9 +319,9 @@ SND_GET_INFO( tms5100 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5100 ); break; - case SNDINFO_STR_NAME: info->s = "TMS5100"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5100 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "TMS5100"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } @@ -329,9 +329,9 @@ SND_GET_INFO( tms5110a ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5110a ); break; - case SNDINFO_STR_NAME: info->s = "TMS5100A"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5110a ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "TMS5100A"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } @@ -339,9 +339,9 @@ SND_GET_INFO( cd2801 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( cd2801 ); break; - case SNDINFO_STR_NAME: info->s = "CD2801"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( cd2801 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "CD2801"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } @@ -349,9 +349,9 @@ SND_GET_INFO( tmc0281 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( tmc0281 ); break; - case SNDINFO_STR_NAME: info->s = "TMS5100"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tmc0281 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "TMS5100"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } @@ -359,9 +359,9 @@ SND_GET_INFO( cd2802 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( cd2802 ); break; - case SNDINFO_STR_NAME: info->s = "CD2802"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( cd2802 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "CD2802"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } @@ -369,9 +369,9 @@ SND_GET_INFO( m58817 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( m58817 ); break; - case SNDINFO_STR_NAME: info->s = "M58817"; break; - default: SND_GET_INFO_CALL(tms5110); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( m58817 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "M58817"); break; + default: SND_GET_INFO_CALL(tms5110); break; } } diff --git a/src/emu/sound/5220intf.c b/src/emu/sound/5220intf.c index 1534ef3c8d1..4586b423937 100644 --- a/src/emu/sound/5220intf.c +++ b/src/emu/sound/5220intf.c @@ -254,20 +254,20 @@ SND_GET_INFO( tms5220 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5220; break; + case SNDINFO_INT_ALIAS: info->i = SOUND_TMS5220; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5220 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5220 ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tms5220 ); break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( tms5220 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms5220 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5220 ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tms5220 ); break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( tms5220 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "TMS5220"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; 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, "TMS5220"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TI Speech"); 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; } } @@ -276,9 +276,9 @@ SND_GET_INFO( tmc0285 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5200 ); break; - case SNDINFO_STR_NAME: info->s = "TMC0285"; break; - default: SND_GET_INFO_CALL( tms5220 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5200 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "TMC0285"); break; + default: SND_GET_INFO_CALL( tms5220 ); break; } } #endif @@ -288,9 +288,9 @@ SND_GET_INFO( tms5200 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5200 ); break; - case SNDINFO_STR_NAME: info->s = "TMS5200"; break; - default: SND_GET_INFO_CALL( tms5220 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms5200 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "TMS5200"); break; + default: SND_GET_INFO_CALL( tms5220 ); break; } } #endif diff --git a/src/emu/sound/aica.c b/src/emu/sound/aica.c index df537127560..79751093268 100644 --- a/src/emu/sound/aica.c +++ b/src/emu/sound/aica.c @@ -1384,17 +1384,17 @@ SND_GET_INFO( aica ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( aica ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( aica ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( aica ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( aica ); break; + case SNDINFO_PTR_STOP: /* 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 = "AICA"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Sega/Yamaha custom"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.0.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, "AICA"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Sega/Yamaha custom"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.0.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; } } diff --git a/src/emu/sound/astrocde.c b/src/emu/sound/astrocde.c index 2585c088a7a..ccf0202fb12 100644 --- a/src/emu/sound/astrocde.c +++ b/src/emu/sound/astrocde.c @@ -342,14 +342,14 @@ SND_GET_INFO( astrocade ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( astrocade ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( astrocade ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_STOP: /* nothing */ break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( astrocade ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Astrocade"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Bally"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "2.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, "Astrocade"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Bally"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "2.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; } } diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index d84919fe986..bdf22cfea72 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -867,20 +867,20 @@ SND_GET_INFO( ay8910 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_AY8910; break; + case SNDINFO_INT_ALIAS: info->i = SOUND_AY8910; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ay8910 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( ay8910 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ay8910 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( ay8910 ); break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ay8910 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "AY-3-8910A"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "PSG"; 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, "AY-3-8910A"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "PSG"); 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; } } @@ -888,9 +888,9 @@ SND_GET_INFO( ay8912 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; - case SNDINFO_STR_NAME: info->s = "AY-3-8912A"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "AY-3-8912A"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -898,9 +898,9 @@ SND_GET_INFO( ay8913 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; - case SNDINFO_STR_NAME: info->s = "AY-3-8913A"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "AY-3-8913A"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -908,9 +908,9 @@ SND_GET_INFO( ay8930 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; - case SNDINFO_STR_NAME: info->s = "AY8930"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ay8910 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "AY8930"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -918,9 +918,9 @@ SND_GET_INFO( ym2149 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; - case SNDINFO_STR_NAME: info->s = "YM2149"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "YM2149"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -928,9 +928,9 @@ SND_GET_INFO( ym3439 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; - case SNDINFO_STR_NAME: info->s = "YM3439"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "YM3439"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -938,9 +938,9 @@ SND_GET_INFO( ymz284 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; - case SNDINFO_STR_NAME: info->s = "YMZ284"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "YMZ284"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } @@ -948,9 +948,9 @@ SND_GET_INFO( ymz294 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; - case SNDINFO_STR_NAME: info->s = "YMZ294"; break; - default: SND_GET_INFO_CALL(ay8910); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ym2149 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "YMZ294"); break; + default: SND_GET_INFO_CALL(ay8910); break; } } diff --git a/src/emu/sound/beep.c b/src/emu/sound/beep.c index e8d3767b0ad..e57f3b49cfe 100644 --- a/src/emu/sound/beep.c +++ b/src/emu/sound/beep.c @@ -182,16 +182,16 @@ SND_GET_INFO( beep ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( beep ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( beep ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( beep ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( beep ); break; + case SNDINFO_PTR_STOP: /* 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 = "Beep"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Beep"; 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 The MESS Team"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "Beep"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Beep"); 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 The MESS Team"); break; } } diff --git a/src/emu/sound/bsmt2000.c b/src/emu/sound/bsmt2000.c index def48e4da10..74d3e18428d 100644 --- a/src/emu/sound/bsmt2000.c +++ b/src/emu/sound/bsmt2000.c @@ -504,14 +504,14 @@ SND_GET_INFO( bsmt2000 ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( bsmt2000 ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( bsmt2000 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_STOP: /* nothing */ break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( bsmt2000 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "BSMT2000"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Data East Wavetable"; 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, "BSMT2000"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Data East Wavetable"); 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; } } diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c index 548c1be45f4..a70718de926 100644 --- a/src/emu/sound/c140.c +++ b/src/emu/sound/c140.c @@ -516,17 +516,17 @@ SND_GET_INFO( c140 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c140 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( c140 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c140 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( c140 ); break; + case SNDINFO_PTR_STOP: /* 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 = "C140"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco PCM"; 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, "C140"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco PCM"); 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; } } diff --git a/src/emu/sound/c352.c b/src/emu/sound/c352.c index c14304fe932..05ad81b6d3e 100644 --- a/src/emu/sound/c352.c +++ b/src/emu/sound/c352.c @@ -593,17 +593,17 @@ SND_GET_INFO( c352 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c352 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( c352 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c352 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( c352 ); break; + case SNDINFO_PTR_STOP: /* 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 = "C352"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco PCM"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "C352"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco PCM"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c index 82c1f035a98..72ac1adaa4f 100644 --- a/src/emu/sound/c6280.c +++ b/src/emu/sound/c6280.c @@ -350,17 +350,17 @@ SND_GET_INFO( c6280 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c6280 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( c6280 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( c6280 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( c6280 ); break; + case SNDINFO_PTR_STOP: /* 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 = "HuC6280"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "????"; 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, "HuC6280"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "????"); 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; } } diff --git a/src/emu/sound/cdda.c b/src/emu/sound/cdda.c index 009d099f0a6..04ee0a9185a 100644 --- a/src/emu/sound/cdda.c +++ b/src/emu/sound/cdda.c @@ -316,17 +316,17 @@ SND_GET_INFO( cdda ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cdda ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( cdda ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cdda ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( cdda ); break; + case SNDINFO_PTR_STOP: /* 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 = "CD/DA"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "CD Audio"; 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, "CD/DA"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "CD Audio"); 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; } } diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c index 8dc3af14a4c..9b9afe6bed5 100644 --- a/src/emu/sound/cdp1869.c +++ b/src/emu/sound/cdp1869.c @@ -188,16 +188,16 @@ SND_GET_INFO( cdp1869 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cdp1869 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( cdp1869 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cdp1869 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( cdp1869 ); break; + case SNDINFO_PTR_STOP: /* 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 = "CDP1869"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "RCA CDP1869"; 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, "CDP1869"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "RCA CDP1869"); 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; } } diff --git a/src/emu/sound/cem3394.c b/src/emu/sound/cem3394.c index 5f058f641a4..38d89b87a46 100644 --- a/src/emu/sound/cem3394.c +++ b/src/emu/sound/cem3394.c @@ -577,17 +577,17 @@ SND_GET_INFO( cem3394 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cem3394 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( cem3394 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( cem3394 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( cem3394 ); break; + case SNDINFO_PTR_STOP: /* 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 = "CEM3394"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Analog Synth"; 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, "CEM3394"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Analog Synth"); 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; } } diff --git a/src/emu/sound/custom.c b/src/emu/sound/custom.c index e2edec48088..3cbe58283b0 100644 --- a/src/emu/sound/custom.c +++ b/src/emu/sound/custom.c @@ -74,17 +74,17 @@ SND_GET_INFO( custom ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( custom ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( custom ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( custom ); break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( custom ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( custom ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( custom ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( custom ); break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( custom ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Custom"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "None"; 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, "Custom"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "None"); 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; } } diff --git a/src/emu/sound/dac.c b/src/emu/sound/dac.c index fa30aefc338..39fc9d0a8e4 100644 --- a/src/emu/sound/dac.c +++ b/src/emu/sound/dac.c @@ -171,17 +171,17 @@ SND_GET_INFO( dac ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( dac ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( dac ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( dac ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( dac ); break; + case SNDINFO_PTR_STOP: /* 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 = "DAC"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI Speech"; 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, "DAC"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "DAC"); 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; } } diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index 0de541d2aa4..31131344bc6 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -764,11 +764,11 @@ SND_GET_INFO( discrete ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( discrete ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Discrete"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Analog"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "Discrete"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Analog"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } diff --git a/src/emu/sound/dmadac.c b/src/emu/sound/dmadac.c index 9e2eeffb2d8..dd72f1d48d7 100644 --- a/src/emu/sound/dmadac.c +++ b/src/emu/sound/dmadac.c @@ -251,17 +251,17 @@ SND_GET_INFO( dmadac ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( dmadac ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( dmadac ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( dmadac ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( dmadac ); break; + case SNDINFO_PTR_STOP: /* 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 = "DMA-driven DAC"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "DAC"; 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, "DMA-driven DAC"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "DAC"); 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; } } diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c index 2cf6f3c1903..571e3769fd7 100644 --- a/src/emu/sound/es5503.c +++ b/src/emu/sound/es5503.c @@ -534,17 +534,17 @@ SND_GET_INFO( es5503 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( es5503 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( es5503 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( es5503 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( es5503 ); break; + case SNDINFO_PTR_STOP: /* 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 = "ES5503"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq ES550x"; 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 R. Belmont"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "ES5503"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Ensoniq ES550x"); 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 R. Belmont"); break; } } diff --git a/src/emu/sound/es5506.c b/src/emu/sound/es5506.c index 42812101117..daefc39e724 100644 --- a/src/emu/sound/es5506.c +++ b/src/emu/sound/es5506.c @@ -2167,11 +2167,11 @@ SND_GET_INFO( es5505 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( es5505 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "ES5505"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq Wavetable"; 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, "ES5505"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Ensoniq Wavetable"); 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; } } @@ -2202,11 +2202,11 @@ SND_GET_INFO( es5506 ) case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( es5506 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "ES5506"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Ensoniq Wavetable"; 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, "ES5506"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Ensoniq Wavetable"); 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; } } diff --git a/src/emu/sound/es8712.c b/src/emu/sound/es8712.c index 79113f528a1..312ff7e65ef 100644 --- a/src/emu/sound/es8712.c +++ b/src/emu/sound/es8712.c @@ -452,17 +452,17 @@ SND_GET_INFO( es8712 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( es8712 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( es8712 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( es8712 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( es8712 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( es8712 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( es8712 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "ES8712"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Excellent Systems ADPCM"; 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, "ES8712"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Excellent Systems ADPCM"); 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; } } diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c index 5fbb5bba61c..c87f2367f78 100644 --- a/src/emu/sound/flt_rc.c +++ b/src/emu/sound/flt_rc.c @@ -134,15 +134,15 @@ SND_GET_INFO( filter_rc ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( filter_rc ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( filter_rc ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_STOP: /* 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 = "RC Filter"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Filters"; 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, "RC Filter"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Filters"); 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; } } diff --git a/src/emu/sound/flt_vol.c b/src/emu/sound/flt_vol.c index c2457e5199b..111b076f97f 100644 --- a/src/emu/sound/flt_vol.c +++ b/src/emu/sound/flt_vol.c @@ -65,16 +65,16 @@ SND_GET_INFO( filter_volume ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( filter_volume ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( filter_volume ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( filter_volume ); break; + case SNDINFO_PTR_STOP: /* 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 = "Volume Filter"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Filters"; 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, "Volume Filter"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Filters"); 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; } } 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; } } 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; } } diff --git a/src/emu/sound/ics2115.c b/src/emu/sound/ics2115.c index eb205991ac2..c89e3634bb0 100644 --- a/src/emu/sound/ics2115.c +++ b/src/emu/sound/ics2115.c @@ -556,17 +556,17 @@ SND_GET_INFO( ics2115 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ics2115 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( ics2115 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ics2115 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ics2115 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ics2115 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ics2115 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "ICS2115"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "ICS"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.01"; 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, "ICS2115"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "ICS"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.01"); 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; } } diff --git a/src/emu/sound/iremga20.c b/src/emu/sound/iremga20.c index 0bd4dba1297..f89e2e406fa 100644 --- a/src/emu/sound/iremga20.c +++ b/src/emu/sound/iremga20.c @@ -288,17 +288,17 @@ SND_GET_INFO( iremga20 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( iremga20 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( iremga20 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( iremga20 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( iremga20 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( iremga20 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( iremga20 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Irem GA20"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Irem 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, "Irem GA20"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Irem 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; } } diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index a969c59ac91..e2ef977611e 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -268,17 +268,17 @@ SND_GET_INFO( k005289 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k005289 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( k005289 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k005289 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( k005289 ); break; + case SNDINFO_PTR_STOP: /* 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 = "K005289"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Konami 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, "K005289"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Konami 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; } } diff --git a/src/emu/sound/k007232.c b/src/emu/sound/k007232.c index a984dccddf6..47b06e7d709 100644 --- a/src/emu/sound/k007232.c +++ b/src/emu/sound/k007232.c @@ -494,17 +494,17 @@ SND_GET_INFO( k007232 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k007232 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( k007232 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k007232 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( k007232 ); break; + case SNDINFO_PTR_STOP: /* 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 = "K007232"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Konami 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, "K007232"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Konami 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; } } diff --git a/src/emu/sound/k051649.c b/src/emu/sound/k051649.c index 2a5a7e4240d..4814d4cc403 100644 --- a/src/emu/sound/k051649.c +++ b/src/emu/sound/k051649.c @@ -239,17 +239,17 @@ SND_GET_INFO( k051649 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k051649 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( k051649 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( k051649 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k051649 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( k051649 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( k051649 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "K051649"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Konami 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, "K051649"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Konami 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; } } diff --git a/src/emu/sound/k053260.c b/src/emu/sound/k053260.c index b6bf0ef40ae..7c889863a6e 100644 --- a/src/emu/sound/k053260.c +++ b/src/emu/sound/k053260.c @@ -482,17 +482,17 @@ SND_GET_INFO( k053260 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k053260 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( k053260 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( k053260); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k053260 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( k053260 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( k053260); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "K053260"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Konami 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, "K053260"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Konami 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; } } diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c index 09f51782ed2..69e7d57391b 100644 --- a/src/emu/sound/k054539.c +++ b/src/emu/sound/k054539.c @@ -715,17 +715,17 @@ SND_GET_INFO( k054539 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k054539 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( k054539 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( k054539 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( k054539 ); break; + case SNDINFO_PTR_STOP: /* 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 = "K054539"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Konami 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, "K054539"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Konami 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; } } diff --git a/src/emu/sound/msm5205.c b/src/emu/sound/msm5205.c index b203f3b49f4..fd7e04c6ced 100644 --- a/src/emu/sound/msm5205.c +++ b/src/emu/sound/msm5205.c @@ -318,17 +318,17 @@ SND_GET_INFO( msm5205 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( msm5205 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( msm5205 );break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( msm5205 );break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( msm5205 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( msm5205 ); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( msm5205 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "MSM5205"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "ADPCM"; 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, "MSM5205"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "ADPCM"); 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; } } diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c index ac2f83dc7a5..249be4e314b 100644 --- a/src/emu/sound/msm5232.c +++ b/src/emu/sound/msm5232.c @@ -848,17 +848,17 @@ SND_GET_INFO( msm5232 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( msm5232 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( msm5232 ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( msm5232 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( msm5232 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( msm5232 ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( msm5232 ); break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( msm5232 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "MSM5232"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Oki Tone"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "MSM5232"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Oki Tone"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index cfa23cf974a..55255981199 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -709,17 +709,17 @@ SND_GET_INFO( multipcm ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( multipcm ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( multipcm ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( multipcm ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( multipcm ); break; + case SNDINFO_PTR_STOP: /* 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 = "Sega/Yamaha 315-5560"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Sega custom"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "2.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, "Sega/Yamaha 315-5560"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Sega custom"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "2.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; } } diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index a4c0bb1fe4e..f7935cbdbdc 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -177,15 +177,15 @@ SND_GET_INFO( namco_63701x ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco_63701x ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( namco_63701x ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_STOP: /* 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 = "Namco 63701X"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco 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, "Namco 63701X"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco 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; } } diff --git a/src/emu/sound/namco.c b/src/emu/sound/namco.c index f0584237f89..883906aa422 100644 --- a/src/emu/sound/namco.c +++ b/src/emu/sound/namco.c @@ -820,17 +820,17 @@ SND_GET_INFO( namco ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( namco ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( namco ); break; + case SNDINFO_PTR_STOP: /* 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 = "Namco"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco 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, "Namco"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco 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; } } @@ -856,15 +856,15 @@ SND_GET_INFO( namco_15xx ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco_15xx ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( namco ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_STOP: /* 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 = "Namco 15XX"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco 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, "Namco 15XX"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco 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; } } @@ -890,15 +890,15 @@ SND_GET_INFO( namco_cus30 ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco_cus30 ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( namco ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_STOP: /* 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 = "Namco CUS30"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco 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, "Namco CUS30"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco 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; } } diff --git a/src/emu/sound/namco52.c b/src/emu/sound/namco52.c index c2bee47c0a3..4c587eda65d 100644 --- a/src/emu/sound/namco52.c +++ b/src/emu/sound/namco52.c @@ -217,15 +217,15 @@ SND_GET_INFO( namco_52xx ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco_52xx ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( namco_52xx ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; + case SNDINFO_PTR_STOP: /* Nothing */ break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( namco_52xx ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Namco 52XX"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Namco 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, "Namco 52XX"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Namco 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; } } diff --git a/src/emu/sound/nes_apu.c b/src/emu/sound/nes_apu.c index a96741bb5e4..839c5f71df4 100644 --- a/src/emu/sound/nes_apu.c +++ b/src/emu/sound/nes_apu.c @@ -776,17 +776,17 @@ SND_GET_INFO( nesapu ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( nesapu ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( nesapu ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( nesapu ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( nesapu ); break; + case SNDINFO_PTR_STOP: /* 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 = "N2A03"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Nintendo 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, "N2A03"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Nintendo 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; } } diff --git a/src/emu/sound/nile.c b/src/emu/sound/nile.c index 32c9bf11927..188b9d4bf2b 100644 --- a/src/emu/sound/nile.c +++ b/src/emu/sound/nile.c @@ -252,17 +252,17 @@ SND_GET_INFO( nile ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( nile ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( nile ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( nile ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( nile ); break; + case SNDINFO_PTR_STOP: /* 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 = "NiLe"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Seta 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, "NiLe"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Seta 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; } } diff --git a/src/emu/sound/okim6258.c b/src/emu/sound/okim6258.c index ed061176e6b..1ffa1db9757 100644 --- a/src/emu/sound/okim6258.c +++ b/src/emu/sound/okim6258.c @@ -478,16 +478,16 @@ SND_GET_INFO( okim6258 ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME(okim6258); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME(okim6258); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME(okim6258); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME(okim6258); break; + case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME(okim6258); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "OKI6258"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "OKI ADPCM"; 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, "OKI6258"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "OKI ADPCM"); 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; } } diff --git a/src/emu/sound/okim6295.c b/src/emu/sound/okim6295.c index 3feaa850f39..a4253c46fef 100644 --- a/src/emu/sound/okim6295.c +++ b/src/emu/sound/okim6295.c @@ -670,15 +670,15 @@ SND_GET_INFO( okim6295 ) /* --- the following bits of info are returned as pointers to data or functions --- */ case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( okim6295 ); break; case SNDINFO_PTR_START: info->start = SND_START_NAME( okim6295 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; + case SNDINFO_PTR_STOP: /* nothing */ break; case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( okim6295 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "OKI6295"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "OKI ADPCM"; 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, "OKI6295"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "OKI ADPCM"); 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; } } diff --git a/src/emu/sound/pokey.c b/src/emu/sound/pokey.c index 2d576a4f22d..2ecafef7f1e 100644 --- a/src/emu/sound/pokey.c +++ b/src/emu/sound/pokey.c @@ -1529,17 +1529,17 @@ SND_GET_INFO( pokey ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( pokey ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( pokey ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( pokey ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( pokey ); break; + case SNDINFO_PTR_STOP: /* 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 = "POKEY"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Atari custom"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "4.51"; 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, "POKEY"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Atari custom"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "4.51"); 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; } } diff --git a/src/emu/sound/psx.c b/src/emu/sound/psx.c index f126e4151ad..7c965529fb3 100644 --- a/src/emu/sound/psx.c +++ b/src/emu/sound/psx.c @@ -686,17 +686,17 @@ SND_GET_INFO( psxspu ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( psxspu ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( psxspu ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( psxspu ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( psxspu ); break; + case SNDINFO_PTR_STOP: /* 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 = "SPU"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Sony 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, "SPU"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Sony 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; } } diff --git a/src/emu/sound/qsound.c b/src/emu/sound/qsound.c index 8c0ff014bdf..1b22b009c41 100644 --- a/src/emu/sound/qsound.c +++ b/src/emu/sound/qsound.c @@ -385,17 +385,17 @@ SND_GET_INFO( qsound ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( qsound ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( qsound ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( qsound ); break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( qsound ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( qsound ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( qsound ); break; + case SNDINFO_PTR_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "Q-Sound"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Capcom 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, "Q-Sound"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Capcom 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; } } diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c index 708bba8bef4..b93b1636252 100644 --- a/src/emu/sound/rf5c400.c +++ b/src/emu/sound/rf5c400.c @@ -582,16 +582,16 @@ SND_GET_INFO( rf5c400 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( rf5c400 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( rf5c400 ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( rf5c400 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( rf5c400 ); break; + case SNDINFO_PTR_STOP: /* 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 = "RF5C400"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Ricoh PCM"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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 & hoot development team"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "RF5C400"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Ricoh PCM"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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 & hoot development team"); break; } } diff --git a/src/emu/sound/rf5c68.c b/src/emu/sound/rf5c68.c index 8cad4434b18..a5c6023167a 100644 --- a/src/emu/sound/rf5c68.c +++ b/src/emu/sound/rf5c68.c @@ -243,17 +243,17 @@ SND_GET_INFO( rf5c68 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( rf5c68 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( rf5c68 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( rf5c68 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( rf5c68 ); break; + case SNDINFO_PTR_STOP: /* 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 = "RF5C68"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Ricoh PCM"; 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, "RF5C68"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Ricoh PCM"); 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; } } diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index ca0f63ce0b3..8fc3d79de45 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -639,10 +639,10 @@ SND_GET_INFO( s14001a ) case SNDINFO_PTR_START: info->start = SND_START_NAME( s14001a ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "S14001A"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TSI S14001A"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.31"; break; - case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; - case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright Jonathan Gevaryahu"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "S14001A"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TSI S14001A"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.31"); break; + case SNDINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; + case SNDINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Jonathan Gevaryahu"); break; } } diff --git a/src/emu/sound/saa1099.c b/src/emu/sound/saa1099.c index 1d0f931ff4b..127a64edc3b 100644 --- a/src/emu/sound/saa1099.c +++ b/src/emu/sound/saa1099.c @@ -506,17 +506,17 @@ SND_GET_INFO( saa1099 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( saa1099 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( saa1099 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( saa1099 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( saa1099 ); break; + case SNDINFO_PTR_STOP: /* 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 = "SAA1099"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Philips"; 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, "SAA1099"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Philips"); 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; } } diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c index e04b16f9ea8..499f7351c51 100644 --- a/src/emu/sound/samples.c +++ b/src/emu/sound/samples.c @@ -598,17 +598,17 @@ SND_GET_INFO( samples ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( samples ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( samples ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( samples ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( samples ); break; + case SNDINFO_PTR_STOP: /* 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 = "Samples"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Big Hack"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "Samples"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Big Hack"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index 6c6aad26316..3375fb5e975 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -1387,17 +1387,17 @@ SND_GET_INFO( scsp ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( scsp ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( scsp ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( scsp ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( scsp ); break; + case SNDINFO_PTR_STOP: /* 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 = "SCSP"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Sega/Yamaha custom"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "2.1.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, "SCSP"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Sega/Yamaha custom"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "2.1.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; } } diff --git a/src/emu/sound/segapcm.c b/src/emu/sound/segapcm.c index 3dbb0e1cd84..61b8cbc6d17 100644 --- a/src/emu/sound/segapcm.c +++ b/src/emu/sound/segapcm.c @@ -146,16 +146,16 @@ SND_GET_INFO( segapcm ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( segapcm ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( segapcm ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( segapcm ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( segapcm ); break; + case SNDINFO_PTR_STOP: /* 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 = "Sega PCM"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Sega 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, "Sega PCM"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Sega 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; } } diff --git a/src/emu/sound/sid6581.c b/src/emu/sound/sid6581.c index 72886adac34..c83c9f2ccb1 100644 --- a/src/emu/sound/sid6581.c +++ b/src/emu/sound/sid6581.c @@ -115,17 +115,17 @@ SND_GET_INFO( sid6581 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sid6581 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( sid6581 ); break; - case SNDINFO_PTR_STOP: info->stop = NULL; break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( sid ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sid6581 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sid6581 ); break; + case SNDINFO_PTR_STOP: info->stop = NULL; break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( sid ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "SID6581"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "SID"; 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 The MESS Team"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "SID6581"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "SID"); 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 The MESS Team"); break; } } @@ -135,11 +135,11 @@ SND_GET_INFO( sid8580 ) switch (state) { /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_START: info->start = SND_START_NAME( sid8580 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sid8580 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "SID8580"; break; - default: SND_GET_INFO_CALL(sid6581); break; + case SNDINFO_STR_NAME: strcpy(info->s, "SID8580"); break; + default: SND_GET_INFO_CALL(sid6581); break; } } diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c index 1306e2fdd65..3ba5f6dc41a 100644 --- a/src/emu/sound/sn76477.c +++ b/src/emu/sound/sn76477.c @@ -2476,11 +2476,11 @@ SND_GET_INFO( sn76477 ) { case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76477 ); break; case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( sn76477 ); break; - case SNDINFO_STR_NAME: info->s = "SN76477"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Analog"; 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, "SN76477"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Analog"); 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; } } diff --git a/src/emu/sound/sn76496.c b/src/emu/sound/sn76496.c index 7ecd307b051..7b8819269b4 100644 --- a/src/emu/sound/sn76496.c +++ b/src/emu/sound/sn76496.c @@ -392,20 +392,20 @@ SND_GET_INFO( sn76496 ) switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ - case SNDINFO_INT_ALIAS: info->i = SOUND_SN76496; break; + case SNDINFO_INT_ALIAS: info->i = SOUND_SN76496; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sn76496 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76496 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sn76496 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76496 ); break; + case SNDINFO_PTR_STOP: /* 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 = "SN76496"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "SN76496"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TI PSG"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } @@ -413,9 +413,9 @@ SND_GET_INFO( sn76489 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76489 ); break; - case SNDINFO_STR_NAME: info->s = "SN76489"; break; - default: SND_GET_INFO_CALL(sn76496); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76489 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "SN76489"); break; + default: SND_GET_INFO_CALL(sn76496); break; } } @@ -423,9 +423,9 @@ SND_GET_INFO( sn76489a ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76489a ); break; - case SNDINFO_STR_NAME: info->s = "SN76489A"; break; - default: SND_GET_INFO_CALL(sn76496); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76489a ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "SN76489A"); break; + default: SND_GET_INFO_CALL(sn76496); break; } } @@ -433,9 +433,9 @@ SND_GET_INFO( sn76494 ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76494 ); break; - case SNDINFO_STR_NAME: info->s = "SN76494"; break; - default: SND_GET_INFO_CALL(sn76496); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sn76494 ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "SN76494"); break; + default: SND_GET_INFO_CALL(sn76496); break; } } @@ -443,9 +443,9 @@ SND_GET_INFO( gamegear ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( gamegear ); break; - case SNDINFO_STR_NAME: info->s = "Game Gear PSG"; break; - default: SND_GET_INFO_CALL(sn76496); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( gamegear ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "Game Gear PSG"); break; + default: SND_GET_INFO_CALL(sn76496); break; } } @@ -453,8 +453,8 @@ SND_GET_INFO( smsiii ) { switch (state) { - case SNDINFO_PTR_START: info->start = SND_START_NAME( smsiii ); break; - case SNDINFO_STR_NAME: info->s = "SMSIII PSG"; break; - default: SND_GET_INFO_CALL(sn76496); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( smsiii ); break; + case SNDINFO_STR_NAME: strcpy(info->s, "SMSIII PSG"); break; + default: SND_GET_INFO_CALL(sn76496); break; } } diff --git a/src/emu/sound/snkwave.c b/src/emu/sound/snkwave.c index 14205b09ecb..621ee12337a 100644 --- a/src/emu/sound/snkwave.c +++ b/src/emu/sound/snkwave.c @@ -179,16 +179,16 @@ SND_GET_INFO( snkwave ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( snkwave ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( snkwave ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( snkwave ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( snkwave ); break; + case SNDINFO_PTR_STOP: /* 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 = "SNK Wave"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "SNK Wave"; 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, "SNK Wave"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "SNK Wave"); 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; } } diff --git a/src/emu/sound/sp0250.c b/src/emu/sound/sp0250.c index 90f31bd044e..8074aeb0878 100644 --- a/src/emu/sound/sp0250.c +++ b/src/emu/sound/sp0250.c @@ -241,17 +241,17 @@ SND_GET_INFO( sp0250 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sp0250 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( sp0250 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sp0250 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sp0250 ); break; + case SNDINFO_PTR_STOP: /* 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 = "SP0250"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "GI speech"; break; - case SNDINFO_STR_CORE_VERSION: info->s = "1.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, "SP0250"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "GI speech"); break; + case SNDINFO_STR_CORE_VERSION: strcpy(info->s, "1.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; } } diff --git a/src/emu/sound/sp0256.c b/src/emu/sound/sp0256.c index fc595277ea5..deedd736bd3 100644 --- a/src/emu/sound/sp0256.c +++ b/src/emu/sound/sp0256.c @@ -1362,17 +1362,17 @@ SND_GET_INFO( sp0256 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sp0256 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( sp0256 ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( sp0256 ); break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( sp0256 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( sp0256 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( sp0256 ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( sp0256 ); break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( sp0256 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "SP0256"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "GI"; 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 Joseph Zbiciak, tim lindner"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "SP0256"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "GI"); 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 Joseph Zbiciak, tim lindner"); break; } } diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c index 3f636d184bc..cf2c154c83a 100644 --- a/src/emu/sound/speaker.c +++ b/src/emu/sound/speaker.c @@ -89,16 +89,16 @@ SND_GET_INFO( speaker ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( speaker ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( speaker ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( speaker ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( speaker ); break; + case SNDINFO_PTR_STOP: /* 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 = "Speaker"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Speaker"; 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 The MESS Team"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "Speaker"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Speaker"); 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 The MESS Team"); break; } } diff --git a/src/emu/sound/st0016.c b/src/emu/sound/st0016.c index 724623a171c..83b64ae11ce 100644 --- a/src/emu/sound/st0016.c +++ b/src/emu/sound/st0016.c @@ -161,17 +161,17 @@ SND_GET_INFO( st0016 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( st0016 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( st0016 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( st0016 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( st0016 ); break; + case SNDINFO_PTR_STOP: /* 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 = "ST0016"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Seta 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, "ST0016"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Seta 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; } } diff --git a/src/emu/sound/tiaintf.c b/src/emu/sound/tiaintf.c index 8688ae7708d..7278b52bbb0 100644 --- a/src/emu/sound/tiaintf.c +++ b/src/emu/sound/tiaintf.c @@ -69,17 +69,17 @@ SND_GET_INFO( tia ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tia ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( tia ); break; - case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tia ); break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tia ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tia ); break; + case SNDINFO_PTR_STOP: info->stop = SND_STOP_NAME( tia ); break; + case SNDINFO_PTR_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "TIA"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Atari 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, "TIA"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Atari 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; } } diff --git a/src/emu/sound/tms3615.c b/src/emu/sound/tms3615.c index 8e18fa42353..5b923472b42 100644 --- a/src/emu/sound/tms3615.c +++ b/src/emu/sound/tms3615.c @@ -110,16 +110,16 @@ SND_GET_INFO( tms3615 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms3615 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms3615 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms3615 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms3615 ); break; + case SNDINFO_PTR_STOP: /* 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 = "TMS3615"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; 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, "TMS3615"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TI PSG"); 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; } } diff --git a/src/emu/sound/tms36xx.c b/src/emu/sound/tms36xx.c index bb5db06e715..bbb4a875f33 100644 --- a/src/emu/sound/tms36xx.c +++ b/src/emu/sound/tms36xx.c @@ -544,17 +544,17 @@ SND_GET_INFO( tms36xx ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms36xx ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( tms36xx ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( tms36xx ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( tms36xx ); break; + case SNDINFO_PTR_STOP: /* 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 = "TMS36XX"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "TI PSG"; 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, "TMS36XX"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "TI PSG"); 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; } } diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index 63e83e6cff1..7b3b285d863 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -791,17 +791,17 @@ SND_GET_INFO( upd7759 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( upd7759 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( upd7759 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( upd7759 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( upd7759 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( upd7759 ); break; + case SNDINFO_PTR_STOP: /* Nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( upd7759 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "UPD7759"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "NEC ADPCM"; 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, "UPD7759"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "NEC ADPCM"); 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; } } diff --git a/src/emu/sound/vlm5030.c b/src/emu/sound/vlm5030.c index 723fd1496da..8cdbfd5b763 100644 --- a/src/emu/sound/vlm5030.c +++ b/src/emu/sound/vlm5030.c @@ -714,17 +714,17 @@ SND_GET_INFO( vlm5030 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( vlm5030 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( vlm5030 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( vlm5030 );break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( vlm5030 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( vlm5030 ); break; + case SNDINFO_PTR_STOP: /* Nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( vlm5030 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "VLM5030"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "VLM speech"; 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, "VLM5030"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "VLM speech"); 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; } } diff --git a/src/emu/sound/votrax.c b/src/emu/sound/votrax.c index eaaf9ac7d3c..285fed95fc9 100644 --- a/src/emu/sound/votrax.c +++ b/src/emu/sound/votrax.c @@ -175,17 +175,17 @@ SND_GET_INFO( votrax ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( votrax ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( votrax ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( votrax ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( votrax ); break; + case SNDINFO_PTR_STOP: /* 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 = "Votrax SC-01"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Votrax speech"; 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, "Votrax SC-01"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Votrax speech"); 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; } } diff --git a/src/emu/sound/vrender0.c b/src/emu/sound/vrender0.c index 30118770557..95e64b6d0c2 100644 --- a/src/emu/sound/vrender0.c +++ b/src/emu/sound/vrender0.c @@ -258,17 +258,17 @@ SND_GET_INFO( vrender0 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( vrender0 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( vrender0 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( vrender0 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( vrender0 ); break; + case SNDINFO_PTR_STOP: /* 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 = "VRender0"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "???"; 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, "VRender0"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "???"); 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; } } diff --git a/src/emu/sound/wave.c b/src/emu/sound/wave.c index bc452a9565e..2456f4caa3f 100644 --- a/src/emu/sound/wave.c +++ b/src/emu/sound/wave.c @@ -89,16 +89,16 @@ SND_GET_INFO( wave ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( wave ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( wave ); break; - case SNDINFO_PTR_STOP: /* nothing */ break; - case SNDINFO_PTR_RESET: /* nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( wave ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( wave ); break; + case SNDINFO_PTR_STOP: /* 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 = "Cassette"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Cassette"; 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 The MESS Team"; break; + case SNDINFO_STR_NAME: strcpy(info->s, "Cassette"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Cassette"); 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 The MESS Team"); break; } } diff --git a/src/emu/sound/x1_010.c b/src/emu/sound/x1_010.c index 8883dd68977..0d00d72fefe 100644 --- a/src/emu/sound/x1_010.c +++ b/src/emu/sound/x1_010.c @@ -304,17 +304,17 @@ SND_GET_INFO( x1_010 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( x1_010 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( x1_010 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( x1_010 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( x1_010 ); break; + case SNDINFO_PTR_STOP: /* 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 = "X1-010"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Seta 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, "X1-010"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Seta 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; } } diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index 2e63e266656..a1c755c8e2d 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -1829,16 +1829,16 @@ SND_GET_INFO( ymf271 ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymf271 ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( ymf271 ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ymf271 ); break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymf271 ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ymf271 ); break; + case SNDINFO_PTR_STOP: /* Nothing */ break; + case SNDINFO_PTR_RESET: info->reset = SND_RESET_NAME( ymf271 ); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case SNDINFO_STR_NAME: info->s = "YMF271"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YMF271"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/ymf278b.c b/src/emu/sound/ymf278b.c index 0c40142d493..47c52ca04ef 100644 --- a/src/emu/sound/ymf278b.c +++ b/src/emu/sound/ymf278b.c @@ -808,17 +808,17 @@ SND_GET_INFO( ymf278b ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymf278b ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( ymf278b ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymf278b ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ymf278b ); break; + case SNDINFO_PTR_STOP: /* 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 = "YMF278B"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha FM"; 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, "YMF278B"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha FM"); 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; } } diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c index 61c3dd59e7c..8a4435a5e4d 100644 --- a/src/emu/sound/ymz280b.c +++ b/src/emu/sound/ymz280b.c @@ -1118,17 +1118,17 @@ SND_GET_INFO( ymz280b ) /* --- the following bits of info are returned as 64-bit signed integers --- */ /* --- the following bits of info are returned as pointers to data or functions --- */ - case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymz280b ); break; - case SNDINFO_PTR_START: info->start = SND_START_NAME( ymz280b ); break; - case SNDINFO_PTR_STOP: /* Nothing */ break; - case SNDINFO_PTR_RESET: /* Nothing */ break; + case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( ymz280b ); break; + case SNDINFO_PTR_START: info->start = SND_START_NAME( ymz280b ); break; + case SNDINFO_PTR_STOP: /* 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 = "YMZ280B"; break; - case SNDINFO_STR_CORE_FAMILY: info->s = "Yamaha Wavetable"; 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, "YMZ280B"); break; + case SNDINFO_STR_CORE_FAMILY: strcpy(info->s, "Yamaha Wavetable"); 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; } } diff --git a/src/emu/timer.c b/src/emu/timer.c index b0dd3487b82..7b21f45cf49 100644 --- a/src/emu/timer.c +++ b/src/emu/timer.c @@ -1290,10 +1290,10 @@ DEVICE_GET_INFO( timer ) case DEVINFO_FCT_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Generic"; break; - case DEVINFO_STR_FAMILY: info->s = "Timer"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Generic"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Timer"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/video.c b/src/emu/video.c index a5343af5249..baec345afe5 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -1334,11 +1334,11 @@ DEVICE_GET_INFO( video_screen ) case DEVINFO_FCT_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Raster"; break; - case DEVINFO_STR_FAMILY: info->s = "Video Screen"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Raster"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Video Screen"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/video/cdp1869.c b/src/emu/video/cdp1869.c index 879b74983ab..d242b6a9924 100644 --- a/src/emu/video/cdp1869.c +++ b/src/emu/video/cdp1869.c @@ -872,10 +872,10 @@ DEVICE_GET_INFO( cdp1869_video ) case DEVINFO_FCT_RESET: /* Nothing */ break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "RCA CDP1869"; break; - case DEVINFO_STR_FAMILY: info->s = "RCA CDP1800"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "RCA CDP1869"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "RCA CDP1800"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c index 862a934f0cb..bc033e5babb 100644 --- a/src/emu/video/mc6845.c +++ b/src/emu/video/mc6845.c @@ -916,11 +916,11 @@ DEVICE_GET_INFO( mc6845 ) case DEVINFO_FCT_VALIDITY_CHECK: info->validity_check = DEVICE_VALIDITY_CHECK_NAME(mc6845); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Motorola 6845"; break; - case DEVINFO_STR_FAMILY: info->s = "MC6845 CRTC"; break; - case DEVINFO_STR_VERSION: info->s = "1.61"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Motorola 6845"); break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "MC6845 CRTC"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.61"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } @@ -930,7 +930,7 @@ DEVICE_GET_INFO( mc6845_1 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Motorla 6845-1"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Motorla 6845-1"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(mc6845_1); break; @@ -945,7 +945,7 @@ DEVICE_GET_INFO( c6545_1 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "MOS Technology 6545-1"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "MOS Technology 6545-1"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(c6545_1); break; @@ -960,7 +960,7 @@ DEVICE_GET_INFO( r6545_1 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Rockwell 6545-1"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Rockwell 6545-1"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(r6545_1); break; @@ -975,7 +975,7 @@ DEVICE_GET_INFO( h46505 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Hitachi 46505"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Hitachi 46505"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(h46505); break; @@ -990,7 +990,7 @@ DEVICE_GET_INFO( hd6845 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Hitachi 6845"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Hitachi 6845"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(hd6845); break; @@ -1005,7 +1005,7 @@ DEVICE_GET_INFO( sy6545_1 ) switch (state) { /* --- the following bits of info are returned as NULL-terminated strings --- */ - case DEVINFO_STR_NAME: info->s = "Synertek 6545-1"; break; + case DEVINFO_STR_NAME: strcpy(info->s, "Synertek 6545-1"); break; /* --- the following bits of info are returned as pointers to data or functions --- */ case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(sy6545_1); break; diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index a22a7e549b8..01464cbddac 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -4682,16 +4682,16 @@ DEVICE_GET_INFO( voodoo ) switch (config->type) { default: - case VOODOO_1: info->s = "3dfx Voodoo Graphics"; break; - case VOODOO_2: info->s = "3dfx Voodoo 2"; break; - case VOODOO_BANSHEE: info->s = "3dfx Voodoo Banshee"; break; - case VOODOO_3: info->s = "3dfx Voodoo 3"; break; + case VOODOO_1: strcpy(info->s, "3dfx Voodoo Graphics");break; + case VOODOO_2: strcpy(info->s, "3dfx Voodoo 2"); break; + case VOODOO_BANSHEE: strcpy(info->s, "3dfx Voodoo Banshee"); break; + case VOODOO_3: strcpy(info->s, "3dfx Voodoo 3"); break; } break; - case DEVINFO_STR_FAMILY: info->s = "3dfx Voodoo Graphics"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "3dfx Voodoo Graphics");break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } } diff --git a/src/mame/machine/fddebug.c b/src/mame/machine/fddebug.c index 6ba4a9b10df..690dda9549b 100644 --- a/src/mame/machine/fddebug.c +++ b/src/mame/machine/fddebug.c @@ -109,7 +109,6 @@ #include "deprecat.h" #include "machine/fd1094.h" #include "cpu/m68000/m68kcpu.h" -#undef REG_PC #include "debug/debugcmd.h" #include "debug/debugcon.h" @@ -1041,7 +1040,7 @@ static void execute_fdpc(running_machine *machine, int ref, int params, const ch newpc = cpu_get_pc(cpu); /* set the new PC */ - cpu_set_reg(cpu, REG_PC, newpc); + cpu_set_reg(cpu, REG_GENPC, newpc); /* recompute around that */ instruction_hook(cpu, newpc); @@ -1094,7 +1093,7 @@ static void execute_fdsearch(running_machine *machine, int ref, int params, cons } /* set this as our current PC and run the instruction hook */ - cpu_set_reg(space->cpu, REG_PC, pc); + cpu_set_reg(space->cpu, REG_GENPC, pc); if (instruction_hook(space->cpu, pc)) break; } diff --git a/src/mame/machine/naomibd.c b/src/mame/machine/naomibd.c index 23b699a416f..2c110a7357d 100644 --- a/src/mame/machine/naomibd.c +++ b/src/mame/machine/naomibd.c @@ -631,13 +631,13 @@ DEVICE_GET_INFO( naomibd ) switch (config->type) { default: - case ROM_BOARD: info->s = "Naomi Rom Board"; break; - case DIMM_BOARD: info->s = "Naomi Dimm Board"; break; + case ROM_BOARD: strcpy(info->s, "Naomi Rom Board"); break; + case DIMM_BOARD: strcpy(info->s, "Naomi Dimm Board"); break; } break; - case DEVINFO_STR_FAMILY: info->s = "Naomi plug-in board"; break; - case DEVINFO_STR_VERSION: info->s = "1.0"; break; - case DEVINFO_STR_SOURCE_FILE: info->s = __FILE__; break; - case DEVINFO_STR_CREDITS: info->s = "Copyright Nicola Salmoria and the MAME Team"; break; + case DEVINFO_STR_FAMILY: strcpy(info->s, "Naomi plug-in board"); break; + case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; + case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; + case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break; } }