src/mess/video/smsvdp.c
| r1971 | r1972 | |
| 186 | 186 | In theory the driver could have a REGION_GFX1 and/or REGION_GFX2 memory region |
| 187 | 187 | of it's own. So this code could potentially cause a clash. |
| 188 | 188 | */ |
| 189 | | smsvdp.VRAM = new_memory_region( Machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED ); |
| 190 | | smsvdp.CRAM = new_memory_region( Machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED ); |
| 189 | smsvdp.VRAM = new_memory_region( machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED ); |
| 190 | smsvdp.CRAM = new_memory_region( machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED ); |
| 191 | 191 | smsvdp.line_buffer = auto_malloc( 256 * 5 * sizeof(int) ); |
| 192 | 192 | memset( smsvdp.line_buffer, 0, 256 * 5 * sizeof(int) ); |
| 193 | 193 | |
| r1971 | r1972 | |
| 203 | 203 | smsvdp.collision_buffer = auto_malloc(SMS_X_PIXELS); |
| 204 | 204 | |
| 205 | 205 | /* Make temp bitmap for rendering */ |
| 206 | | tmpbitmap = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED32); |
| 206 | tmpbitmap = auto_bitmap_alloc(Machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED32); |
| 207 | 207 | |
| 208 | | smsvdp.prev_bitmap = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED32); |
| 208 | smsvdp.prev_bitmap = auto_bitmap_alloc(Machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED32); |
| 209 | 209 | |
| 210 | 210 | set_display_settings( machine ); |
| 211 | 211 | |
src/mess/machine/dgn_beta.c
| r1971 | r1972 | |
| 686 | 686 | HALT_DMA=CLEAR_LINE; |
| 687 | 687 | |
| 688 | 688 | LOG_HALT(("DMA_CPU HALT=%d\n",HALT_DMA)); |
| 689 | | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, HALT_DMA); |
| 689 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, HALT_DMA); |
| 690 | 690 | |
| 691 | 691 | /* CPU un-halted let it run ! */ |
| 692 | 692 | if (HALT_DMA==CLEAR_LINE) |
| r1971 | r1972 | |
| 729 | 729 | else |
| 730 | 730 | HALT_CPU=ASSERT_LINE; |
| 731 | 731 | LOG_HALT(("MAIN_CPU HALT=%d\n",HALT_CPU)); |
| 732 | | cpunum_set_input_line(Machine, 0, INPUT_LINE_HALT, HALT_CPU); |
| 732 | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, HALT_CPU); |
| 733 | 733 | |
| 734 | 734 | d_pia1_pb_last=data & 0x02; |
| 735 | 735 | |
| r1971 | r1972 | |
| 780 | 780 | LOG_INTS(("cpu1 NMI : %d\n",NMI)); |
| 781 | 781 | if(!NMI) |
| 782 | 782 | { |
| 783 | | cpunum_set_input_line(Machine, 1,INPUT_LINE_NMI,ASSERT_LINE); |
| 783 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,ASSERT_LINE); |
| 784 | 784 | logerror("cpu_yield()\n"); |
| 785 | 785 | cpu_yield(); /* Let DMA CPU run */ |
| 786 | 786 | } |
| 787 | 787 | else |
| 788 | 788 | { |
| 789 | | cpunum_set_input_line(Machine, 1,INPUT_LINE_NMI,CLEAR_LINE); |
| 789 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,CLEAR_LINE); |
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | DMA_NMI_LAST=NMI; /* Save it for next time */ |
src/mess/drivers/x68k.c
| r1971 | r1972 | |
| 1201 | 1201 | { |
| 1202 | 1202 | COMBINE_DATA(sys.video.gfx_pal+offset); |
| 1203 | 1203 | val = sys.video.gfx_pal[offset]; |
| 1204 | | palette_set_color_rgb(Machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2); |
| 1204 | palette_set_color_rgb(machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2); |
| 1205 | 1205 | return; |
| 1206 | 1206 | } |
| 1207 | 1207 | |
| r1971 | r1972 | |
| 1209 | 1209 | { |
| 1210 | 1210 | COMBINE_DATA(sys.video.text_pal+(offset-0x100)); |
| 1211 | 1211 | val = sys.video.text_pal[offset-0x100]; |
| 1212 | | palette_set_color_rgb(Machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2); |
| 1212 | palette_set_color_rgb(machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2); |
| 1213 | 1213 | return; |
| 1214 | 1214 | } |
| 1215 | 1215 | |
| r1971 | r1972 | |
| 1332 | 1332 | then access causes a bus error */ |
| 1333 | 1333 | current_vector[2] = 0x02; // bus error |
| 1334 | 1334 | current_irq_line = 2; |
| 1335 | | cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1335 | cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1336 | 1336 | return 0xff; |
| 1337 | 1337 | } |
| 1338 | 1338 | |
| r1971 | r1972 | |
| 1342 | 1342 | then access causes a bus error */ |
| 1343 | 1343 | current_vector[2] = 0x02; // bus error |
| 1344 | 1344 | current_irq_line = 2; |
| 1345 | | cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1345 | cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1346 | 1346 | } |
| 1347 | 1347 | |
| 1348 | 1348 | static READ16_HANDLER( x68k_exp_r ) |
| r1971 | r1972 | |
| 1356 | 1356 | if(ACCESSING_LSB) |
| 1357 | 1357 | offset++; |
| 1358 | 1358 | timer_set(ATTOTIME_IN_CYCLES(16,0), NULL, 0xeafa00+offset,x68k_fake_bus_error); |
| 1359 | | // cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1359 | // cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1360 | 1360 | } |
| 1361 | 1361 | return 0xffff; |
| 1362 | 1362 | } |
| r1971 | r1972 | |
| 1372 | 1372 | if(ACCESSING_LSB) |
| 1373 | 1373 | offset++; |
| 1374 | 1374 | timer_set(ATTOTIME_IN_CYCLES(16,0), NULL, 0xeafa00+offset,x68k_fake_bus_error); |
| 1375 | | // cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1375 | // cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]); |
| 1376 | 1376 | } |
| 1377 | 1377 | } |
| 1378 | 1378 | |
src/mess/drivers/ex800.c
| r1971 | r1972 | |
| 127 | 127 | ******************************************************************************/ |
| 128 | 128 | |
| 129 | 129 | #include "driver.h" |
| 130 | | #include "deprecat.h" |
| 131 | 130 | #include "cpu/upd7810/upd7810.h" |
| 132 | 131 | #include "sound/beep.h" |
| 133 | 132 | |
| r1971 | r1972 | |
| 171 | 170 | |
| 172 | 171 | if (newval) |
| 173 | 172 | { |
| 174 | | cpunum_set_input_line(Machine, 0, UPD7810_INTF1, state); |
| 173 | cpunum_set_input_line(machine, 0, UPD7810_INTF1, state); |
| 175 | 174 | state = (state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE; |
| 176 | 175 | } |
| 177 | 176 | } |
| r1971 | r1972 | |
| 201 | 200 | static READ8_HANDLER(ex800_porta_r) |
| 202 | 201 | { |
| 203 | 202 | logerror("PA R @%x\n", activecpu_get_pc()); |
| 204 | | return mame_rand(Machine); |
| 203 | return mame_rand(machine); |
| 205 | 204 | } |
| 206 | 205 | |
| 207 | 206 | static READ8_HANDLER(ex800_portb_r) |
| 208 | 207 | { |
| 209 | 208 | logerror("PB R @%x\n", activecpu_get_pc()); |
| 210 | | return mame_rand(Machine); |
| 209 | return mame_rand(machine); |
| 211 | 210 | } |
| 212 | 211 | |
| 213 | 212 | static READ8_HANDLER(ex800_portc_r) |
| 214 | 213 | { |
| 215 | 214 | logerror("PC R @%x\n", activecpu_get_pc()); |
| 216 | | return mame_rand(Machine); |
| 215 | return mame_rand(machine); |
| 217 | 216 | } |
| 218 | 217 | |
| 219 | 218 | static WRITE8_HANDLER(ex800_porta_w) |
| r1971 | r1972 | |
| 264 | 263 | static READ8_HANDLER(ex800_devsel_r) |
| 265 | 264 | { |
| 266 | 265 | logerror("DEVSEL R @%x with offset %x\n", activecpu_get_pc(), offset); |
| 267 | | return mame_rand(Machine); |
| 266 | return mame_rand(machine); |
| 268 | 267 | } |
| 269 | 268 | |
| 270 | 269 | static WRITE8_HANDLER(ex800_devsel_w) |
| r1971 | r1972 | |
| 275 | 274 | static READ8_HANDLER(ex800_gate5a_r) |
| 276 | 275 | { |
| 277 | 276 | logerror("GATE5A R @%x with offset %x\n", activecpu_get_pc(), offset); |
| 278 | | return mame_rand(Machine); |
| 277 | return mame_rand(machine); |
| 279 | 278 | } |
| 280 | 279 | |
| 281 | 280 | static WRITE8_HANDLER(ex800_gate5a_w) |
| r1971 | r1972 | |
| 286 | 285 | static READ8_HANDLER(ex800_iosel_r) |
| 287 | 286 | { |
| 288 | 287 | logerror("IOSEL R @%x with offset %x\n", activecpu_get_pc(), offset); |
| 289 | | return mame_rand(Machine); |
| 288 | return mame_rand(machine); |
| 290 | 289 | } |
| 291 | 290 | |
| 292 | 291 | static WRITE8_HANDLER(ex800_iosel_w) |
| r1971 | r1972 | |
| 297 | 296 | static READ8_HANDLER(ex800_gate7a_r) |
| 298 | 297 | { |
| 299 | 298 | logerror("GATE7A R @%x with offset %x\n", activecpu_get_pc(), offset); |
| 300 | | return mame_rand(Machine); |
| 299 | return mame_rand(machine); |
| 301 | 300 | } |
| 302 | 301 | |
| 303 | 302 | static WRITE8_HANDLER(ex800_gate7a_w) |
src/mess/drivers/saturn.c
| r1971 | r1972 | |
| 820 | 820 | if(!(stv_scu[40] & 2))/*VBLANK-OUT*/ |
| 821 | 821 | { |
| 822 | 822 | if(LOG_IRQ) logerror ("Interrupt: VBlank-OUT at scanline %04x, Vector 0x41 Level 0x0e\n",scanline); |
| 823 | | cpunum_set_input_line_and_vector(Machine, 0, 0xe, HOLD_LINE , 0x41); |
| 823 | cpunum_set_input_line_and_vector(machine, 0, 0xe, HOLD_LINE , 0x41); |
| 824 | 824 | } |
| 825 | 825 | stv_vblank = 0; |
| 826 | 826 | } |
| r1971 | r1972 | |
| 836 | 836 | if((!(stv_scu[40] & 0x10)) && (!(stv_scu[38] & 0x80))) |
| 837 | 837 | { |
| 838 | 838 | if(LOG_IRQ) logerror ("Interrupt: Timer 1 at scanline %04x, Vector 0x44 Level 0x0b\n",scanline); |
| 839 | | cpunum_set_input_line_and_vector(Machine, 0, 0xb, HOLD_LINE, 0x44 ); |
| 839 | cpunum_set_input_line_and_vector(machine, 0, 0xb, HOLD_LINE, 0x44 ); |
| 840 | 840 | } |
| 841 | 841 | else if((!(stv_scu[40] & 0x10)) && (stv_scu[38] & 0x80)) |
| 842 | 842 | { |
| 843 | 843 | if(timer_1 == (stv_scu[36] & 0x1ff)) |
| 844 | 844 | { |
| 845 | 845 | if(LOG_IRQ) logerror ("Interrupt: Timer 1 at scanline %04x, Vector 0x44 Level 0x0b\n",scanline); |
| 846 | | cpunum_set_input_line_and_vector(Machine, 0, 0xb, HOLD_LINE, 0x44 ); |
| 846 | cpunum_set_input_line_and_vector(machine, 0, 0xb, HOLD_LINE, 0x44 ); |
| 847 | 847 | } |
| 848 | 848 | } |
| 849 | 849 | } |
| r1971 | r1972 | |
| 852 | 852 | if(!(stv_scu[40] & 8))/*Timer 0*/ |
| 853 | 853 | { |
| 854 | 854 | if(LOG_IRQ) logerror ("Interrupt: Timer 0 at scanline %04x, Vector 0x43 Level 0x0c\n",scanline); |
| 855 | | cpunum_set_input_line_and_vector(Machine, 0, 0xc, HOLD_LINE, 0x43 ); |
| 855 | cpunum_set_input_line_and_vector(machine, 0, 0xc, HOLD_LINE, 0x43 ); |
| 856 | 856 | } |
| 857 | 857 | } |
| 858 | 858 | |
| r1971 | r1972 | |
| 860 | 860 | if(!(stv_scu[40] & 4))/*HBLANK-IN*/ |
| 861 | 861 | { |
| 862 | 862 | if(LOG_IRQ) logerror ("Interrupt: HBlank-In at scanline %04x, Vector 0x42 Level 0x0d\n",scanline); |
| 863 | | cpunum_set_input_line_and_vector(Machine, 0, 0xd, HOLD_LINE , 0x42); |
| 863 | cpunum_set_input_line_and_vector(machine, 0, 0xd, HOLD_LINE , 0x42); |
| 864 | 864 | } |
| 865 | 865 | } |
| 866 | 866 | else if(scanline == 224) |
| r1971 | r1972 | |
| 871 | 871 | if(!(stv_scu[40] & 1))/*VBLANK-IN*/ |
| 872 | 872 | { |
| 873 | 873 | if(LOG_IRQ) logerror ("Interrupt: VBlank IN at scanline %04x, Vector 0x40 Level 0x0f\n",scanline); |
| 874 | | cpunum_set_input_line_and_vector(Machine, 0, 0xf, HOLD_LINE , 0x40); |
| 874 | cpunum_set_input_line_and_vector(machine, 0, 0xf, HOLD_LINE , 0x40); |
| 875 | 875 | } |
| 876 | 876 | stv_vblank = 1; |
| 877 | 877 | |
| r1971 | r1972 | |
| 880 | 880 | if(!(stv_scu[40] & 8))/*Timer 0*/ |
| 881 | 881 | { |
| 882 | 882 | if(LOG_IRQ) logerror ("Interrupt: Timer 0 at scanline %04x, Vector 0x43 Level 0x0c\n",scanline); |
| 883 | | cpunum_set_input_line_and_vector(Machine, 0, 0xc, HOLD_LINE, 0x43 ); |
| 883 | cpunum_set_input_line_and_vector(machine, 0, 0xc, HOLD_LINE, 0x43 ); |
| 884 | 884 | } |
| 885 | 885 | } |
| 886 | 886 | if(!(stv_scu[40] & 0x2000)) /*Sprite draw end irq*/ |
| 887 | | cpunum_set_input_line_and_vector(Machine, 0, 2, HOLD_LINE , 0x4d); |
| 887 | cpunum_set_input_line_and_vector(machine, 0, 2, HOLD_LINE , 0x4d); |
| 888 | 888 | } |
| 889 | 889 | } |
| 890 | 890 | |
| r1971 | r1972 | |
| 1107 | 1107 | /*Sound IRQ*/ |
| 1108 | 1108 | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1109 | 1109 | { |
| 1110 | | //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46); |
| 1110 | //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46); |
| 1111 | 1111 | logerror("SCSP: Main CPU interrupt\n"); |
| 1112 | 1112 | #if 0 |
| 1113 | 1113 | if((scu_dst_0 & 0x7ffffff) != 0x05a00000) |
| 1114 | 1114 | { |
| 1115 | 1115 | if(!(stv_scu[40] & 0x1000)) |
| 1116 | 1116 | { |
| 1117 | | cpunum_set_input_line_and_vector(Machine, 0, 3, HOLD_LINE, 0x4c); |
| 1117 | cpunum_set_input_line_and_vector(machine, 0, 3, HOLD_LINE, 0x4c); |
| 1118 | 1118 | logerror("SCU: Illegal DMA interrupt\n"); |
| 1119 | 1119 | } |
| 1120 | 1120 | } |
| r1971 | r1972 | |
| 1168 | 1168 | /*Sound IRQ*/ |
| 1169 | 1169 | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1170 | 1170 | { |
| 1171 | | //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46); |
| 1171 | //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46); |
| 1172 | 1172 | logerror("SCSP: Main CPU interrupt\n"); |
| 1173 | 1173 | } |
| 1174 | 1174 | } |
| r1971 | r1972 | |
| 1218 | 1218 | /*Sound IRQ*/ |
| 1219 | 1219 | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1220 | 1220 | { |
| 1221 | | //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46); |
| 1221 | //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46); |
| 1222 | 1222 | logerror("SCSP: Main CPU interrupt\n"); |
| 1223 | 1223 | } |
| 1224 | 1224 | } |
| r1971 | r1972 | |
| 1864 | 1864 | { |
| 1865 | 1865 | logerror("cpu #%d (PC=%08X) MINIT write = %08x\n",cpu_getactivecpu(), activecpu_get_pc(),data); |
| 1866 | 1866 | cpu_boost_interleave(double_to_attotime(minit_boost_timeslice), ATTOTIME_IN_USEC(minit_boost)); |
| 1867 | | cpu_trigger(Machine, 1000); |
| 1867 | cpu_trigger(machine, 1000); |
| 1868 | 1868 | cpunum_set_info_int(1, CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE); |
| 1869 | 1869 | } |
| 1870 | 1870 | |
| r1971 | r1972 | |
| 2166 | 2166 | memset(stv_workram_l, 0, 0x100000); |
| 2167 | 2167 | memset(stv_workram_h, 0, 0x100000); |
| 2168 | 2168 | |
| 2169 | | cpunum_set_clock(Machine, 0, MASTER_CLOCK_320/2); |
| 2170 | | cpunum_set_clock(Machine, 1, MASTER_CLOCK_320/2); |
| 2171 | | cpunum_set_clock(Machine, 2, MASTER_CLOCK_320/5); |
| 2169 | cpunum_set_clock(machine, 0, MASTER_CLOCK_320/2); |
| 2170 | cpunum_set_clock(machine, 1, MASTER_CLOCK_320/2); |
| 2171 | cpunum_set_clock(machine, 2, MASTER_CLOCK_320/5); |
| 2172 | 2172 | |
| 2173 | 2173 | stvcd_reset(); |
| 2174 | 2174 | } |
src/mess/drivers/ql.c
| r1971 | r1972 | |
| 368 | 368 | |
| 369 | 369 | if (!zx8302.irq) |
| 370 | 370 | { |
| 371 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 371 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 372 | 372 | } |
| 373 | 373 | } |
| 374 | 374 | |
| r1971 | r1972 | |
| 485 | 485 | switch (ipl) |
| 486 | 486 | { |
| 487 | 487 | case 0: |
| 488 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 489 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 490 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, HOLD_LINE); |
| 488 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 489 | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 490 | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, HOLD_LINE); |
| 491 | 491 | break; |
| 492 | 492 | case 1: // CTRL-ALT-7 |
| 493 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 494 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, HOLD_LINE); |
| 495 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 493 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 494 | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, HOLD_LINE); |
| 495 | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 496 | 496 | break; |
| 497 | 497 | case 2: |
| 498 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, HOLD_LINE); |
| 499 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 500 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 498 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, HOLD_LINE); |
| 499 | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 500 | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 501 | 501 | break; |
| 502 | 502 | case 3: |
| 503 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 504 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 505 | | cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 503 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE); |
| 504 | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); |
| 505 | cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE); |
| 506 | 506 | break; |
| 507 | 507 | } |
| 508 | 508 | |
| r1971 | r1972 | |
| 536 | 536 | |
| 537 | 537 | int irq = (ipc.ser2_rxd | ipc.ser1_txd); |
| 538 | 538 | |
| 539 | | cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ0, irq); |
| 539 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ0, irq); |
| 540 | 540 | |
| 541 | 541 | return (zx8302.comdata << 7) | irq; |
| 542 | 542 | } |
src/mess/drivers/amstrad.c
| r1971 | r1972 | |
| 237 | 237 | /* PSG function selected */ |
| 238 | 238 | static unsigned char amstrad_Psg_FunctionSelected; |
| 239 | 239 | |
| 240 | | static void update_psg(void) |
| 240 | static void update_psg(running_machine *machine) |
| 241 | 241 | { |
| 242 | | running_machine *machine = Machine; |
| 243 | | |
| 244 | 242 | if(aleste_mode & 0x20) // RTC selected |
| 245 | 243 | { |
| 246 | 244 | switch(aleste_rtc_function) |
| r1971 | r1972 | |
| 286 | 284 | /* Read/Write 8255 PPI port A (connected to AY-3-8912 databus) */ |
| 287 | 285 | static READ8_HANDLER ( amstrad_ppi_porta_r ) |
| 288 | 286 | { |
| 289 | | update_psg(); |
| 287 | update_psg(machine); |
| 290 | 288 | return ppi_port_inputs[amstrad_ppi_PortA]; |
| 291 | 289 | } |
| 292 | 290 | |
| 293 | 291 | static WRITE8_HANDLER ( amstrad_ppi_porta_w ) |
| 294 | 292 | { |
| 295 | 293 | ppi_port_outputs[amstrad_ppi_PortA] = data; |
| 296 | | update_psg(); |
| 294 | update_psg(machine); |
| 297 | 295 | } |
| 298 | 296 | |
| 299 | 297 | /* - Read PPI Port B - |
| r1971 | r1972 | |
| 387 | 385 | aleste_rtc_function = data & 0x07; |
| 388 | 386 | |
| 389 | 387 | /* Perform PSG function */ |
| 390 | | update_psg(); |
| 388 | update_psg(machine); |
| 391 | 389 | |
| 392 | 390 | /* b5 Cassette Write data */ |
| 393 | 391 | if(amstrad_system_type != SYSTEM_GX4000) |
| r1971 | r1972 | |
| 774 | 772 | if(data & 0x40) |
| 775 | 773 | { |
| 776 | 774 | logerror("ASIC: DMA 0 IRQ acknowledge\n"); |
| 777 | | cpunum_set_input_line(Machine, 0,0,CLEAR_LINE); |
| 775 | cpunum_set_input_line(machine, 0,0,CLEAR_LINE); |
| 778 | 776 | amstrad_plus_irq_cause = 0x06; |
| 779 | 777 | amstrad_plus_asic_ram[0x2c0f] &= ~0x40; |
| 780 | 778 | } |
| 781 | 779 | if(data & 0x20) |
| 782 | 780 | { |
| 783 | 781 | logerror("ASIC: DMA 1 IRQ acknowledge\n"); |
| 784 | | cpunum_set_input_line(Machine, 0,0,CLEAR_LINE); |
| 782 | cpunum_set_input_line(machine, 0,0,CLEAR_LINE); |
| 785 | 783 | amstrad_plus_irq_cause = 0x06; |
| 786 | 784 | amstrad_plus_asic_ram[0x2c0f] &= ~0x20; |
| 787 | 785 | } |
| 788 | 786 | if(data & 0x10) |
| 789 | 787 | { |
| 790 | 788 | logerror("ASIC: DMA 2 IRQ acknowledge\n"); |
| 791 | | cpunum_set_input_line(Machine, 0,0,CLEAR_LINE); |
| 789 | cpunum_set_input_line(machine, 0,0,CLEAR_LINE); |
| 792 | 790 | amstrad_plus_irq_cause = 0x06; |
| 793 | 791 | amstrad_plus_asic_ram[0x2c0f] &= ~0x10; |
| 794 | 792 | } |