diff options
author | 2010-07-03 00:12:44 +0000 | |
---|---|---|
committer | 2010-07-03 00:12:44 +0000 | |
commit | c70c5fee5a6094c5a1fbd6b25568e57b1d3a8216 (patch) | |
tree | eb0db95e2757f00a708dd4bfbf3ed4af41d943b6 /src/emu/cpu/jaguar | |
parent | 46e30c4f68c5c92b597d6b3ae9e9037d5e04efe9 (diff) |
Created CPU-specific device types for all CPUs, using new macros
DECLARE_LEGACY_CPU_DEVICE and DEFINE_LEGACY_CPU_DEVICE. Changed CPUs
to be their own device types, rather than all of type CPU with a
special internal subtype. Note that as part of this process I removed
the CPU_ prefix from the ALL-CAPS device name, so CPU_Z80 is just
plain old Z80 now. This required changing a couple of names like
8080 to I8080 so that there was an alphabetic first character.
Added memory interfaces to the list of fast-access interfaces. To do
this properly I had to add a separate method to devices which is
called immediately after construction, when it is possible to perform
dynamic_casts on fully-constructed objects. (This is just internal,
no changes necessary to the devices themselves.)
Some additional notes:
* SH2 and SH4 had typedefs that conflicted with their CPU_-less names
so I bulk renamed to structures to sh2_state and sh4_state; RB, feel
free to choose alternate names if you don't like 'em
* SCSP was caught doing something to the 3rd indexed CPU. Since several
systems that use SCSP don't even have 3 CPUs, I had no idea what
this was supposed to do, so I changed to it reference "audiocpu"
assuming that stv was the assumed target. This is really gross and
should be a configuration parameter, not a hard-coded assumption.
Diffstat (limited to 'src/emu/cpu/jaguar')
-rw-r--r-- | src/emu/cpu/jaguar/jaguar.c | 8 | ||||
-rw-r--r-- | src/emu/cpu/jaguar/jaguar.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index c7444ee4f51..d2e0afbbfca 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -251,9 +251,8 @@ static void (*const dsp_op_table[64])(jaguar_state *jaguar, UINT16 op) = INLINE jaguar_state *get_safe_token(running_device *device) { assert(device != NULL); - assert(device->type() == CPU); - assert(cpu_get_type(device) == CPU_JAGUARGPU || - cpu_get_type(device) == CPU_JAGUARDSP); + assert(device->type() == JAGUARGPU || + device->type() == JAGUARDSP); return (jaguar_state *)downcast<legacy_cpu_device *>(device)->token(); } @@ -1663,3 +1662,6 @@ CPU_GET_INFO( jaguardsp ) default: CPU_GET_INFO_CALL(jaguargpu); break; } } + +DEFINE_LEGACY_CPU_DEVICE(JAGUARGPU, jaguargpu); +DEFINE_LEGACY_CPU_DEVICE(JAGUARDSP, jaguardsp); diff --git a/src/emu/cpu/jaguar/jaguar.h b/src/emu/cpu/jaguar/jaguar.h index dfe6057237e..ef01031dce0 100644 --- a/src/emu/cpu/jaguar/jaguar.h +++ b/src/emu/cpu/jaguar/jaguar.h @@ -99,13 +99,11 @@ struct _jaguar_cpu_config PUBLIC FUNCTIONS ***************************************************************************/ -extern CPU_GET_INFO( jaguargpu ); -#define CPU_JAGUARGPU CPU_GET_INFO_NAME( jaguargpu ) +DECLARE_LEGACY_CPU_DEVICE(JAGUARGPU, jaguargpu); extern void jaguargpu_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask); extern UINT32 jaguargpu_ctrl_r(running_device *device, offs_t offset); -extern CPU_GET_INFO( jaguardsp ); -#define CPU_JAGUARDSP CPU_GET_INFO_NAME( jaguardsp ) +DECLARE_LEGACY_CPU_DEVICE(JAGUARDSP, jaguardsp); extern void jaguardsp_ctrl_w(running_device *device, offs_t offset, UINT32 data, UINT32 mem_mask); extern UINT32 jaguardsp_ctrl_r(running_device *device, offs_t offset); |