From 5bd851a0d9b66af3ebda9c21af95b3b52ec31f2e Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Thu, 30 Apr 2009 17:50:38 +0000 Subject: [PATCH] A couple more --- src/mame/drivers/hng64.c | 20 ++++++++++---------- src/mame/drivers/naomi.c | 2 +- src/mame/machine/dc.c | 20 ++++++++++---------- src/mame/machine/naomi.c | 8 ++++---- src/mame/video/dc.c | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c index fcdba11ab2c..c2cbfbb6dd0 100644 --- a/src/mame/drivers/hng64.c +++ b/src/mame/drivers/hng64.c @@ -1535,7 +1535,7 @@ static const mips3_config config = static TIMER_CALLBACK( irq_stop ) { - cpu_set_input_line(machine->cpu[0], 0, CLEAR_LINE); + cputag_set_input_line(machine, "maincpu", 0, CLEAR_LINE); } static INTERRUPT_GEN( irq_start ) @@ -1561,12 +1561,12 @@ static INTERRUPT_GEN( irq_start ) static MACHINE_START(hyperneo) { /* set the fastest DRC options */ - 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, 0x00ffffff, FALSE, hng_mainram); - mips3drc_add_fastram(machine->cpu[0], 0x04000000, 0x05ffffff, TRUE, hng_cart); - mips3drc_add_fastram(machine->cpu[0], 0x1fc00000, 0x1fc7ffff, TRUE, rombase); + mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x00000000, 0x00ffffff, FALSE, hng_mainram); + mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x04000000, 0x05ffffff, TRUE, hng_cart); + mips3drc_add_fastram(cputag_get_cpu(machine, "maincpu"), 0x1fc00000, 0x1fc7ffff, TRUE, rombase); } @@ -1579,8 +1579,8 @@ static MACHINE_RESET(hyperneo) UINT8 *RAM = (UINT8*)hng64_soundram; memory_set_bankptr(machine, 1,&RAM[0x1e0000]); memory_set_bankptr(machine, 2,&RAM[0x001000]); // where.. - cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); - cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); + cputag_set_input_line(machine, "audiocpu", INPUT_LINE_HALT, ASSERT_LINE); + cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); /* Comm CPU */ @@ -1595,10 +1595,10 @@ static MACHINE_RESET(hyperneo) hng64_com_virtual_mem[i] = rom[i] ; KL5C80_virtual_mem_sync(); - memory_set_direct_update_handler(cpu_get_address_space(machine->cpu[2], ADDRESS_SPACE_PROGRAM), KL5C80_direct_handler); + memory_set_direct_update_handler(cputag_get_address_space(machine, "comm", ADDRESS_SPACE_PROGRAM), KL5C80_direct_handler); - cpu_set_input_line(machine->cpu[2], INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip -// cpu_set_input_line(machine->cpu[2], INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner... + cputag_set_input_line(machine, "comm", INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip +// cputag_set_input_line(machine, "comm", INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner... diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index f495784e4df..881a850d6ea 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -953,7 +953,7 @@ ADDRESS_MAP_END */ static void aica_irq(const device_config *device, int irq) { - cpu_set_input_line(device->machine->cpu[1], ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); + cputag_set_input_line(device->machine, "soundcpu", ARM7_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c index 2edda43ebb8..7fba94e6762 100644 --- a/src/mame/machine/dc.c +++ b/src/mame/machine/dc.c @@ -242,7 +242,7 @@ int level; } level=dc_compute_interrupt_level(machine); - sh4_set_irln_input(machine->cpu[0], 15-level); + sh4_set_irln_input(cputag_get_cpu(machine, "maincpu"), 15-level); } /****************************************************** @@ -407,7 +407,7 @@ WRITE64_HANDLER( dc_sysctrl_w ) ddtdata.direction=0; ddtdata.channel=2; ddtdata.mode=25; //011001 - sh4_dma_ddt(space->machine->cpu[0],&ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"),&ddtdata); #if DEBUG_SYSCTRL if ((address >= 0x11000000) && (address <= 0x11FFFFFF)) if (dc_sysctrl_regs[SB_LMMODE0]) @@ -516,7 +516,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; // 0 source to buffer, 1 buffer to source ddtdata.channel= -1; // not used ddtdata.mode= -1; // copy from/to buffer - sh4_dma_ddt(space->machine->cpu[0], &ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"), &ddtdata); maple_regs[reg] = 0; endflag=buff[0] & 0x80000000; @@ -548,7 +548,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; ddtdata.channel= -1; ddtdata.mode=-1; - sh4_dma_ddt(space->machine->cpu[0],&ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"),&ddtdata); chk=0; for (a=1;a < length;a++) { @@ -576,7 +576,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.direction=0; ddtdata.channel= -1; ddtdata.mode=-1; - sh4_dma_ddt(space->machine->cpu[0],&ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"),&ddtdata); subcommand = buff[0] & 0xff; #if DEBUG_MAPLE @@ -777,7 +777,7 @@ WRITE64_HANDLER( dc_maple_w ) ddtdata.destination=destination; ddtdata.buffer=buff; ddtdata.direction=1; - sh4_dma_ddt(space->machine->cpu[0],&ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"),&ddtdata); if (endflag) { @@ -899,7 +899,7 @@ WRITE64_HANDLER( dc_g1_ctrl_w ) ddtdata.channel= -1; // not used ddtdata.mode= -1; // copy from/to buffer mame_printf_verbose("G1CTRL: transfer %x from ROM %08x to sdram %08x\n", g1bus_regs[SB_GDLEN], dmaoffset, g1bus_regs[SB_GDSTAR]); - sh4_dma_ddt(space->machine->cpu[0], &ddtdata); + sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"), &ddtdata); g1bus_regs[SB_GDST]=0; dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_GDROM; dc_update_interrupt_status(space->machine); @@ -1090,7 +1090,7 @@ MACHINE_START( dc ) MACHINE_RESET( dc ) { /* halt the ARM7 */ - cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); + cputag_set_input_line(machine, "soundcpu", INPUT_LINE_RESET, ASSERT_LINE); memset(dc_sysctrl_regs, 0, sizeof(dc_sysctrl_regs)); memset(maple_regs, 0, sizeof(maple_regs)); @@ -1129,12 +1129,12 @@ WRITE64_DEVICE_HANDLER( dc_aica_reg_w ) if (dat & 1) { /* halt the ARM7 */ - cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); + cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_RESET, ASSERT_LINE); } else { /* it's alive ! */ - cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); + cputag_set_input_line(device->machine, "soundcpu", INPUT_LINE_RESET, CLEAR_LINE); } } diff --git a/src/mame/machine/naomi.c b/src/mame/machine/naomi.c index 5904eeba7d3..380fb74b322 100644 --- a/src/mame/machine/naomi.c +++ b/src/mame/machine/naomi.c @@ -23,7 +23,7 @@ static READ64_HANDLER( naomi_bios_idle_skip_r ) DRIVER_INIT(naomi) { - memory_install_read64_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc2ad238, 0xc2ad23f, 0, 0, naomi_bios_idle_skip_r); // rev e bios + memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc2ad238, 0xc2ad23f, 0, 0, naomi_bios_idle_skip_r); // rev e bios jvsboard_type = JVSBD_DEFAULT; } @@ -37,7 +37,7 @@ static READ64_HANDLER( naomigd_ggxxsla_idle_skip_r ) DRIVER_INIT( ggxxsla ) { - memory_install_read64_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc1aae18, 0xc1aae1f, 0, 0, naomigd_ggxxsla_idle_skip_r); + memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc1aae18, 0xc1aae1f, 0, 0, naomigd_ggxxsla_idle_skip_r); DRIVER_INIT_CALL(naomi); } @@ -52,7 +52,7 @@ static READ64_HANDLER( naomigd_ggxx_idle_skip_r ) DRIVER_INIT( ggxx ) { - memory_install_read64_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc1837b8, 0xc1837bf, 0, 0, naomigd_ggxx_idle_skip_r); + memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc1837b8, 0xc1837bf, 0, 0, naomigd_ggxx_idle_skip_r); DRIVER_INIT_CALL(naomi); } @@ -69,6 +69,6 @@ static READ64_HANDLER( naomigd_ggxxrl_idle_skip_r ) DRIVER_INIT( ggxxrl ) { - memory_install_read64_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc18d6c8, 0xc18d6cf, 0, 0, naomigd_ggxxrl_idle_skip_r); + memory_install_read64_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xc18d6c8, 0xc18d6cf, 0, 0, naomigd_ggxxrl_idle_skip_r); DRIVER_INIT_CALL(naomi); } diff --git a/src/mame/video/dc.c b/src/mame/video/dc.c index 9503b9dd73c..da4215de357 100644 --- a/src/mame/video/dc.c +++ b/src/mame/video/dc.c @@ -952,7 +952,7 @@ INLINE UINT32 alpha_blend_r16_565(UINT32 d, UINT32 s, UINT8 level) static void testdrawscreen(const running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect) { - 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 cs,x,y,dx,dy,xi,yi,a,rs,ns; float iu,iv,u,v; UINT32 addrp;