| Previous | 15994 Revisions | Next |
| r2356 Thursday 10th April, 2008 at 17:37:55 UTC by Firewave |
|---|
| More Machine -> machine cleanups (already submitted to MAMEdev): - added running_machine parameter to function passed into cpunum_set_irq_callback() - using IRQ_CALLBACK for functions |
| [src/emu] | cpuint.c cpuint.h |
| [src/emu/machine] | tmp68301.c |
| [src/mame/audio] | leland.c scramble.c |
| [src/mame/drivers] | aztarac.c bnstars.c crystal.c dcheese.c gamecstl.c mazerbla.c mediagx.c megadriv.c metro.c model1.c ms32.c seibuspi.c ssv.c taito_l.c taitowlf.c |
| [src/mame/machine] | s16fd.c s24fd.c |
| [src/mess/drivers] | amstrad.c atarist.c einstein.c jaguar.c pasogo.c x68k.c |
| [src/mess/machine] | amigacrt.c at.c compis.c galaxy.c pc.c pc8801.c |
| r2355 | r2356 | |
|---|---|---|
| 611 | 611 | * |
| 612 | 612 | *************************************/ |
| 613 | 613 | |
| 614 | static int | |
| 614 | static IRQ_CALLBACK(int | |
| 615 | 615 | { |
| 616 | 616 | if (LOG_INTERRUPTS) logerror("(%f) **** Acknowledged interrupt vector %02X\n", attotime_to_double(timer_get_time()), i80186.intr.poll_status & 0x1f); |
| 617 | 617 | |
| r2355 | r2356 | |
| 1093 | 1093 | case 0x24/2: |
| 1094 | 1094 | if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", activecpu_get_pc()); |
| 1095 | 1095 | if (i80186.intr.poll_status & 0x8000) |
| 1096 | int_callback(0); | |
| 1096 | int_callback(machine, 0); | |
| 1097 | 1097 | return i80186.intr.poll_status; |
| 1098 | 1098 | |
| 1099 | 1099 | case 0x26/2: |
| r2355 | r2356 | |
|---|---|---|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | |
| 115 | static | |
| 115 | static IRQ_CALLBACK(scramble_sh_irq_callback | |
| 116 | 116 | { |
| 117 | 117 | /* interrupt acknowledge clears the flip-flop -- |
| 118 | 118 | we need to pulse the CLR line because MAME's core never clears this |
| r2355 | r2356 | |
| 126 | 126 | return 0xff; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | static | |
| 129 | static IRQ_CALLBACK(sfx_sh_irq_callback | |
| 130 | 130 | { |
| 131 | 131 | /* interrupt acknowledge clears the flip-flop -- |
| 132 | 132 | we need to pulse the CLR line because MAME's core never clears this |
| r2355 | r2356 | |
|---|---|---|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /* Callback when the FD1094 enters interrupt code */ |
| 108 | static | |
| 108 | static IRQ_CALLBACK(fd1094_int_callback | |
| 109 | 109 | { |
| 110 | 110 | fd1094_setstate_and_decrypt(FD1094_STATE_IRQ); |
| 111 | return (0x60+irq*4)/4; // vector address | |
| 111 | return (0x60+irqline*4)/4; // vector address | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | static void fd1094_rte_callback (void) |
| r2355 | r2356 | |
|---|---|---|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /* Callback when the s24_fd1094 enters interrupt code */ |
| 89 | static | |
| 89 | static IRQ_CALLBACK(s24_fd1094_int_callback | |
| 90 | 90 | { |
| 91 | 91 | s24_fd1094_setstate_and_decrypt(FD1094_STATE_IRQ); |
| 92 | return (0x60+irq*4)/4; // vector address | |
| 92 | return (0x60+irqline*4)/4; // vector address | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | static void s24_fd1094_rte_callback (void) |
| r2355 | r2356 | |
|---|---|---|
| 211 | 211 | IntHigh=(data>>8)&7; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | static i | |
| 214 | static IRQ_CALLBACK(i | |
| 215 | 215 | { |
| 216 | 216 | int i; |
| 217 | 217 | UINT32 IntPend=program_read_dword_32le(0x01800c0c); |
| r2355 | r2356 | |
|---|---|---|
| 953 | 953 | PORT_BIT( 0xf00, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) |
| 954 | 954 | INPUT_PORTS_END |
| 955 | 955 | |
| 956 | static i | |
| 956 | static IRQ_CALLBACK(i | |
| 957 | 957 | { |
| 958 | 958 | int r; |
| 959 | 959 | r = pic8259_acknowledge(1); |
| r2355 | r2356 | |
|---|---|---|
| 1731 | 1731 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE ); |
| 1732 | 1732 | } |
| 1733 | 1733 | |
| 1734 | static | |
| 1734 | static IRQ_CALLBACK(spi_irq_callback | |
| 1735 | 1735 | { |
| 1736 | 1736 | return 0x20; |
| 1737 | 1737 | } |
| r2355 | r2356 | |
|---|---|---|
| 5090 | 5090 | |
| 5091 | 5091 | |
| 5092 | 5092 | /* Callback when the genesis enters interrupt code */ |
| 5093 | static | |
| 5093 | static IRQ_CALLBACK(genesis_int_callback | |
| 5094 | 5094 | { |
| 5095 | if (irq==4) | |
| 5095 | if (irqline==4) | |
| 5096 | 5096 | { |
| 5097 | 5097 | megadrive_irq4_pending = 0; |
| 5098 | 5098 | } |
| 5099 | 5099 | |
| 5100 | if (irq==6) | |
| 5100 | if (irqline==6) | |
| 5101 | 5101 | { |
| 5102 | 5102 | megadrive_irq6_pending = 0; |
| 5103 | 5103 | // mame_printf_debug("clear pending!\n"); |
| 5104 | 5104 | } |
| 5105 | 5105 | |
| 5106 | return (0x60+irq*4)/4; // vector address | |
| 5106 | return (0x60+irqline*4)/4; // vector address | |
| 5107 | 5107 | } |
| 5108 | 5108 | |
| 5109 | 5109 | static int megadriv_tas_callback(void) |
| r2355 | r2356 | |
|---|---|---|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | |
| 302 | static i | |
| 302 | static IRQ_CALLBACK(i | |
| 303 | 303 | { |
| 304 | 304 | /* all data lines are tied to +5V via 10K resistors */ |
| 305 | 305 | /* D1 is set to GND when INT comes from CFB */ |
| r2355 | r2356 | |
|---|---|---|
| 1243 | 1243 | |
| 1244 | 1244 | static UINT16 irqreq; |
| 1245 | 1245 | |
| 1246 | static i | |
| 1246 | static IRQ_CALLBACK(i | |
| 1247 | 1247 | { |
| 1248 | 1248 | int i; |
| 1249 | 1249 | for(i=15; i>=0 && !(irqreq & (1<<i)); i--); |
| 1250 | 1250 | irqreq &= ~(1<<i); |
| 1251 | 1251 | if(!irqreq) |
| 1252 | cpunum_set_input_line( | |
| 1252 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 1253 | 1253 | return i; |
| 1254 | 1254 | } |
| 1255 | 1255 |
| r2355 | r2356 | |
|---|---|---|
| 714 | 714 | cpunum_set_input_line(Machine, 0, 0, HOLD_LINE); |
| 715 | 715 | } |
| 716 | 716 | |
| 717 | static i | |
| 717 | static IRQ_CALLBACK(i | |
| 718 | 718 | { |
| 719 | 719 | return last_irq; |
| 720 | 720 | } |
| r2355 | r2356 | |
|---|---|---|
| 204 | 204 | cpunum_set_input_line(Machine, 0, 0, (requested_int & irq_enable)? ASSERT_LINE : CLEAR_LINE); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | static | |
| 207 | static IRQ_CALLBACK(ssv_irq_callback | |
| 208 | 208 | { |
| 209 | 209 | int i; |
| 210 | 210 | for ( i = 0; i <= 7; i++ ) |
| r2355 | r2356 | |
|---|---|---|
| 189 | 189 | |
| 190 | 190 | |
| 191 | 191 | /* For games that supply an *IRQ Vector* on the data bus */ |
| 192 | static | |
| 192 | static IRQ_CALLBACK(metro_irq_callback | |
| 193 | 193 | { |
| 194 | 194 | // logerror("CPU #0 PC %06X: irq callback returns %04X\n",activecpu_get_pc(),metro_irq_vectors[int_level]); |
| 195 | return metro_irq_vectors[i | |
| 195 | return metro_irq_vectors[irq | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | static MACHINE_RESET( metro ) |
| r2355 | r2356 | |
|---|---|---|
| 1289 | 1289 | |
| 1290 | 1290 | static UINT16 irqreq; |
| 1291 | 1291 | |
| 1292 | static i | |
| 1292 | static IRQ_CALLBACK(i | |
| 1293 | 1293 | { |
| 1294 | 1294 | int i; |
| 1295 | 1295 | for(i=15; i>=0 && !(irqreq & (1<<i)); i--); |
| 1296 | 1296 | irqreq &= ~(1<<i); |
| 1297 | 1297 | if(!irqreq) |
| 1298 | cpunum_set_input_line( | |
| 1298 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 1299 | 1299 | return i; |
| 1300 | 1300 | } |
| 1301 | 1301 |
| r2355 | r2356 | |
|---|---|---|
| 26 | 26 | * |
| 27 | 27 | *************************************/ |
| 28 | 28 | |
| 29 | static | |
| 29 | static IRQ_CALLBACK(aztarac_irq_callback | |
| 30 | 30 | { |
| 31 | 31 | return 0xc; |
| 32 | 32 | } |
| r2355 | r2356 | |
|---|---|---|
| 511 | 511 | PORT_START_TAG("pc_keyboard_7") |
| 512 | 512 | INPUT_PORTS_END |
| 513 | 513 | |
| 514 | static i | |
| 514 | static IRQ_CALLBACK(i | |
| 515 | 515 | { |
| 516 | 516 | int r = 0; |
| 517 | 517 | r = pic8259_acknowledge(1); |
| r2355 | r2356 | |
|---|---|---|
| 256 | 256 | |
| 257 | 257 | static int last_irq_level; |
| 258 | 258 | |
| 259 | static i | |
| 259 | static IRQ_CALLBACK(i | |
| 260 | 260 | { |
| 261 | 261 | return irq_adr_table[last_irq_level]; |
| 262 | 262 | } |
| r2355 | r2356 | |
|---|---|---|
| 545 | 545 | PORT_START_TAG("pc_keyboard_7") |
| 546 | 546 | INPUT_PORTS_END |
| 547 | 547 | |
| 548 | static i | |
| 548 | static IRQ_CALLBACK(i | |
| 549 | 549 | { |
| 550 | 550 | int r = 0; |
| 551 | 551 | r = pic8259_acknowledge(1); |
| r2355 | r2356 | |
|---|---|---|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| 79 | static i | |
| 79 | static IRQ_CALLBACK(i | |
| 80 | 80 | { |
| 81 | 81 | /* auto-ack the IRQ */ |
| 82 | irq_state[ | |
| 82 | irq_state[ | |
| 83 | 83 | update_irq_state(); |
| 84 | 84 | |
| 85 | 85 | /* vector is 0x40 + index */ |
| 86 | return 0x40 + | |
| 86 | return 0x40 + | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 |
| r2355 | r2356 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | static void tmp68301_update_timer( int i ); |
| 23 | 23 | |
| 24 | static | |
| 24 | static IRQ_CALLBACK(t | |
| 25 | 25 | { |
| 26 | int vector = tmp68301_irq_vector[i | |
| 26 | int vector = tmp68301_irq_vector[irq | |
| 27 | 27 | // logerror("CPU #0 PC %06X: irq callback returns %04X for level %x\n",activecpu_get_pc(),vector,int_level); |
| 28 | 28 | return vector; |
| 29 | 29 | } |
| r2355 | r2356 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 13 | 14 | |
| 14 | 15 | #ifdef ENABLE_DEBUGGER |
| 15 | 16 | #include "debug/debugcpu.h" |
| r2355 | r2356 | |
| 76 | 77 | cpu_7_irq_callback |
| 77 | 78 | }; |
| 78 | 79 | |
| 79 | static int (*drv_irq_callbacks[MAX_CPU])(int); | |
| 80 | static int (*drv_irq_callbacks[MAX_CPU])(running_machine *, int); | |
| 80 | 81 | |
| 81 | 82 | |
| 82 | 83 | |
| r2355 | r2356 | |
| 318 | 319 | * |
| 319 | 320 | *************************************/ |
| 320 | 321 | |
| 321 | void cpunum_set_irq_callback(int cpunum, int (*callback)(int)) | |
| 322 | void cpunum_set_irq_callback(int cpunum, int (*callback)(running_machine *, int)) | |
| 322 | 323 | { |
| 323 | 324 | drv_irq_callbacks[cpunum] = callback; |
| 324 | 325 | } |
| r2355 | r2356 | |
| 331 | 332 | * |
| 332 | 333 | *************************************/ |
| 333 | 334 | |
| 334 | INLINE int cpu_irq_callback(int cpunum, int line) | |
| 335 | INLINE int cpu_irq_callback(running_machine *machine, int cpunum, int line) | |
| 335 | 336 | { |
| 336 | 337 | int vector = input_line_vector[cpunum][line]; |
| 337 | 338 | |
| r2355 | r2356 | |
| 347 | 348 | |
| 348 | 349 | /* if there's a driver callback, run it */ |
| 349 | 350 | if (drv_irq_callbacks[cpunum]) |
| 350 | vector = (*drv_irq_callbacks[cpunum])(line); | |
| 351 | vector = (*drv_irq_callbacks[cpunum])(machine, line); | |
| 351 | 352 | |
| 352 | 353 | #ifdef ENABLE_DEBUGGER |
| 353 | 354 | /* notify the debugger */ |
| r2355 | r2356 | |
| 358 | 359 | return vector; |
| 359 | 360 | } |
| 360 | 361 | |
| 361 | static int cpu_0_irq_callback(int line) { return cpu_irq_callback(0, line); } | |
| 362 | static int cpu_1_irq_callback(int line) { return cpu_irq_callback(1, line); } | |
| 363 | static int cpu_2_irq_callback(int line) { return cpu_irq_callback(2, line); } | |
| 364 | static int cpu_3_irq_callback(int line) { return cpu_irq_callback(3, line); } | |
| 365 | static int cpu_4_irq_callback(int line) { return cpu_irq_callback(4, line); } | |
| 366 | static int cpu_5_irq_callback(int line) { return cpu_irq_callback(5, line); } | |
| 367 | static int cpu_6_irq_callback(int line) { return cpu_irq_callback(6, line); } | |
| 368 | static int cpu_7_irq_callback(int line) { return cpu_irq_callback(7, line); } | |
| 362 | static int cpu_0_irq_callback(int line) { return cpu_irq_callback(Machine, 0, line); } | |
| 363 | static int cpu_1_irq_callback(int line) { return cpu_irq_callback(Machine, 1, line); } | |
| 364 | static int cpu_2_irq_callback(int line) { return cpu_irq_callback(Machine, 2, line); } | |
| 365 | static int cpu_3_irq_callback(int line) { return cpu_irq_callback(Machine, 3, line); } | |
| 366 | static int cpu_4_irq_callback(int line) { return cpu_irq_callback(Machine, 4, line); } | |
| 367 | static int cpu_5_irq_callback(int line) { return cpu_irq_callback(Machine, 5, line); } | |
| 368 | static int cpu_6_irq_callback(int line) { return cpu_irq_callback(Machine, 6, line); } | |
| 369 | static int cpu_7_irq_callback(int line) { return cpu_irq_callback(Machine, 7, line); } | |
| 369 | 370 | |
| 370 | 371 | |
| 371 | 372 |
| r2355 | r2356 | |
|---|---|---|
| 17 | 17 | #include "memory.h" |
| 18 | 18 | |
| 19 | 19 | #define INTERRUPT_GEN(func) void func(running_machine *machine, int cpunum) |
| 20 | #define IRQ_CALLBACK(func) int func(running_machine *machine, int irqline) | |
| 20 | 21 | |
| 21 | 22 | |
| 22 | 23 | |
| r2355 | r2356 | |
| 50 | 51 | void cpunum_set_input_line_and_vector(running_machine *machine, int cpunum, int line, int state, int vector); |
| 51 | 52 | |
| 52 | 53 | /* Install a driver callback for IRQ acknowledge */ |
| 53 | void cpunum_set_irq_callback(int cpunum, int (*callback)(int irqline)); | |
| 54 | void cpunum_set_irq_callback(int cpunum, int (*callback)(running_machine *machine, int irqline)); | |
| 54 | 55 | |
| 55 | 56 | |
| 56 | 57 | #endif /* __CPUINT_H__ */ |
| r2355 | r2356 | |
|---|---|---|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | static | |
| 130 | static IRQ_CALLBACK(pc8801_interupt_callback | |
| 131 | 131 | { |
| 132 | 132 | int level, i; |
| 133 | 133 |
| r2355 | r2356 | |
|---|---|---|
| 324 | 324 | |
| 325 | 325 | |
| 326 | 326 | |
| 327 | static | |
| 327 | static IRQ_CALLBACK(at_irq_callback | |
| 328 | 328 | { |
| 329 | 329 | return pic8259_acknowledge(0); |
| 330 | 330 | } |
| r2355 | r2356 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | static int amiga_ar1_spurious; |
| 73 | 73 | |
| 74 | static | |
| 74 | static IRQ_CALLBACK(amiga_ar1_irqack | |
| 75 | 75 | { |
| 76 | if ( le | |
| 76 | if ( irqline | |
| 77 | 77 | { |
| 78 | 78 | return M68K_INT_ACK_SPURIOUS; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | return (24+le | |
| 81 | return (24+irqline | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | static TIMER_CALLBACK( amiga_ar1_delayed_nmi ) |
| r2355 | r2356 | |
|---|---|---|
| 478 | 478 | pc_vga_init(machine, &vga_interface, NULL); |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | static | |
| 481 | static IRQ_CALLBACK(pc_irq_callback | |
| 482 | 482 | { |
| 483 | 483 | return pic8259_acknowledge(0); |
| 484 | 484 | } |
| r2355 | r2356 | |
|---|---|---|
| 48 | 48 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | static | |
| 51 | static IRQ_CALLBACK(galaxy_irq_callback | |
| 52 | 52 | { |
| 53 | 53 | galaxy_interrupts_enabled = TRUE; |
| 54 | 54 | return 1; |
| r2355 | r2356 | |
|---|---|---|
| 571 | 571 | * 80186 interrupt controller |
| 572 | 572 | * |
| 573 | 573 | *************************************/ |
| 574 | static int | |
| 574 | static IRQ_CALLBACK(int | |
| 575 | 575 | { |
| 576 | 576 | if (LOG_INTERRUPTS) |
| 577 | 577 | logerror("(%f) **** Acknowledged interrupt vector %02X\n", attotime_to_double(timer_get_time()), i186.intr.poll_status & 0x1f); |
| r2355 | r2356 | |
| 1050 | 1050 | if (LOG_PORTS) |
| 1051 | 1051 | logerror("%05X:read 80186 interrupt poll\n", activecpu_get_pc()); |
| 1052 | 1052 | if (i186.intr.poll_status & 0x8000) |
| 1053 | int_callback(0); | |
| 1053 | int_callback(machine, 0); | |
| 1054 | 1054 | return (i186.intr.poll_status >> shift) & 0xff; |
| 1055 | 1055 | |
| 1056 | 1056 | case 0x13: |
| r2355 | r2356 | |
| 1556 | 1556 | } |
| 1557 | 1557 | } |
| 1558 | 1558 | |
| 1559 | static | |
| 1559 | static IRQ_CALLBACK(compis_irq_callback | |
| 1560 | 1560 | { |
| 1561 | 1561 | return pic8259_acknowledge(0); |
| 1562 | 1562 | } |
| r2355 | r2356 | |
| 1570 | 1570 | DRIVER_INIT( compis ) |
| 1571 | 1571 | { |
| 1572 | 1572 | compis_init( &i82720_interface ); |
| 1573 | cpunum_set_irq_callback(0, | |
| 1573 | cpunum_set_irq_callback(0, compis_irq_callback); | |
| 1574 | 1574 | pic8259_init(2, compis_pic_set_int_line); |
| 1575 | 1575 | memset (&compis, 0, sizeof (compis) ); |
| 1576 | 1576 | } |
| r2355 | r2356 | |
|---|---|---|
| 84 | 84 | static size_t cart_size; |
| 85 | 85 | |
| 86 | 86 | |
| 87 | static | |
| 87 | static IRQ_CALLBACK(jaguar_irq_callback | |
| 88 | 88 | { |
| 89 | return (le | |
| 89 | return (irqline | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /************************************* |
| r2355 | r2356 | |
|---|---|---|
| 392 | 392 | }; |
| 393 | 393 | #endif |
| 394 | 394 | |
| 395 | static | |
| 395 | static IRQ_CALLBACK(pasogo_irq_callback | |
| 396 | 396 | { |
| 397 | 397 | return pic8259_acknowledge(0); |
| 398 | 398 | } |
| r2355 | r2356 | |
|---|---|---|
| 1458 | 1458 | // video_screen_update_partial(machine->primary_screen,512);//sys.crtc.reg[4]); |
| 1459 | 1459 | } |
| 1460 | 1460 | |
| 1461 | static | |
| 1461 | static IRQ_CALLBACK(x68k_int_ack | |
| 1462 | 1462 | { |
| 1463 | if(line == 6) // MFP | |
| 1463 | if(irqline == 6) // MFP | |
| 1464 | 1464 | { |
| 1465 | 1465 | // if(sys.mfp.isra & 0x10) |
| 1466 | 1466 | // sys.mfp.rsr &= ~0x80; |
| r2355 | r2356 | |
| 1483 | 1483 | // } |
| 1484 | 1484 | sys.mfp.current_irq = -1; |
| 1485 | 1485 | current_vector[6] = mc68901_get_vector(x68k_mfp); |
| 1486 | logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",current_vector[6],line); | |
| 1486 | logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",current_vector[6],irqline); | |
| 1487 | 1487 | return current_vector[6]; |
| 1488 | 1488 | } |
| 1489 | 1489 | |
| 1490 | cpunum_set_input_line_and_vector(Machine, 0,line,CLEAR_LINE,current_vector[line]); | |
| 1491 | if(line == 1) // IOSC | |
| 1490 | cpunum_set_input_line_and_vector(machine, 0,irqline,CLEAR_LINE,current_vector[irqline]); | |
| 1491 | if(irqline == 1) // IOSC | |
| 1492 | 1492 | { |
| 1493 | 1493 | sys.ioc.irqstatus &= ~0xf0; |
| 1494 | 1494 | } |
| 1495 | if(line == 5) // SCC | |
| 1495 | if(irqline == 5) // SCC | |
| 1496 | 1496 | { |
| 1497 | 1497 | sys.mouse.irqactive = 0; |
| 1498 | 1498 | } |
| 1499 | 1499 | |
| 1500 | logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",current_vector[line],line); | |
| 1501 | return current_vector[line]; | |
| 1500 | logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",current_vector[irqline],irqline); | |
| 1501 | return current_vector[irqline]; | |
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | 1504 | static ADDRESS_MAP_START(x68k_map, ADDRESS_SPACE_PROGRAM, 16) |
| r2355 | r2356 | |
|---|---|---|
| 1410 | 1410 | return data; |
| 1411 | 1411 | } |
| 1412 | 1412 | |
| 1413 | static | |
| 1413 | static IRQ_CALLBACK(atarist_int_ack | |
| 1414 | 1414 | { |
| 1415 | atarist_state *state = | |
| 1415 | atarist_state *state = machine->driver_data; | |
| 1416 | 1416 | |
| 1417 | if (line == MC68000_IRQ_6) | |
| 1417 | if (irqline == MC68000_IRQ_6) | |
| 1418 | 1418 | { |
| 1419 | 1419 | return mc68901_get_vector(state->mfp); |
| 1420 | 1420 | } |
| r2355 | r2356 | |
|---|---|---|
| 1388 | 1388 | |
| 1389 | 1389 | /* when Z80 acknowledges int, /IORQ and /M1 will be low */ |
| 1390 | 1390 | /* this allows I057 octal latch to output data onto the bus */ |
| 1391 | static | |
| 1391 | static IRQ_CALLBACK(einstein_cpu_acknowledge_int | |
| 1392 | 1392 | { |
| 1393 | 1393 | int vector = 0; |
| 1394 | 1394 |
| r2355 | r2356 | |
|---|---|---|
| 99 | 99 | #include "devices/printer.h" |
| 100 | 100 | #include "devices/cassette.h" |
| 101 | 101 | #include "formats/tzx_cas.h" |
| 102 | #include "deprecat.h" | |
| 103 | 102 | |
| 104 | 103 | |
| 105 | 104 | #ifdef AMSTRAD_VIDEO_EVENT_LIST |
| r2355 | r2356 | |
| 1807 | 1806 | /* called when cpu acknowledges int */ |
| 1808 | 1807 | /* reset top bit of interrupt line counter */ |
| 1809 | 1808 | /* this ensures that the next interrupt is no closer than 32 lines */ |
| 1810 | static | |
| 1809 | static IRQ_CALLBACK(amstrad_cpu_acknowledge_int | |
| 1811 | 1810 | { |
| 1812 | 1811 | // DMA interrupts can be automatically cleared if bit 0 of &6805 is set to 0 |
| 1813 | 1812 | if(amstrad_plus_asic_enabled != 0 && amstrad_plus_irq_cause != 0x06 && amstrad_plus_dma_clear & 0x01) |
| r2355 | r2356 | |
| 1816 | 1815 | amstrad_plus_asic_ram[0x2c0f] &= ~0x80; // not a raster interrupt, so this bit is reset |
| 1817 | 1816 | return (amstrad_plus_asic_ram[0x2805] & 0xf8) + amstrad_plus_irq_cause; |
| 1818 | 1817 | } |
| 1819 | cpunum_set_input_line( | |
| 1818 | cpunum_set_input_line(machine, 0,0, CLEAR_LINE); | |
| 1820 | 1819 | amstrad_CRTC_HS_Counter &= 0x1F; |
| 1821 | 1820 | if(amstrad_plus_asic_enabled != 0) |
| 1822 | 1821 | { |
| Previous | 15994 Revisions | Next |