src/mess/video/zx.c
| r3577 | r3578 | |
| 112 | 112 | r.min_y = r.max_y = ula_scanline_count; |
| 113 | 113 | fillbitmap(bitmap, 1, &r); |
| 114 | 114 | // logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", video_screen_get_vpos(machine->primary_screen), ula_scancode_count, (unsigned) cpunum_get_reg(0, Z80_R), (unsigned) cpunum_get_reg(0, Z80_PC)); |
| 115 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); |
| 115 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); |
| 116 | 116 | if (++ula_scanline_count == height) |
| 117 | 117 | ula_scanline_count = 0; |
| 118 | 118 | } |
| r3577 | r3578 | |
| 130 | 130 | // logerror("ULA %3d[%d] IRQ, R:$%02X, $%04x\n", video_screen_get_vpos(machine->primary_screen), ula_scancode_count, (unsigned) cpunum_get_reg(0, Z80_R), (unsigned) cpunum_get_reg(0, Z80_PC)); |
| 131 | 131 | |
| 132 | 132 | ula_irq_active = 0; |
| 133 | | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 133 | cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); |
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
src/mess/video/amstrad.c
| r3577 | r3578 | |
| 1023 | 1023 | { |
| 1024 | 1024 | amstrad_plus_irq_cause = channel * 2; |
| 1025 | 1025 | amstrad_plus_asic_ram[0x2c0f] |= (0x40 >> channel); |
| 1026 | | cpunum_set_input_line(machine, 0,0,ASSERT_LINE); |
| 1026 | cpu_set_input_line(machine->cpu[0],0,ASSERT_LINE); |
| 1027 | 1027 | logerror("DMA %i: INT\n",channel); |
| 1028 | 1028 | } |
| 1029 | 1029 | if(command & 0x20) // Stop processing on this channel |
| r3577 | r3578 | |
| 1158 | 1158 | { |
| 1159 | 1159 | if(amstrad_plus_pri == 0 || amstrad_plus_asic_enabled == 0) |
| 1160 | 1160 | { |
| 1161 | | cpunum_set_input_line(machine, 0,0, ASSERT_LINE); |
| 1161 | cpu_set_input_line(machine->cpu[0],0, ASSERT_LINE); |
| 1162 | 1162 | } |
| 1163 | 1163 | } |
| 1164 | 1164 | amstrad_CRTC_HS_Counter = 0; |
| r3577 | r3578 | |
| 1170 | 1170 | amstrad_CRTC_HS_Counter = 0; |
| 1171 | 1171 | if(amstrad_plus_pri == 0 || amstrad_plus_asic_enabled == 0) |
| 1172 | 1172 | { |
| 1173 | | cpunum_set_input_line(machine, 0,0, ASSERT_LINE); |
| 1173 | cpu_set_input_line(machine->cpu[0],0, ASSERT_LINE); |
| 1174 | 1174 | } |
| 1175 | 1175 | } |
| 1176 | 1176 | if(amstrad_plus_asic_enabled != 0) |
| r3577 | r3578 | |
| 1181 | 1181 | if(m6845_get_row_counter() == ((amstrad_plus_pri >> 3) & 0x1f) && m6845_get_scanline_counter() == (amstrad_plus_pri & 0x07)) |
| 1182 | 1182 | { |
| 1183 | 1183 | // logerror("PRI: triggered, scanline %i, VSync width = %i\n",amstrad_scanline,vid.vertical_sync_width); |
| 1184 | | cpunum_set_input_line(machine, 0,0,ASSERT_LINE); |
| 1184 | cpu_set_input_line(machine->cpu[0],0,ASSERT_LINE); |
| 1185 | 1185 | amstrad_plus_irq_cause = 0x06; // raster interrupt vector |
| 1186 | 1186 | amstrad_CRTC_HS_Counter &= ~0x20; // ASIC PRI resets the MSB of the raster counter |
| 1187 | 1187 | } |
src/mess/machine/dgn_beta.c
| r3577 | r3578 | |
| 666 | 666 | HALT_DMA=CLEAR_LINE; |
| 667 | 667 | |
| 668 | 668 | LOG_HALT(("DMA_CPU HALT=%d\n",HALT_DMA)); |
| 669 | | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, HALT_DMA); |
| 669 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, HALT_DMA); |
| 670 | 670 | |
| 671 | 671 | /* CPU un-halted let it run ! */ |
| 672 | 672 | if (HALT_DMA==CLEAR_LINE) |
| r3577 | r3578 | |
| 709 | 709 | else |
| 710 | 710 | HALT_CPU=ASSERT_LINE; |
| 711 | 711 | LOG_HALT(("MAIN_CPU HALT=%d\n",HALT_CPU)); |
| 712 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, HALT_CPU); |
| 712 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, HALT_CPU); |
| 713 | 713 | |
| 714 | 714 | d_pia1_pb_last=data & 0x02; |
| 715 | 715 | |
| r3577 | r3578 | |
| 760 | 760 | LOG_INTS(("cpu1 NMI : %d\n",NMI)); |
| 761 | 761 | if(!NMI) |
| 762 | 762 | { |
| 763 | | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,ASSERT_LINE); |
| 763 | cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,ASSERT_LINE); |
| 764 | 764 | logerror("cpu_yield()\n"); |
| 765 | 765 | cpu_yield(); /* Let DMA CPU run */ |
| 766 | 766 | } |
| 767 | 767 | else |
| 768 | 768 | { |
| 769 | | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,CLEAR_LINE); |
| 769 | cpu_set_input_line(machine->cpu[1],INPUT_LINE_NMI,CLEAR_LINE); |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | DMA_NMI_LAST=NMI; /* Save it for next time */ |
| r3577 | r3578 | |
| 850 | 850 | else |
| 851 | 851 | IRQ = CLEAR_LINE; |
| 852 | 852 | |
| 853 | | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, IRQ); |
| 853 | cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, IRQ); |
| 854 | 854 | LOG_INTS(("cpu0 IRQ : %d\n",IRQ)); |
| 855 | 855 | } |
| 856 | 856 | |
| r3577 | r3578 | |
| 864 | 864 | else |
| 865 | 865 | FIRQ = CLEAR_LINE; |
| 866 | 866 | |
| 867 | | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, FIRQ); |
| 867 | cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, FIRQ); |
| 868 | 868 | |
| 869 | 869 | LOG_INTS(("cpu0 FIRQ : %d\n",FIRQ)); |
| 870 | 870 | } |
| r3577 | r3578 | |
| 873 | 873 | |
| 874 | 874 | static void cpu1_recalc_firq(running_machine *machine, int state) |
| 875 | 875 | { |
| 876 | | cpunum_set_input_line(machine, 1, M6809_FIRQ_LINE, state); |
| 876 | cpu_set_input_line(machine->cpu[1], M6809_FIRQ_LINE, state); |
| 877 | 877 | LOG_INTS(("cpu1 FIRQ : %d\n",state)); |
| 878 | 878 | } |
| 879 | 879 | |
| r3577 | r3578 | |
| 1025 | 1025 | system_rom = memory_region(machine, "main"); |
| 1026 | 1026 | |
| 1027 | 1027 | /* Make sure CPU 1 is started out halted ! */ |
| 1028 | | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 1028 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); |
| 1029 | 1029 | |
| 1030 | 1030 | /* Reset to task 0, and map banks disabled, so standard memory map */ |
| 1031 | 1031 | /* with ram at $0000-$BFFF, ROM at $C000-FBFF, IO at $FC00-$FEFF */ |
src/mess/machine/advision.c
| r3577 | r3578 | |
| 29 | 29 | MACHINE_START( advision ) |
| 30 | 30 | { |
| 31 | 31 | /* configure EA banking */ |
| 32 | | memory_configure_bank(1, 0, 1, memory_region(machine, "bios"), 0); |
| 33 | | memory_configure_bank(1, 1, 1, memory_region(machine, "main"), 0); |
| 32 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, "bios"), 0); |
| 33 | memory_configure_bank(machine, 1, 1, 1, memory_region(machine, "main"), 0); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | MACHINE_RESET( advision ) |
| r3577 | r3578 | |
| 41 | 41 | state->extram = auto_malloc(0x400); |
| 42 | 42 | |
| 43 | 43 | /* enable internal ROM */ |
| 44 | | cpunum_set_input_line(machine, 0, MCS48_INPUT_EA, CLEAR_LINE); |
| 44 | cpu_set_input_line(machine->cpu[0], MCS48_INPUT_EA, CLEAR_LINE); |
| 45 | 45 | |
| 46 | | memory_set_bank(1, 0); |
| 46 | memory_set_bank(machine, 1, 0); |
| 47 | 47 | |
| 48 | 48 | /* reset sound CPU */ |
| 49 | | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); |
| 49 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE); |
| 50 | 50 | |
| 51 | 51 | state->rambank = 0x300; |
| 52 | 52 | state->frame_start = 0; |
| r3577 | r3578 | |
| 58 | 58 | |
| 59 | 59 | WRITE8_HANDLER( advision_bankswitch_w ) |
| 60 | 60 | { |
| 61 | | advision_state *state = machine->driver_data; |
| 61 | advision_state *state = space->machine->driver_data; |
| 62 | 62 | |
| 63 | | cpunum_set_input_line(machine, 0, MCS48_INPUT_EA, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); |
| 63 | cpu_set_input_line(space->machine->cpu[0], MCS48_INPUT_EA, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); |
| 64 | 64 | |
| 65 | | memory_set_bank(1, BIT(data, 2)); |
| 65 | memory_set_bank(space->machine, 1, BIT(data, 2)); |
| 66 | 66 | |
| 67 | 67 | state->rambank = (data & 0x03) << 8; |
| 68 | 68 | } |
| r3577 | r3578 | |
| 71 | 71 | |
| 72 | 72 | READ8_HANDLER( advision_extram_r ) |
| 73 | 73 | { |
| 74 | | advision_state *state = machine->driver_data; |
| 74 | advision_state *state = space->machine->driver_data; |
| 75 | 75 | |
| 76 | 76 | UINT8 data = state->extram[state->rambank + offset]; |
| 77 | 77 | |
| 78 | 78 | if (!state->video_enable) |
| 79 | 79 | { |
| 80 | 80 | /* the video hardware interprets reads as writes */ |
| 81 | | advision_vh_write(machine, data); |
| 81 | advision_vh_write(space->machine, data); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if (state->video_bank == 0x06) |
| 85 | 85 | { |
| 86 | | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); |
| 86 | cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return data; |
| r3577 | r3578 | |
| 91 | 91 | |
| 92 | 92 | WRITE8_HANDLER( advision_extram_w ) |
| 93 | 93 | { |
| 94 | | advision_state *state = machine->driver_data; |
| 94 | advision_state *state = space->machine->driver_data; |
| 95 | 95 | |
| 96 | 96 | state->extram[state->rambank + offset] = data; |
| 97 | 97 | } |
| r3577 | r3578 | |
| 100 | 100 | |
| 101 | 101 | READ8_HANDLER( advision_sound_cmd_r ) |
| 102 | 102 | { |
| 103 | | advision_state *state = machine->driver_data; |
| 103 | advision_state *state = space->machine->driver_data; |
| 104 | 104 | |
| 105 | 105 | return state->sound_cmd; |
| 106 | 106 | } |
| r3577 | r3578 | |
| 119 | 119 | |
| 120 | 120 | WRITE8_HANDLER( advision_sound_g_w ) |
| 121 | 121 | { |
| 122 | | advision_state *state = machine->driver_data; |
| 122 | advision_state *state = space->machine->driver_data; |
| 123 | 123 | state->sound_g = data & 0x01; |
| 124 | | update_dac(machine); |
| 124 | update_dac(space->machine); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | WRITE8_HANDLER( advision_sound_d_w ) |
| 129 | 129 | { |
| 130 | | advision_state *state = machine->driver_data; |
| 130 | advision_state *state = space->machine->driver_data; |
| 131 | 131 | state->sound_d = data & 0x01; |
| 132 | | update_dac(machine); |
| 132 | update_dac(space->machine); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /* Video */ |
| 136 | 136 | |
| 137 | 137 | WRITE8_HANDLER( advision_av_control_w ) |
| 138 | 138 | { |
| 139 | | advision_state *state = machine->driver_data; |
| 139 | advision_state *state = space->machine->driver_data; |
| 140 | 140 | |
| 141 | 141 | state->sound_cmd = data >> 4; |
| 142 | 142 | |
| 143 | 143 | if ((state->video_enable == 0x00) && (data & 0x10)) |
| 144 | 144 | { |
| 145 | | advision_vh_update(machine, state->video_hpos); |
| 145 | advision_vh_update(space->machine, state->video_hpos); |
| 146 | 146 | |
| 147 | 147 | state->video_hpos++; |
| 148 | 148 | |
| r3577 | r3578 | |
| 159 | 159 | |
| 160 | 160 | READ8_HANDLER( advision_vsync_r ) |
| 161 | 161 | { |
| 162 | | advision_state *state = machine->driver_data; |
| 162 | advision_state *state = space->machine->driver_data; |
| 163 | 163 | |
| 164 | 164 | if (state->frame_start) |
| 165 | 165 | { |
| r3577 | r3578 | |
| 178 | 178 | READ8_HANDLER( advision_controller_r ) |
| 179 | 179 | { |
| 180 | 180 | // Get joystick switches |
| 181 | | UINT8 in = input_port_read(machine, "joystick"); |
| 181 | UINT8 in = input_port_read(space->machine, "joystick"); |
| 182 | 182 | UINT8 data = in | 0x0f; |
| 183 | 183 | |
| 184 | 184 | // Get buttons |
src/mess/machine/thomson.c
| r3577 | r3578 | |
| 274 | 274 | if ( old && !thom_irq ) |
| 275 | 275 | LOG_IRQ(( "%f thom_set_irq: irq line down %i\n", attotime_to_double(timer_get_time()), line )); |
| 276 | 276 | |
| 277 | | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, thom_irq ? ASSERT_LINE : CLEAR_LINE ); |
| 277 | cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, thom_irq ? ASSERT_LINE : CLEAR_LINE ); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | |
| r3577 | r3578 | |
| 293 | 293 | if ( old && !thom_firq ) |
| 294 | 294 | LOG_IRQ(( "%f thom_set_firq: firq line down %i\n", attotime_to_double(timer_get_time()), line )); |
| 295 | 295 | |
| 296 | | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, thom_firq ? ASSERT_LINE : CLEAR_LINE ); |
| 296 | cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, thom_firq ? ASSERT_LINE : CLEAR_LINE ); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | |
| r3577 | r3578 | |
| 302 | 302 | { |
| 303 | 303 | thom_irq = 0; |
| 304 | 304 | thom_firq = 0; |
| 305 | | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, CLEAR_LINE ); |
| 306 | | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, CLEAR_LINE ); |
| 305 | cpu_set_input_line(machine->cpu[0], M6809_IRQ_LINE, CLEAR_LINE ); |
| 306 | cpu_set_input_line(machine->cpu[0], M6809_FIRQ_LINE, CLEAR_LINE ); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | |
src/mess/machine/spectrum.c
| r3577 | r3578 | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | data = (status & 0x10)>>4; |
| 284 | | cpunum_set_input_line(machine, 0, 0, data); |
| 285 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, data); |
| 286 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 284 | cpu_set_input_line(machine->cpu[0], 0, data); |
| 285 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, data); |
| 286 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 287 | 287 | |
| 288 | 288 | spectrum_page_basicrom(machine); |
| 289 | 289 | |
| r3577 | r3578 | |
| 384 | 384 | set_last_border_color(pSnapshot[26] & 0x07); |
| 385 | 385 | force_border_redraw(); |
| 386 | 386 | |
| 387 | | cpunum_set_input_line(machine, 0, 0, data); |
| 388 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, data); |
| 389 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 387 | cpu_set_input_line(machine->cpu[0], 0, data); |
| 388 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, data); |
| 389 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 390 | 390 | |
| 391 | 391 | if (SnapshotSize == 49179) |
| 392 | 392 | /* 48K Snapshot */ |
| r3577 | r3578 | |
| 692 | 692 | /* cpunum_set_reg(0, Z80_IRQ_STATE, 1); */ |
| 693 | 693 | } |
| 694 | 694 | |
| 695 | | cpunum_set_input_line(machine, 0, 0, data); |
| 696 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, data); |
| 697 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 695 | cpu_set_input_line(machine->cpu[0], 0, data); |
| 696 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, data); |
| 697 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 698 | 698 | |
| 699 | 699 | /* IFF2 */ |
| 700 | 700 | if (pSnapshot[28] != 0) |
src/mess/machine/c128.c
| r3577 | r3578 | |
| 555 | 555 | memory_set_context(machine, 0); |
| 556 | 556 | c128_bankswitch_z80(machine); |
| 557 | 557 | memory_set_context(machine, 1); |
| 558 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE); |
| 559 | | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 558 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, CLEAR_LINE); |
| 559 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); |
| 560 | 560 | } |
| 561 | 561 | else |
| 562 | 562 | { |
| r3577 | r3578 | |
| 565 | 565 | memory_set_context(machine, 1); |
| 566 | 566 | c128_bankswitch_128(machine, reset); |
| 567 | 567 | memory_set_context(machine, 0); |
| 568 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, ASSERT_LINE); |
| 569 | | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); |
| 568 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); |
| 569 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE); |
| 570 | 570 | |
| 571 | 571 | /* NPW 19-Nov-2005 - In the C128, CPU #0 starts out and hands over |
| 572 | 572 | * control to CPU #1. CPU #1 seems to execute garbage from 0x0000 |
| r3577 | r3578 | |
| 968 | 968 | |
| 969 | 969 | c64mode = 0; |
| 970 | 970 | c128_mmu8722_reset (machine); |
| 971 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE); |
| 972 | | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 971 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, CLEAR_LINE); |
| 972 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE); |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | 975 | VIDEO_START( c128 ) |
src/mess/machine/pet.c
| r3577 | r3578 | |
| 180 | 180 | { |
| 181 | 181 | DBG_LOG (3, "mos6502", ("irq %s\n", level ? "start" : "end")); |
| 182 | 182 | if (superpet) |
| 183 | | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, level); |
| 184 | | cpunum_set_input_line(machine, 0, M6502_IRQ_LINE, level); |
| 183 | cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, level); |
| 184 | cpu_set_input_line(machine->cpu[0], M6502_IRQ_LINE, level); |
| 185 | 185 | old_level = level; |
| 186 | 186 | } |
| 187 | 187 | } |
| r3577 | r3578 | |
| 536 | 536 | case 4: |
| 537 | 537 | case 5: |
| 538 | 538 | spet.bank = data & 0xf; |
| 539 | | memory_configure_bank(1, 0, 16, superpet_memory, 0x1000); |
| 539 | memory_configure_bank(machine, 1, 0, 16, superpet_memory, 0x1000); |
| 540 | 540 | memory_set_bank(1, spet.bank); |
| 541 | 541 | /* 7 low writeprotects systemlatch */ |
| 542 | 542 | break; |
| r3577 | r3578 | |
| 662 | 662 | |
| 663 | 663 | superpet_memory = auto_malloc(0x10000); |
| 664 | 664 | |
| 665 | | memory_configure_bank(1, 0, 16, superpet_memory, 0x1000); |
| 665 | memory_configure_bank(machine, 1, 0, 16, superpet_memory, 0x1000); |
| 666 | 666 | memory_set_bank(1, 0); |
| 667 | 667 | |
| 668 | 668 | superpet_vh_init(machine); |
| r3577 | r3578 | |
| 678 | 678 | spet.rom = 0; |
| 679 | 679 | if (input_port_read(machine, "CFG") & 0x04) |
| 680 | 680 | { |
| 681 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 1); |
| 682 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 681 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 1); |
| 682 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 683 | 683 | pet_font = 2; |
| 684 | 684 | } |
| 685 | 685 | else |
| 686 | 686 | { |
| 687 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 688 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 1); |
| 687 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 688 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 1); |
| 689 | 689 | pet_font = 0; |
| 690 | 690 | } |
| 691 | 691 | } |
| r3577 | r3578 | |
| 714 | 714 | { |
| 715 | 715 | if (input_port_read(machine, "CFG") & 0x04) |
| 716 | 716 | { |
| 717 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 1); |
| 718 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 717 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 1); |
| 718 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 719 | 719 | pet_font |= 2; |
| 720 | 720 | } |
| 721 | 721 | else |
| 722 | 722 | { |
| 723 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 724 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 1); |
| 723 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 724 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 1); |
| 725 | 725 | pet_font &= ~2; |
| 726 | 726 | } |
| 727 | 727 | } |
src/mess/machine/amigacrt.c
| r3577 | r3578 | |
| 84 | 84 | static TIMER_CALLBACK( amiga_ar1_delayed_nmi ) |
| 85 | 85 | { |
| 86 | 86 | (void)param; |
| 87 | | cpunum_set_input_line(machine, 0, 7, PULSE_LINE); |
| 87 | cpu_set_input_line(machine->cpu[0], 7, PULSE_LINE); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | static void amiga_ar1_nmi( void ) |
| r3577 | r3578 | |
| 280 | 280 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x000000, amiga_chip_ram_size - 1, 0, 0, amiga_ar23_chipmem_w); |
| 281 | 281 | |
| 282 | 282 | /* trigger NMI irq */ |
| 283 | | cpunum_set_input_line(machine, 0, 7, PULSE_LINE); |
| 283 | cpu_set_input_line(machine->cpu[0], 7, PULSE_LINE); |
| 284 | 284 | } |
| 285 | 285 | } |
| 286 | 286 | |
| r3577 | r3578 | |
| 381 | 381 | memory_set_bankptr(2, memory_region(machine, "user2")); |
| 382 | 382 | memory_set_bankptr(3, ar_ram); |
| 383 | 383 | |
| 384 | | memory_configure_bank(1, 0, 2, amiga_chip_ram, 0); |
| 385 | | memory_configure_bank(1, 1, 2, memory_region(machine, "user1"), 0); |
| 386 | | memory_configure_bank(1, 2, 2, memory_region(machine, "user2"), 0); |
| 384 | memory_configure_bank(machine, 1, 0, 2, amiga_chip_ram, 0); |
| 385 | memory_configure_bank(machine, 1, 1, 2, memory_region(machine, "user1"), 0); |
| 386 | memory_configure_bank(machine, 1, 2, 2, memory_region(machine, "user2"), 0); |
| 387 | 387 | |
| 388 | 388 | amiga_ar23_mode = 3; |
| 389 | 389 | } |
src/mess/machine/comx35.c
| r3577 | r3578 | |
| 583 | 583 | |
| 584 | 584 | /* card slot banking */ |
| 585 | 585 | |
| 586 | | memory_configure_bank(1, 0, 1, memory_region(machine, CDP1802_TAG) + 0xc000, 0); |
| 587 | | memory_configure_bank(1, BANK_FLOPPY, 1, memory_region(machine, "fdc"), 0); |
| 588 | | memory_configure_bank(1, BANK_PRINTER_PARALLEL, 1, memory_region(machine, "printer"), 0); |
| 589 | | memory_configure_bank(1, BANK_PRINTER_PARALLEL_FM, 1, memory_region(machine, "printer_fm"), 0); |
| 590 | | memory_configure_bank(1, BANK_PRINTER_SERIAL, 1, memory_region(machine, "rs232"), 0); |
| 591 | | memory_configure_bank(1, BANK_PRINTER_THERMAL, 1, memory_region(machine, "thermal"), 0); |
| 592 | | memory_configure_bank(1, BANK_JOYCARD, 1, memory_region(machine, CDP1802_TAG), 0); |
| 593 | | memory_configure_bank(1, BANK_80_COLUMNS, 1, memory_region(machine, "80column"), 0); |
| 594 | | memory_configure_bank(1, BANK_RAMCARD, 4, mess_ram, 0x2000); |
| 586 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, CDP1802_TAG) + 0xc000, 0); |
| 587 | memory_configure_bank(machine, 1, BANK_FLOPPY, 1, memory_region(machine, "fdc"), 0); |
| 588 | memory_configure_bank(machine, 1, BANK_PRINTER_PARALLEL, 1, memory_region(machine, "printer"), 0); |
| 589 | memory_configure_bank(machine, 1, BANK_PRINTER_PARALLEL_FM, 1, memory_region(machine, "printer_fm"), 0); |
| 590 | memory_configure_bank(machine, 1, BANK_PRINTER_SERIAL, 1, memory_region(machine, "rs232"), 0); |
| 591 | memory_configure_bank(machine, 1, BANK_PRINTER_THERMAL, 1, memory_region(machine, "thermal"), 0); |
| 592 | memory_configure_bank(machine, 1, BANK_JOYCARD, 1, memory_region(machine, CDP1802_TAG), 0); |
| 593 | memory_configure_bank(machine, 1, BANK_80_COLUMNS, 1, memory_region(machine, "80column"), 0); |
| 594 | memory_configure_bank(machine, 1, BANK_RAMCARD, 4, mess_ram, 0x2000); |
| 595 | 595 | |
| 596 | 596 | memory_set_bank(1, 0); |
| 597 | 597 | |
src/mess/machine/ti85.c
| r3577 | r3578 | |
| 114 | 114 | { |
| 115 | 115 | if (ti85_ON_interrupt_mask && !ti85_ON_pressed) |
| 116 | 116 | { |
| 117 | | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 117 | cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); |
| 118 | 118 | ti85_ON_interrupt_status = 1; |
| 119 | 119 | if (!ti85_timer_interrupt_mask) ti85_timer_interrupt_mask = 1; |
| 120 | 120 | } |
| r3577 | r3578 | |
| 125 | 125 | ti85_ON_pressed = 0; |
| 126 | 126 | if (ti85_timer_interrupt_mask) |
| 127 | 127 | { |
| 128 | | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 128 | cpu_set_input_line(machine->cpu[0], 0, HOLD_LINE); |
| 129 | 129 | ti85_timer_interrupt_status = 1; |
| 130 | 130 | } |
| 131 | 131 | } |
| r3577 | r3578 | |
| 542 | 542 | |
| 543 | 543 | activecpu_set_input_line(0, 0); |
| 544 | 544 | activecpu_set_input_line(INPUT_LINE_NMI, 0); |
| 545 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, 0); |
| 545 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, 0); |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | static void ti85_setup_snapshot (running_machine *machine, UINT8 * data) |
src/mess/machine/mac.c
| r3577 | r3578 | |
| 229 | 229 | |
| 230 | 230 | if (last_taken_interrupt != -1) |
| 231 | 231 | { |
| 232 | | cpunum_set_input_line(machine, 0, last_taken_interrupt, CLEAR_LINE); |
| 232 | cpu_set_input_line(machine->cpu[0], last_taken_interrupt, CLEAR_LINE); |
| 233 | 233 | last_taken_interrupt = -1; |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | if (take_interrupt != -1) |
| 237 | 237 | { |
| 238 | | cpunum_set_input_line(machine, 0, take_interrupt, ASSERT_LINE); |
| 238 | cpu_set_input_line(machine->cpu[0], take_interrupt, ASSERT_LINE); |
| 239 | 239 | last_taken_interrupt = take_interrupt; |
| 240 | 240 | } |
| 241 | 241 | } |
| r3577 | r3578 | |
| 842 | 842 | scc_set_status(scc, 0x02); |
| 843 | 843 | } |
| 844 | 844 | |
| 845 | | //cpunum_set_input_line(machine, 0, 2, ASSERT_LINE); |
| 845 | //cpu_set_input_line(machine->cpu[0], 2, ASSERT_LINE); |
| 846 | 846 | set_scc_interrupt(machine, 1); |
| 847 | 847 | } |
| 848 | 848 | |
| r3577 | r3578 | |
| 1619 | 1619 | static void mac_via_irq(running_machine *machine, int state) |
| 1620 | 1620 | { |
| 1621 | 1621 | /* interrupt the 68k (level 1) */ |
| 1622 | | //cpunum_set_input_line(machine, 0, 1, state); |
| 1622 | //cpu_set_input_line(machine->cpu[0], 1, state); |
| 1623 | 1623 | set_via_interrupt(machine, state); |
| 1624 | 1624 | } |
| 1625 | 1625 | |
src/mess/machine/c64.c
| r3577 | r3578 | |
| 119 | 119 | if (cpu_getactivecpu() == 0) |
| 120 | 120 | { |
| 121 | 121 | /* z80 */ |
| 122 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 122 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 123 | 123 | } |
| 124 | 124 | else |
| 125 | 125 | { |
| 126 | | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 126 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | else |
| 131 | 131 | { |
| 132 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 132 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | nmilevel = (input_port_read(machine, "SPECIAL") & 0x80) || cia1irq; |
| r3577 | r3578 | |
| 331 | 331 | { |
| 332 | 332 | if (0 && (cpu_getactivecpu() == 0)) |
| 333 | 333 | { |
| 334 | | cpunum_set_input_line(machine, 0, 0, level); |
| 334 | cpu_set_input_line(machine->cpu[0], 0, level); |
| 335 | 335 | } |
| 336 | 336 | else |
| 337 | 337 | { |
| 338 | | cpunum_set_input_line(machine, 1, M6510_IRQ_LINE, level); |
| 338 | cpu_set_input_line(machine->cpu[1], M6510_IRQ_LINE, level); |
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | else |
| 342 | 342 | { |
| 343 | | cpunum_set_input_line(machine, 0, M6510_IRQ_LINE, level); |
| 343 | cpu_set_input_line(machine->cpu[0], M6510_IRQ_LINE, level); |
| 344 | 344 | } |
| 345 | 345 | old_level = level; |
| 346 | 346 | } |
src/mess/drivers/mbee.c
| r3577 | r3578 | |
| 451 | 451 | static DRIVER_INIT( mbee ) |
| 452 | 452 | { |
| 453 | 453 | UINT8 *RAM = memory_region(machine, "main"); |
| 454 | | memory_configure_bank(1, 0, 2, &RAM[0x0000], 0x8000); |
| 454 | memory_configure_bank(machine, 1, 0, 2, &RAM[0x0000], 0x8000); |
| 455 | 455 | memory_configure_bank(2, 0, 2, &RAM[0x11000], 0x4000); |
| 456 | 456 | memory_configure_bank(3, 0, 2, &RAM[0x11800], 0x4000); |
| 457 | 457 | memory_set_bank(2, 1); |
| r3577 | r3578 | |
| 461 | 461 | static DRIVER_INIT( mbee56 ) |
| 462 | 462 | { |
| 463 | 463 | UINT8 *RAM = memory_region(machine, "main"); |
| 464 | | memory_configure_bank(1, 0, 2, &RAM[0x0000], 0xe000); |
| 464 | memory_configure_bank(machine, 1, 0, 2, &RAM[0x0000], 0xe000); |
| 465 | 465 | memory_configure_bank(2, 0, 2, &RAM[0x11000], 0x4000); |
| 466 | 466 | memory_configure_bank(3, 0, 2, &RAM[0x11800], 0x4000); |
| 467 | 467 | memory_set_bank(2, 1); |
src/mess/drivers/super80.c
| r3577 | r3578 | |
| 971 | 971 | if (!go_fast) |
| 972 | 972 | { |
| 973 | 973 | if (!int_sw) |
| 974 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, ASSERT_LINE); // if going, stop it |
| 974 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); // if going, stop it |
| 975 | 975 | |
| 976 | 976 | int_sw++; |
| 977 | 977 | if (int_sw > 1) |
| 978 | 978 | { |
| 979 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE); // if stopped, start it |
| 979 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, CLEAR_LINE); // if stopped, start it |
| 980 | 980 | int_sw = 0; |
| 981 | 981 | } |
| 982 | 982 | } |
| r3577 | r3578 | |
| 984 | 984 | { |
| 985 | 985 | if (int_sw < 8) // @2mhz, reset just once |
| 986 | 986 | { |
| 987 | | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE); |
| 987 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_HALT, CLEAR_LINE); |
| 988 | 988 | int_sw = 8; // ...not every time |
| 989 | 989 | } |
| 990 | 990 | } |
| r3577 | r3578 | |
| 1116 | 1116 | static void driver_init_common( running_machine *machine ) |
| 1117 | 1117 | { |
| 1118 | 1118 | UINT8 *RAM = memory_region(machine, "main"); |
| 1119 | | memory_configure_bank(1, 0, 2, &RAM[0x0000], 0xc000); |
| 1119 | memory_configure_bank(machine, 1, 0, 2, &RAM[0x0000], 0xc000); |
| 1120 | 1120 | timer_pulse(ATTOTIME_IN_HZ(200000),NULL,0,super80_timer); /* timer for keyboard and cassette */ |
| 1121 | 1121 | } |
| 1122 | 1122 | |
src/mess/drivers/ip22.c
| r3577 | r3578 | |
| 149 | 149 | // if it's not masked, also assert it now at the CPU |
| 150 | 150 | if (int3_regs[1] & source_mask) |
| 151 | 151 | { |
| 152 | | cpunum_set_input_line(machine, 0, MIPS3_IRQ0, ASSERT_LINE); |
| 152 | cpu_set_input_line(machine->cpu[0], MIPS3_IRQ0, ASSERT_LINE); |
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
| r3577 | r3578 | |
| 335 | 335 | // if no local0 interrupts now, clear the input to the CPU |
| 336 | 336 | if ((int3_regs[0] & int3_regs[1]) == 0) |
| 337 | 337 | { |
| 338 | | cpunum_set_input_line(machine, 0, MIPS3_IRQ0, CLEAR_LINE); |
| 338 | cpu_set_input_line(machine->cpu[0], MIPS3_IRQ0, CLEAR_LINE); |
| 339 | 339 | } |
| 340 | 340 | else |
| 341 | 341 | { |
| 342 | | cpunum_set_input_line(machine, 0, MIPS3_IRQ0, ASSERT_LINE); |
| 342 | cpu_set_input_line(machine->cpu[0], MIPS3_IRQ0, ASSERT_LINE); |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | // if no local1 interrupts now, clear the input to the CPU |
| 346 | 346 | if ((int3_regs[2] & int3_regs[3]) == 0) |
| 347 | 347 | { |
| 348 | | cpunum_set_input_line(machine, 0, MIPS3_IRQ1, CLEAR_LINE); |
| 348 | cpu_set_input_line(machine->cpu[0], MIPS3_IRQ1, CLEAR_LINE); |
| 349 | 349 | } |
| 350 | 350 | else |
| 351 | 351 | { |
| 352 | | cpunum_set_input_line(machine, 0, MIPS3_IRQ1, ASSERT_LINE); |
| 352 | cpu_set_input_line(machine->cpu[0], MIPS3_IRQ1, ASSERT_LINE); |
| 353 | 353 | } |
| 354 | 354 | break; |
| 355 | 355 | case 0xb0/4: |
src/mess/drivers/pcw.c
| r3577 | r3578 | |
| 148 | 148 | ((fdc_interrupt_code==1) && ((pcw_system_status & (1<<5))!=0)) |
| 149 | 149 | ) |
| 150 | 150 | { |
| 151 | | cpunum_set_input_line(machine, 0, 0,HOLD_LINE); |
| 151 | cpu_set_input_line(machine->cpu[0], 0,HOLD_LINE); |
| 152 | 152 | } |
| 153 | 153 | else |
| 154 | 154 | { |
| 155 | | cpunum_set_input_line(machine, 0, 0,CLEAR_LINE); |
| 155 | cpu_set_input_line(machine->cpu[0], 0,CLEAR_LINE); |
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
| r3577 | r3578 | |
| 192 | 192 | { |
| 193 | 193 | /* I'll pulse it because if I used hold-line I'm not sure |
| 194 | 194 | it would clear - to be checked */ |
| 195 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); |
| 195 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); |
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | } |
| r3577 | r3578 | |
| 483 | 483 | /* yes */ |
| 484 | 484 | |
| 485 | 485 | /* clear nmi interrupt */ |
| 486 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); |
| 486 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | /* re-issue interrupt */ |
| r3577 | r3578 | |
| 505 | 505 | /* yes */ |
| 506 | 506 | |
| 507 | 507 | /* Clear NMI */ |
| 508 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); |
| 508 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); |
| 509 | 509 | |
| 510 | 510 | } |
| 511 | 511 | |
src/mess/drivers/bw2.c
| r3577 | r3578 | |
| 245 | 245 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x7fff, 0, 0, SMH_BANK1, SMH_BANK1); |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | | memory_configure_bank(1, BANK_RAMCARD_RAM, 1, ramcard_ram + bank_offset, 0); |
| 248 | memory_configure_bank(machine, 1, BANK_RAMCARD_RAM, 1, ramcard_ram + bank_offset, 0); |
| 249 | 249 | memory_set_bank(1, bank); |
| 250 | 250 | } |
| 251 | 251 | |
| r3577 | r3578 | |
| 306 | 306 | switch(state) |
| 307 | 307 | { |
| 308 | 308 | case WD17XX_IRQ_CLR: |
| 309 | | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE); |
| 309 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, CLEAR_LINE); |
| 310 | 310 | break; |
| 311 | 311 | |
| 312 | 312 | case WD17XX_IRQ_SET: |
| 313 | | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, HOLD_LINE); |
| 313 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, HOLD_LINE); |
| 314 | 314 | break; |
| 315 | 315 | |
| 316 | 316 | case WD17XX_DRQ_CLR: |
| 317 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); |
| 317 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, CLEAR_LINE); |
| 318 | 318 | break; |
| 319 | 319 | |
| 320 | 320 | case WD17XX_DRQ_SET: |
| 321 | 321 | if (cpunum_get_reg(0, Z80_HALT)) |
| 322 | 322 | { |
| 323 | | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, HOLD_LINE); |
| 323 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, HOLD_LINE); |
| 324 | 324 | } |
| 325 | 325 | break; |
| 326 | 326 | } |
| r3577 | r3578 | |
| 608 | 608 | { |
| 609 | 609 | // RAMCARD installed |
| 610 | 610 | |
| 611 | | memory_configure_bank(1, BANK_RAM1, 1, mess_ram, 0); |
| 612 | | memory_configure_bank(1, BANK_VRAM, 1, videoram, 0); |
| 613 | | memory_configure_bank(1, BANK_RAMCARD_ROM, 1, memory_region(machine, "ramcard"), 0); |
| 614 | | memory_configure_bank(1, BANK_RAM3, 2, mess_ram + 0x8000, 0x8000); |
| 615 | | memory_configure_bank(1, BANK_RAMCARD_RAM, 1, ramcard_ram, 0); |
| 616 | | memory_configure_bank(1, BANK_RAM6, 1, mess_ram + 0x18000, 0); |
| 617 | | memory_configure_bank(1, BANK_ROM, 1, memory_region(machine, "ic1"), 0); |
| 611 | memory_configure_bank(machine, 1, BANK_RAM1, 1, mess_ram, 0); |
| 612 | memory_configure_bank(machine, 1, BANK_VRAM, 1, videoram, 0); |
| 613 | memory_configure_bank(machine, 1, BANK_RAMCARD_ROM, 1, memory_region(machine, "ramcard"), 0); |
| 614 | memory_configure_bank(machine, 1, BANK_RAM3, 2, mess_ram + 0x8000, 0x8000); |
| 615 | memory_configure_bank(machine, 1, BANK_RAMCARD_RAM, 1, ramcard_ram, 0); |
| 616 | memory_configure_bank(machine, 1, BANK_RAM6, 1, mess_ram + 0x18000, 0); |
| 617 | memory_configure_bank(machine, 1, BANK_ROM, 1, memory_region(machine, "ic1"), 0); |
| 618 | 618 | |
| 619 | 619 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0x30, 0x30, 0, 0x0f, &ramcard_bank_w); |
| 620 | 620 | } |
| r3577 | r3578 | |
| 622 | 622 | { |
| 623 | 623 | // no RAMCARD |
| 624 | 624 | |
| 625 | | memory_configure_bank(1, BANK_RAM1, 1, mess_ram, 0); |
| 626 | | memory_configure_bank(1, BANK_VRAM, 1, videoram, 0); |
| 627 | | memory_configure_bank(1, BANK_RAM2, 5, mess_ram + 0x8000, 0x8000); |
| 628 | | memory_configure_bank(1, BANK_ROM, 1, memory_region(machine, "ic1"), 0); |
| 625 | memory_configure_bank(machine, 1, BANK_RAM1, 1, mess_ram, 0); |
| 626 | memory_configure_bank(machine, 1, BANK_VRAM, 1, videoram, 0); |
| 627 | memory_configure_bank(machine, 1, BANK_RAM2, 5, mess_ram + 0x8000, 0x8000); |
| 628 | memory_configure_bank(machine, 1, BANK_ROM, 1, memory_region(machine, "ic1"), 0); |
| 629 | 629 | |
| 630 | 630 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0x30, 0x30, 0, 0x0f, SMH_UNMAP); |
| 631 | 631 | } |
src/mess/drivers/ql.c
| r3577 | r3578 | |
| 130 | 130 | switch (ipl) |
| 131 | 131 | { |
| 132 | 132 | case 0: |
| 133 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 134 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 135 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, HOLD_LINE); |
| 133 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_2, CLEAR_LINE); |
| 134 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_5, CLEAR_LINE); |
| 135 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_7, HOLD_LINE); |
| 136 | 136 | break; |
| 137 | 137 | |
| 138 | 138 | case 1: |
| 139 | 139 | // CTRL-ALT-7 pressed |
| 140 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 141 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, HOLD_LINE); |
| 142 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 140 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_2, CLEAR_LINE); |
| 141 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_5, HOLD_LINE); |
| 142 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_7, CLEAR_LINE); |
| 143 | 143 | break; |
| 144 | 144 | |
| 145 | 145 | case 2: |
| 146 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, HOLD_LINE); |
| 147 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 148 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 146 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_2, HOLD_LINE); |
| 147 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_5, CLEAR_LINE); |
| 148 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_7, CLEAR_LINE); |
| 149 | 149 | break; |
| 150 | 150 | |
| 151 | 151 | case 3: |
| 152 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 153 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 154 | | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 152 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_2, CLEAR_LINE); |
| 153 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_5, CLEAR_LINE); |
| 154 | cpu_set_input_line(machine->cpu[0], MC68000_IRQ_7, CLEAR_LINE); |
| 155 | 155 | break; |
| 156 | 156 | } |
| 157 | 157 | |
| r3577 | r3578 | |
| 187 | 187 | |
| 188 | 188 | int irq = (ipc.ser2_rxd | ipc.ser1_txd); |
| 189 | 189 | |
| 190 | | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ0, irq); |
| 190 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_IRQ0, irq); |
| 191 | 191 | |
| 192 | 192 | return (ipc.comdata << 7) | irq; |
| 193 | 193 | } |
| r3577 | r3578 | |
| 557 | 557 | /* configure ROM cartridge */ |
| 558 | 558 | |
| 559 | 559 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x00c000, 0x00ffff, 0, 0, SMH_UNMAP, SMH_UNMAP); |
| 560 | | memory_configure_bank(1, 0, 1, memory_region(machine, "main") + 0x00c000, 0); |
| 560 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, "main") + 0x00c000, 0); |
| 561 | 561 | memory_set_bank(1, 0); |
| 562 | 562 | |
| 563 | 563 | /* configure RAM */ |
src/mess/drivers/abc80x.c
| r3577 | r3578 | |
| 1102 | 1102 | |
| 1103 | 1103 | state->videoram = auto_malloc(ABC800_VIDEO_RAM_SIZE); |
| 1104 | 1104 | |
| 1105 | | memory_configure_bank(1, 0, 1, memory_region(machine, Z80_TAG), 0); |
| 1106 | | memory_configure_bank(1, 1, 1, state->videoram, 0); |
| 1105 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, Z80_TAG), 0); |
| 1106 | memory_configure_bank(machine, 1, 1, 1, state->videoram, 0); |
| 1107 | 1107 | |
| 1108 | 1108 | /* register for state saving */ |
| 1109 | 1109 | |
| r3577 | r3578 | |
| 1135 | 1135 | |
| 1136 | 1136 | /* configure memory */ |
| 1137 | 1137 | |
| 1138 | | memory_configure_bank(1, 0, 1, mess_ram, 0); |
| 1139 | | memory_configure_bank(1, 1, 1, memory_region(machine, Z80_TAG), 0); |
| 1138 | memory_configure_bank(machine, 1, 0, 1, mess_ram, 0); |
| 1139 | memory_configure_bank(machine, 1, 1, 1, memory_region(machine, Z80_TAG), 0); |
| 1140 | 1140 | |
| 1141 | 1141 | /* register for state saving */ |
| 1142 | 1142 | |
src/mess/drivers/newbrain.c
| r3577 | r3578 | |
| 329 | 329 | |
| 330 | 330 | newbrain_state *state = machine->driver_data; |
| 331 | 331 | |
| 332 | | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, BIT(data, 0) ? HOLD_LINE : CLEAR_LINE); |
| 332 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, BIT(data, 0) ? HOLD_LINE : CLEAR_LINE); |
| 333 | 333 | |
| 334 | 334 | state->copint = BIT(data, 0); |
| 335 | 335 | |
| r3577 | r3578 | |
| 1134 | 1134 | |
| 1135 | 1135 | static TIMER_CALLBACK( reset_tick ) |
| 1136 | 1136 | { |
| 1137 | | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, CLEAR_LINE); |
| 1138 | | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); |
| 1137 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_RESET, CLEAR_LINE); |
| 1138 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE); |
| 1139 | 1139 | } |
| 1140 | 1140 | |
| 1141 | 1141 | INLINE int get_pwrup_t(void) |
| r3577 | r3578 | |
| 1203 | 1203 | { |
| 1204 | 1204 | newbrain_state *state = machine->driver_data; |
| 1205 | 1205 | |
| 1206 | | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, HOLD_LINE); |
| 1207 | | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, HOLD_LINE); |
| 1206 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_RESET, HOLD_LINE); |
| 1207 | cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, HOLD_LINE); |
| 1208 | 1208 | |
| 1209 | 1209 | timer_adjust_oneshot(state->reset_timer, ATTOTIME_IN_MSEC(get_reset_t()), 0); |
| 1210 | 1210 | } |
| r3577 | r3578 | |
| 1215 | 1215 | |
| 1216 | 1216 | if (!(state->enrg1 & NEWBRAIN_ENRG1_CLK)) |
| 1217 | 1217 | { |
| 1218 | | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, HOLD_LINE); |
| 1218 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_IRQ0, HOLD_LINE); |
| 1219 | 1219 | |
| 1220 | 1220 | state->clkint = 0; |
| 1221 | 1221 | } |
src/mess/drivers/einstein.c
| r3577 | r3578 | |
| 359 | 359 | /* NPW 21-Jul-2005 - Not sure how to update this for MAME 0.98u2 */ |
| 360 | 360 | /* |
| 361 | 361 | if (einstein_int & einstein_int_mask & EINSTEIN_KEY_INT) |
| 362 | | cpunum_set_input_line(machine, 0, Z80_INT_REQ, PULSE_LINE); |
| 362 | cpu_set_input_line(machine->cpu[0], Z80_INT_REQ, PULSE_LINE); |
| 363 | 363 | else |
| 364 | | cpunum_set_input_line(machine, 0, Z80_INT_IEO, PULSE_LINE); |
| 364 | cpu_set_input_line(machine->cpu[0], Z80_INT_IEO, PULSE_LINE); |
| 365 | 365 | |
| 366 | 366 | if (einstein_int & einstein_int_mask & EINSTEIN_ADC_INT) |
| 367 | | cpunum_set_input_line(machine, 0, Z80_INT_REQ, PULSE_LINE); |
| 367 | cpu_set_input_line(machine->cpu[0], Z80_INT_REQ, PULSE_LINE); |
| 368 | 368 | else |
| 369 | | cpunum_set_input_line(machine, 0, Z80_INT_IEO, PULSE_LINE); |
| 369 | cpu_set_input_line(machine->cpu[0], Z80_INT_IEO, PULSE_LINE); |
| 370 | 370 | |
| 371 | 371 | if (einstein_int & einstein_int_mask & EINSTEIN_FIRE_INT) |
| 372 | | cpunum_set_input_line(machine, 0, Z80_INT_REQ, PULSE_LINE); |
| 372 | cpu_set_input_line(machine->cpu[0], Z80_INT_REQ, PULSE_LINE); |
| 373 | 373 | else |
| 374 | | cpunum_set_input_line(machine, 0, Z80_INT_IEO, PULSE_LINE); |
| 374 | cpu_set_input_line(machine->cpu[0], Z80_INT_IEO, PULSE_LINE); |
| 375 | 375 | */ |
| 376 | 376 | } |
| 377 | 377 | |
src/mess/drivers/exelv.c
| r3577 | r3578 | |
| 207 | 207 | break; |
| 208 | 208 | case IOS_INIT: |
| 209 | 209 | mailbox_out = 0x08; |
| 210 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 210 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 211 | 211 | io_state = IOS_NOP; |
| 212 | 212 | break; |
| 213 | 213 | case IOS_RESET: |
| r3577 | r3578 | |
| 223 | 223 | break; |
| 224 | 224 | case IOS_CHARDEF1: |
| 225 | 225 | mailbox_out = 0x07; |
| 226 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 226 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 227 | 227 | io_state = IOS_CHARDEF2; |
| 228 | 228 | break; |
| 229 | 229 | case IOS_CHARDEF2: |
| 230 | 230 | mailbox_out = 0x04; |
| 231 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 231 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 232 | 232 | io_state = IOS_CHARDEF3; |
| 233 | 233 | break; |
| 234 | 234 | case IOS_CHARDEF3: |
| 235 | 235 | mailbox_out = 0xF5; |
| 236 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 236 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 237 | 237 | io_state = IOS_CHARDEF4; |
| 238 | 238 | io_counter = 0; |
| 239 | 239 | break; |
| r3577 | r3578 | |
| 372 | 372 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 373 | 373 | }; |
| 374 | 374 | mailbox_out = fontdata[io_counter+9-2*(io_counter%10)] >> 2; |
| 375 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 375 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 376 | 376 | io_counter++; |
| 377 | 377 | if (io_counter == 127*10) |
| 378 | 378 | io_state = IOS_NOP; |
| r3577 | r3578 | |
| 390 | 390 | if (io_command_ack) |
| 391 | 391 | { |
| 392 | 392 | if (io_hsk) |
| 393 | | cpunum_set_input_line(machine, 0, TMS7000_IRQ1_LINE, PULSE_LINE); |
| 393 | cpu_set_input_line(machine->cpu[0], TMS7000_IRQ1_LINE, PULSE_LINE); |
| 394 | 394 | else |
| 395 | 395 | { |
| 396 | 396 | io_command_ack = 0; |
src/mess/drivers/a310.c
| r3577 | r3578 | |
| 89 | 89 | |
| 90 | 90 | if (a310_iocregs[6] & mask) |
| 91 | 91 | { |
| 92 | | cpunum_set_input_line(machine, 0, ARM_IRQ_LINE, ASSERT_LINE); |
| 92 | cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, ASSERT_LINE); |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| r3577 | r3578 | |
| 99 | 99 | |
| 100 | 100 | if (a310_iocregs[10] & mask) |
| 101 | 101 | { |
| 102 | | cpunum_set_input_line(machine, 0, ARM_IRQ_LINE, PULSE_LINE); |
| 102 | cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, PULSE_LINE); |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | |
| r3577 | r3578 | |
| 109 | 109 | |
| 110 | 110 | if (a310_iocregs[14] & mask) |
| 111 | 111 | { |
| 112 | | cpunum_set_input_line(machine, 0, ARM_FIRQ_LINE, PULSE_LINE); |
| 112 | cpu_set_input_line(machine->cpu[0], ARM_FIRQ_LINE, PULSE_LINE); |
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | |
| r3577 | r3578 | |
| 436 | 436 | // if that did it, clear the IRQ |
| 437 | 437 | if (a310_iocregs[4] == 0) |
| 438 | 438 | { |
| 439 | | cpunum_set_input_line(machine, 0, ARM_IRQ_LINE, CLEAR_LINE); |
| 439 | cpu_set_input_line(machine->cpu[0], ARM_IRQ_LINE, CLEAR_LINE); |
| 440 | 440 | } |
| 441 | 441 | break; |
| 442 | 442 | |
src/mess/drivers/tutor.c
| r3577 | r3578 | |
| 104 | 104 | { |
| 105 | 105 | tape_interrupt_timer = timer_alloc(tape_interrupt_handler, NULL); |
| 106 | 106 | |
| 107 | | memory_configure_bank(1, 0, 1, memory_region(machine, "main") + basic_base, 0); |
| 108 | | memory_configure_bank(1, 1, 1, memory_region(machine, "main") + cartridge_base, 0); |
| 107 | memory_configure_bank(machine, 1, 0, 1, memory_region(machine, "main") + basic_base, 0); |
| 108 | memory_configure_bank(machine, 1, 1, 1, memory_region(machine, "main") + cartridge_base, 0); |
| 109 | 109 | memory_set_bank(1, 0); |
| 110 | 110 | } |
| 111 | 111 | |
| r3577 | r3578 | |
| 270 | 270 | static TIMER_CALLBACK(tape_interrupt_handler) |
| 271 | 271 | { |
| 272 | 272 | //assert(tape_interrupt_enable); |
| 273 | | cpunum_set_input_line(machine, 0, 1, (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.0) ? ASSERT_LINE : CLEAR_LINE); |
| 273 | cpu_set_input_line(machine->cpu[0], 1, (cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) > 0.0) ? ASSERT_LINE : CLEAR_LINE); |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | /* CRU handler */ |
| r3577 | r3578 | |
| 306 | 306 | else |
| 307 | 307 | { |
| 308 | 308 | timer_adjust_oneshot(tape_interrupt_timer, attotime_never, 0); |
| 309 | | cpunum_set_input_line(machine, 0, 1, CLEAR_LINE); |
| 309 | cpu_set_input_line(machine->cpu[0], 1, CLEAR_LINE); |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | break; |