diff options
author | 2008-07-28 09:35:36 +0000 | |
---|---|---|
committer | 2008-07-28 09:35:36 +0000 | |
commit | 27fed1ec97c24877a1b44e114d7b9776cb776e8c (patch) | |
tree | 93eb6d00131b30c475d9d60b51f1f97c09e3b98d /src/emu/sound/multipcm.c | |
parent | 1b8118822915833267718cf56b24e5218b676ca4 (diff) |
Changed the way memory regions are referenced. Instead of a single
integer value, regions are now referred to by a region class and
a region tag. The class specifies the type of region (one of CPU,
gfx, sound, user, disk, prom, pld) while the tag uniquely specifies
the region. This change required updating all the ROM region
definitions in the project to specify the class/tag instead of
region number.
Updated the core memory_region_* functions to accept a class/tag
pair. Added new memory_region_next() function to allow for iteration
over all memory regions of a given class. Added new function
memory_region_class_name() to return the name for a given CPU
memory region class.
Changed the auto-binding behavior of CPU regions. Previously, the
first CPU would auto-bind to REGION_CPU1 (that is, any ROM references
would automatically assume that they lived in the corresponding
region). Now, each CPU automatically binds to the RGNCLASS_CPU region
with the same tag as the CPU itself. This behavior required ensuring
that all previous REGION_CPU* regions were changed to RGNCLASS_CPU
with the same tag as the CPU.
Introduced a new auto-binding mechanism for sound cores. This works
similarly to the CPU binding. Each sound core that requires a memory
region now auto-binds to the RGNCLASS_SOUND with the same tag as the
sound core. In almost all cases, this allowed for the removal of the
explicit region item in the sound configuration, which in turn
allowed for many sound configurations to removed altogether.
Updated the expression engine's memory reference behavior. A recent
update expanded the scope of memory references to allow for referencing
data in non-active CPU spaces, in memory regions, and in EEPROMs.
However, this previous update required an index, which is no longer
appropriate for regions and will become increasingly less appropriate
for CPUs over time. Instead, a new syntax is supported, of the form:
"[tag.][space]size@addr", where 'tag' is an optional tag for the CPU
or memory region you wish to access, followed by a period as a
separator; 'space' is the memory address space or region class you
wish to access (p/d/i for program/data/I/O spaces; o for opcode space;
r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for
EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword.
Cleaned up ROM definition flags and removed some ugly hacks that had
existed previously. Expanded to support up to 256 BIOSes. Updated
ROM_COPY to support specifying class/tag for the source region.
Updated the address map AM_REGION macro to support specifying a
class/tag for the region.
Updated debugger windows to display the CPU and region tags where
appropriate.
Updated -listxml to output region class and tag for each ROM entry.
Diffstat (limited to 'src/emu/sound/multipcm.c')
-rw-r--r-- | src/emu/sound/multipcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c index 378a49330fa..f62f07e37e9 100644 --- a/src/emu/sound/multipcm.c +++ b/src/emu/sound/multipcm.c @@ -487,16 +487,15 @@ unsigned char MultiPCM_reg_r(int chip, int offset) return 0; } -static void *multipcm_start(int sndindex, int clock, const void *config) +static void *multipcm_start(const char *tag, int sndindex, int clock, const void *config) { struct _MultiPCM *ptChip; int i; - const struct MultiPCM_interface *intf = config; char mname[20]; ptChip=(struct _MultiPCM *)auto_malloc(sizeof(struct _MultiPCM)); - ptChip->ROM=(INT8 *)memory_region(Machine, intf->region); + ptChip->ROM=(INT8 *)memory_region(Machine, RGNCLASS_SOUND, tag); ptChip->Rate=(float) clock / MULTIPCM_CLOCKDIV; ptChip->stream = stream_create(0, 2, ptChip->Rate, ptChip, MultiPCM_update); |