mirror of
https://github.com/holub/mame
synced 2025-06-06 04:43:45 +03:00
Second (and last for now) round of cpu->[n] to cputags conversions
This commit is contained in:
parent
1f6899de7a
commit
07dab27eaf
@ -82,7 +82,7 @@ static amiga_audio *audio_state;
|
||||
|
||||
static TIMER_CALLBACK( signal_irq )
|
||||
{
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | (0x80 << param), 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | (0x80 << param), 0xffff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ WRITE16_HANDLER( aztarac_sound_w )
|
||||
soundlatch_w(space, offset, data);
|
||||
sound_status ^= 0x21;
|
||||
if (sound_status & 0x20)
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,5 +51,3 @@ INTERRUPT_GEN( aztarac_snd_timed_irq )
|
||||
if (sound_status & 0x10)
|
||||
cpu_set_input_line(device,0,HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,8 +79,8 @@ static READ8_DEVICE_HANDLER( amspdwy_sound_r )
|
||||
|
||||
static WRITE8_HANDLER( amspdwy_sound_w )
|
||||
{
|
||||
soundlatch_w(space,0,data);
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE);
|
||||
soundlatch_w(space, 0, data);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( amspdwy_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
@ -250,7 +250,7 @@ GFXDECODE_END
|
||||
|
||||
static void irq_handler(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 ym2151_interface amspdwy_ym2151_interface =
|
||||
|
@ -538,7 +538,7 @@ static READ8_HANDLER( angelkds_sub_sound_r )
|
||||
|
||||
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, "sub", 0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym2203_interface ym2203_config =
|
||||
|
@ -98,7 +98,7 @@ static WRITE16_HANDLER( aquarium_sound_w )
|
||||
// popmessage("sound write %04x",data);
|
||||
|
||||
soundlatch_w(space,1,data&0xff);
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( aquarium_z80_bank_w )
|
||||
@ -318,7 +318,7 @@ static DRIVER_INIT( aquarium )
|
||||
}
|
||||
|
||||
/* reset the sound bank */
|
||||
aquarium_z80_bank_w(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_IO), 0, 0);
|
||||
aquarium_z80_bank_w(cputag_get_address_space(machine, "audiocpu", ADDRESS_SPACE_IO), 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -331,7 +331,7 @@ GFXDECODE_END
|
||||
|
||||
static void irq_handler(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 ym2151_interface ym2151_config =
|
||||
|
@ -445,8 +445,8 @@ ROM_END
|
||||
|
||||
static DRIVER_INIT( arabian )
|
||||
{
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd34b, 0xd34b, 0, 0, custom_flip_w);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd400, 0xd401, 0, 0, custom_cocktail_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd34b, 0xd34b, 0, 0, custom_flip_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd400, 0xd401, 0, 0, custom_cocktail_w);
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 4, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ static void scanline_update(const device_config *screen, int scanline)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
if ((scanline & 32) == 0)
|
||||
atarigen_scanline_int_gen(screen->machine->cpu[0]);
|
||||
atarigen_scanline_int_gen(cputag_get_cpu(screen->machine, "maincpu"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ static INTERRUPT_GEN( argus_interrupt )
|
||||
/* Handler called by the YM2203 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 ym2203_interface ym2203_config =
|
||||
|
@ -1127,9 +1127,9 @@ ROM_END
|
||||
|
||||
static void arkanoid_bootleg_init( running_machine *machine )
|
||||
{
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xf002, 0xf002, 0, 0, arkanoid_bootleg_f002_r );
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd018, 0xd018, 0, 0, arkanoid_bootleg_d018_w );
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd008, 0xd008, 0, 0, arkanoid_bootleg_d008_r );
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xf002, 0xf002, 0, 0, arkanoid_bootleg_f002_r );
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd018, 0xd018, 0, 0, arkanoid_bootleg_d018_w );
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd008, 0xd008, 0, 0, arkanoid_bootleg_d008_r );
|
||||
}
|
||||
|
||||
static DRIVER_INIT( arkangc )
|
||||
|
@ -57,8 +57,8 @@ static void (*protection_handler)(running_machine *);
|
||||
|
||||
static void update_irq_state(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 4, tms_irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 5, hack_irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, tms_irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, hack_irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -93,13 +93,13 @@ static MACHINE_RESET( artmagic )
|
||||
|
||||
static READ16_HANDLER( tms_host_r )
|
||||
{
|
||||
return tms34010_host_r(space->machine->cpu[1], offset);
|
||||
return tms34010_host_r(cputag_get_cpu(space->machine, "tms"), offset);
|
||||
}
|
||||
|
||||
|
||||
static WRITE16_HANDLER( tms_host_w )
|
||||
{
|
||||
tms34010_host_w(space->machine->cpu[1], offset, data);
|
||||
tms34010_host_w(cputag_get_cpu(space->machine, "tms"), offset, data);
|
||||
}
|
||||
|
||||
|
||||
@ -890,7 +890,7 @@ static DRIVER_INIT( ultennis )
|
||||
protection_handler = ultennis_protection;
|
||||
|
||||
/* additional (protection?) hack */
|
||||
memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x300000, 0x300001, 0, 0, ultennis_hack_r);
|
||||
memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x300000, 0x300001, 0, 0, ultennis_hack_r);
|
||||
}
|
||||
|
||||
|
||||
|
@ -293,7 +293,7 @@ GFXDECODE_END
|
||||
|
||||
static void ym2203_irq_handler(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 WRITE8_DEVICE_HANDLER( ym2203_write_a )
|
||||
@ -332,7 +332,7 @@ static void ashnojoe_vclk_cb(const device_config *device)
|
||||
else
|
||||
{
|
||||
msm5205_data_w(device, adpcm_byte & 0xf);
|
||||
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);
|
||||
}
|
||||
|
||||
msm5205_vclk_toggle ^= 1;
|
||||
|
@ -110,23 +110,23 @@ static INTERRUPT_GEN( asterix_interrupt )
|
||||
|
||||
static READ8_DEVICE_HANDLER( asterix_sound_r )
|
||||
{
|
||||
return k053260_r(device,2 + offset);
|
||||
return k053260_r(device, 2 + offset);
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( nmi_callback )
|
||||
{
|
||||
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( sound_arm_nmi_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE);
|
||||
timer_set(space->machine, ATTOTIME_IN_USEC(5), NULL,0,nmi_callback);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, CLEAR_LINE);
|
||||
timer_set(space->machine, ATTOTIME_IN_USEC(5), NULL, 0, nmi_callback);
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( sound_irq_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
|
||||
}
|
||||
|
||||
// Check the routine at 7f30 in the ead version.
|
||||
@ -137,7 +137,7 @@ static UINT16 prot[2];
|
||||
|
||||
static WRITE16_HANDLER( protection_w )
|
||||
{
|
||||
COMBINE_DATA(prot+offset);
|
||||
COMBINE_DATA(prot + offset);
|
||||
|
||||
if (offset == 1)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static CUSTOM_INPUT( clock_r )
|
||||
{
|
||||
return (cpu_get_total_cycles(field->port->machine->cpu[0]) & 0x100) ? 1 : 0;
|
||||
return (cputag_get_total_cycles(field->port->machine, "maincpu") & 0x100) ? 1 : 0;
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( asteroid )
|
||||
@ -880,14 +880,14 @@ ROM_END
|
||||
|
||||
static DRIVER_INIT( asteroib )
|
||||
{
|
||||
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2000, 0x2000, 0, 0, "IN0");
|
||||
memory_install_read_port_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2003, 0x2003, 0, 0, "HS");
|
||||
memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2000, 0x2000, 0, 0, "IN0");
|
||||
memory_install_read_port_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2003, 0x2003, 0, 0, "HS");
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( asterock )
|
||||
{
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2000, 0x2007, 0, 0, asterock_IN0_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x2000, 0x2007, 0, 0, asterock_IN0_r);
|
||||
}
|
||||
|
||||
|
||||
|
@ -188,14 +188,14 @@ static VIDEO_UPDATE( spaceint )
|
||||
|
||||
static TIMER_CALLBACK( kamikaze_int_off )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( kamizake_int_gen )
|
||||
{
|
||||
/* interrupts are asserted on every state change of the 128V line */
|
||||
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
|
||||
param ^= 128;
|
||||
timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(machine->primary_screen, param, 0), param);
|
||||
|
||||
@ -214,7 +214,7 @@ static MACHINE_START( kamikaze )
|
||||
static INPUT_CHANGED( spaceint_coin_inserted )
|
||||
{
|
||||
/* coin insertion causes an NMI */
|
||||
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -454,7 +454,7 @@ static WRITE8_HANDLER( profpac_banksw_w )
|
||||
|
||||
static STATE_POSTLOAD( profbank_banksw_restore )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
|
||||
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
|
||||
|
||||
profpac_banksw_w(space, 0, profpac_bank);
|
||||
}
|
||||
@ -1676,54 +1676,54 @@ ROM_END
|
||||
static DRIVER_INIT( seawolf2 )
|
||||
{
|
||||
astrocade_video_config = 0x00;
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x40, 0x40, 0, 0xff18, seawolf2_sound_1_w);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x41, 0x41, 0, 0xff18, seawolf2_sound_2_w);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x42, 0x43, 0, 0xff18, seawolf2_lamps_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x40, 0x40, 0, 0xff18, seawolf2_sound_1_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x41, 0x41, 0, 0xff18, seawolf2_sound_2_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x42, 0x43, 0, 0xff18, seawolf2_lamps_w);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( ebases )
|
||||
{
|
||||
astrocade_video_config = AC_SOUND_PRESENT;
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x20, 0x20, 0, 0xff07, ebases_coin_w);
|
||||
memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x28, 0x28, 0, 0xff07, ebases_trackball_select_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x20, 0x20, 0, 0xff07, ebases_coin_w);
|
||||
memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x28, 0x28, 0, 0xff07, ebases_trackball_select_w);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( spacezap )
|
||||
{
|
||||
astrocade_video_config = AC_SOUND_PRESENT;
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x13, 0x13, 0x03ff, 0xff00, spacezap_io_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x13, 0x13, 0x03ff, 0xff00, spacezap_io_r);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( wow )
|
||||
{
|
||||
astrocade_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS;
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, wow_io_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x17, 0x17, 0xffff, 0xff00, wow_speech_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, wow_io_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x17, 0x17, 0xffff, 0xff00, wow_speech_r);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( gorf )
|
||||
{
|
||||
astrocade_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS | AC_STARS;
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, gorf_io_1_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x16, 0x16, 0x0fff, 0xff00, gorf_io_2_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x17, 0x17, 0xffff, 0xff00, gorf_speech_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, gorf_io_1_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x16, 0x16, 0x0fff, 0xff00, gorf_io_2_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x17, 0x17, 0xffff, 0xff00, gorf_speech_r);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( robby )
|
||||
{
|
||||
astrocade_video_config = AC_SOUND_PRESENT;
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, robby_io_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO), 0x15, 0x15, 0x0fff, 0xff00, robby_io_r);
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( profpac )
|
||||
{
|
||||
const address_space *iospace = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
|
||||
const address_space *iospace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
|
||||
|
||||
astrocade_video_config = AC_SOUND_PRESENT;
|
||||
memory_install_read8_handler(iospace, 0x14, 0x14, 0x0fff, 0xff00, profpac_io_1_r);
|
||||
@ -1737,7 +1737,7 @@ static DRIVER_INIT( profpac )
|
||||
|
||||
static DRIVER_INIT( demndrgn )
|
||||
{
|
||||
const address_space *iospace = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
|
||||
const address_space *iospace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
|
||||
|
||||
astrocade_video_config = 0x00;
|
||||
memory_install_read8_handler(iospace, 0x14, 0x14, 0x1fff, 0xff00, demndrgn_io_r);
|
||||
@ -1753,7 +1753,7 @@ static DRIVER_INIT( demndrgn )
|
||||
|
||||
static DRIVER_INIT( tenpindx )
|
||||
{
|
||||
const address_space *iospace = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
|
||||
const address_space *iospace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_IO);
|
||||
|
||||
astrocade_video_config = 0x00;
|
||||
memory_install_read_port_handler(iospace, 0x60, 0x60, 0x0000, 0xff00, "P60");
|
||||
|
@ -86,7 +86,7 @@ static UINT16 abattle_count;
|
||||
|
||||
static READ8_HANDLER( irq_clear_r )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -94,7 +94,7 @@ static READ8_HANDLER( irq_clear_r )
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( irq_callback )
|
||||
{
|
||||
cpu_set_input_line(timer->machine->cpu[0], 0, ASSERT_LINE);
|
||||
cputag_set_input_line(timer->machine, "maincpu", 0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ static TIMER_DEVICE_CALLBACK( irq_callback )
|
||||
static INPUT_CHANGED( coin_inserted )
|
||||
{
|
||||
/* coin insertion causes an NMI */
|
||||
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
coin_counter_w(0, newval);
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ static INPUT_CHANGED( coin_inserted )
|
||||
static INPUT_CHANGED( service_coin_inserted )
|
||||
{
|
||||
/* service coin insertion causes an NMI */
|
||||
cpu_set_input_line(field->port->machine->cpu[0], INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -1191,8 +1191,8 @@ static DRIVER_INIT( abattle )
|
||||
rom[i] = prom[rom[i]];
|
||||
|
||||
/* set up protection handlers */
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, abattle_coin_prot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, abattle_coin_prot_r);
|
||||
}
|
||||
|
||||
|
||||
@ -1205,8 +1205,8 @@ static DRIVER_INIT( afire )
|
||||
rom[i] = ~rom[i];
|
||||
|
||||
/* set up protection handlers */
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, afire_coin_prot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, afire_coin_prot_r);
|
||||
}
|
||||
|
||||
|
||||
@ -1219,8 +1219,8 @@ static DRIVER_INIT( sstarbtl )
|
||||
rom[i] = ~rom[i];
|
||||
|
||||
/* set up protection handlers */
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, abattle_coin_prot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa003, 0xa003, 0, 0, shoot_r);
|
||||
memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa004, 0xa004, 0, 0, abattle_coin_prot_r);
|
||||
}
|
||||
|
||||
|
||||
|
@ -243,7 +243,7 @@ static int adpcm_data;
|
||||
|
||||
static TIMER_CALLBACK( cadash_interrupt5 )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 5, HOLD_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, HOLD_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( cadash_interrupt )
|
||||
@ -755,7 +755,7 @@ GFXDECODE_END
|
||||
|
||||
static void irq_handler(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 =
|
||||
|
@ -51,8 +51,8 @@ static UINT8 bslapstic_primed;
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 2, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ static READ16_HANDLER( pitfighb_cheap_slapstic_r )
|
||||
static void pitfighb_cheap_slapstic_init(running_machine *machine)
|
||||
{
|
||||
/* install a read handler */
|
||||
bslapstic_base = memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x038000, 0x03ffff, 0, 0, pitfighb_cheap_slapstic_r);
|
||||
bslapstic_base = memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x038000, 0x03ffff, 0, 0, pitfighb_cheap_slapstic_r);
|
||||
|
||||
/* allocate memory for a copy of bank 0 */
|
||||
bslapstic_bank0 = auto_alloc_array(machine, UINT8, 0x2000);
|
||||
@ -1052,7 +1052,7 @@ static void init_g1_common(running_machine *machine, offs_t slapstic_base, int s
|
||||
state_save_register_postload(machine, pitfighb_state_postload, NULL);
|
||||
}
|
||||
else if (slapstic != 0)
|
||||
atarigen_slapstic_init(machine->cpu[0], slapstic_base, 0, slapstic);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), slapstic_base, 0, slapstic);
|
||||
atarijsa_init(machine, "IN0", 0x4000);
|
||||
|
||||
atarig1_pitfight = is_pitfight;
|
||||
|
@ -52,8 +52,8 @@ static UINT16 *sloop_base;
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 5, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ static WRITE16_HANDLER( io_latch_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
/* bit 4 resets the sound CPU */
|
||||
cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "jsa", INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (!(data & 0x10)) atarijsa_reset();
|
||||
|
||||
/* bit 5 is /XRESET, probably related to the ASIC */
|
||||
@ -687,8 +687,8 @@ static DRIVER_INIT( roadriot )
|
||||
atarig42_motion_object_base = 0x200;
|
||||
atarig42_motion_object_mask = 0x1ff;
|
||||
|
||||
sloop_base = memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, roadriot_sloop_data_r, roadriot_sloop_data_w);
|
||||
memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), sloop_direct_handler);
|
||||
sloop_base = memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, roadriot_sloop_data_r, roadriot_sloop_data_w);
|
||||
memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), sloop_direct_handler);
|
||||
|
||||
asic65_config(machine, ASIC65_ROMBASED);
|
||||
/*
|
||||
@ -740,8 +740,8 @@ static DRIVER_INIT( guardian )
|
||||
/* put an RTS there so we don't die */
|
||||
*(UINT16 *)&memory_region(machine, "maincpu")[0x80000] = 0x4E75;
|
||||
|
||||
sloop_base = memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, guardians_sloop_data_r, guardians_sloop_data_w);
|
||||
memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), sloop_direct_handler);
|
||||
sloop_base = memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x000000, 0x07ffff, 0, 0, guardians_sloop_data_r, guardians_sloop_data_w);
|
||||
memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), sloop_direct_handler);
|
||||
|
||||
asic65_config(machine, ASIC65_GUARDIANS);
|
||||
/*
|
||||
|
@ -56,9 +56,9 @@ static void cage_irq_callback(running_machine *machine, int reason);
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 3, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 6, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 6, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -79,10 +79,10 @@ static MACHINE_RESET( atarigt )
|
||||
|
||||
static void cage_irq_callback(running_machine *machine, int reason)
|
||||
{
|
||||
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 (reason)
|
||||
atarigen_sound_int_gen(machine->cpu[0]);
|
||||
atarigen_sound_int_gen(cputag_get_cpu(machine, "maincpu"));
|
||||
else
|
||||
atarigen_sound_int_ack_w(space,0,0,0xffff);
|
||||
}
|
||||
@ -1250,7 +1250,7 @@ static DRIVER_INIT( tmek )
|
||||
protection_w = tmek_protection_w;
|
||||
|
||||
/* temp hack */
|
||||
memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd72000, 0xd75fff, 0, 0, tmek_pf_w);
|
||||
memory_install_write32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd72000, 0xd75fff, 0, 0, tmek_pf_w);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,8 +50,8 @@ static UINT32 * protection_base;
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 5, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ static WRITE32_HANDLER( latch_w )
|
||||
|
||||
/* lower byte */
|
||||
if (ACCESSING_BITS_16_23)
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x100000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "jsa", INPUT_LINE_RESET, (data & 0x100000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -2107,7 +2107,7 @@ static DRIVER_INIT( rrreveng )
|
||||
atarigx2_motion_object_base = 0x400;
|
||||
atarigx2_motion_object_mask = 0x3ff;
|
||||
|
||||
memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xca0fc0, 0xca0fc3, 0, 0, rrreveng_prot_r);
|
||||
memory_install_read32_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xca0fc0, 0xca0fc3, 0, 0, rrreveng_prot_r);
|
||||
}
|
||||
|
||||
|
||||
|
@ -211,10 +211,10 @@ static TIMER_CALLBACK( delayed_joystick_int );
|
||||
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 2, joystick_int && joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 3, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 6, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, joystick_int && joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, atarigen_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, atarigen_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 6, atarigen_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -224,7 +224,7 @@ static MACHINE_RESET( atarisy1 )
|
||||
atarigen_eeprom_reset();
|
||||
atarigen_slapstic_reset();
|
||||
atarigen_interrupt_reset(update_interrupts);
|
||||
atarigen_sound_io_reset(machine->cpu[1]);
|
||||
atarigen_sound_io_reset(cputag_get_cpu(machine, "audiocpu"));
|
||||
|
||||
/* reset the joystick parameters */
|
||||
joystick_value = 0;
|
||||
@ -2328,7 +2328,7 @@ ROM_END
|
||||
static DRIVER_INIT( marble )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 103);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 103);
|
||||
|
||||
joystick_type = 0; /* none */
|
||||
trackball_type = 1; /* rotated */
|
||||
@ -2338,7 +2338,7 @@ static DRIVER_INIT( marble )
|
||||
static DRIVER_INIT( peterpak )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 107);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 107);
|
||||
|
||||
joystick_type = 1; /* digital */
|
||||
trackball_type = 0; /* none */
|
||||
@ -2348,7 +2348,7 @@ static DRIVER_INIT( peterpak )
|
||||
static DRIVER_INIT( indytemp )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 105);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 105);
|
||||
|
||||
joystick_type = 1; /* digital */
|
||||
trackball_type = 0; /* none */
|
||||
@ -2358,7 +2358,7 @@ static DRIVER_INIT( indytemp )
|
||||
static DRIVER_INIT( roadrunn )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 108);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 108);
|
||||
|
||||
joystick_type = 2; /* analog */
|
||||
trackball_type = 0; /* none */
|
||||
@ -2368,7 +2368,7 @@ static DRIVER_INIT( roadrunn )
|
||||
static DRIVER_INIT( roadb109 )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 109);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 109);
|
||||
|
||||
joystick_type = 3; /* pedal */
|
||||
trackball_type = 2; /* steering wheel */
|
||||
@ -2378,7 +2378,7 @@ static DRIVER_INIT( roadb109 )
|
||||
static DRIVER_INIT( roadb110 )
|
||||
{
|
||||
atarigen_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine->cpu[0], 0x080000, 0, 110);
|
||||
atarigen_slapstic_init(cputag_get_cpu(machine, "maincpu"), 0x080000, 0, 110);
|
||||
|
||||
joystick_type = 3; /* pedal */
|
||||
trackball_type = 2; /* steering wheel */
|
||||
|
@ -185,24 +185,24 @@ static STATE_POSTLOAD( bankselect_postload );
|
||||
static void update_interrupts(running_machine *machine)
|
||||
{
|
||||
if (atarigen_video_int_state)
|
||||
cpu_set_input_line(machine->cpu[0], 3, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, ASSERT_LINE);
|
||||
else
|
||||
cpu_set_input_line(machine->cpu[0], 3, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, CLEAR_LINE);
|
||||
|
||||
if (atarigen_scanline_int_state)
|
||||
cpu_set_input_line(machine->cpu[0], 2, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, ASSERT_LINE);
|
||||
else
|
||||
cpu_set_input_line(machine->cpu[0], 2, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, CLEAR_LINE);
|
||||
|
||||
if (p2portwr_state)
|
||||
cpu_set_input_line(machine->cpu[0], 1, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, ASSERT_LINE);
|
||||
else
|
||||
cpu_set_input_line(machine->cpu[0], 1, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, CLEAR_LINE);
|
||||
|
||||
if (p2portrd_state)
|
||||
cpu_set_input_line(machine->cpu[0], 0, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
|
||||
else
|
||||
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@ static void scanline_update(const device_config *screen, int scanline)
|
||||
/* generate the 32V interrupt (IRQ 2) */
|
||||
if ((scanline % 64) == 0)
|
||||
if (interrupt_enable & 4)
|
||||
atarigen_scanline_int_gen(screen->machine->cpu[0]);
|
||||
atarigen_scanline_int_gen(cputag_get_cpu(screen->machine, "maincpu"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,9 +262,9 @@ static MACHINE_RESET( atarisy2 )
|
||||
atarigen_eeprom_reset();
|
||||
slapstic_reset();
|
||||
atarigen_interrupt_reset(update_interrupts);
|
||||
atarigen_sound_io_reset(machine->cpu[1]);
|
||||
atarigen_sound_io_reset(cputag_get_cpu(machine, "soundcpu"));
|
||||
atarigen_scanline_timer_reset(machine->primary_screen, scanline_update, 64);
|
||||
memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), atarisy2_direct_handler);
|
||||
memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), atarisy2_direct_handler);
|
||||
|
||||
tms5220_data_strobe = 1;
|
||||
|
||||
@ -302,7 +302,7 @@ static WRITE16_HANDLER( int1_ack_w )
|
||||
{
|
||||
/* reset sound CPU */
|
||||
if (ACCESSING_BITS_0_7)
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ static WRITE16_HANDLER( bankselect_w )
|
||||
|
||||
static STATE_POSTLOAD( bankselect_postload )
|
||||
{
|
||||
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);
|
||||
|
||||
bankselect_w(space, 0, bankselect[0], 0xffff);
|
||||
bankselect_w(space, 1, bankselect[1], 0xffff);
|
||||
@ -630,7 +630,7 @@ static WRITE8_HANDLER( sound_reset_w )
|
||||
return;
|
||||
|
||||
/* a large number of signals are reset when this happens */
|
||||
atarigen_sound_io_reset(space->machine->cpu[1]);
|
||||
atarigen_sound_io_reset(cputag_get_cpu(space->machine, "soundcpu"));
|
||||
devtag_reset(space->machine, "ym");
|
||||
mixer_w(space, 0, 0);
|
||||
tms5220_data = 0;
|
||||
|
@ -80,7 +80,7 @@ static TIMER_CALLBACK( interrupt_gen )
|
||||
int scanline = param;
|
||||
|
||||
/* assert/deassert the interrupt */
|
||||
cpu_set_input_line(machine->cpu[0], 0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, (scanline & 32) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* set the next timer */
|
||||
scanline += 32;
|
||||
@ -92,7 +92,7 @@ static TIMER_CALLBACK( interrupt_gen )
|
||||
|
||||
static WRITE8_HANDLER( irq_ack_w )
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ static IRQ_CALLBACK(aztarac_irq_callback)
|
||||
|
||||
static MACHINE_RESET( aztarac )
|
||||
{
|
||||
cpu_set_irq_callback(machine->cpu[0], aztarac_irq_callback);
|
||||
cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), aztarac_irq_callback);
|
||||
}
|
||||
|
||||
|
||||
|
@ -301,9 +301,9 @@ static void amiga_m68k_reset(const device_config *device)
|
||||
MACHINE_RESET( amiga )
|
||||
{
|
||||
/* set m68k reset function */
|
||||
m68k_set_reset_callback(machine->cpu[0], amiga_m68k_reset);
|
||||
m68k_set_reset_callback(cputag_get_cpu(machine, "maincpu"), amiga_m68k_reset);
|
||||
|
||||
amiga_m68k_reset(machine->cpu[0]);
|
||||
amiga_m68k_reset(cputag_get_cpu(machine, "maincpu"));
|
||||
|
||||
/* call the system-specific callback */
|
||||
if (amiga_intf->reset_callback)
|
||||
@ -331,7 +331,7 @@ static TIMER_CALLBACK( scanline_callback )
|
||||
if (scanline == 0)
|
||||
{
|
||||
/* signal VBLANK IRQ */
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_VERTB, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_VERTB, 0xffff);
|
||||
|
||||
/* clock the first CIA TOD */
|
||||
cia_clock_tod(cia_0);
|
||||
@ -377,31 +377,31 @@ static void update_irqs(running_machine *machine)
|
||||
if (CUSTOM_REG(REG_INTENA) & 0x4000)
|
||||
{
|
||||
/* Serial transmit buffer empty, disk block finished, software interrupts */
|
||||
cpu_set_input_line(machine->cpu[0], 1, ints & 0x0007 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, ints & 0x0007 ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* I/O ports and timer interrupts */
|
||||
cpu_set_input_line(machine->cpu[0], 2, ints & 0x0008 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, ints & 0x0008 ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* Copper, VBLANK, blitter interrupts */
|
||||
cpu_set_input_line(machine->cpu[0], 3, ints & 0x0070 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, ints & 0x0070 ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* Audio interrupts */
|
||||
cpu_set_input_line(machine->cpu[0], 4, ints & 0x0780 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, ints & 0x0780 ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* Serial receive buffer full, disk sync match */
|
||||
cpu_set_input_line(machine->cpu[0], 5, ints & 0x1800 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, ints & 0x1800 ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
/* External interrupts */
|
||||
cpu_set_input_line(machine->cpu[0], 6, ints & 0x2000 ? ASSERT_LINE : CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 6, ints & 0x2000 ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 1, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 2, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 3, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 4, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 5, CLEAR_LINE);
|
||||
cpu_set_input_line(machine->cpu[0], 6, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 1, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 2, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 3, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 4, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 5, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 6, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -942,7 +942,7 @@ static TIMER_CALLBACK( amiga_blitter_proc )
|
||||
CUSTOM_REG(REG_DMACON) &= ~0x4000;
|
||||
|
||||
/* signal an interrupt */
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff);
|
||||
|
||||
/* reset the blitter timer */
|
||||
timer_reset( amiga_blitter_timer, attotime_never);
|
||||
@ -1096,13 +1096,13 @@ WRITE16_HANDLER( amiga_cia_w )
|
||||
|
||||
void amiga_cia_0_irq(const device_config *device, int state)
|
||||
{
|
||||
amiga_custom_w(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff);
|
||||
}
|
||||
|
||||
|
||||
void amiga_cia_1_irq(const device_config *device, int state)
|
||||
{
|
||||
amiga_custom_w(cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff);
|
||||
}
|
||||
|
||||
|
||||
@ -1115,7 +1115,7 @@ void amiga_cia_1_irq(const device_config *device, int state)
|
||||
|
||||
static void custom_reset(running_machine *machine)
|
||||
{
|
||||
int clock = cpu_get_clock(machine->cpu[0]);
|
||||
int clock = cputag_get_clock(machine, "maincpu");
|
||||
UINT16 vidmode = (clock == AMIGA_68000_NTSC_CLOCK || clock == AMIGA_68EC020_NTSC_CLOCK ) ? 0x1000 : 0x0000; /* NTSC or PAL? */
|
||||
|
||||
CUSTOM_REG(REG_DDFSTRT) = 0x18;
|
||||
@ -1258,7 +1258,7 @@ static TIMER_CALLBACK( finish_serial_write )
|
||||
CUSTOM_REG(REG_SERDATR) |= 0x3000;
|
||||
|
||||
/* signal an interrupt */
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_TBE, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_TBE, 0xffff);
|
||||
}
|
||||
|
||||
|
||||
@ -1434,7 +1434,7 @@ WRITE16_HANDLER( amiga_custom_w )
|
||||
CUSTOM_REG(offset) = data;
|
||||
|
||||
if ( temp & 0x8000 ) /* if we're generating irq's, delay a bit */
|
||||
timer_adjust_oneshot( amiga_irq_timer, cpu_clocks_to_attotime( space->machine->cpu[0], AMIGA_IRQ_DELAY_CYCLES ), 0);
|
||||
timer_adjust_oneshot( amiga_irq_timer, cputag_clocks_to_attotime(space->machine, "maincpu", AMIGA_IRQ_DELAY_CYCLES ), 0);
|
||||
else /* if we're clearing irq's, process right away */
|
||||
update_irqs(space->machine);
|
||||
break;
|
||||
@ -1509,7 +1509,7 @@ WRITE16_HANDLER( amiga_custom_w )
|
||||
|
||||
void amiga_serial_in_w(running_machine *machine, 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);
|
||||
int mask = (CUSTOM_REG(REG_SERPER) & 0x8000) ? 0x1ff : 0xff;
|
||||
|
||||
/* copy the data to the low 8 bits of SERDATR and set RBF */
|
||||
@ -1531,7 +1531,7 @@ void amiga_serial_in_w(running_machine *machine, UINT16 data)
|
||||
attotime amiga_get_serial_char_period(running_machine *machine)
|
||||
{
|
||||
UINT32 divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1;
|
||||
UINT32 baud = cpu_get_clock(machine->cpu[0]) / 2 / divisor;
|
||||
UINT32 baud = cputag_get_clock(machine, "maincpu") / 2 / divisor;
|
||||
UINT32 numbits = 2 + ((CUSTOM_REG(REG_SERPER) & 0x8000) ? 9 : 8);
|
||||
return attotime_mul(ATTOTIME_IN_HZ(baud), numbits);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void archimedes_request_irq_a(running_machine *machine, int mask)
|
||||
|
||||
if (ioc_regs[6] & mask)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, ASSERT_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", ARM_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ void archimedes_request_irq_b(running_machine *machine, int mask)
|
||||
|
||||
if (ioc_regs[10] & mask)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, PULSE_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", ARM_IRQ_LINE, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ void archimedes_request_fiq(running_machine *machine, int mask)
|
||||
|
||||
if (ioc_regs[14] & mask)
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], ARM_FIRQ_LINE, PULSE_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", ARM_FIRQ_LINE, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ static DIRECT_UPDATE_HANDLER( a310_setopbase )
|
||||
|
||||
void archimedes_driver_init(running_machine *machine)
|
||||
{
|
||||
memory_set_direct_update_handler( cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ), a310_setopbase);
|
||||
memory_set_direct_update_handler( cputag_get_address_space( machine, "maincpu", ADDRESS_SPACE_PROGRAM ), a310_setopbase);
|
||||
}
|
||||
|
||||
static const char *const ioc_regnames[] =
|
||||
@ -382,7 +382,7 @@ WRITE32_HANDLER(ioc_w)
|
||||
// if that did it, clear the IRQ
|
||||
if (ioc_regs[4] == 0)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[0], ARM_IRQ_LINE, CLEAR_LINE);
|
||||
cputag_set_input_line(space->machine, "maincpu", ARM_IRQ_LINE, CLEAR_LINE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -128,12 +128,12 @@ WRITE8_HANDLER( astdelux_bank_switch_w )
|
||||
|
||||
WRITE8_HANDLER( astdelux_led_w )
|
||||
{
|
||||
set_led_status(offset,(data&0x80)?0:1);
|
||||
set_led_status(offset, (data & 0x80) ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET( asteroid )
|
||||
{
|
||||
asteroid_bank_switch_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0,0);
|
||||
avgdvg_reset_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM),0,0);
|
||||
asteroid_bank_switch_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
|
||||
avgdvg_reset_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0, 0);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ void atari_interrupt_cb(const device_config *device, int mask)
|
||||
logerror("atari interrupt_cb TIMR1\n");
|
||||
}
|
||||
|
||||
cpu_set_input_line(device->machine->cpu[0], 0, HOLD_LINE);
|
||||
cputag_set_input_line(device->machine, "maincpu", 0, HOLD_LINE);
|
||||
}
|
||||
|
||||
/**************************************************************
|
||||
@ -153,7 +153,7 @@ void a600xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
rbank2 = SMH_BANK(2);
|
||||
wbank2 = SMH_UNMAP;
|
||||
}
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
if (rbank2 == SMH_BANK(2))
|
||||
memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x5000);
|
||||
}
|
||||
@ -185,8 +185,8 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
wbank4 = SMH_BANK(4);
|
||||
base4 = memory_region(machine, "maincpu") + 0x0d800; /* 4K RAM + 8K RAM */
|
||||
}
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc000, 0xcfff, 0, 0, rbank3, wbank3);
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd800, 0xffff, 0, 0, rbank4, wbank4);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc000, 0xcfff, 0, 0, rbank3, wbank3);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd800, 0xffff, 0, 0, rbank4, wbank4);
|
||||
memory_set_bankptr(machine, 3, base3);
|
||||
memory_set_bankptr(machine, 4, base4);
|
||||
|
||||
@ -205,7 +205,7 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
wbank1 = SMH_UNMAP;
|
||||
base1 = memory_region(machine, "maincpu") + 0x10000; /* 8K BASIC */
|
||||
}
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xa000, 0xbfff, 0, 0, rbank1, wbank1);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xa000, 0xbfff, 0, 0, rbank1, wbank1);
|
||||
memory_set_bankptr(machine, 1, base1);
|
||||
|
||||
/* check if self-test ROM changed */
|
||||
@ -223,7 +223,7 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
|
||||
wbank2 = SMH_UNMAP;
|
||||
base2 = memory_region(machine, "maincpu") + 0x15000; /* 0x0800 bytes */
|
||||
}
|
||||
memory_install_readwrite8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
memory_install_readwrite8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x5000, 0x57ff, 0, 0, rbank2, wbank2);
|
||||
memory_set_bankptr(machine, 2, base2);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ WRITE8_HANDLER( soccer_out2_w )
|
||||
|
||||
WRITE8_HANDLER( atarifb_out3_w )
|
||||
{
|
||||
int loop = cpu_getiloops(space->machine->cpu[0]);
|
||||
int loop = cpu_getiloops(cputag_get_cpu(space->machine, "maincpu"));
|
||||
|
||||
switch (loop)
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ static int copper_execute_next(running_machine *machine, int xpos)
|
||||
if (LOG_COPPER)
|
||||
logerror("%02X.%02X: Write to %s = %04x\n", last_scanline, xpos / 2, amiga_custom_names[copper_pending_offset & 0xff], copper_pending_data);
|
||||
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), copper_pending_offset, copper_pending_data, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), copper_pending_offset, copper_pending_data, 0xffff);
|
||||
copper_pending_offset = 0;
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ static int copper_execute_next(running_machine *machine, int xpos)
|
||||
if (LOG_COPPER)
|
||||
logerror("%02X.%02X: Write to %s = %04x\n", last_scanline, xpos / 2, amiga_custom_names[copper_pending_offset & 0xff], copper_pending_data);
|
||||
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), copper_pending_offset, copper_pending_data, 0xffff);
|
||||
amiga_custom_w(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), copper_pending_offset, copper_pending_data, 0xffff);
|
||||
copper_pending_offset = 0;
|
||||
}
|
||||
|
||||
|
@ -24,12 +24,14 @@ WRITE8_HANDLER( arkanoid_d008_w )
|
||||
int bank;
|
||||
|
||||
/* bits 0 and 1 flip X and Y, I don't know which is which */
|
||||
if (flip_screen_x_get(space->machine) != (data & 0x01)) {
|
||||
if (flip_screen_x_get(space->machine) != (data & 0x01))
|
||||
{
|
||||
flip_screen_x_set(space->machine, data & 0x01);
|
||||
tilemap_mark_all_tiles_dirty(bg_tilemap);
|
||||
}
|
||||
|
||||
if (flip_screen_y_get(space->machine) != (data & 0x02)) {
|
||||
if (flip_screen_y_get(space->machine) != (data & 0x02))
|
||||
{
|
||||
flip_screen_y_set(space->machine, data & 0x02);
|
||||
tilemap_mark_all_tiles_dirty(bg_tilemap);
|
||||
}
|
||||
@ -47,14 +49,16 @@ WRITE8_HANDLER( arkanoid_d008_w )
|
||||
/* so I don't know which is which. */
|
||||
bank = (data & 0x20) >> 5;
|
||||
|
||||
if (gfxbank != bank) {
|
||||
if (gfxbank != bank)
|
||||
{
|
||||
gfxbank = bank;
|
||||
tilemap_mark_all_tiles_dirty(bg_tilemap);
|
||||
}
|
||||
|
||||
bank = (data & 0x40) >> 6;
|
||||
|
||||
if (palettebank != bank) {
|
||||
if (palettebank != bank)
|
||||
{
|
||||
palettebank = bank;
|
||||
tilemap_mark_all_tiles_dirty(bg_tilemap);
|
||||
}
|
||||
@ -65,8 +69,8 @@ WRITE8_HANDLER( arkanoid_d008_w )
|
||||
leaving the tilt screen (as the MCU is now out of sync with main CPU
|
||||
which resets itself). This bit is the likely candidate as it is flipped
|
||||
early in bootup just prior to accessing the MCU for the first time. */
|
||||
if (space->machine->cpu[1] != NULL) // Bootlegs don't have the MCU but still set this bit
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (cputag_get_cpu(space->machine, "mcu") != NULL) // Bootlegs don't have the MCU but still set this bit
|
||||
cputag_set_input_line(space->machine, "mcu", INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
@ -352,7 +352,7 @@ VIDEO_UPDATE( armedf )
|
||||
|
||||
VIDEO_EOF( armedf )
|
||||
{
|
||||
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);
|
||||
|
||||
buffer_spriteram16_w(space,0,0,0xffff);
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ VIDEO_UPDATE( profpac )
|
||||
|
||||
static TIMER_CALLBACK( interrupt_off )
|
||||
{
|
||||
cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -440,15 +440,15 @@ static void astrocade_trigger_lightpen(running_machine *machine, UINT8 vfeedback
|
||||
/* bit 0 controls the interrupt mode: mode 0 means assert until acknowledged */
|
||||
if ((interrupt_enable & 0x01) == 0)
|
||||
{
|
||||
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, interrupt_vector & 0xf0);
|
||||
cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, interrupt_vector & 0xf0);
|
||||
timer_set(machine, video_screen_get_time_until_vblank_end(machine->primary_screen), NULL, 0, interrupt_off);
|
||||
}
|
||||
|
||||
/* mode 1 means assert for 1 instruction */
|
||||
else
|
||||
{
|
||||
cpu_set_input_line_and_vector(machine->cpu[0], 0, ASSERT_LINE, interrupt_vector & 0xf0);
|
||||
timer_set(machine, cpu_clocks_to_attotime(machine->cpu[0], 1), NULL, 0, interrupt_off);
|
||||
cputag_set_input_line_and_vector(machine, "maincpu", 0, ASSERT_LINE, interrupt_vector & 0xf0);
|
||||
timer_set(machine, cputag_clocks_to_attotime(machine, "maincpu", 1), NULL, 0, interrupt_off);
|
||||
}
|
||||
|
||||
/* latch the feedback registers */
|
||||
@ -480,15 +480,15 @@ static TIMER_CALLBACK( scanline_callback )
|
||||
/* bit 2 controls the interrupt mode: mode 0 means assert until acknowledged */
|
||||
if ((interrupt_enable & 0x04) == 0)
|
||||
{
|
||||
cpu_set_input_line_and_vector(machine->cpu[0], 0, HOLD_LINE, interrupt_vector);
|
||||
cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, interrupt_vector);
|
||||
timer_set(machine, video_screen_get_time_until_vblank_end(machine->primary_screen), NULL, 0, interrupt_off);
|
||||
}
|
||||
|
||||
/* mode 1 means assert for 1 instruction */
|
||||
else
|
||||
{
|
||||
cpu_set_input_line_and_vector(machine->cpu[0], 0, ASSERT_LINE, interrupt_vector);
|
||||
timer_set(machine, cpu_clocks_to_attotime(machine->cpu[0], 1), NULL, 0, interrupt_off);
|
||||
cputag_set_input_line_and_vector(machine, "maincpu", 0, ASSERT_LINE, interrupt_vector);
|
||||
timer_set(machine, cputag_clocks_to_attotime(machine, "maincpu", 1), NULL, 0, interrupt_off);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ static TIMER_CALLBACK( antic_issue_dli )
|
||||
{
|
||||
LOG((" @cycle #%3d issue DLI\n", cycle(machine)));
|
||||
antic.r.nmist |= DLI_NMI;
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1161,7 +1161,7 @@ static TIMER_CALLBACK( antic_steal_cycles )
|
||||
LOG((" @cycle #%3d steal %d cycles\n", cycle(machine), antic.steal_cycles));
|
||||
after(machine, antic.steal_cycles, antic_line_done, "antic_line_done");
|
||||
antic.steal_cycles = 0;
|
||||
cpu_spinuntil_trigger( machine->cpu[0], TRIGGER_STEAL );
|
||||
cpu_spinuntil_trigger( cputag_get_cpu(machine, "maincpu"), TRIGGER_STEAL );
|
||||
}
|
||||
|
||||
|
||||
@ -1175,7 +1175,7 @@ static TIMER_CALLBACK( antic_steal_cycles )
|
||||
*****************************************************************************/
|
||||
static TIMER_CALLBACK( antic_scanline_render )
|
||||
{
|
||||
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);
|
||||
|
||||
VIDEO *video = antic.video[antic.scanline];
|
||||
LOG((" @cycle #%3d render mode $%X lines to go #%d\n", cycle(machine), (antic.cmd & 0x0f), antic.modelines));
|
||||
@ -1245,7 +1245,7 @@ INLINE void LMS(running_machine *machine, int new_cmd)
|
||||
**************************************************************/
|
||||
if( new_cmd & ANTIC_LMS )
|
||||
{
|
||||
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 addr = RDANTIC(space);
|
||||
antic.doffs = ++antic.doffs & DOFFS;
|
||||
addr += 256 * RDANTIC(space);
|
||||
@ -1270,7 +1270,7 @@ INLINE void LMS(running_machine *machine, int new_cmd)
|
||||
*****************************************************************************/
|
||||
static void antic_scanline_dma(running_machine *machine, int param)
|
||||
{
|
||||
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);
|
||||
LOG((" @cycle #%3d DMA fetch\n", cycle(machine)));
|
||||
if (antic.scanline == VBL_END)
|
||||
antic.r.nmist &= ~VBL_NMI;
|
||||
@ -1528,7 +1528,7 @@ static void generic_atari_interrupt(running_machine *machine, void (*handle_keyb
|
||||
LOG((" cause VBL NMI\n"));
|
||||
/* set the VBL NMI status bit */
|
||||
antic.r.nmist |= VBL_NMI;
|
||||
cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE);
|
||||
cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ WRITE16_HANDLER( atarisy1_bankselect_w )
|
||||
/* sound CPU reset */
|
||||
if (diff & 0x0080)
|
||||
{
|
||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (!(newselect & 0x0080)) atarigen_sound_reset(space->machine);
|
||||
}
|
||||
|
||||
@ -405,7 +405,7 @@ WRITE16_HANDLER( atarisy1_spriteram_w )
|
||||
|
||||
static TIMER_CALLBACK( int3off_callback )
|
||||
{
|
||||
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);
|
||||
|
||||
/* clear the state */
|
||||
atarigen_scanline_int_ack_w(space, 0, 0, 0xffff);
|
||||
@ -417,7 +417,7 @@ static TIMER_CALLBACK( int3_callback )
|
||||
int scanline = param;
|
||||
|
||||
/* update the state */
|
||||
atarigen_scanline_int_gen(machine->cpu[0]);
|
||||
atarigen_scanline_int_gen(cputag_get_cpu(machine, "maincpu"));
|
||||
|
||||
/* set a timer to turn it off */
|
||||
timer_adjust_oneshot(int3off_timer, video_screen_get_scan_period(machine->primary_screen), 0);
|
||||
|
@ -136,7 +136,7 @@ INTERRUPT_GEN( attckufo_raster_interrupt )
|
||||
|
||||
VIDEO_UPDATE( attckufo )
|
||||
{
|
||||
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 x, y, yy;
|
||||
|
||||
for (y = cliprect->min_y & ~7; y <= cliprect->max_y; y += 8)
|
||||
|
Loading…
Reference in New Issue
Block a user