src/mess/drivers/x68k.c
| r1196 | r1197 | |
| 148 | 148 | extern UINT16* x68k_spriteram; // sprite/background RAM |
| 149 | 149 | extern UINT16* x68k_spritereg; // sprite/background registers |
| 150 | 150 | UINT8 ppi_port[3]; |
| 151 | | UINT8 current_vector[8]; |
| 151 | int current_vector[8]; |
| 152 | 152 | UINT8 current_irq_line; |
| 153 | 153 | unsigned int x68k_scanline; |
| 154 | 154 | |
| r1196 | r1197 | |
| 341 | 341 | |
| 342 | 342 | } |
| 343 | 343 | */ |
| 344 | |
| 344 | 345 | // 4 channel DMA controller (Hitachi HD63450) |
| 345 | 346 | WRITE16_HANDLER( x68k_dmac_w ) |
| 346 | 347 | { |
| r1196 | r1197 | |
| 764 | 765 | sys.ioc.irqstatus |= 0x80; |
| 765 | 766 | current_irq_line = 1; |
| 766 | 767 | logerror("FDC: IRQ triggered\n"); |
| 767 | | cpunum_set_input_line_and_vector(0,1,ASSERT_LINE,current_vector[1]); |
| 768 | cpunum_set_input_line_and_vector(0,1,HOLD_LINE,current_vector[1]); |
| 768 | 769 | } |
| 769 | 770 | } |
| 770 | 771 | |
| r1196 | r1197 | |
| 1401 | 1402 | return data; |
| 1402 | 1403 | } |
| 1403 | 1404 | |
| 1404 | | TIMER_CALLBACK( x68k_delayed_irq ) |
| 1405 | void mfp_irq_callback(int which, int state) |
| 1405 | 1406 | { |
| 1407 | static int prev; |
| 1408 | if(prev == CLEAR_LINE && state == CLEAR_LINE) // eliminate unnecessary calls to set the IRQ line for speed reasons |
| 1409 | return; |
| 1406 | 1410 | if((sys.ioc.irqstatus & 0xc0) != 0) // if the FDC is busy, then we don't want to miss that IRQ |
| 1407 | | { |
| 1408 | | mame_timer_set(MAME_TIME_IN_CYCLES(32,0),param,x68k_delayed_irq); |
| 1409 | 1411 | return; |
| 1410 | | } |
| 1411 | | // current_vector[6] = param; |
| 1412 | | cpunum_set_input_line(0,6,HOLD_LINE); |
| 1412 | cpunum_set_input_line(0,6,state); |
| 1413 | prev = state; |
| 1413 | 1414 | } |
| 1414 | 1415 | |
| 1415 | | void mfp_irq_callback(int which, int state) |
| 1416 | | { |
| 1417 | | if(state == CLEAR_LINE) |
| 1418 | | cpunum_set_input_line(0,6,state); |
| 1419 | | else |
| 1420 | | { |
| 1421 | | // if((sys.ioc.irqstatus & 0xc0) != 0) // if the FDC is busy, then we don't want to miss that IRQ |
| 1422 | | // { |
| 1423 | | // mame_timer_set(MAME_TIME_IN_CYCLES(32,0),0,x68k_delayed_irq); |
| 1424 | | // return; |
| 1425 | | // } |
| 1426 | | // current_vector[6] = vector; |
| 1427 | | cpunum_set_input_line(0,6,state); |
| 1428 | | // logerror("MFP IRQ callback: state=%i\n",state); |
| 1429 | | } |
| 1430 | | } |
| 1431 | | |
| 1432 | 1416 | static INTERRUPT_GEN( x68k_vsync_irq ) |
| 1433 | 1417 | { |
| 1434 | 1418 | // if(sys.mfp.ierb & 0x40) |