summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-03-03 16:22:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-03-03 16:22:18 +0000
commitb2593867893c69b8c04e2abb74057a5007613da3 (patch)
treed12cae63e83e8b7c9e4b521b9937a8ceb2e29241
parent12a77e490c6385c25a3103401d42c44e5d22e3d9 (diff)
Moved SH2 set info functions to direct calls.
-rw-r--r--src/emu/cpu/sh2/sh2.c17
-rw-r--r--src/emu/cpu/sh2/sh2.h37
-rw-r--r--src/emu/cpu/sh2/sh2comn.c6
-rw-r--r--src/emu/cpu/sh2/sh2comn.h1
-rw-r--r--src/emu/cpu/sh2/sh2drc.c53
-rw-r--r--src/mame/drivers/cps3.c2
-rw-r--r--src/mame/drivers/deco_mlc.c8
-rw-r--r--src/mame/drivers/megadriv.c4
-rw-r--r--src/mame/drivers/psikyosh.c20
-rw-r--r--src/mame/drivers/stv.c8
-rw-r--r--src/mame/drivers/stvinit.c243
-rw-r--r--src/mame/drivers/suprnova.c8
12 files changed, 159 insertions, 248 deletions
diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c
index 793b4e35acb..ae3736e4b9e 100644
--- a/src/emu/cpu/sh2/sh2.c
+++ b/src/emu/cpu/sh2/sh2.c
@@ -2308,11 +2308,6 @@ static CPU_SET_INFO( sh2 )
case CPUINFO_INT_REGISTER + SH2_R14: sh2->r[14] = info->i; break;
case CPUINFO_INT_REGISTER + SH2_R15: sh2->r[15] = info->i; break;
case CPUINFO_INT_REGISTER + SH2_EA: sh2->ea = info->i; break;
-
- case CPUINFO_INT_SH2_FRT_INPUT: sh2_set_frt_input(device, info->i); break;
-
- /* --- the following bits of info are set as pointers to data or functions --- */
- case CPUINFO_FCT_SH2_FTCSR_READ_CALLBACK: sh2->ftcsr_read_callback = (void (*) (UINT32 ))info->f; break;
}
}
@@ -2446,8 +2441,6 @@ CPU_GET_INFO( sh2 )
case CPUINFO_STR_REGISTER + SH2_R15: sprintf(info->s, "R15 :%08X", sh2->r[15]); break;
case CPUINFO_STR_REGISTER + SH2_EA: sprintf(info->s, "EA :%08X", sh2->ea); break;
- case CPUINFO_FCT_SH2_FTCSR_READ_CALLBACK: info->f = (genf*)sh2->ftcsr_read_callback; break;
-
}
}
@@ -2465,4 +2458,14 @@ CPU_GET_INFO( sh1 )
}
}
+void sh2drc_set_options(const device_config *device, UINT32 options)
+{
+ /* doesn't apply here */
+}
+
+void sh2drc_add_pcflush(const device_config *device, offs_t address)
+{
+ /* doesn't apply here */
+}
+
#endif
diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h
index e016255e02d..f050746eeee 100644
--- a/src/emu/cpu/sh2/sh2.h
+++ b/src/emu/cpu/sh2/sh2.h
@@ -58,38 +58,11 @@ enum
SH2_R8, SH2_R9, SH2_R10, SH2_R11, SH2_R12, SH2_R13, SH2_R14, SH2_R15, SH2_EA
};
-enum
-{
- CPUINFO_INT_SH2_FRT_INPUT = CPUINFO_INT_CPU_SPECIFIC,
-
- CPUINFO_INT_SH2_DRC_OPTIONS,
-
- CPUINFO_INT_SH2_FASTRAM_SELECT,
- CPUINFO_INT_SH2_FASTRAM_START,
- CPUINFO_INT_SH2_FASTRAM_END,
- CPUINFO_INT_SH2_FASTRAM_READONLY,
-
- CPUINFO_INT_SH2_HOTSPOT_SELECT,
- CPUINFO_INT_SH2_HOTSPOT_PC,
- CPUINFO_INT_SH2_HOTSPOT_OPCODE,
- CPUINFO_INT_SH2_HOTSPOT_CYCLES,
-
- CPUINFO_INT_SH2_PCFLUSH_SELECT,
- CPUINFO_INT_SH2_PCFLUSH_ADDR
-};
-
-enum
-{
- CPUINFO_FCT_SH2_FTCSR_READ_CALLBACK = CPUINFO_FCT_CPU_SPECIFIC,
-
- CPUINFO_PTR_SH2_FASTRAM_BASE = CPUINFO_PTR_CPU_SPECIFIC
-};
-
typedef struct _sh2_cpu_core sh2_cpu_core;
struct _sh2_cpu_core
{
- int is_slave;
- int (*dma_callback_kludge)(UINT32 src, UINT32 dst, UINT32 data, int size);
+ int is_slave;
+ int (*dma_callback_kludge)(UINT32 src, UINT32 dst, UINT32 data, int size);
};
extern CPU_GET_INFO( sh1 );
@@ -101,6 +74,9 @@ extern CPU_GET_INFO( sh2 );
WRITE32_HANDLER( sh2_internal_w );
READ32_HANDLER( sh2_internal_r );
+void sh2_set_ftcsr_read_callback(const device_config *device, void (*callback)(UINT32));
+void sh2_set_frt_input(const device_config *device, int state);
+
extern unsigned DasmSH2( char *dst, unsigned pc, UINT16 opcode );
/***************************************************************************
@@ -114,4 +90,7 @@ extern unsigned DasmSH2( char *dst, unsigned pc, UINT16 opcode );
#define SH2DRC_COMPATIBLE_OPTIONS (SH2DRC_STRICT_VERIFY | SH2DRC_FLUSH_PC | SH2DRC_STRICT_PCREL)
#define SH2DRC_FASTEST_OPTIONS (0)
+void sh2drc_set_options(const device_config *device, UINT32 options);
+void sh2drc_add_pcflush(const device_config *device, offs_t address);
+
#endif /* __SH2_H__ */
diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c
index ca121821aaa..1586cff8915 100644
--- a/src/emu/cpu/sh2/sh2comn.c
+++ b/src/emu/cpu/sh2/sh2comn.c
@@ -500,6 +500,12 @@ READ32_HANDLER( sh2_internal_r )
return sh2->m[offset];
}
+void sh2_set_ftcsr_read_callback(const device_config *device, void (*callback)(UINT32))
+{
+ SH2 *sh2 = GET_SH2(device);
+ sh2->ftcsr_read_callback = callback;
+}
+
void sh2_set_frt_input(const device_config *device, int state)
{
SH2 *sh2 = GET_SH2(device);
diff --git a/src/emu/cpu/sh2/sh2comn.h b/src/emu/cpu/sh2/sh2comn.h
index 620d62fe4ac..ae3ea31b8ce 100644
--- a/src/emu/cpu/sh2/sh2comn.h
+++ b/src/emu/cpu/sh2/sh2comn.h
@@ -179,7 +179,6 @@ TIMER_CALLBACK( sh2_dmac_callback );
void sh2_common_init(SH2 *sh2, const device_config *device, cpu_irq_callback irqcallback);
void sh2_recalc_irq(SH2 *sh2);
void sh2_set_irq_line(SH2 *sh2, int irqline, int state);
-void sh2_set_frt_input(const device_config *device, int state);
void sh2_exception(SH2 *sh2, const char *message, int irqline);
#endif /* __SH2COMN_H__ */
diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c
index cf27ae2f4a7..1270ffda251 100644
--- a/src/emu/cpu/sh2/sh2drc.c
+++ b/src/emu/cpu/sh2/sh2drc.c
@@ -691,7 +691,7 @@ static CPU_INIT( sh2 )
sh2->cache = cache;
/* reset per-driver pcflushes */
- sh2->pcfsel = sh2->maxpcfsel = -1;
+ sh2->pcfsel = 0;
/* initialize the UML generator */
if (FORCE_C_BACKEND)
@@ -1589,16 +1589,13 @@ static void generate_sequence_instruction(SH2 *sh2, drcuml_block *block, compile
}
else // check for driver-selected flushes
{
- if (sh2->maxpcfsel != -1)
- {
- int pcflush;
+ int pcflush;
- for (pcflush = 0; pcflush <= sh2->maxpcfsel; pcflush++)
+ for (pcflush = 0; pcflush < sh2->pcfsel; pcflush++)
+ {
+ if (desc->pc == sh2->pcflushes[pcflush])
{
- if (desc->pc == sh2->pcflushes[pcflush])
- {
- UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov sh2->pc, desc->pc
- }
+ UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov sh2->pc, desc->pc
}
}
}
@@ -3140,6 +3137,31 @@ static int generate_group_12(SH2 *sh2, drcuml_block *block, compiler_state *comp
***************************************************************************/
/*-------------------------------------------------
+ sh2drc_set_options - configure DRC options
+-------------------------------------------------*/
+
+void sh2drc_set_options(const device_config *device, UINT32 options)
+{
+ SH2 *sh2 = *(SH2 **)device->token;
+ sh2->drcoptions = options;
+}
+
+
+/*-------------------------------------------------
+ sh2drc_add_pcflush - add a new address where
+ the PC must be flushed for speedups to work
+-------------------------------------------------*/
+
+void sh2drc_add_pcflush(const device_config *device, offs_t address)
+{
+ SH2 *sh2 = *(SH2 **)device->token;
+
+ if (sh2->pcfsel < ARRAY_LENGTH(sh2->pcflushes))
+ sh2->pcflushes[sh2->pcfsel++] = address;
+}
+
+
+/*-------------------------------------------------
sh2_dasm - disassemble an instruction
-------------------------------------------------*/
@@ -3179,11 +3201,6 @@ static CPU_SET_INFO( sh2 )
switch (state)
{
/* --- the following bits of info are set as 64-bit signed integers --- */
- case CPUINFO_INT_SH2_DRC_OPTIONS: sh2->drcoptions = info->i; break;
-
- case CPUINFO_INT_SH2_PCFLUSH_SELECT: sh2->pcfsel = info->i; if (sh2->pcfsel > sh2->maxpcfsel) sh2->maxpcfsel = sh2->pcfsel; break;
- case CPUINFO_INT_SH2_PCFLUSH_ADDR: sh2->pcflushes[sh2->pcfsel] = info->i; break;
-
case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLIN: sh2_set_irq_line(sh2, SH2_INT_VBLIN, info->i); break;
case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLOUT: sh2_set_irq_line(sh2, SH2_INT_VBLOUT, info->i); break;
case CPUINFO_INT_INPUT_STATE + SH2_INT_HBLIN: sh2_set_irq_line(sh2, SH2_INT_HBLIN, info->i); break;
@@ -3229,11 +3246,6 @@ static CPU_SET_INFO( sh2 )
case CPUINFO_INT_REGISTER + SH2_R14: sh2->r[14] = info->i; break;
case CPUINFO_INT_REGISTER + SH2_R15: sh2->r[15] = info->i; break;
case CPUINFO_INT_REGISTER + SH2_EA: sh2->ea = info->i; break;
-
- case CPUINFO_INT_SH2_FRT_INPUT: sh2_set_frt_input(device, info->i); break;
-
- /* --- the following bits of info are set as pointers to data or functions --- */
- case CPUINFO_FCT_SH2_FTCSR_READ_CALLBACK: sh2->ftcsr_read_callback = (void (*) (UINT32 ))info->f; break;
}
}
@@ -3372,9 +3384,6 @@ CPU_GET_INFO( sh2 )
case CPUINFO_STR_REGISTER + SH2_R14: sprintf(info->s, "R14 :%08X", sh2->r[14]); break;
case CPUINFO_STR_REGISTER + SH2_R15: sprintf(info->s, "R15 :%08X", sh2->r[15]); break;
case CPUINFO_STR_REGISTER + SH2_EA: sprintf(info->s, "EA :%08X", sh2->ea); break;
-
- case CPUINFO_FCT_SH2_FTCSR_READ_CALLBACK: info->f = (genf*)sh2->ftcsr_read_callback; break;
-
}
}
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index 3346f40dedb..55be34ccf39 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -694,7 +694,7 @@ static DRIVER_INIT( cps3 )
if (!cps3_user5region) cps3_user5region = auto_malloc(USER5REGION_LENGTH);
// set strict verify
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_STRICT_VERIFY);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_STRICT_VERIFY);
cps3_decrypt_bios(machine);
decrypted_gamerom = auto_malloc(0x1000000);
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index f6b904ad8f3..e1d5dd6d369 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -719,13 +719,11 @@ static READ32_HANDLER( avengrgs_speedup_r )
static DRIVER_INIT( avengrgs )
{
// init options
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
// set up speed cheat
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 0);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x3234);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x32dc);
+ sh2drc_add_pcflush(machine->cpu[0], 0x3234);
+ sh2drc_add_pcflush(machine->cpu[0], 0x32dc);
mainCpuIsArm=0;
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x01089a0, 0x01089a3, 0, 0, avengrgs_speedup_r );
diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c
index bf5dd27a050..4bce75c39e4 100644
--- a/src/mame/drivers/megadriv.c
+++ b/src/mame/drivers/megadriv.c
@@ -6662,8 +6662,8 @@ DRIVER_INIT( _32x )
_32x_240mode = 0;
// checking if these help brutal, they don't.
- device_set_info_int(machine->cpu[2], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_COMPATIBLE_OPTIONS);
- device_set_info_int(machine->cpu[3], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_COMPATIBLE_OPTIONS);
+ sh2drc_set_options(machine->cpu[2], SH2DRC_COMPATIBLE_OPTIONS);
+ sh2drc_set_options(machine->cpu[3], SH2DRC_COMPATIBLE_OPTIONS);
DRIVER_INIT_CALL(megadriv);
}
diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c
index 41b717d8f7f..f95820ea33a 100644
--- a/src/mame/drivers/psikyosh.c
+++ b/src/mame/drivers/psikyosh.c
@@ -1098,13 +1098,13 @@ ROM_END
static DRIVER_INIT( soldivid )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_0;
}
static DRIVER_INIT( s1945ii )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_DEFAULT;
}
@@ -1112,13 +1112,13 @@ static DRIVER_INIT( daraku )
{
UINT8 *RAM = memory_region(machine, "maincpu");
memory_set_bankptr(machine, 1,&RAM[0x100000]);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_DARAKU;
}
static DRIVER_INIT( sbomberb )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_DEFAULT;
}
@@ -1126,7 +1126,7 @@ static DRIVER_INIT( gunbird2 )
{
UINT8 *RAM = memory_region(machine, "maincpu");
memory_set_bankptr(machine, 1,&RAM[0x100000]);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_DEFAULT;
}
@@ -1134,31 +1134,31 @@ static DRIVER_INIT( s1945iii )
{
UINT8 *RAM = memory_region(machine, "maincpu");
memory_set_bankptr(machine, 1,&RAM[0x100000]);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_S1945III;
}
static DRIVER_INIT( dragnblz )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_DRAGNBLZ;
}
static DRIVER_INIT( gnbarich )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_GNBARICH;
}
static DRIVER_INIT( tgm2 )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_USER1;
}
static DRIVER_INIT( mjgtaste )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
use_factory_eeprom=eeprom_MJGTASTE;
/* needs to install mahjong controls too (can select joystick in test mode tho) */
}
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index e8e981efaad..c0c704a561d 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -1959,14 +1959,14 @@ static WRITE32_HANDLER( minit_w )
logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->cpu->tag, cpu_get_pc(space->cpu),data);
cpuexec_boost_interleave(space->machine, minit_boost_timeslice, ATTOTIME_IN_USEC(minit_boost));
cpuexec_trigger(space->machine, 1000);
- device_set_info_int(space->machine->cpu[1], CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE);
+ sh2_set_frt_input(space->machine->cpu[1], PULSE_LINE);
}
static WRITE32_HANDLER( sinit_w )
{
logerror("cpu %s (PC=%08X) SINIT write = %08x\n", space->cpu->tag, cpu_get_pc(space->cpu),data);
cpuexec_boost_interleave(space->machine, sinit_boost_timeslice, ATTOTIME_IN_USEC(sinit_boost));
- device_set_info_int(space->machine->cpu[0], CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE);
+ sh2_set_frt_input(space->machine->cpu[0], PULSE_LINE);
}
@@ -2317,8 +2317,8 @@ DRIVER_INIT ( stv )
// do strict overwrite verification - maruchan and rsgun crash after coinup without this.
// cottonbm needs strict PCREL
// todo: test what games need this and don't turn it on for them...
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
+ sh2drc_set_options(machine->cpu[1], SH2DRC_STRICT_VERIFY|SH2DRC_STRICT_PCREL);
/* debug .. watch the command buffer rsgun, cottonbm etc. appear to use to communicate between cpus */
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60ffc44, 0x60ffc47, 0, 0, w60ffc44_write );
diff --git a/src/mame/drivers/stvinit.c b/src/mame/drivers/stvinit.c
index 97959dfbee1..034fd570426 100644
--- a/src/mame/drivers/stvinit.c
+++ b/src/mame/drivers/stvinit.c
@@ -119,15 +119,11 @@ NVRAM_HANDLER( stv )
void install_stvbios_speedups(running_machine *machine)
{
// flushes 0 & 1 on both CPUs are for the BIOS speedups
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 0);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60154b2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013aee);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60154b2);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6013aee);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, 0);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60154b2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, 1);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013aee);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60154b2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6013aee);
}
DRIVER_INIT(shienryu)
@@ -136,11 +132,9 @@ DRIVER_INIT(shienryu)
stv_default_eeprom_length = sizeof(shienryu_default_eeprom);
// master
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60041c6);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60041c6);
// slave
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600440e);
+ sh2drc_add_pcflush(machine->cpu[1], 0x600440e);
DRIVER_INIT_CALL(stv);
}
@@ -155,11 +149,9 @@ DRIVER_INIT(prikura)
(loops for 263473 instructions)
*/
// master
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6018640);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6018640);
// slave
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6018c6e);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6018c6e);
DRIVER_INIT_CALL(stv);
@@ -187,8 +179,7 @@ DRIVER_INIT(hanagumi)
(loops for 288688 instructions)
*/
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6010160);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6010160);
DRIVER_INIT_CALL(stv);
}
@@ -214,11 +205,9 @@ CPU0: Aids Screen
DRIVER_INIT(puyosun)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6021cf0);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6021cf0);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60236fe);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60236fe);
DRIVER_INIT_CALL(stv);
@@ -238,8 +227,7 @@ CPU0 Data East Logo:
DRIVER_INIT(mausuke)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60461A0);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60461A0);
DRIVER_INIT_CALL(stv);
@@ -249,10 +237,8 @@ DRIVER_INIT(mausuke)
DRIVER_INIT(cottonbm)
{
-// device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
-// device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6030ee2);
-// device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
-// device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6032b52);
+// sh2drc_add_pcflush(machine->cpu[0], 0x6030ee2);
+// sh2drc_add_pcflush(machine->cpu[1], 0x6032b52);
DRIVER_INIT_CALL(stv);
@@ -261,10 +247,8 @@ DRIVER_INIT(cottonbm)
DRIVER_INIT(cotton2)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6031c7a);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60338ea);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6031c7a);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60338ea);
DRIVER_INIT_CALL(stv);
@@ -274,19 +258,13 @@ DRIVER_INIT(cotton2)
DRIVER_INIT(dnmtdeka)
{
// install all 3 speedups on both master and slave
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c90);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6027c90);
+ sh2drc_add_pcflush(machine->cpu[0], 0xd04);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60051f2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c90);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6027c90);
+ sh2drc_add_pcflush(machine->cpu[1], 0xd04);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60051f2);
DRIVER_INIT_CALL(stv);
}
@@ -294,31 +272,22 @@ DRIVER_INIT(dnmtdeka)
DRIVER_INIT(diehard)
{
// install all 3 speedups on both master and slave
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c98);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6027c98);
+ sh2drc_add_pcflush(machine->cpu[0], 0xd04);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60051f2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c98);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6027c98);
+ sh2drc_add_pcflush(machine->cpu[1], 0xd04);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60051f2);
DRIVER_INIT_CALL(stv);
}
DRIVER_INIT(fhboxers)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60041c2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600bb0a);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600b31e);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60041c2);
+ sh2drc_add_pcflush(machine->cpu[0], 0x600bb0a);
+ sh2drc_add_pcflush(machine->cpu[0], 0x600b31e);
DRIVER_INIT_CALL(stv);
}
@@ -342,15 +311,11 @@ static READ32_HANDLER( groovef_hack2_r )
DRIVER_INIT( groovef )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6005e7c);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6005e86);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60a4970);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6005e7c);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6005e86);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60a4970);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60060c2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60060c2);
/* prevent game from hanging on startup -- todo: remove these hacks */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60ca6cc, 0x60ca6cf, 0, 0, groovef_hack2_r );
@@ -399,12 +364,9 @@ static READ32_HANDLER( danchih_hack_r )
DRIVER_INIT( danchih )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028b28);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028c8e);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602ae26);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6028b28);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6028c8e);
+ sh2drc_add_pcflush(machine->cpu[1], 0x602ae26);
/* prevent game from hanging on title screen -- todo: remove these hacks */
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60ffcbc, 0x60ffcbf, 0, 0, danchih_hack_r );
@@ -445,10 +407,8 @@ static READ32_HANDLER( astrass_hack_r )
DRIVER_INIT( astrass )
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60011b8);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605b9da);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60011b8);
+ sh2drc_add_pcflush(machine->cpu[0], 0x605b9da);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x06000770, 0x06000773, 0, 0, astrass_hack_r );
@@ -459,12 +419,9 @@ DRIVER_INIT( astrass )
DRIVER_INIT(thunt)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602A024);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013EEA);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602AAF8);
+ sh2drc_add_pcflush(machine->cpu[0], 0x602A024);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6013EEA);
+ sh2drc_add_pcflush(machine->cpu[1], 0x602AAF8);
DRIVER_INIT_CALL(stv);
@@ -473,12 +430,9 @@ DRIVER_INIT(thunt)
DRIVER_INIT(sandor)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602a0f8);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013fbe);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602abcc);
+ sh2drc_add_pcflush(machine->cpu[0], 0x602a0f8);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6013fbe);
+ sh2drc_add_pcflush(machine->cpu[1], 0x602abcc);
DRIVER_INIT_CALL(stv);
minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(1);
@@ -487,10 +441,8 @@ DRIVER_INIT(sandor)
DRIVER_INIT(grdforce)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6041e32);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6043aa2);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6041e32);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6043aa2);
DRIVER_INIT_CALL(stv);
@@ -499,10 +451,8 @@ DRIVER_INIT(grdforce)
DRIVER_INIT(batmanfr)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60121c0);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60125bc);
+ sh2drc_add_pcflush(machine->cpu[0], 0x60121c0);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60125bc);
DRIVER_INIT_CALL(stv);
@@ -512,8 +462,7 @@ DRIVER_INIT(batmanfr)
DRIVER_INIT(colmns97)
{
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60298a2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60298a2);
DRIVER_INIT_CALL(stv);
@@ -523,10 +472,8 @@ DRIVER_INIT(colmns97)
DRIVER_INIT(winterht)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6098aea);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x609ae4e);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6098aea);
+ sh2drc_add_pcflush(machine->cpu[1], 0x609ae4e);
DRIVER_INIT_CALL(stv);
@@ -535,10 +482,8 @@ DRIVER_INIT(winterht)
DRIVER_INIT(seabass)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602cbfa);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60321ee);
+ sh2drc_add_pcflush(machine->cpu[0], 0x602cbfa);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60321ee);
DRIVER_INIT_CALL(stv);
@@ -547,10 +492,8 @@ DRIVER_INIT(seabass)
DRIVER_INIT(vfremix)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602c30c);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x604c332);
+ sh2drc_add_pcflush(machine->cpu[0], 0x602c30c);
+ sh2drc_add_pcflush(machine->cpu[1], 0x604c332);
DRIVER_INIT_CALL(stv);
@@ -559,10 +502,8 @@ DRIVER_INIT(vfremix)
DRIVER_INIT(sss)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6026398);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028cd6);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6026398);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6028cd6);
install_standard_protection(machine);
@@ -573,10 +514,8 @@ DRIVER_INIT(sss)
DRIVER_INIT(othellos)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602bcbe);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602d92e);
+ sh2drc_add_pcflush(machine->cpu[0], 0x602bcbe);
+ sh2drc_add_pcflush(machine->cpu[1], 0x602d92e);
DRIVER_INIT_CALL(stv);
@@ -586,8 +525,7 @@ DRIVER_INIT(othellos)
DRIVER_INIT(sasissu)
{
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60710be);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60710be);
DRIVER_INIT_CALL(stv);
@@ -596,16 +534,14 @@ DRIVER_INIT(sasissu)
DRIVER_INIT(gaxeduel)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6012ee4);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6012ee4);
DRIVER_INIT_CALL(stv);
}
DRIVER_INIT(suikoenb)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013f7a);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6013f7a);
DRIVER_INIT_CALL(stv);
}
@@ -620,10 +556,8 @@ DRIVER_INIT(sokyugrt)
DRIVER_INIT(znpwfv)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6012ec2);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60175a6);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6012ec2);
+ sh2drc_add_pcflush(machine->cpu[1], 0x60175a6);
DRIVER_INIT_CALL(stv);
minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_NSEC(500);
@@ -631,10 +565,8 @@ DRIVER_INIT(znpwfv)
DRIVER_INIT(twcup98)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605edde);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6062bca);
+ sh2drc_add_pcflush(machine->cpu[0], 0x605edde);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6062bca);
DRIVER_INIT_CALL(stv);
install_standard_protection(machine);
@@ -644,10 +576,8 @@ DRIVER_INIT(twcup98)
DRIVER_INIT(smleague)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6063bf4);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6062bca);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6063bf4);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6062bca);
DRIVER_INIT_CALL(stv);
@@ -656,8 +586,7 @@ DRIVER_INIT(smleague)
DRIVER_INIT(finlarch)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6064d60);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6064d60);
DRIVER_INIT_CALL(stv);
@@ -665,10 +594,8 @@ DRIVER_INIT(finlarch)
DRIVER_INIT(maruchan)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601ba46);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601ba46);
+ sh2drc_add_pcflush(machine->cpu[0], 0x601ba46);
+ sh2drc_add_pcflush(machine->cpu[1], 0x601ba46);
DRIVER_INIT_CALL(stv);
@@ -677,26 +604,22 @@ DRIVER_INIT(maruchan)
DRIVER_INIT(pblbeach)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605eb78);
+ sh2drc_add_pcflush(machine->cpu[0], 0x605eb78);
DRIVER_INIT_CALL(stv);
}
DRIVER_INIT(shanhigw)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6020c5c);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6020c5c);
DRIVER_INIT_CALL(stv);
}
DRIVER_INIT(elandore)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x604eac0);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605340a);
+ sh2drc_add_pcflush(machine->cpu[0], 0x604eac0);
+ sh2drc_add_pcflush(machine->cpu[1], 0x605340a);
install_standard_protection(machine);
@@ -707,10 +630,8 @@ DRIVER_INIT(elandore)
DRIVER_INIT(rsgun)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6034d04);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6036152);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6034d04);
+ sh2drc_add_pcflush(machine->cpu[1], 0x6036152);
install_standard_protection(machine);
@@ -734,10 +655,8 @@ DRIVER_INIT(decathlt)
DRIVER_INIT(nameclv3)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601eb4c);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
- device_set_info_int(machine->cpu[1], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602b80e);
+ sh2drc_add_pcflush(machine->cpu[0], 0x601eb4c);
+ sh2drc_add_pcflush(machine->cpu[1], 0x602b80e);
DRIVER_INIT_CALL(stv);
}
diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c
index 5877aaca206..6a9658a9d8b 100644
--- a/src/mame/drivers/suprnova.c
+++ b/src/mame/drivers/suprnova.c
@@ -1003,17 +1003,15 @@ static READ32_HANDLER( sengekij_speedup_r ) // 60006ee 600308e
static void init_skns(running_machine *machine)
{
// init DRC to fastest options
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_FASTEST_OPTIONS);
+ sh2drc_set_options(machine->cpu[0], SH2DRC_FASTEST_OPTIONS);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 0);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6f8);
+ sh2drc_add_pcflush(machine->cpu[0], 0x6f8);
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6000028, 0x600002b, 0, 0, bios_skip_r );
}
static void set_drc_pcflush(running_machine *machine, UINT32 addr)
{
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_SELECT, 1);
- device_set_info_int(machine->cpu[0], CPUINFO_INT_SH2_PCFLUSH_ADDR, addr);
+ sh2drc_add_pcflush(machine->cpu[0], addr);
}
static DRIVER_INIT( galpani4 ) { skns_sprite_kludge(-5,-1); init_skns(machine); }