mirror of
https://github.com/holub/mame
synced 2025-06-06 21:03:47 +03:00
Some more number-to-tag conversions in CPU calls
This commit is contained in:
parent
c19d6768e7
commit
f59c21a9ec
@ -1004,7 +1004,7 @@ static WRITE8_HANDLER( blitter_w )
|
||||
if (i==0 || (i==4 && !data))
|
||||
{
|
||||
blitter_busy = 0;
|
||||
if (firq_level) cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, ASSERT_LINE); // make up delayed FIRQ's
|
||||
if (firq_level) cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, ASSERT_LINE); // make up delayed FIRQ's
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1505,7 +1505,7 @@ static INTERRUPT_GEN( halleys_interrupt )
|
||||
fftail = (fftail + 1) & (MAX_SOUNDS - 1);
|
||||
latch_delay = (latch_data) ? 0 : 4;
|
||||
soundlatch_w( cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0, latch_data);
|
||||
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
// clear collision list of this frame unconditionally
|
||||
@ -1545,7 +1545,7 @@ static INTERRUPT_GEN( benberob_interrupt )
|
||||
fftail = (fftail + 1) & (MAX_SOUNDS - 1);
|
||||
latch_delay = (latch_data) ? 0 : 4;
|
||||
soundlatch_w(cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM), 0, latch_data);
|
||||
cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(device->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1573,7 +1573,7 @@ static WRITE8_HANDLER( firq_ack_w )
|
||||
io_ram[0x9c] = data;
|
||||
|
||||
if (firq_level) firq_level--;
|
||||
cpu_set_input_line(space->machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ static WRITE8_HANDLER( hcastle_bankswitch_w )
|
||||
|
||||
static WRITE8_HANDLER( hcastle_soundirq_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE );
|
||||
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( hcastle_coin_w )
|
||||
@ -190,7 +190,7 @@ GFXDECODE_END
|
||||
|
||||
static void irqhandler(const device_config *device, int linestate)
|
||||
{
|
||||
// cpu_set_input_line(device->machine->cpu[1],0,linestate);
|
||||
// cputag_set_input_line(device->machine, "audiocpu", 0, linestate);
|
||||
}
|
||||
|
||||
static void volume_callback(const device_config *device, int v)
|
||||
|
@ -1142,7 +1142,7 @@ static READ16_HANDLER( ciclone_status_r )
|
||||
|
||||
static DRIVER_INIT( ciclone )
|
||||
{
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0030, 0x0033, 0, 0, ciclone_status_r );
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x0030, 0x0033, 0, 0, ciclone_status_r );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1212,7 +1212,7 @@ static WRITE16_HANDLER( fashion_output_w )
|
||||
|
||||
static DRIVER_INIT( fashion )
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x0002, 0x0003, 0, 0, fashion_output_w );
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x0002, 0x0003, 0, 0, fashion_output_w );
|
||||
}
|
||||
|
||||
GAMEL( 2000, tour4000, 0, tv_vcf, tv_vcf, 0, ROT0, "High Video", "Tour 4000", 0, layout_fashion )
|
||||
|
@ -101,7 +101,7 @@ extern UINT8 *himesiki_bg_ram;
|
||||
static WRITE8_HANDLER( himesiki_rombank_w )
|
||||
{
|
||||
UINT8 *ROM = memory_region(space->machine, "maincpu");
|
||||
memory_set_bankptr(space->machine, 1, &ROM[0x10000+0x800*(data & 8)]);
|
||||
memory_set_bankptr(space->machine, 1, &ROM[0x10000 + 0x800 * (data & 8)]);
|
||||
|
||||
if (data & 0xf7)
|
||||
logerror("p06_w %02x\n",data);
|
||||
@ -110,7 +110,7 @@ static WRITE8_HANDLER( himesiki_rombank_w )
|
||||
static WRITE8_HANDLER( himesiki_sound_w )
|
||||
{
|
||||
soundlatch_w(space, offset, data);
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
@ -327,8 +327,8 @@ static WRITE8_HANDLER( mrokumei_sound_io_w )
|
||||
|
||||
static WRITE8_HANDLER( mrokumei_sound_cmd_w )
|
||||
{
|
||||
soundlatch_w(space,offset,data);
|
||||
cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE);
|
||||
soundlatch_w(space, offset, data);
|
||||
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ static WRITE8_HANDLER( reikaids_upd7807_portc_w )
|
||||
|
||||
static MACHINE_RESET( reikaids_upd7807 )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
/* on reset, ports are set as input (high impedance), therefore 0xff output */
|
||||
reikaids_which=homedata_priority;
|
||||
reikaids_upd7807_portc_w(space,0,0xff);
|
||||
@ -535,7 +535,7 @@ static WRITE8_HANDLER( pteacher_upd7807_portc_w )
|
||||
|
||||
static MACHINE_RESET( pteacher_upd7807 )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
/* on reset, ports are set as input (high impedance), therefore 0xff output */
|
||||
pteacher_upd7807_portc_w(space,0,0xff);
|
||||
}
|
||||
@ -1785,15 +1785,15 @@ static DRIVER_INIT( jogakuen )
|
||||
/* it seems that Mahjong Jogakuen runs on the same board as the others,
|
||||
but with just these two addresses swapped. Instead of creating a new
|
||||
MachineDriver, I just fix them here. */
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8007, 0x8007, 0, 0, pteacher_blitter_bank_w);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x8005, 0x8005, 0, 0, pteacher_gfx_bank_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8007, 0x8007, 0, 0, pteacher_blitter_bank_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8005, 0x8005, 0, 0, pteacher_gfx_bank_w);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( mjikaga )
|
||||
{
|
||||
/* Mahjong Ikagadesuka is different as well. */
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x7802, 0x7802, 0, 0, pteacher_snd_r);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x0123, 0x0123, 0, 0, pteacher_snd_answer_w);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7802, 0x7802, 0, 0, pteacher_snd_r);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_PROGRAM), 0x0123, 0x0123, 0, 0, pteacher_snd_answer_w);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( reikaids )
|
||||
@ -1823,4 +1823,3 @@ GAME( 1992?,jogakuen, 0, pteacher, jogakuen, jogakuen, ROT0, "Windom", "Mah
|
||||
GAME( 1990, lemnangl, 0, lemnangl, pteacher, 0, ROT0, "Home Data", "Mahjong Lemon Angel (Japan)", 0 )
|
||||
|
||||
GAME( 1991?,mjikaga, 0, lemnangl, mjikaga, mjikaga, ROT0, "Mitchell", "Mahjong Ikaga Desu ka (Japan)", GAME_NOT_WORKING | GAME_NO_SOUND )
|
||||
|
||||
|
@ -137,7 +137,7 @@ static MACHINE_DRIVER_START( genesis_base )
|
||||
MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 7)
|
||||
MDRV_CPU_VBLANK_INT("screen", genesis_vblank_interrupt)
|
||||
|
||||
MDRV_CPU_ADD("soundcpu", Z80, MASTER_CLOCK / 15)
|
||||
MDRV_CPU_ADD("genesis_snd_z80", Z80, MASTER_CLOCK / 15)
|
||||
MDRV_CPU_PROGRAM_MAP(genesis_z80_readmem, genesis_z80_writemem)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) /* from vdp at scanline 0xe0 */
|
||||
|
||||
@ -208,7 +208,7 @@ static READ16_HANDLER( vdp_fake_r )
|
||||
static DRIVER_INIT(genesis)
|
||||
{
|
||||
/* hack -- fix vdp emulation instead */
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xC00004, 0xC00005, 0, 0, vdp_fake_r);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xC00004, 0xC00005, 0, 0, vdp_fake_r);
|
||||
|
||||
memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") );
|
||||
memory_set_bankptr(machine, 4, genesis_68k_ram );
|
||||
|
@ -310,14 +310,14 @@ static VIDEO_EOF(hvyunit)
|
||||
|
||||
static WRITE8_HANDLER( trigger_nmi_on_sound_cpu2 )
|
||||
{
|
||||
soundlatch_w(space,0,data);
|
||||
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_NMI, PULSE_LINE);
|
||||
soundlatch_w(space, 0, data);
|
||||
cputag_set_input_line(space->machine, "suoundcpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( trigger_nmi_on_sub_cpu)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( main_bankswitch_w )
|
||||
@ -693,5 +693,3 @@ ROM_END
|
||||
GAME( 1988, hvyunit, 0, hvyunit, hvyunit, 0, ROT0, "Kaneko / Taito", "Heavy Unit (World)" ,GAME_NOT_WORKING )
|
||||
GAME( 1988, hvyunitj, hvyunit, hvyunit, hvyunit, 0, ROT0, "Kaneko / Taito", "Heavy Unit (Japan, Newer)" ,GAME_NOT_WORKING )
|
||||
GAME( 1988, hvyunito, hvyunit, hvyunit, hvyunit, 0, ROT0, "Kaneko / Taito", "Heavy Unit (Japan, Older)" ,GAME_NOT_WORKING )
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ static void update_irq_state(running_machine *machine)
|
||||
{
|
||||
int irq = requested_int & ~*hyprduel_irq_enable;
|
||||
|
||||
cpu_set_input_line(machine->cpu[0], 3, (irq & int_num) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, (irq & int_num) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( vblank_end_callback )
|
||||
@ -115,7 +115,7 @@ static WRITE16_HANDLER( hyprduel_subcpu_control_w )
|
||||
case 0x01:
|
||||
if (!subcpu_resetline)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
subcpu_resetline = 1;
|
||||
}
|
||||
break;
|
||||
@ -123,7 +123,7 @@ static WRITE16_HANDLER( hyprduel_subcpu_control_w )
|
||||
case 0x00:
|
||||
if (subcpu_resetline)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
subcpu_resetline = 0;
|
||||
}
|
||||
cpu_spinuntil_int(space->cpu);
|
||||
@ -131,7 +131,7 @@ static WRITE16_HANDLER( hyprduel_subcpu_control_w )
|
||||
|
||||
case 0x0c:
|
||||
case 0x80:
|
||||
cpu_set_input_line(space->machine->cpu[1], 2, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", 2, HOLD_LINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -193,7 +193,7 @@ static emu_timer *magerror_irq_timer;
|
||||
|
||||
static TIMER_CALLBACK( magerror_irq_callback )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[1], 1, HOLD_LINE);
|
||||
cputag_set_input_line(machine, "sub", 1, HOLD_LINE);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -669,7 +669,7 @@ GFXDECODE_END
|
||||
|
||||
static void sound_irq(const device_config *device, int state)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1], 1, HOLD_LINE);
|
||||
cputag_set_input_line(device->machine, "sub", 1, HOLD_LINE);
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_config =
|
||||
@ -684,7 +684,7 @@ static const ym2151_interface ym2151_config =
|
||||
static MACHINE_RESET( hyprduel )
|
||||
{
|
||||
/* start with cpu2 halted */
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
subcpu_resetline = 1;
|
||||
cpu_trigger = 0;
|
||||
|
||||
@ -849,10 +849,10 @@ static DRIVER_INIT( hyprduel )
|
||||
savestate(machine);
|
||||
|
||||
/* cpu synchronization (severe timings) */
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc0040e, 0xc00411, 0, 0, hyprduel_cpusync_trigger1_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xc00408, 0xc00409, 0, 0, hyprduel_cpusync_trigger1_r);
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc00408, 0xc00409, 0, 0, hyprduel_cpusync_trigger2_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xfff34c, 0xfff34d, 0, 0, hyprduel_cpusync_trigger2_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc0040e, 0xc00411, 0, 0, hyprduel_cpusync_trigger1_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0xc00408, 0xc00409, 0, 0, hyprduel_cpusync_trigger1_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc00408, 0xc00409, 0, 0, hyprduel_cpusync_trigger2_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "sub", ADDRESS_SPACE_PROGRAM), 0xfff34c, 0xfff34d, 0, 0, hyprduel_cpusync_trigger2_r);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( magerror )
|
||||
|
@ -472,14 +472,14 @@ GFXDECODE_END
|
||||
|
||||
static TIMER_CALLBACK( network_interrupt_callback )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], I960_IRQ0, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", I960_IRQ0, ASSERT_LINE);
|
||||
timer_set(machine, video_screen_get_frame_period(machine->primary_screen), NULL, 0, network_interrupt_callback);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( vblank_interrupt_callback )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], I960_IRQ2, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", I960_IRQ2, ASSERT_LINE);
|
||||
timer_set(machine, video_screen_get_frame_period(machine->primary_screen), NULL, 0, vblank_interrupt_callback);
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ static TIMER_CALLBACK( vblank_interrupt_callback )
|
||||
static TIMER_CALLBACK( raster_interrupt_callback )
|
||||
{
|
||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
|
||||
cpu_set_input_line(machine->cpu[0], I960_IRQ1, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", I960_IRQ1, ASSERT_LINE);
|
||||
timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(machine->primary_screen), 0);
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ static READ16_HANDLER( namcona1_vreg_r )
|
||||
static int transfer_dword( running_machine *machine, UINT32 dest, UINT32 source )
|
||||
{
|
||||
UINT16 data;
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
if( source>=0x400000 && source<0xc00000 )
|
||||
{
|
||||
@ -723,7 +723,7 @@ static WRITE16_HANDLER( mcu_mailbox_w_68k )
|
||||
// logerror("mailbox_w_68k: %x @ %x\n", data, offset);
|
||||
|
||||
if (offset == 4)
|
||||
cpu_set_input_line(space->machine->cpu[1], M37710_LINE_IRQ0, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "mcu", M37710_LINE_IRQ0, HOLD_LINE);
|
||||
|
||||
COMBINE_DATA(&mcu_mailbox[offset%8]);
|
||||
|
||||
@ -850,7 +850,7 @@ static WRITE8_HANDLER( port4_w )
|
||||
logerror("launching 68k, PC=%x\n", cpu_get_pc(space->cpu));
|
||||
|
||||
// reset and launch the 68k
|
||||
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
|
||||
mcu_port4 = data;
|
||||
@ -925,7 +925,7 @@ static MACHINE_START( namcona1 )
|
||||
// for games with the MCU emulated, the MCU boots the 68000. don't allow it before that.
|
||||
static MACHINE_RESET( namcona1_mcu )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
mcu_port5 = 1;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ static TIMER_CALLBACK( namconb1_TriggerPOSIRQ )
|
||||
|
||||
video_screen_update_partial(machine->primary_screen, param);
|
||||
pos_irq_active = 1;
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x02] & 0xf, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x02] & 0xf, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( namconb1_interrupt )
|
||||
@ -374,7 +374,7 @@ static TIMER_CALLBACK( namconb2_TriggerPOSIRQ )
|
||||
{
|
||||
video_screen_update_partial(machine->primary_screen, param);
|
||||
pos_irq_active = 1;
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x02], ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x02], ASSERT_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( namconb2_interrupt )
|
||||
@ -429,9 +429,9 @@ static void namconb1_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
switch(reg) {
|
||||
case 0x02: // POS IRQ level/enable
|
||||
if(pos_irq_active && (((prev & 0xf) != (data & 0xf)) || !(data & 0xf0))) {
|
||||
cpu_set_input_line(machine->cpu[0], prev & 0xf, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", prev & 0xf, CLEAR_LINE);
|
||||
if(data & 0xf0)
|
||||
cpu_set_input_line(machine->cpu[0], data & 0xf, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", data & 0xf, ASSERT_LINE);
|
||||
else
|
||||
pos_irq_active = 0;
|
||||
}
|
||||
@ -439,9 +439,9 @@ static void namconb1_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x04: // VBLANK IRQ level/enable
|
||||
if(vblank_irq_active && (((prev & 0xf) != (data & 0xf)) || !(data & 0xf0))) {
|
||||
cpu_set_input_line(machine->cpu[0], prev & 0xf, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", prev & 0xf, CLEAR_LINE);
|
||||
if(data & 0xf0)
|
||||
cpu_set_input_line(machine->cpu[0], data & 0xf, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", data & 0xf, ASSERT_LINE);
|
||||
else
|
||||
vblank_irq_active = 0;
|
||||
}
|
||||
@ -449,14 +449,14 @@ static void namconb1_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x07: // POS ack
|
||||
if(pos_irq_active) {
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x02] & 0xf, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x02] & 0xf, CLEAR_LINE);
|
||||
pos_irq_active = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x09: // VBLANK ack
|
||||
if(vblank_irq_active) {
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x04] & 0xf, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x04] & 0xf, CLEAR_LINE);
|
||||
vblank_irq_active = 0;
|
||||
}
|
||||
break;
|
||||
@ -466,11 +466,11 @@ static void namconb1_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x18: // C75 Control
|
||||
if(data & 1) {
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
} else
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -495,9 +495,9 @@ static void namconb2_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
switch(reg) {
|
||||
case 0x00: // VBLANK IRQ level
|
||||
if(vblank_irq_active && (prev != data)) {
|
||||
cpu_set_input_line(machine->cpu[0], prev, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", prev, CLEAR_LINE);
|
||||
if(data)
|
||||
cpu_set_input_line(machine->cpu[0], data, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", data, ASSERT_LINE);
|
||||
else
|
||||
vblank_irq_active = 0;
|
||||
}
|
||||
@ -505,9 +505,9 @@ static void namconb2_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x02: // POS IRQ level
|
||||
if(pos_irq_active && (prev != data)) {
|
||||
cpu_set_input_line(machine->cpu[0], prev, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", prev, CLEAR_LINE);
|
||||
if(data)
|
||||
cpu_set_input_line(machine->cpu[0], data, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", data, ASSERT_LINE);
|
||||
else
|
||||
pos_irq_active = 0;
|
||||
}
|
||||
@ -515,14 +515,14 @@ static void namconb2_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x04: // VBLANK ack
|
||||
if(vblank_irq_active) {
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x00], CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x00], CLEAR_LINE);
|
||||
vblank_irq_active = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x06: // POS ack
|
||||
if(pos_irq_active) {
|
||||
cpu_set_input_line(machine->cpu[0], namconb_cpureg[0x02], CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", namconb_cpureg[0x02], CLEAR_LINE);
|
||||
pos_irq_active = 0;
|
||||
}
|
||||
break;
|
||||
@ -532,11 +532,11 @@ static void namconb2_cpureg8_w(running_machine *machine, int reg, UINT8 data)
|
||||
|
||||
case 0x16: // C75 Control
|
||||
if(data & 1) {
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
} else {
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ static int dac0_value, dac1_value, dac0_gain, dac1_gain;
|
||||
|
||||
static WRITE8_HANDLER( namcos1_sub_firq_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], M6809_FIRQ_LINE, ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", M6809_FIRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( irq_ack_w )
|
||||
@ -1057,7 +1057,7 @@ GFXDECODE_END
|
||||
|
||||
static void namcos1_sound_interrupt( const device_config *device, int irq )
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[2], M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "audiocpu", M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_config =
|
||||
@ -2746,4 +2746,3 @@ GAME( 1990, puzlclub, 0, ns1, puzlclub, puzlclub, ROT90, "Namco", "P
|
||||
GAME( 1991, tankfrce, 0, ns1, ns1, tankfrce, ROT0, "Namco", "Tank Force (US, 2 Player)", 0 )
|
||||
GAME( 1991, tankfrc4, tankfrce, ns1, tankfrc4, tankfrc4, ROT0, "Namco", "Tank Force (US, 4 Player)", 0 )
|
||||
GAME( 1991, tankfrcj, tankfrce, ns1, ns1, tankfrce, ROT0, "Namco", "Tank Force (Japan)", 0 )
|
||||
|
||||
|
@ -810,7 +810,7 @@ static DRIVER_INIT( namcos11 )
|
||||
{
|
||||
if( namcos11_config_table[ n_game ].keycus_r != NULL )
|
||||
{
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1fa20000, 0x1fa2ffff, 0, 0, namcos11_config_table[ n_game ].keycus_r );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1fa20000, 0x1fa2ffff, 0, 0, namcos11_config_table[ n_game ].keycus_r );
|
||||
}
|
||||
if( namcos11_config_table[ n_game ].n_daughterboard != 0 )
|
||||
{
|
||||
@ -818,14 +818,14 @@ static DRIVER_INIT( namcos11 )
|
||||
UINT32 len = memory_region_length( machine, "user2" );
|
||||
UINT8 *rgn = memory_region( machine, "user2" );
|
||||
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f000000, 0x1f0fffff, 0, 0, (read32_space_func)SMH_BANK(1) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f100000, 0x1f1fffff, 0, 0, (read32_space_func)SMH_BANK(2) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f200000, 0x1f2fffff, 0, 0, (read32_space_func)SMH_BANK(3) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f300000, 0x1f3fffff, 0, 0, (read32_space_func)SMH_BANK(4) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f400000, 0x1f4fffff, 0, 0, (read32_space_func)SMH_BANK(5) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f500000, 0x1f5fffff, 0, 0, (read32_space_func)SMH_BANK(6) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6fffff, 0, 0, (read32_space_func)SMH_BANK(7) );
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f700000, 0x1f7fffff, 0, 0, (read32_space_func)SMH_BANK(8) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f000000, 0x1f0fffff, 0, 0, (read32_space_func)SMH_BANK(1) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f100000, 0x1f1fffff, 0, 0, (read32_space_func)SMH_BANK(2) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f200000, 0x1f2fffff, 0, 0, (read32_space_func)SMH_BANK(3) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f300000, 0x1f3fffff, 0, 0, (read32_space_func)SMH_BANK(4) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f400000, 0x1f4fffff, 0, 0, (read32_space_func)SMH_BANK(5) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f500000, 0x1f5fffff, 0, 0, (read32_space_func)SMH_BANK(6) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f600000, 0x1f6fffff, 0, 0, (read32_space_func)SMH_BANK(7) );
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f700000, 0x1f7fffff, 0, 0, (read32_space_func)SMH_BANK(8) );
|
||||
|
||||
for( bank = 0; bank < 8; bank++ )
|
||||
{
|
||||
@ -835,19 +835,19 @@ static DRIVER_INIT( namcos11 )
|
||||
|
||||
if( namcos11_config_table[ n_game ].n_daughterboard == 32 )
|
||||
{
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, bankswitch_rom32_w );
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, bankswitch_rom32_w );
|
||||
}
|
||||
if( namcos11_config_table[ n_game ].n_daughterboard == 64 )
|
||||
{
|
||||
m_n_bankoffset = 0;
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f080000, 0x1f080003, 0, 0, bankswitch_rom64_upper_w );
|
||||
memory_install_readwrite32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, (read32_space_func)SMH_NOP, bankswitch_rom64_w );
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f080000, 0x1f080003, 0, 0, bankswitch_rom64_upper_w );
|
||||
memory_install_readwrite32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, (read32_space_func)SMH_NOP, bankswitch_rom64_w );
|
||||
state_save_register_global(machine, m_n_bankoffset );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, (write32_space_func)SMH_NOP );
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1fa10020, 0x1fa1002f, 0, 0, (write32_space_func)SMH_NOP );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -856,8 +856,8 @@ static DRIVER_INIT( namcos11 )
|
||||
|
||||
if( strcmp( machine->gamedrv->name, "ptblnk2a" ) == 0 )
|
||||
{
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f788000, 0x1f788003, 0, 0, lightgun_w );
|
||||
memory_install_read32_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f780000, 0x1f78000f, 0, 0, lightgun_r );
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f788000, 0x1f788003, 0, 0, lightgun_w );
|
||||
memory_install_read32_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f780000, 0x1f78000f, 0, 0, lightgun_r );
|
||||
}
|
||||
|
||||
state_save_register_global(machine, m_n_oldcoin );
|
||||
|
@ -1156,8 +1156,8 @@ static READ32_HANDLER( system11gun_r )
|
||||
|
||||
static void system11gun_install( running_machine *machine )
|
||||
{
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f788000, 0x1f788003, 0, 0, system11gun_w );
|
||||
memory_install_read32_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1f780000, 0x1f78000f, 0, 0, system11gun_r );
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f788000, 0x1f788003, 0, 0, system11gun_w );
|
||||
memory_install_read32_handler (cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x1f780000, 0x1f78000f, 0, 0, system11gun_r );
|
||||
}
|
||||
|
||||
static UINT8 kcram[ 12 ];
|
||||
@ -1225,7 +1225,7 @@ static READ32_HANDLER( tektagt_protection_3_r )
|
||||
|
||||
static MACHINE_RESET( namcos12 )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
psx_machine_init(machine);
|
||||
bankoffset_w(space,0,0,0xffffffff);
|
||||
has_tektagt_dma = 0;
|
||||
|
@ -2099,7 +2099,7 @@ GetDspControlRegister( void )
|
||||
*/
|
||||
static TIMER_CALLBACK( start_subcpu )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[3], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( namcos22_system_controller_w )
|
||||
@ -2136,11 +2136,11 @@ static WRITE32_HANDLER( namcos22_system_controller_w )
|
||||
{ /* SUBCPU enable for Super System 22 */
|
||||
if (data)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[3],INPUT_LINE_RESET,ASSERT_LINE); /* M37710 MCU */
|
||||
cputag_set_input_line(space->machine, "mcu",INPUT_LINE_RESET,ASSERT_LINE); /* M37710 MCU */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2601,7 +2601,7 @@ static READ8_HANDLER( propcycle_mcu_adc_r )
|
||||
int i;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
generic_pulse_irq_line(space->machine->cpu[3], M37710_LINE_TIMERA3TICK);
|
||||
generic_pulse_irq_line(cputag_get_cpu(space->machine, "mcu"), M37710_LINE_TIMERA3TICK);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5071,19 +5071,19 @@ static READ16_HANDLER( mcuc74_speedup_r )
|
||||
|
||||
static void install_c74_speedup(running_machine *machine)
|
||||
{
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x80, 0x81, 0, 0, mcuc74_speedup_r, mcu_speedup_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x80, 0x81, 0, 0, mcuc74_speedup_r, mcu_speedup_w);
|
||||
}
|
||||
|
||||
static void install_130_speedup(running_machine *machine)
|
||||
{
|
||||
// install speedup cheat for 1.30 MCU BIOS
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x82, 0x83, 0, 0, mcu130_speedup_r, mcu_speedup_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x82, 0x83, 0, 0, mcu130_speedup_r, mcu_speedup_w);
|
||||
}
|
||||
|
||||
static void install_141_speedup(running_machine *machine)
|
||||
{
|
||||
// install speedup cheat for 1.41 MCU BIOS
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x82, 0x83, 0, 0, mcu141_speedup_r, mcu_speedup_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x82, 0x83, 0, 0, mcu141_speedup_r, mcu_speedup_w);
|
||||
}
|
||||
|
||||
static void namcos22_init( running_machine *machine, enum namcos22_gametype game_type )
|
||||
@ -5102,7 +5102,7 @@ static DRIVER_INIT( alpiner )
|
||||
{
|
||||
namcos22s_init(machine, NAMCOS22_ALPINE_RACER);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
|
||||
install_130_speedup(machine);
|
||||
}
|
||||
@ -5111,7 +5111,7 @@ static DRIVER_INIT( alpiner2 )
|
||||
{
|
||||
namcos22s_init(machine, NAMCOS22_ALPINE_RACER_2);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
|
||||
install_130_speedup(machine);
|
||||
}
|
||||
@ -5120,7 +5120,7 @@ static DRIVER_INIT( alpinesa )
|
||||
{
|
||||
namcos22s_init(machine, NAMCOS22_ALPINE_SURFER);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, alpineracer_mcu_adc_r);
|
||||
|
||||
install_141_speedup(machine);
|
||||
}
|
||||
@ -5129,7 +5129,7 @@ static DRIVER_INIT( airco22 )
|
||||
{
|
||||
namcos22s_init(machine, NAMCOS22_AIR_COMBAT22);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, airco22_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, airco22_mcu_adc_r);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( propcycl )
|
||||
@ -5153,7 +5153,7 @@ static DRIVER_INIT( propcycl )
|
||||
|
||||
namcos22s_init(machine, NAMCOS22_PROP_CYCLE);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, propcycle_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, propcycle_mcu_adc_r);
|
||||
|
||||
install_141_speedup(machine);
|
||||
}
|
||||
@ -5234,7 +5234,7 @@ static DRIVER_INIT( cybrcyc )
|
||||
|
||||
namcos22s_init(machine, NAMCOS22_CYBER_CYCLES);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, cybrcycc_mcu_adc_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_IO), M37710_ADC0_L, M37710_ADC7_H, 0, 0, cybrcycc_mcu_adc_r);
|
||||
|
||||
install_130_speedup(machine);
|
||||
}
|
||||
|
@ -1016,12 +1016,12 @@ static WRITE32_HANDLER( s23_mcuen_w )
|
||||
if (data)
|
||||
{
|
||||
logerror("S23: booting H8/3002\n");
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("S23: stopping H8/3002\n");
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,12 +266,12 @@ static READ8_HANDLER( dsw1_r )
|
||||
|
||||
static WRITE8_HANDLER( int_ack1_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "cpu1", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( int_ack2_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "cpu2", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -784,7 +784,7 @@ ROM_END
|
||||
static DRIVER_INIT( popflame )
|
||||
{
|
||||
/* install a handler to catch protection checks */
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x9000, 0x9000, 0, 0, popflame_protection_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x9000, 0x9000, 0, 0, popflame_protection_r);
|
||||
}
|
||||
|
||||
static int question_offset = 0;
|
||||
@ -813,7 +813,7 @@ static WRITE8_HANDLER( trvmstr_questions_w )
|
||||
static DRIVER_INIT( trvmstr )
|
||||
{
|
||||
/* install questions' handlers */
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc000, 0xc002, 0, 0, trvmstr_questions_r, trvmstr_questions_w);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xc002, 0, 0, trvmstr_questions_r, trvmstr_questions_w);
|
||||
}
|
||||
|
||||
|
||||
|
@ -471,12 +471,12 @@ static WRITE8_HANDLER( tmpz84c011_1_dir_pe_w ) { pio_dir[9] = data; }
|
||||
|
||||
static void ctc0_interrupt(const device_config *device, int state)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[0], 0, state);
|
||||
cputag_set_input_line(device->machine, "maincpu", 0, state);
|
||||
}
|
||||
|
||||
static void ctc1_interrupt(const device_config *device, int state)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1], 0, state);
|
||||
cputag_set_input_line(device->machine, "audiocpu", 0, state);
|
||||
}
|
||||
|
||||
/* CTC of main cpu, ch0 trigger is vblank */
|
||||
@ -507,7 +507,7 @@ static const z80ctc_interface ctc_intf_audio =
|
||||
|
||||
static MACHINE_RESET( sailorws )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
int i;
|
||||
|
||||
// initialize TMPZ84C011 PIO
|
||||
@ -520,7 +520,7 @@ static MACHINE_RESET( sailorws )
|
||||
|
||||
static DRIVER_INIT( nbmj9195 )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
UINT8 *ROM = memory_region(machine, "audiocpu");
|
||||
|
||||
// sound program patch
|
||||
|
@ -1601,7 +1601,7 @@ static const ay8910_interface ay8910_interface_2 =
|
||||
static void sound_irq(const device_config *device, int state)
|
||||
{
|
||||
/* Interrupts _are_ generated, I wonder where they go.. */
|
||||
/*cpu_set_input_line(device->machine->cpu[1],0,HOLD_LINE);*/
|
||||
/*cputag_set_input_line(device->machine, "audiocpu", 0, HOLD_LINE);*/
|
||||
}
|
||||
|
||||
static const ym2151_interface ym2151_config =
|
||||
|
@ -7482,7 +7482,7 @@ static DRIVER_INIT( kf2k3pcb )
|
||||
neogeo_fixed_layer_bank_type = 2;
|
||||
DRIVER_INIT_CALL(neogeo);
|
||||
install_pvc_protection(machine);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc00000, 0xc7ffff, 0, 0, (read16_space_func)SMH_BANK(6) ); // 512k bios
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc00000, 0xc7ffff, 0, 0, (read16_space_func)SMH_BANK(6) ); // 512k bios
|
||||
}
|
||||
|
||||
static DRIVER_INIT( kof2003 )
|
||||
@ -7558,11 +7558,11 @@ static DRIVER_INIT( jockeygp )
|
||||
extra_ram = auto_alloc_array(machine, UINT16, 0x2000/2);
|
||||
state_save_register_global_pointer(machine, extra_ram, 0x2000 / 2);
|
||||
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x201fff, 0, 0, (read16_space_func)SMH_BANK(8), (write16_space_func)SMH_BANK(8));
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x201fff, 0, 0, (read16_space_func)SMH_BANK(8), (write16_space_func)SMH_BANK(8));
|
||||
memory_set_bankptr(machine, NEOGEO_BANK_EXTRA_RAM, extra_ram);
|
||||
|
||||
// memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x280000, 0x280001, 0, 0, "IN5");
|
||||
// memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2c0000, 0x2c0001, 0, 0, "IN6");
|
||||
// memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x280000, 0x280001, 0, 0, "IN5");
|
||||
// memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2c0000, 0x2c0001, 0, 0, "IN6");
|
||||
|
||||
DRIVER_INIT_CALL(neogeo);
|
||||
}
|
||||
@ -7575,11 +7575,11 @@ static DRIVER_INIT( vliner )
|
||||
extra_ram = auto_alloc_array(machine, UINT16, 0x2000/2);
|
||||
state_save_register_global_pointer(machine, extra_ram, 0x2000 / 2);
|
||||
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x201fff, 0, 0, (read16_space_func)SMH_BANK(8), (write16_space_func)SMH_BANK(8));
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x201fff, 0, 0, (read16_space_func)SMH_BANK(8), (write16_space_func)SMH_BANK(8));
|
||||
memory_set_bankptr(machine, NEOGEO_BANK_EXTRA_RAM, extra_ram);
|
||||
|
||||
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x280000, 0x280001, 0, 0, "IN5");
|
||||
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2c0000, 0x2c0001, 0, 0, "IN6");
|
||||
memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x280000, 0x280001, 0, 0, "IN5");
|
||||
memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2c0000, 0x2c0001, 0, 0, "IN6");
|
||||
|
||||
DRIVER_INIT_CALL(neogeo);
|
||||
}
|
||||
@ -7587,7 +7587,7 @@ static DRIVER_INIT( vliner )
|
||||
static DRIVER_INIT( kog )
|
||||
{
|
||||
/* overlay cartridge ROM */
|
||||
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0ffffe, 0x0fffff, 0, 0, "JUMPER");
|
||||
memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0ffffe, 0x0fffff, 0, 0, "JUMPER");
|
||||
|
||||
kog_px_decrypt(machine);
|
||||
neogeo_bootleg_sx_decrypt(machine, 1);
|
||||
|
@ -312,9 +312,9 @@ void neogeo_set_display_counter_lsb(const address_space *space, UINT16 data)
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 1, vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 2, display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 3, irq3_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, vblank_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, display_position_interrupt_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, irq3_pending ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -400,19 +400,19 @@ static void start_interrupt_timers(running_machine *machine)
|
||||
|
||||
static void audio_cpu_irq(const device_config *device, int assert)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1], 0, assert ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "audiocpu", 0, assert ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void audio_cpu_assert_nmi(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( audio_cpu_clear_nmi_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -550,7 +550,7 @@ static void calendar_clock(void)
|
||||
|
||||
static CUSTOM_INPUT( get_calendar_status )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(field->port->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(field->port->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
return (pd4990a_databit_r(space, 0) << 1) | pd4990a_testbit_r(space, 0);
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ static CUSTOM_INPUT( get_audio_result )
|
||||
{
|
||||
UINT32 ret = audio_result;
|
||||
|
||||
// if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc(field->port->machine->cpu[0]), ret);
|
||||
// if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc(cputag_get_cpu(field->port->machine, "maincpu")), ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -768,7 +768,7 @@ static WRITE16_HANDLER( main_cpu_bank_select_w )
|
||||
|
||||
static void main_cpu_banking_init(running_machine *machine)
|
||||
{
|
||||
const address_space *mainspace = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *mainspace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
/* create vector banks */
|
||||
memory_configure_bank(machine, NEOGEO_BANK_VECTORS, 0, 1, memory_region(machine, "mainbios"), 0);
|
||||
@ -852,7 +852,7 @@ static void _set_audio_cpu_rom_source(const address_space *space)
|
||||
{
|
||||
audio_cpu_rom_source_last = audio_cpu_rom_source;
|
||||
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, PULSE_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
|
||||
|
||||
if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: selectign %s ROM\n", cpu_get_pc(space->cpu), audio_cpu_rom_source ? "CARTRIDGE" : "BIOS");
|
||||
}
|
||||
@ -902,7 +902,7 @@ static void audio_cpu_banking_init(running_machine *machine)
|
||||
set_audio_cpu_banking(machine);
|
||||
|
||||
audio_cpu_rom_source_last = 0;
|
||||
set_audio_cpu_rom_source(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0);
|
||||
set_audio_cpu_rom_source(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1054,7 +1054,7 @@ static STATE_POSTLOAD( neogeo_postload )
|
||||
_set_main_cpu_bank_address(machine);
|
||||
_set_main_cpu_vector_table_source(machine);
|
||||
set_audio_cpu_banking(machine);
|
||||
_set_audio_cpu_rom_source(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM));
|
||||
_set_audio_cpu_rom_source(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM));
|
||||
set_outputs();
|
||||
}
|
||||
|
||||
@ -1115,12 +1115,12 @@ static MACHINE_START( neogeo )
|
||||
static MACHINE_RESET( neogeo )
|
||||
{
|
||||
offs_t offs;
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
/* reset system control registers */
|
||||
for (offs = 0; offs < 8; offs++)
|
||||
system_control_w(space, offs, 0, 0x00ff);
|
||||
device_reset(machine->cpu[0]);
|
||||
device_reset(cputag_get_cpu(machine, "maincpu"));
|
||||
|
||||
neogeo_reset_rng();
|
||||
|
||||
|
@ -193,7 +193,7 @@ static WRITE8_HANDLER( sexygal_nsc_true_blitter_w )
|
||||
}
|
||||
}
|
||||
//printf("%02x %02x %02x %02x %02x %02x %02x\n",true_blit[0],true_blit[1],true_blit[2],true_blit[3],true_blit[4],true_blit[5],true_blit[6]);
|
||||
//cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE );
|
||||
//cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -270,7 +270,7 @@ static UINT8 nsc_latch,z80_latch;
|
||||
|
||||
static WRITE8_HANDLER( nsc_latch_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE );
|
||||
cputag_set_input_line(space->machine, "sub", 0, HOLD_LINE );
|
||||
}
|
||||
|
||||
static READ8_HANDLER( nsc_latch_r )
|
||||
|
@ -199,7 +199,7 @@ static WRITE8_HANDLER( robokid_bankselect_w )
|
||||
static WRITE8_HANDLER( ninjakd2_soundreset_w )
|
||||
{
|
||||
// bit 4 resets sound CPU
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
// bit 7 flips screen
|
||||
flip_screen_set(space->machine, data & 0x80);
|
||||
@ -905,7 +905,7 @@ GFXDECODE_END
|
||||
|
||||
static void irqhandler(const device_config *device, int irq)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1], 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "soundcpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
|
@ -213,7 +213,7 @@ static void parse_control(running_machine *machine) /* assumes Z80 sandwiched be
|
||||
/* bit 0 enables cpu B */
|
||||
/* however this fails when recovering from a save state
|
||||
if cpu B is disabled !! */
|
||||
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, (cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, (cpua_ctrl &0x1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ GFXDECODE_END
|
||||
/* handler called by the YM2610 emulator when the internal timers cause an IRQ */
|
||||
static void irqhandler(const device_config *device, int irq)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1],0,irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2610_interface ym2610_config =
|
||||
|
@ -181,7 +181,7 @@ static const z80ctc_interface ctc_intf =
|
||||
|
||||
static MACHINE_RESET( niyanpai )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
int i;
|
||||
|
||||
// initialize TMPZ84C011 PIO
|
||||
@ -251,7 +251,7 @@ static READ16_HANDLER( musobana_inputport_0_r )
|
||||
|
||||
static CUSTOM_INPUT( musobana_outcoin_flag_r )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(field->port->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(field->port->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
// tmp68301_parallel_interface[0x05]
|
||||
// bit 0 coin counter
|
||||
// bit 2 motor on
|
||||
@ -917,4 +917,3 @@ GAME( 1996, niyanpai, 0, niyanpai, niyanpai, niyanpai, ROT0, "Nichibutsu", "Niya
|
||||
GAME( 1995, musobana, 0, musobana, musobana, niyanpai, ROT0, "Nichibutsu/Yubis", "Musoubana (Japan)", 0 )
|
||||
GAME( 1994, 4psimasy, 0, musobana, 4psimasy, niyanpai, ROT0, "SPHINX/AV JAPAN", "Mahjong 4P Simasyo (Japan)", 0 )
|
||||
GAME( 199?, mhhonban, 0, mhhonban, mhhonban, niyanpai, ROT0, "Nichibutsu?", "Mahjong Housoukyoku Honbanchuu (Japan)", 0 )
|
||||
|
||||
|
@ -247,7 +247,7 @@ static WRITE16_HANDLER( nmg5_soundlatch_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
soundlatch_w(space,0,data & 0xff);
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -959,7 +959,7 @@ GFXDECODE_END
|
||||
|
||||
static void soundirq(const device_config *device, int state)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[1], 0, state);
|
||||
cputag_set_input_line(device->machine, "soundcpu", 0, state);
|
||||
}
|
||||
|
||||
static const ym3812_interface ym3812_intf =
|
||||
|
@ -649,7 +649,7 @@ READ32_HANDLER(K001604_reg_r)
|
||||
|
||||
static void voodoo_vblank_0(const device_config *device, int param)
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[0], INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static VIDEO_START( nwktr )
|
||||
@ -754,11 +754,11 @@ static WRITE32_HANDLER( sysreg_w )
|
||||
{
|
||||
if (data & 0x80) // CG Board 1 IRQ Ack
|
||||
{
|
||||
//cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_IRQ1, CLEAR_LINE);
|
||||
//cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_IRQ1, CLEAR_LINE);
|
||||
}
|
||||
if (data & 0x40) // CG Board 0 IRQ Ack
|
||||
{
|
||||
//cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
//cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -890,10 +890,10 @@ static WRITE32_HANDLER( lanc2_w )
|
||||
static MACHINE_START( nwktr )
|
||||
{
|
||||
/* set conservative DRC options */
|
||||
ppcdrc_set_options(machine->cpu[0], PPCDRC_COMPATIBLE_OPTIONS);
|
||||
ppcdrc_set_options(cputag_get_cpu(machine, "maincpu"), PPCDRC_COMPATIBLE_OPTIONS);
|
||||
|
||||
/* configure fast RAM regions for DRC */
|
||||
ppcdrc_add_fastram(machine->cpu[0], 0x00000000, 0x003fffff, FALSE, work_ram);
|
||||
ppcdrc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x00000000, 0x003fffff, FALSE, work_ram);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( nwktr_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
@ -1024,7 +1024,7 @@ static const sharc_config sharc_cfg =
|
||||
|
||||
static MACHINE_RESET( nwktr )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "dsp", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_DRIVER_START( nwktr )
|
||||
@ -1077,9 +1077,9 @@ MACHINE_DRIVER_END
|
||||
static void sound_irq_callback(running_machine *machine, int irq)
|
||||
{
|
||||
if (irq == 0)
|
||||
generic_pulse_irq_line(machine->cpu[1], INPUT_LINE_IRQ1);
|
||||
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), INPUT_LINE_IRQ1);
|
||||
else
|
||||
generic_pulse_irq_line(machine->cpu[1], INPUT_LINE_IRQ2);
|
||||
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), INPUT_LINE_IRQ2);
|
||||
}
|
||||
|
||||
static DRIVER_INIT(nwktr)
|
||||
|
@ -161,7 +161,7 @@ int nyc_gametype=0;
|
||||
|
||||
static WRITE8_HANDLER( sub_cpu_halt_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, (data )? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_HALT, (data )? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static UINT8 snd_data;
|
||||
@ -209,7 +209,7 @@ static READ8_HANDLER( nycaptor_bx_r )
|
||||
|
||||
static WRITE8_HANDLER( sound_cpu_reset_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static int vol_ctrl[16];
|
||||
@ -233,7 +233,7 @@ static MACHINE_RESET( ta7630 )
|
||||
|
||||
static TIMER_CALLBACK( nmi_callback )
|
||||
{
|
||||
if (sound_nmi_enable) cpu_set_input_line(machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE);
|
||||
if (sound_nmi_enable) cputag_set_input_line(machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
else pending_nmi = 1;
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ static WRITE8_HANDLER( nmi_enable_w )
|
||||
sound_nmi_enable = 1;
|
||||
if (pending_nmi)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[2],INPUT_LINE_NMI,PULSE_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
pending_nmi = 0;
|
||||
}
|
||||
}
|
||||
|
@ -117,13 +117,13 @@ static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq )
|
||||
const device_config *pia2 = devtag_get_device(device->machine, "pia2");
|
||||
int combined_state = pia6821_get_irq_a(pia1) | pia6821_get_irq_b(pia1) | pia6821_get_irq_b(pia2);
|
||||
|
||||
cpu_set_input_line(device->machine->cpu[0], M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "maincpu", M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static WRITE_LINE_DEVICE_HANDLER( main_cpu_firq )
|
||||
{
|
||||
cpu_set_input_line(device->machine->cpu[0], M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(device->machine, "maincpu", M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -435,14 +435,14 @@ static VIDEO_UPDATE( nyny )
|
||||
static WRITE8_HANDLER( audio_1_command_w )
|
||||
{
|
||||
soundlatch_w(space, 0, data);
|
||||
cpu_set_input_line(space->machine->cpu[1], M6800_IRQ_LINE, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", M6800_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( audio_1_answer_w )
|
||||
{
|
||||
soundlatch3_w(space, 0, data);
|
||||
cpu_set_input_line(space->machine->cpu[0], M6809_IRQ_LINE, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", M6809_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -486,7 +486,7 @@ static const ay8910_interface ay8910_64_interface =
|
||||
static WRITE8_HANDLER( audio_2_command_w )
|
||||
{
|
||||
soundlatch2_w(space, 0, (data & 0x60) >> 5);
|
||||
cpu_set_input_line(space->machine->cpu[2], M6800_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "audio2", M6800_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1199,7 +1199,7 @@ READ16_HANDLER( hd68k_ds3_gdata_r )
|
||||
logerror("%06X:hd68k_ds3_gdata_r(%04X)\n", cpu_get_previouspc(space->cpu), ds3_gdata);
|
||||
|
||||
/* attempt to optimize the transfer if conditions are right */
|
||||
if (space->cpu == space->machine->cpu[0] && pc == hdds3_transfer_pc &&
|
||||
if (space->cpu == cputag_get_cpu(space->machine, "maincpu") && pc == hdds3_transfer_pc &&
|
||||
!(!ds3_g68flag && ds3_g68irqs) && !(ds3_gflag && ds3_gfirqs))
|
||||
{
|
||||
UINT32 destaddr = cpu_get_reg(space->cpu, M68K_A1);
|
||||
|
@ -25,7 +25,7 @@ void signal_rcp_interrupt(running_machine *machine, int interrupt)
|
||||
{
|
||||
mi_interrupt |= interrupt;
|
||||
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ void clear_rcp_interrupt(running_machine *machine, int interrupt)
|
||||
|
||||
//if (!mi_interrupt)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ READ32_HANDLER( n64_sp_reg_r )
|
||||
return (sp_dma_skip << 20) | (sp_dma_count << 12) | sp_dma_length;
|
||||
|
||||
case 0x10/4: // SP_STATUS_REG
|
||||
return cpu_get_reg(space->machine->cpu[1], RSP_SR);
|
||||
return cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR);
|
||||
|
||||
case 0x14/4: // SP_DMA_FULL_REG
|
||||
return 0;
|
||||
@ -255,7 +255,7 @@ READ32_HANDLER( n64_sp_reg_r )
|
||||
return 0;
|
||||
|
||||
case 0x40000/4: // PC
|
||||
return cpu_get_reg(space->machine->cpu[1], RSP_PC) & 0x00000fff;
|
||||
return cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_PC) & 0x00000fff;
|
||||
|
||||
default:
|
||||
logerror("sp_reg_r: %08X, %08X at %08X\n", offset, mem_mask, cpu_get_pc(space->cpu));
|
||||
@ -303,8 +303,8 @@ WRITE32_HANDLER( n64_sp_reg_w )
|
||||
// cpu_spinuntil_trigger(space->cpu, 6789);
|
||||
|
||||
// printf( "Clearing RSP_STATUS_HALT\n" );
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_HALT );
|
||||
cputag_set_input_line(space->machine, "rsp", INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_HALT );
|
||||
// RSP_STATUS &= ~RSP_STATUS_HALT;
|
||||
//}
|
||||
//else
|
||||
@ -315,14 +315,14 @@ WRITE32_HANDLER( n64_sp_reg_w )
|
||||
if (data & 0x00000002) // set halt
|
||||
{
|
||||
// printf( "Setting RSP_STATUS_HALT\n" );
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE);
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_HALT );
|
||||
cputag_set_input_line(space->machine, "rsp", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_HALT );
|
||||
// RSP_STATUS |= RSP_STATUS_HALT;
|
||||
}
|
||||
if (data & 0x00000004)
|
||||
{
|
||||
//printf( "Clearing RSP_STATUS_BROKE\n" );
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_BROKE );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_BROKE );
|
||||
// RSP_STATUS &= ~RSP_STATUS_BROKE; // clear broke
|
||||
}
|
||||
if (data & 0x00000008) // clear interrupt
|
||||
@ -336,107 +336,107 @@ WRITE32_HANDLER( n64_sp_reg_w )
|
||||
if (data & 0x00000020)
|
||||
{
|
||||
// printf( "Clearing RSP_STATUS_SSTEP\n" );
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SSTEP );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SSTEP );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SSTEP; // clear single step
|
||||
}
|
||||
if (data & 0x00000040)
|
||||
{
|
||||
//printf( "Setting RSP_STATUS_SSTEP\n" );
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SSTEP );
|
||||
if( !( cpu_get_reg(space->machine->cpu[1], RSP_SR) & ( RSP_STATUS_BROKE | RSP_STATUS_HALT ) ) )
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SSTEP );
|
||||
if( !( cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ( RSP_STATUS_BROKE | RSP_STATUS_HALT ) ) )
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_STEPCNT, 1 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_STEPCNT, 1 );
|
||||
}
|
||||
// RSP_STATUS |= RSP_STATUS_SSTEP; // set single step
|
||||
}
|
||||
if (data & 0x00000080)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_INTR_BREAK );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_INTR_BREAK );
|
||||
// RSP_STATUS &= ~RSP_STATUS_INTR_BREAK; // clear interrupt on break
|
||||
}
|
||||
if (data & 0x00000100)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_INTR_BREAK );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_INTR_BREAK );
|
||||
// RSP_STATUS |= RSP_STATUS_INTR_BREAK; // set interrupt on break
|
||||
}
|
||||
if (data & 0x00000200)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL0 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL0 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL0; // clear signal 0
|
||||
}
|
||||
if (data & 0x00000400)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL0 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL0 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL0; // set signal 0
|
||||
}
|
||||
if (data & 0x00000800)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL1 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL1 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL1; // clear signal 1
|
||||
}
|
||||
if (data & 0x00001000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL1 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL1 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL1; // set signal 1
|
||||
}
|
||||
if (data & 0x00002000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL2 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL2 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL2; // clear signal 2
|
||||
}
|
||||
if (data & 0x00004000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL2 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL2 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL2; // set signal 2
|
||||
}
|
||||
if (data & 0x00008000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL3 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL3 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL3; // clear signal 3
|
||||
}
|
||||
if (data & 0x00010000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL3 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL3 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL3; // set signal 3
|
||||
}
|
||||
if (data & 0x00020000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL4 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL4 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL4; // clear signal 4
|
||||
}
|
||||
if (data & 0x00040000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL4 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL4 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL4; // set signal 4
|
||||
}
|
||||
if (data & 0x00080000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL5 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL5 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL5; // clear signal 5
|
||||
}
|
||||
if (data & 0x00100000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL5 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL5 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL5; // set signal 5
|
||||
}
|
||||
if (data & 0x00200000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL6 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL6 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL6; // clear signal 6
|
||||
}
|
||||
if (data & 0x00400000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL6 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL6 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL6; // set signal 6
|
||||
}
|
||||
if (data & 0x00800000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) & ~RSP_STATUS_SIGNAL7 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) & ~RSP_STATUS_SIGNAL7 );
|
||||
// RSP_STATUS &= ~RSP_STATUS_SIGNAL7; // clear signal 7
|
||||
}
|
||||
if (data & 0x01000000)
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_SR, cpu_get_reg(space->machine->cpu[1], RSP_SR) | RSP_STATUS_SIGNAL7 );
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR, cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_SR) | RSP_STATUS_SIGNAL7 );
|
||||
// RSP_STATUS |= RSP_STATUS_SIGNAL7; // set signal 7
|
||||
}
|
||||
break;
|
||||
@ -458,13 +458,13 @@ WRITE32_HANDLER( n64_sp_reg_w )
|
||||
{
|
||||
case 0x00/4: // SP_PC_REG
|
||||
//printf( "Setting PC to: %08x\n", 0x04001000 | (data & 0xfff ) );
|
||||
if( cpu_get_reg(space->machine->cpu[1], RSP_NEXTPC) != 0xffffffff )
|
||||
if( cpu_get_reg(cputag_get_cpu(space->machine, "rsp"), RSP_NEXTPC) != 0xffffffff )
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_NEXTPC, 0x04001000 | (data & 0xfff));
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_NEXTPC, 0x04001000 | (data & 0xfff));
|
||||
}
|
||||
else
|
||||
{
|
||||
cpu_set_reg(space->machine->cpu[1], RSP_PC, 0x04001000 | (data & 0xfff));
|
||||
cpu_set_reg(cputag_get_cpu(space->machine, "rsp"), RSP_PC, 0x04001000 | (data & 0xfff));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1569,10 +1569,10 @@ WRITE32_HANDLER( n64_pif_ram_w )
|
||||
|
||||
MACHINE_START( n64 )
|
||||
{
|
||||
mips3drc_set_options(machine->cpu[0], MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY);
|
||||
mips3drc_set_options(cputag_get_cpu(machine, "maincpu"), MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY);
|
||||
|
||||
/* configure fast RAM regions for DRC */
|
||||
mips3drc_add_fastram(machine->cpu[0], 0x00000000, 0x007fffff, FALSE, rdram);
|
||||
mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x00000000, 0x007fffff, FALSE, rdram);
|
||||
}
|
||||
|
||||
MACHINE_RESET( n64 )
|
||||
@ -1634,7 +1634,7 @@ MACHINE_RESET( n64 )
|
||||
audio_timer = timer_alloc(machine, audio_timer_callback, NULL);
|
||||
timer_adjust_oneshot(audio_timer, attotime_never, 0);
|
||||
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "rsp", INPUT_LINE_HALT, ASSERT_LINE);
|
||||
|
||||
// bootcode differs between CIC-chips, so we can use its checksum to detect the CIC-chip
|
||||
boot_checksum = 0;
|
||||
|
@ -48,7 +48,7 @@ MACHINE_RESET( namcond1 )
|
||||
namcond1_h8_irq5_enabled = 0;
|
||||
|
||||
// halt the MCU
|
||||
cpu_set_input_line(machine->cpu[1],INPUT_LINE_RESET,ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
|
||||
// instance of the shared ram pointer
|
||||
@ -97,7 +97,7 @@ WRITE16_HANDLER( namcond1_cuskey_w )
|
||||
// this is a kludge until we emulate the h8
|
||||
if ((namcond1_h8_irq5_enabled == 0) && (data != 0x0000))
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
namcond1_h8_irq5_enabled = ( data != 0x0000 );
|
||||
break;
|
||||
|
@ -587,9 +587,9 @@ WRITE8_HANDLER( namcos1_cpu_control_w )
|
||||
namcos1_reset = data & 1;
|
||||
}
|
||||
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "sub", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -667,7 +667,8 @@ static WRITE8_HANDLER( unknown_w )
|
||||
/* Main bankswitching routine */
|
||||
static void set_bank(running_machine *machine, int banknum, const bankhandler *handler)
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[(banknum >> 3) & 1], ADDRESS_SPACE_PROGRAM);
|
||||
static const char *const cputags[] = { "maincpu", "sub" };
|
||||
const address_space *space = cputag_get_address_space(machine, cputags[(banknum >> 3) & 1], ADDRESS_SPACE_PROGRAM);
|
||||
int bankstart = (banknum & 7) * 0x2000;
|
||||
|
||||
/* for BANK handlers , memory direct and OP-code base */
|
||||
@ -734,7 +735,7 @@ WRITE8_HANDLER( namcos1_bankswitch_w )
|
||||
{
|
||||
// logerror("cpu %s: namcos1_bankswitch_w offset %04x data %02x\n", space->cpu->tag, offset, data);
|
||||
|
||||
namcos1_bankswitch(space->machine, (space->cpu == space->machine->cpu[0]) ? 0 : 1, offset, data);
|
||||
namcos1_bankswitch(space->machine, (space->cpu == cputag_get_cpu(space->machine, "maincpu")) ? 0 : 1, offset, data);
|
||||
}
|
||||
|
||||
/* Sub cpu set start bank port */
|
||||
@ -859,10 +860,10 @@ MACHINE_RESET( namcos1 )
|
||||
namcos1_bankswitch(machine, 1, 0x0e01, 0xff);
|
||||
|
||||
/* reset Cpu 0 and stop all other CPUs */
|
||||
device_reset(machine->cpu[0]);
|
||||
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpu_set_input_line(machine->cpu[3], INPUT_LINE_RESET, ASSERT_LINE);
|
||||
device_reset(cputag_get_cpu(machine, "maincpu"));
|
||||
cputag_set_input_line(machine, "sub", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "mcu", INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
/* mcu patch data clear */
|
||||
mcu_patch_data = 0;
|
||||
@ -1204,7 +1205,7 @@ DRIVER_INIT( tankfrc4 )
|
||||
};
|
||||
namcos1_driver_init(machine, &tankfrce_specific);
|
||||
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, faceoff_inputs_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, faceoff_inputs_r);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@ -1295,7 +1296,7 @@ static READ8_HANDLER( quester_paddle_r )
|
||||
DRIVER_INIT( quester )
|
||||
{
|
||||
namcos1_driver_init(machine, NULL);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, quester_paddle_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, quester_paddle_r);
|
||||
}
|
||||
|
||||
|
||||
@ -1384,7 +1385,7 @@ static READ8_HANDLER( berabohm_buttons_r )
|
||||
DRIVER_INIT( berabohm )
|
||||
{
|
||||
namcos1_driver_init(machine, NULL);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, berabohm_buttons_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, berabohm_buttons_r);
|
||||
}
|
||||
|
||||
|
||||
@ -1454,5 +1455,5 @@ static READ8_HANDLER( faceoff_inputs_r )
|
||||
DRIVER_INIT( faceoff )
|
||||
{
|
||||
namcos1_driver_init(machine, NULL);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[3], ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, faceoff_inputs_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "mcu", ADDRESS_SPACE_PROGRAM), 0x1400, 0x1401, 0, 0, faceoff_inputs_r);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ static TIMER_CALLBACK( nb1413m3_timer_callback )
|
||||
|
||||
if (nb1413m3_nmi_enable)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
nb1413m3_nmi_count++;
|
||||
}
|
||||
|
||||
|
@ -178,9 +178,9 @@ static WRITE16_HANDLER( kof10th_bankswitch_w )
|
||||
|
||||
void install_kof10th_protection ( running_machine *machine )
|
||||
{
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
|
||||
}
|
||||
|
||||
void decrypt_kof10th(running_machine *machine)
|
||||
@ -485,7 +485,7 @@ void patch_cthd2003( running_machine *machine )
|
||||
UINT16 *mem16 = (UINT16 *)memory_region(machine, "maincpu");
|
||||
|
||||
/* special ROM banking handler */
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2ffff0, 0x2fffff, 0, 0, cthd2003_bankswitch_w);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2ffff0, 0x2fffff, 0, 0, cthd2003_bankswitch_w);
|
||||
|
||||
// theres still a problem on the character select screen but it seems to be related to cpu core timing issues,
|
||||
// overclocking the 68k prevents it.
|
||||
@ -729,7 +729,7 @@ static WRITE16_HANDLER ( ms5plus_bankswitch_w )
|
||||
void install_ms5plus_protection(running_machine *machine)
|
||||
{
|
||||
// special ROM banking handler / additional protection
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0x2ffff0, 0x2fffff,0, 0, mslug5_prot_r, ms5plus_bankswitch_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM),0x2ffff0, 0x2fffff,0, 0, mslug5_prot_r, ms5plus_bankswitch_w);
|
||||
}
|
||||
|
||||
|
||||
@ -972,7 +972,7 @@ void kf2k3bl_px_decrypt( running_machine *machine )
|
||||
|
||||
void kf2k3bl_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
|
||||
}
|
||||
|
||||
|
||||
@ -1000,7 +1000,7 @@ void kf2k3pl_px_decrypt( running_machine *machine )
|
||||
|
||||
void kf2k3pl_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003p_w );
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003p_w );
|
||||
}
|
||||
|
||||
|
||||
@ -1031,7 +1031,7 @@ void kf2k3upl_px_decrypt( running_machine *machine )
|
||||
|
||||
void kf2k3upl_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,7 +104,7 @@ void fatfury2_install_protection(running_machine *machine)
|
||||
{
|
||||
/* the protection involves reading and writing addresses in the */
|
||||
/* 0x2xxxxx range. There are several checks all around the code. */
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x200000, 0x2fffff, 0, 0, fatfury2_protection_16_r, fatfury2_protection_16_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x200000, 0x2fffff, 0, 0, fatfury2_protection_16_r, fatfury2_protection_16_w);
|
||||
|
||||
state_save_register_global(machine, fatfury2_prot_data);
|
||||
}
|
||||
@ -146,7 +146,7 @@ void install_kof98_protection(running_machine *machine)
|
||||
/* when 0x20aaaa contains 0x0090 (word) then 0x100 (normally the neogeo header) should return 0x00c200fd
|
||||
worked out using real hw */
|
||||
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x20aaaa, 0x20aaab, 0, 0, kof98_prot_w);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x20aaaa, 0x20aaab, 0, 0, kof98_prot_w);
|
||||
}
|
||||
|
||||
|
||||
@ -402,15 +402,15 @@ static void sma_install_random_read_handler(running_machine *machine, int addr1,
|
||||
{
|
||||
state_save_register_global(machine, neogeo_rng);
|
||||
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), addr1, addr1 + 1, 0, 0, sma_random_r);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), addr2, addr2 + 1, 0, 0, sma_random_r);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), addr1, addr1 + 1, 0, 0, sma_random_r);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), addr2, addr2 + 1, 0, 0, sma_random_r);
|
||||
}
|
||||
|
||||
|
||||
void kof99_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2ffff0, 0x2ffff1, 0, 0, kof99_bankswitch_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2ffff0, 0x2ffff1, 0, 0, kof99_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
|
||||
sma_install_random_read_handler(machine, 0x2ffff8, 0x2ffffa);
|
||||
}
|
||||
@ -418,8 +418,8 @@ void kof99_install_protection(running_machine *machine)
|
||||
|
||||
void garou_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fffc0, 0x2fffc1, 0, 0, garou_bankswitch_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fffc0, 0x2fffc1, 0, 0, garou_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
|
||||
sma_install_random_read_handler(machine, 0x2fffcc, 0x2ffff0);
|
||||
}
|
||||
@ -427,8 +427,8 @@ void garou_install_protection(running_machine *machine)
|
||||
|
||||
void garouo_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fffc0, 0x2fffc1, 0, 0, garouo_bankswitch_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fffc0, 0x2fffc1, 0, 0, garouo_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
|
||||
sma_install_random_read_handler(machine, 0x2fffcc, 0x2ffff0);
|
||||
}
|
||||
@ -436,8 +436,8 @@ void garouo_install_protection(running_machine *machine)
|
||||
|
||||
void mslug3_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fffe4, 0x2fffe5, 0, 0, mslug3_bankswitch_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fffe4, 0x2fffe5, 0, 0, mslug3_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
|
||||
// sma_install_random_read_handler(machine, 0x2ffff8, 0x2ffffa);
|
||||
}
|
||||
@ -445,8 +445,8 @@ void mslug3_install_protection(running_machine *machine)
|
||||
|
||||
void kof2000_install_protection(running_machine *machine)
|
||||
{
|
||||
memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fffec, 0x2fffed, 0, 0, kof2000_bankswitch_w);
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
memory_install_write16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fffec, 0x2fffed, 0, 0, kof2000_bankswitch_w);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe446, 0x2fe447, 0, 0, prot_9a37_r);
|
||||
|
||||
sma_install_random_read_handler(machine, 0x2fffd8, 0x2fffda);
|
||||
}
|
||||
@ -524,5 +524,5 @@ void install_pvc_protection( running_machine *machine )
|
||||
pvc_cartridge_ram = auto_alloc_array(machine, UINT16, 0x2000/2);
|
||||
state_save_register_global_pointer(machine, pvc_cartridge_ram, 0x2000 / 2);
|
||||
|
||||
memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, pvc_prot_r, pvc_prot_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2fe000, 0x2fffff, 0, 0, pvc_prot_r, pvc_prot_w);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ WRITE8_HANDLER( nycaptor_68705_portB_w )
|
||||
if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02))
|
||||
{
|
||||
portA_in = from_main;
|
||||
if (main_sent) cpu_set_input_line(space->machine->cpu[3],0,CLEAR_LINE);
|
||||
if (main_sent) cputag_set_input_line(space->machine, "mcu", 0, CLEAR_LINE);
|
||||
main_sent = 0;
|
||||
|
||||
}
|
||||
@ -103,7 +103,7 @@ WRITE8_HANDLER( nycaptor_mcu_w )
|
||||
|
||||
from_main = data;
|
||||
main_sent = 1;
|
||||
cpu_set_input_line(space->machine->cpu[3],0,ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "mcu", 0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
READ8_HANDLER( nycaptor_mcu_r )
|
||||
|
@ -132,7 +132,7 @@ static void mrokumei_handleblit( const address_space *space, int rom_base )
|
||||
} /* for(;;) */
|
||||
|
||||
finish:
|
||||
cpu_set_input_line(space->machine->cpu[0],M6809_FIRQ_LINE,HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
static void reikaids_handleblit( const address_space *space, int rom_base )
|
||||
@ -232,7 +232,7 @@ static void reikaids_handleblit( const address_space *space, int rom_base )
|
||||
}
|
||||
|
||||
finish:
|
||||
cpu_set_input_line(space->machine->cpu[0],M6809_FIRQ_LINE,HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
static void pteacher_handleblit( const address_space *space, int rom_base )
|
||||
@ -320,7 +320,7 @@ static void pteacher_handleblit( const address_space *space, int rom_base )
|
||||
} /* for(;;) */
|
||||
|
||||
finish:
|
||||
cpu_set_input_line(space->machine->cpu[0],M6809_FIRQ_LINE,HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", M6809_FIRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2261,7 +2261,7 @@ VIDEO_UPDATE( namcos22s )
|
||||
FILE *f = fopen( "dump.txt", "wb" );
|
||||
if( f )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
{
|
||||
int i,bank;
|
||||
@ -2311,7 +2311,7 @@ VIDEO_UPDATE( namcos22 )
|
||||
FILE *f = fopen( "dump.txt", "wb" );
|
||||
if( f )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
const address_space *space = cputag_get_address_space(screen->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
// Dump(space, f,0x90000000, 0x90000003, "led?" );
|
||||
// Dump(space, f,0x90010000, 0x90017fff, "cz_ram");
|
||||
|
@ -111,7 +111,7 @@ WRITE16_HANDLER( nemesis_gfx_flipx_word_w )
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
if (data & 0x0100)
|
||||
cpu_set_input_line_and_vector(space->machine->cpu[1], 0, HOLD_LINE, 0xff);
|
||||
cputag_set_input_line_and_vector(space->machine, "audiocpu", 0, HOLD_LINE, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ WRITE16_HANDLER( salamand_control_port_word_w )
|
||||
coin_lockout_w(1, data & 0x0400);
|
||||
|
||||
if (data & 0x0800)
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
|
||||
|
||||
hcrash_selected_ip = (~data & 0x1000) >> 12; /* citybomb steering & accel */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user