static WRITE32_HANDLER( dsp_flags_w ) { /* write the data through */ jaguardsp_ctrl_w(2, offset, data, mem_mask); /* if they were clearing the A2S interrupt, see if we are headed for the spin */ /* loop with R22 != 0; if we are, just start spinning again */ if (cpu_getactivecpu() == 2 && !(mem_mask & 0x0000ff00) && (data & 0x400)) { /* see if we're going back to the spin loop */ if (!(data & 0x04000) && activecpu_get_reg(JAGUAR_R22) != 0) { UINT32 r30 = activecpu_get_reg(JAGUAR_R30) & 0xffffff; if (r30 >= 0xf1b124 && r30 <= 0xf1b126) jaguar_dsp_suspend(); } } }
static WRITE32_HANDLER( dsp_flags_w ) { /* write the data through */ jaguardsp_ctrl_w(space->machine->device("audiocpu"), offset, data, mem_mask); /* if they were clearing the A2S interrupt, see if we are headed for the spin */ /* loop with R22 != 0; if we are, just start spinning again */ if (space->cpu == space->machine->device("audiocpu") && ACCESSING_BITS_8_15 && (data & 0x400)) { /* see if we're going back to the spin loop */ if (!(data & 0x04000) && cpu_get_reg(space->cpu, JAGUAR_R22) != 0) { UINT32 r30 = cpu_get_reg(space->cpu, JAGUAR_R30) & 0xffffff; if (r30 >= 0xf1b124 && r30 <= 0xf1b126) jaguar_dsp_suspend(space->machine); } } }
static MACHINE_RESET( jaguar ) { device_set_irq_callback(machine.device("maincpu"), jaguar_irq_callback); protection_check = 0; /* Set up pointers for Jaguar logo */ memcpy(jaguar_shared_ram, rom_base, 0x400); // do not increase, or Doom breaks cpu_set_reg(machine.device("maincpu"), STATE_GENPC, rom_base[1]); #if 0 /* set up main CPU RAM/ROM banks */ memory_set_bankptr(machine, 3, jaguar_gpu_ram); /* set up DSP RAM/ROM banks */ memory_set_bankptr(machine, 10, jaguar_shared_ram); memory_set_bankptr(machine, 11, jaguar_gpu_clut); memory_set_bankptr(machine, 12, jaguar_gpu_ram); memory_set_bankptr(machine, 13, jaguar_dsp_ram); memory_set_bankptr(machine, 14, jaguar_shared_ram); memory_set_bankptr(machine, 15, cart_base); memory_set_bankptr(machine, 16, rom_base); memory_set_bankptr(machine, 17, jaguar_gpu_ram); #endif /* clear any spinuntil stuff */ jaguar_gpu_resume(machine); jaguar_dsp_resume(machine); /* halt the CPUs */ jaguargpu_ctrl_w(machine.device("gpu"), G_CTRL, 0, 0xffffffff); jaguardsp_ctrl_w(machine.device("audiocpu"), D_CTRL, 0, 0xffffffff); joystick_data = 0xffffffff; eeprom_bit_count = 0; blitter_status = 1; if ((using_cart) && (input_port_read(machine, "CONFIG") & 2)) { cart_base[0x102] = 1; using_cart = 0; } }
static MACHINE_INIT( jaguar ) { cpu_set_irq_callback(0, jaguar_irq_callback); *((UINT32 *) jaguar_gpu_ram) = 0x3d0dead; memset(jaguar_shared_ram, 0, 0x200000); memcpy(jaguar_shared_ram, rom_base, 0x10); rom_base[0x53c / 4] = 0x67000002; #if 0 /* set up main CPU RAM/ROM banks */ memory_set_bankptr(3, jaguar_gpu_ram); /* set up DSP RAM/ROM banks */ memory_set_bankptr(10, jaguar_shared_ram); memory_set_bankptr(11, jaguar_gpu_clut); memory_set_bankptr(12, jaguar_gpu_ram); memory_set_bankptr(13, jaguar_dsp_ram); memory_set_bankptr(14, jaguar_shared_ram); #endif memory_set_bankptr(15, cart_base); memory_set_bankptr(16, rom_base); // memory_set_bankptr(17, jaguar_gpu_ram); /* clear any spinuntil stuff */ jaguar_gpu_resume(); jaguar_dsp_resume(); /* halt the CPUs */ jaguargpu_ctrl_w(1, G_CTRL, 0, 0); jaguardsp_ctrl_w(2, D_CTRL, 0, 0); /* init the sound system */ cojag_sound_reset(); joystick_data = 0xffffffff; }
static WRITE32_HANDLER( dspctrl_w ) { jaguardsp_ctrl_w(2, offset, data, mem_mask); }