src/mame/audio/jaguar.c
| r13289 | r13290 | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | #if ENABLE_SPEEDUP_HACKS |
| 265 | | machine.device("audiocpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xf1a100, 0xf1a103, FUNC(dsp_flags_w)); |
| 265 | if (jaguar_hacks_enabled) |
| 266 | machine.device("audiocpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xf1a100, 0xf1a103, FUNC(dsp_flags_w)); |
| 267 | |
| 266 | 268 | #endif |
| 267 | 269 | } |
| 268 | 270 | |
| r13289 | r13290 | |
| 369 | 371 | |
| 370 | 372 | TIMER_DEVICE_CALLBACK( jaguar_serial_callback ) |
| 371 | 373 | { |
| 372 | | /* assert the A2S IRQ on CPU #2 (DSP) */ |
| 373 | | cputag_set_input_line(timer.machine(), "audiocpu", 1, ASSERT_LINE); |
| 374 | | jaguar_dsp_resume(timer.machine()); |
| 374 | if (jaguar_hacks_enabled) { |
| 375 | /* assert the A2S IRQ on CPU #2 (DSP) */ |
| 376 | cputag_set_input_line(timer.machine(), "audiocpu", 1, ASSERT_LINE); |
| 377 | jaguar_dsp_resume(timer.machine()); |
| 375 | 378 | |
| 376 | | /* fix flaky code in interrupt handler which thwarts our speedup */ |
| 377 | | if ((jaguar_dsp_ram[0x3e/4] & 0xffff) == 0xbfbc && |
| 378 | | (jaguar_dsp_ram[0x42/4] & 0xffff) == 0xe400) |
| 379 | | { |
| 380 | | /* move the store r28,(r29) into the branch delay slot, swapping it with */ |
| 381 | | /* the nop that's currently there */ |
| 382 | | jaguar_dsp_ram[0x3e/4] = (jaguar_dsp_ram[0x3e/4] & 0xffff0000) | 0xe400; |
| 383 | | jaguar_dsp_ram[0x42/4] = (jaguar_dsp_ram[0x42/4] & 0xffff0000) | 0xbfbc; |
| 379 | /* fix flaky code in interrupt handler which thwarts our speedup */ |
| 380 | if ((jaguar_dsp_ram[0x3e/4] & 0xffff) == 0xbfbc && |
| 381 | (jaguar_dsp_ram[0x42/4] & 0xffff) == 0xe400) |
| 382 | { |
| 383 | /* move the store r28,(r29) into the branch delay slot, swapping it with */ |
| 384 | /* the nop that's currently there */ |
| 385 | jaguar_dsp_ram[0x3e/4] = (jaguar_dsp_ram[0x3e/4] & 0xffff0000) | 0xe400; |
| 386 | jaguar_dsp_ram[0x42/4] = (jaguar_dsp_ram[0x42/4] & 0xffff0000) | 0xbfbc; |
| 387 | } |
| 388 | } else { |
| 389 | /* assert the A2S IRQ on CPU #2 (DSP) */ |
| 390 | cputag_set_input_line(timer.machine(), "audiocpu", 1, ASSERT_LINE); |
| 391 | jaguar_dsp_resume(timer.machine()); |
| 384 | 392 | } |
| 385 | 393 | } |
| 386 | 394 | |
src/mame/video/jagobj.c
| r13289 | r13290 | |
| 972 | 972 | UINT32 link = (lower >> 24) | ((upper & 0x7ff) << 8); |
| 973 | 973 | int taken = 0; |
| 974 | 974 | |
| 975 | | #ifndef MESS |
| 976 | | if ((ypos & 1) && ypos != 0x7ff) |
| 977 | | fprintf(stderr, " branch cc=%d ypos=%X link=%06X - \n", cc, ypos, link << 3); |
| 978 | | #endif |
| 975 | // if ((ypos & 1) && ypos != 0x7ff) |
| 976 | // fprintf(stderr, " branch cc=%d ypos=%X link=%06X - \n", cc, ypos, link << 3); |
| 979 | 977 | |
| 980 | 978 | switch (cc) |
| 981 | 979 | { |
| r13289 | r13290 | |
| 1091 | 1089 | logerror("stop = %08X-%08X\n", objdata[0], objdata[1]); |
| 1092 | 1090 | if (interrupt) |
| 1093 | 1091 | { |
| 1094 | | #ifndef MESS |
| 1095 | | fprintf(stderr, "stop int=%d\n", interrupt); |
| 1096 | | #endif |
| 1092 | // fprintf(stderr, "stop int=%d\n", interrupt); |
| 1097 | 1093 | cpu_irq_state |= 4; |
| 1098 | 1094 | update_cpu_irq(machine); |
| 1099 | 1095 | } |
src/mame/drivers/jaguar.c
| r13289 | r13290 | |
| 390 | 390 | UINT32 *jaguar_wave_rom; |
| 391 | 391 | UINT32* high_rom_base; |
| 392 | 392 | UINT8 cojag_is_r3000; |
| 393 | bool jaguar_hacks_enabled; |
| 393 | 394 | static int is_jaguar; |
| 394 | 395 | |
| 395 | 396 | |
| r13289 | r13290 | |
| 950 | 951 | { |
| 951 | 952 | #if ENABLE_SPEEDUP_HACKS |
| 952 | 953 | /* spin if we're allowed */ |
| 953 | | jaguar_gpu_suspend(space->machine()); |
| 954 | if (jaguar_hacks_enabled) jaguar_gpu_suspend(space->machine()); |
| 954 | 955 | #endif |
| 955 | 956 | |
| 956 | 957 | /* no command is pending */ |
| r13289 | r13290 | |
| 1800 | 1801 | |
| 1801 | 1802 | static DRIVER_INIT( jaguar ) |
| 1802 | 1803 | { |
| 1804 | jaguar_hacks_enabled = false; |
| 1803 | 1805 | state_save_register_global(machine, joystick_data); |
| 1804 | 1806 | using_cart = 0; |
| 1805 | 1807 | |
| r13289 | r13290 | |
| 2317 | 2319 | |
| 2318 | 2320 | static DRIVER_INIT( area51a ) |
| 2319 | 2321 | { |
| 2322 | jaguar_hacks_enabled = true; |
| 2320 | 2323 | cojag_common_init(machine, 0x5c4, 0x5a0); |
| 2321 | 2324 | |
| 2322 | 2325 | #if ENABLE_SPEEDUP_HACKS |
| r13289 | r13290 | |
| 2332 | 2335 | |
| 2333 | 2336 | static DRIVER_INIT( area51 ) |
| 2334 | 2337 | { |
| 2338 | jaguar_hacks_enabled = true; |
| 2335 | 2339 | cojag_common_init(machine, 0x0c0, 0x09e); |
| 2336 | 2340 | |
| 2337 | 2341 | #if ENABLE_SPEEDUP_HACKS |
| r13289 | r13290 | |
| 2347 | 2351 | |
| 2348 | 2352 | static DRIVER_INIT( maxforce ) |
| 2349 | 2353 | { |
| 2354 | jaguar_hacks_enabled = true; |
| 2350 | 2355 | cojag_state *state = machine.driver_data<cojag_state>(); |
| 2351 | 2356 | cojag_common_init(machine, 0x0c0, 0x09e); |
| 2352 | 2357 | |
| r13289 | r13290 | |
| 2363 | 2368 | |
| 2364 | 2369 | static DRIVER_INIT( area51mx ) |
| 2365 | 2370 | { |
| 2371 | jaguar_hacks_enabled = true; |
| 2366 | 2372 | cojag_state *state = machine.driver_data<cojag_state>(); |
| 2367 | 2373 | cojag_common_init(machine, 0x0c0, 0x09e); |
| 2368 | 2374 | |
| r13289 | r13290 | |
| 2378 | 2384 | |
| 2379 | 2385 | static DRIVER_INIT( a51mxr3k ) |
| 2380 | 2386 | { |
| 2387 | jaguar_hacks_enabled = true; |
| 2381 | 2388 | cojag_state *state = machine.driver_data<cojag_state>(); |
| 2382 | 2389 | cojag_common_init(machine, 0x0c0, 0x09e); |
| 2383 | 2390 | |
| r13289 | r13290 | |
| 2394 | 2401 | |
| 2395 | 2402 | static DRIVER_INIT( fishfren ) |
| 2396 | 2403 | { |
| 2404 | jaguar_hacks_enabled = true; |
| 2397 | 2405 | cojag_common_init(machine, 0x578, 0x554); |
| 2398 | 2406 | |
| 2399 | 2407 | #if ENABLE_SPEEDUP_HACKS |
| r13289 | r13290 | |
| 2425 | 2433 | #endif |
| 2426 | 2434 | } |
| 2427 | 2435 | |
| 2428 | | static DRIVER_INIT( freezeat ) { init_freeze_common(machine, 0x1001a9f4); } |
| 2429 | | static DRIVER_INIT( freezeat2 ) { init_freeze_common(machine, 0x1001a8c4); } |
| 2430 | | static DRIVER_INIT( freezeat3 ) { init_freeze_common(machine, 0x1001a134); } |
| 2431 | | static DRIVER_INIT( freezeat4 ) { init_freeze_common(machine, 0x1001a134); } |
| 2432 | | static DRIVER_INIT( freezeat5 ) { init_freeze_common(machine, 0x10019b34); } |
| 2433 | | static DRIVER_INIT( freezeat6 ) { init_freeze_common(machine, 0x10019684); } |
| 2436 | static DRIVER_INIT( freezeat ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x1001a9f4); } |
| 2437 | static DRIVER_INIT( freezeat2 ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x1001a8c4); } |
| 2438 | static DRIVER_INIT( freezeat3 ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x1001a134); } |
| 2439 | static DRIVER_INIT( freezeat4 ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x1001a134); } |
| 2440 | static DRIVER_INIT( freezeat5 ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x10019b34); } |
| 2441 | static DRIVER_INIT( freezeat6 ) { jaguar_hacks_enabled = true; init_freeze_common(machine, 0x10019684); } |
| 2434 | 2442 | |
| 2435 | 2443 | |
| 2436 | 2444 | static DRIVER_INIT( vcircle ) |
| 2437 | 2445 | { |
| 2446 | jaguar_hacks_enabled = true; |
| 2438 | 2447 | cojag_common_init(machine, 0x5c0, 0x5a0); |
| 2439 | 2448 | |
| 2440 | 2449 | #if ENABLE_SPEEDUP_HACKS |