src/mame/drivers/megadriv.c
| r4581 | r4582 | |
| 2287 | 2287 | { |
| 2288 | 2288 | //logerror("%06x: 68000 request z80 Bus (byte MSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2289 | 2289 | genz80.z80_has_bus=0; |
| 2290 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, ASSERT_LINE); |
| 2290 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2291 | 2291 | } |
| 2292 | 2292 | else |
| 2293 | 2293 | { |
| 2294 | 2294 | //logerror("%06x: 68000 return z80 Bus (byte MSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2295 | 2295 | genz80.z80_has_bus=1; |
| 2296 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, CLEAR_LINE); |
| 2297 | | |
| 2296 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2298 | 2297 | } |
| 2299 | 2298 | } |
| 2300 | 2299 | else if (!ACCESSING_BITS_8_15) // is this valid? |
| r4581 | r4582 | |
| 2303 | 2302 | { |
| 2304 | 2303 | //logerror("%06x: 68000 request z80 Bus (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2305 | 2304 | genz80.z80_has_bus=0; |
| 2306 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, ASSERT_LINE); |
| 2305 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2307 | 2306 | } |
| 2308 | 2307 | else |
| 2309 | 2308 | { |
| 2310 | 2309 | //logerror("%06x: 68000 return z80 Bus (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2311 | 2310 | genz80.z80_has_bus=1; |
| 2312 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, CLEAR_LINE); |
| 2311 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2313 | 2312 | } |
| 2314 | 2313 | } |
| 2315 | 2314 | else // word access |
| r4581 | r4582 | |
| 2318 | 2317 | { |
| 2319 | 2318 | //logerror("%06x: 68000 request z80 Bus (word access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2320 | 2319 | genz80.z80_has_bus=0; |
| 2321 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, ASSERT_LINE); |
| 2320 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2322 | 2321 | } |
| 2323 | 2322 | else |
| 2324 | 2323 | { |
| 2325 | 2324 | //logerror("%06x: 68000 return z80 Bus (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2326 | 2325 | genz80.z80_has_bus=1; |
| 2327 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_HALT, CLEAR_LINE); |
| 2326 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2328 | 2327 | } |
| 2329 | 2328 | } |
| 2330 | 2329 | } |
| r4581 | r4582 | |
| 2337 | 2336 | { |
| 2338 | 2337 | //logerror("%06x: 68000 clear z80 reset (byte MSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2339 | 2338 | genz80.z80_is_reset=0; |
| 2340 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, CLEAR_LINE); |
| 2339 | if ( genz80.z80_has_bus ) |
| 2340 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2341 | 2341 | } |
| 2342 | 2342 | else |
| 2343 | 2343 | { |
| 2344 | 2344 | //logerror("%06x: 68000 start z80 reset (byte MSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2345 | 2345 | genz80.z80_is_reset=1; |
| 2346 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, ASSERT_LINE); |
| 2346 | device_reset( space->machine->cpu[genz80.z80_cpunum] ); |
| 2347 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2347 | 2348 | devtag_reset(space->machine, "ym"); |
| 2348 | 2349 | } |
| 2349 | 2350 | } |
| r4581 | r4582 | |
| 2353 | 2354 | { |
| 2354 | 2355 | //logerror("%06x: 68000 clear z80 reset (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2355 | 2356 | genz80.z80_is_reset=0; |
| 2356 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, CLEAR_LINE); |
| 2357 | if ( genz80.z80_has_bus ) |
| 2358 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2357 | 2359 | } |
| 2358 | 2360 | else |
| 2359 | 2361 | { |
| 2360 | 2362 | //logerror("%06x: 68000 start z80 reset (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2361 | 2363 | genz80.z80_is_reset=1; |
| 2362 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, ASSERT_LINE); |
| 2364 | device_reset( space->machine->cpu[genz80.z80_cpunum] ); |
| 2365 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2363 | 2366 | devtag_reset(space->machine, "ym"); |
| 2364 | 2367 | |
| 2365 | 2368 | } |
| r4581 | r4582 | |
| 2370 | 2373 | { |
| 2371 | 2374 | //logerror("%06x: 68000 clear z80 reset (word access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2372 | 2375 | genz80.z80_is_reset=0; |
| 2373 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, CLEAR_LINE ); |
| 2376 | if ( genz80.z80_has_bus ) |
| 2377 | cpu_resume( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT ); |
| 2374 | 2378 | } |
| 2375 | 2379 | else |
| 2376 | 2380 | { |
| 2377 | 2381 | //logerror("%06x: 68000 start z80 reset (byte LSB access) %04x %04x\n", cpu_get_pc(space->cpu),data,mem_mask); |
| 2378 | 2382 | genz80.z80_is_reset=1; |
| 2379 | | cpu_set_input_line(space->machine->cpu[genz80.z80_cpunum], INPUT_LINE_RESET, ASSERT_LINE); |
| 2383 | device_reset( space->machine->cpu[genz80.z80_cpunum] ); |
| 2384 | cpu_suspend( space->machine->cpu[genz80.z80_cpunum], SUSPEND_REASON_HALT, 1 ); |
| 2380 | 2385 | devtag_reset(space->machine, "ym"); |
| 2381 | 2386 | } |
| 2382 | 2387 | } |