src/mame/machine/snes.c
| r5405 | r5406 | |
| 92 | 92 | // (don't need to switch to the 65816 context, we don't do anything dependant on it) |
| 93 | 93 | snes_latch_counters(machine); |
| 94 | 94 | snes_ram[TIMEUP] = 0x80; /* Indicate that irq occured */ |
| 95 | | cputag_set_input_line(machine, "maincpu", G65816_LINE_IRQ, HOLD_LINE ); |
| 95 | cputag_set_input_line(machine, "maincpu", G65816_LINE_IRQ, ASSERT_LINE ); |
| 96 | 96 | |
| 97 | 97 | // don't happen again |
| 98 | 98 | timer_adjust_oneshot(snes_hirq_timer, attotime_never, 0); |
| r5405 | r5406 | |
| 122 | 122 | snes_ram[TIMEUP] = 0x80; /* Indicate that irq occured */ |
| 123 | 123 | // IRQ latches the counters, do it now |
| 124 | 124 | snes_latch_counters(machine); |
| 125 | | cputag_set_input_line(machine, "maincpu", G65816_LINE_IRQ, HOLD_LINE ); |
| 125 | cputag_set_input_line(machine, "maincpu", G65816_LINE_IRQ, ASSERT_LINE ); |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | /* Horizontal IRQ timer */ |
| r5405 | r5406 | |
| 591 | 591 | snes_ram[offset] &= 0x7f; /* NMI flag is reset on read */ |
| 592 | 592 | return value; |
| 593 | 593 | case TIMEUP: /* IRQ flag by H/V count timer */ |
| 594 | | value = snes_ram[offset]; |
| 595 | | snes_ram[offset] = 0; /* Register is reset on read */ |
| 594 | value = (snes_open_bus_r(space,0) & 0x7f) | (snes_ram[TIMEUP] & 0x80); |
| 595 | cputag_set_input_line(space->machine, "maincpu", G65816_LINE_IRQ, CLEAR_LINE ); |
| 596 | snes_ram[TIMEUP] = 0; |
| 596 | 597 | return value; |
| 597 | 598 | case HVBJOY: /* H/V blank and joypad controller enable */ |
| 598 | 599 | // electronics test says hcounter 272 is start of hblank, which is beampos 363 |
| r5405 | r5406 | |
| 1237 | 1238 | mame_printf_debug( "CPU speed: %f Mhz\n", (data & 0x1) ? 3.58 : 2.68 ); |
| 1238 | 1239 | #endif |
| 1239 | 1240 | break; |
| 1241 | case TIMEUP: |
| 1242 | snes_ram[TIMEUP] = data &~0x7f; |
| 1243 | return; |
| 1240 | 1244 | /* Following are read-only */ |
| 1241 | 1245 | case HVBJOY: /* H/V blank and joypad enable */ |
| 1242 | 1246 | case MPYL: /* Multiplication result (low) */ |