| Previous | 199869 Revisions | Next |
| r18138 Tuesday 25th September, 2012 at 13:39:59 UTC by Miodrag Milanović |
|---|
| TIMER_CALLBACK_DEVICE_MEMBER modernization part 1 (no whatsnew) |
| [src/mame/audio] | 8080bw.c n8080.c |
| [src/mame/drivers] | 1942.c 8080bw.c airbustr.c argus.c astrof.c atarisy1.c balsente.c battlera.c beathead.c beezer.c bionicc.c bishi.c bladestl.c blockout.c bsktball.c btime.c cave.c centiped.c changela.c chqflag.c circus.c cischeat.c cninja.c coolpool.c cosmic.c dambustr.c darkmist.c dbz.c ddragon.c ddragon3.c deadang.c deco32.c deco_mlc.c decocass.c djboy.c dooyong.c dragrace.c dynax.c equites.c espial.c exedexes.c exterm.c fastlane.c finalizr.c foodf.c gaelco2.c gaelco3d.c galaxian.c galaxold.c galpani2.c galpanic.c gberet.c gradius3.c gundealr.c hexion.c higemaru.c hng64.c hyprduel.c ikki.c iqblock.c irobot.c ironhors.c itech8.c jpmimpct.c kaneko16.c konamigx.c lastduel.c lazercmd.c m107.c m92.c mcr.c mcr3.c megasys1.c mhavoc.c mitchell.c model1.c model2.c model3.c mrflea.c ms32.c mw8080bw.c mystwarr.c n8080.c namcofl.c namcona1.c namconb1.c namcos22.c nemesis.c nitedrvr.c nmk16.c orbit.c overdriv.c pgm.c pingpong.c polepos.c polyplay.c psychic5.c qdrmfgp.c renegade.c scobra.c scramble.c segahang.c segas24.c segas32.c seta.c seta2.c shadfrce.c shaolins.c snk6502.c snowbros.c spdodgeb.c sprcros2.c sprint8.c srumbler.c ssv.c st0016.c strnskil.c suna16.c suna8.c suprnova.c system1.c taito_l.c taito_o.c targeth.c thedeep.c vball.c wecleman.c williams.c wwfsstar.c wwfwfest.c xain.c xexex.c xmen.c zodiack.c |
| [src/mame/includes] | 1942.h 8080bw.h airbustr.h argus.h astrof.h atarisy1.h balsente.h battlera.h beathead.h beezer.h bionicc.h bishi.h bladestl.h blockout.h bsktball.h btime.h cave.h centiped.h changela.h chqflag.h circus.h cischeat.h cninja.h coolpool.h cosmic.h darkmist.h dbz.h ddragon.h ddragon3.h deadang.h deco32.h deco_mlc.h decocass.h djboy.h dooyong.h dragrace.h dynax.h equites.h espial.h exedexes.h exterm.h fastlane.h finalizr.h foodf.h gaelco2.h gaelco3d.h galaxian.h galaxold.h galpani2.h galpanic.h gberet.h gradius3.h gundealr.h hexion.h higemaru.h hng64.h hyprduel.h ikki.h iqblock.h irobot.h ironhors.h itech8.h jpmimpct.h kaneko16.h konamigx.h lastduel.h lazercmd.h m107.h m92.h mcr.h megasys1.h mhavoc.h mitchell.h model1.h model2.h model3.h mrflea.h ms32.h mw8080bw.h mystwarr.h n8080.h namcofl.h namcona1.h namconb1.h namcos22.h nemesis.h nitedrvr.h nmk16.h orbit.h overdriv.h pgm.h pingpong.h polepos.h polyplay.h psychic5.h qdrmfgp.h renegade.h segahang.h segas24.h segas32.h seta.h seta2.h shadfrce.h shaolins.h snk6502.h snowbros.h spdodgeb.h sprcros2.h sprint8.h srumbler.h ssv.h st0016.h strnskil.h suna16.h suna8.h suprnova.h system1.h taito_l.h taito_o.h targeth.h thedeep.h vball.h wecleman.h williams.h wwfsstar.h wwfwfest.h xain.h xexex.h xmen.h zodiack.h |
| [src/mame/machine] | balsente.c bsktball.c decocass.c gaelco2.c galaxold.c irobot.c mcr.c mhavoc.c nitedrvr.c williams.c |
| [src/mame/video] | atarisy1.c battlera.c beezer.c galaxian.c itech8.c spdodgeb.c |
| [src/mess/drivers] | a7800.c ace.c adam.c amstr_pc.c apple2.c apple2gs.c atom.c avigo.c bullet.c busicom.c bw12.c coleco.c cosmicos.c einstein.c fidelz80.c huebler.c kc.c kyocera.c mc1000.c mc80.c mikromik.c mpf1.c msx.c mtx.c mz700.c mz80.c nc.c newbrain.c pc.c pc8401a.c pcw.c pcw16.c portfoli.c psion.c super6.c svision.c tek405x.c ti89.c tiki100.c trs80m2.c v1050.c vcs80.c vixen.c x07.c x1.c x1twin.c xerox820.c |
| [src/mess/includes] | a7800.h ace.h adam.h apple2.h atom.h avigo.h bullet.h busicom.h bw12.h cgc7900.h coleco.h cosmicos.h einstein.h fidelz80.h huebler.h kc.h kyocera.h mc1000.h mc80.h mikromik.h mpf1.h msx.h mtx.h mz700.h mz80.h nc.h newbrain.h pc.h pc8401a.h pcw.h pcw16.h portfoli.h psion.h super6.h svision.h tek405x.h ti89.h tiki100.h tmc600.h trs80m2.h v1050.h vcs80.h vixen.h x07.h x1.h xerox820.h |
| [src/mess/machine] | apple2.c kc.c msx.c pc.c |
| [src/mess/video] | a7800.c cgc7900.c tmc600.c |
| r18137 | r18138 | |
|---|---|---|
| 524 | 524 | z80_set_cycle_tables( machine().device("maincpu"), cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex ); |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | TIMER_DEVICE_CALLBACK( | |
| 527 | TIMER_DEVICE_CALLBACK_MEMBER(msx_state::msx2_interrupt) | |
| 528 | 528 | { |
| 529 | msx_state *state = timer.machine().driver_data<msx_state>(); | |
| 530 | state->m_v9938->set_sprite_limit(timer.machine().root_device().ioport("DSW")->read() & 0x20); | |
| 531 | state->m_v9938->set_resolution(timer.machine().root_device().ioport("DSW")->read() & 0x03); | |
| 532 | state->m_v9938->interrupt(); | |
| 529 | m_v9938->set_sprite_limit(machine().root_device().ioport("DSW")->read() & 0x20); | |
| 530 | m_v9938->set_resolution(machine().root_device().ioport("DSW")->read() & 0x03); | |
| 531 | m_v9938->interrupt(); | |
| 533 | 532 | } |
| 534 | 533 | |
| 535 | 534 | INTERRUPT_GEN_MEMBER(msx_state::msx_interrupt) |
| r18137 | r18138 | |
|---|---|---|
| 718 | 718 | |
| 719 | 719 | } |
| 720 | 720 | |
| 721 | TIMER_DEVICE_CALLBACK( | |
| 721 | TIMER_DEVICE_CALLBACK_MEMBER(kc_state::kc_scanline) | |
| 722 | 722 | { |
| 723 | kc_state *state = timer.machine().driver_data<kc_state>(); | |
| 724 | 723 | int scanline = (int)param; |
| 725 | 724 | |
| 726 | 725 | /* set clock input for channel 0 and 1 to ctc */ |
| 727 | state->m_z80ctc->trg0(1); | |
| 728 | state->m_z80ctc->trg0(0); | |
| 729 | state->m_z80ctc->trg1(1); | |
| 730 | state->m_z80ctc->trg1(0); | |
| 726 | m_z80ctc->trg0(1); | |
| 727 | m_z80ctc->trg0(0); | |
| 728 | m_z80ctc->trg1(1); | |
| 729 | m_z80ctc->trg1(0); | |
| 731 | 730 | |
| 732 | 731 | if (scanline == 256) |
| 733 | 732 | { |
| 734 | 733 | /* set clock input for channel 2 and 3 to ctc */ |
| 735 | state->m_z80ctc->trg2(1); | |
| 736 | state->m_z80ctc->trg2(0); | |
| 737 | state->m_z80ctc->trg3(1); | |
| 738 | state->m_z80ctc->trg3(0); | |
| 734 | m_z80ctc->trg2(1); | |
| 735 | m_z80ctc->trg2(0); | |
| 736 | m_z80ctc->trg3(1); | |
| 737 | m_z80ctc->trg3(0); | |
| 739 | 738 | } |
| 740 | 739 | } |
| 741 | 740 |
| r18137 | r18138 | |
|---|---|---|
| 1213 | 1213 | * Apple II interrupt; used to force partial updates |
| 1214 | 1214 | * ----------------------------------------------------------------------- */ |
| 1215 | 1215 | |
| 1216 | TIMER_DEVICE_CALLBACK( | |
| 1216 | TIMER_DEVICE_CALLBACK_MEMBER(apple2_state::apple2_interrupt) | |
| 1217 | 1217 | { |
| 1218 | 1218 | int scanline = param; |
| 1219 | 1219 | |
| 1220 | 1220 | if((scanline % 8) == 0) |
| 1221 | | |
| 1221 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); | |
| 1222 | 1222 | } |
| 1223 | 1223 | |
| 1224 | 1224 |
| r18137 | r18138 | |
|---|---|---|
| 1588 | 1588 | * |
| 1589 | 1589 | **************************************************************************/ |
| 1590 | 1590 | |
| 1591 | TIMER_DEVICE_CALLBACK( | |
| 1591 | TIMER_DEVICE_CALLBACK_MEMBER(pc_state::pc_frame_interrupt) | |
| 1592 | 1592 | { |
| 1593 | 1593 | int scanline = param; |
| 1594 | 1594 | |
| r18137 | r18138 | |
| 1596 | 1596 | pc_keyboard(); |
| 1597 | 1597 | } |
| 1598 | 1598 | |
| 1599 | TIMER_DEVICE_CALLBACK( | |
| 1599 | TIMER_DEVICE_CALLBACK_MEMBER(pc_state::pc_vga_frame_interrupt) | |
| 1600 | 1600 | { |
| 1601 | 1601 | int scanline = param; |
| 1602 | 1602 | |
| r18137 | r18138 | |
| 1607 | 1607 | } |
| 1608 | 1608 | } |
| 1609 | 1609 | |
| 1610 | TIMER_DEVICE_CALLBACK( | |
| 1610 | TIMER_DEVICE_CALLBACK_MEMBER(pc_state::pcjr_frame_interrupt) | |
| 1611 | 1611 | { |
| 1612 | 1612 | int scanline = param; |
| 1613 | 1613 |
| r18137 | r18138 | |
|---|---|---|
| 66 | 66 | virtual void palette_init(); |
| 67 | 67 | DECLARE_PALETTE_INIT(a7800p); |
| 68 | 68 | UINT32 screen_update_a7800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 69 | TIMER_DEVICE_CALLBACK_MEMBER(a7800_interrupt); | |
| 69 | 70 | }; |
| 70 | 71 | |
| 71 | ||
| 72 | /*----------- defined in video/a7800.c -----------*/ | |
| 73 | ||
| 74 | TIMER_DEVICE_CALLBACK( a7800_interrupt ); | |
| 75 | ||
| 76 | 72 | /*----------- defined in machine/a7800.c -----------*/ |
| 77 | 73 | |
| 78 | 74 | extern const riot6532_interface a7800_r6532_interface; |
| r18137 | r18138 | |
|---|---|---|
| 90 | 90 | TIMER_CALLBACK_MEMBER(pcjr_keyb_signal_callback); |
| 91 | 91 | TIMER_CALLBACK_MEMBER(mc1502_keyb_signal_callback); |
| 92 | 92 | TIMER_CALLBACK_MEMBER(pc_rtc_timer); |
| 93 | TIMER_DEVICE_CALLBACK_MEMBER(pc_frame_interrupt); | |
| 94 | TIMER_DEVICE_CALLBACK_MEMBER(pc_vga_frame_interrupt); | |
| 95 | TIMER_DEVICE_CALLBACK_MEMBER(pcjr_frame_interrupt); | |
| 93 | 96 | }; |
| 94 | 97 | |
| 95 | 98 | /*----------- defined in machine/pc.c -----------*/ |
| r18137 | r18138 | |
| 124 | 127 | |
| 125 | 128 | DEVICE_IMAGE_LOAD( pcjr_cartridge ); |
| 126 | 129 | |
| 127 | TIMER_DEVICE_CALLBACK( pc_frame_interrupt ); | |
| 128 | TIMER_DEVICE_CALLBACK( pc_vga_frame_interrupt ); | |
| 129 | TIMER_DEVICE_CALLBACK( pcjr_frame_interrupt ); | |
| 130 | TIMER_DEVICE_CALLBACK( null_frame_interrupt ); | |
| 131 | ||
| 132 | ||
| 133 | 130 | void pc_rtc_init(running_machine &machine); |
| 134 | 131 | |
| 135 | 132 |
| r18137 | r18138 | |
|---|---|---|
| 56 | 56 | emu_timer *m_led_refresh_timer; |
| 57 | 57 | DECLARE_DRIVER_INIT(mpf1); |
| 58 | 58 | TIMER_CALLBACK_MEMBER(led_refresh); |
| 59 | TIMER_DEVICE_CALLBACK_MEMBER(check_halt_callback); | |
| 59 | 60 | }; |
| 60 | 61 | |
| 61 | 62 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 113 | 113 | int m_dack3; |
| 114 | 114 | int m_tc; |
| 115 | 115 | UINT32 screen_update_mm1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 116 | TIMER_DEVICE_CALLBACK_MEMBER(kbclk_tick); | |
| 116 | 117 | }; |
| 117 | 118 | |
| 118 | 119 |
| r18137 | r18138 | |
|---|---|---|
| 148 | 148 | DECLARE_PALETTE_INIT(kc85); |
| 149 | 149 | TIMER_CALLBACK_MEMBER(kc_cassette_oneshot_timer); |
| 150 | 150 | TIMER_CALLBACK_MEMBER(kc_cassette_timer_callback); |
| 151 | TIMER_DEVICE_CALLBACK_MEMBER(kc_scanline); | |
| 151 | 152 | }; |
| 152 | 153 | |
| 153 | 154 | |
| r18137 | r18138 | |
| 185 | 186 | /*----------- defined in machine/kc.c -----------*/ |
| 186 | 187 | |
| 187 | 188 | QUICKLOAD_LOAD( kc ); |
| 188 | TIMER_DEVICE_CALLBACK( kc_scanline ); | |
| 189 | 189 | |
| 190 | 190 | #endif /* KC_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 85 | 85 | /* peripheral state */ |
| 86 | 86 | UINT8 m_pid; /* peripheral identification */ |
| 87 | 87 | virtual void palette_init(); |
| 88 | TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); | |
| 89 | TIMER_DEVICE_CALLBACK_MEMBER(system_tick); | |
| 90 | TIMER_DEVICE_CALLBACK_MEMBER(counter_tick); | |
| 88 | 91 | }; |
| 89 | 92 | |
| 90 | 93 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | /* devices */ |
| 91 | 91 | int m_previous_i8271_int_state; |
| 92 | TIMER_DEVICE_CALLBACK_MEMBER(cassette_output_tick); | |
| 92 | 93 | }; |
| 93 | 94 | |
| 94 | 95 | class atomeb_state : public atom_state |
| r18137 | r18138 | |
|---|---|---|
| 105 | 105 | UINT8 m_warm_start; |
| 106 | 106 | UINT8 * m_ram_base; |
| 107 | 107 | virtual void palette_init(); |
| 108 | TIMER_DEVICE_CALLBACK_MEMBER(avigo_scan_timer); | |
| 109 | TIMER_DEVICE_CALLBACK_MEMBER(avigo_1hz_timer); | |
| 108 | 110 | }; |
| 109 | 111 | #endif /* AVIGO_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 125 | 125 | DECLARE_MACHINE_START(msx2); |
| 126 | 126 | DECLARE_MACHINE_RESET(msx2); |
| 127 | 127 | INTERRUPT_GEN_MEMBER(msx_interrupt); |
| 128 | TIMER_DEVICE_CALLBACK_MEMBER(msx2_interrupt); | |
| 128 | 129 | }; |
| 129 | 130 | |
| 130 | 131 | |
| r18137 | r18138 | |
| 133 | 134 | extern const i8255_interface msx_ppi8255_interface; |
| 134 | 135 | extern const wd17xx_interface msx_wd17xx_interface; |
| 135 | 136 | /* start/stop functions */ |
| 136 | extern TIMER_DEVICE_CALLBACK( msx2_interrupt ); | |
| 137 | 137 | |
| 138 | 138 | DEVICE_IMAGE_LOAD( msx_cart ); |
| 139 | 139 | DEVICE_IMAGE_UNLOAD( msx_cart ); |
| r18137 | r18138 | |
|---|---|---|
| 58 | 58 | required_shared_ptr<UINT8> m_video_ram; |
| 59 | 59 | required_shared_ptr<UINT8> m_char_ram; |
| 60 | 60 | UINT32 screen_update_ace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 61 | TIMER_DEVICE_CALLBACK_MEMBER(set_irq); | |
| 62 | TIMER_DEVICE_CALLBACK_MEMBER(clear_irq); | |
| 61 | 63 | }; |
| 62 | 64 | |
| 63 | 65 | #endif /* ACE_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 82 | 82 | UINT32 screen_update_nc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 83 | 83 | TIMER_CALLBACK_MEMBER(nc_keyboard_timer_callback); |
| 84 | 84 | TIMER_CALLBACK_MEMBER(nc_serial_timer_callback); |
| 85 | TIMER_DEVICE_CALLBACK_MEMBER(dummy_timer_callback); | |
| 85 | 86 | }; |
| 86 | 87 | |
| 87 | 88 |
| r18137 | r18138 | |
|---|---|---|
| 79 | 79 | required_shared_ptr<UINT8> m_mc6847_video_ram; |
| 80 | 80 | UINT8 m_mc6847_attr; |
| 81 | 81 | DECLARE_DRIVER_INIT(mc1000); |
| 82 | TIMER_DEVICE_CALLBACK_MEMBER(ne555_tick); | |
| 82 | 83 | }; |
| 83 | 84 | |
| 84 | 85 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 36 | 36 | int m_keylatch; |
| 37 | 37 | int m_keyclk; |
| 38 | 38 | DECLARE_DRIVER_INIT(vcs80); |
| 39 | TIMER_DEVICE_CALLBACK_MEMBER(vcs80_keyboard_tick); | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 158 | 158 | int m_copbytes; |
| 159 | 159 | int m_copregint; |
| 160 | 160 | INTERRUPT_GEN_MEMBER(newbrain_interrupt); |
| 161 | TIMER_DEVICE_CALLBACK_MEMBER(cop_regint_tick); | |
| 161 | 162 | }; |
| 162 | 163 | |
| 163 | 164 | class newbrain_eim_state : public newbrain_state |
| r18137 | r18138 | |
| 206 | 207 | DECLARE_WRITE_LINE_MEMBER( ctc_z2_w ); |
| 207 | 208 | DECLARE_WRITE_LINE_MEMBER( adc_eoc_w ); |
| 208 | 209 | |
| 210 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_c2_tick); | |
| 211 | ||
| 209 | 212 | void bankswitch(); |
| 210 | 213 | |
| 211 | 214 | // paging state |
| r18137 | r18138 | |
|---|---|---|
| 83 | 83 | DECLARE_MACHINE_START(einstein2); |
| 84 | 84 | DECLARE_MACHINE_RESET(einstein2); |
| 85 | 85 | UINT32 screen_update_einstein2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 86 | TIMER_DEVICE_CALLBACK_MEMBER(einstein_keyboard_timer_callback); | |
| 87 | TIMER_DEVICE_CALLBACK_MEMBER(einstein_ctc_trigger_callback); | |
| 86 | 88 | }; |
| 87 | 89 | |
| 88 | 90 |
| r18137 | r18138 | |
|---|---|---|
| 65 | 65 | DECLARE_WRITE8_MEMBER(vsc_pio_portb_w); |
| 66 | 66 | DECLARE_INPUT_CHANGED_MEMBER(fidelz80_trigger_reset); |
| 67 | 67 | DECLARE_INPUT_CHANGED_MEMBER(abc_trigger_reset); |
| 68 | TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); | |
| 68 | 69 | }; |
| 69 | 70 | |
| 70 | 71 |
| r18137 | r18138 | |
|---|---|---|
| 86 | 86 | DECLARE_READ8_MEMBER( io_r ); |
| 87 | 87 | virtual void palette_init(); |
| 88 | 88 | DECLARE_INPUT_CHANGED_MEMBER(psion_on); |
| 89 | TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); | |
| 89 | 90 | }; |
| 90 | 91 | |
| 91 | 92 | // device type definition |
| r18137 | r18138 | |
|---|---|---|
| 203 | 203 | DECLARE_INPUT_CHANGED_MEMBER(ipl_reset); |
| 204 | 204 | DECLARE_INPUT_CHANGED_MEMBER(nmi_reset); |
| 205 | 205 | TIMER_CALLBACK_MEMBER(x1_rtc_increment); |
| 206 | TIMER_DEVICE_CALLBACK_MEMBER(x1_cmt_wind_timer); | |
| 207 | TIMER_DEVICE_CALLBACK_MEMBER(x1_keyboard_callback); | |
| 206 | 208 | }; |
| 207 | 209 | |
| 208 | ||
| 209 | /*----------- shared with x1twin.c -----------*/ | |
| 210 | ||
| 211 | TIMER_DEVICE_CALLBACK(x1_keyboard_callback); | |
| 212 | TIMER_DEVICE_CALLBACK( x1_cmt_wind_timer ); | |
| 213 | ||
| 214 | 210 | /*----------- defined in machine/x1.c -----------*/ |
| 215 | 211 | |
| 216 | 212 | extern const device_type X1_KEYBOARD; |
| r18137 | r18138 | |
|---|---|---|
| 105 | 105 | TIMER_CALLBACK_MEMBER(pcw_stepper_callback); |
| 106 | 106 | TIMER_CALLBACK_MEMBER(pcw_pins_callback); |
| 107 | 107 | TIMER_CALLBACK_MEMBER(setup_beep); |
| 108 | TIMER_DEVICE_CALLBACK_MEMBER(pcw_timer_interrupt); | |
| 108 | 109 | }; |
| 109 | 110 | |
| 110 | 111 | #endif /* PCW_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 105 | 105 | const UINT8 *m_char_rom; |
| 106 | 106 | DECLARE_DRIVER_INIT(vixen); |
| 107 | 107 | UINT32 screen_update_vixen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 108 | TIMER_DEVICE_CALLBACK_MEMBER(vsync_tick); | |
| 108 | 109 | }; |
| 109 | 110 | |
| 110 | 111 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 57 | 57 | UINT32 screen_update_mz80k(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 58 | 58 | UINT32 screen_update_mz80kj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 59 | 59 | UINT32 screen_update_mz80a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 60 | TIMER_DEVICE_CALLBACK_MEMBER(ne555_tempo_callback); | |
| 60 | 61 | }; |
| 61 | 62 | |
| 62 | 63 |
| r18137 | r18138 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | // keyboard state |
| 68 | 68 | int m_keylatch; // key latch |
| 69 | TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); | |
| 69 | 70 | }; |
| 70 | 71 | |
| 71 | 72 | // ---------- defined in video/tmc600.c ---------- |
| r18137 | r18138 | |
|---|---|---|
| 89 | 89 | required_shared_ptr<UINT16> m_roll_overlay; |
| 90 | 90 | int m_blink; |
| 91 | 91 | UINT32 screen_update_cgc7900(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 92 | TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); | |
| 92 | 93 | }; |
| 93 | 94 | |
| 94 | 95 | /*----------- defined in video/cgc7900.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 63 | 63 | UINT64 m_timer; |
| 64 | 64 | virtual void palette_init(); |
| 65 | 65 | DECLARE_INPUT_CHANGED_MEMBER(ti68k_on_key); |
| 66 | TIMER_DEVICE_CALLBACK_MEMBER(ti68k_timer_callback); | |
| 66 | 67 | }; |
| 67 | 68 | |
| 68 | 69 | #endif // TI89_H_ |
| r18137 | r18138 | |
|---|---|---|
| 83 | 83 | int m_8n5; /* 5.25" / 8" drive select */ |
| 84 | 84 | int m_dsdd; /* double sided disk detect */ |
| 85 | 85 | TIMER_CALLBACK_MEMBER(bigboard_beepoff); |
| 86 | TIMER_DEVICE_CALLBACK_MEMBER(xerox820_keyboard_tick); | |
| 87 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 86 | 88 | }; |
| 87 | 89 | |
| 88 | 90 | class xerox820ii_state : public xerox820_state |
| r18137 | r18138 | |
|---|---|---|
| 124 | 124 | |
| 125 | 125 | // GPIB |
| 126 | 126 | int m_talk; |
| 127 | TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); | |
| 127 | 128 | }; |
| 128 | 129 | |
| 129 | 130 | class tek4052_state : public driver_device |
| r18137 | r18138 | |
|---|---|---|
| 58 | 58 | DECLARE_WRITE8_MEMBER(hrx_attr_w); |
| 59 | 59 | DECLARE_MACHINE_START(mtx512); |
| 60 | 60 | DECLARE_MACHINE_RESET(mtx512); |
| 61 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 62 | TIMER_DEVICE_CALLBACK_MEMBER(cassette_tick); | |
| 61 | 63 | }; |
| 62 | 64 | |
| 63 | 65 | /*----------- defined in machine/mtx.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 121 | 121 | int m_efx; |
| 122 | 122 | int m_video_on; |
| 123 | 123 | DECLARE_DRIVER_INIT(cosmicos); |
| 124 | TIMER_DEVICE_CALLBACK_MEMBER(digit_tick); | |
| 125 | TIMER_DEVICE_CALLBACK_MEMBER(int_tick); | |
| 124 | 126 | }; |
| 125 | 127 | |
| 126 | 128 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 190 | 190 | |
| 191 | 191 | DECLARE_PALETTE_INIT(tandy200); |
| 192 | 192 | |
| 193 | TIMER_DEVICE_CALLBACK_MEMBER(tandy200_tp_tick); | |
| 194 | ||
| 193 | 195 | void bankswitch(UINT8 data); |
| 194 | 196 | |
| 195 | 197 | /* memory state */ |
| r18137 | r18138 | |
|---|---|---|
| 98 | 98 | virtual void video_start(); |
| 99 | 99 | virtual void palette_init(); |
| 100 | 100 | UINT32 screen_update_pcw16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 101 | TIMER_DEVICE_CALLBACK_MEMBER(pcw16_timer_callback); | |
| 102 | TIMER_DEVICE_CALLBACK_MEMBER(pcw16_keyboard_timer_callback); | |
| 103 | TIMER_DEVICE_CALLBACK_MEMBER(rtc_timer_callback); | |
| 101 | 104 | }; |
| 102 | 105 | |
| 103 | 106 | #endif /* PCW16_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 46 | 46 | TIMER_CALLBACK_MEMBER(paddle_d7reset_callback); |
| 47 | 47 | TIMER_CALLBACK_MEMBER(paddle_irqreset_callback); |
| 48 | 48 | TIMER_CALLBACK_MEMBER(paddle_pulse_callback); |
| 49 | TIMER_DEVICE_CALLBACK_MEMBER(paddle_update_callback); | |
| 49 | 50 | }; |
| 50 | 51 | |
| 51 | 52 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 81 | 81 | DECLARE_VIDEO_START(mz800); |
| 82 | 82 | UINT32 screen_update_mz700(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 83 | 83 | UINT32 screen_update_mz800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 84 | TIMER_DEVICE_CALLBACK_MEMBER(ne556_cursor_callback); | |
| 85 | TIMER_DEVICE_CALLBACK_MEMBER(ne556_other_callback); | |
| 84 | 86 | }; |
| 85 | 87 | |
| 86 | 88 |
| r18137 | r18138 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | /* keyboard state */ |
| 81 | 81 | int m_keylatch; |
| 82 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 82 | 83 | }; |
| 83 | 84 | |
| 84 | 85 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 59 | 59 | INTERRUPT_GEN_MEMBER(svision_frame_int); |
| 60 | 60 | TIMER_CALLBACK_MEMBER(svision_pet_timer); |
| 61 | 61 | TIMER_CALLBACK_MEMBER(svision_timer); |
| 62 | TIMER_DEVICE_CALLBACK_MEMBER(svision_pet_timer_dev); | |
| 62 | 63 | }; |
| 63 | 64 | |
| 64 | 65 |
| r18137 | r18138 | |
|---|---|---|
| 31 | 31 | virtual void video_start(); |
| 32 | 32 | virtual void palette_init(); |
| 33 | 33 | UINT32 screen_update_busicom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 34 | TIMER_DEVICE_CALLBACK_MEMBER(timer_callback); | |
| 34 | 35 | }; |
| 35 | 36 | |
| 36 | 37 | #endif /* BUSICOM_H_ */ |
| r18137 | r18138 | |
|---|---|---|
| 126 | 126 | int m_wr0; |
| 127 | 127 | int m_wr1; |
| 128 | 128 | int m_track; |
| 129 | TIMER_DEVICE_CALLBACK_MEMBER(paddle_tick); | |
| 129 | 130 | }; |
| 130 | 131 | |
| 131 | 132 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 44 | 44 | DECLARE_VIDEO_START(mc8030); |
| 45 | 45 | UINT32 screen_update_mc8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 46 | 46 | UINT32 screen_update_mc8030(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 47 | TIMER_DEVICE_CALLBACK_MEMBER(mc8020_kbd); | |
| 47 | 48 | }; |
| 48 | 49 | |
| 49 | 50 |
| r18137 | r18138 | |
|---|---|---|
| 89 | 89 | int m_motor_on; |
| 90 | 90 | int m_motor0; |
| 91 | 91 | int m_motor1; |
| 92 | TIMER_DEVICE_CALLBACK_MEMBER(floppy_motor_off_tick); | |
| 92 | 93 | }; |
| 93 | 94 | |
| 94 | 95 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 265 | 265 | TIMER_CALLBACK_MEMBER(rsta_clear); |
| 266 | 266 | TIMER_CALLBACK_MEMBER(rstb_clear); |
| 267 | 267 | TIMER_CALLBACK_MEMBER(beep_stop); |
| 268 | TIMER_DEVICE_CALLBACK_MEMBER(blink_timer); | |
| 268 | 269 | }; |
| r18137 | r18138 | |
|---|---|---|
| 51 | 51 | // video state |
| 52 | 52 | required_shared_ptr<UINT8> m_video_ram; |
| 53 | 53 | const UINT8 *m_char_rom; |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(keyboard_tick); | |
| 54 | 55 | }; |
| 55 | 56 | |
| 56 | 57 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 93 | 93 | int m_winrdy; |
| 94 | 94 | int m_exrdy1; |
| 95 | 95 | int m_exrdy2; |
| 96 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 96 | 97 | }; |
| 97 | 98 | |
| 98 | 99 | class bulletf_state : public bullet_state |
| r18137 | r18138 | |
|---|---|---|
| 157 | 157 | required_shared_ptr<UINT8> m_video_ram; // video RAM |
| 158 | 158 | UINT8 *m_attr_ram; // attribute RAM |
| 159 | 159 | UINT8 m_attr; // attribute latch |
| 160 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_keyboard_tick); | |
| 161 | TIMER_DEVICE_CALLBACK_MEMBER(sasi_ack_tick); | |
| 162 | TIMER_DEVICE_CALLBACK_MEMBER(sasi_rst_tick); | |
| 163 | TIMER_DEVICE_CALLBACK_MEMBER(kb_8251_tick); | |
| 164 | TIMER_DEVICE_CALLBACK_MEMBER(sio_8251_tick); | |
| 160 | 165 | }; |
| 161 | 166 | |
| 162 | 167 | //----------- defined in video/v1050.c ----------- |
| r18137 | r18138 | |
|---|---|---|
| 110 | 110 | int m_de; |
| 111 | 111 | int m_rtc_int; |
| 112 | 112 | int m_enable_rtc_int; |
| 113 | TIMER_DEVICE_CALLBACK_MEMBER(trs80m2_keyboard_tick); | |
| 114 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 113 | 115 | }; |
| 114 | 116 | |
| 115 | 117 | class trs80m16_state : public trs80m2_state |
| r18137 | r18138 | |
|---|---|---|
| 80 | 80 | UINT8 *m_crt_ram; // CRT video RAM |
| 81 | 81 | |
| 82 | 82 | UINT8 m_key_latch; |
| 83 | TIMER_DEVICE_CALLBACK_MEMBER(pc8401a_keyboard_tick); | |
| 83 | 84 | }; |
| 84 | 85 | |
| 85 | 86 | class pc8500_state : public pc8401a_state |
| r18137 | r18138 | |
|---|---|---|
| 242 | 242 | DECLARE_MACHINE_START(laser128); |
| 243 | 243 | DECLARE_MACHINE_START(space84); |
| 244 | 244 | UINT32 screen_update_apple2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 245 | TIMER_DEVICE_CALLBACK_MEMBER(apple2_interrupt); | |
| 245 | 246 | }; |
| 246 | 247 | |
| 247 | 248 | |
| r18137 | r18138 | |
| 270 | 271 | DECLARE_READ8_HANDLER( apple2_c080_r ); |
| 271 | 272 | DECLARE_WRITE8_HANDLER( apple2_c080_w ); |
| 272 | 273 | |
| 273 | TIMER_DEVICE_CALLBACK( apple2_interrupt ); | |
| 274 | ||
| 275 | 274 | INT8 apple2_slotram_r(running_machine &machine, int slotnum, int offset); |
| 276 | 275 | |
| 277 | 276 | void apple2_setvar(running_machine &machine, UINT32 val, UINT32 mask); |
| r18137 | r18138 | |
|---|---|---|
| 77 | 77 | UINT8 m_s100; |
| 78 | 78 | UINT8 m_bank0; |
| 79 | 79 | UINT8 m_bank1; |
| 80 | TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); | |
| 80 | 81 | }; |
| 81 | 82 | |
| 82 | 83 | #endif |
| r18137 | r18138 | |
|---|---|---|
| 173 | 173 | TIMER_DEVICE_CALLBACK( blink_tick ) |
| 174 | 174 | -------------------------------------------------*/ |
| 175 | 175 | |
| 176 | ||
| 176 | TIMER_DEVICE_CALLBACK_MEMBER(cgc7900_state::blink_tick) | |
| 177 | 177 | { |
| 178 | cgc7900_state *state = timer.machine().driver_data<cgc7900_state>(); | |
| 179 | ||
| 180 | state->m_blink = !state->m_blink; | |
| 178 | m_blink = !m_blink; | |
| 181 | 179 | } |
| 182 | 180 | |
| 183 | 181 | /*------------------------------------------------- |
| r18137 | r18138 | |
| 244 | 242 | |
| 245 | 243 | MCFG_GFXDECODE(cgc7900) |
| 246 | 244 | |
| 247 | MCFG_TIMER_ADD_PERIODIC("blink", blink_tick, attotime::from_hz(XTAL_28_48MHz/7500000)) | |
| 245 | MCFG_TIMER_DRIVER_ADD_PERIODIC("blink", cgc7900_state, blink_tick, attotime::from_hz(XTAL_28_48MHz/7500000)) | |
| 248 | 246 | MACHINE_CONFIG_END |
| r18137 | r18138 | |
|---|---|---|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | |
| 319 | TIMER_DEVICE_CALLBACK( | |
| 319 | TIMER_DEVICE_CALLBACK_MEMBER(a7800_state::a7800_interrupt) | |
| 320 | 320 | { |
| 321 | a7800_state *state = timer.machine().driver_data<a7800_state>(); | |
| 322 | 321 | int frame_scanline; |
| 323 | UINT8 *ROM = timer.machine().root_device().memregion("maincpu")->base(); | |
| 324 | address_space& space = timer.machine().device("maincpu")->memory().space(AS_PROGRAM); | |
| 322 | UINT8 *ROM = machine().root_device().memregion("maincpu")->base(); | |
| 323 | address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM); | |
| 325 | 324 | |
| 326 | | |
| 325 | m_maria_scanline++; | |
| 327 | 326 | |
| 328 | 327 | /* why + 1? */ |
| 329 | frame_scanline = | |
| 328 | frame_scanline = m_maria_scanline % ( m_lines + 1 ); | |
| 330 | 329 | |
| 331 | 330 | if( frame_scanline == 1 ) |
| 332 | 331 | { |
| 333 | 332 | /*logerror( "frame beg\n" );*/ |
| 334 | 333 | } |
| 335 | 334 | |
| 336 | if( | |
| 335 | if( m_maria_wsync ) | |
| 337 | 336 | { |
| 338 | timer.machine().scheduler().trigger( TRIGGER_HSYNC ); | |
| 339 | state->m_maria_wsync = 0; | |
| 337 | machine().scheduler().trigger( TRIGGER_HSYNC ); | |
| 338 | m_maria_wsync = 0; | |
| 340 | 339 | } |
| 341 | 340 | |
| 342 | 341 | if( frame_scanline == 16 ) |
| 343 | 342 | { |
| 344 | 343 | /* end of vblank */ |
| 345 | 344 | |
| 346 | state->m_maria_vblank=0; | |
| 347 | if( state->m_maria_dmaon || state->m_maria_dodma ) | |
| 345 | m_maria_vblank=0; | |
| 346 | if( m_maria_dmaon || m_maria_dodma ) | |
| 348 | 347 | { |
| 349 | | |
| 348 | m_maria_dodma = 1; /* if dma allowed, start it */ | |
| 350 | 349 | |
| 351 | state->m_maria_dll = (ROM[DPPH] << 8) | ROM[DPPL]; | |
| 352 | state->m_maria_dl = (READ_MEM(state->m_maria_dll+1) << 8) | READ_MEM(state->m_maria_dll+2); | |
| 353 | state->m_maria_offset = READ_MEM(state->m_maria_dll) & 0x0f; | |
| 354 | state->m_maria_holey = (READ_MEM(state->m_maria_dll) & 0x60) >> 5; | |
| 355 | state->m_maria_dli = READ_MEM(state->m_maria_dll) & 0x80; | |
| 356 | /* logerror("DLL=%x\n",state->m_maria_dll); */ | |
| 357 | /* logerror("DLL: DL = %x dllctrl = %x\n",state->m_maria_dl,ROM[state->m_maria_dll]); */ | |
| 350 | m_maria_dll = (ROM[DPPH] << 8) | ROM[DPPL]; | |
| 351 | m_maria_dl = (READ_MEM(m_maria_dll+1) << 8) | READ_MEM(m_maria_dll+2); | |
| 352 | m_maria_offset = READ_MEM(m_maria_dll) & 0x0f; | |
| 353 | m_maria_holey = (READ_MEM(m_maria_dll) & 0x60) >> 5; | |
| 354 | m_maria_dli = READ_MEM(m_maria_dll) & 0x80; | |
| 355 | /* logerror("DLL=%x\n",m_maria_dll); */ | |
| 356 | /* logerror("DLL: DL = %x dllctrl = %x\n",m_maria_dl,ROM[m_maria_dll]); */ | |
| 358 | 357 | } |
| 359 | 358 | |
| 360 | 359 | /*logerror( "vblank end on line %d\n", frame_scanline );*/ |
| r18137 | r18138 | |
| 364 | 363 | this fix made PR Baseball happy |
| 365 | 364 | Kung-Fu Master looks worse |
| 366 | 365 | don't know about others yet */ |
| 367 | if( frame_scanline == ( | |
| 366 | if( frame_scanline == ( m_lines - 4 ) ) | |
| 368 | 367 | { |
| 369 | 368 | /* vblank starts 4 scanlines before end of screen */ |
| 370 | 369 | |
| 371 | | |
| 370 | m_maria_vblank = 0x80; | |
| 372 | 371 | |
| 373 | 372 | /* fixed 2002/05/14 kubecj |
| 374 | 373 | when going vblank, dma must be stopped |
| r18137 | r18138 | |
| 385 | 384 | Jinks |
| 386 | 385 | */ |
| 387 | 386 | |
| 388 | | |
| 387 | m_maria_dodma = 0; | |
| 389 | 388 | /*logerror( "vblank on line %d\n\n", frame_scanline );*/ |
| 390 | 389 | } |
| 391 | 390 | |
| 392 | 391 | |
| 393 | if( ( frame_scanline > 15 ) && | |
| 392 | if( ( frame_scanline > 15 ) && m_maria_dodma ) | |
| 394 | 393 | { |
| 395 | if (state->m_maria_scanline < ( state->m_lines - 4 ) ) | |
| 396 | maria_draw_scanline(timer.machine()); | |
| 394 | if (m_maria_scanline < ( m_lines - 4 ) ) | |
| 395 | maria_draw_scanline(machine()); | |
| 397 | 396 | |
| 398 | if( | |
| 397 | if( m_maria_offset == 0 ) | |
| 399 | 398 | { |
| 400 | state->m_maria_dll+=3; | |
| 401 | state->m_maria_dl = (READ_MEM(state->m_maria_dll+1) << 8) | READ_MEM(state->m_maria_dll+2); | |
| 402 | state->m_maria_offset = READ_MEM(state->m_maria_dll) & 0x0f; | |
| 403 | state->m_maria_holey = (READ_MEM(state->m_maria_dll) & 0x60) >> 5; | |
| 404 | state->m_maria_dli = READ_MEM(state->m_maria_dll) & 0x80; | |
| 399 | m_maria_dll+=3; | |
| 400 | m_maria_dl = (READ_MEM(m_maria_dll+1) << 8) | READ_MEM(m_maria_dll+2); | |
| 401 | m_maria_offset = READ_MEM(m_maria_dll) & 0x0f; | |
| 402 | m_maria_holey = (READ_MEM(m_maria_dll) & 0x60) >> 5; | |
| 403 | m_maria_dli = READ_MEM(m_maria_dll) & 0x80; | |
| 405 | 404 | } |
| 406 | 405 | else |
| 407 | 406 | { |
| 408 | | |
| 407 | m_maria_offset--; | |
| 409 | 408 | } |
| 410 | 409 | } |
| 411 | 410 | |
| 412 | if( | |
| 411 | if( m_maria_dli ) | |
| 413 | 412 | { |
| 414 | 413 | /*logerror( "dli on line %d [%02X] [%02X] [%02X]\n", frame_scanline, ROM[0x7E], ROM[0x7C], ROM[0x7D] );*/ |
| 415 | 414 | } |
| 416 | 415 | |
| 417 | if( | |
| 416 | if( m_maria_dli ) | |
| 418 | 417 | { |
| 419 | state->m_maria_dli = 0; | |
| 420 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 418 | m_maria_dli = 0; | |
| 419 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 421 | 420 | } |
| 422 | 421 | |
| 423 | 422 | } |
| r18137 | r18138 | |
|---|---|---|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | ||
| 46 | TIMER_DEVICE_CALLBACK_MEMBER(tmc600_state::blink_tick) | |
| 47 | 47 | { |
| 48 | tmc600_state *state = timer.machine().driver_data<tmc600_state>(); | |
| 49 | ||
| 50 | state->m_blink = !state->m_blink; | |
| 48 | m_blink = !m_blink; | |
| 51 | 49 | } |
| 52 | 50 | |
| 53 | 51 | UINT8 tmc600_state::get_color(UINT16 pma) |
| r18137 | r18138 | |
| 146 | 144 | MACHINE_CONFIG_FRAGMENT( tmc600_video ) |
| 147 | 145 | // video hardware |
| 148 | 146 | MCFG_CDP1869_SCREEN_PAL_ADD(CDP1869_TAG, SCREEN_TAG, CDP1869_DOT_CLK_PAL) |
| 149 | MCFG_TIMER_ADD_PERIODIC("blink", blink_tick, attotime::from_hz(2)) | |
| 147 | MCFG_TIMER_DRIVER_ADD_PERIODIC("blink", tmc600_state, blink_tick, attotime::from_hz(2)) | |
| 150 | 148 | MCFG_GFXDECODE(tmc600) |
| 151 | 149 | |
| 152 | 150 | // sound hardware |
| r18137 | r18138 | |
|---|---|---|
| 22 | 22 | #include "includes/psion.h" |
| 23 | 23 | #include "rendlay.h" |
| 24 | 24 | |
| 25 | ||
| 25 | TIMER_DEVICE_CALLBACK_MEMBER(psion_state::nmi_timer) | |
| 26 | 26 | { |
| 27 | psion_state *state = timer.machine().driver_data<psion_state>(); | |
| 28 | ||
| 29 | if (state->m_enable_nmi) | |
| 30 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 27 | if (m_enable_nmi) | |
| 28 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 31 | 29 | } |
| 32 | 30 | |
| 33 | 31 | UINT8 psion_state::kb_read(running_machine &machine) |
| r18137 | r18138 | |
| 492 | 490 | |
| 493 | 491 | MCFG_NVRAM_HANDLER(psion) |
| 494 | 492 | |
| 495 | MCFG_TIMER_ADD_PERIODIC("nmi_timer", nmi_timer, attotime::from_seconds(1)) | |
| 493 | MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", psion_state, nmi_timer, attotime::from_seconds(1)) | |
| 496 | 494 | |
| 497 | 495 | /* Datapack */ |
| 498 | 496 | MCFG_PSION_DATAPACK_ADD("pack1") |
| r18137 | r18138 | |
|---|---|---|
| 393 | 393 | // TIMER_DEVICE_CALLBACK( vsync_tick ) |
| 394 | 394 | //------------------------------------------------- |
| 395 | 395 | |
| 396 | ||
| 396 | TIMER_DEVICE_CALLBACK_MEMBER(vixen_state::vsync_tick) | |
| 397 | 397 | { |
| 398 | vixen_state *state = timer.machine().driver_data<vixen_state>(); | |
| 399 | ||
| 400 | if (state->m_cmd_d0) | |
| 398 | if (m_cmd_d0) | |
| 401 | 399 | { |
| 402 | state->m_vsync = 1; | |
| 403 | state->update_interrupt(); | |
| 400 | m_vsync = 1; | |
| 401 | update_interrupt(); | |
| 404 | 402 | } |
| 405 | 403 | } |
| 406 | 404 | |
| r18137 | r18138 | |
| 846 | 844 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 847 | 845 | MCFG_SCREEN_UPDATE_DRIVER(vixen_state, screen_update) |
| 848 | 846 | MCFG_SCREEN_RAW_PARAMS(XTAL_23_9616MHz/2, 96*8, 0*8, 81*8, 27*10, 0*10, 26*10) |
| 849 | MCFG_TIMER_ADD_SCANLINE("vsync", vsync_tick, SCREEN_TAG, 26*10, 27*10) | |
| 847 | MCFG_TIMER_DRIVER_ADD_SCANLINE("vsync", vixen_state, vsync_tick, SCREEN_TAG, 26*10, 27*10) | |
| 850 | 848 | |
| 851 | 849 | MCFG_PALETTE_LENGTH(2) |
| 852 | 850 | MCFG_PALETTE_INIT(monochrome_amber) |
| r18137 | r18138 | |
|---|---|---|
| 601 | 601 | MCFG_SOUND_ROUTE(1, "pce_r", 0.5) |
| 602 | 602 | #endif |
| 603 | 603 | |
| 604 | MCFG_TIMER_ADD_PERIODIC("keyboard_timer", x1_keyboard_callback, attotime::from_hz(250)) | |
| 605 | MCFG_TIMER_ADD_PERIODIC("cmt_wind_timer", x1_cmt_wind_timer, attotime::from_hz(16)) | |
| 604 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", x1twin_state, x1_keyboard_callback, attotime::from_hz(250)) | |
| 605 | MCFG_TIMER_DRIVER_ADD_PERIODIC("cmt_wind_timer", x1twin_state, x1_cmt_wind_timer, attotime::from_hz(16)) | |
| 606 | 606 | MACHINE_CONFIG_END |
| 607 | 607 | |
| 608 | 608 | ROM_START( x1twin ) |
| r18137 | r18138 | |
|---|---|---|
| 1287 | 1287 | DEVCB_DEVICE_LINE(CASSETTE_TAG, kc85_sod_w) /* SOD changed callback (I8085A only) */ |
| 1288 | 1288 | }; |
| 1289 | 1289 | |
| 1290 | ||
| 1290 | TIMER_DEVICE_CALLBACK_MEMBER(tandy200_state::tandy200_tp_tick) | |
| 1291 | 1291 | { |
| 1292 | | |
| 1292 | m_maincpu->set_input_line(I8085_RST75_LINE, m_tp); | |
| 1293 | 1293 | |
| 1294 | state->m_maincpu->set_input_line(I8085_RST75_LINE, state->m_tp); | |
| 1295 | ||
| 1296 | state->m_tp = !state->m_tp; | |
| 1294 | m_tp = !m_tp; | |
| 1297 | 1295 | } |
| 1298 | 1296 | |
| 1299 | 1297 | static MACHINE_CONFIG_START( kc85, kc85_state ) |
| r18137 | r18138 | |
| 1431 | 1429 | MCFG_FRAGMENT_ADD(tandy200_video) |
| 1432 | 1430 | |
| 1433 | 1431 | /* TP timer */ |
| 1434 | MCFG_TIMER_ADD_PERIODIC("tp", tandy200_tp_tick, attotime::from_hz(XTAL_4_9152MHz/2/8192)) | |
| 1432 | MCFG_TIMER_DRIVER_ADD_PERIODIC("tp", tandy200_state, tandy200_tp_tick, attotime::from_hz(XTAL_4_9152MHz/2/8192)) | |
| 1435 | 1433 | |
| 1436 | 1434 | /* sound hardware */ |
| 1437 | 1435 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 878 | 878 | MCFG_CPU_ADD("maincpu", type, clock) \ |
| 879 | 879 | MCFG_CPU_PROGRAM_MAP(mem##_map) \ |
| 880 | 880 | MCFG_CPU_IO_MAP(port##_io) \ |
| 881 | MCFG_TIMER_ADD_SCANLINE("scantimer", vblankfunc, "screen", 0, 1) \ | |
| 881 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, vblankfunc, "screen", 0, 1) \ | |
| 882 | 882 | MCFG_CPU_CONFIG(i86_address_mask) |
| 883 | 883 | |
| 884 | 884 |
| r18137 | r18138 | |
|---|---|---|
| 1148 | 1148 | MCFG_CPU_ADD("maincpu", Z80, XTAL_21_4772MHz/6) /* 3.579545 MHz */ |
| 1149 | 1149 | MCFG_CPU_PROGRAM_MAP(msx_memory_map) |
| 1150 | 1150 | MCFG_CPU_IO_MAP(msx2_io_map) |
| 1151 | MCFG_TIMER_ADD_SCANLINE("scantimer", msx2_interrupt, "screen", 0, 1) | |
| 1151 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", msx_state, msx2_interrupt, "screen", 0, 1) | |
| 1152 | 1152 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 1153 | 1153 | |
| 1154 | 1154 | MCFG_MACHINE_START_OVERRIDE(msx_state, msx2 ) |
| r18137 | r18138 | |
|---|---|---|
| 483 | 483 | |
| 484 | 484 | /* Z80-CTC Interface */ |
| 485 | 485 | |
| 486 | ||
| 486 | TIMER_DEVICE_CALLBACK_MEMBER(tiki100_state::ctc_tick) | |
| 487 | 487 | { |
| 488 | tiki100_state *state = timer.machine().driver_data<tiki100_state>(); | |
| 488 | m_ctc->trg0(1); | |
| 489 | m_ctc->trg0(0); | |
| 489 | 490 | |
| 490 | state->m_ctc->trg0(1); | |
| 491 | state->m_ctc->trg0(0); | |
| 492 | ||
| 493 | state->m_ctc->trg1(1); | |
| 494 | state->m_ctc->trg1(0); | |
| 491 | m_ctc->trg1(1); | |
| 492 | m_ctc->trg1(0); | |
| 495 | 493 | } |
| 496 | 494 | |
| 497 | 495 | WRITE_LINE_MEMBER( tiki100_state::ctc_z1_w ) |
| r18137 | r18138 | |
| 639 | 637 | MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_8MHz/4, dart_intf) |
| 640 | 638 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_8MHz/4, pio_intf) |
| 641 | 639 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/4, ctc_intf) |
| 642 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_8MHz/4)) | |
| 640 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", tiki100_state, ctc_tick, attotime::from_hz(XTAL_8MHz/4)) | |
| 643 | 641 | MCFG_FD1797_ADD(FD1797_TAG, fdc_intf) // FD1767PL-02 or FD1797-PL |
| 644 | 642 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(tiki100_floppy_interface) |
| 645 | 643 |
| r18137 | r18138 | |
|---|---|---|
| 140 | 140 | MCFG_SCREEN_ADD("screen", RASTER) |
| 141 | 141 | MCFG_SCREEN_RAW_PARAMS(XTAL_28_37516MHz/2, 908, 0, 320, 312, 0, 256) |
| 142 | 142 | MCFG_SCREEN_UPDATE_DRIVER(kc_state, screen_update) |
| 143 | MCFG_TIMER_ADD_SCANLINE("scantimer", kc_scanline, "screen", 0, 1) | |
| 143 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kc_state, kc_scanline, "screen", 0, 1) | |
| 144 | 144 | |
| 145 | 145 | MCFG_PALETTE_LENGTH(KC85_PALETTE_SIZE) |
| 146 | 146 | MCFG_PALETTE_INIT_OVERRIDE(kc_state, kc85 ) |
| r18137 | r18138 | |
| 192 | 192 | MCFG_SCREEN_ADD("screen", RASTER) |
| 193 | 193 | MCFG_SCREEN_RAW_PARAMS(XTAL_28_37516MHz/2, 908, 0, 320, 312, 0, 256) |
| 194 | 194 | MCFG_SCREEN_UPDATE_DRIVER(kc85_4_state, screen_update) |
| 195 | MCFG_TIMER_ADD_SCANLINE("scantimer", kc_scanline, "screen", 0, 1) | |
| 195 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kc85_4_state, kc_scanline, "screen", 0, 1) | |
| 196 | 196 | |
| 197 | 197 | MCFG_PALETTE_LENGTH(KC85_PALETTE_SIZE) |
| 198 | 198 | MCFG_PALETTE_INIT_OVERRIDE(kc85_4_state, kc85 ) |
| r18137 | r18138 | |
|---|---|---|
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | ||
| 216 | TIMER_DEVICE_CALLBACK_MEMBER(coleco_state::paddle_update_callback) | |
| 217 | 217 | { |
| 218 | 218 | // arbitrary timer for reading analog controls |
| 219 | coleco_s | |
| 219 | coleco_scan_paddles(machine(), &m_joy_analog_reload[0], &m_joy_analog_reload[1]); | |
| 220 | 220 | |
| 221 | coleco_scan_paddles(timer.machine(), &state->m_joy_analog_reload[0], &state->m_joy_analog_reload[1]); | |
| 222 | ||
| 223 | 221 | for (int port = 0; port < 2; port++) |
| 224 | 222 | { |
| 225 | if ( | |
| 223 | if (m_joy_analog_reload[port]) | |
| 226 | 224 | { |
| 227 | 225 | const int sensitivity = 500; |
| 228 | int ipt = | |
| 226 | int ipt = m_joy_analog_reload[port]; | |
| 229 | 227 | if (ipt & 0x80) ipt = 0x100 - ipt; |
| 230 | 228 | attotime freq = attotime::from_msec(sensitivity / ipt); |
| 231 | 229 | |
| 232 | 230 | // change pulse intervals relative to spinner/trackball speed |
| 233 | state->m_joy_pulse_reload[port] = freq; | |
| 234 | state->m_joy_pulse_timer[port]->adjust(min(freq, state->m_joy_pulse_timer[port]->remaining()), port); | |
| 231 | m_joy_pulse_reload[port] = freq; | |
| 232 | m_joy_pulse_timer[port]->adjust(min(freq, m_joy_pulse_timer[port]->remaining()), port); | |
| 235 | 233 | } |
| 236 | 234 | } |
| 237 | 235 | } |
| r18137 | r18138 | |
| 340 | 338 | /* software lists */ |
| 341 | 339 | MCFG_SOFTWARE_LIST_ADD("cart_list","coleco") |
| 342 | 340 | |
| 343 | MCFG_TIMER_ADD_PERIODIC("paddle_timer", paddle_update_callback, attotime::from_msec(20)) | |
| 341 | MCFG_TIMER_DRIVER_ADD_PERIODIC("paddle_timer", coleco_state, paddle_update_callback, attotime::from_msec(20)) | |
| 344 | 342 | MACHINE_CONFIG_END |
| 345 | 343 | |
| 346 | 344 | static MACHINE_CONFIG_START( czz50, coleco_state ) |
| r18137 | r18138 | |
| 370 | 368 | /* software lists */ |
| 371 | 369 | MCFG_SOFTWARE_LIST_ADD("cart_list","coleco") |
| 372 | 370 | |
| 373 | MCFG_TIMER_ADD_PERIODIC("paddle_timer", paddle_update_callback, attotime::from_msec(20)) | |
| 371 | MCFG_TIMER_DRIVER_ADD_PERIODIC("paddle_timer", coleco_state, paddle_update_callback, attotime::from_msec(20)) | |
| 374 | 372 | MACHINE_CONFIG_END |
| 375 | 373 | |
| 376 | 374 | static MACHINE_CONFIG_DERIVED( dina, czz50 ) |
| r18137 | r18138 | |
|---|---|---|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | ||
| 50 | TIMER_DEVICE_CALLBACK_MEMBER(amu880_state::keyboard_tick) | |
| 51 | 51 | { |
| 52 | amu880_state *state = timer.machine().driver_data<amu880_state>(); | |
| 53 | ||
| 54 | state->scan_keyboard(); | |
| 52 | scan_keyboard(); | |
| 55 | 53 | } |
| 56 | 54 | |
| 57 | 55 | /* Read/Write Handlers */ |
| r18137 | r18138 | |
| 388 | 386 | MCFG_CPU_IO_MAP(amu880_io) |
| 389 | 387 | MCFG_CPU_CONFIG(amu880_daisy_chain) |
| 390 | 388 | |
| 391 | MCFG_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, attotime::from_hz(1500)) | |
| 389 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", amu880_state, keyboard_tick, attotime::from_hz(1500)) | |
| 392 | 390 | |
| 393 | 391 | /* video hardware */ |
| 394 | 392 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | ||
| 112 | TIMER_DEVICE_CALLBACK_MEMBER(trs80m2_state::trs80m2_keyboard_tick) | |
| 113 | 113 | { |
| 114 | trs80m2_state *state = timer.machine().driver_data<trs80m2_state>(); | |
| 115 | ||
| 116 | state->scan_keyboard(); | |
| 114 | scan_keyboard(); | |
| 117 | 115 | } |
| 118 | 116 | |
| 119 | 117 | |
| r18137 | r18138 | |
| 833 | 831 | // Z80CTC_INTERFACE( ctc_intf ) |
| 834 | 832 | //------------------------------------------------- |
| 835 | 833 | |
| 836 | ||
| 834 | TIMER_DEVICE_CALLBACK_MEMBER(trs80m2_state::ctc_tick) | |
| 837 | 835 | { |
| 838 | trs80m2_state *state = timer.machine().driver_data<trs80m2_state>(); | |
| 836 | m_ctc->trg0(1); | |
| 837 | m_ctc->trg0(0); | |
| 839 | 838 | |
| 840 | state->m_ctc->trg0(1); | |
| 841 | state->m_ctc->trg0(0); | |
| 839 | m_ctc->trg1(1); | |
| 840 | m_ctc->trg1(0); | |
| 842 | 841 | |
| 843 | state->m_ctc->trg1(1); | |
| 844 | state->m_ctc->trg1(0); | |
| 845 | ||
| 846 | state->m_ctc->trg2(1); | |
| 847 | state->m_ctc->trg2(0); | |
| 842 | m_ctc->trg2(1); | |
| 843 | m_ctc->trg2(0); | |
| 848 | 844 | } |
| 849 | 845 | |
| 850 | 846 | static Z80CTC_INTERFACE( ctc_intf ) |
| r18137 | r18138 | |
| 1016 | 1012 | // devices |
| 1017 | 1013 | MCFG_FD1791_ADD(FD1791_TAG, fdc_intf) |
| 1018 | 1014 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/2, ctc_intf) |
| 1019 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_8MHz/2/2)) | |
| 1015 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", trs80m2_state, ctc_tick, attotime::from_hz(XTAL_8MHz/2/2)) | |
| 1020 | 1016 | MCFG_Z80DMA_ADD(Z80DMA_TAG, XTAL_8MHz/2, dma_intf) |
| 1021 | 1017 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_8MHz/2, pio_intf) |
| 1022 | 1018 | MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_8MHz/2, sio_intf) |
| r18137 | r18138 | |
| 1024 | 1020 | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, trs80m2_floppy_interface) |
| 1025 | 1021 | MCFG_TRS80M2_KEYBOARD_ADD(kb_intf) |
| 1026 | 1022 | |
| 1027 | MCFG_TIMER_ADD_PERIODIC("keyboard", trs80m2_keyboard_tick,attotime::from_hz(60)) | |
| 1023 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", trs80m2_state, trs80m2_keyboard_tick, attotime::from_hz(60)) | |
| 1028 | 1024 | |
| 1029 | 1025 | // internal RAM |
| 1030 | 1026 | MCFG_RAM_ADD(RAM_TAG) |
| r18137 | r18138 | |
| 1067 | 1063 | // devices |
| 1068 | 1064 | MCFG_FD1791_ADD(FD1791_TAG, fdc_intf) |
| 1069 | 1065 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/2, ctc_intf) |
| 1070 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_8MHz/2/2)) | |
| 1066 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", trs80m2_state, ctc_tick, attotime::from_hz(XTAL_8MHz/2/2)) | |
| 1071 | 1067 | MCFG_Z80DMA_ADD(Z80DMA_TAG, XTAL_8MHz/2, dma_intf) |
| 1072 | 1068 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_8MHz/2, pio_intf) |
| 1073 | 1069 | MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_8MHz/2, sio_intf) |
| r18137 | r18138 | |
| 1076 | 1072 | MCFG_PIC8259_ADD(AM9519A_TAG, pic_intf) |
| 1077 | 1073 | MCFG_TRS80M2_KEYBOARD_ADD(kb_intf) |
| 1078 | 1074 | |
| 1079 | MCFG_TIMER_ADD_PERIODIC("keyboard", trs80m2_keyboard_tick,attotime::from_hz(60)) | |
| 1075 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", trs80m2_state, trs80m2_keyboard_tick, attotime::from_hz(60)) | |
| 1080 | 1076 | |
| 1081 | 1077 | // internal RAM |
| 1082 | 1078 | MCFG_RAM_ADD(RAM_TAG) |
| r18137 | r18138 | |
|---|---|---|
| 319 | 319 | // TIMER_DEVICE_CALLBACK( kbclk_tick ) |
| 320 | 320 | //------------------------------------------------- |
| 321 | 321 | |
| 322 | ||
| 322 | TIMER_DEVICE_CALLBACK_MEMBER(mm1_state::kbclk_tick) | |
| 323 | 323 | { |
| 324 | mm1_state *state = timer.machine().driver_data<mm1_state>(); | |
| 325 | ||
| 326 | state->scan_keyboard(); | |
| 324 | scan_keyboard(); | |
| 327 | 325 | } |
| 328 | 326 | |
| 329 | 327 | |
| r18137 | r18138 | |
| 787 | 785 | MCFG_CPU_PROGRAM_MAP(mm1_map) |
| 788 | 786 | MCFG_CPU_CONFIG(i8085_intf) |
| 789 | 787 | |
| 790 | MCFG_TIMER_ADD_PERIODIC("kbclk", kbclk_tick, attotime::from_hz(2500 | |
| 788 | MCFG_TIMER_DRIVER_ADD_PERIODIC("kbclk", mm1_state, kbclk_tick, attotime::from_hz(2500)) | |
| 791 | 789 | |
| 792 | 790 | // sound hardware |
| 793 | 791 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 807 | 807 | logerror("CMT: Command 0xe9-0x%02x received.\n",cmd); |
| 808 | 808 | } |
| 809 | 809 | |
| 810 | TIMER_DEVICE_CALLBACK( | |
| 810 | TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_cmt_wind_timer) | |
| 811 | 811 | { |
| 812 | x1_state *state = timer.machine().driver_data<x1_state>(); | |
| 813 | ||
| 814 | if(state->m_cass->get_image() == NULL) //avoid a crash if a disk game tries to access this | |
| 812 | if(m_cass->get_image() == NULL) //avoid a crash if a disk game tries to access this | |
| 815 | 813 | return; |
| 816 | 814 | |
| 817 | switch( | |
| 815 | switch(m_cmt_current_cmd) | |
| 818 | 816 | { |
| 819 | 817 | case 0x03: |
| 820 | 818 | case 0x05: // Fast Forwarding tape |
| 821 | state->m_cass->seek(1,SEEK_CUR); | |
| 822 | if(state->m_cass->get_position() >= state->m_cass->get_length()) // at end? | |
| 823 | cmt_command(timer.machine(),0x01); // Stop tape | |
| 819 | m_cass->seek(1,SEEK_CUR); | |
| 820 | if(m_cass->get_position() >= m_cass->get_length()) // at end? | |
| 821 | cmt_command(machine(),0x01); // Stop tape | |
| 824 | 822 | break; |
| 825 | 823 | case 0x04: |
| 826 | 824 | case 0x06: // Rewinding tape |
| 827 | state->m_cass->seek(-1,SEEK_CUR); | |
| 828 | if(state->m_cass->get_position() <= 0) // at beginning? | |
| 829 | cmt_command(timer.machine(),0x01); // Stop tape | |
| 825 | m_cass->seek(-1,SEEK_CUR); | |
| 826 | if(m_cass->get_position() <= 0) // at beginning? | |
| 827 | cmt_command(machine(),0x01); // Stop tape | |
| 830 | 828 | break; |
| 831 | 829 | } |
| 832 | 830 | } |
| r18137 | r18138 | |
| 2401 | 2399 | } |
| 2402 | 2400 | #endif |
| 2403 | 2401 | |
| 2404 | TIMER_DEVICE_CALLBACK(x1_keyboard_callback) | |
| 2402 | TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback) | |
| 2405 | 2403 | { |
| 2406 | x1_state *state = timer.machine().driver_data<x1_state>(); | |
| 2407 | address_space &space = timer.machine().device("x1_cpu")->memory().space(AS_PROGRAM); | |
| 2408 | UINT32 key1 = timer.machine().root_device().ioport("key1")->read(); | |
| 2409 | UINT32 key2 = timer.machine().root_device().ioport("key2")->read(); | |
| 2410 | UINT32 key3 = timer.machine().root_device().ioport("key3")->read(); | |
| 2411 | UINT32 key4 = timer.machine().root_device().ioport("tenkey")->read(); | |
| 2412 | UINT32 f_key = timer.machine().root_device().ioport("f_keys")->read(); | |
| 2404 | address_space &space = machine().device("x1_cpu")->memory().space(AS_PROGRAM); | |
| 2405 | UINT32 key1 = machine().root_device().ioport("key1")->read(); | |
| 2406 | UINT32 key2 = machine().root_device().ioport("key2")->read(); | |
| 2407 | UINT32 key3 = machine().root_device().ioport("key3")->read(); | |
| 2408 | UINT32 key4 = machine().root_device().ioport("tenkey")->read(); | |
| 2409 | UINT32 f_key = machine().root_device().ioport("f_keys")->read(); | |
| 2413 | 2410 | |
| 2414 | if( | |
| 2411 | if(m_key_irq_vector) | |
| 2415 | 2412 | { |
| 2416 | 2413 | //if(key1 == 0 && key2 == 0 && key3 == 0 && key4 == 0 && f_key == 0) |
| 2417 | 2414 | // return; |
| 2418 | 2415 | |
| 2419 | if((key1 != | |
| 2416 | if((key1 != m_old_key1) || (key2 != m_old_key2) || (key3 != m_old_key3) || (key4 != m_old_key4) || (f_key != m_old_fkey)) | |
| 2420 | 2417 | { |
| 2421 | 2418 | // generate keyboard IRQ |
| 2422 | state->x1_sub_io_w(space,0,0xe6); | |
| 2423 | state->m_irq_vector = state->m_key_irq_vector; | |
| 2424 | state->m_key_irq_flag = 1; | |
| 2425 | timer.machine().device("x1_cpu")->execute().set_input_line(0,ASSERT_LINE); | |
| 2426 | state->m_old_key1 = key1; | |
| 2427 | state->m_old_key2 = key2; | |
| 2428 | state->m_old_key3 = key3; | |
| 2429 | state->m_old_key4 = key4; | |
| 2430 | state->m_old_fkey = f_key; | |
| 2419 | x1_sub_io_w(space,0,0xe6); | |
| 2420 | m_irq_vector = m_key_irq_vector; | |
| 2421 | m_key_irq_flag = 1; | |
| 2422 | machine().device("x1_cpu")->execute().set_input_line(0,ASSERT_LINE); | |
| 2423 | m_old_key1 = key1; | |
| 2424 | m_old_key2 = key2; | |
| 2425 | m_old_key3 = key3; | |
| 2426 | m_old_key4 = key4; | |
| 2427 | m_old_fkey = f_key; | |
| 2431 | 2428 | } |
| 2432 | 2429 | } |
| 2433 | 2430 | } |
| r18137 | r18138 | |
| 2620 | 2617 | MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(x1_floppy_interface) |
| 2621 | 2618 | MCFG_SOFTWARE_LIST_ADD("flop_list","x1_flop") |
| 2622 | 2619 | |
| 2623 | MCFG_TIMER_ADD_PERIODIC("keyboard_timer", x1_keyboard_callback, attotime::from_hz(250)) | |
| 2624 | MCFG_TIMER_ADD_PERIODIC("cmt_wind_timer", x1_cmt_wind_timer, attotime::from_hz(16)) | |
| 2620 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", x1_state, x1_keyboard_callback, attotime::from_hz(250)) | |
| 2621 | MCFG_TIMER_DRIVER_ADD_PERIODIC("cmt_wind_timer", x1_state, x1_cmt_wind_timer, attotime::from_hz(16)) | |
| 2625 | 2622 | MACHINE_CONFIG_END |
| 2626 | 2623 | |
| 2627 | 2624 | static MACHINE_CONFIG_DERIVED( x1turbo, x1 ) |
| r18137 | r18138 | |
|---|---|---|
| 210 | 210 | Z80CTC_INTERFACE( ctc_intf ) |
| 211 | 211 | -------------------------------------------------*/ |
| 212 | 212 | |
| 213 | ||
| 213 | TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::ctc_tick) | |
| 214 | 214 | { |
| 215 | mtx_state *state = timer.machine().driver_data<mtx_state>(); | |
| 216 | ||
| 217 | state->m_z80ctc->trg1(1); | |
| 218 | state->m_z80ctc->trg1(0); | |
| 219 | state->m_z80ctc->trg2(1); | |
| 220 | state->m_z80ctc->trg2(0); | |
| 215 | m_z80ctc->trg1(1); | |
| 216 | m_z80ctc->trg1(0); | |
| 217 | m_z80ctc->trg2(1); | |
| 218 | m_z80ctc->trg2(0); | |
| 221 | 219 | } |
| 222 | 220 | |
| 223 | 221 | static WRITE_LINE_DEVICE_HANDLER( ctc_trg1_w ) |
| r18137 | r18138 | |
| 302 | 300 | cassette_interface mtx_cassette_interface |
| 303 | 301 | -------------------------------------------------*/ |
| 304 | 302 | |
| 305 | ||
| 303 | TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::cassette_tick) | |
| 306 | 304 | { |
| 307 | mtx_state *state = timer.machine().driver_data<mtx_state>(); | |
| 308 | int data = ((state->m_cassette)->input() > +0.0) ? 0 : 1; | |
| 305 | int data = ((m_cassette)->input() > +0.0) ? 0 : 1; | |
| 309 | 306 | |
| 310 | | |
| 307 | m_z80ctc->trg3(data); | |
| 311 | 308 | } |
| 312 | 309 | |
| 313 | 310 | static const cassette_interface mtx_cassette_interface = |
| r18137 | r18138 | |
| 368 | 365 | |
| 369 | 366 | /* devices */ |
| 370 | 367 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_4MHz, ctc_intf ) |
| 371 | MCFG_TIMER_ADD_PERIODIC("z80ctc_timer", ctc_tick, attotime::from_hz(XTAL_4MHz/13)) | |
| 368 | MCFG_TIMER_DRIVER_ADD_PERIODIC("z80ctc_timer", mtx_state, ctc_tick, attotime::from_hz(XTAL_4MHz/13)) | |
| 372 | 369 | MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics) |
| 373 | 370 | MCFG_SNAPSHOT_ADD("snapshot", mtx, "mtb", 0.5) |
| 374 | 371 | MCFG_CASSETTE_ADD(CASSETTE_TAG, mtx_cassette_interface) |
| 375 | MCFG_TIMER_ADD_PERIODIC("cassette_timer", cassette_tick, attotime::from_hz(44100)) | |
| 372 | MCFG_TIMER_DRIVER_ADD_PERIODIC("cassette_timer", mtx_state, cassette_tick, attotime::from_hz(44100)) | |
| 376 | 373 | |
| 377 | 374 | /* internal ram */ |
| 378 | 375 | MCFG_RAM_ADD(RAM_TAG) |
| r18137 | r18138 | |
|---|---|---|
| 644 | 644 | /* basic machine hardware */ |
| 645 | 645 | MCFG_CPU_ADD("maincpu", M6502, 1021800) /* close to actual CPU frequency of 1.020484 MHz */ |
| 646 | 646 | MCFG_CPU_PROGRAM_MAP(apple2_map) |
| 647 | MCFG_TIMER_ADD_SCANLINE("scantimer", apple2_interrupt, "screen", 0, 1) | |
| 647 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", apple2_state, apple2_interrupt, "screen", 0, 1) | |
| 648 | 648 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 649 | 649 | |
| 650 | 650 | MCFG_MACHINE_START_OVERRIDE(apple2_state, apple2 ) |
| r18137 | r18138 | |
|---|---|---|
| 349 | 349 | // Z80CTC_INTERFACE( ctc_intf ) |
| 350 | 350 | //------------------------------------------------- |
| 351 | 351 | |
| 352 | ||
| 352 | TIMER_DEVICE_CALLBACK_MEMBER(super6_state::ctc_tick) | |
| 353 | 353 | { |
| 354 | super6_state *state = timer.machine().driver_data<super6_state>(); | |
| 355 | ||
| 356 | state->m_ctc->trg0(1); | |
| 357 | state->m_ctc->trg0(0); | |
| 354 | m_ctc->trg0(1); | |
| 355 | m_ctc->trg0(0); | |
| 358 | 356 | } |
| 359 | 357 | |
| 360 | 358 | static Z80CTC_INTERFACE( ctc_intf ) |
| r18137 | r18138 | |
| 570 | 568 | |
| 571 | 569 | // devices |
| 572 | 570 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_24MHz/4, ctc_intf) |
| 573 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_24MHz/16)) | |
| 571 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", super6_state, ctc_tick, attotime::from_hz(XTAL_24MHz/16)) | |
| 574 | 572 | MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_24MHz/4, dart_intf) |
| 575 | 573 | MCFG_Z80DMA_ADD(Z80DMA_TAG, XTAL_24MHz/6, dma_intf) |
| 576 | 574 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_24MHz/4, pio_intf) |
| r18137 | r18138 | |
|---|---|---|
| 730 | 730 | } |
| 731 | 731 | } |
| 732 | 732 | |
| 733 | ||
| 733 | TIMER_DEVICE_CALLBACK_MEMBER(newbrain_state::cop_regint_tick) | |
| 734 | 734 | { |
| 735 | newbrain_state *state = timer.machine().driver_data<newbrain_state>(); | |
| 736 | ||
| 737 | if (state->m_copregint) | |
| 735 | if (m_copregint) | |
| 738 | 736 | { |
| 739 | 737 | logerror("COP REGINT\n"); |
| 740 | state->m_copint = 0; | |
| 741 | state->check_interrupt(); | |
| 738 | m_copint = 0; | |
| 739 | check_interrupt(); | |
| 742 | 740 | } |
| 743 | 741 | } |
| 744 | 742 | |
| r18137 | r18138 | |
| 1226 | 1224 | DEVCB_DRIVER_LINE_MEMBER(newbrain_eim_state, ctc_z2_w) /* ZC/TO2 callback */ |
| 1227 | 1225 | }; |
| 1228 | 1226 | |
| 1229 | ||
| 1227 | TIMER_DEVICE_CALLBACK_MEMBER(newbrain_eim_state::ctc_c2_tick) | |
| 1230 | 1228 | { |
| 1231 | newbrain_eim_state *state = timer.machine().driver_data<newbrain_eim_state>(); | |
| 1232 | ||
| 1233 | state->m_ctc->trg2(1); | |
| 1234 | state->m_ctc->trg2(0); | |
| 1229 | m_ctc->trg2(1); | |
| 1230 | m_ctc->trg2(0); | |
| 1235 | 1231 | } |
| 1236 | 1232 | |
| 1237 | 1233 | inline int newbrain_state::get_reset_t() |
| r18137 | r18138 | |
| 1388 | 1384 | |
| 1389 | 1385 | MCFG_GFXDECODE(newbrain) |
| 1390 | 1386 | |
| 1391 | MCFG_TIMER_ADD_PERIODIC("cop_regint", cop_regint_tick, attotime::from_usec(12500)) | |
| 1387 | MCFG_TIMER_DRIVER_ADD_PERIODIC("cop_regint", newbrain_state, cop_regint_tick, attotime::from_usec(12500)) | |
| 1392 | 1388 | |
| 1393 | 1389 | // video hardware |
| 1394 | 1390 | MCFG_FRAGMENT_ADD(newbrain_video) |
| r18137 | r18138 | |
| 1430 | 1426 | |
| 1431 | 1427 | // devices |
| 1432 | 1428 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_16MHz/8, newbrain_ctc_intf) |
| 1433 | MCFG_TIMER_ADD_PERIODIC("z80ctc_c2", ctc_c2_tick, attotime::from_hz(XTAL_16MHz/4/13)) | |
| 1429 | MCFG_TIMER_DRIVER_ADD_PERIODIC("z80ctc_c2", newbrain_eim_state, ctc_c2_tick, attotime::from_hz(XTAL_16MHz/4/13)) | |
| 1434 | 1430 | MCFG_ADC0808_ADD(ADC0809_TAG, 500000, adc_intf) |
| 1435 | 1431 | MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf) |
| 1436 | 1432 | MCFG_UPD765A_ADD(UPD765_TAG, fdc_intf) |
| r18137 | r18138 | |
|---|---|---|
| 91 | 91 | m_motor_on = 0; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | ||
| 94 | TIMER_DEVICE_CALLBACK_MEMBER(bw12_state::floppy_motor_off_tick) | |
| 95 | 95 | { |
| 96 | bw12_state *state = timer.machine().driver_data<bw12_state>(); | |
| 97 | ||
| 98 | state->floppy_motor_off(); | |
| 96 | floppy_motor_off(); | |
| 99 | 97 | } |
| 100 | 98 | |
| 101 | 99 | void bw12_state::set_floppy_motor_off_timer() |
| r18137 | r18138 | |
| 789 | 787 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 790 | 788 | |
| 791 | 789 | /* devices */ |
| 792 | MCFG_TIMER_ADD(FLOPPY_TIMER_TAG, floppy_motor_off_tick) | |
| 790 | MCFG_TIMER_DRIVER_ADD(FLOPPY_TIMER_TAG, bw12_state, floppy_motor_off_tick) | |
| 793 | 791 | MCFG_UPD765A_ADD(UPD765_TAG, fdc_intf) |
| 794 | 792 | MCFG_PIA6821_ADD(PIA6821_TAG, pia_intf) |
| 795 | 793 | MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_16MHz/4, sio_intf) |
| r18137 | r18138 | |
|---|---|---|
| 272 | 272 | m_keydata = keydata; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | ||
| 275 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::v1050_keyboard_tick) | |
| 276 | 276 | { |
| 277 | v1050_state *state = timer.machine().driver_data<v1050_state>(); | |
| 278 | ||
| 279 | state->scan_keyboard(); | |
| 277 | scan_keyboard(); | |
| 280 | 278 | } |
| 281 | 279 | |
| 282 | 280 | READ8_MEMBER( v1050_state::kb_data_r ) |
| r18137 | r18138 | |
| 374 | 372 | return data; |
| 375 | 373 | } |
| 376 | 374 | |
| 377 | ||
| 375 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::sasi_ack_tick) | |
| 378 | 376 | { |
| 379 | v1050_state *state = timer.machine().driver_data<v1050_state>(); | |
| 380 | ||
| 381 | state->m_sasibus->scsi_ack_w(1); | |
| 377 | m_sasibus->scsi_ack_w(1); | |
| 382 | 378 | } |
| 383 | 379 | |
| 384 | ||
| 380 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::sasi_rst_tick) | |
| 385 | 381 | { |
| 386 | v1050_state *state = timer.machine().driver_data<v1050_state>(); | |
| 387 | ||
| 388 | state->m_sasibus->scsi_rst_w(1); | |
| 382 | m_sasibus->scsi_rst_w(1); | |
| 389 | 383 | } |
| 390 | 384 | |
| 391 | 385 | WRITE8_MEMBER( v1050_state::sasi_ctrl_w ) |
| r18137 | r18138 | |
| 867 | 861 | |
| 868 | 862 | // Keyboard 8251A Interface |
| 869 | 863 | |
| 870 | ||
| 864 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::kb_8251_tick) | |
| 871 | 865 | { |
| 872 | v1050_state *state = timer.machine().driver_data<v1050_state>(); | |
| 873 | ||
| 874 | state->m_uart_kb->transmit_clock(); | |
| 875 | state->m_uart_kb->receive_clock(); | |
| 866 | m_uart_kb->transmit_clock(); | |
| 867 | m_uart_kb->receive_clock(); | |
| 876 | 868 | } |
| 877 | 869 | |
| 878 | 870 | WRITE_LINE_MEMBER( v1050_state::kb_rxrdy_w ) |
| r18137 | r18138 | |
| 895 | 887 | |
| 896 | 888 | // Serial 8251A Interface |
| 897 | 889 | |
| 898 | ||
| 890 | TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::sio_8251_tick) | |
| 899 | 891 | { |
| 900 | v1050_state *state = timer.machine().driver_data<v1050_state>(); | |
| 901 | ||
| 902 | state->m_uart_sio->transmit_clock(); | |
| 903 | state->m_uart_sio->receive_clock(); | |
| 892 | m_uart_sio->transmit_clock(); | |
| 893 | m_uart_sio->receive_clock(); | |
| 904 | 894 | } |
| 905 | 895 | |
| 906 | 896 | WRITE_LINE_MEMBER( v1050_state::sio_rxrdy_w ) |
| r18137 | r18138 | |
| 1090 | 1080 | MCFG_QUANTUM_PERFECT_CPU(M6502_TAG) |
| 1091 | 1081 | |
| 1092 | 1082 | // keyboard HACK |
| 1093 | MCFG_TIMER_ADD_PERIODIC("keyboard", v1050_keyboard_tick, attotime::from_hz(60)) | |
| 1083 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", v1050_state, v1050_keyboard_tick, attotime::from_hz(60)) | |
| 1094 | 1084 | |
| 1095 | 1085 | // video hardware |
| 1096 | 1086 | MCFG_FRAGMENT_ADD(v1050_video) |
| r18137 | r18138 | |
| 1106 | 1096 | MCFG_I8251_ADD(I8251A_SIO_TAG, /*XTAL_16MHz/8,*/ sio_8251_intf) |
| 1107 | 1097 | MCFG_MB8877_ADD(MB8877_TAG, /*XTAL_16MHz/16,*/ fdc_intf ) |
| 1108 | 1098 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(v1050_floppy_interface) |
| 1109 | MCFG_TIMER_ADD_PERIODIC(TIMER_KB_TAG, kb_8251_tick, attotime::from_hz((double)XTAL_16MHz/4/13/8)) | |
| 1110 | MCFG_TIMER_ADD(TIMER_SIO_TAG, sio_8251_tick) | |
| 1099 | MCFG_TIMER_DRIVER_ADD_PERIODIC(TIMER_KB_TAG, v1050_state, kb_8251_tick, attotime::from_hz((double)XTAL_16MHz/4/13/8)) | |
| 1100 | MCFG_TIMER_DRIVER_ADD(TIMER_SIO_TAG, v1050_state, sio_8251_tick) | |
| 1111 | 1101 | |
| 1112 | 1102 | // SASI bus |
| 1113 | 1103 | MCFG_SCSIBUS_ADD(SASIBUS_TAG) |
| 1114 | 1104 | MCFG_SCSIDEV_ADD(SASIBUS_TAG ":harddisk0", S1410, SCSI_ID_0) |
| 1115 | 1105 | MCFG_SCSICB_ADD(SASIBUS_TAG ":host", sasi_intf) |
| 1116 | 1106 | |
| 1117 | MCFG_TIMER_ADD(TIMER_ACK_TAG, sasi_ack_tick) | |
| 1118 | MCFG_TIMER_ADD(TIMER_RST_TAG, sasi_rst_tick) | |
| 1107 | MCFG_TIMER_DRIVER_ADD(TIMER_ACK_TAG, v1050_state, sasi_ack_tick) | |
| 1108 | MCFG_TIMER_DRIVER_ADD(TIMER_RST_TAG, v1050_state, sasi_rst_tick) | |
| 1119 | 1109 | |
| 1120 | 1110 | // keyboard |
| 1121 | 1111 | MCFG_V1050_KEYBOARD_ADD() |
| r18137 | r18138 | |
|---|---|---|
| 188 | 188 | einstein->m_keyboard_data = data; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | ||
| 191 | TIMER_DEVICE_CALLBACK_MEMBER(einstein_state::einstein_keyboard_timer_callback) | |
| 192 | 192 | { |
| 193 | einstein_state *einstein = timer.machine().driver_data<einstein_state>(); | |
| 194 | ||
| 195 | 193 | /* re-scan keyboard */ |
| 196 | einstein_scan_keyboard( | |
| 194 | einstein_scan_keyboard(machine()); | |
| 197 | 195 | |
| 198 | 196 | /* if /fire1 or /fire2 is 0, signal a fire interrupt */ |
| 199 | if (( | |
| 197 | if ((machine().root_device().ioport("BUTTONS")->read() & 0x03) != 0) | |
| 200 | 198 | { |
| 201 | | |
| 199 | m_interrupt |= EINSTEIN_FIRE_INT; | |
| 202 | 200 | } |
| 203 | 201 | |
| 204 | 202 | /* keyboard data changed? */ |
| 205 | if ( | |
| 203 | if (m_keyboard_data != 0xff) | |
| 206 | 204 | { |
| 207 | 205 | /* generate interrupt */ |
| 208 | | |
| 206 | m_interrupt |= EINSTEIN_KEY_INT; | |
| 209 | 207 | } |
| 210 | 208 | } |
| 211 | 209 | |
| r18137 | r18138 | |
| 271 | 269 | ***************************************************************************/ |
| 272 | 270 | |
| 273 | 271 | /* channel 0 and 1 have a 2 MHz input clock for triggering */ |
| 274 | ||
| 272 | TIMER_DEVICE_CALLBACK_MEMBER(einstein_state::einstein_ctc_trigger_callback) | |
| 275 | 273 | { |
| 276 | einstein_state *einstein = timer.machine().driver_data<einstein_state>(); | |
| 277 | ||
| 278 | 274 | /* toggle line status */ |
| 279 | | |
| 275 | m_ctc_trigger ^= 1; | |
| 280 | 276 | |
| 281 | einstein->m_ctc->trg0(einstein->m_ctc_trigger); | |
| 282 | einstein->m_ctc->trg1(einstein->m_ctc_trigger); | |
| 277 | m_ctc->trg0(m_ctc_trigger); | |
| 278 | m_ctc->trg1(m_ctc_trigger); | |
| 283 | 279 | } |
| 284 | 280 | |
| 285 | 281 | |
| r18137 | r18138 | |
| 777 | 773 | |
| 778 | 774 | /* this is actually clocked at the system clock 4 MHz, but this would be too fast for our |
| 779 | 775 | driver. So we update at 50Hz and hope this is good enough. */ |
| 780 | MCFG_TIMER_ADD_PERIODIC("keyboard", einstein_keyboard_timer_callback, attotime::from_hz(50)) | |
| 776 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", einstein_state, einstein_keyboard_timer_callback, attotime::from_hz(50)) | |
| 781 | 777 | |
| 782 | 778 | MCFG_Z80PIO_ADD(IC_I063, XTAL_X002 / 2, einstein_pio_intf) |
| 783 | 779 | |
| 784 | 780 | MCFG_Z80CTC_ADD(IC_I058, XTAL_X002 / 2, einstein_ctc_intf) |
| 785 | 781 | /* the input to channel 0 and 1 of the ctc is a 2 MHz clock */ |
| 786 | MCFG_TIMER_ADD_PERIODIC("ctc", einstein_ctc_trigger_callback, attotime::from_hz(XTAL_X002 /4)) | |
| 782 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", einstein_state, einstein_ctc_trigger_callback, attotime::from_hz(XTAL_X002 /4)) | |
| 787 | 783 | |
| 788 | 784 | /* Einstein daisy chain support for non-Z80 devices */ |
| 789 | 785 | MCFG_DEVICE_ADD("keyboard_daisy", EINSTEIN_KEYBOARD_DAISY, 0) |
| r18137 | r18138 | |
|---|---|---|
| 253 | 253 | /* basic machine hardware */ |
| 254 | 254 | MCFG_CPU_ADD("maincpu", M6502, A7800_NTSC_Y1/8) /* 1.79 MHz (switches to 1.19 MHz on TIA or RIOT access) */ |
| 255 | 255 | MCFG_CPU_PROGRAM_MAP(a7800_mem) |
| 256 | MCFG_TIMER_ADD_SCANLINE("scantimer", a7800_interrupt, "screen", 0, 1) | |
| 256 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", a7800_state, a7800_interrupt, "screen", 0, 1) | |
| 257 | 257 | |
| 258 | 258 | |
| 259 | 259 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 409 | 409 | #define MC1000_NE555_FREQ (368) /* Hz */ |
| 410 | 410 | #define MC1000_NE555_DUTY_CYCLE (99.745) /* % */ |
| 411 | 411 | |
| 412 | ||
| 412 | TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick) | |
| 413 | 413 | { |
| 414 | mc1000_state *state = timer.machine().driver_data<mc1000_state>(); | |
| 415 | ||
| 416 | 414 | // (m_ne555_int not needed anymore and can be done with?) |
| 417 | | |
| 415 | m_ne555_int = param; | |
| 418 | 416 | |
| 419 | | |
| 417 | m_maincpu->set_input_line(INPUT_LINE_IRQ0, param); | |
| 420 | 418 | } |
| 421 | 419 | |
| 422 | 420 | static const cassette_interface mc1000_cassette_interface = |
| r18137 | r18138 | |
| 444 | 442 | MCFG_CPU_IO_MAP(mc1000_io) |
| 445 | 443 | |
| 446 | 444 | /* timers */ |
| 447 | MCFG_TIMER_ADD_PERIODIC("ne555clear", ne555_tick, attotime::from_hz(MC1000_NE555_FREQ)) | |
| 445 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ne555clear", mc1000_state, ne555_tick, attotime::from_hz(MC1000_NE555_FREQ)) | |
| 448 | 446 | MCFG_TIMER_PARAM(CLEAR_LINE) |
| 449 | 447 | |
| 450 | MCFG_TIMER_ADD_PERIODIC("ne555assert", ne555_tick, attotime::from_hz(MC1000_NE555_FREQ)) | |
| 448 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ne555assert", mc1000_state, ne555_tick, attotime::from_hz(MC1000_NE555_FREQ)) | |
| 451 | 449 | MCFG_TIMER_START_DELAY(attotime::from_hz(MC1000_NE555_FREQ * 100 / MC1000_NE555_DUTY_CYCLE)) |
| 452 | 450 | MCFG_TIMER_PARAM(ASSERT_LINE) |
| 453 | 451 |
| r18137 | r18138 | |
|---|---|---|
| 241 | 241 | MCFG_CPU_ADD("maincpu", type, clock) \ |
| 242 | 242 | MCFG_CPU_PROGRAM_MAP(mem##_map) \ |
| 243 | 243 | MCFG_CPU_IO_MAP(port##_io) \ |
| 244 | MCFG_TIMER_ADD_SCANLINE("scantimer", vblankfunc, "screen", 0, 1) \ | |
| 244 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, vblankfunc, "screen", 0, 1) \ | |
| 245 | 245 | MCFG_CPU_CONFIG(i86_address_mask) |
| 246 | 246 | |
| 247 | 247 | |
| r18137 | r18138 | |
| 334 | 334 | MCFG_CPU_ADD("maincpu", V30, 8000000) |
| 335 | 335 | MCFG_CPU_PROGRAM_MAP(ppc512_map) |
| 336 | 336 | MCFG_CPU_IO_MAP(ppc512_io) |
| 337 | MCFG_TIMER_ADD_SCANLINE("scantimer", pc_frame_interrupt, "screen", 0, 1) | |
| 337 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, pc_frame_interrupt, "screen", 0, 1) | |
| 338 | 338 | |
| 339 | 339 | MCFG_MACHINE_START_OVERRIDE(pc_state,pc) |
| 340 | 340 | MCFG_MACHINE_RESET_OVERRIDE(pc_state,pc) |
| r18137 | r18138 | |
|---|---|---|
| 592 | 592 | cassette_interface atom_cassette_interface |
| 593 | 593 | -------------------------------------------------*/ |
| 594 | 594 | |
| 595 | ||
| 595 | TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick) | |
| 596 | 596 | { |
| 597 | | |
| 597 | int level = !(!(!m_hz2400 && m_pc1) && m_pc0); | |
| 598 | 598 | |
| 599 | | |
| 599 | m_cassette->output(level ? -1.0 : +1.0); | |
| 600 | 600 | |
| 601 | state->m_cassette->output(level ? -1.0 : +1.0); | |
| 602 | ||
| 603 | state->m_hz2400 = !state->m_hz2400; | |
| 601 | m_hz2400 = !m_hz2400; | |
| 604 | 602 | } |
| 605 | 603 | |
| 606 | 604 | static const cassette_interface atom_cassette_interface = |
| r18137 | r18138 | |
| 784 | 782 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 785 | 783 | |
| 786 | 784 | /* devices */ |
| 787 | MCFG_TIMER_ADD_PERIODIC("hz2400", cassette_output_tick, attotime::from_hz(4806)) | |
| 785 | MCFG_TIMER_DRIVER_ADD_PERIODIC("hz2400", atom_state, cassette_output_tick, attotime::from_hz(4806)) | |
| 788 | 786 | MCFG_VIA6522_ADD(R6522_TAG, X2/4, via_intf) |
| 789 | 787 | MCFG_I8255_ADD(INS8255_TAG, ppi_intf) |
| 790 | 788 | MCFG_I8271_ADD(I8271_TAG, fdc_intf) |
| r18137 | r18138 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | /* Z80-PIO Interface */ |
| 110 | 110 | |
| 111 | ||
| 111 | TIMER_DEVICE_CALLBACK_MEMBER(vcs80_state::vcs80_keyboard_tick) | |
| 112 | 112 | { |
| 113 | vcs80_state *state = timer.machine().driver_data<vcs80_state>(); | |
| 114 | ||
| 115 | if (state->m_keyclk) | |
| 113 | if (m_keyclk) | |
| 116 | 114 | { |
| 117 | state->m_keylatch++; | |
| 118 | state->m_keylatch &= 7; | |
| 115 | m_keylatch++; | |
| 116 | m_keylatch &= 7; | |
| 119 | 117 | } |
| 120 | 118 | |
| 121 | | |
| 119 | m_pio->port_a_write(m_keyclk << 7); | |
| 122 | 120 | |
| 123 | | |
| 121 | m_keyclk = !m_keyclk; | |
| 124 | 122 | } |
| 125 | 123 | |
| 126 | 124 | READ8_MEMBER( vcs80_state::pio_pa_r ) |
| r18137 | r18138 | |
| 223 | 221 | MCFG_CPU_CONFIG(vcs80_daisy_chain) |
| 224 | 222 | |
| 225 | 223 | /* keyboard timer */ |
| 226 | MCFG_TIMER_ADD_PERIODIC("keyboard", vcs80_keyboard_tick, attotime::from_hz(1000)) | |
| 224 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", vcs80_state, vcs80_keyboard_tick, attotime::from_hz(1000)) | |
| 227 | 225 | |
| 228 | 226 | /* video hardware */ |
| 229 | 227 | MCFG_DEFAULT_LAYOUT( layout_vcs80 ) |
| r18137 | r18138 | |
|---|---|---|
| 98 | 98 | // TIMER_DEVICE_CALLBACK( keyboard_tick ) |
| 99 | 99 | //------------------------------------------------- |
| 100 | 100 | |
| 101 | ||
| 101 | TIMER_DEVICE_CALLBACK_MEMBER(tek4051_state::keyboard_tick) | |
| 102 | 102 | { |
| 103 | tek4051_state *state = timer.machine().driver_data<tek4051_state>(); | |
| 104 | ||
| 105 | state->scan_keyboard(); | |
| 103 | scan_keyboard(); | |
| 106 | 104 | } |
| 107 | 105 | |
| 108 | 106 | |
| r18137 | r18138 | |
| 1230 | 1228 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1231 | 1229 | |
| 1232 | 1230 | // devices |
| 1233 | MCFG_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, attotime::from_hz(XTAL_12_5MHz/15/4)) | |
| 1231 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", tek4051_state, keyboard_tick, attotime::from_hz(XTAL_12_5MHz/15/4)) | |
| 1234 | 1232 | MCFG_PIA6821_ADD(MC6820_X_TAG, x_pia_intf) |
| 1235 | 1233 | MCFG_PIA6821_ADD(MC6820_Y_TAG, y_pia_intf) |
| 1236 | 1234 | MCFG_PIA6821_ADD(MC6820_KB_TAG, kb_pia_intf) |
| r18137 | r18138 | |
|---|---|---|
| 235 | 235 | /* basic machine hardware */ |
| 236 | 236 | MCFG_CPU_ADD("maincpu", G65816, APPLE2GS_14M/5) |
| 237 | 237 | MCFG_CPU_PROGRAM_MAP(apple2gs_map) |
| 238 | MCFG_TIMER_ADD_SCANLINE("scantimer", apple2_interrupt, "screen", 0, 1) | |
| 238 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", apple2gs_state, apple2_interrupt, "screen", 0, 1) | |
| 239 | 239 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 240 | 240 | |
| 241 | 241 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 364 | 364 | // TIMER_DEVICE_CALLBACK( set_irq ) |
| 365 | 365 | //------------------------------------------------- |
| 366 | 366 | |
| 367 | ||
| 367 | TIMER_DEVICE_CALLBACK_MEMBER(ace_state::set_irq) | |
| 368 | 368 | { |
| 369 | | |
| 369 | machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); | |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | |
| r18137 | r18138 | |
| 374 | 374 | // TIMER_DEVICE_CALLBACK( clear_irq ) |
| 375 | 375 | //------------------------------------------------- |
| 376 | 376 | |
| 377 | ||
| 377 | TIMER_DEVICE_CALLBACK_MEMBER(ace_state::clear_irq) | |
| 378 | 378 | { |
| 379 | | |
| 379 | machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | |
| r18137 | r18138 | |
| 630 | 630 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 631 | 631 | MCFG_SCREEN_UPDATE_DRIVER(ace_state, screen_update) |
| 632 | 632 | MCFG_SCREEN_RAW_PARAMS(XTAL_6_5MHz, 416, 0, 336, 312, 0, 304) |
| 633 | MCFG_TIMER_ADD_SCANLINE("set_irq", set_irq, SCREEN_TAG, 31*8, 264) | |
| 634 | MCFG_TIMER_ADD_SCANLINE("clear_irq", clear_irq, SCREEN_TAG, 32*8, 264) | |
| 633 | MCFG_TIMER_DRIVER_ADD_SCANLINE("set_irq", ace_state, set_irq, SCREEN_TAG, 31*8, 264) | |
| 634 | MCFG_TIMER_DRIVER_ADD_SCANLINE("clear_irq", ace_state, clear_irq, SCREEN_TAG, 32*8, 264) | |
| 635 | 635 | |
| 636 | 636 | MCFG_PALETTE_LENGTH(2) |
| 637 | 637 | MCFG_PALETTE_INIT(black_and_white) |
| r18137 | r18138 | |
|---|---|---|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | ||
| 53 | TIMER_DEVICE_CALLBACK_MEMBER(svision_state::svision_pet_timer_dev) | |
| 54 | 54 | { |
| 55 | svision_state *state = timer.machine().driver_data<svision_state>(); | |
| 56 | state->svision_pet_timer(ptr,param); | |
| 55 | svision_pet_timer(ptr,param); | |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 | void svision_irq(running_machine &machine) |
| r18137 | r18138 | |
| 544 | 543 | MACHINE_CONFIG_END |
| 545 | 544 | |
| 546 | 545 | static MACHINE_CONFIG_DERIVED( svisions, svision ) |
| 547 | MCFG_TIMER_ADD_PERIODIC("pet_timer", svision_pet_timer_dev, attotime::from_seconds(8) | |
| 546 | MCFG_TIMER_DRIVER_ADD_PERIODIC("pet_timer", svision_state, svision_pet_timer_dev, attotime::from_seconds(8)) | |
| 548 | 547 | MACHINE_CONFIG_END |
| 549 | 548 | |
| 550 | 549 | static MACHINE_CONFIG_DERIVED( svisionp, svision ) |
| r18137 | r18138 | |
|---|---|---|
| 269 | 269 | NULL |
| 270 | 270 | }; |
| 271 | 271 | |
| 272 | ||
| 272 | TIMER_DEVICE_CALLBACK_MEMBER(mz80_state::ne555_tempo_callback) | |
| 273 | 273 | { |
| 274 | mz80_state *state = timer.machine().driver_data<mz80_state>(); | |
| 275 | state->m_mz80k_tempo_strobe ^= 1; | |
| 274 | m_mz80k_tempo_strobe ^= 1; | |
| 276 | 275 | } |
| 277 | 276 | |
| 278 | 277 | static MACHINE_CONFIG_START( mz80k, mz80_state ) |
| r18137 | r18138 | |
| 304 | 303 | /* Devices */ |
| 305 | 304 | MCFG_I8255_ADD( "ppi8255", mz80k_8255_int ) |
| 306 | 305 | MCFG_PIT8253_ADD( "pit8253", mz80k_pit8253_config ) |
| 307 | MCFG_TIMER_ADD_PERIODIC("tempo", ne555_tempo_callback, attotime::from_hz(34)) | |
| 306 | MCFG_TIMER_DRIVER_ADD_PERIODIC("tempo", mz80_state, ne555_tempo_callback, attotime::from_hz(34)) | |
| 308 | 307 | MCFG_CASSETTE_ADD( CASSETTE_TAG, mz80k_cassette_interface ) |
| 309 | 308 | MACHINE_CONFIG_END |
| 310 | 309 |
| r18137 | r18138 | |
|---|---|---|
| 178 | 178 | INPUT_PORTS_END |
| 179 | 179 | |
| 180 | 180 | |
| 181 | ||
| 181 | TIMER_DEVICE_CALLBACK_MEMBER(busicom_state::timer_callback) | |
| 182 | 182 | { |
| 183 | busicom_state *state = timer.machine().driver_data<busicom_state>(); | |
| 184 | state->m_timer ^=1; | |
| 185 | if (state->m_timer==1) state->m_drum_index++; | |
| 186 | if (state->m_drum_index==13) state->m_drum_index=0; | |
| 187 | i4004_set_test(timer.machine().device("maincpu"),state->m_timer); | |
| 183 | m_timer ^=1; | |
| 184 | if (m_timer==1) m_drum_index++; | |
| 185 | if (m_drum_index==13) m_drum_index=0; | |
| 186 | i4004_set_test(machine().device("maincpu"),m_timer); | |
| 188 | 187 | |
| 189 | 188 | } |
| 190 | 189 | |
| r18137 | r18138 | |
| 229 | 228 | MCFG_PALETTE_LENGTH(16) |
| 230 | 229 | |
| 231 | 230 | |
| 232 | MCFG_TIMER_ADD_PERIODIC("busicom_timer", timer_callback, attotime::from_msec(28*2)) | |
| 231 | MCFG_TIMER_DRIVER_ADD_PERIODIC("busicom_timer", busicom_state, timer_callback, attotime::from_msec(28*2)) | |
| 233 | 232 | MACHINE_CONFIG_END |
| 234 | 233 | |
| 235 | 234 | /* ROM definition */ |
| r18137 | r18138 | |
|---|---|---|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /* callback for 1/300ths of a second interrupt */ |
| 172 | ||
| 172 | TIMER_DEVICE_CALLBACK_MEMBER(pcw_state::pcw_timer_interrupt) | |
| 173 | 173 | { |
| 174 | pcw_state *state = timer.machine().driver_data<pcw_state>(); | |
| 175 | pcw_update_interrupt_counter(state); | |
| 174 | pcw_update_interrupt_counter(this); | |
| 176 | 175 | |
| 177 | state->m_timer_irq_flag = 1; | |
| 178 | pcw_update_irqs(timer.machine()); | |
| 179 | timer.machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(pcw_state::pcw_timer_pulse),state)); | |
| 176 | m_timer_irq_flag = 1; | |
| 177 | pcw_update_irqs(machine()); | |
| 178 | machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(pcw_state::pcw_timer_pulse),this)); | |
| 180 | 179 | } |
| 181 | 180 | |
| 182 | 181 | /* fdc interrupt callback. set/clear fdc int */ |
| r18137 | r18138 | |
| 1347 | 1346 | MCFG_RAM_ADD(RAM_TAG) |
| 1348 | 1347 | MCFG_RAM_DEFAULT_SIZE("256K") |
| 1349 | 1348 | |
| 1350 | MCFG_TIMER_ADD_PERIODIC("pcw_timer", pcw_timer_interrupt, attotime::from_hz(300)) | |
| 1349 | MCFG_TIMER_DRIVER_ADD_PERIODIC("pcw_timer", pcw_state, pcw_timer_interrupt, attotime::from_hz(300)) | |
| 1351 | 1350 | MACHINE_CONFIG_END |
| 1352 | 1351 | |
| 1353 | 1352 | static MACHINE_CONFIG_DERIVED( pcw8256, pcw ) |
| r18137 | r18138 | |
|---|---|---|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | |
| 155 | ||
| 155 | TIMER_DEVICE_CALLBACK_MEMBER(ti68k_state::ti68k_timer_callback) | |
| 156 | 156 | { |
| 157 | | |
| 157 | m_timer++; | |
| 158 | 158 | |
| 159 | state->m_timer++; | |
| 160 | ||
| 161 | if (state->m_timer_on) | |
| 159 | if (m_timer_on) | |
| 162 | 160 | { |
| 163 | if (!( | |
| 161 | if (!(m_timer & m_timer_mask) && BIT(m_io_hw1[0x0a], 3)) | |
| 164 | 162 | { |
| 165 | if (state->m_timer_val) | |
| 166 | state->m_timer_val++; | |
| 163 | if (m_timer_val) | |
| 164 | m_timer_val++; | |
| 167 | 165 | else |
| 168 | | |
| 166 | m_timer_val = (m_io_hw1[0x0b]) & 0xff; | |
| 169 | 167 | } |
| 170 | 168 | |
| 171 | if (!BIT( | |
| 169 | if (!BIT(m_io_hw1[0x0a], 7) && ((m_hw_version == m_HW1) || (!BIT(m_io_hw1[0x0f], 2) && !BIT(m_io_hw1[0x0f], 1)))) | |
| 172 | 170 | { |
| 173 | if (!(state->m_timer & 0x003f)) | |
| 174 | state->m_maincpu->set_input_line(M68K_IRQ_1, HOLD_LINE); | |
| 171 | if (!(m_timer & 0x003f)) | |
| 172 | m_maincpu->set_input_line(M68K_IRQ_1, HOLD_LINE); | |
| 175 | 173 | |
| 176 | if (!(state->m_timer & 0x3fff) && !BIT(state->m_io_hw1[0x0a], 3)) | |
| 177 | state->m_maincpu->set_input_line(M68K_IRQ_3, HOLD_LINE); | |
| 174 | if (!(m_timer & 0x3fff) && !BIT(m_io_hw1[0x0a], 3)) | |
| 175 | m_maincpu->set_input_line(M68K_IRQ_3, HOLD_LINE); | |
| 178 | 176 | |
| 179 | if (!(state->m_timer & state->m_timer_mask) && BIT(state->m_io_hw1[0x0a], 3) && state->m_timer_val == 0) | |
| 180 | state->m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE); | |
| 177 | if (!(m_timer & m_timer_mask) && BIT(m_io_hw1[0x0a], 3) && m_timer_val == 0) | |
| 178 | m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE); | |
| 181 | 179 | } |
| 182 | 180 | } |
| 183 | 181 | |
| 184 | if (state->keypad_r(timer.machine()) != 0xff) | |
| 185 | state->m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); | |
| 182 | if (keypad_r(machine()) != 0xff) | |
| 183 | m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); | |
| 186 | 184 | } |
| 187 | 185 | |
| 188 | 186 | |
| r18137 | r18138 | |
| 526 | 524 | |
| 527 | 525 | MCFG_SHARP_UNK128MBIT_ADD("flash") //should be LH28F320 for ti89t and v200 and LH28F160S3T for other models |
| 528 | 526 | |
| 529 | MCFG_TIMER_ADD_PERIODIC("ti68k_timer", ti68k_timer_callback, attotime::from_hz(1<<14)) | |
| 527 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ti68k_timer", ti68k_state, ti68k_timer_callback, attotime::from_hz(1<<14)) | |
| 530 | 528 | MACHINE_CONFIG_END |
| 531 | 529 | |
| 532 | 530 |
| r18137 | r18138 | |
|---|---|---|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | |
| 137 | ||
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(pcw16_state::pcw16_timer_callback) | |
| 138 | 138 | { |
| 139 | pcw16_state *state = timer.machine().driver_data<pcw16_state>(); | |
| 140 | 139 | /* do not increment past 15 */ |
| 141 | if ( | |
| 140 | if (m_interrupt_counter!=15) | |
| 142 | 141 | { |
| 143 | | |
| 142 | m_interrupt_counter++; | |
| 144 | 143 | /* display int */ |
| 145 | | |
| 144 | m_system_status |= (1<<0); | |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | if ( | |
| 147 | if (m_interrupt_counter!=0) | |
| 149 | 148 | { |
| 150 | | |
| 149 | pcw16_refresh_ints(); | |
| 151 | 150 | } |
| 152 | 151 | } |
| 153 | 152 | |
| r18137 | r18138 | |
| 878 | 877 | } |
| 879 | 878 | |
| 880 | 879 | |
| 881 | ||
| 880 | TIMER_DEVICE_CALLBACK_MEMBER(pcw16_state::pcw16_keyboard_timer_callback) | |
| 882 | 881 | { |
| 883 | pcw16_state *state = timer.machine().driver_data<pcw16_state>(); | |
| 884 | 882 | at_keyboard_polling(); |
| 885 | if ( | |
| 883 | if (pcw16_keyboard_can_transmit()) | |
| 886 | 884 | { |
| 887 | 885 | int data; |
| 888 | 886 | |
| r18137 | r18138 | |
| 895 | 893 | // pcw16_dump_cpu_ram(); |
| 896 | 894 | // } |
| 897 | 895 | |
| 898 | | |
| 896 | pcw16_keyboard_signal_byte_received(data); | |
| 899 | 897 | } |
| 900 | 898 | } |
| 901 | 899 | // TODO: fix |
| 902 | s | |
| 900 | subdevice<ns16550_device>("ns16550_2")->ri_w((machine().root_device().ioport("EXTRA")->read() & 0x040) ? 0 : 1); | |
| 903 | 901 | } |
| 904 | 902 | |
| 905 | 903 | |
| r18137 | r18138 | |
| 938 | 936 | } |
| 939 | 937 | } |
| 940 | 938 | |
| 941 | ||
| 939 | TIMER_DEVICE_CALLBACK_MEMBER(pcw16_state::rtc_timer_callback) | |
| 942 | 940 | { |
| 943 | pcw16_state *state = timer.machine().driver_data<pcw16_state>(); | |
| 944 | 941 | int fraction_of_second; |
| 945 | 942 | |
| 946 | 943 | /* halt counter? */ |
| 947 | if (( | |
| 944 | if ((m_rtc_control & 0x01)!=0) | |
| 948 | 945 | { |
| 949 | 946 | /* no */ |
| 950 | 947 | |
| 951 | 948 | /* increment 256th's of a second register */ |
| 952 | fraction_of_second = | |
| 949 | fraction_of_second = m_rtc_256ths_seconds+1; | |
| 953 | 950 | /* add bit 8 = overflow */ |
| 954 | | |
| 951 | m_rtc_seconds+=(fraction_of_second>>8); | |
| 955 | 952 | /* ensure counter is in range 0-255 */ |
| 956 | | |
| 953 | m_rtc_256ths_seconds = fraction_of_second & 0x0ff; | |
| 957 | 954 | } |
| 958 | 955 | |
| 959 | if ( | |
| 956 | if (m_rtc_seconds>59) | |
| 960 | 957 | { |
| 961 | | |
| 958 | m_rtc_seconds = 0; | |
| 962 | 959 | |
| 963 | | |
| 960 | m_rtc_minutes++; | |
| 964 | 961 | |
| 965 | if ( | |
| 962 | if (m_rtc_minutes>59) | |
| 966 | 963 | { |
| 967 | | |
| 964 | m_rtc_minutes = 0; | |
| 968 | 965 | |
| 969 | | |
| 966 | m_rtc_hours++; | |
| 970 | 967 | |
| 971 | if ( | |
| 968 | if (m_rtc_hours>23) | |
| 972 | 969 | { |
| 973 | | |
| 970 | m_rtc_hours = 0; | |
| 974 | 971 | |
| 975 | | |
| 972 | m_rtc_days++; | |
| 976 | 973 | |
| 977 | if ( | |
| 974 | if (m_rtc_days > m_rtc_days_max) | |
| 978 | 975 | { |
| 979 | | |
| 976 | m_rtc_days = 1; | |
| 980 | 977 | |
| 981 | | |
| 978 | m_rtc_months++; | |
| 982 | 979 | |
| 983 | if ( | |
| 980 | if (m_rtc_months>12) | |
| 984 | 981 | { |
| 985 | | |
| 982 | m_rtc_months = 1; | |
| 986 | 983 | |
| 987 | 984 | /* 7 bit year counter */ |
| 988 | | |
| 985 | m_rtc_years = (m_rtc_years + 1) & 0x07f; | |
| 989 | 986 | |
| 990 | 987 | } |
| 991 | 988 | |
| 992 | | |
| 989 | rtc_setup_max_days(); | |
| 993 | 990 | } |
| 994 | 991 | |
| 995 | 992 | } |
| r18137 | r18138 | |
| 1512 | 1509 | MCFG_INTEL_E28F008SA_ADD("flash1") |
| 1513 | 1510 | |
| 1514 | 1511 | /* video ints */ |
| 1515 | MCFG_TIMER_ADD_PERIODIC("video_timer", pcw16_timer_callback, attotime::from_usec(5830)) | |
| 1512 | MCFG_TIMER_DRIVER_ADD_PERIODIC("video_timer", pcw16_state, pcw16_timer_callback, attotime::from_usec(5830)) | |
| 1516 | 1513 | /* rtc timer */ |
| 1517 | MCFG_TIMER_ADD_PERIODIC("rtc_timer", rtc_timer_callback, attotime::from_hz(256)) | |
| 1514 | MCFG_TIMER_DRIVER_ADD_PERIODIC("rtc_timer", pcw16_state, rtc_timer_callback, attotime::from_hz(256)) | |
| 1518 | 1515 | /* keyboard timer */ |
| 1519 | MCFG_TIMER_ADD_PERIODIC("keyboard_timer", pcw16_keyboard_timer_callback, attotime::from_hz(50)) | |
| 1516 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", pcw16_state, pcw16_keyboard_timer_callback, attotime::from_hz(50)) | |
| 1520 | 1517 | MACHINE_CONFIG_END |
| 1521 | 1518 | |
| 1522 | 1519 | /*************************************************************************** |
| r18137 | r18138 | |
|---|---|---|
| 492 | 492 | |
| 493 | 493 | |
| 494 | 494 | |
| 495 | ||
| 495 | TIMER_DEVICE_CALLBACK_MEMBER(nc_state::dummy_timer_callback) | |
| 496 | 496 | { |
| 497 | nc_state *state = timer.machine().driver_data<nc_state>(); | |
| 498 | 497 | int inputport_10_state; |
| 499 | 498 | int changed_bits; |
| 500 | 499 | |
| 501 | inputport_10_state = | |
| 500 | inputport_10_state = machine().root_device().ioport("EXTRA")->read(); | |
| 502 | 501 | |
| 503 | changed_bits = inputport_10_state^ | |
| 502 | changed_bits = inputport_10_state^m_previous_inputport_10_state; | |
| 504 | 503 | |
| 505 | 504 | /* on/off button changed state? */ |
| 506 | 505 | if (changed_bits & 0x01) |
| r18137 | r18138 | |
| 509 | 508 | { |
| 510 | 509 | /* on NC100 on/off button causes a nmi, on |
| 511 | 510 | nc200 on/off button causes an int */ |
| 512 | switch ( | |
| 511 | switch (m_type) | |
| 513 | 512 | { |
| 514 | 513 | case NC_TYPE_1xx: |
| 515 | 514 | { |
| 516 | 515 | LOG(("nmi triggered\n")); |
| 517 | | |
| 516 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 518 | 517 | } |
| 519 | 518 | break; |
| 520 | 519 | |
| 521 | 520 | case NC_TYPE_200: |
| 522 | 521 | { |
| 523 | state->m_irq_status |= (1 << 4); | |
| 524 | nc_update_interrupts(timer.machine()); | |
| 522 | m_irq_status |= (1 << 4); | |
| 523 | nc_update_interrupts(machine()); | |
| 525 | 524 | } |
| 526 | 525 | break; |
| 527 | 526 | } |
| r18137 | r18138 | |
| 532 | 531 | if (changed_bits & 0x02) |
| 533 | 532 | { |
| 534 | 533 | /* yes refresh memory config */ |
| 535 | nc_refresh_memory_config( | |
| 534 | nc_refresh_memory_config(machine()); | |
| 536 | 535 | } |
| 537 | 536 | |
| 538 | | |
| 537 | m_previous_inputport_10_state = inputport_10_state; | |
| 539 | 538 | } |
| 540 | 539 | |
| 541 | 540 | |
| r18137 | r18138 | |
| 1640 | 1639 | MCFG_RAM_DEFAULT_SIZE("64K") |
| 1641 | 1640 | |
| 1642 | 1641 | /* dummy timer */ |
| 1643 | MCFG_TIMER_ADD_PERIODIC("dummy_timer", dummy_timer_callback, attotime::from_hz(50)) | |
| 1642 | MCFG_TIMER_DRIVER_ADD_PERIODIC("dummy_timer", nc_state, dummy_timer_callback, attotime::from_hz(50)) | |
| 1644 | 1643 | MACHINE_CONFIG_END |
| 1645 | 1644 | |
| 1646 | 1645 | static const floppy_interface nc200_floppy_interface = |
| r18137 | r18138 | |
|---|---|---|
| 83 | 83 | TIMER DEVICE CALLBACKS |
| 84 | 84 | ***************************************************************************/ |
| 85 | 85 | |
| 86 | ||
| 86 | TIMER_DEVICE_CALLBACK_MEMBER(mz_state::ne556_cursor_callback) | |
| 87 | 87 | { |
| 88 | mz_state *mz = timer.machine().driver_data<mz_state>(); | |
| 89 | mz->m_cursor_timer ^= 1; | |
| 88 | m_cursor_timer ^= 1; | |
| 90 | 89 | } |
| 91 | 90 | |
| 92 | ||
| 91 | TIMER_DEVICE_CALLBACK_MEMBER(mz_state::ne556_other_callback) | |
| 93 | 92 | { |
| 94 | mz_state *mz = timer.machine().driver_data<mz_state>(); | |
| 95 | mz->m_other_timer ^= 1; | |
| 93 | m_other_timer ^= 1; | |
| 96 | 94 | } |
| 97 | 95 | |
| 98 | 96 | |
| r18137 | r18138 | |
| 370 | 368 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 371 | 369 | |
| 372 | 370 | /* ne556 timers */ |
| 373 | MCFG_TIMER_ADD_PERIODIC("cursor", ne556_cursor_callback, attotime::from_hz(1.5)) | |
| 374 | MCFG_TIMER_ADD_PERIODIC("other", ne556_other_callback, attotime::from_hz(34.5)) | |
| 371 | MCFG_TIMER_DRIVER_ADD_PERIODIC("cursor", mz_state, ne556_cursor_callback, attotime::from_hz(1.5)) | |
| 372 | MCFG_TIMER_DRIVER_ADD_PERIODIC("other", mz_state, ne556_other_callback, attotime::from_hz(34.5)) | |
| 375 | 373 | |
| 376 | 374 | /* devices */ |
| 377 | 375 | MCFG_PIT8253_ADD("pit8253", mz700_pit8253_config) |
| r18137 | r18138 | |
|---|---|---|
| 61 | 61 | if (strobe) m_key_strobe = strobe; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | ||
| 64 | TIMER_DEVICE_CALLBACK_MEMBER(pc8401a_state::pc8401a_keyboard_tick) | |
| 65 | 65 | { |
| 66 | pc8401a_state *state = timer.machine().driver_data<pc8401a_state>(); | |
| 67 | ||
| 68 | state->scan_keyboard(); | |
| 66 | scan_keyboard(); | |
| 69 | 67 | } |
| 70 | 68 | |
| 71 | 69 | /* Read/Write Handlers */ |
| r18137 | r18138 | |
| 602 | 600 | MCFG_CPU_IO_MAP(pc8401a_io) |
| 603 | 601 | |
| 604 | 602 | /* fake keyboard */ |
| 605 | MCFG_TIMER_ADD_PERIODIC("keyboard", pc8401a_keyboard_tick, attotime::from_hz(64)) | |
| 603 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", pc8401a_state, pc8401a_keyboard_tick, attotime::from_hz(64)) | |
| 606 | 604 | |
| 607 | 605 | /* devices */ |
| 608 | 606 | MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, rtc_intf) |
| r18137 | r18138 | |
| 635 | 633 | MCFG_CPU_IO_MAP(pc8500_io) |
| 636 | 634 | |
| 637 | 635 | /* fake keyboard */ |
| 638 | MCFG_TIMER_ADD_PERIODIC("keyboard", pc8401a_keyboard_tick, attotime::from_hz(64)) | |
| 636 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", pc8401a_state, pc8401a_keyboard_tick, attotime::from_hz(64)) | |
| 639 | 637 | |
| 640 | 638 | /* devices */ |
| 641 | 639 | MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, rtc_intf) |
| r18137 | r18138 | |
|---|---|---|
| 671 | 671 | // Z80CTC_INTERFACE( ctc_intf ) |
| 672 | 672 | //------------------------------------------------- |
| 673 | 673 | |
| 674 | ||
| 674 | TIMER_DEVICE_CALLBACK_MEMBER(bullet_state::ctc_tick) | |
| 675 | 675 | { |
| 676 | bullet_state *state = timer.machine().driver_data<bullet_state>(); | |
| 676 | m_ctc->trg0(1); | |
| 677 | m_ctc->trg0(0); | |
| 677 | 678 | |
| 678 | state->m_ctc->trg0(1); | |
| 679 | state->m_ctc->trg0(0); | |
| 679 | m_ctc->trg1(1); | |
| 680 | m_ctc->trg1(0); | |
| 680 | 681 | |
| 681 | state->m_ctc->trg1(1); | |
| 682 | state->m_ctc->trg1(0); | |
| 683 | ||
| 684 | state->m_ctc->trg2(1); | |
| 685 | state->m_ctc->trg2(0); | |
| 682 | m_ctc->trg2(1); | |
| 683 | m_ctc->trg2(0); | |
| 686 | 684 | } |
| 687 | 685 | |
| 688 | 686 | static WRITE_LINE_DEVICE_HANDLER( dart_rxtxca_w ) |
| r18137 | r18138 | |
| 1164 | 1162 | |
| 1165 | 1163 | // devices |
| 1166 | 1164 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_16MHz/4, ctc_intf) |
| 1167 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_4_9152MHz/4)) | |
| 1165 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", bullet_state, ctc_tick, attotime::from_hz(XTAL_4_9152MHz/4)) | |
| 1168 | 1166 | MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_16MHz/4, dart_intf) |
| 1169 | 1167 | MCFG_Z80DMA_ADD(Z80DMA_TAG, XTAL_16MHz/4, dma_intf) |
| 1170 | 1168 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_16MHz/4, pio_intf) |
| r18137 | r18138 | |
| 1195 | 1193 | |
| 1196 | 1194 | // devices |
| 1197 | 1195 | MCFG_Z80CTC_ADD(Z80CTC_TAG, XTAL_16MHz/4, ctc_intf) |
| 1198 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_4_9152MHz/4)) | |
| 1196 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", bullet_state, ctc_tick, attotime::from_hz(XTAL_4_9152MHz/4)) | |
| 1199 | 1197 | MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_16MHz/4, dart_intf) |
| 1200 | 1198 | MCFG_Z80DMA_ADD(Z80DMA_TAG, XTAL_16MHz/4, dma_intf) |
| 1201 | 1199 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_16MHz/4, bulletf_pio_intf) |
| r18137 | r18138 | |
|---|---|---|
| 247 | 247 | // TIMER_DEVICE_CALLBACK( keyboard_tick ) |
| 248 | 248 | //------------------------------------------------- |
| 249 | 249 | |
| 250 | ||
| 250 | TIMER_DEVICE_CALLBACK_MEMBER(portfolio_state::keyboard_tick) | |
| 251 | 251 | { |
| 252 | portfolio_state *state = timer.machine().driver_data<portfolio_state>(); | |
| 253 | ||
| 254 | state->scan_keyboard(); | |
| 252 | scan_keyboard(); | |
| 255 | 253 | } |
| 256 | 254 | |
| 257 | 255 | //------------------------------------------------- |
| r18137 | r18138 | |
| 370 | 368 | // TIMER_DEVICE_CALLBACK( system_tick ) |
| 371 | 369 | //------------------------------------------------- |
| 372 | 370 | |
| 373 | ||
| 371 | TIMER_DEVICE_CALLBACK_MEMBER(portfolio_state::system_tick) | |
| 374 | 372 | { |
| 375 | portfolio_state *state = timer.machine().driver_data<portfolio_state>(); | |
| 376 | ||
| 377 | state->trigger_interrupt(INT_TICK); | |
| 373 | trigger_interrupt(INT_TICK); | |
| 378 | 374 | } |
| 379 | 375 | |
| 380 | 376 | //------------------------------------------------- |
| 381 | 377 | // TIMER_DEVICE_CALLBACK( counter_tick ) |
| 382 | 378 | //------------------------------------------------- |
| 383 | 379 | |
| 384 | ||
| 380 | TIMER_DEVICE_CALLBACK_MEMBER(portfolio_state::counter_tick) | |
| 385 | 381 | { |
| 386 | portfolio_state *state = timer.machine().driver_data<portfolio_state>(); | |
| 387 | ||
| 388 | state->m_counter++; | |
| 382 | m_counter++; | |
| 389 | 383 | } |
| 390 | 384 | |
| 391 | 385 | //------------------------------------------------- |
| r18137 | r18138 | |
| 859 | 853 | MCFG_I8255A_ADD(M82C55A_TAG, ppi_intf) |
| 860 | 854 | MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, centronics_intf) |
| 861 | 855 | MCFG_INS8250_ADD(M82C50A_TAG, i8250_intf, XTAL_1_8432MHz) // should be MCFG_INS8250A_ADD |
| 862 | MCFG_TIMER_ADD_PERIODIC("counter", counter_tick, attotime::from_hz(XTAL_32_768kHz/16384)) | |
| 863 | MCFG_TIMER_ADD_PERIODIC(TIMER_TICK_TAG, system_tick, attotime::from_hz(XTAL_32_768kHz/32768)) | |
| 856 | MCFG_TIMER_DRIVER_ADD_PERIODIC("counter", portfolio_state, counter_tick, attotime::from_hz(XTAL_32_768kHz/16384)) | |
| 857 | MCFG_TIMER_DRIVER_ADD_PERIODIC(TIMER_TICK_TAG, portfolio_state, system_tick, attotime::from_hz(XTAL_32_768kHz/32768)) | |
| 864 | 858 | |
| 865 | 859 | /* fake keyboard */ |
| 866 | MCFG_TIMER_ADD_PERIODIC("keyboard", keyboard_tick, attotime::from_usec(2500)) | |
| 860 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", portfolio_state, keyboard_tick, attotime::from_usec(2500)) | |
| 867 | 861 | |
| 868 | 862 | /* cartridge */ |
| 869 | 863 | MCFG_CARTSLOT_ADD("cart") |
| r18137 | r18138 | |
|---|---|---|
| 1165 | 1165 | // TIMER_DEVICE_CALLBACK( paddle_tick ) |
| 1166 | 1166 | //------------------------------------------------- |
| 1167 | 1167 | |
| 1168 | ||
| 1168 | TIMER_DEVICE_CALLBACK_MEMBER(adam_state::paddle_tick) | |
| 1169 | 1169 | { |
| 1170 | adam_state *state = timer.machine().driver_data<adam_state>(); | |
| 1171 | ||
| 1172 | 1170 | // TODO: improve irq behaviour (see drivers/coleco.c) |
| 1173 | if (coleco_scan_paddles(timer.machine(), &state->m_joy_status0, &state->m_joy_status1)) | |
| 1174 | state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); | |
| 1171 | if (coleco_scan_paddles(machine(), &m_joy_status0, &m_joy_status1)) | |
| 1172 | m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); | |
| 1175 | 1173 | } |
| 1176 | 1174 | |
| 1177 | 1175 | |
| r18137 | r18138 | |
| 1732 | 1730 | MCFG_SOUND_CONFIG(psg_intf) |
| 1733 | 1731 | |
| 1734 | 1732 | // devices |
| 1735 | MCFG_TIMER_ADD_PERIODIC("paddles", paddle_tick, attotime::from_msec(20)) | |
| 1733 | MCFG_TIMER_DRIVER_ADD_PERIODIC("paddles", adam_state, paddle_tick, attotime::from_msec(20)) | |
| 1736 | 1734 | MCFG_WD2793_ADD(WD2793_TAG, fdc_intf) |
| 1737 | 1735 | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, adam_floppy_interface) |
| 1738 | 1736 | MCFG_CASSETTE_ADD(CASSETTE_TAG, adam_cassette_interface) |
| r18137 | r18138 | |
|---|---|---|
| 134 | 134 | INPUT_PORTS_END |
| 135 | 135 | |
| 136 | 136 | |
| 137 | ||
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(mc80_state::mc8020_kbd) | |
| 138 | 138 | { |
| 139 | device_t *cpu = | |
| 139 | device_t *cpu = machine().device( "maincpu" ); | |
| 140 | 140 | address_space &mem = cpu->memory().space(AS_PROGRAM); |
| 141 | 141 | char kbdrow[6]; |
| 142 | 142 | UINT8 i; |
| 143 | 143 | for (i = 1; i < 8; i++) |
| 144 | 144 | { |
| 145 | 145 | sprintf(kbdrow,"X%X", i); |
| 146 | mem.write_word(0xd20+i, | |
| 146 | mem.write_word(0xd20+i, machine().root_device().ioport(kbdrow)->read()); | |
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
| r18137 | r18138 | |
| 180 | 180 | /* Devices */ |
| 181 | 181 | MCFG_Z80PIO_ADD( "z80pio", XTAL_2_4576MHz, mc8020_z80pio_intf ) |
| 182 | 182 | MCFG_Z80CTC_ADD( "z80ctc", XTAL_2_4576MHz / 100, mc8020_ctc_intf ) |
| 183 | MCFG_TIMER_ADD_PERIODIC("mc8020_kbd", mc8020_kbd, attotime::from_hz(50)) | |
| 183 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mc8020_kbd", mc80_state, mc8020_kbd, attotime::from_hz(50)) | |
| 184 | 184 | MACHINE_CONFIG_END |
| 185 | 185 | |
| 186 | 186 | static MACHINE_CONFIG_START( mc8030, mc80_state ) |
| r18137 | r18138 | |
|---|---|---|
| 1008 | 1008 | memset(m_digit_line_status, 0, sizeof(m_digit_line_status)); |
| 1009 | 1009 | } |
| 1010 | 1010 | |
| 1011 | ||
| 1011 | TIMER_DEVICE_CALLBACK_MEMBER(fidelz80_state::nmi_timer) | |
| 1012 | 1012 | { |
| 1013 | | |
| 1013 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | /****************************************************************************** |
| r18137 | r18138 | |
| 1335 | 1335 | MCFG_I8255_ADD("ppi8255", vsc_ppi8255_intf) |
| 1336 | 1336 | MCFG_Z80PIO_ADD("z80pio", XTAL_4MHz, vsc_z80pio_intf) |
| 1337 | 1337 | |
| 1338 | MCFG_TIMER_ADD_PERIODIC("nmi_timer", nmi_timer, attotime::from_hz(600)) | |
| 1338 | MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", fidelz80_state, nmi_timer, attotime::from_hz(600)) | |
| 1339 | 1339 | MCFG_TIMER_START_DELAY(attotime::from_hz(600)) |
| 1340 | 1340 | |
| 1341 | 1341 | /* sound hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 1358 | 1358 | } |
| 1359 | 1359 | } |
| 1360 | 1360 | |
| 1361 | ||
| 1361 | TIMER_DEVICE_CALLBACK_MEMBER(x07_state::blink_timer) | |
| 1362 | 1362 | { |
| 1363 | x07_state *state = timer.machine().driver_data<x07_state>(); | |
| 1364 | ||
| 1365 | state->m_blink = !state->m_blink; | |
| 1363 | m_blink = !m_blink; | |
| 1366 | 1364 | } |
| 1367 | 1365 | |
| 1368 | 1366 | TIMER_CALLBACK_MEMBER(x07_state::rsta_clear) |
| r18137 | r18138 | |
| 1524 | 1522 | /* printer */ |
| 1525 | 1523 | MCFG_PRINTER_ADD("printer") |
| 1526 | 1524 | |
| 1527 | MCFG_TIMER_ADD_PERIODIC("blink_timer", blink_timer, attotime::from_msec(300)) | |
| 1525 | MCFG_TIMER_DRIVER_ADD_PERIODIC("blink_timer", x07_state, blink_timer, attotime::from_msec(300)) | |
| 1528 | 1526 | |
| 1529 | 1527 | MCFG_NVRAM_HANDLER( x07 ) |
| 1530 | 1528 |
| r18137 | r18138 | |
|---|---|---|
| 133 | 133 | m_keydata = keydata; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | ||
| 136 | TIMER_DEVICE_CALLBACK_MEMBER(xerox820_state::xerox820_keyboard_tick) | |
| 137 | 137 | { |
| 138 | xerox820_state *state = timer.machine().driver_data<xerox820_state>(); | |
| 139 | state->scan_keyboard(); | |
| 138 | scan_keyboard(); | |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | 141 | /* Read/Write Handlers */ |
| r18137 | r18138 | |
| 552 | 551 | |
| 553 | 552 | /* Z80 CTC */ |
| 554 | 553 | |
| 555 | ||
| 554 | TIMER_DEVICE_CALLBACK_MEMBER(xerox820_state::ctc_tick) | |
| 556 | 555 | { |
| 557 | xerox820_state *state = timer.machine().driver_data<xerox820_state>(); | |
| 558 | ||
| 559 | state->m_ctc->trg0(1); | |
| 560 | state->m_ctc->trg0(0); | |
| 556 | m_ctc->trg0(1); | |
| 557 | m_ctc->trg0(0); | |
| 561 | 558 | } |
| 562 | 559 | |
| 563 | 560 | static WRITE_LINE_DEVICE_HANDLER( ctc_z0_w ) |
| r18137 | r18138 | |
| 848 | 845 | MCFG_PALETTE_INIT(black_and_white) |
| 849 | 846 | |
| 850 | 847 | /* keyboard */ |
| 851 | MCFG_TIMER_ADD_PERIODIC("keyboard", xerox820_keyboard_tick,attotime::from_hz(60)) | |
| 852 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_20MHz/8)) | |
| 848 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", xerox820_state, xerox820_keyboard_tick, attotime::from_hz(60)) | |
| 849 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", xerox820_state, ctc_tick, attotime::from_hz(XTAL_20MHz/8)) | |
| 853 | 850 | |
| 854 | 851 | /* sound hardware */ |
| 855 | 852 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
| 886 | 883 | MCFG_PALETTE_INIT(black_and_white) |
| 887 | 884 | |
| 888 | 885 | /* keyboard */ |
| 889 | MCFG_TIMER_ADD_PERIODIC("keyboard", xerox820_keyboard_tick, attotime::from_hz(60)) | |
| 890 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(XTAL_16MHz/4)) | |
| 886 | MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard", xerox820_state, xerox820_keyboard_tick, attotime::from_hz(60)) | |
| 887 | MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc", xerox820_state, ctc_tick, attotime::from_hz(XTAL_16MHz/4)) | |
| 891 | 888 | |
| 892 | 889 | /* sound hardware */ |
| 893 | 890 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 333 | 333 | |
| 334 | 334 | /* Machine Initialization */ |
| 335 | 335 | |
| 336 | ||
| 336 | TIMER_DEVICE_CALLBACK_MEMBER(mpf1_state::check_halt_callback) | |
| 337 | 337 | { |
| 338 | mpf1_state *state = timer.machine().driver_data<mpf1_state>(); | |
| 339 | ||
| 340 | 338 | // halt-LED; the red one, is turned on when the processor is halted |
| 341 | 339 | // TODO: processor seems to halt, but restarts(?) at 0x0000 after a while -> fix |
| 342 | INT64 led_halt = state->m_maincpu->state_int(Z80_HALT); | |
| 343 | set_led_status(timer.machine(), 1, led_halt); | |
| 340 | INT64 led_halt = m_maincpu->state_int(Z80_HALT); | |
| 341 | set_led_status(machine(), 1, led_halt); | |
| 344 | 342 | } |
| 345 | 343 | |
| 346 | 344 | void mpf1_state::machine_start() |
| r18137 | r18138 | |
| 382 | 380 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 383 | 381 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 384 | 382 | |
| 385 | MCFG_TIMER_ADD_PERIODIC("halt_timer", check_halt_callback, attotime::from_hz(1)) | |
| 383 | MCFG_TIMER_DRIVER_ADD_PERIODIC("halt_timer", mpf1_state, check_halt_callback, attotime::from_hz(1)) | |
| 386 | 384 | MACHINE_CONFIG_END |
| 387 | 385 | |
| 388 | 386 | static MACHINE_CONFIG_START( mpf1b, mpf1_state ) |
| r18137 | r18138 | |
| 410 | 408 | MCFG_SOUND_CONFIG(mpf1_tms5220_intf) |
| 411 | 409 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 412 | 410 | |
| 413 | MCFG_TIMER_ADD_PERIODIC("halt_timer", check_halt_callback, attotime::from_hz(1)) | |
| 411 | MCFG_TIMER_DRIVER_ADD_PERIODIC("halt_timer", mpf1_state, check_halt_callback, attotime::from_hz(1)) | |
| 414 | 412 | MACHINE_CONFIG_END |
| 415 | 413 | |
| 416 | 414 | static MACHINE_CONFIG_START( mpf1p, mpf1_state ) |
| r18137 | r18138 | |
| 434 | 432 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 435 | 433 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 436 | 434 | |
| 437 | MCFG_TIMER_ADD_PERIODIC("halt_timer", check_halt_callback, attotime::from_hz(1)) | |
| 435 | MCFG_TIMER_DRIVER_ADD_PERIODIC("halt_timer", mpf1_state, check_halt_callback, attotime::from_hz(1)) | |
| 438 | 436 | MACHINE_CONFIG_END |
| 439 | 437 | |
| 440 | 438 | /* ROMs */ |
| r18137 | r18138 | |
|---|---|---|
| 809 | 809 | GFXDECODE_END |
| 810 | 810 | |
| 811 | 811 | |
| 812 | ||
| 812 | TIMER_DEVICE_CALLBACK_MEMBER(avigo_state::avigo_scan_timer) | |
| 813 | 813 | { |
| 814 | | |
| 814 | m_irq |= (1<<1); | |
| 815 | 815 | |
| 816 | state->m_irq |= (1<<1); | |
| 817 | ||
| 818 | state->refresh_ints(); | |
| 816 | refresh_ints(); | |
| 819 | 817 | } |
| 820 | 818 | |
| 821 | ||
| 819 | TIMER_DEVICE_CALLBACK_MEMBER(avigo_state::avigo_1hz_timer) | |
| 822 | 820 | { |
| 823 | | |
| 821 | m_irq |= (1<<4); | |
| 824 | 822 | |
| 825 | state->m_irq |= (1<<4); | |
| 826 | ||
| 827 | state->refresh_ints(); | |
| 823 | refresh_ints(); | |
| 828 | 824 | } |
| 829 | 825 | |
| 830 | 826 | static QUICKLOAD_LOAD(avigo) |
| r18137 | r18138 | |
| 930 | 926 | MCFG_NVRAM_ADD_CUSTOM_DRIVER("nvram", avigo_state, nvram_init) |
| 931 | 927 | |
| 932 | 928 | // IRQ 1 is used for scan the pen and for cursor blinking |
| 933 | MCFG_TIMER_ADD_PERIODIC("scan_timer", avigo_scan_timer, attotime::from_hz(50)) | |
| 929 | MCFG_TIMER_DRIVER_ADD_PERIODIC("scan_timer", avigo_state, avigo_scan_timer, attotime::from_hz(50)) | |
| 934 | 930 | |
| 935 | 931 | // IRQ 4 is generated every second, used for auto power off |
| 936 | MCFG_TIMER_ADD_PERIODIC("1hz_timer", avigo_1hz_timer, attotime::from_hz(1)) | |
| 932 | MCFG_TIMER_DRIVER_ADD_PERIODIC("1hz_timer", avigo_state, avigo_1hz_timer, attotime::from_hz(1)) | |
| 937 | 933 | |
| 938 | 934 | /* quickload */ |
| 939 | 935 | MCFG_QUICKLOAD_ADD("quickload", avigo, "app", 0) |
| r18137 | r18138 | |
|---|---|---|
| 341 | 341 | |
| 342 | 342 | /* Video */ |
| 343 | 343 | |
| 344 | ||
| 344 | TIMER_DEVICE_CALLBACK_MEMBER(cosmicos_state::digit_tick) | |
| 345 | 345 | { |
| 346 | | |
| 346 | m_digit = !m_digit; | |
| 347 | 347 | |
| 348 | state->m_digit = !state->m_digit; | |
| 349 | ||
| 350 | output_set_digit_value(state->m_digit, state->m_segment); | |
| 348 | output_set_digit_value(m_digit, m_segment); | |
| 351 | 349 | } |
| 352 | 350 | |
| 353 | ||
| 351 | TIMER_DEVICE_CALLBACK_MEMBER(cosmicos_state::int_tick) | |
| 354 | 352 | { |
| 355 | cosmicos_state *state = timer.machine().driver_data<cosmicos_state>(); | |
| 356 | ||
| 357 | state->m_maincpu->set_input_line(COSMAC_INPUT_LINE_INT, ASSERT_LINE); | |
| 353 | m_maincpu->set_input_line(COSMAC_INPUT_LINE_INT, ASSERT_LINE); | |
| 358 | 354 | } |
| 359 | 355 | |
| 360 | 356 | WRITE_LINE_MEMBER( cosmicos_state::dmaout_w ) |
| r18137 | r18138 | |
| 569 | 565 | /* video hardware */ |
| 570 | 566 | MCFG_DEFAULT_LAYOUT( layout_cosmicos ) |
| 571 | 567 | MCFG_DM9368_ADD(DM9368_TAG, led_intf) |
| 572 | MCFG_TIMER_ADD_PERIODIC("digit", digit_tick, attotime::from_hz(100)) | |
| 573 | MCFG_TIMER_ADD_PERIODIC("interrupt", int_tick, attotime::from_hz(1000)) | |
| 568 | MCFG_TIMER_DRIVER_ADD_PERIODIC("digit", cosmicos_state, digit_tick, attotime::from_hz(100)) | |
| 569 | MCFG_TIMER_DRIVER_ADD_PERIODIC("interrupt", cosmicos_state, int_tick, attotime::from_hz(1000)) | |
| 574 | 570 | |
| 575 | 571 | MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_1_75MHz) |
| 576 | 572 | MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update) |
| r18137 | r18138 | |
|---|---|---|
| 955 | 955 | ADDRESS_MAP_END |
| 956 | 956 | |
| 957 | 957 | |
| 958 | ||
| 958 | TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::namcona1_interrupt) | |
| 959 | 959 | { |
| 960 | namcona1_state *state = timer.machine().driver_data<namcona1_state>(); | |
| 961 | 960 | int scanline = param; |
| 962 | int enabled = | |
| 961 | int enabled = m_mEnableInterrupts ? ~m_vreg[0x1a/2] : 0; | |
| 963 | 962 | |
| 964 | 963 | // vblank |
| 965 | 964 | if (scanline == 224) |
| 966 | 965 | { |
| 967 | simulate_mcu( | |
| 966 | simulate_mcu( machine() ); | |
| 968 | 967 | if (enabled & 8) |
| 969 | | |
| 968 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 970 | 969 | } |
| 971 | 970 | |
| 972 | 971 | // posirq, used with dolphin in Emeraldia's "how to play" attract mode |
| 973 | int posirq_scanline = | |
| 972 | int posirq_scanline = m_vreg[0x8a/2] & 0xff; | |
| 974 | 973 | if (scanline == posirq_scanline && enabled & 4) |
| 975 | 974 | { |
| 976 | 975 | if (posirq_scanline) |
| 977 | | |
| 976 | machine().primary_screen->update_partial(posirq_scanline); | |
| 978 | 977 | |
| 979 | | |
| 978 | m_maincpu->set_input_line(3, HOLD_LINE); | |
| 980 | 979 | } |
| 981 | 980 | } |
| 982 | 981 | |
| r18137 | r18138 | |
| 984 | 983 | // IRQ 1 => |
| 985 | 984 | // IRQ 2 => |
| 986 | 985 | |
| 987 | ||
| 986 | TIMER_DEVICE_CALLBACK_MEMBER(namcona1_state::mcu_interrupt) | |
| 988 | 987 | { |
| 989 | namcona1_state *state = timer.machine().driver_data<namcona1_state>(); | |
| 990 | 988 | int scanline = param; |
| 991 | 989 | |
| 992 | 990 | // vblank |
| 993 | 991 | if (scanline == 224) |
| 994 | | |
| 992 | m_mcu->set_input_line(M37710_LINE_IRQ1, HOLD_LINE); | |
| 995 | 993 | |
| 996 | 994 | // adc (timing guessed, when does this trigger?) |
| 997 | 995 | if (scanline == 0) |
| 998 | | |
| 996 | m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); | |
| 999 | 997 | } |
| 1000 | 998 | |
| 1001 | 999 | static const c140_interface C140_interface_typeA = |
| r18137 | r18138 | |
| 1008 | 1006 | /* basic machine hardware */ |
| 1009 | 1007 | MCFG_CPU_ADD("maincpu", M68000, 50113000/4) |
| 1010 | 1008 | MCFG_CPU_PROGRAM_MAP(namcona1_main_map) |
| 1011 | MCFG_TIMER_ADD_SCANLINE("scan_main", namcona1_interrupt, "screen", 0, 1) | |
| 1009 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_main", namcona1_state, namcona1_interrupt, "screen", 0, 1) | |
| 1012 | 1010 | |
| 1013 | 1011 | MCFG_CPU_ADD("mcu", M37702, 50113000/4) |
| 1014 | 1012 | MCFG_CPU_PROGRAM_MAP(namcona1_mcu_map) |
| 1015 | 1013 | MCFG_CPU_IO_MAP( namcona1_mcu_io_map) |
| 1016 | MCFG_TIMER_ADD_SCANLINE("scan_mcu", mcu_interrupt, "screen", 0, 1) | |
| 1014 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scan_mcu", namcona1_state, mcu_interrupt, "screen", 0, 1) | |
| 1017 | 1015 | |
| 1018 | 1016 | MCFG_NVRAM_HANDLER(namcosna1) |
| 1019 | 1017 | MCFG_QUANTUM_TIME(attotime::from_hz(2400)) |
| r18137 | r18138 | |
|---|---|---|
| 249 | 249 | /* basic machine hardware */ |
| 250 | 250 | MCFG_CPU_ADD("maincpu", M6502,750000) |
| 251 | 251 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 252 | MCFG_TIMER_ADD_SCANLINE("scantimer", bsktball_scanline, "screen", 0, 1) | |
| 252 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bsktball_state, bsktball_scanline, "screen", 0, 1) | |
| 253 | 253 | |
| 254 | 254 | |
| 255 | 255 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 103 | 103 | return (vcount - 0x18) | 0x100; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | ||
| 106 | TIMER_DEVICE_CALLBACK_MEMBER(vball_state::vball_scanline) | |
| 107 | 107 | { |
| 108 | vball_state *state = timer.machine().driver_data<vball_state>(); | |
| 109 | 108 | int scanline = param; |
| 110 | int screen_height = | |
| 109 | int screen_height = machine().primary_screen->height(); | |
| 111 | 110 | int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1); |
| 112 | 111 | int vcount = scanline_to_vcount(scanline); |
| 113 | 112 | |
| 114 | 113 | /* Update to the current point */ |
| 115 | 114 | if (scanline > 0) |
| 116 | 115 | { |
| 117 | | |
| 116 | machine().primary_screen->update_partial(scanline - 1); | |
| 118 | 117 | } |
| 119 | 118 | |
| 120 | 119 | /* IRQ fires every on every 8th scanline */ |
| 121 | 120 | if (!(vcount_old & 8) && (vcount & 8)) |
| 122 | 121 | { |
| 123 | | |
| 122 | machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); | |
| 124 | 123 | } |
| 125 | 124 | |
| 126 | 125 | /* NMI fires on scanline 248 (VBL) and is latched */ |
| 127 | 126 | if (vcount == 0xf8) |
| 128 | 127 | { |
| 129 | | |
| 128 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 130 | 129 | } |
| 131 | 130 | |
| 132 | 131 | /* Save the scroll x register value */ |
| 133 | 132 | if (scanline < 256) |
| 134 | 133 | { |
| 135 | | |
| 134 | m_vb_scrollx[255 - scanline] = (m_vb_scrollx_hi + m_vb_scrollx_lo + 4); | |
| 136 | 135 | } |
| 137 | 136 | } |
| 138 | 137 | |
| r18137 | r18138 | |
| 410 | 409 | /* basic machine hardware */ |
| 411 | 410 | MCFG_CPU_ADD("maincpu", M6502, CPU_CLOCK) /* 2 MHz - measured by guru but it makes the game far far too slow ?! */ |
| 412 | 411 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 413 | MCFG_TIMER_ADD_SCANLINE("scantimer", vball_scanline, "screen", 0, 1) | |
| 412 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", vball_state, vball_scanline, "screen", 0, 1) | |
| 414 | 413 | |
| 415 | 414 | MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ |
| 416 | 415 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 106 | 106 | COMBINE_DATA(&m_cur_control2); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | ||
| 109 | TIMER_DEVICE_CALLBACK_MEMBER(bishi_state::bishi_scanline) | |
| 110 | 110 | { |
| 111 | bishi_state *state = timer.machine().driver_data<bishi_state>(); | |
| 112 | 111 | int scanline = param; |
| 113 | 112 | |
| 114 | if ( | |
| 113 | if (m_cur_control & 0x800) | |
| 115 | 114 | { |
| 116 | 115 | if(scanline == 240) // vblank-out irq |
| 117 | | |
| 116 | machine().device("maincpu")->execute().set_input_line(M68K_IRQ_3, HOLD_LINE); | |
| 118 | 117 | |
| 119 | 118 | if(scanline == 0) // vblank-in irq |
| 120 | | |
| 119 | machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); | |
| 121 | 120 | } |
| 122 | 121 | } |
| 123 | 122 | |
| r18137 | r18138 | |
| 411 | 410 | /* basic machine hardware */ |
| 412 | 411 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* 12MHz (24MHz OSC / 2 ) */ |
| 413 | 412 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 414 | MCFG_TIMER_ADD_SCANLINE("scantimer", bishi_scanline, "screen", 0, 1) | |
| 413 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bishi_state, bishi_scanline, "screen", 0, 1) | |
| 415 | 414 | |
| 416 | 415 | |
| 417 | 416 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 232 | 232 | COMBINE_DATA(&m_irq_enable); |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | ||
| 235 | TIMER_DEVICE_CALLBACK_MEMBER(ssv_state::ssv_interrupt) | |
| 236 | 236 | { |
| 237 | ssv_state *state = timer.machine().driver_data<ssv_state>(); | |
| 238 | 237 | int scanline = param; |
| 239 | 238 | |
| 240 | 239 | if (scanline == 0) |
| 241 | 240 | { |
| 242 | if ( | |
| 241 | if (m_interrupt_ultrax) | |
| 243 | 242 | { |
| 244 | state->m_requested_int |= 1 << 1; // needed by ultrax to coin up, breaks cairblad | |
| 245 | update_irq_state(timer.machine()); | |
| 243 | m_requested_int |= 1 << 1; // needed by ultrax to coin up, breaks cairblad | |
| 244 | update_irq_state(machine()); | |
| 246 | 245 | } |
| 247 | 246 | } |
| 248 | 247 | else if(scanline == 240) |
| 249 | 248 | { |
| 250 | state->m_requested_int |= 1 << 3; // vblank | |
| 251 | update_irq_state(timer.machine()); | |
| 249 | m_requested_int |= 1 << 3; // vblank | |
| 250 | update_irq_state(machine()); | |
| 252 | 251 | } |
| 253 | 252 | } |
| 254 | 253 | |
| 255 | ||
| 254 | TIMER_DEVICE_CALLBACK_MEMBER(ssv_state::gdfs_interrupt) | |
| 256 | 255 | { |
| 257 | ssv_state *state = timer.machine().driver_data<ssv_state>(); | |
| 258 | 256 | int scanline = param; |
| 259 | 257 | |
| 260 | 258 | if ((scanline % 64) == 0) |
| 261 | 259 | { |
| 262 | state->m_requested_int |= 1 << 6; // reads lightgun (4 times for 4 axis) | |
| 263 | update_irq_state(timer.machine()); | |
| 260 | m_requested_int |= 1 << 6; // reads lightgun (4 times for 4 axis) | |
| 261 | update_irq_state(machine()); | |
| 264 | 262 | } |
| 265 | 263 | else if(scanline == 240) |
| 266 | 264 | { |
| 267 | state->m_requested_int |= 1 << 3; // vblank | |
| 268 | update_irq_state(timer.machine()); | |
| 265 | m_requested_int |= 1 << 3; // vblank | |
| 266 | update_irq_state(machine()); | |
| 269 | 267 | } |
| 270 | 268 | } |
| 271 | 269 | |
| r18137 | r18138 | |
| 2602 | 2600 | |
| 2603 | 2601 | /* basic machine hardware */ |
| 2604 | 2602 | MCFG_CPU_ADD("maincpu", V60, 16000000) /* Based on STA-0001 & STA-0001B System boards */ |
| 2605 | MCFG_TIMER_ADD_SCANLINE("scantimer", ssv_interrupt, "screen", 0, 1) | |
| 2603 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ssv_state, ssv_interrupt, "screen", 0, 1) | |
| 2606 | 2604 | |
| 2607 | 2605 | |
| 2608 | 2606 | /* video hardware */ |
| r18137 | r18138 | |
| 2651 | 2649 | MCFG_CPU_MODIFY("maincpu") |
| 2652 | 2650 | MCFG_CPU_PROGRAM_MAP(gdfs_map) |
| 2653 | 2651 | MCFG_TIMER_MODIFY("scantimer") |
| 2654 | MCFG_TIMER_CALLBACK(gdfs_interrupt) | |
| 2652 | MCFG_TIMER_DRIVER_CALLBACK(ssv_state, gdfs_interrupt) | |
| 2655 | 2653 | |
| 2656 | 2654 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2657 | 2655 |
| r18137 | r18138 | |
|---|---|---|
| 406 | 406 | DEVCB_LINE(irqhandler) |
| 407 | 407 | }; |
| 408 | 408 | |
| 409 | ||
| 409 | TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::thedeep_interrupt) | |
| 410 | 410 | { |
| 411 | thedeep_state *state = timer.machine().driver_data<thedeep_state>(); | |
| 412 | 411 | int scanline = param; |
| 413 | 412 | |
| 414 | 413 | if (scanline == 124) // TODO: clean this |
| 415 | 414 | { |
| 416 | if ( | |
| 415 | if (m_protection_command != 0x59) | |
| 417 | 416 | { |
| 418 | int coins = timer.machine().root_device().ioport("MCU")->read(); | |
| 419 | if (coins & 1) state->m_protection_data = 1; | |
| 420 | else if (coins & 2) state->m_protection_data = 2; | |
| 421 | else if (coins & 4) state->m_protection_data = 3; | |
| 422 | else state->m_protection_data = 0; | |
| 417 | int coins = machine().root_device().ioport("MCU")->read(); | |
| 418 | if (coins & 1) m_protection_data = 1; | |
| 419 | else if (coins & 2) m_protection_data = 2; | |
| 420 | else if (coins & 4) m_protection_data = 3; | |
| 421 | else m_protection_data = 0; | |
| 423 | 422 | |
| 424 | if (state->m_protection_data) | |
| 425 | state->m_protection_irq = 1; | |
| 423 | if (m_protection_data) | |
| 424 | m_protection_irq = 1; | |
| 426 | 425 | } |
| 427 | if (state->m_protection_irq) | |
| 428 | state->m_maincpu->set_input_line(0, HOLD_LINE); | |
| 426 | if (m_protection_irq) | |
| 427 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 429 | 428 | } |
| 430 | 429 | else if(scanline == 0) |
| 431 | 430 | { |
| 432 | if ( | |
| 431 | if (m_nmi_enable) | |
| 433 | 432 | { |
| 434 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 435 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); | |
| 433 | m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 434 | m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); | |
| 436 | 435 | } |
| 437 | 436 | } |
| 438 | 437 | } |
| r18137 | r18138 | |
| 448 | 447 | /* basic machine hardware */ |
| 449 | 448 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ |
| 450 | 449 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 451 | MCFG_TIMER_ADD_SCANLINE("scantimer", thedeep_interrupt, "screen", 0, 1) | |
| 450 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", thedeep_state, thedeep_interrupt, "screen", 0, 1) | |
| 452 | 451 | |
| 453 | 452 | MCFG_CPU_ADD("audiocpu", M65C02, XTAL_12MHz/8) /* verified on pcb */ |
| 454 | 453 | MCFG_CPU_PROGRAM_MAP(audio_map) |
| r18137 | r18138 | |
|---|---|---|
| 277 | 277 | |
| 278 | 278 | |
| 279 | 279 | |
| 280 | ||
| 280 | TIMER_DEVICE_CALLBACK_MEMBER(deco32_state::interrupt_gen) | |
| 281 | 281 | { |
| 282 | | |
| 282 | machine().device("maincpu")->execute().set_input_line(ARM_IRQ_LINE, HOLD_LINE); | |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | READ32_MEMBER(deco32_state::deco32_irq_controller_r) |
| r18137 | r18138 | |
| 1742 | 1742 | |
| 1743 | 1743 | MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32) |
| 1744 | 1744 | |
| 1745 | MCFG_TIMER_ADD("int_timer", interrupt_gen) | |
| 1745 | MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen) | |
| 1746 | 1746 | |
| 1747 | 1747 | MCFG_SCREEN_ADD("screen", RASTER) |
| 1748 | 1748 | MCFG_SCREEN_REFRESH_RATE(60) |
| r18137 | r18138 | |
| 1951 | 1951 | MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32) |
| 1952 | 1952 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 1953 | 1953 | |
| 1954 | MCFG_TIMER_ADD("int_timer", interrupt_gen) | |
| 1954 | MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen) | |
| 1955 | 1955 | |
| 1956 | 1956 | /* video hardware */ |
| 1957 | 1957 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1992 | 1992 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 1993 | 1993 | MACHINE_CONFIG_END |
| 1994 | 1994 | |
| 1995 | ||
| 1995 | TIMER_DEVICE_CALLBACK_MEMBER(deco32_state::lockload_vbl_irq) | |
| 1996 | 1996 | { |
| 1997 | deco32_state *state = timer.machine().driver_data<deco32_state>(); | |
| 1998 | 1997 | int scanline = param; |
| 1999 | 1998 | |
| 2000 | 1999 | if(scanline == 31*8) |
| 2001 | 2000 | { |
| 2002 | state->m_irq_source = 0; | |
| 2003 | state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE); | |
| 2001 | m_irq_source = 0; | |
| 2002 | m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE); | |
| 2004 | 2003 | } |
| 2005 | 2004 | |
| 2006 | 2005 | if(scanline == 0) |
| 2007 | 2006 | { |
| 2008 | state->m_irq_source = 1; | |
| 2009 | state->m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE); | |
| 2007 | m_irq_source = 1; | |
| 2008 | m_maincpu->set_input_line(ARM_IRQ_LINE, HOLD_LINE); | |
| 2010 | 2009 | } |
| 2011 | 2010 | } |
| 2012 | 2011 | |
| r18137 | r18138 | |
| 2016 | 2015 | /* basic machine hardware */ |
| 2017 | 2016 | MCFG_CPU_ADD("maincpu", ARM, 28000000/4) |
| 2018 | 2017 | MCFG_CPU_PROGRAM_MAP(lockload_map) |
| 2019 | MCFG_TIMER_ADD_SCANLINE("scantimer", lockload_vbl_irq, "screen", 0, 1) | |
| 2018 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", deco32_state, lockload_vbl_irq, "screen", 0, 1) | |
| 2020 | 2019 | |
| 2021 | 2020 | MCFG_CPU_ADD("audiocpu", Z80, 32220000/8) |
| 2022 | 2021 | MCFG_CPU_PROGRAM_MAP(nslasher_sound) |
| r18137 | r18138 | |
| 2027 | 2026 | MCFG_MACHINE_RESET_OVERRIDE(deco32_state,deco32) |
| 2028 | 2027 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2029 | 2028 | |
| 2030 | MCFG_TIMER_ADD("int_timer", interrupt_gen) | |
| 2029 | MCFG_TIMER_DRIVER_ADD("int_timer", deco32_state, interrupt_gen) | |
| 2031 | 2030 | |
| 2032 | 2031 | /* video hardware */ |
| 2033 | 2032 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | 1263 | |
| 1264 | ||
| 1264 | TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::checkmaj_irq0_gen) | |
| 1265 | 1265 | { |
| 1266 | | |
| 1266 | machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE); | |
| 1267 | 1267 | } |
| 1268 | 1268 | |
| 1269 | 1269 | |
| r18137 | r18138 | |
| 2096 | 2096 | |
| 2097 | 2097 | |
| 2098 | 2098 | /* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */ |
| 2099 | MCFG_TIMER_ADD_PERIODIC("stars", galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001)) | |
| 2099 | MCFG_TIMER_DRIVER_ADD_PERIODIC("stars", galaxian_state, galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001)) | |
| 2100 | 2100 | |
| 2101 | 2101 | /* sound hardware */ |
| 2102 | 2102 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
| 2276 | 2276 | MCFG_CPU_ADD("audiocpu", Z80, 1620000) |
| 2277 | 2277 | MCFG_CPU_PROGRAM_MAP(checkmaj_sound_map) |
| 2278 | 2278 | |
| 2279 | MCFG_TIMER_ADD_SCANLINE("irq0", checkmaj_irq0_gen, "screen", 0, 8) | |
| 2279 | MCFG_TIMER_DRIVER_ADD_SCANLINE("irq0", galaxian_state, checkmaj_irq0_gen, "screen", 0, 8) | |
| 2280 | 2280 | |
| 2281 | 2281 | /* sound hardware */ |
| 2282 | 2282 | MCFG_SOUND_ADD("aysnd", AY8910, 1620000) |
| r18137 | r18138 | |
|---|---|---|
| 58 | 58 | m_requested_int &= ~param; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | ||
| 61 | TIMER_DEVICE_CALLBACK_MEMBER(hyprduel_state::hyprduel_interrupt) | |
| 62 | 62 | { |
| 63 | hyprduel_state *state = timer.machine().driver_data<hyprduel_state>(); | |
| 64 | 63 | int line = param; |
| 65 | 64 | |
| 66 | 65 | if (line == 0) /* TODO: fix this! */ |
| 67 | 66 | { |
| 68 | state->m_requested_int |= 0x01; /* vblank */ | |
| 69 | state->m_requested_int |= 0x20; | |
| 70 | state->m_maincpu->set_input_line(2, HOLD_LINE); | |
| 67 | m_requested_int |= 0x01; /* vblank */ | |
| 68 | m_requested_int |= 0x20; | |
| 69 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 71 | 70 | /* the duration is a guess */ |
| 72 | | |
| 71 | machine().scheduler().timer_set(attotime::from_usec(2500), timer_expired_delegate(FUNC(hyprduel_state::vblank_end_callback),this), 0x20); | |
| 73 | 72 | } |
| 74 | 73 | else |
| 75 | | |
| 74 | m_requested_int |= 0x12; /* hsync */ | |
| 76 | 75 | |
| 77 | update_irq_state( | |
| 76 | update_irq_state(machine()); | |
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | READ16_MEMBER(hyprduel_state::hyprduel_irq_cause_r) |
| r18137 | r18138 | |
| 669 | 668 | /* basic machine hardware */ |
| 670 | 669 | MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */ |
| 671 | 670 | MCFG_CPU_PROGRAM_MAP(hyprduel_map) |
| 672 | MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1) | |
| 671 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hyprduel_state, hyprduel_interrupt, "screen", 0, 1) | |
| 673 | 672 | |
| 674 | 673 | MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */ |
| 675 | 674 | MCFG_CPU_PROGRAM_MAP(hyprduel_map2) |
| r18137 | r18138 | |
| 710 | 709 | /* basic machine hardware */ |
| 711 | 710 | MCFG_CPU_ADD("maincpu", M68000,20000000/2) /* 10MHz */ |
| 712 | 711 | MCFG_CPU_PROGRAM_MAP(magerror_map) |
| 713 | MCFG_TIMER_ADD_SCANLINE("scantimer", hyprduel_interrupt, "screen", 0, 1) | |
| 712 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hyprduel_state, hyprduel_interrupt, "screen", 0, 1) | |
| 714 | 713 | |
| 715 | 714 | MCFG_CPU_ADD("sub", M68000,20000000/2) /* 10MHz */ |
| 716 | 715 | MCFG_CPU_PROGRAM_MAP(magerror_map2) |
| r18137 | r18138 | |
|---|---|---|
| 13 | 13 | |
| 14 | 14 | #define MASTER_CLOCK XTAL_18_432MHz |
| 15 | 15 | |
| 16 | ||
| 16 | TIMER_DEVICE_CALLBACK_MEMBER(shaolins_state::shaolins_interrupt) | |
| 17 | 17 | { |
| 18 | shaolins_state *state = timer.machine().driver_data<shaolins_state>(); | |
| 19 | 18 | int scanline = param; |
| 20 | 19 | |
| 21 | 20 | if(scanline == 240) |
| 22 | | |
| 21 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 23 | 22 | else if((scanline % 32) == 0) |
| 24 | if ( | |
| 23 | if (m_nmi_enable & 0x02) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 25 | 24 | } |
| 26 | 25 | |
| 27 | 26 | |
| r18137 | r18138 | |
| 207 | 206 | /* basic machine hardware */ |
| 208 | 207 | MCFG_CPU_ADD("maincpu", M6809, MASTER_CLOCK/12) /* verified on pcb */ |
| 209 | 208 | MCFG_CPU_PROGRAM_MAP(shaolins_map) |
| 210 | MCFG_TIMER_ADD_SCANLINE("scantimer", shaolins_interrupt, "screen", 0, 1) | |
| 209 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", shaolins_state, shaolins_interrupt, "screen", 0, 1) | |
| 211 | 210 | |
| 212 | 211 | /* video hardware */ |
| 213 | 212 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 236 | 236 | * The rate should be at about 1 Hz |
| 237 | 237 | *************************************************************/ |
| 238 | 238 | |
| 239 | ||
| 239 | TIMER_DEVICE_CALLBACK_MEMBER(lazercmd_state::lazercmd_timer) | |
| 240 | 240 | { |
| 241 | lazercmd_state *state = timer.machine().driver_data<lazercmd_state>(); | |
| 242 | 241 | int scanline = param; |
| 243 | 242 | |
| 244 | 243 | if((scanline % 2) == 1) |
| 245 | 244 | return; |
| 246 | 245 | |
| 247 | if (++ | |
| 246 | if (++m_timer_count >= 64 * 128) | |
| 248 | 247 | { |
| 249 | state->m_timer_count = 0; | |
| 250 | state->m_sense_state ^= 1; | |
| 251 | state->m_maincpu->set_input_line(1, (state->m_sense_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 248 | m_timer_count = 0; | |
| 249 | m_sense_state ^= 1; | |
| 250 | m_maincpu->set_input_line(1, (m_sense_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 252 | 251 | } |
| 253 | 252 | } |
| 254 | 253 | |
| 255 | ||
| 254 | TIMER_DEVICE_CALLBACK_MEMBER(lazercmd_state::bbonk_timer) | |
| 256 | 255 | { |
| 257 | lazercmd_state *state = timer.machine().driver_data<lazercmd_state>(); | |
| 258 | 256 | int scanline = param; |
| 259 | 257 | |
| 260 | 258 | if((scanline % 2) == 1) |
| 261 | 259 | return; |
| 262 | 260 | |
| 263 | if (++state->m_timer_count >= 64 * 128) | |
| 264 | state->m_timer_count = 0; | |
| 261 | if (++m_timer_count >= 64 * 128) | |
| 262 | m_timer_count = 0; | |
| 265 | 263 | } |
| 266 | 264 | |
| 267 | 265 | /************************************************************* |
| r18137 | r18138 | |
| 635 | 633 | thus requiring an extra loading of approx 3-5 */ |
| 636 | 634 | MCFG_CPU_PROGRAM_MAP(lazercmd_map) |
| 637 | 635 | MCFG_CPU_IO_MAP(lazercmd_portmap) |
| 638 | MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) | |
| 636 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, lazercmd_timer, "screen", 0, 1) | |
| 639 | 637 | |
| 640 | 638 | |
| 641 | 639 | /* video hardware */ |
| r18137 | r18138 | |
| 669 | 667 | thus requiring an extra loading of approx 3-5 */ |
| 670 | 668 | MCFG_CPU_PROGRAM_MAP(medlanes_map) |
| 671 | 669 | MCFG_CPU_IO_MAP(lazercmd_portmap) |
| 672 | MCFG_TIMER_ADD_SCANLINE("scantimer", lazercmd_timer, "screen", 0, 1) | |
| 670 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, lazercmd_timer, "screen", 0, 1) | |
| 673 | 671 | |
| 674 | 672 | |
| 675 | 673 | /* video hardware */ |
| r18137 | r18138 | |
| 703 | 701 | thus requiring an extra loading of approx 3-5 */ |
| 704 | 702 | MCFG_CPU_PROGRAM_MAP(bbonk_map) |
| 705 | 703 | MCFG_CPU_IO_MAP(lazercmd_portmap) |
| 706 | MCFG_TIMER_ADD_SCANLINE("scantimer", bbonk_timer, "screen", 0, 1) | |
| 704 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", lazercmd_state, bbonk_timer, "screen", 0, 1) | |
| 707 | 705 | |
| 708 | 706 | |
| 709 | 707 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 88 | 88 | /* basic machine hardware */ |
| 89 | 89 | MCFG_CPU_ADD("maincpu", M6809, 1000000) /* 1 MHz */ |
| 90 | 90 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 91 | MCFG_TIMER_ADD_SCANLINE("scantimer", beezer_interrupt, "screen", 0, 1) | |
| 91 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", beezer_state, beezer_interrupt, "screen", 0, 1) | |
| 92 | 92 | |
| 93 | 93 | MCFG_CPU_ADD("audiocpu", M6809, 1000000) /* 1 MHz */ |
| 94 | 94 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 575 | 575 | // Interrupt Handlers |
| 576 | 576 | |
| 577 | 577 | // Equites Hardware |
| 578 | ||
| 578 | TIMER_DEVICE_CALLBACK_MEMBER(equites_state::equites_scanline) | |
| 579 | 579 | { |
| 580 | 580 | int scanline = param; |
| 581 | 581 | |
| 582 | 582 | if(scanline == 232) // vblank-out irq |
| 583 | | |
| 583 | machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE); | |
| 584 | 584 | |
| 585 | 585 | if(scanline == 24) // vblank-in irq |
| 586 | | |
| 586 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | ||
| 589 | TIMER_DEVICE_CALLBACK_MEMBER(equites_state::splndrbt_scanline) | |
| 590 | 590 | { |
| 591 | 591 | int scanline = param; |
| 592 | 592 | |
| 593 | 593 | if(scanline == 224) // vblank-out irq |
| 594 | | |
| 594 | machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE); | |
| 595 | 595 | |
| 596 | 596 | if(scanline == 32) // vblank-in irq |
| 597 | | |
| 597 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | WRITE8_MEMBER(equites_state::equites_8155_w) |
| r18137 | r18138 | |
| 1249 | 1249 | /* basic machine hardware */ |
| 1250 | 1250 | MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz/4) /* 68000P8 running at 3mhz! verified on pcb */ |
| 1251 | 1251 | MCFG_CPU_PROGRAM_MAP(equites_map) |
| 1252 | MCFG_TIMER_ADD_SCANLINE("scantimer", equites_scanline, "screen", 0, 1) | |
| 1252 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", equites_state, equites_scanline, "screen", 0, 1) | |
| 1253 | 1253 | |
| 1254 | 1254 | MCFG_FRAGMENT_ADD(common_sound) |
| 1255 | 1255 | |
| r18137 | r18138 | |
| 1286 | 1286 | /* basic machine hardware */ |
| 1287 | 1287 | MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/4) /* 68000P8 running at 6mhz, verified on pcb */ |
| 1288 | 1288 | MCFG_CPU_PROGRAM_MAP(splndrbt_map) |
| 1289 | MCFG_TIMER_ADD_SCANLINE("scantimer", splndrbt_scanline, "screen", 0, 1) | |
| 1289 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", equites_state, splndrbt_scanline, "screen", 0, 1) | |
| 1290 | 1290 | |
| 1291 | 1291 | MCFG_FRAGMENT_ADD(common_sound) |
| 1292 | 1292 |
| r18137 | r18138 | |
|---|---|---|
| 20 | 20 | * |
| 21 | 21 | *************************************/ |
| 22 | 22 | |
| 23 | ||
| 23 | TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::ironhors_irq) | |
| 24 | 24 | { |
| 25 | ironhors_state *state = timer.machine().driver_data<ironhors_state>(); | |
| 26 | 25 | int scanline = param; |
| 27 | 26 | |
| 28 | 27 | if (scanline == 240) |
| 29 | 28 | { |
| 30 | if (*state->m_interrupt_enable & 4) | |
| 31 | state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); | |
| 29 | if (*m_interrupt_enable & 4) | |
| 30 | m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); | |
| 32 | 31 | } |
| 33 | 32 | else if (((scanline+16) % 64) == 0) |
| 34 | 33 | { |
| 35 | if (*state->m_interrupt_enable & 1) | |
| 36 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 34 | if (*m_interrupt_enable & 1) | |
| 35 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 37 | 36 | } |
| 38 | 37 | } |
| 39 | 38 | |
| r18137 | r18138 | |
| 380 | 379 | /* basic machine hardware */ |
| 381 | 380 | MCFG_CPU_ADD("maincpu", M6809,18432000/6) /* 3.072 MHz??? mod by Shingo Suzuki 1999/10/15 */ |
| 382 | 381 | MCFG_CPU_PROGRAM_MAP(master_map) |
| 383 | MCFG_TIMER_ADD_SCANLINE("scantimer", ironhors_irq, "screen", 0, 1) | |
| 382 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ironhors_state, ironhors_irq, "screen", 0, 1) | |
| 384 | 383 | |
| 385 | 384 | MCFG_CPU_ADD("soundcpu",Z80,18432000/6) /* 3.072 MHz */ |
| 386 | 385 | MCFG_CPU_PROGRAM_MAP(slave_map) |
| r18137 | r18138 | |
| 416 | 415 | |
| 417 | 416 | MACHINE_CONFIG_END |
| 418 | 417 | |
| 419 | ||
| 418 | TIMER_DEVICE_CALLBACK_MEMBER(ironhors_state::farwest_irq) | |
| 420 | 419 | { |
| 421 | ironhors_state *state = timer.machine().driver_data<ironhors_state>(); | |
| 422 | 420 | int scanline = param; |
| 423 | 421 | |
| 424 | 422 | if ((scanline % 2) == 1) |
| 425 | 423 | { |
| 426 | if (*state->m_interrupt_enable & 4) | |
| 427 | state->m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); | |
| 424 | if (*m_interrupt_enable & 4) | |
| 425 | m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); | |
| 428 | 426 | } |
| 429 | 427 | else if ((scanline % 2) == 0) |
| 430 | 428 | { |
| 431 | if (*state->m_interrupt_enable & 1) | |
| 432 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 429 | if (*m_interrupt_enable & 1) | |
| 430 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 433 | 431 | } |
| 434 | 432 | } |
| 435 | 433 | |
| r18137 | r18138 | |
| 459 | 457 | MCFG_CPU_MODIFY("maincpu") |
| 460 | 458 | MCFG_CPU_PROGRAM_MAP(farwest_master_map) |
| 461 | 459 | MCFG_DEVICE_MODIFY("scantimer") |
| 462 | MCFG_TIMER_CALLBACK(farwest_irq) | |
| 460 | MCFG_TIMER_DRIVER_CALLBACK(ironhors_state, farwest_irq) | |
| 463 | 461 | |
| 464 | 462 | MCFG_CPU_MODIFY("soundcpu") |
| 465 | 463 | MCFG_CPU_PROGRAM_MAP(farwest_slave_map) |
| r18137 | r18138 | |
|---|---|---|
| 861 | 861 | } |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | ||
| 864 | TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_cb) | |
| 865 | 865 | { |
| 866 | segas24_state *state = timer.machine().driver_data<segas24_state>(); | |
| 867 | state->irq_timer_sync(); | |
| 866 | irq_timer_sync(); | |
| 868 | 867 | |
| 869 | if(state->irq_tval != 0x1000) | |
| 870 | fprintf(stderr, "Error: timer desync %x != 1000\n", state->irq_tval); | |
| 868 | if(irq_tval != 0x1000) | |
| 869 | fprintf(stderr, "Error: timer desync %x != 1000\n", irq_tval); | |
| 871 | 870 | |
| 872 | state->irq_tval = state->irq_tdata; | |
| 873 | state->irq_timer_start(state->irq_tmode); | |
| 871 | irq_tval = irq_tdata; | |
| 872 | irq_timer_start(irq_tmode); | |
| 874 | 873 | |
| 875 | state->irq_timer_pend0 = state->irq_timer_pend1 = 1; | |
| 876 | if(state->irq_allow0 & (1 << IRQ_TIMER)) | |
| 877 | timer.machine().device("maincpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE); | |
| 878 | if(state->irq_allow1 & (1 << IRQ_TIMER)) | |
| 879 | timer.machine().device("subcpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE); | |
| 874 | irq_timer_pend0 = irq_timer_pend1 = 1; | |
| 875 | if(irq_allow0 & (1 << IRQ_TIMER)) | |
| 876 | machine().device("maincpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE); | |
| 877 | if(irq_allow1 & (1 << IRQ_TIMER)) | |
| 878 | machine().device("subcpu")->execute().set_input_line(IRQ_TIMER+1, ASSERT_LINE); | |
| 880 | 879 | |
| 881 | if(state->irq_tmode == 1 || state->irq_tmode == 2) | |
| 882 | timer.machine().primary_screen->update_now(); | |
| 880 | if(irq_tmode == 1 || irq_tmode == 2) | |
| 881 | machine().primary_screen->update_now(); | |
| 883 | 882 | } |
| 884 | 883 | |
| 885 | ||
| 884 | TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_timer_clear_cb) | |
| 886 | 885 | { |
| 887 | segas24_state *state = timer.machine().driver_data<segas24_state>(); | |
| 888 | state->irq_sprite = state->irq_vblank = 0; | |
| 889 | timer.machine().device("maincpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE); | |
| 890 | timer.machine().device("maincpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE); | |
| 891 | timer.machine().device("subcpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE); | |
| 892 | timer.machine().device("subcpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE); | |
| 886 | irq_sprite = irq_vblank = 0; | |
| 887 | machine().device("maincpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE); | |
| 888 | machine().device("maincpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE); | |
| 889 | machine().device("subcpu")->execute().set_input_line(IRQ_VBLANK+1, CLEAR_LINE); | |
| 890 | machine().device("subcpu")->execute().set_input_line(IRQ_SPRITE+1, CLEAR_LINE); | |
| 893 | 891 | } |
| 894 | 892 | |
| 895 | ||
| 893 | TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_frc_cb) | |
| 896 | 894 | { |
| 897 | segas24_state *state = timer.machine().driver_data<segas24_state>(); | |
| 895 | if(irq_allow0 & (1 << IRQ_FRC) && frc_mode == 1) | |
| 896 | machine().device("maincpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE); | |
| 898 | 897 | |
| 899 | if(state->irq_allow0 & (1 << IRQ_FRC) && state->frc_mode == 1) | |
| 900 | timer.machine().device("maincpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE); | |
| 901 | ||
| 902 | if(state->irq_allow1 & (1 << IRQ_FRC) && state->frc_mode == 1) | |
| 903 | timer.machine().device("subcpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE); | |
| 898 | if(irq_allow1 & (1 << IRQ_FRC) && frc_mode == 1) | |
| 899 | machine().device("subcpu")->execute().set_input_line(IRQ_FRC+1, ASSERT_LINE); | |
| 904 | 900 | } |
| 905 | 901 | |
| 906 | 902 | void segas24_state::irq_init() |
| r18137 | r18138 | |
| 985 | 981 | return irq_tval & 0xfff; |
| 986 | 982 | } |
| 987 | 983 | |
| 988 | ||
| 984 | TIMER_DEVICE_CALLBACK_MEMBER(segas24_state::irq_vbl) | |
| 989 | 985 | { |
| 990 | segas24_state *state = timer.machine().driver_data<segas24_state>(); | |
| 991 | 986 | int irq, mask; |
| 992 | 987 | int scanline = param; |
| 993 | 988 | |
| 994 | 989 | /* TODO: perhaps vblank irq happens at 400, sprite IRQ certainly don't at 0! */ |
| 995 | if(scanline == 0) { irq = IRQ_SPRITE; state->irq_sprite = 1; } | |
| 996 | else if(scanline == 384) { irq = IRQ_VBLANK; state->irq_vblank = 1; } | |
| 990 | if(scanline == 0) { irq = IRQ_SPRITE; irq_sprite = 1; } | |
| 991 | else if(scanline == 384) { irq = IRQ_VBLANK; irq_vblank = 1; } | |
| 997 | 992 | else |
| 998 | 993 | return; |
| 999 | 994 | |
| 1000 | | |
| 995 | irq_timer_clear->adjust(attotime::from_hz(HSYNC_CLOCK)); | |
| 1001 | 996 | |
| 1002 | 997 | mask = 1 << irq; |
| 1003 | 998 | |
| 1004 | if(state->irq_allow0 & mask) | |
| 1005 | timer.machine().device("maincpu")->execute().set_input_line(1+irq, ASSERT_LINE); | |
| 999 | if(irq_allow0 & mask) | |
| 1000 | machine().device("maincpu")->execute().set_input_line(1+irq, ASSERT_LINE); | |
| 1006 | 1001 | |
| 1007 | if(state->irq_allow1 & mask) | |
| 1008 | timer.machine().device("subcpu")->execute().set_input_line(1+irq, ASSERT_LINE); | |
| 1002 | if(irq_allow1 & mask) | |
| 1003 | machine().device("subcpu")->execute().set_input_line(1+irq, ASSERT_LINE); | |
| 1009 | 1004 | |
| 1010 | 1005 | if(scanline == 384) { |
| 1011 | 1006 | // Ensure one index pulse every 20 frames |
| 1012 | 1007 | // The is some code in bnzabros at 0x852 that makes it crash |
| 1013 | 1008 | // if the pulse train is too fast |
| 1014 | state->fdc_index_count++; | |
| 1015 | if(state->fdc_index_count >= 20) | |
| 1016 | state->fdc_index_count = 0; | |
| 1009 | fdc_index_count++; | |
| 1010 | if(fdc_index_count >= 20) | |
| 1011 | fdc_index_count = 0; | |
| 1017 | 1012 | } |
| 1018 | 1013 | |
| 1019 | state->irq_timer_sync(); | |
| 1020 | state->irq_vsynctime = timer.machine().time(); | |
| 1014 | irq_timer_sync(); | |
| 1015 | irq_vsynctime = machine().time(); | |
| 1021 | 1016 | } |
| 1022 | 1017 | |
| 1023 | 1018 | static void irq_ym(device_t *device, int irq) |
| r18137 | r18138 | |
| 1946 | 1941 | /* basic machine hardware */ |
| 1947 | 1942 | MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK/2) |
| 1948 | 1943 | MCFG_CPU_PROGRAM_MAP(system24_cpu1_map) |
| 1949 | MCFG_TIMER_ADD_SCANLINE("scantimer", irq_vbl, "screen", 0, 1) | |
| 1944 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", segas24_state, irq_vbl, "screen", 0, 1) | |
| 1950 | 1945 | |
| 1951 | 1946 | MCFG_CPU_ADD("subcpu", M68000, MASTER_CLOCK/2) |
| 1952 | 1947 | MCFG_CPU_PROGRAM_MAP(system24_cpu2_map) |
| r18137 | r18138 | |
| 1954 | 1949 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 1955 | 1950 | |
| 1956 | 1951 | |
| 1957 | MCFG_TIMER_ADD("irq_timer", irq_timer_cb) | |
| 1958 | MCFG_TIMER_ADD("irq_timer_clear", irq_timer_clear_cb) | |
| 1952 | MCFG_TIMER_DRIVER_ADD("irq_timer", segas24_state, irq_timer_cb) | |
| 1953 | MCFG_TIMER_DRIVER_ADD("irq_timer_clear", segas24_state, irq_timer_clear_cb) | |
| 1959 | 1954 | MCFG_TIMER_ADD_NONE("frc_timer") |
| 1960 | MCFG_TIMER_ADD_PERIODIC("irq_frc", irq_frc_cb, attotime::from_hz(FRC_CLOCK_MODE1)) | |
| 1955 | MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_frc", segas24_state, irq_frc_cb, attotime::from_hz(FRC_CLOCK_MODE1)) | |
| 1961 | 1956 | |
| 1962 | 1957 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 1963 | 1958 |
| r18137 | r18138 | |
|---|---|---|
| 1000 | 1000 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 28*8-1) |
| 1001 | 1001 | MACHINE_CONFIG_END |
| 1002 | 1002 | |
| 1003 | ||
| 1003 | TIMER_DEVICE_CALLBACK_MEMBER(cosmic_state::panic_scanline) | |
| 1004 | 1004 | { |
| 1005 | 1005 | int scanline = param; |
| 1006 | 1006 | |
| 1007 | 1007 | if(scanline == 224) // vblank-out irq |
| 1008 | | |
| 1008 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */ | |
| 1009 | 1009 | |
| 1010 | 1010 | if(scanline == 0) // vblank-in irq |
| 1011 | | |
| 1011 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */ | |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| 1014 | 1014 | |
| r18137 | r18138 | |
| 1017 | 1017 | /* basic machine hardware */ |
| 1018 | 1018 | MCFG_CPU_MODIFY("maincpu") |
| 1019 | 1019 | MCFG_CPU_PROGRAM_MAP(panic_map) |
| 1020 | MCFG_TIMER_ADD_SCANLINE("scantimer", panic_scanline, "screen", 0, 1) | |
| 1020 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cosmic_state, panic_scanline, "screen", 0, 1) | |
| 1021 | 1021 | |
| 1022 | 1022 | /* video hardware */ |
| 1023 | 1023 | MCFG_GFXDECODE(panic) |
| r18137 | r18138 | |
|---|---|---|
| 288 | 288 | m_timerrun[offset] = 1; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | ||
| 291 | TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_timer_cb) | |
| 292 | 292 | { |
| 293 | model2_state *state = timer.machine().driver_data<model2_state>(); | |
| 294 | 293 | int tnum = (int)(FPTR)ptr; |
| 295 | 294 | int bit = tnum + 2; |
| 296 | 295 | |
| 297 | | |
| 296 | m_timers[tnum]->reset(); | |
| 298 | 297 | |
| 299 | state->m_intreq |= (1<<bit); | |
| 300 | if (state->m_intena & (1<<bit)) | |
| 298 | m_intreq |= (1<<bit); | |
| 299 | if (m_intena & (1<<bit)) | |
| 301 | 300 | { |
| 302 | | |
| 301 | machine().device("maincpu")->execute().set_input_line(I960_IRQ2, ASSERT_LINE); | |
| 303 | 302 | } |
| 304 | 303 | |
| 305 | state->m_timervals[tnum] = 0; | |
| 306 | state->m_timerrun[tnum] = 0; | |
| 304 | m_timervals[tnum] = 0; | |
| 305 | m_timerrun[tnum] = 0; | |
| 307 | 306 | } |
| 308 | 307 | |
| 309 | 308 | MACHINE_START_MEMBER(model2_state,model2) |
| r18137 | r18138 | |
| 1746 | 1745 | PORT_BIT( 0x00ff, 0x0000, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_PLAYER(1) |
| 1747 | 1746 | INPUT_PORTS_END |
| 1748 | 1747 | |
| 1749 | ||
| 1748 | TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2_interrupt) | |
| 1750 | 1749 | { |
| 1751 | model2_state *state = timer.machine().driver_data<model2_state>(); | |
| 1752 | 1750 | int scanline = param; |
| 1753 | 1751 | |
| 1754 | 1752 | if(scanline == 0) // 384 |
| 1755 | 1753 | { |
| 1756 | state->m_intreq |= (1<<10); | |
| 1757 | if (state->m_intena & (1<<10)) | |
| 1758 | state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); | |
| 1754 | m_intreq |= (1<<10); | |
| 1755 | if (m_intena & (1<<10)) | |
| 1756 | m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); | |
| 1759 | 1757 | } |
| 1760 | 1758 | |
| 1761 | 1759 | if(scanline == 384/2) |
| 1762 | 1760 | { |
| 1763 | state->m_intreq |= (1<<0); | |
| 1764 | if (state->m_intena & (1<<0)) | |
| 1765 | state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); | |
| 1761 | m_intreq |= (1<<0); | |
| 1762 | if (m_intena & (1<<0)) | |
| 1763 | m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); | |
| 1766 | 1764 | } |
| 1767 | 1765 | } |
| 1768 | 1766 | |
| 1769 | ||
| 1767 | TIMER_DEVICE_CALLBACK_MEMBER(model2_state::model2c_interrupt) | |
| 1770 | 1768 | { |
| 1771 | model2_state *state = timer.machine().driver_data<model2_state>(); | |
| 1772 | 1769 | int scanline = param; |
| 1773 | 1770 | |
| 1774 | 1771 | if(scanline == 0) // 384 |
| 1775 | 1772 | { |
| 1776 | state->m_intreq |= (1<<10); | |
| 1777 | if (state->m_intena & (1<<10)) | |
| 1778 | state->m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); | |
| 1773 | m_intreq |= (1<<10); | |
| 1774 | if (m_intena & (1<<10)) | |
| 1775 | m_maincpu->set_input_line(I960_IRQ3, ASSERT_LINE); | |
| 1779 | 1776 | } |
| 1780 | 1777 | |
| 1781 | 1778 | if(scanline == 256) |
| 1782 | 1779 | { |
| 1783 | state->m_intreq |= (1<<2); | |
| 1784 | if (state->m_intena & (1<<2)) | |
| 1785 | state->m_maincpu->set_input_line(I960_IRQ2, ASSERT_LINE); | |
| 1780 | m_intreq |= (1<<2); | |
| 1781 | if (m_intena & (1<<2)) | |
| 1782 | m_maincpu->set_input_line(I960_IRQ2, ASSERT_LINE); | |
| 1786 | 1783 | } |
| 1787 | 1784 | |
| 1788 | 1785 | if(scanline == 128) |
| 1789 | 1786 | { |
| 1790 | state->m_intreq |= (1<<0); | |
| 1791 | if (state->m_intena & (1<<0)) | |
| 1792 | state->m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); | |
| 1787 | m_intreq |= (1<<0); | |
| 1788 | if (m_intena & (1<<0)) | |
| 1789 | m_maincpu->set_input_line(I960_IRQ0, ASSERT_LINE); | |
| 1793 | 1790 | } |
| 1794 | 1791 | } |
| 1795 | 1792 | |
| r18137 | r18138 | |
| 1967 | 1964 | static MACHINE_CONFIG_START( model2o, model2_state ) |
| 1968 | 1965 | MCFG_CPU_ADD("maincpu", I960, 25000000) |
| 1969 | 1966 | MCFG_CPU_PROGRAM_MAP(model2o_mem) |
| 1970 | MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1) | |
| 1967 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1) | |
| 1971 | 1968 | |
| 1972 | 1969 | MCFG_CPU_ADD("audiocpu", M68000, 10000000) |
| 1973 | 1970 | MCFG_CPU_PROGRAM_MAP(model1_snd) |
| r18137 | r18138 | |
| 1983 | 1980 | MCFG_NVRAM_ADD_1FILL("backup1") |
| 1984 | 1981 | MCFG_NVRAM_ADD_1FILL("backup2") |
| 1985 | 1982 | |
| 1986 | MCFG_TIMER_ADD("timer0", model2_timer_cb) | |
| 1983 | MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) | |
| 1987 | 1984 | MCFG_TIMER_PTR((FPTR)0) |
| 1988 | MCFG_TIMER_ADD("timer1", model2_timer_cb) | |
| 1985 | MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) | |
| 1989 | 1986 | MCFG_TIMER_PTR((FPTR)1) |
| 1990 | MCFG_TIMER_ADD("timer2", model2_timer_cb) | |
| 1987 | MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) | |
| 1991 | 1988 | MCFG_TIMER_PTR((FPTR)2) |
| 1992 | MCFG_TIMER_ADD("timer3", model2_timer_cb) | |
| 1989 | MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) | |
| 1993 | 1990 | MCFG_TIMER_PTR((FPTR)3) |
| 1994 | 1991 | |
| 1995 | 1992 | MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) |
| r18137 | r18138 | |
| 2026 | 2023 | static MACHINE_CONFIG_START( model2a, model2_state ) |
| 2027 | 2024 | MCFG_CPU_ADD("maincpu", I960, 25000000) |
| 2028 | 2025 | MCFG_CPU_PROGRAM_MAP(model2a_crx_mem) |
| 2029 | MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1) | |
| 2026 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1) | |
| 2030 | 2027 | |
| 2031 | 2028 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 2032 | 2029 | MCFG_CPU_PROGRAM_MAP(model2_snd) |
| r18137 | r18138 | |
| 2041 | 2038 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2042 | 2039 | MCFG_NVRAM_ADD_1FILL("backup1") |
| 2043 | 2040 | |
| 2044 | MCFG_TIMER_ADD("timer0", model2_timer_cb) | |
| 2041 | MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) | |
| 2045 | 2042 | MCFG_TIMER_PTR((FPTR)0) |
| 2046 | MCFG_TIMER_ADD("timer1", model2_timer_cb) | |
| 2043 | MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) | |
| 2047 | 2044 | MCFG_TIMER_PTR((FPTR)1) |
| 2048 | MCFG_TIMER_ADD("timer2", model2_timer_cb) | |
| 2045 | MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) | |
| 2049 | 2046 | MCFG_TIMER_PTR((FPTR)2) |
| 2050 | MCFG_TIMER_ADD("timer3", model2_timer_cb) | |
| 2047 | MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) | |
| 2051 | 2048 | MCFG_TIMER_PTR((FPTR)3) |
| 2052 | 2049 | |
| 2053 | 2050 | MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) |
| r18137 | r18138 | |
| 2123 | 2120 | static MACHINE_CONFIG_START( model2b, model2_state ) |
| 2124 | 2121 | MCFG_CPU_ADD("maincpu", I960, 25000000) |
| 2125 | 2122 | MCFG_CPU_PROGRAM_MAP(model2b_crx_mem) |
| 2126 | MCFG_TIMER_ADD_SCANLINE("scantimer", model2_interrupt, "screen", 0, 1) | |
| 2123 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2_interrupt, "screen", 0, 1) | |
| 2127 | 2124 | |
| 2128 | 2125 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 2129 | 2126 | MCFG_CPU_PROGRAM_MAP(model2_snd) |
| r18137 | r18138 | |
| 2144 | 2141 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2145 | 2142 | MCFG_NVRAM_ADD_1FILL("backup1") |
| 2146 | 2143 | |
| 2147 | MCFG_TIMER_ADD("timer0", model2_timer_cb) | |
| 2144 | MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) | |
| 2148 | 2145 | MCFG_TIMER_PTR((FPTR)0) |
| 2149 | MCFG_TIMER_ADD("timer1", model2_timer_cb) | |
| 2146 | MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) | |
| 2150 | 2147 | MCFG_TIMER_PTR((FPTR)1) |
| 2151 | MCFG_TIMER_ADD("timer2", model2_timer_cb) | |
| 2148 | MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) | |
| 2152 | 2149 | MCFG_TIMER_PTR((FPTR)2) |
| 2153 | MCFG_TIMER_ADD("timer3", model2_timer_cb) | |
| 2150 | MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) | |
| 2154 | 2151 | MCFG_TIMER_PTR((FPTR)3) |
| 2155 | 2152 | |
| 2156 | 2153 | MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) |
| r18137 | r18138 | |
| 2180 | 2177 | static MACHINE_CONFIG_START( model2c, model2_state ) |
| 2181 | 2178 | MCFG_CPU_ADD("maincpu", I960, 25000000) |
| 2182 | 2179 | MCFG_CPU_PROGRAM_MAP(model2c_crx_mem) |
| 2183 | MCFG_TIMER_ADD_SCANLINE("scantimer", model2c_interrupt, "screen", 0, 1) | |
| 2180 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model2_state, model2c_interrupt, "screen", 0, 1) | |
| 2184 | 2181 | |
| 2185 | 2182 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 2186 | 2183 | MCFG_CPU_PROGRAM_MAP(model2_snd) |
| r18137 | r18138 | |
| 2191 | 2188 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2192 | 2189 | MCFG_NVRAM_ADD_1FILL("backup1") |
| 2193 | 2190 | |
| 2194 | MCFG_TIMER_ADD("timer0", model2_timer_cb) | |
| 2191 | MCFG_TIMER_DRIVER_ADD("timer0", model2_state, model2_timer_cb) | |
| 2195 | 2192 | MCFG_TIMER_PTR((FPTR)0) |
| 2196 | MCFG_TIMER_ADD("timer1", model2_timer_cb) | |
| 2193 | MCFG_TIMER_DRIVER_ADD("timer1", model2_state, model2_timer_cb) | |
| 2197 | 2194 | MCFG_TIMER_PTR((FPTR)1) |
| 2198 | MCFG_TIMER_ADD("timer2", model2_timer_cb) | |
| 2195 | MCFG_TIMER_DRIVER_ADD("timer2", model2_state, model2_timer_cb) | |
| 2199 | 2196 | MCFG_TIMER_PTR((FPTR)2) |
| 2200 | MCFG_TIMER_ADD("timer3", model2_timer_cb) | |
| 2197 | MCFG_TIMER_DRIVER_ADD("timer3", model2_state, model2_timer_cb) | |
| 2201 | 2198 | MCFG_TIMER_PTR((FPTR)3) |
| 2202 | 2199 | |
| 2203 | 2200 | MCFG_S24TILE_DEVICE_ADD("tile", 0x3fff) |
| r18137 | r18138 | |
|---|---|---|
| 1683 | 1683 | return m_mSerialDataSlaveToMasterCurrent; |
| 1684 | 1684 | } |
| 1685 | 1685 | |
| 1686 | ||
| 1686 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::dsp_master_serial_irq) | |
| 1687 | 1687 | { |
| 1688 | namcos22_state *state = timer.machine().driver_data<namcos22_state>(); | |
| 1689 | 1688 | int scanline = param; |
| 1690 | 1689 | |
| 1691 | if( | |
| 1690 | if( m_mbEnableDspIrqs ) | |
| 1692 | 1691 | { |
| 1693 | | |
| 1692 | m_mSerialDataSlaveToMasterCurrent = m_mSerialDataSlaveToMasterNext; | |
| 1694 | 1693 | |
| 1695 | 1694 | if(scanline == 480) |
| 1696 | | |
| 1695 | m_master->set_input_line(TMS32025_INT0, HOLD_LINE); | |
| 1697 | 1696 | else if((scanline % 2) == 0) |
| 1698 | 1697 | { |
| 1699 | state->m_master->set_input_line(TMS32025_RINT, HOLD_LINE); | |
| 1700 | state->m_master->set_input_line(TMS32025_XINT, HOLD_LINE); | |
| 1698 | m_master->set_input_line(TMS32025_RINT, HOLD_LINE); | |
| 1699 | m_master->set_input_line(TMS32025_XINT, HOLD_LINE); | |
| 1701 | 1700 | } |
| 1702 | 1701 | } |
| 1703 | 1702 | } |
| 1704 | 1703 | |
| 1705 | ||
| 1704 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::dsp_slave_serial_irq) | |
| 1706 | 1705 | { |
| 1707 | namcos22_state *state = timer.machine().driver_data<namcos22_state>(); | |
| 1708 | 1706 | int scanline = param; |
| 1709 | 1707 | |
| 1710 | if( | |
| 1708 | if( m_mbEnableDspIrqs ) | |
| 1711 | 1709 | { |
| 1712 | 1710 | if((scanline % 2) == 0) |
| 1713 | 1711 | { |
| 1714 | state->m_slave->set_input_line(TMS32025_RINT, HOLD_LINE); | |
| 1715 | state->m_slave->set_input_line(TMS32025_XINT, HOLD_LINE); | |
| 1712 | m_slave->set_input_line(TMS32025_RINT, HOLD_LINE); | |
| 1713 | m_slave->set_input_line(TMS32025_XINT, HOLD_LINE); | |
| 1716 | 1714 | } |
| 1717 | 1715 | } |
| 1718 | 1716 | } |
| r18137 | r18138 | |
| 2920 | 2918 | AM_RANGE(M37710_PORT4, M37710_PORT4) AM_READ(mcu_port4_s22_r ) |
| 2921 | 2919 | ADDRESS_MAP_END |
| 2922 | 2920 | |
| 2923 | ||
| 2921 | TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::mcu_irq) | |
| 2924 | 2922 | { |
| 2925 | namcos22_state *state = timer.machine().driver_data<namcos22_state>(); | |
| 2926 | 2923 | int scanline = param; |
| 2927 | 2924 | |
| 2928 | 2925 | /* TODO: real sources of these */ |
| 2929 | 2926 | if(scanline == 480) |
| 2930 | | |
| 2927 | m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); | |
| 2931 | 2928 | else if(scanline == 500) |
| 2932 | | |
| 2929 | m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); | |
| 2933 | 2930 | else if(scanline == 0) |
| 2934 | | |
| 2931 | m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); | |
| 2935 | 2932 | } |
| 2936 | 2933 | |
| 2937 | 2934 | void namcos22_state::machine_reset() |
| r18137 | r18138 | |
| 2948 | 2945 | MCFG_CPU_PROGRAM_MAP(master_dsp_program) |
| 2949 | 2946 | MCFG_CPU_DATA_MAP(master_dsp_data) |
| 2950 | 2947 | MCFG_CPU_IO_MAP(master_dsp_io) |
| 2951 | MCFG_TIMER_ADD_SCANLINE("master_st", dsp_master_serial_irq, "screen", 0, 1) | |
| 2948 | MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1) | |
| 2952 | 2949 | |
| 2953 | 2950 | MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK) |
| 2954 | 2951 | MCFG_CPU_PROGRAM_MAP(slave_dsp_program) |
| 2955 | 2952 | MCFG_CPU_DATA_MAP(slave_dsp_data) |
| 2956 | 2953 | MCFG_CPU_IO_MAP(slave_dsp_io) |
| 2957 | MCFG_TIMER_ADD_SCANLINE("slave_st", dsp_slave_serial_irq, "screen", 0, 1) | |
| 2954 | MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1) | |
| 2958 | 2955 | |
| 2959 | 2956 | MCFG_CPU_ADD("mcu", M37710, SS22_MASTER_CLOCK/3) |
| 2960 | 2957 | MCFG_CPU_PROGRAM_MAP(mcu_program) |
| 2961 | 2958 | MCFG_CPU_IO_MAP( mcu_io) |
| 2962 | MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_irq, "screen", 0, 1) | |
| 2959 | MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namcos22_state, mcu_irq, "screen", 0, 1) | |
| 2963 | 2960 | |
| 2964 | 2961 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 2965 | 2962 | // MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| r18137 | r18138 | |
| 3199 | 3196 | MCFG_CPU_PROGRAM_MAP(master_dsp_program) |
| 3200 | 3197 | MCFG_CPU_DATA_MAP(master_dsp_data) |
| 3201 | 3198 | MCFG_CPU_IO_MAP(master_dsp_io) |
| 3202 | MCFG_TIMER_ADD_SCANLINE("master_st", dsp_master_serial_irq, "screen", 0, 1) | |
| 3199 | MCFG_TIMER_DRIVER_ADD_SCANLINE("master_st", namcos22_state, dsp_master_serial_irq, "screen", 0, 1) | |
| 3203 | 3200 | |
| 3204 | 3201 | MCFG_CPU_ADD("slave", TMS32025,SS22_MASTER_CLOCK) /* ? */ |
| 3205 | 3202 | MCFG_CPU_PROGRAM_MAP(slave_dsp_program) |
| 3206 | 3203 | MCFG_CPU_DATA_MAP(slave_dsp_data) |
| 3207 | 3204 | MCFG_CPU_IO_MAP(slave_dsp_io) |
| 3208 | MCFG_TIMER_ADD_SCANLINE("slave_st", dsp_slave_serial_irq, "screen", 0, 1) | |
| 3205 | MCFG_TIMER_DRIVER_ADD_SCANLINE("slave_st", namcos22_state, dsp_slave_serial_irq, "screen", 0, 1) | |
| 3209 | 3206 | |
| 3210 | 3207 | MCFG_CPU_ADD("mcu", M37702, SS22_MASTER_CLOCK/3) // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0 |
| 3211 | 3208 | MCFG_CPU_PROGRAM_MAP( mcu_s22_program) |
| r18137 | r18138 | |
|---|---|---|
| 2179 | 2179 | MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL) |
| 2180 | 2180 | MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback) |
| 2181 | 2181 | |
| 2182 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 2182 | MCFG_TIMER_DRIVER_ADD("int_timer", galaxold_state, galaxold_interrupt_timer) | |
| 2183 | 2183 | |
| 2184 | 2184 | /* video hardware */ |
| 2185 | 2185 | MCFG_GFXDECODE(galaxian) |
| r18137 | r18138 | |
|---|---|---|
| 250 | 250 | * |
| 251 | 251 | *************************************/ |
| 252 | 252 | |
| 253 | ||
| 253 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::delayed_joystick_int) | |
| 254 | 254 | { |
| 255 | atarisy1_state *state = timer.machine().driver_data<atarisy1_state>(); | |
| 256 | state->m_joystick_value = param; | |
| 257 | state->m_joystick_int = 1; | |
| 258 | atarigen_update_interrupts(timer.machine()); | |
| 255 | m_joystick_value = param; | |
| 256 | m_joystick_int = 1; | |
| 257 | atarigen_update_interrupts(machine()); | |
| 259 | 258 | } |
| 260 | 259 | |
| 261 | 260 | |
| r18137 | r18138 | |
| 771 | 770 | MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1) |
| 772 | 771 | MCFG_NVRAM_ADD_1FILL("eeprom") |
| 773 | 772 | |
| 774 | MCFG_TIMER_ADD("joystick_timer", delayed_joystick_int) | |
| 775 | MCFG_TIMER_ADD("scan_timer", atarisy1_int3_callback) | |
| 776 | MCFG_TIMER_ADD("int3off_timer", atarisy1_int3off_callback) | |
| 777 | MCFG_TIMER_ADD("yreset_timer", atarisy1_reset_yscroll_callback) | |
| 773 | MCFG_TIMER_DRIVER_ADD("joystick_timer", atarisy1_state, delayed_joystick_int) | |
| 774 | MCFG_TIMER_DRIVER_ADD("scan_timer", atarisy1_state, atarisy1_int3_callback) | |
| 775 | MCFG_TIMER_DRIVER_ADD("int3off_timer", atarisy1_state, atarisy1_int3off_callback) | |
| 776 | MCFG_TIMER_DRIVER_ADD("yreset_timer", atarisy1_state, atarisy1_reset_yscroll_callback) | |
| 778 | 777 | |
| 779 | 778 | /* video hardware */ |
| 780 | 779 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r18137 | r18138 | |
|---|---|---|
| 288 | 288 | /* basic machine hardware */ |
| 289 | 289 | MCFG_CPU_ADD("maincpu", M68000, 30000000/2) /* 15 MHz */ |
| 290 | 290 | MCFG_CPU_PROGRAM_MAP(bang_map) |
| 291 | MCFG_TIMER_ADD_SCANLINE("scantimer", bang_irq, "screen", 0, 1) | |
| 291 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gaelco2_state, bang_irq, "screen", 0, 1) | |
| 292 | 292 | |
| 293 | 293 | MCFG_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) |
| 294 | 294 |
| r18137 | r18138 | |
|---|---|---|
| 307 | 307 | m_raster_scanline = data; /* guess, 0 is always written */ |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | ||
| 310 | TIMER_DEVICE_CALLBACK_MEMBER(shadfrce_state::shadfrce_scanline) | |
| 311 | 311 | { |
| 312 | shadfrce_state *state = timer.machine().driver_data<shadfrce_state>(); | |
| 313 | 312 | int scanline = param; |
| 314 | 313 | |
| 315 | 314 | /* Vblank is lowered on scanline 0 */ |
| 316 | 315 | if (scanline == 0) |
| 317 | 316 | { |
| 318 | | |
| 317 | m_vblank = 0; | |
| 319 | 318 | } |
| 320 | 319 | /* Hack */ |
| 321 | 320 | else if (scanline == (248-1)) /* -1 is an hack needed to avoid deadlocks */ |
| 322 | 321 | { |
| 323 | | |
| 322 | m_vblank = 4; | |
| 324 | 323 | } |
| 325 | 324 | |
| 326 | 325 | /* Raster interrupt - Perform raster effect on given scanline */ |
| 327 | if ( | |
| 326 | if (m_raster_irq_enable) | |
| 328 | 327 | { |
| 329 | if (scanline == | |
| 328 | if (scanline == m_raster_scanline) | |
| 330 | 329 | { |
| 331 | state->m_raster_scanline = (state->m_raster_scanline + 1) % 240; | |
| 332 | if (state->m_raster_scanline > 0) | |
| 333 | timer.machine().primary_screen->update_partial(state->m_raster_scanline - 1); | |
| 334 | timer.machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE); | |
| 330 | m_raster_scanline = (m_raster_scanline + 1) % 240; | |
| 331 | if (m_raster_scanline > 0) | |
| 332 | machine().primary_screen->update_partial(m_raster_scanline - 1); | |
| 333 | machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE); | |
| 335 | 334 | } |
| 336 | 335 | } |
| 337 | 336 | |
| 338 | 337 | /* An interrupt is generated every 16 scanlines */ |
| 339 | if ( | |
| 338 | if (m_irqs_enable) | |
| 340 | 339 | { |
| 341 | 340 | if (scanline % 16 == 0) |
| 342 | 341 | { |
| 343 | 342 | if (scanline > 0) |
| 344 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 345 | timer.machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE); | |
| 343 | machine().primary_screen->update_partial(scanline - 1); | |
| 344 | machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE); | |
| 346 | 345 | } |
| 347 | 346 | } |
| 348 | 347 | |
| 349 | 348 | /* Vblank is raised on scanline 248 */ |
| 350 | if ( | |
| 349 | if (m_irqs_enable) | |
| 351 | 350 | { |
| 352 | 351 | if (scanline == 248) |
| 353 | 352 | { |
| 354 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 355 | timer.machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); | |
| 353 | machine().primary_screen->update_partial(scanline - 1); | |
| 354 | machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); | |
| 356 | 355 | } |
| 357 | 356 | } |
| 358 | 357 | } |
| r18137 | r18138 | |
| 558 | 557 | |
| 559 | 558 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* verified on pcb */ |
| 560 | 559 | MCFG_CPU_PROGRAM_MAP(shadfrce_map) |
| 561 | MCFG_TIMER_ADD_SCANLINE("scantimer", shadfrce_scanline, "screen", 0, 1) | |
| 560 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", shadfrce_state, shadfrce_scanline, "screen", 0, 1) | |
| 562 | 561 | |
| 563 | 562 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ |
| 564 | 563 | MCFG_CPU_PROGRAM_MAP(shadfrce_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 417 | 417 | // GFXDECODE_ENTRY( NULL, 0, charlayout, 0, 16*4 ) |
| 418 | 418 | GFXDECODE_END |
| 419 | 419 | |
| 420 | ||
| 420 | TIMER_DEVICE_CALLBACK_MEMBER(st0016_state::st0016_int) | |
| 421 | 421 | { |
| 422 | st0016_state *state = timer.machine().driver_data<st0016_state>(); | |
| 423 | 422 | int scanline = param; |
| 424 | 423 | |
| 425 | 424 | if(scanline == 240) |
| 426 | | |
| 425 | m_maincpu->set_input_line(0,HOLD_LINE); | |
| 427 | 426 | else if((scanline % 64) == 0) |
| 428 | if(state->m_maincpu->state_int(Z80_IFF1)) /* dirty hack ... */ | |
| 429 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); | |
| 427 | if(m_maincpu->state_int(Z80_IFF1)) /* dirty hack ... */ | |
| 428 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); | |
| 430 | 429 | } |
| 431 | 430 | |
| 432 | 431 | static const st0016_interface st0016_config = |
| r18137 | r18138 | |
| 446 | 445 | MCFG_CPU_ADD("maincpu",Z80,8000000) /* 8 MHz ? */ |
| 447 | 446 | MCFG_CPU_PROGRAM_MAP(st0016_mem) |
| 448 | 447 | MCFG_CPU_IO_MAP(st0016_io) |
| 449 | MCFG_TIMER_ADD_SCANLINE("scantimer", st0016_int, "screen", 0, 1) | |
| 448 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", st0016_state, st0016_int, "screen", 0, 1) | |
| 450 | 449 | |
| 451 | 450 | /* video hardware */ |
| 452 | 451 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 413 | 413 | /* basic machine hardware */ |
| 414 | 414 | MCFG_CPU_ADD("maincpu", M6502,12000000/6) /* 2MHz ? */ |
| 415 | 415 | MCFG_CPU_PROGRAM_MAP(spdodgeb_map) |
| 416 | MCFG_TIMER_ADD_SCANLINE("scantimer", spdodgeb_interrupt, "screen", 0, 1) /* 1 IRQ every 8 visible scanlines, plus NMI for vblank */ | |
| 416 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", spdodgeb_state, spdodgeb_interrupt, "screen", 0, 1) /* 1 IRQ every 8 visible scanlines, plus NMI for vblank */ | |
| 417 | 417 | |
| 418 | 418 | MCFG_CPU_ADD("audiocpu", M6809,12000000/6) /* 2MHz ? */ |
| 419 | 419 | MCFG_CPU_PROGRAM_MAP(spdodgeb_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 16 | 16 | #include "includes/higemaru.h" |
| 17 | 17 | |
| 18 | 18 | |
| 19 | ||
| 19 | TIMER_DEVICE_CALLBACK_MEMBER(higemaru_state::higemaru_scanline) | |
| 20 | 20 | { |
| 21 | 21 | int scanline = param; |
| 22 | 22 | |
| 23 | 23 | if(scanline == 240) // vblank-out irq |
| 24 | | |
| 24 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h - vblank */ | |
| 25 | 25 | |
| 26 | 26 | if(scanline == 0) // unknown irq event, does various stuff like copying the spriteram |
| 27 | | |
| 27 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h */ | |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
| r18137 | r18138 | |
| 162 | 162 | /* basic machine hardware */ |
| 163 | 163 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/4) /* 3 MHz Sharp LH0080A Z80A-CPU-D */ |
| 164 | 164 | MCFG_CPU_PROGRAM_MAP(higemaru_map) |
| 165 | MCFG_TIMER_ADD_SCANLINE("scantimer", higemaru_scanline, "screen", 0, 1) | |
| 165 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", higemaru_state, higemaru_scanline, "screen", 0, 1) | |
| 166 | 166 | |
| 167 | 167 | /* video hardware */ |
| 168 | 168 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 327 | 327 | |
| 328 | 328 | ***************************************************************************/ |
| 329 | 329 | |
| 330 | ||
| 330 | TIMER_DEVICE_CALLBACK_MEMBER(psychic5_state::psychic5_scanline) | |
| 331 | 331 | { |
| 332 | 332 | int scanline = param; |
| 333 | 333 | |
| 334 | 334 | if(scanline == 240) // vblank-out irq |
| 335 | | |
| 335 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */ | |
| 336 | 336 | |
| 337 | 337 | if(scanline == 0) // sprite buffer irq |
| 338 | | |
| 338 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ | |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | |
| r18137 | r18138 | |
| 663 | 663 | /* basic machine hardware */ |
| 664 | 664 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) |
| 665 | 665 | MCFG_CPU_PROGRAM_MAP(psychic5_main_map) |
| 666 | MCFG_TIMER_ADD_SCANLINE("scantimer", psychic5_scanline, "screen", 0, 1) | |
| 666 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", psychic5_state, psychic5_scanline, "screen", 0, 1) | |
| 667 | 667 | |
| 668 | 668 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/2) |
| 669 | 669 | MCFG_CPU_PROGRAM_MAP(psychic5_sound_map) |
| r18137 | r18138 | |
| 708 | 708 | /* basic machine hardware */ |
| 709 | 709 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2 ) /* 6 MHz */ |
| 710 | 710 | MCFG_CPU_PROGRAM_MAP(bombsa_main_map) |
| 711 | MCFG_TIMER_ADD_SCANLINE("scantimer", psychic5_scanline, "screen", 0, 1) | |
| 711 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", psychic5_state, psychic5_scanline, "screen", 0, 1) | |
| 712 | 712 | |
| 713 | 713 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_5MHz ) |
| 714 | 714 | MCFG_CPU_PROGRAM_MAP(bombsa_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 212 | 212 | GFXDECODE_END |
| 213 | 213 | |
| 214 | 214 | /* unknown sources ... */ |
| 215 | ||
| 215 | TIMER_DEVICE_CALLBACK_MEMBER(taitoo_state::parentj_interrupt) | |
| 216 | 216 | { |
| 217 | taitoo_state *state = timer.machine().driver_data<taitoo_state>(); | |
| 218 | 217 | int scanline = param; |
| 219 | 218 | |
| 220 | 219 | if(scanline == 448) |
| 221 | | |
| 220 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 222 | 221 | |
| 223 | 222 | if(scanline == 0) |
| 224 | | |
| 223 | m_maincpu->set_input_line(5, HOLD_LINE); | |
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 | static const ym2203_interface ym2203_config = |
| r18137 | r18138 | |
| 253 | 252 | |
| 254 | 253 | MCFG_CPU_ADD("maincpu", M68000,12000000 ) /*?? MHz */ |
| 255 | 254 | MCFG_CPU_PROGRAM_MAP(parentj_map) |
| 256 | MCFG_TIMER_ADD_SCANLINE("scantimer", parentj_interrupt, "screen", 0, 1) | |
| 255 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitoo_state, parentj_interrupt, "screen", 0, 1) | |
| 257 | 256 | |
| 258 | 257 | |
| 259 | 258 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 293 | 293 | m_color = 0; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | ||
| 296 | TIMER_DEVICE_CALLBACK_MEMBER(blockout_state::blockout_scanline) | |
| 297 | 297 | { |
| 298 | blockout_state *state = timer.machine().driver_data<blockout_state>(); | |
| 299 | 298 | int scanline = param; |
| 300 | 299 | |
| 301 | 300 | if(scanline == 248) // vblank-out irq |
| 302 | | |
| 301 | m_maincpu->set_input_line(6, ASSERT_LINE); | |
| 303 | 302 | |
| 304 | 303 | if(scanline == 0) // vblank-in irq or directly tied to coin inputs (TODO: check) |
| 305 | | |
| 304 | m_maincpu->set_input_line(5, ASSERT_LINE); | |
| 306 | 305 | } |
| 307 | 306 | |
| 308 | 307 | static MACHINE_CONFIG_START( blockout, blockout_state ) |
| r18137 | r18138 | |
| 310 | 309 | /* basic machine hardware */ |
| 311 | 310 | MCFG_CPU_ADD("maincpu", M68000, MAIN_CLOCK) /* MRH - 8.76 makes gfx/adpcm samples sync better -- but 10 is correct speed*/ |
| 312 | 311 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 313 | MCFG_TIMER_ADD_SCANLINE("scantimer", blockout_scanline, "screen", 0, 1) | |
| 312 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", blockout_state, blockout_scanline, "screen", 0, 1) | |
| 314 | 313 | |
| 315 | 314 | MCFG_CPU_ADD("audiocpu", Z80, AUDIO_CLOCK) /* 3.579545 MHz */ |
| 316 | 315 | MCFG_CPU_PROGRAM_MAP(audio_map) |
| r18137 | r18138 | |
|---|---|---|
| 55 | 55 | /* other bits unknown */ |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | ||
| 58 | TIMER_DEVICE_CALLBACK_MEMBER(pingpong_state::pingpong_interrupt) | |
| 59 | 59 | { |
| 60 | pingpong_state *state = timer.machine().driver_data<pingpong_state>(); | |
| 61 | 60 | int scanline = param; |
| 62 | 61 | |
| 63 | 62 | if (scanline == 240) |
| 64 | 63 | { |
| 65 | if ( | |
| 64 | if (m_intenable & 0x04) m_maincpu->set_input_line(0, HOLD_LINE); | |
| 66 | 65 | } |
| 67 | 66 | else if ((scanline % 32) == 0) |
| 68 | 67 | { |
| 69 | if ( | |
| 68 | if (m_intenable & 0x08) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 70 | 69 | } |
| 71 | 70 | } |
| 72 | 71 | |
| 73 | ||
| 72 | TIMER_DEVICE_CALLBACK_MEMBER(pingpong_state::merlinmm_interrupt) | |
| 74 | 73 | { |
| 75 | pingpong_state *state = timer.machine().driver_data<pingpong_state>(); | |
| 76 | 74 | int scanline = param; |
| 77 | 75 | |
| 78 | 76 | if (scanline == 240) |
| 79 | 77 | { |
| 80 | if ( | |
| 78 | if (m_intenable & 0x04) m_maincpu->set_input_line(0, HOLD_LINE); | |
| 81 | 79 | } |
| 82 | 80 | else if (scanline == 0) |
| 83 | 81 | { |
| 84 | if ( | |
| 82 | if (m_intenable & 0x08) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 85 | 83 | } |
| 86 | 84 | } |
| 87 | 85 | |
| r18137 | r18138 | |
| 464 | 462 | /* basic machine hardware */ |
| 465 | 463 | MCFG_CPU_ADD("maincpu",Z80,18432000/6) /* 3.072 MHz (probably) */ |
| 466 | 464 | MCFG_CPU_PROGRAM_MAP(pingpong_map) |
| 467 | MCFG_TIMER_ADD_SCANLINE("scantimer", pingpong_interrupt, "screen", 0, 1) | |
| 465 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pingpong_state, pingpong_interrupt, "screen", 0, 1) | |
| 468 | 466 | |
| 469 | 467 | /* video hardware */ |
| 470 | 468 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 491 | 489 | MCFG_CPU_MODIFY("maincpu") |
| 492 | 490 | MCFG_CPU_PROGRAM_MAP(merlinmm_map) |
| 493 | 491 | MCFG_TIMER_MODIFY("scantimer") |
| 494 | MCFG_TIMER_CALLBACK(merlinmm_interrupt) | |
| 492 | MCFG_TIMER_DRIVER_CALLBACK(pingpong_state, merlinmm_interrupt) | |
| 495 | 493 | |
| 496 | 494 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 497 | 495 | MACHINE_CONFIG_END |
| r18137 | r18138 | |
|---|---|---|
| 36 | 36 | #include "includes/bladestl.h" |
| 37 | 37 | |
| 38 | 38 | |
| 39 | ||
| 39 | TIMER_DEVICE_CALLBACK_MEMBER(bladestl_state::bladestl_scanline) | |
| 40 | 40 | { |
| 41 | bladestl_state *state = timer.machine().driver_data<bladestl_state>(); | |
| 42 | 41 | int scanline = param; |
| 43 | 42 | |
| 44 | if(scanline == 240 && k007342_is_int_enabled(state->m_k007342)) // vblank-out irq | |
| 45 | timer.machine().device("maincpu")->execute().set_input_line(HD6309_FIRQ_LINE, HOLD_LINE); | |
| 43 | if(scanline == 240 && k007342_is_int_enabled(m_k007342)) // vblank-out irq | |
| 44 | machine().device("maincpu")->execute().set_input_line(HD6309_FIRQ_LINE, HOLD_LINE); | |
| 46 | 45 | |
| 47 | 46 | if(scanline == 0) // vblank-in or timer irq |
| 48 | | |
| 47 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 49 | 48 | } |
| 50 | 49 | |
| 51 | 50 | /************************************* |
| r18137 | r18138 | |
| 333 | 332 | /* basic machine hardware */ |
| 334 | 333 | MCFG_CPU_ADD("maincpu", HD6309, 24000000/2) /* 24MHz/2 (?) */ |
| 335 | 334 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 336 | MCFG_TIMER_ADD_SCANLINE("scantimer", bladestl_scanline, "screen", 0, 1) | |
| 335 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bladestl_state, bladestl_scanline, "screen", 0, 1) | |
| 337 | 336 | |
| 338 | 337 | MCFG_CPU_ADD("audiocpu", M6809, 2000000) |
| 339 | 338 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 50 | 50 | srumbler_bankswitch_w(space,0,0); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | ||
| 53 | TIMER_DEVICE_CALLBACK_MEMBER(srumbler_state::srumbler_interrupt) | |
| 54 | 54 | { |
| 55 | srumbler_state *state = timer.machine().driver_data<srumbler_state>(); | |
| 56 | 55 | int scanline = param; |
| 57 | 56 | |
| 58 | 57 | if (scanline == 248) |
| 59 | | |
| 58 | m_maincpu->set_input_line(0,HOLD_LINE); | |
| 60 | 59 | |
| 61 | 60 | if (scanline == 0) |
| 62 | | |
| 61 | m_maincpu->set_input_line(M6809_FIRQ_LINE,HOLD_LINE); | |
| 63 | 62 | } |
| 64 | 63 | |
| 65 | 64 | /* |
| r18137 | r18138 | |
| 239 | 238 | /* basic machine hardware */ |
| 240 | 239 | MCFG_CPU_ADD("maincpu", M6809, 1500000) /* 1.5 MHz (?) */ |
| 241 | 240 | MCFG_CPU_PROGRAM_MAP(srumbler_map) |
| 242 | MCFG_TIMER_ADD_SCANLINE("scantimer", srumbler_interrupt, "screen", 0, 1) | |
| 241 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", srumbler_state, srumbler_interrupt, "screen", 0, 1) | |
| 243 | 242 | |
| 244 | 243 | MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz ??? */ |
| 245 | 244 | MCFG_CPU_PROGRAM_MAP(srumbler_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | ||
| 77 | TIMER_DEVICE_CALLBACK_MEMBER(overdriv_state::overdriv_cpuA_scanline) | |
| 78 | 78 | { |
| 79 | 79 | int scanline = param; |
| 80 | 80 | |
| 81 | 81 | /* TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) */ |
| 82 | 82 | /* this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow */ |
| 83 | if(scanline == 256 && timer.machine().primary_screen->frame_number() & 1) // vblank-out irq | |
| 84 | timer.machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 83 | if(scanline == 256 && machine().primary_screen->frame_number() & 1) // vblank-out irq | |
| 84 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 85 | 85 | else if((scanline % 128) == 0) // timer irq |
| 86 | | |
| 86 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt) |
| r18137 | r18138 | |
| 328 | 328 | /* basic machine hardware */ |
| 329 | 329 | MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ |
| 330 | 330 | MCFG_CPU_PROGRAM_MAP(overdriv_master_map) |
| 331 | MCFG_TIMER_ADD_SCANLINE("scantimer", overdriv_cpuA_scanline, "screen", 0, 1) | |
| 331 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", overdriv_state, overdriv_cpuA_scanline, "screen", 0, 1) | |
| 332 | 332 | |
| 333 | 333 | MCFG_CPU_ADD("sub", M68000,24000000/2) /* 12 MHz */ |
| 334 | 334 | MCFG_CPU_PROGRAM_MAP(overdriv_slave_map) |
| r18137 | r18138 | |
|---|---|---|
| 68 | 68 | m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | ||
| 71 | TIMER_DEVICE_CALLBACK_MEMBER(cninja_state::interrupt_gen) | |
| 72 | 72 | { |
| 73 | cninja_state *state = timer.machine().driver_data<cninja_state>(); | |
| 74 | ||
| 75 | state->m_maincpu->set_input_line((state->m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE); | |
| 76 | state->m_raster_irq_timer->reset(); | |
| 73 | m_maincpu->set_input_line((m_irq_mask & 0x10) ? 3 : 4, ASSERT_LINE); | |
| 74 | m_raster_irq_timer->reset(); | |
| 77 | 75 | } |
| 78 | 76 | |
| 79 | 77 | READ16_MEMBER(cninja_state::cninja_irq_r) |
| r18137 | r18138 | |
| 912 | 910 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 913 | 911 | |
| 914 | 912 | |
| 915 | MCFG_TIMER_ADD("raster_timer", interrupt_gen) | |
| 913 | MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen) | |
| 916 | 914 | |
| 917 | 915 | /* video hardware */ |
| 918 | 916 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 964 | 962 | MCFG_CPU_PROGRAM_MAP(stoneage_s_map) |
| 965 | 963 | |
| 966 | 964 | |
| 967 | MCFG_TIMER_ADD("raster_timer", interrupt_gen) | |
| 965 | MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen) | |
| 968 | 966 | |
| 969 | 967 | /* video hardware */ |
| 970 | 968 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1016 | 1014 | MCFG_CPU_PROGRAM_MAP(stoneage_s_map) |
| 1017 | 1015 | |
| 1018 | 1016 | |
| 1019 | MCFG_TIMER_ADD("raster_timer", interrupt_gen) | |
| 1017 | MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen) | |
| 1020 | 1018 | |
| 1021 | 1019 | /* video hardware */ |
| 1022 | 1020 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1059 | 1057 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 1060 | 1058 | |
| 1061 | 1059 | |
| 1062 | MCFG_TIMER_ADD("raster_timer", interrupt_gen) | |
| 1060 | MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen) | |
| 1063 | 1061 | |
| 1064 | 1062 | /* video hardware */ |
| 1065 | 1063 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1111 | 1109 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 1112 | 1110 | |
| 1113 | 1111 | |
| 1114 | MCFG_TIMER_ADD("raster_timer", interrupt_gen) | |
| 1112 | MCFG_TIMER_DRIVER_ADD("raster_timer", cninja_state, interrupt_gen) | |
| 1115 | 1113 | |
| 1116 | 1114 | /* video hardware */ |
| 1117 | 1115 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | |
| 109 | ||
| 109 | TIMER_DEVICE_CALLBACK_MEMBER(gradius3_state::gradius3_sub_scanline) | |
| 110 | 110 | { |
| 111 | gradius3_state *state = timer.machine().driver_data<gradius3_state>(); | |
| 112 | 111 | int scanline = param; |
| 113 | 112 | |
| 114 | if(scanline == 240 && state->m_irqBmask & 1) // vblank-out irq | |
| 115 | timer.machine().device("sub")->execute().set_input_line(1, HOLD_LINE); | |
| 113 | if(scanline == 240 && m_irqBmask & 1) // vblank-out irq | |
| 114 | machine().device("sub")->execute().set_input_line(1, HOLD_LINE); | |
| 116 | 115 | |
| 117 | if(scanline == 16 && state->m_irqBmask & 2) // sprite end DMA irq | |
| 118 | timer.machine().device("sub")->execute().set_input_line(2, HOLD_LINE); | |
| 116 | if(scanline == 16 && m_irqBmask & 2) // sprite end DMA irq | |
| 117 | machine().device("sub")->execute().set_input_line(2, HOLD_LINE); | |
| 119 | 118 | } |
| 120 | 119 | |
| 121 | 120 | WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w) |
| r18137 | r18138 | |
| 320 | 319 | |
| 321 | 320 | MCFG_CPU_ADD("sub", M68000, 10000000) /* 10 MHz */ |
| 322 | 321 | MCFG_CPU_PROGRAM_MAP(gradius3_map2) |
| 323 | MCFG_TIMER_ADD_SCANLINE("scantimer", gradius3_sub_scanline, "screen", 0, 1) | |
| 322 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gradius3_state, gradius3_sub_scanline, "screen", 0, 1) | |
| 324 | 323 | /* 4 is triggered by cpu A, the others are unknown but */ |
| 325 | 324 | /* required for the game to run. */ |
| 326 | 325 |
| r18137 | r18138 | |
|---|---|---|
| 4745 | 4745 | state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x42); |
| 4746 | 4746 | } |
| 4747 | 4747 | |
| 4748 | ||
| 4748 | TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::neruton_irq_scanline) | |
| 4749 | 4749 | { |
| 4750 | dynax_state *state = timer.machine().driver_data<dynax_state>(); | |
| 4751 | 4750 | int scanline = param; |
| 4752 | 4751 | |
| 4753 | 4752 | // This is a kludge to avoid losing blitter interrupts |
| 4754 | 4753 | // there should be a vblank ack mechanism |
| 4755 | if ( | |
| 4754 | if (m_blitter_irq) return; | |
| 4756 | 4755 | |
| 4757 | 4756 | if(scanline == 256) |
| 4758 | | |
| 4757 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40); | |
| 4759 | 4758 | else if((scanline % 32) == 0) |
| 4760 | | |
| 4759 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x46); | |
| 4761 | 4760 | } |
| 4762 | 4761 | |
| 4763 | 4762 | static MACHINE_CONFIG_DERIVED( neruton, mjelctrn ) |
| 4764 | 4763 | MCFG_CPU_MODIFY("maincpu") |
| 4765 | MCFG_TIMER_ADD_SCANLINE("scantimer", neruton_irq_scanline, "screen", 0, 1) | |
| 4764 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, neruton_irq_scanline, "screen", 0, 1) | |
| 4766 | 4765 | |
| 4767 | 4766 | MCFG_VIDEO_START_OVERRIDE(dynax_state,neruton) |
| 4768 | 4767 | MACHINE_CONFIG_END |
| r18137 | r18138 | |
| 4775 | 4774 | 0x42 and 0x44 are very similar, they should be triggered by the blitter |
| 4776 | 4775 | 0x40 is vblank */ |
| 4777 | 4776 | |
| 4778 | ||
| 4777 | TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::majxtal7_vblank_interrupt) | |
| 4779 | 4778 | { |
| 4780 | dynax_state *state = timer.machine().driver_data<dynax_state>(); | |
| 4781 | 4779 | int scanline = param; |
| 4782 | 4780 | |
| 4783 | 4781 | // This is a kludge to avoid losing blitter interrupts |
| 4784 | 4782 | // there should be a vblank ack mechanism |
| 4785 | if ( | |
| 4783 | if (m_blitter_irq) return; | |
| 4786 | 4784 | |
| 4787 | 4785 | if(scanline == 256) |
| 4788 | | |
| 4786 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x40); | |
| 4789 | 4787 | else if((scanline % 32) == 0) |
| 4790 | | |
| 4788 | m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0x44); // temp kludge | |
| 4791 | 4789 | } |
| 4792 | 4790 | |
| 4793 | 4791 | static MACHINE_CONFIG_DERIVED( majxtal7, neruton ) |
| 4794 | 4792 | MCFG_TIMER_MODIFY("scantimer") |
| 4795 | MCFG_TIMER_CALLBACK(majxtal7_vblank_interrupt) | |
| 4793 | MCFG_TIMER_DRIVER_CALLBACK(dynax_state, majxtal7_vblank_interrupt) | |
| 4796 | 4794 | MACHINE_CONFIG_END |
| 4797 | 4795 | |
| 4798 | 4796 | |
| r18137 | r18138 | |
| 4861 | 4859 | Mahjong Tenkaigen |
| 4862 | 4860 | ***************************************************************************/ |
| 4863 | 4861 | |
| 4864 | ||
| 4862 | TIMER_DEVICE_CALLBACK_MEMBER(dynax_state::tenkai_interrupt) | |
| 4865 | 4863 | { |
| 4866 | dynax_state *state = timer.machine().driver_data<dynax_state>(); | |
| 4867 | 4864 | int scanline = param; |
| 4868 | 4865 | |
| 4869 | 4866 | if(scanline == 256) |
| 4870 | | |
| 4867 | m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); | |
| 4871 | 4868 | |
| 4872 | 4869 | if(scanline == 0) |
| 4873 | | |
| 4870 | m_maincpu->set_input_line(INPUT_LINE_IRQ1, HOLD_LINE); | |
| 4874 | 4871 | } |
| 4875 | 4872 | |
| 4876 | 4873 | static const ay8910_interface tenkai_ay8910_interface = |
| r18137 | r18138 | |
| 4905 | 4902 | MCFG_CPU_ADD("maincpu",TMP91640, 21472700 / 2) |
| 4906 | 4903 | MCFG_CPU_PROGRAM_MAP(tenkai_map) |
| 4907 | 4904 | MCFG_CPU_IO_MAP(tenkai_io_map) |
| 4908 | MCFG_TIMER_ADD_SCANLINE("scantimer", tenkai_interrupt, "screen", 0, 1) | |
| 4905 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dynax_state, tenkai_interrupt, "screen", 0, 1) | |
| 4909 | 4906 | |
| 4910 | 4907 | MCFG_MACHINE_START_OVERRIDE(dynax_state,tenkai) |
| 4911 | 4908 | MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) |
| r18137 | r18138 | |
|---|---|---|
| 760 | 760 | |
| 761 | 761 | MCFG_CPU_ADD("audiocpu", M6502, HCLK1/3/2) |
| 762 | 762 | MCFG_CPU_PROGRAM_MAP(decocass_sound_map) |
| 763 | MCFG_TIMER_ADD_SCANLINE("audionmi", decocass_audio_nmi_gen, "screen", 0, 8) | |
| 763 | MCFG_TIMER_DRIVER_ADD_SCANLINE("audionmi", decocass_state, decocass_audio_nmi_gen, "screen", 0, 8) | |
| 764 | 764 | |
| 765 | 765 | MCFG_CPU_ADD("mcu", I8041, HCLK) |
| 766 | 766 | MCFG_CPU_IO_MAP(decocass_mcu_portmap) |
| r18137 | r18138 | |
|---|---|---|
| 104 | 104 | /**********************************************************************************/ |
| 105 | 105 | /* IRQ controllers */ |
| 106 | 106 | |
| 107 | ||
| 107 | TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mystwarr_interrupt) | |
| 108 | 108 | { |
| 109 | mystwarr_state *state = timer.machine().driver_data<mystwarr_state>(); | |
| 110 | 109 | int scanline = param; |
| 111 | 110 | |
| 112 | if (!( | |
| 111 | if (!(m_mw_irq_control & 0x01)) return; | |
| 113 | 112 | |
| 114 | 113 | if(scanline == 240) |
| 115 | | |
| 114 | m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); | |
| 116 | 115 | |
| 117 | 116 | if(scanline == 0) |
| 118 | | |
| 117 | m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE); | |
| 119 | 118 | |
| 120 | 119 | /* writes to LSB of 0x410000 port and clears a work RAM flag, almost likely not really necessary. */ |
| 121 | // | |
| 120 | // m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); | |
| 122 | 121 | } |
| 123 | 122 | |
| 124 | ||
| 123 | TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::metamrph_interrupt) | |
| 125 | 124 | { |
| 126 | mystwarr_state *state = timer.machine().driver_data<mystwarr_state>(); | |
| 127 | 125 | int scanline = param; |
| 128 | 126 | |
| 129 | 127 | /* irq 4 has an irq routine in metamrph, but it's not really called */ |
| 130 | // | |
| 128 | // m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE); | |
| 131 | 129 | |
| 132 | 130 | if(scanline == 24) |
| 133 | | |
| 131 | m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); | |
| 134 | 132 | |
| 135 | 133 | if(scanline == 248) |
| 136 | if (K053246_is_IRQ_enabled()) | |
| 134 | if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE); | |
| 137 | 135 | } |
| 138 | 136 | |
| 139 | ||
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mchamp_interrupt) | |
| 140 | 138 | { |
| 141 | mystwarr_state *state = timer.machine().driver_data<mystwarr_state>(); | |
| 142 | 139 | int scanline = param; |
| 143 | 140 | |
| 144 | if (!( | |
| 141 | if (!(m_mw_irq_control & 0x02)) return; | |
| 145 | 142 | |
| 146 | 143 | if(scanline == 247) |
| 147 | 144 | { |
| 148 | if (K053246_is_IRQ_enabled()) | |
| 145 | if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE); | |
| 149 | 146 | } |
| 150 | 147 | |
| 151 | 148 | if(scanline == 23) |
| 152 | | |
| 149 | m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE); | |
| 153 | 150 | } |
| 154 | 151 | |
| 155 | 152 | INTERRUPT_GEN_MEMBER(mystwarr_state::ddd_interrupt) |
| r18137 | r18138 | |
| 986 | 983 | /* basic machine hardware */ |
| 987 | 984 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz (confirmed) */ |
| 988 | 985 | MCFG_CPU_PROGRAM_MAP(mystwarr_map) |
| 989 | MCFG_TIMER_ADD_SCANLINE("scantimer", mystwarr_interrupt, "screen", 0, 1) | |
| 986 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mystwarr_state, mystwarr_interrupt, "screen", 0, 1) | |
| 990 | 987 | |
| 991 | 988 | MCFG_CPU_ADD("soundcpu", Z80, 8000000) |
| 992 | 989 | MCFG_CPU_PROGRAM_MAP(mystwarr_sound_map) |
| r18137 | r18138 | |
| 1038 | 1035 | MCFG_CPU_MODIFY("maincpu") |
| 1039 | 1036 | MCFG_CPU_PROGRAM_MAP(viostorm_map) |
| 1040 | 1037 | MCFG_TIMER_MODIFY("scantimer") |
| 1041 | MCFG_TIMER_CALLBACK(metamrph_interrupt) | |
| 1038 | MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, metamrph_interrupt) | |
| 1042 | 1039 | |
| 1043 | 1040 | /* video hardware */ |
| 1044 | 1041 | MCFG_VIDEO_START_OVERRIDE(mystwarr_state,viostorm) |
| r18137 | r18138 | |
| 1059 | 1056 | MCFG_CPU_MODIFY("maincpu") |
| 1060 | 1057 | MCFG_CPU_PROGRAM_MAP(metamrph_map) |
| 1061 | 1058 | MCFG_TIMER_MODIFY("scantimer") |
| 1062 | MCFG_TIMER_CALLBACK(metamrph_interrupt) | |
| 1059 | MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, metamrph_interrupt) | |
| 1063 | 1060 | |
| 1064 | 1061 | MCFG_DEVICE_REMOVE("k053252") |
| 1065 | 1062 | MCFG_K053252_ADD("k053252", 6000000, metamrph_k053252_intf) // 6 MHz? |
| r18137 | r18138 | |
| 1140 | 1137 | MCFG_CPU_MODIFY("maincpu") |
| 1141 | 1138 | MCFG_CPU_PROGRAM_MAP(martchmp_map) |
| 1142 | 1139 | MCFG_TIMER_MODIFY("scantimer") |
| 1143 | MCFG_TIMER_CALLBACK(mchamp_interrupt) | |
| 1140 | MCFG_TIMER_DRIVER_CALLBACK(mystwarr_state, mchamp_interrupt) | |
| 1144 | 1141 | |
| 1145 | 1142 | MCFG_DEVICE_REMOVE("k053252") |
| 1146 | 1143 | MCFG_K053252_ADD("k053252", 16000000/2, martchmp_k053252_intf) |
| r18137 | r18138 | |
|---|---|---|
| 653 | 653 | dmastart_callback(0); |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | ||
| 656 | TIMER_DEVICE_CALLBACK_MEMBER(konamigx_state::konamigx_hbinterrupt) | |
| 657 | 657 | { |
| 658 | konamigx_state *state = timer.machine().driver_data<konamigx_state>(); | |
| 659 | 658 | int scanline = param; |
| 660 | 659 | |
| 661 | 660 | if (scanline == 240) |
| 662 | 661 | { |
| 663 | 662 | // lift idle suspension |
| 664 | if (resume_trigger && suspension_active) { suspension_active = 0; | |
| 663 | if (resume_trigger && suspension_active) { suspension_active = 0; machine().scheduler().trigger(resume_trigger); } | |
| 665 | 664 | |
| 666 | 665 | // IRQ 1 is the main 60hz vblank interrupt |
| 667 | 666 | // the gx_syncen & 0x20 test doesn't work on type 3 or 4 ROM boards, likely because the ROM board |
| r18137 | r18138 | |
| 677 | 676 | if ((konamigx_wrport1_1 & 0x81) == 0x81 || (gx_syncen & 1)) |
| 678 | 677 | { |
| 679 | 678 | gx_syncen &= ~1; |
| 680 | | |
| 679 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 681 | 680 | |
| 682 | 681 | } |
| 683 | 682 | } |
| r18137 | r18138 | |
| 694 | 693 | if ((konamigx_wrport1_1 & 0x82) == 0x82 || (gx_syncen & 2)) |
| 695 | 694 | { |
| 696 | 695 | gx_syncen &= ~2; |
| 697 | | |
| 696 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 698 | 697 | } |
| 699 | 698 | } |
| 700 | 699 | } |
| r18137 | r18138 | |
| 1859 | 1858 | |
| 1860 | 1859 | MCFG_CPU_ADD("maincpu", M68EC020, 24000000) |
| 1861 | 1860 | MCFG_CPU_PROGRAM_MAP(gx_type3_map) |
| 1862 | MCFG_TIMER_ADD_SCANLINE("scantimer", konamigx_hbinterrupt, "screen", 0, 1) | |
| 1861 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_hbinterrupt, "screen", 0, 1) | |
| 1863 | 1862 | |
| 1864 | 1863 | MCFG_DEFAULT_LAYOUT(layout_dualhsxs) |
| 1865 | 1864 | MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE) |
| r18137 | r18138 | |
| 1886 | 1885 | |
| 1887 | 1886 | MCFG_CPU_ADD("maincpu", M68EC020, 24000000) |
| 1888 | 1887 | MCFG_CPU_PROGRAM_MAP(gx_type4_map) |
| 1889 | MCFG_TIMER_ADD_SCANLINE("scantimer", konamigx_hbinterrupt, "screen", 0, 1) | |
| 1888 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", konamigx_state, konamigx_hbinterrupt, "screen", 0, 1) | |
| 1890 | 1889 | |
| 1891 | 1890 | MCFG_DEFAULT_LAYOUT(layout_dualhsxs) |
| 1892 | 1891 | MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE) |
| r18137 | r18138 | |
|---|---|---|
| 245 | 245 | }; |
| 246 | 246 | |
| 247 | 247 | |
| 248 | ||
| 248 | TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_state::sprcros2_m_interrupt) | |
| 249 | 249 | { |
| 250 | sprcros2_state *state = timer.machine().driver_data<sprcros2_state>(); | |
| 251 | 250 | int scanline = param; |
| 252 | 251 | |
| 253 | 252 | if (scanline == 240) |
| 254 | 253 | { |
| 255 | if(state->m_port7&0x01) | |
| 256 | state->m_master->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 254 | if(m_port7&0x01) | |
| 255 | m_master->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 257 | 256 | } |
| 258 | 257 | else if(scanline == 0) |
| 259 | 258 | { |
| 260 | if(state->m_port7&0x08) | |
| 261 | state->m_master->set_input_line(0, HOLD_LINE); | |
| 259 | if(m_port7&0x08) | |
| 260 | m_master->set_input_line(0, HOLD_LINE); | |
| 262 | 261 | } |
| 263 | 262 | } |
| 264 | 263 | |
| r18137 | r18138 | |
| 282 | 281 | MCFG_CPU_ADD("master", Z80,10000000/2) |
| 283 | 282 | MCFG_CPU_PROGRAM_MAP(sprcros2_master_map) |
| 284 | 283 | MCFG_CPU_IO_MAP(sprcros2_master_io_map) |
| 285 | MCFG_TIMER_ADD_SCANLINE("scantimer", sprcros2_m_interrupt, "screen", 0, 1) | |
| 284 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sprcros2_state, sprcros2_m_interrupt, "screen", 0, 1) | |
| 286 | 285 | |
| 287 | 286 | MCFG_CPU_ADD("slave", Z80,10000000/2) |
| 288 | 287 | MCFG_CPU_PROGRAM_MAP(sprcros2_slave_map) |
| r18137 | r18138 | |
|---|---|---|
| 16 | 16 | #include "includes/konamipt.h" |
| 17 | 17 | #include "includes/fastlane.h" |
| 18 | 18 | |
| 19 | ||
| 19 | TIMER_DEVICE_CALLBACK_MEMBER(fastlane_state::fastlane_scanline) | |
| 20 | 20 | { |
| 21 | fastlane_state *state = timer.machine().driver_data<fastlane_state>(); | |
| 22 | 21 | int scanline = param; |
| 23 | 22 | |
| 24 | address_space &space = state->generic_space(); | |
| 25 | if(scanline == 240 && k007121_ctrlram_r(state->m_k007121, space, 7) & 0x02) // vblank irq | |
| 26 | state->m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE); | |
| 27 | else if(((scanline % 32) == 0) && k007121_ctrlram_r(state->m_k007121, space, 7) & 0x01) // timer irq | |
| 28 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 23 | address_space &space = generic_space(); | |
| 24 | if(scanline == 240 && k007121_ctrlram_r(m_k007121, space, 7) & 0x02) // vblank irq | |
| 25 | m_maincpu->set_input_line(HD6309_IRQ_LINE, HOLD_LINE); | |
| 26 | else if(((scanline % 32) == 0) && k007121_ctrlram_r(m_k007121, space, 7) & 0x01) // timer irq | |
| 27 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 29 | 28 | } |
| 30 | 29 | |
| 31 | 30 | |
| r18137 | r18138 | |
| 219 | 218 | /* basic machine hardware */ |
| 220 | 219 | MCFG_CPU_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */ |
| 221 | 220 | MCFG_CPU_PROGRAM_MAP(fastlane_map) |
| 222 | MCFG_TIMER_ADD_SCANLINE("scantimer", fastlane_scanline, "screen", 0, 1) | |
| 221 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastlane_state, fastlane_scanline, "screen", 0, 1) | |
| 223 | 222 | |
| 224 | 223 | |
| 225 | 224 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 123 | 123 | |
| 124 | 124 | ********************************************************************/ |
| 125 | 125 | |
| 126 | ||
| 126 | TIMER_DEVICE_CALLBACK_MEMBER(bionicc_state::bionicc_scanline) | |
| 127 | 127 | { |
| 128 | 128 | int scanline = param; |
| 129 | 129 | |
| 130 | 130 | if(scanline == 240) // vblank-out irq |
| 131 | | |
| 131 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 132 | 132 | |
| 133 | 133 | if(scanline == 0) // vblank-in or i8751 related irq |
| 134 | | |
| 134 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | |
| r18137 | r18138 | |
| 354 | 354 | /* basic machine hardware */ |
| 355 | 355 | MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK / 2) /* 12 MHz - verified in schematics */ |
| 356 | 356 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 357 | MCFG_TIMER_ADD_SCANLINE("scantimer", bionicc_scanline, "screen", 0, 1) | |
| 357 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", bionicc_state, bionicc_scanline, "screen", 0, 1) | |
| 358 | 358 | |
| 359 | 359 | MCFG_CPU_ADD("audiocpu", Z80, EXO3_F0_CLK / 4) /* EXO3 C,B=GND, A=5V ==> Divisor 2^2 */ |
| 360 | 360 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 155 | 155 | [ Main CPU - System A / Z ] |
| 156 | 156 | ***************************************************************************/ |
| 157 | 157 | |
| 158 | ||
| 158 | TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1A_scanline) | |
| 159 | 159 | { |
| 160 | 160 | int scanline = param; |
| 161 | 161 | |
| 162 | 162 | if(scanline == 240) // vblank-out irq |
| 163 | | |
| 163 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 164 | 164 | |
| 165 | 165 | if(scanline == 0) |
| 166 | | |
| 166 | machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE); | |
| 167 | 167 | |
| 168 | 168 | if(scanline == 128) |
| 169 | | |
| 169 | machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | static ADDRESS_MAP_START( megasys1A_map, AS_PROGRAM, 16, megasys1_state ) |
| r18137 | r18138 | |
| 191 | 191 | [ Main CPU - System B ] |
| 192 | 192 | ***************************************************************************/ |
| 193 | 193 | |
| 194 | ||
| 194 | TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1B_scanline) | |
| 195 | 195 | { |
| 196 | 196 | int scanline = param; |
| 197 | 197 | |
| 198 | 198 | if(scanline == 240) // vblank-out irq |
| 199 | | |
| 199 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 200 | 200 | |
| 201 | 201 | if(scanline == 0) |
| 202 | | |
| 202 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 203 | 203 | |
| 204 | 204 | if(scanline == 128) |
| 205 | | |
| 205 | machine().device("maincpu")->execute().set_input_line(1, HOLD_LINE); | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | |
| r18137 | r18138 | |
| 1466 | 1466 | /* basic machine hardware */ |
| 1467 | 1467 | MCFG_CPU_ADD("maincpu", M68000, SYS_A_CPU_CLOCK) /* 6MHz verified */ |
| 1468 | 1468 | MCFG_CPU_PROGRAM_MAP(megasys1A_map) |
| 1469 | MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1A_scanline, "screen", 0, 1) | |
| 1469 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1A_scanline, "screen", 0, 1) | |
| 1470 | 1470 | |
| 1471 | 1471 | MCFG_CPU_ADD("soundcpu", M68000, SOUND_CPU_CLOCK) /* 7MHz verified */ |
| 1472 | 1472 | MCFG_CPU_PROGRAM_MAP(megasys1A_sound_map) |
| r18137 | r18138 | |
| 1519 | 1519 | MCFG_CPU_CLOCK(SYS_B_CPU_CLOCK) /* 8MHz */ |
| 1520 | 1520 | MCFG_CPU_PROGRAM_MAP(megasys1B_map) |
| 1521 | 1521 | MCFG_TIMER_MODIFY("scantimer") |
| 1522 | MCFG_TIMER_CALLBACK(megasys1B_scanline) | |
| 1522 | MCFG_TIMER_DRIVER_CALLBACK(megasys1_state, megasys1B_scanline) | |
| 1523 | 1523 | |
| 1524 | 1524 | MCFG_CPU_MODIFY("soundcpu") |
| 1525 | 1525 | MCFG_CPU_PROGRAM_MAP(megasys1B_sound_map) |
| r18137 | r18138 | |
| 1531 | 1531 | /* basic machine hardware */ |
| 1532 | 1532 | MCFG_CPU_ADD("maincpu", M68000, SYS_B_CPU_CLOCK) |
| 1533 | 1533 | MCFG_CPU_PROGRAM_MAP(megasys1B_map) |
| 1534 | MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1B_scanline, "screen", 0, 1) | |
| 1534 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1B_scanline, "screen", 0, 1) | |
| 1535 | 1535 | |
| 1536 | 1536 | MCFG_MACHINE_RESET_OVERRIDE(megasys1_state,megasys1) |
| 1537 | 1537 | |
| r18137 | r18138 | |
| 1580 | 1580 | MCFG_CPU_CLOCK(SYS_C_CPU_CLOCK) /* 12MHz */ |
| 1581 | 1581 | MCFG_CPU_PROGRAM_MAP(megasys1C_map) |
| 1582 | 1582 | MCFG_TIMER_MODIFY("scantimer") |
| 1583 | MCFG_TIMER_CALLBACK(megasys1B_scanline) | |
| 1583 | MCFG_TIMER_DRIVER_CALLBACK(megasys1_state, megasys1B_scanline) | |
| 1584 | 1584 | |
| 1585 | 1585 | MCFG_CPU_MODIFY("soundcpu") |
| 1586 | 1586 | MCFG_CPU_PROGRAM_MAP(megasys1B_sound_map) |
| r18137 | r18138 | |
| 1664 | 1664 | /* basic machine hardware */ |
| 1665 | 1665 | MCFG_CPU_ADD("maincpu", M68000, SYS_A_CPU_CLOCK) /* 6MHz (12MHz / 2) */ |
| 1666 | 1666 | MCFG_CPU_PROGRAM_MAP(megasys1A_map) |
| 1667 | MCFG_TIMER_ADD_SCANLINE("scantimer", megasys1A_scanline, "screen", 0, 1) | |
| 1667 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", megasys1_state, megasys1A_scanline, "screen", 0, 1) | |
| 1668 | 1668 | |
| 1669 | 1669 | MCFG_CPU_ADD("soundcpu", Z80, 3000000) /* OSC 12MHz divided by 4 ??? */ |
| 1670 | 1670 | MCFG_CPU_PROGRAM_MAP(z80_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 548 | 548 | /* Interrupt Generators */ |
| 549 | 549 | |
| 550 | 550 | /* Main Z80 uses IM2 */ |
| 551 | ||
| 551 | TIMER_DEVICE_CALLBACK_MEMBER(airbustr_state::airbustr_scanline) | |
| 552 | 552 | { |
| 553 | 553 | int scanline = param; |
| 554 | 554 | |
| 555 | 555 | if(scanline == 240) // vblank-out irq |
| 556 | | |
| 556 | machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff); | |
| 557 | 557 | |
| 558 | 558 | /* Pandora "sprite end dma" irq? TODO: timing is likely off */ |
| 559 | 559 | if(scanline == 64) |
| 560 | | |
| 560 | machine().device("master")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd); | |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | 563 | /* Sub Z80 uses IM2 too, but 0xff irq routine just contains an irq ack in it */ |
| r18137 | r18138 | |
| 625 | 625 | MCFG_CPU_ADD("master", Z80, 6000000) // ??? |
| 626 | 626 | MCFG_CPU_PROGRAM_MAP(master_map) |
| 627 | 627 | MCFG_CPU_IO_MAP(master_io_map) |
| 628 | MCFG_TIMER_ADD_SCANLINE("scantimer", airbustr_scanline, "screen", 0, 1) | |
| 628 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", airbustr_state, airbustr_scanline, "screen", 0, 1) | |
| 629 | 629 | |
| 630 | 630 | MCFG_CPU_ADD("slave", Z80, 6000000) // ??? |
| 631 | 631 | MCFG_CPU_PROGRAM_MAP(slave_map) |
| r18137 | r18138 | |
|---|---|---|
| 1443 | 1443 | MCFG_MACHINE_RESET_OVERRIDE(williams_state,defender) |
| 1444 | 1444 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1445 | 1445 | |
| 1446 | MCFG_TIMER_ADD("scan_timer", williams_va11_callback) | |
| 1447 | MCFG_TIMER_ADD("240_timer", williams_count240_callback) | |
| 1446 | MCFG_TIMER_DRIVER_ADD("scan_timer", williams_state, williams_va11_callback) | |
| 1447 | MCFG_TIMER_DRIVER_ADD("240_timer", williams_state, williams_count240_callback) | |
| 1448 | 1448 | |
| 1449 | 1449 | /* video hardware */ |
| 1450 | 1450 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE) |
| r18137 | r18138 | |
| 1633 | 1633 | MCFG_MACHINE_RESET_OVERRIDE(williams_state,williams2) |
| 1634 | 1634 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1635 | 1635 | |
| 1636 | MCFG_TIMER_ADD("scan_timer", williams2_va11_callback) | |
| 1637 | MCFG_TIMER_ADD("254_timer", williams2_endscreen_callback) | |
| 1636 | MCFG_TIMER_DRIVER_ADD("scan_timer", williams_state, williams2_va11_callback) | |
| 1637 | MCFG_TIMER_DRIVER_ADD("254_timer", williams_state, williams2_endscreen_callback) | |
| 1638 | 1638 | |
| 1639 | 1639 | /* video hardware */ |
| 1640 | 1640 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE | VIDEO_ALWAYS_UPDATE) |
| r18137 | r18138 | |
|---|---|---|
| 349 | 349 | xmen_sprite_callback |
| 350 | 350 | }; |
| 351 | 351 | |
| 352 | ||
| 352 | TIMER_DEVICE_CALLBACK_MEMBER(xmen_state::xmen_scanline) | |
| 353 | 353 | { |
| 354 | xmen_state *state = timer.machine().driver_data<xmen_state>(); | |
| 355 | 354 | int scanline = param; |
| 356 | 355 | |
| 357 | if(scanline == 240 && state->m_vblank_irq_mask) // vblank-out irq | |
| 358 | timer.machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 356 | if(scanline == 240 && m_vblank_irq_mask) // vblank-out irq | |
| 357 | machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 359 | 358 | |
| 360 | 359 | if(scanline == 0) // sprite DMA irq? |
| 361 | | |
| 360 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 362 | 361 | |
| 363 | 362 | } |
| 364 | 363 | |
| r18137 | r18138 | |
| 369 | 368 | /* basic machine hardware */ |
| 370 | 369 | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */ |
| 371 | 370 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 372 | MCFG_TIMER_ADD_SCANLINE("scantimer", xmen_scanline, "screen", 0, 1) | |
| 371 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", xmen_state, xmen_scanline, "screen", 0, 1) | |
| 373 | 372 | |
| 374 | 373 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_16MHz/2) /* verified on pcb */ |
| 375 | 374 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
| 419 | 418 | /* basic machine hardware */ |
| 420 | 419 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* ? */ |
| 421 | 420 | MCFG_CPU_PROGRAM_MAP(6p_main_map) |
| 422 | MCFG_TIMER_ADD_SCANLINE("scantimer", xmen_scanline, "lscreen", 0, 1) | |
| 421 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", xmen_state, xmen_scanline, "lscreen", 0, 1) | |
| 423 | 422 | |
| 424 | 423 | MCFG_CPU_ADD("audiocpu", Z80,8000000) /* verified with M1, guessed but accurate */ |
| 425 | 424 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 213 | 213 | GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0, 16*4 ) |
| 214 | 214 | GFXDECODE_END |
| 215 | 215 | |
| 216 | ||
| 216 | TIMER_DEVICE_CALLBACK_MEMBER(darkmist_state::darkmist_scanline) | |
| 217 | 217 | { |
| 218 | 218 | int scanline = param; |
| 219 | 219 | |
| 220 | 220 | if(scanline == 240) // vblank-out irq |
| 221 | | |
| 221 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x10); /* RST 10h */ | |
| 222 | 222 | |
| 223 | 223 | if(scanline == 0) // vblank-in irq |
| 224 | | |
| 224 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */ | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
| r18137 | r18138 | |
| 230 | 230 | /* basic machine hardware */ |
| 231 | 231 | MCFG_CPU_ADD("maincpu", Z80,4000000) /* ? MHz */ |
| 232 | 232 | MCFG_CPU_PROGRAM_MAP(memmap) |
| 233 | MCFG_TIMER_ADD_SCANLINE("scantimer", darkmist_scanline, "screen", 0, 1) | |
| 233 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", darkmist_state, darkmist_scanline, "screen", 0, 1) | |
| 234 | 234 | |
| 235 | 235 | MCFG_CPU_ADD(CPUTAG_T5182,Z80,14318180/4) /* 3.579545 MHz */ |
| 236 | 236 | MCFG_CPU_PROGRAM_MAP(t5182_map) |
| r18137 | r18138 | |
|---|---|---|
| 1078 | 1078 | m_keymatrix = 0; |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | ||
| 1081 | TIMER_DEVICE_CALLBACK_MEMBER(mitchell_state::mitchell_irq) | |
| 1082 | 1082 | { |
| 1083 | mitchell_state *state = timer.machine().driver_data<mitchell_state>(); | |
| 1084 | 1083 | int scanline = param; |
| 1085 | 1084 | |
| 1086 | 1085 | if (scanline == 240 || scanline == 0) |
| 1087 | 1086 | { |
| 1088 | | |
| 1087 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 1089 | 1088 | |
| 1090 | | |
| 1089 | m_irq_source = (scanline == 240); | |
| 1091 | 1090 | } |
| 1092 | 1091 | } |
| 1093 | 1092 | |
| r18137 | r18138 | |
| 1097 | 1096 | MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* probably same clock as the other mitchell hardware games */ |
| 1098 | 1097 | MCFG_CPU_PROGRAM_MAP(mgakuen_map) |
| 1099 | 1098 | MCFG_CPU_IO_MAP(mitchell_io_map) |
| 1100 | MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) | |
| 1099 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) | |
| 1101 | 1100 | |
| 1102 | 1101 | MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell) |
| 1103 | 1102 | MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell) |
| r18137 | r18138 | |
| 1134 | 1133 | MCFG_CPU_ADD("maincpu",Z80, XTAL_16MHz/2) /* verified on pcb */ |
| 1135 | 1134 | MCFG_CPU_PROGRAM_MAP(mitchell_map) |
| 1136 | 1135 | MCFG_CPU_IO_MAP(mitchell_io_map) |
| 1137 | MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) | |
| 1136 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) | |
| 1138 | 1137 | |
| 1139 | 1138 | MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell) |
| 1140 | 1139 | MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell) |
| r18137 | r18138 | |
| 1273 | 1272 | MCFG_CPU_ADD("maincpu", Z80, XTAL_16MHz/2) /* verified on pcb */ |
| 1274 | 1273 | MCFG_CPU_PROGRAM_MAP(mitchell_map) |
| 1275 | 1274 | MCFG_CPU_IO_MAP(mitchell_io_map) |
| 1276 | MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) | |
| 1275 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) | |
| 1277 | 1276 | |
| 1278 | 1277 | MCFG_EEPROM_ADD("eeprom", eeprom_intf) |
| 1279 | 1278 | |
| r18137 | r18138 | |
| 1324 | 1323 | MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */ |
| 1325 | 1324 | MCFG_CPU_PROGRAM_MAP(mitchell_map) |
| 1326 | 1325 | MCFG_CPU_IO_MAP(mitchell_io_map) |
| 1327 | MCFG_TIMER_ADD_SCANLINE("scantimer", mitchell_irq, "screen", 0, 1) | |
| 1326 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) | |
| 1328 | 1327 | |
| 1329 | 1328 | MCFG_EEPROM_ADD("eeprom", eeprom_intf) |
| 1330 | 1329 |
| r18137 | r18138 | |
|---|---|---|
| 167 | 167 | return machine().primary_screen->vpos(); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | ||
| 170 | TIMER_DEVICE_CALLBACK_MEMBER(deco_mlc_state::interrupt_gen) | |
| 171 | 171 | { |
| 172 | deco_mlc_state *state = timer.machine().driver_data<deco_mlc_state>(); | |
| 173 | 172 | // logerror("hit scanline IRQ %d (%08x)\n", machine.primary_screen->vpos(), info.i); |
| 174 | | |
| 173 | machine().device("maincpu")->execute().set_input_line(m_mainCpuIsArm ? ARM_IRQ_LINE : 1, HOLD_LINE); | |
| 175 | 174 | } |
| 176 | 175 | |
| 177 | 176 | WRITE32_MEMBER(deco_mlc_state::mlc_irq_w) |
| r18137 | r18138 | |
| 384 | 383 | MCFG_MACHINE_RESET_OVERRIDE(deco_mlc_state,mlc) |
| 385 | 384 | MCFG_EEPROM_93C46_ADD("eeprom") /* Actually 93c45 */ |
| 386 | 385 | |
| 387 | MCFG_TIMER_ADD("int_timer", interrupt_gen) | |
| 386 | MCFG_TIMER_DRIVER_ADD("int_timer", deco_mlc_state, interrupt_gen) | |
| 388 | 387 | |
| 389 | 388 | /* video hardware */ |
| 390 | 389 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 416 | 415 | MCFG_MACHINE_RESET_OVERRIDE(deco_mlc_state,mlc) |
| 417 | 416 | MCFG_EEPROM_93C46_ADD("eeprom") /* Actually 93c45 */ |
| 418 | 417 | |
| 419 | MCFG_TIMER_ADD("int_timer", interrupt_gen) | |
| 418 | MCFG_TIMER_DRIVER_ADD("int_timer", deco_mlc_state, interrupt_gen) | |
| 420 | 419 | |
| 421 | 420 | /* video hardware */ |
| 422 | 421 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 120 | 120 | machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | ||
| 123 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros_irq) | |
| 124 | 124 | { |
| 125 | snowbros_state *state = timer.machine().driver_data<snowbros_state>(); | |
| 126 | 125 | int scanline = param; |
| 127 | 126 | |
| 128 | 127 | if(scanline == 240) |
| 129 | | |
| 128 | m_maincpu->set_input_line(2, ASSERT_LINE); | |
| 130 | 129 | |
| 131 | 130 | if(scanline == 128) |
| 132 | | |
| 131 | m_maincpu->set_input_line(3, ASSERT_LINE); | |
| 133 | 132 | |
| 134 | 133 | if(scanline == 32) |
| 135 | | |
| 134 | m_maincpu->set_input_line(4, ASSERT_LINE); | |
| 136 | 135 | } |
| 137 | 136 | |
| 138 | ||
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros3_irq) | |
| 139 | 138 | { |
| 140 | snowbros_state *state = timer.machine().driver_data<snowbros_state>(); | |
| 141 | okim6295_device *adpcm = timer.machine().device<okim6295_device>("oki"); | |
| 139 | okim6295_device *adpcm = machine().device<okim6295_device>("oki"); | |
| 142 | 140 | int status = adpcm->read_status(); |
| 143 | 141 | int scanline = param; |
| 144 | 142 | |
| 145 | 143 | if(scanline == 240) |
| 146 | | |
| 144 | m_maincpu->set_input_line(2, ASSERT_LINE); | |
| 147 | 145 | |
| 148 | 146 | if(scanline == 128) |
| 149 | | |
| 147 | m_maincpu->set_input_line(3, ASSERT_LINE); | |
| 150 | 148 | |
| 151 | 149 | if(scanline == 32) |
| 152 | | |
| 150 | m_maincpu->set_input_line(4, ASSERT_LINE); | |
| 153 | 151 | |
| 154 | if ( | |
| 152 | if (m_sb3_music_is_playing) | |
| 155 | 153 | { |
| 156 | 154 | if ((status&0x08)==0x00) |
| 157 | 155 | { |
| 158 | adpcm->write_command(0x80| | |
| 156 | adpcm->write_command(0x80|m_sb3_music); | |
| 159 | 157 | adpcm->write_command(0x00|0x82); |
| 160 | 158 | } |
| 161 | 159 | |
| r18137 | r18138 | |
| 1544 | 1542 | /* basic machine hardware */ |
| 1545 | 1543 | MCFG_CPU_ADD("maincpu", M68000, 8000000) /* 8 Mhz - confirmed */ |
| 1546 | 1544 | MCFG_CPU_PROGRAM_MAP(snowbros_map) |
| 1547 | MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1) | |
| 1545 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) | |
| 1548 | 1546 | |
| 1549 | 1547 | MCFG_CPU_ADD("soundcpu", Z80, 6000000) /* 6 MHz - confirmed */ |
| 1550 | 1548 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
| 1654 | 1652 | /* basic machine hardware */ |
| 1655 | 1653 | MCFG_CPU_ADD("maincpu", M68000, 16000000) |
| 1656 | 1654 | MCFG_CPU_PROGRAM_MAP(honeydol_map) |
| 1657 | MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1) | |
| 1655 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) | |
| 1658 | 1656 | |
| 1659 | 1657 | MCFG_CPU_ADD("soundcpu", Z80, 4000000) |
| 1660 | 1658 | MCFG_CPU_PROGRAM_MAP(honeydol_sound_map) |
| r18137 | r18138 | |
| 1690 | 1688 | /* basic machine hardware */ |
| 1691 | 1689 | MCFG_CPU_ADD("maincpu", M68000, 16000000) // or 12 |
| 1692 | 1690 | MCFG_CPU_PROGRAM_MAP(twinadv_map) |
| 1693 | MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros_irq, "screen", 0, 1) | |
| 1691 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) | |
| 1694 | 1692 | |
| 1695 | 1693 | MCFG_CPU_ADD("soundcpu", Z80, 4000000) |
| 1696 | 1694 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
| 1767 | 1765 | /* basic machine hardware */ |
| 1768 | 1766 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16mhz or 12mhz ? */ |
| 1769 | 1767 | MCFG_CPU_PROGRAM_MAP(snowbros3_map) |
| 1770 | MCFG_TIMER_ADD_SCANLINE("scantimer", snowbros3_irq, "screen", 0, 1) | |
| 1768 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros3_irq, "screen", 0, 1) | |
| 1771 | 1769 | |
| 1772 | 1770 | /* video hardware */ |
| 1773 | 1771 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 531 | 531 | * |
| 532 | 532 | *************************************/ |
| 533 | 533 | |
| 534 | ||
| 534 | TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_state::ddragon3_scanline) | |
| 535 | 535 | { |
| 536 | ddragon3_state *state = timer.machine().driver_data<ddragon3_state>(); | |
| 537 | 536 | int scanline = param; |
| 538 | 537 | |
| 539 | 538 | /* An interrupt is generated every 16 scanlines */ |
| 540 | 539 | if (scanline % 16 == 0) |
| 541 | 540 | { |
| 542 | 541 | if (scanline > 0) |
| 543 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 544 | state->m_maincpu->set_input_line(5, ASSERT_LINE); | |
| 542 | machine().primary_screen->update_partial(scanline - 1); | |
| 543 | m_maincpu->set_input_line(5, ASSERT_LINE); | |
| 545 | 544 | } |
| 546 | 545 | |
| 547 | 546 | /* Vblank is raised on scanline 248 */ |
| 548 | 547 | if (scanline == 248) |
| 549 | 548 | { |
| 550 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 551 | state->m_maincpu->set_input_line(6, ASSERT_LINE); | |
| 549 | machine().primary_screen->update_partial(scanline - 1); | |
| 550 | m_maincpu->set_input_line(6, ASSERT_LINE); | |
| 552 | 551 | } |
| 553 | 552 | } |
| 554 | 553 | |
| r18137 | r18138 | |
| 593 | 592 | /* basic machine hardware */ |
| 594 | 593 | MCFG_CPU_ADD("maincpu", M68000, XTAL_20MHz / 2) |
| 595 | 594 | MCFG_CPU_PROGRAM_MAP(ddragon3_map) |
| 596 | MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon3_scanline, "screen", 0, 1) | |
| 595 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon3_state, ddragon3_scanline, "screen", 0, 1) | |
| 597 | 596 | |
| 598 | 597 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) |
| 599 | 598 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | ||
| 276 | TIMER_DEVICE_CALLBACK_MEMBER(xexex_state::xexex_interrupt) | |
| 277 | 277 | { |
| 278 | xexex_state *state = timer.machine().driver_data<xexex_state>(); | |
| 279 | 278 | int scanline = param; |
| 280 | 279 | |
| 281 | if ( | |
| 280 | if (m_suspension_active) | |
| 282 | 281 | { |
| 283 | state->m_suspension_active = 0; | |
| 284 | timer.machine().scheduler().trigger(state->m_resume_trigger); | |
| 282 | m_suspension_active = 0; | |
| 283 | machine().scheduler().trigger(m_resume_trigger); | |
| 285 | 284 | } |
| 286 | 285 | |
| 287 | 286 | if(scanline == 0) |
| 288 | 287 | { |
| 289 | 288 | // IRQ 6 is for test mode only |
| 290 | if (state->m_cur_control2 & 0x0020) | |
| 291 | state->m_maincpu->set_input_line(6, HOLD_LINE); | |
| 289 | if (m_cur_control2 & 0x0020) | |
| 290 | m_maincpu->set_input_line(6, HOLD_LINE); | |
| 292 | 291 | } |
| 293 | 292 | |
| 294 | 293 | /* TODO: vblank is at 256! (enable CCU then have fun in fixing offsetted layers) */ |
| 295 | 294 | if(scanline == 128) |
| 296 | 295 | { |
| 297 | if (k053246_is_irq_enabled( | |
| 296 | if (k053246_is_irq_enabled(m_k053246)) | |
| 298 | 297 | { |
| 299 | 298 | // OBJDMA starts at the beginning of V-blank |
| 300 | xexex_objdma( | |
| 299 | xexex_objdma(machine(), 0); | |
| 301 | 300 | |
| 302 | 301 | // schedule DMA end interrupt |
| 303 | | |
| 302 | m_dmadelay_timer->adjust(XE_DMADELAY); | |
| 304 | 303 | } |
| 305 | 304 | |
| 306 | 305 | // IRQ 4 is the V-blank interrupt. It controls color, sound and |
| 307 | 306 | // vital game logics that shouldn't be interfered by frame-drop. |
| 308 | if (state->m_cur_control2 & 0x0800) | |
| 309 | state->m_maincpu->set_input_line(4, HOLD_LINE); | |
| 307 | if (m_cur_control2 & 0x0800) | |
| 308 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 310 | 309 | } |
| 311 | 310 | } |
| 312 | 311 | |
| r18137 | r18138 | |
| 513 | 512 | /* basic machine hardware */ |
| 514 | 513 | MCFG_CPU_ADD("maincpu", M68000, 32000000/2) // 16MHz (32MHz xtal) |
| 515 | 514 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 516 | MCFG_TIMER_ADD_SCANLINE("scantimer", xexex_interrupt, "screen", 0, 1) | |
| 515 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", xexex_state, xexex_interrupt, "screen", 0, 1) | |
| 517 | 516 | |
| 518 | 517 | // 8MHz (PCB shows one 32MHz/18.432MHz xtal, reference: www.system16.com) |
| 519 | 518 | // more likely 32MHz since 18.432MHz yields 4.608MHz(too slow) or 9.216MHz(too fast) with integer divisors |
| r18137 | r18138 | |
|---|---|---|
| 16 | 16 | #include "includes/exedexes.h" |
| 17 | 17 | |
| 18 | 18 | |
| 19 | ||
| 19 | TIMER_DEVICE_CALLBACK_MEMBER(exedexes_state::exedexes_scanline) | |
| 20 | 20 | { |
| 21 | 21 | int scanline = param; |
| 22 | 22 | |
| 23 | 23 | if(scanline == 240) // vblank-out irq |
| 24 | | |
| 24 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */ | |
| 25 | 25 | |
| 26 | 26 | if(scanline == 0) // unknown irq event |
| 27 | | |
| 27 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ | |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
| r18137 | r18138 | |
| 228 | 228 | /* basic machine hardware */ |
| 229 | 229 | MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */ |
| 230 | 230 | MCFG_CPU_PROGRAM_MAP(exedexes_map) |
| 231 | MCFG_TIMER_ADD_SCANLINE("scantimer", exedexes_scanline, "screen", 0, 1) | |
| 231 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exedexes_state, exedexes_scanline, "screen", 0, 1) | |
| 232 | 232 | |
| 233 | 233 | MCFG_CPU_ADD("audiocpu", Z80, 3000000) /* 3 MHz ??? */ |
| 234 | 234 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 1212 | 1212 | |
| 1213 | 1213 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1214 | 1214 | |
| 1215 | MCFG_TIMER_ADD("scan_timer", balsente_interrupt_timer) | |
| 1216 | MCFG_TIMER_ADD("8253_0_timer", balsente_clock_counter_0_ff) | |
| 1217 | MCFG_TIMER_ADD("8253_1_timer", balsente_counter_callback) | |
| 1218 | MCFG_TIMER_ADD("8253_2_timer", balsente_counter_callback) | |
| 1215 | MCFG_TIMER_DRIVER_ADD("scan_timer", balsente_state, balsente_interrupt_timer) | |
| 1216 | MCFG_TIMER_DRIVER_ADD("8253_0_timer", balsente_state, balsente_clock_counter_0_ff) | |
| 1217 | MCFG_TIMER_DRIVER_ADD("8253_1_timer", balsente_state, balsente_counter_callback) | |
| 1218 | MCFG_TIMER_DRIVER_ADD("8253_2_timer", balsente_state, balsente_counter_callback) | |
| 1219 | 1219 | |
| 1220 | 1220 | /* video hardware */ |
| 1221 | 1221 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r18137 | r18138 | |
|---|---|---|
| 483 | 483 | |
| 484 | 484 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 485 | 485 | |
| 486 | MCFG_TIMER_ADD_PERIODIC("5k_timer", mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K)) | |
| 486 | MCFG_TIMER_DRIVER_ADD_PERIODIC("5k_timer", mhavoc_state, mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K)) | |
| 487 | 487 | |
| 488 | 488 | /* video hardware */ |
| 489 | 489 | MCFG_SCREEN_ADD("screen", VECTOR) |
| r18137 | r18138 | |
|---|---|---|
| 488 | 488 | |
| 489 | 489 | /* most games require IRQ4 for inputs to work, Puzzli 2 is explicit about not wanting it tho |
| 490 | 490 | what is the source? */ |
| 491 | TIMER_DEVICE_CALLBACK( | |
| 491 | TIMER_DEVICE_CALLBACK_MEMBER(pgm_state::pgm_interrupt) | |
| 492 | 492 | { |
| 493 | pgm_state *state = timer.machine().driver_data<pgm_state>(); | |
| 494 | 493 | int scanline = param; |
| 495 | 494 | |
| 496 | 495 | if(scanline == 224) |
| 497 | | |
| 496 | m_maincpu->set_input_line(6, HOLD_LINE); | |
| 498 | 497 | |
| 499 | 498 | if(scanline == 0) |
| 500 | if (! | |
| 499 | if (!m_irq4_disabled) m_maincpu->set_input_line(4, HOLD_LINE); | |
| 501 | 500 | } |
| 502 | 501 | |
| 503 | 502 | MACHINE_START_MEMBER(pgm_state,pgm) |
| r18137 | r18138 | |
| 521 | 520 | MCFG_CPU_ADD("maincpu", M68000, 20000000) /* 20 mhz! verified on real board */ |
| 522 | 521 | MCFG_CPU_PROGRAM_MAP(pgm_basic_mem) |
| 523 | 522 | MCFG_CPU_VBLANK_INT_DRIVER("screen", pgm_state, irq6_line_hold) |
| 524 | MCFG_TIMER_ADD_SCANLINE("scantimer", pgm_interrupt, "screen", 0, 1) | |
| 523 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pgm_state, pgm_interrupt, "screen", 0, 1) | |
| 525 | 524 | |
| 526 | 525 | MCFG_CPU_ADD("soundcpu", Z80, 33868800/4) |
| 527 | 526 | MCFG_CPU_PROGRAM_MAP(pgm_z80_mem) |
| r18137 | r18138 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | /*****************************************************************************/ |
| 49 | 49 | |
| 50 | ||
| 50 | TIMER_DEVICE_CALLBACK_MEMBER(m107_state::m107_scanline_interrupt) | |
| 51 | 51 | { |
| 52 | running_machine &machine = timer.machine(); | |
| 53 | m107_state *state = machine.driver_data<m107_state>(); | |
| 54 | 52 | int scanline = param; |
| 53 | m107_state *state = machine().driver_data<m107_state>(); | |
| 55 | 54 | |
| 56 | 55 | /* raster interrupt */ |
| 57 | if (scanline == | |
| 56 | if (scanline == m_raster_irq_position) | |
| 58 | 57 | { |
| 59 | machine.primary_screen->update_partial(scanline); | |
| 60 | machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2); | |
| 58 | machine().primary_screen->update_partial(scanline); | |
| 59 | state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_2); | |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | /* VBLANK interrupt */ |
| 64 | else if (scanline == machine.primary_screen->visible_area().max_y + 1) | |
| 63 | else if (scanline == machine().primary_screen->visible_area().max_y + 1) | |
| 65 | 64 | { |
| 66 | machine.primary_screen->update_partial(scanline); | |
| 67 | machine.device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0); | |
| 65 | machine().primary_screen->update_partial(scanline); | |
| 66 | state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M107_IRQ_0); | |
| 68 | 67 | } |
| 69 | 68 | } |
| 70 | 69 | |
| r18137 | r18138 | |
| 780 | 779 | MCFG_CPU_CONFIG(firebarr_config) |
| 781 | 780 | |
| 782 | 781 | |
| 783 | MCFG_TIMER_ADD_SCANLINE("scantimer", m107_scanline_interrupt, "screen", 0, 1) | |
| 782 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m107_state, m107_scanline_interrupt, "screen", 0, 1) | |
| 784 | 783 | |
| 785 | 784 | /* video hardware */ |
| 786 | 785 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 199 | 199 | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) |
| 200 | 200 | GFXDECODE_END |
| 201 | 201 | |
| 202 | ||
| 202 | TIMER_DEVICE_CALLBACK_MEMBER(hexion_state::hexion_scanline) | |
| 203 | 203 | { |
| 204 | //hexion_state *state = timer.machine().driver_data<hexion_state>(); | |
| 205 | 204 | int scanline = param; |
| 206 | 205 | |
| 207 | 206 | if(scanline == 256) |
| 208 | | |
| 207 | machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 209 | 208 | else if ((scanline == 85) || (scanline == 170)) //TODO |
| 210 | | |
| 209 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 211 | 210 | } |
| 212 | 211 | |
| 213 | 212 | static const k053252_interface hexion_k053252_intf = |
| r18137 | r18138 | |
| 225 | 224 | /* basic machine hardware */ |
| 226 | 225 | MCFG_CPU_ADD("maincpu", Z80,24000000/4) /* Z80B 6 MHz */ |
| 227 | 226 | MCFG_CPU_PROGRAM_MAP(hexion_map) |
| 228 | MCFG_TIMER_ADD_SCANLINE("scantimer", hexion_scanline, "screen", 0, 1) | |
| 227 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hexion_state, hexion_scanline, "screen", 0, 1) | |
| 229 | 228 | |
| 230 | 229 | MCFG_K053252_ADD("k053252", 24000000/2, hexion_k053252_intf) |
| 231 | 230 |
| r18137 | r18138 | |
|---|---|---|
| 193 | 193 | * |
| 194 | 194 | *************************************/ |
| 195 | 195 | |
| 196 | ||
| 196 | TIMER_DEVICE_CALLBACK_MEMBER(exterm_state::master_sound_nmi_callback) | |
| 197 | 197 | { |
| 198 | exterm_state *state = timer.machine().driver_data<exterm_state>(); | |
| 199 | 198 | /* bit 0 of the sound control determines if the NMI is actually delivered */ |
| 200 | if (state->m_sound_control & 0x01) | |
| 201 | timer.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 199 | if (m_sound_control & 0x01) | |
| 200 | machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 202 | 201 | } |
| 203 | 202 | |
| 204 | 203 | |
| r18137 | r18138 | |
| 457 | 456 | |
| 458 | 457 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 459 | 458 | |
| 460 | MCFG_TIMER_ADD("snd_nmi_timer", master_sound_nmi_callback) | |
| 459 | MCFG_TIMER_DRIVER_ADD("snd_nmi_timer", exterm_state, master_sound_nmi_callback) | |
| 461 | 460 | |
| 462 | 461 | /* video hardware */ |
| 463 | 462 | MCFG_PALETTE_LENGTH(2048+32768) |
| r18137 | r18138 | |
|---|---|---|
| 428 | 428 | |
| 429 | 429 | /* Interrupts */ |
| 430 | 430 | |
| 431 | ||
| 431 | TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst1_tick) | |
| 432 | 432 | { |
| 433 | n8080_state *n8080 = timer.machine().driver_data<n8080_state>(); | |
| 434 | int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE; | |
| 433 | int state = m_inte ? ASSERT_LINE : CLEAR_LINE; | |
| 435 | 434 | |
| 436 | 435 | /* V7 = 1, V6 = 0 */ |
| 437 | | |
| 436 | m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xcf); | |
| 438 | 437 | } |
| 439 | 438 | |
| 440 | ||
| 439 | TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::rst2_tick) | |
| 441 | 440 | { |
| 442 | n8080_state *n8080 = timer.machine().driver_data<n8080_state>(); | |
| 443 | int state = n8080->m_inte ? ASSERT_LINE : CLEAR_LINE; | |
| 441 | int state = m_inte ? ASSERT_LINE : CLEAR_LINE; | |
| 444 | 442 | |
| 445 | 443 | /* vblank */ |
| 446 | | |
| 444 | m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, state, 0xd7); | |
| 447 | 445 | } |
| 448 | 446 | |
| 449 | 447 | WRITE_LINE_MEMBER(n8080_state::n8080_inte_callback) |
| r18137 | r18138 | |
| 560 | 558 | MCFG_PALETTE_INIT_OVERRIDE(n8080_state,n8080) |
| 561 | 559 | MCFG_VIDEO_START_OVERRIDE(n8080_state,spacefev) |
| 562 | 560 | |
| 563 | MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256) | |
| 564 | MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256) | |
| 561 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256) | |
| 562 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256) | |
| 565 | 563 | |
| 566 | 564 | /* sound hardware */ |
| 567 | 565 | MCFG_FRAGMENT_ADD( spacefev_sound ) |
| r18137 | r18138 | |
| 590 | 588 | MCFG_PALETTE_INIT_OVERRIDE(n8080_state,n8080) |
| 591 | 589 | MCFG_VIDEO_START_OVERRIDE(n8080_state,sheriff) |
| 592 | 590 | |
| 593 | MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256) | |
| 594 | MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256) | |
| 591 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256) | |
| 592 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256) | |
| 595 | 593 | |
| 596 | 594 | /* sound hardware */ |
| 597 | 595 | MCFG_FRAGMENT_ADD( sheriff_sound ) |
| r18137 | r18138 | |
| 632 | 630 | MCFG_PALETTE_INIT_OVERRIDE(n8080_state,helifire) |
| 633 | 631 | MCFG_VIDEO_START_OVERRIDE(n8080_state,helifire) |
| 634 | 632 | |
| 635 | MCFG_TIMER_ADD_SCANLINE("rst1", rst1_tick, "screen", 128, 256) | |
| 636 | MCFG_TIMER_ADD_SCANLINE("rst2", rst2_tick, "screen", 240, 256) | |
| 633 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256) | |
| 634 | MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256) | |
| 637 | 635 | |
| 638 | 636 | /* sound hardware */ |
| 639 | 637 | MCFG_FRAGMENT_ADD( helifire_sound ) |
| r18137 | r18138 | |
|---|---|---|
| 123 | 123 | m_agallet_vblank_irq = 0; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | ||
| 126 | TIMER_DEVICE_CALLBACK_MEMBER(cave_state::cave_vblank_start) | |
| 127 | 127 | { |
| 128 | cave_state *state = timer.machine().driver_data<cave_state>(); | |
| 129 | state->m_vblank_irq = 1; | |
| 130 | update_irq_state(timer.machine()); | |
| 131 | cave_get_sprite_info(timer.machine()); | |
| 132 | state->m_agallet_vblank_irq = 1; | |
| 133 | timer.machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),state)); | |
| 128 | m_vblank_irq = 1; | |
| 129 | update_irq_state(machine()); | |
| 130 | cave_get_sprite_info(machine()); | |
| 131 | m_agallet_vblank_irq = 1; | |
| 132 | machine().scheduler().timer_set(attotime::from_usec(2000), timer_expired_delegate(FUNC(cave_state::cave_vblank_end),this)); | |
| 134 | 133 | } |
| 135 | 134 | |
| 136 | 135 | /* Called once/frame to generate the VBLANK interrupt */ |
| r18137 | r18138 | |
| 1858 | 1857 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 1859 | 1858 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 1860 | 1859 | |
| 1861 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 1860 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 1862 | 1861 | |
| 1863 | 1862 | /* video hardware */ |
| 1864 | 1863 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1900 | 1899 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 1901 | 1900 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 1902 | 1901 | |
| 1903 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 1902 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 1904 | 1903 | |
| 1905 | 1904 | /* video hardware */ |
| 1906 | 1905 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1946 | 1945 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 1947 | 1946 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 1948 | 1947 | |
| 1949 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 1948 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 1950 | 1949 | |
| 1951 | 1950 | /* video hardware */ |
| 1952 | 1951 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 1992 | 1991 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 1993 | 1992 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 1994 | 1993 | |
| 1995 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 1994 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 1996 | 1995 | |
| 1997 | 1996 | /* video hardware */ |
| 1998 | 1997 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2032 | 2031 | MCFG_MACHINE_START_OVERRIDE(cave_state,cave) |
| 2033 | 2032 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2034 | 2033 | |
| 2035 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2034 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2036 | 2035 | |
| 2037 | 2036 | /* video hardware */ |
| 2038 | 2037 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2073 | 2072 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2074 | 2073 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2075 | 2074 | |
| 2076 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2075 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2077 | 2076 | |
| 2078 | 2077 | /* video hardware */ |
| 2079 | 2078 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2117 | 2116 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2118 | 2117 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2119 | 2118 | |
| 2120 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2119 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2121 | 2120 | |
| 2122 | 2121 | /* video hardware */ |
| 2123 | 2122 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2169 | 2168 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2170 | 2169 | MCFG_EEPROM_93C46_8BIT_ADD("eeprom") |
| 2171 | 2170 | |
| 2172 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2171 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2173 | 2172 | |
| 2174 | 2173 | /* video hardware */ |
| 2175 | 2174 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2223 | 2222 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2224 | 2223 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2225 | 2224 | |
| 2226 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2225 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2227 | 2226 | |
| 2228 | 2227 | /* video hardware */ |
| 2229 | 2228 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2281 | 2280 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */ |
| 2282 | 2281 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2283 | 2282 | |
| 2284 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2283 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2285 | 2284 | |
| 2286 | 2285 | /* video hardware */ |
| 2287 | 2286 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2336 | 2335 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2337 | 2336 | MCFG_EEPROM_ADD("eeprom", eeprom_interface_93C46_pacslot) |
| 2338 | 2337 | |
| 2339 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2338 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2340 | 2339 | |
| 2341 | 2340 | /* video hardware */ |
| 2342 | 2341 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2392 | 2391 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2393 | 2392 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2394 | 2393 | |
| 2395 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2394 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2396 | 2395 | |
| 2397 | 2396 | /* video hardware */ |
| 2398 | 2397 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2455 | 2454 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2456 | 2455 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2457 | 2456 | |
| 2458 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2457 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2459 | 2458 | |
| 2460 | 2459 | /* video hardware */ |
| 2461 | 2460 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2509 | 2508 | MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) |
| 2510 | 2509 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2511 | 2510 | |
| 2512 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2511 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2513 | 2512 | |
| 2514 | 2513 | /* video hardware */ |
| 2515 | 2514 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 2550 | 2549 | MCFG_MACHINE_START_OVERRIDE(cave_state,cave) |
| 2551 | 2550 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2552 | 2551 | |
| 2553 | MCFG_TIMER_ADD("int_timer", cave_vblank_start) | |
| 2552 | MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) | |
| 2554 | 2553 | |
| 2555 | 2554 | /* video hardware */ |
| 2556 | 2555 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 1578 | 1578 | |
| 1579 | 1579 | ***************************************************************************/ |
| 1580 | 1580 | |
| 1581 | ||
| 1581 | TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::kaneko16_interrupt) | |
| 1582 | 1582 | { |
| 1583 | kaneko16_state *state = timer.machine().driver_data<kaneko16_state>(); | |
| 1584 | 1583 | int scanline = param; |
| 1585 | 1584 | |
| 1586 | 1585 | // main vblank interrupt |
| 1587 | 1586 | if(scanline == 224) |
| 1588 | | |
| 1587 | m_maincpu->set_input_line(5, HOLD_LINE); | |
| 1589 | 1588 | |
| 1590 | 1589 | // each of these 2 int are responsible of translating a part of sprite buffer |
| 1591 | 1590 | // from work ram to sprite ram. How these are scheduled is unknown. |
| 1592 | 1591 | if(scanline == 64) |
| 1593 | | |
| 1592 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 1594 | 1593 | |
| 1595 | 1594 | if(scanline == 144) |
| 1596 | | |
| 1595 | m_maincpu->set_input_line(3, HOLD_LINE); | |
| 1597 | 1596 | } |
| 1598 | 1597 | |
| 1599 | 1598 | static const ay8910_interface ay8910_intf_dsw = |
| r18137 | r18138 | |
| 1644 | 1643 | /* basic machine hardware */ |
| 1645 | 1644 | MCFG_CPU_ADD("maincpu", M68000, 12000000) /* MC68000P12 */ |
| 1646 | 1645 | MCFG_CPU_PROGRAM_MAP(berlwall) |
| 1647 | MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1) | |
| 1646 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1) | |
| 1648 | 1647 | |
| 1649 | 1648 | /* video hardware */ |
| 1650 | 1649 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) // mangled sprites otherwise |
| r18137 | r18138 | |
| 1695 | 1694 | /* basic machine hardware */ |
| 1696 | 1695 | MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */ |
| 1697 | 1696 | MCFG_CPU_PROGRAM_MAP(bakubrkr) |
| 1698 | MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1) | |
| 1697 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1) | |
| 1699 | 1698 | |
| 1700 | 1699 | MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,gtmr) |
| 1701 | 1700 | MCFG_EEPROM_93C46_ADD("eeprom") |
| r18137 | r18138 | |
| 1763 | 1762 | /* basic machine hardware */ |
| 1764 | 1763 | MCFG_CPU_ADD("maincpu", M68000,12000000) /* TMP68HC000-12 */ |
| 1765 | 1764 | MCFG_CPU_PROGRAM_MAP(blazeon) |
| 1766 | MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1) | |
| 1765 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1) | |
| 1767 | 1766 | |
| 1768 | 1767 | MCFG_CPU_ADD("audiocpu", Z80,4000000) /* D780C-2 */ |
| 1769 | 1768 | MCFG_CPU_PROGRAM_MAP(blazeon_soundmem) |
| r18137 | r18138 | |
| 1823 | 1822 | /* basic machine hardware */ |
| 1824 | 1823 | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) /* verified on pcb */ |
| 1825 | 1824 | MCFG_CPU_PROGRAM_MAP(gtmr_map) |
| 1826 | MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1) | |
| 1825 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1) | |
| 1827 | 1826 | |
| 1828 | 1827 | MCFG_MACHINE_RESET_OVERRIDE(kaneko16_gtmr_state,gtmr) |
| 1829 | 1828 | |
| r18137 | r18138 | |
| 1942 | 1941 | /* basic machine hardware */ |
| 1943 | 1942 | MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */ |
| 1944 | 1943 | MCFG_CPU_PROGRAM_MAP(mgcrystl) |
| 1945 | MCFG_TIMER_ADD_SCANLINE("scantimer", kaneko16_interrupt, "screen", 0, 1) | |
| 1944 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, kaneko16_interrupt, "screen", 0, 1) | |
| 1946 | 1945 | |
| 1947 | 1946 | MCFG_MACHINE_RESET_OVERRIDE(kaneko16_state,mgcrystl) |
| 1948 | 1947 | MCFG_EEPROM_93C46_ADD("eeprom") |
| r18137 | r18138 | |
| 2009 | 2008 | other: busy loop |
| 2010 | 2009 | */ |
| 2011 | 2010 | |
| 2012 | ||
| 2011 | TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::shogwarr_interrupt) | |
| 2013 | 2012 | { |
| 2014 | kaneko16_shogwarr_state *state = timer.machine().driver_data<kaneko16_shogwarr_state>(); | |
| 2015 | 2013 | int scanline = param; |
| 2016 | 2014 | |
| 2017 | 2015 | if(scanline == 224) |
| 2018 | 2016 | { |
| 2019 | 2017 | // the code for this interrupt is provided by the MCU.. |
| 2020 | | |
| 2018 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 2021 | 2019 | } |
| 2022 | 2020 | |
| 2023 | 2021 | if(scanline == 64) |
| 2024 | | |
| 2022 | m_maincpu->set_input_line(3, HOLD_LINE); | |
| 2025 | 2023 | |
| 2026 | 2024 | if(scanline == 144) |
| 2027 | | |
| 2025 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 2028 | 2026 | } |
| 2029 | 2027 | |
| 2030 | 2028 | /* |
| r18137 | r18138 | |
| 2066 | 2064 | /* basic machine hardware */ |
| 2067 | 2065 | MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) |
| 2068 | 2066 | MCFG_CPU_PROGRAM_MAP(shogwarr) |
| 2069 | MCFG_TIMER_ADD_SCANLINE("scantimer", shogwarr_interrupt, "screen", 0, 1) | |
| 2067 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", kaneko16_state, shogwarr_interrupt, "screen", 0, 1) | |
| 2070 | 2068 | |
| 2071 | 2069 | MCFG_MACHINE_RESET_OVERRIDE(kaneko16_shogwarr_state,mgcrystl) |
| 2072 | 2070 |
| r18137 | r18138 | |
|---|---|---|
| 298 | 298 | |
| 299 | 299 | |
| 300 | 300 | /* binary counter (1.4MHz update) */ |
| 301 | ||
| 301 | TIMER_DEVICE_CALLBACK_MEMBER(snk6502_state::sasuke_update_counter) | |
| 302 | 302 | { |
| 303 | snk6502_state *state = timer.machine().driver_data<snk6502_state>(); | |
| 304 | ||
| 305 | state->m_sasuke_counter += 0x10; | |
| 303 | m_sasuke_counter += 0x10; | |
| 306 | 304 | } |
| 307 | 305 | |
| 308 | 306 | static void sasuke_start_counter(running_machine &machine) |
| r18137 | r18138 | |
| 844 | 842 | |
| 845 | 843 | MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK / 16, mc6845_intf) |
| 846 | 844 | |
| 847 | MCFG_TIMER_ADD_PERIODIC("sasuke_timer", sasuke_update_counter, attotime::from_hz(MASTER_CLOCK / 8)) | |
| 845 | MCFG_TIMER_DRIVER_ADD_PERIODIC("sasuke_timer", snk6502_state, sasuke_update_counter, attotime::from_hz(MASTER_CLOCK / 8)) | |
| 848 | 846 | |
| 849 | 847 | // sound hardware |
| 850 | 848 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 239 | 239 | A hack is required: raise the vblank bit a scanline early. |
| 240 | 240 | */ |
| 241 | 241 | |
| 242 | ||
| 242 | TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_state::wwfsstar_scanline) | |
| 243 | 243 | { |
| 244 | wwfsstar_state *state = timer.machine().driver_data<wwfsstar_state>(); | |
| 245 | 244 | int scanline = param; |
| 246 | 245 | |
| 247 | 246 | /* Vblank is lowered on scanline 0 */ |
| 248 | 247 | if (scanline == 0) |
| 249 | 248 | { |
| 250 | | |
| 249 | m_vblank = 0; | |
| 251 | 250 | } |
| 252 | 251 | /* Hack */ |
| 253 | 252 | else if (scanline == (240-1)) /* -1 is an hack needed to avoid deadlocks */ |
| 254 | 253 | { |
| 255 | | |
| 254 | m_vblank = 1; | |
| 256 | 255 | } |
| 257 | 256 | |
| 258 | 257 | /* An interrupt is generated every 16 scanlines */ |
| 259 | 258 | if (scanline % 16 == 0) |
| 260 | 259 | { |
| 261 | 260 | if (scanline > 0) |
| 262 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 263 | timer.machine().device("maincpu")->execute().set_input_line(5, ASSERT_LINE); | |
| 261 | machine().primary_screen->update_partial(scanline - 1); | |
| 262 | machine().device("maincpu")->execute().set_input_line(5, ASSERT_LINE); | |
| 264 | 263 | } |
| 265 | 264 | |
| 266 | 265 | /* Vblank is raised on scanline 240 */ |
| 267 | 266 | if (scanline == 240) |
| 268 | 267 | { |
| 269 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 270 | timer.machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE); | |
| 268 | machine().primary_screen->update_partial(scanline - 1); | |
| 269 | machine().device("maincpu")->execute().set_input_line(6, ASSERT_LINE); | |
| 271 | 270 | } |
| 272 | 271 | } |
| 273 | 272 | |
| r18137 | r18138 | |
| 426 | 425 | /* basic machine hardware */ |
| 427 | 426 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) |
| 428 | 427 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 429 | MCFG_TIMER_ADD_SCANLINE("scantimer", wwfsstar_scanline, "screen", 0, 1) | |
| 428 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wwfsstar_state, wwfsstar_scanline, "screen", 0, 1) | |
| 430 | 429 | |
| 431 | 430 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) |
| 432 | 431 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 2116 | 2116 | #define SPCENCTR_STROBE_DUTY_CYCLE (95) /* % */ |
| 2117 | 2117 | |
| 2118 | 2118 | |
| 2119 | ||
| 2119 | TIMER_DEVICE_CALLBACK_MEMBER(mw8080bw_state::spcenctr_strobe_timer_callback) | |
| 2120 | 2120 | { |
| 2121 | mw8080bw_state *state = timer.machine().driver_data<mw8080bw_state>(); | |
| 2122 | output_set_value("STROBE", param && state->m_spcenctr_strobe_state); | |
| 2121 | output_set_value("STROBE", param && m_spcenctr_strobe_state); | |
| 2123 | 2122 | } |
| 2124 | 2123 | |
| 2125 | 2124 | |
| r18137 | r18138 | |
| 2259 | 2258 | MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) |
| 2260 | 2259 | |
| 2261 | 2260 | /* timers */ |
| 2262 | MCFG_TIMER_ADD_PERIODIC("strobeon", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ)) | |
| 2261 | MCFG_TIMER_DRIVER_ADD_PERIODIC("strobeon", mw8080bw_state, spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ)) | |
| 2263 | 2262 | MCFG_TIMER_PARAM(TRUE) /* indicates strobe ON */ |
| 2264 | 2263 | |
| 2265 | MCFG_TIMER_ADD_PERIODIC("strobeoff", spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ)) | |
| 2264 | MCFG_TIMER_DRIVER_ADD_PERIODIC("strobeoff", mw8080bw_state, spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ)) | |
| 2266 | 2265 | MCFG_TIMER_START_DELAY(attotime::from_hz(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_STROBE_DUTY_CYCLE)) |
| 2267 | 2266 | MCFG_TIMER_PARAM(FALSE) /* indicates strobe OFF */ |
| 2268 | 2267 |
| r18137 | r18138 | |
|---|---|---|
| 623 | 623 | * |
| 624 | 624 | *************************************/ |
| 625 | 625 | |
| 626 | ||
| 626 | TIMER_DEVICE_CALLBACK_MEMBER(gaelco3d_state::adsp_autobuffer_irq) | |
| 627 | 627 | { |
| 628 | gaelco3d_state *state = timer.machine().driver_data<gaelco3d_state>(); | |
| 629 | cpu_device *adsp = timer.machine().device<cpu_device>("adsp"); | |
| 628 | cpu_device *adsp = machine().device<cpu_device>("adsp"); | |
| 630 | 629 | |
| 631 | 630 | /* get the index register */ |
| 632 | int reg = adsp->state_int(ADSP2100_I0 + | |
| 631 | int reg = adsp->state_int(ADSP2100_I0 + m_adsp_ireg); | |
| 633 | 632 | |
| 634 | 633 | /* copy the current data into the buffer */ |
| 635 | // logerror("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", state->m_adsp_ireg, reg, state->m_adsp_incs, state->m_adsp_size); | |
| 636 | if (state->m_adsp_incs) | |
| 637 | dmadac_transfer(&state->m_dmadac[0], SOUND_CHANNELS, state->m_adsp_incs, SOUND_CHANNELS * state->m_adsp_incs, state->m_adsp_size / (SOUND_CHANNELS * state->m_adsp_incs), (INT16 *)&state->m_adsp_fastram_base[reg - 0x3800]); | |
| 634 | // logerror("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", m_adsp_ireg, reg, m_adsp_incs, m_adsp_size); | |
| 635 | if (m_adsp_incs) | |
| 636 | dmadac_transfer(&m_dmadac[0], SOUND_CHANNELS, m_adsp_incs, SOUND_CHANNELS * m_adsp_incs, m_adsp_size / (SOUND_CHANNELS * m_adsp_incs), (INT16 *)&m_adsp_fastram_base[reg - 0x3800]); | |
| 638 | 637 | |
| 639 | 638 | /* increment it */ |
| 640 | reg += | |
| 639 | reg += m_adsp_size; | |
| 641 | 640 | |
| 642 | 641 | /* check for wrapping */ |
| 643 | if (reg >= | |
| 642 | if (reg >= m_adsp_ireg_base + m_adsp_size) | |
| 644 | 643 | { |
| 645 | 644 | /* reset the base pointer */ |
| 646 | reg = | |
| 645 | reg = m_adsp_ireg_base; | |
| 647 | 646 | |
| 648 | 647 | /* generate the (internal, thats why the pulse) irq */ |
| 649 | generic_pulse_irq_line(adsp, ADSP2105_IRQ1, 1); | |
| 648 | generic_pulse_irq_line(*adsp, ADSP2105_IRQ1, 1); | |
| 650 | 649 | } |
| 651 | 650 | |
| 652 | 651 | /* store it */ |
| 653 | adsp->set_state_int(ADSP2100_I0 + | |
| 652 | adsp->set_state_int(ADSP2100_I0 + m_adsp_ireg, reg); | |
| 654 | 653 | } |
| 655 | 654 | |
| 656 | 655 | |
| r18137 | r18138 | |
| 1009 | 1008 | |
| 1010 | 1009 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 1011 | 1010 | |
| 1012 | MCFG_TIMER_ADD("adsp_timer", adsp_autobuffer_irq) | |
| 1011 | MCFG_TIMER_DRIVER_ADD("adsp_timer", gaelco3d_state, adsp_autobuffer_irq) | |
| 1013 | 1012 | MCFG_GAELCO_SERIAL_ADD("serial", 0, serial_interface) |
| 1014 | 1013 | |
| 1015 | 1014 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 282 | 282 | /****************************************************************************/ |
| 283 | 283 | |
| 284 | 284 | |
| 285 | ||
| 285 | TIMER_DEVICE_CALLBACK_MEMBER(namconb1_state::mcu_interrupt) | |
| 286 | 286 | { |
| 287 | 287 | int scanline = param; |
| 288 | 288 | |
| 289 | 289 | /* TODO: real sources of these */ |
| 290 | 290 | if (scanline == 224) |
| 291 | | |
| 291 | machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ0, HOLD_LINE); | |
| 292 | 292 | else if (scanline == 0) |
| 293 | | |
| 293 | machine().device("mcu")->execute().set_input_line(M37710_LINE_IRQ2, HOLD_LINE); | |
| 294 | 294 | else if (scanline == 128) |
| 295 | | |
| 295 | machine().device("mcu")->execute().set_input_line(M37710_LINE_ADC, HOLD_LINE); | |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | |
| r18137 | r18138 | |
| 1010 | 1010 | MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3) |
| 1011 | 1011 | MCFG_CPU_PROGRAM_MAP(namcoc75_am) |
| 1012 | 1012 | MCFG_CPU_IO_MAP(namcoc75_io) |
| 1013 | MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_interrupt, "screen", 0, 1) | |
| 1013 | MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namconb1_state, mcu_interrupt, "screen", 0, 1) | |
| 1014 | 1014 | |
| 1015 | 1015 | MCFG_NVRAM_HANDLER(namconb1) |
| 1016 | 1016 | MCFG_MACHINE_START_OVERRIDE(namconb1_state,namconb) |
| r18137 | r18138 | |
| 1042 | 1042 | MCFG_CPU_ADD("mcu", M37702, MASTER_CLOCK_HZ/3) |
| 1043 | 1043 | MCFG_CPU_PROGRAM_MAP(namcoc75_am) |
| 1044 | 1044 | MCFG_CPU_IO_MAP(namcoc75_io) |
| 1045 | MCFG_TIMER_ADD_SCANLINE("mcu_st", mcu_interrupt, "screen", 0, 1) | |
| 1045 | MCFG_TIMER_DRIVER_ADD_SCANLINE("mcu_st", namconb1_state, mcu_interrupt, "screen", 0, 1) | |
| 1046 | 1046 | |
| 1047 | 1047 | MCFG_NVRAM_HANDLER(namconb1) |
| 1048 | 1048 | MCFG_MACHINE_START_OVERRIDE(namconb1_state,namconb) |
| r18137 | r18138 | |
|---|---|---|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
| 90 | ||
| 90 | TIMER_DEVICE_CALLBACK_MEMBER(astrof_state::irq_callback) | |
| 91 | 91 | { |
| 92 | astrof_state *state = timer.machine().driver_data<astrof_state>(); | |
| 93 | state->m_maincpu->set_input_line(0, ASSERT_LINE); | |
| 92 | m_maincpu->set_input_line(0, ASSERT_LINE); | |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | 95 | |
| r18137 | r18138 | |
| 943 | 942 | |
| 944 | 943 | /* basic machine hardware */ |
| 945 | 944 | MCFG_CPU_ADD("maincpu", M6502, MAIN_CPU_CLOCK) |
| 946 | MCFG_TIMER_ADD_SCANLINE("vblank", irq_callback, "screen", VBSTART, 0) | |
| 945 | MCFG_TIMER_DRIVER_ADD_SCANLINE("vblank", astrof_state, irq_callback, "screen", VBSTART, 0) | |
| 947 | 946 | |
| 948 | 947 | /* video hardware */ |
| 949 | 948 |
| r18137 | r18138 | |
|---|---|---|
| 317 | 317 | GFXDECODE_END |
| 318 | 318 | |
| 319 | 319 | |
| 320 | ||
| 320 | TIMER_DEVICE_CALLBACK_MEMBER(strnskil_state::strnskil_irq) | |
| 321 | 321 | { |
| 322 | strnskil_state *state = timer.machine().driver_data<strnskil_state>(); | |
| 323 | 322 | int scanline = param; |
| 324 | 323 | |
| 325 | 324 | if(scanline == 240 || scanline == 96) |
| 326 | 325 | { |
| 327 | | |
| 326 | m_maincpu->set_input_line(0,HOLD_LINE); | |
| 328 | 327 | |
| 329 | | |
| 328 | m_irq_source = (scanline != 240); | |
| 330 | 329 | } |
| 331 | 330 | } |
| 332 | 331 | |
| r18137 | r18138 | |
| 352 | 351 | /* basic machine hardware */ |
| 353 | 352 | MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */ |
| 354 | 353 | MCFG_CPU_PROGRAM_MAP(strnskil_map1) |
| 355 | MCFG_TIMER_ADD_SCANLINE("scantimer", strnskil_irq, "screen", 0, 1) | |
| 354 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", strnskil_state, strnskil_irq, "screen", 0, 1) | |
| 356 | 355 | |
| 357 | 356 | MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */ |
| 358 | 357 | MCFG_CPU_PROGRAM_MAP(strnskil_map2) |
| r18137 | r18138 | |
|---|---|---|
| 499 | 499 | /******************************************************************************/ |
| 500 | 500 | |
| 501 | 501 | /* Main Z80 uses IM2 */ |
| 502 | ||
| 502 | TIMER_DEVICE_CALLBACK_MEMBER(djboy_state::djboy_scanline) | |
| 503 | 503 | { |
| 504 | 504 | int scanline = param; |
| 505 | 505 | |
| 506 | 506 | if(scanline == 240) // vblank-out irq |
| 507 | | |
| 507 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xfd); | |
| 508 | 508 | |
| 509 | 509 | /* Pandora "sprite end dma" irq? TODO: timing is clearly off, attract mode relies on this */ |
| 510 | 510 | if(scanline == 64) |
| 511 | | |
| 511 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xff); | |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | 514 | static const kaneko_pandora_interface djboy_pandora_config = |
| r18137 | r18138 | |
| 572 | 572 | MCFG_CPU_ADD("maincpu", Z80, 6000000) |
| 573 | 573 | MCFG_CPU_PROGRAM_MAP(cpu0_am) |
| 574 | 574 | MCFG_CPU_IO_MAP(cpu0_port_am) |
| 575 | MCFG_TIMER_ADD_SCANLINE("scantimer", djboy_scanline, "screen", 0, 1) | |
| 575 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", djboy_state, djboy_scanline, "screen", 0, 1) | |
| 576 | 576 | |
| 577 | 577 | MCFG_CPU_ADD("cpu1", Z80, 6000000) |
| 578 | 578 | MCFG_CPU_PROGRAM_MAP(cpu1_am) |
| r18137 | r18138 | |
|---|---|---|
| 196 | 196 | * TxDB/TxDB: Data retrieval unit |
| 197 | 197 | */ |
| 198 | 198 | |
| 199 | ||
| 199 | TIMER_DEVICE_CALLBACK_MEMBER(jpmimpct_state::duart_1_timer_event) | |
| 200 | 200 | { |
| 201 | jpmimpct_state *state = timer.machine().driver_data<jpmimpct_state>(); | |
| 202 | state->m_duart_1.tc = 0; | |
| 203 | state->m_duart_1.ISR |= 0x08; | |
| 201 | m_duart_1.tc = 0; | |
| 202 | m_duart_1.ISR |= 0x08; | |
| 204 | 203 | |
| 205 | state->m_duart_1_irq = 1; | |
| 206 | update_irqs(timer.machine()); | |
| 204 | m_duart_1_irq = 1; | |
| 205 | update_irqs(machine()); | |
| 207 | 206 | } |
| 208 | 207 | |
| 209 | 208 | READ16_MEMBER(jpmimpct_state::duart_1_r) |
| r18137 | r18138 | |
| 827 | 826 | MCFG_MACHINE_RESET_OVERRIDE(jpmimpct_state,jpmimpct) |
| 828 | 827 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 829 | 828 | |
| 830 | MCFG_TIMER_ADD( | |
| 829 | MCFG_TIMER_DRIVER_ADD("duart_1_timer", jpmimpct_state, duart_1_timer_event) | |
| 831 | 830 | |
| 832 | 831 | MCFG_SCREEN_ADD("screen", RASTER) |
| 833 | 832 | MCFG_SCREEN_RAW_PARAMS(40000000/4, 156*4, 0, 100*4, 328, 0, 300) |
| r18137 | r18138 | |
| 1379 | 1378 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 1380 | 1379 | |
| 1381 | 1380 | MCFG_I8255_ADD( "ppi8255", ppi8255_intf ) |
| 1382 | MCFG_TIMER_ADD( | |
| 1381 | MCFG_TIMER_DRIVER_ADD("duart_1_timer", jpmimpct_state, duart_1_timer_event) | |
| 1383 | 1382 | |
| 1384 | 1383 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1385 | 1384 | MCFG_SOUND_ADD("upd",UPD7759, UPD7759_STANDARD_CLOCK) |
| r18137 | r18138 | |
|---|---|---|
| 1331 | 1331 | |
| 1332 | 1332 | MCFG_7474_ADD("konami_7474", "konami_7474", NULL, scramble_sh_7474_q_callback) |
| 1333 | 1333 | |
| 1334 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 1334 | MCFG_TIMER_DRIVER_ADD("int_timer", scramble_state, galaxold_interrupt_timer) | |
| 1335 | 1335 | |
| 1336 | 1336 | MCFG_MACHINE_RESET_OVERRIDE(scramble_state,scramble) |
| 1337 | 1337 | |
| r18137 | r18138 | |
| 1562 | 1562 | MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL) |
| 1563 | 1563 | MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback) |
| 1564 | 1564 | |
| 1565 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 1565 | MCFG_TIMER_DRIVER_ADD("int_timer", scramble_state, galaxold_interrupt_timer) | |
| 1566 | 1566 | |
| 1567 | 1567 | MCFG_MACHINE_RESET_OVERRIDE(scramble_state,galaxold) |
| 1568 | 1568 |
| r18137 | r18138 | |
|---|---|---|
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | |
| 443 | ||
| 443 | TIMER_DEVICE_CALLBACK_MEMBER(segas32_state::signal_v60_irq_callback) | |
| 444 | 444 | { |
| 445 | signal_v60_irq( | |
| 445 | signal_v60_irq(machine(), param); | |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | |
| r18137 | r18138 | |
| 2202 | 2202 | |
| 2203 | 2203 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2204 | 2204 | |
| 2205 | MCFG_TIMER_ADD("v60_irq0", signal_v60_irq_callback) | |
| 2206 | MCFG_TIMER_ADD("v60_irq1", signal_v60_irq_callback) | |
| 2205 | MCFG_TIMER_DRIVER_ADD("v60_irq0", segas32_state, signal_v60_irq_callback) | |
| 2206 | MCFG_TIMER_DRIVER_ADD("v60_irq1", segas32_state, signal_v60_irq_callback) | |
| 2207 | 2207 | |
| 2208 | 2208 | /* video hardware */ |
| 2209 | 2209 | MCFG_GFXDECODE(segas32) |
| r18137 | r18138 | |
| 2261 | 2261 | |
| 2262 | 2262 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 2263 | 2263 | |
| 2264 | MCFG_TIMER_ADD("v60_irq0", signal_v60_irq_callback) | |
| 2265 | MCFG_TIMER_ADD("v60_irq1", signal_v60_irq_callback) | |
| 2264 | MCFG_TIMER_DRIVER_ADD("v60_irq0", segas32_state, signal_v60_irq_callback) | |
| 2265 | MCFG_TIMER_DRIVER_ADD("v60_irq1", segas32_state, signal_v60_irq_callback) | |
| 2266 | 2266 | |
| 2267 | 2267 | /* video hardware */ |
| 2268 | 2268 | MCFG_GFXDECODE(segas32) |
| r18137 | r18138 | |
|---|---|---|
| 725 | 725 | machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback); |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | ||
| 728 | TIMER_DEVICE_CALLBACK_MEMBER(model1_state::model1_interrupt) | |
| 729 | 729 | { |
| 730 | model1_state *state = timer.machine().driver_data<model1_state>(); | |
| 731 | 730 | int scanline = param; |
| 732 | 731 | |
| 733 | 732 | if (scanline == 384) |
| 734 | 733 | { |
| 735 | irq_raise( | |
| 734 | irq_raise(machine(), 1); | |
| 736 | 735 | } |
| 737 | 736 | else if(scanline == 384/2) |
| 738 | 737 | { |
| 739 | irq_raise( | |
| 738 | irq_raise(machine(), m_sound_irq); | |
| 740 | 739 | |
| 741 | 740 | // if the FIFO has something in it, signal the 68k too |
| 742 | if ( | |
| 741 | if (m_fifo_rptr != m_fifo_wptr) | |
| 743 | 742 | { |
| 744 | | |
| 743 | machine().device("audiocpu")->execute().set_input_line(2, HOLD_LINE); | |
| 745 | 744 | } |
| 746 | 745 | } |
| 747 | 746 | } |
| r18137 | r18138 | |
| 1520 | 1519 | MCFG_CPU_ADD("maincpu", V60, 16000000) |
| 1521 | 1520 | MCFG_CPU_PROGRAM_MAP(model1_mem) |
| 1522 | 1521 | MCFG_CPU_IO_MAP(model1_io) |
| 1523 | MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1) | |
| 1522 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1) | |
| 1524 | 1523 | |
| 1525 | 1524 | MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w |
| 1526 | 1525 | MCFG_CPU_PROGRAM_MAP(model1_snd) |
| r18137 | r18138 | |
| 1565 | 1564 | MCFG_CPU_ADD("maincpu", V60, 16000000) |
| 1566 | 1565 | MCFG_CPU_PROGRAM_MAP(model1_vr_mem) |
| 1567 | 1566 | MCFG_CPU_IO_MAP(model1_vr_io) |
| 1568 | MCFG_TIMER_ADD_SCANLINE("scantimer", model1_interrupt, "screen", 0, 1) | |
| 1567 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model1_state, model1_interrupt, "screen", 0, 1) | |
| 1569 | 1568 | |
| 1570 | 1569 | MCFG_CPU_ADD("audiocpu", M68000, 10000000) // verified on real h/w |
| 1571 | 1570 | MCFG_CPU_PROGRAM_MAP(model1_snd) |
| r18137 | r18138 | |
|---|---|---|
| 144 | 144 | * |
| 145 | 145 | *************************************/ |
| 146 | 146 | |
| 147 | ||
| 147 | TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback) | |
| 148 | 148 | { |
| 149 | beathead_state *state = timer.machine().driver_data<beathead_state>(); | |
| 150 | 149 | int scanline = param; |
| 151 | 150 | |
| 152 | 151 | /* update the video */ |
| 153 | | |
| 152 | machine().primary_screen->update_now(); | |
| 154 | 153 | |
| 155 | 154 | /* on scanline zero, clear any halt condition */ |
| 156 | 155 | if (scanline == 0) |
| 157 | | |
| 156 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); | |
| 158 | 157 | |
| 159 | 158 | /* wrap around at 262 */ |
| 160 | 159 | scanline++; |
| r18137 | r18138 | |
| 162 | 161 | scanline = 0; |
| 163 | 162 | |
| 164 | 163 | /* set the scanline IRQ */ |
| 165 | state->m_irq_state[2] = 1; | |
| 166 | state->update_interrupts(); | |
| 164 | m_irq_state[2] = 1; | |
| 165 | update_interrupts(); | |
| 167 | 166 | |
| 168 | 167 | /* set the timer for the next one */ |
| 169 | timer.adjust( | |
| 168 | timer.adjust(machine().primary_screen->time_until_pos(scanline) - m_hblank_offset, scanline); | |
| 170 | 169 | } |
| 171 | 170 | |
| 172 | 171 | |
| r18137 | r18138 | |
| 436 | 435 | |
| 437 | 436 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 438 | 437 | |
| 439 | MCFG_TIMER_ADD("scan_timer", scanline_callback) | |
| 438 | MCFG_TIMER_DRIVER_ADD("scan_timer", beathead_state, scanline_callback) | |
| 440 | 439 | |
| 441 | 440 | /* video hardware */ |
| 442 | 441 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r18137 | r18138 | |
|---|---|---|
| 673 | 673 | MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL) |
| 674 | 674 | MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback) |
| 675 | 675 | |
| 676 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 676 | MCFG_TIMER_DRIVER_ADD("int_timer", scobra_state, galaxold_interrupt_timer) | |
| 677 | 677 | |
| 678 | 678 | /* video hardware */ |
| 679 | 679 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 792 | 792 | MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL) |
| 793 | 793 | MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback) |
| 794 | 794 | |
| 795 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 795 | MCFG_TIMER_DRIVER_ADD("int_timer", scobra_state, galaxold_interrupt_timer) | |
| 796 | 796 | |
| 797 | 797 | /* device config overrides */ |
| 798 | 798 | MCFG_I8255A_ADD( "ppi8255_0", scramble_ppi_0_intf ) |
| r18137 | r18138 | |
|---|---|---|
| 1806 | 1806 | MCFG_SCREEN_UPDATE_DRIVER(itech8_state, screen_update_itech8_grmatch) |
| 1807 | 1807 | |
| 1808 | 1808 | /* palette updater */ |
| 1809 | MCFG_TIMER_ADD_SCANLINE("palette", grmatch_palette_update, "screen", 0, 0) | |
| 1809 | MCFG_TIMER_DRIVER_ADD_SCANLINE("palette", itech8_state, grmatch_palette_update, "screen", 0, 0) | |
| 1810 | 1810 | MACHINE_CONFIG_END |
| 1811 | 1811 | |
| 1812 | 1812 |
| r18137 | r18138 | |
|---|---|---|
| 1024 | 1024 | ***************************************************************************/ |
| 1025 | 1025 | |
| 1026 | 1026 | |
| 1027 | ||
| 1027 | TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::wecleman_scanline) | |
| 1028 | 1028 | { |
| 1029 | 1029 | int scanline = param; |
| 1030 | 1030 | |
| 1031 | 1031 | if(scanline == 232) // vblank irq |
| 1032 | | |
| 1032 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 1033 | 1033 | else if(((scanline % 64) == 0)) // timer irq TODO: timings |
| 1034 | | |
| 1034 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 1035 | 1035 | } |
| 1036 | 1036 | |
| 1037 | ||
| 1037 | TIMER_DEVICE_CALLBACK_MEMBER(wecleman_state::hotchase_scanline) | |
| 1038 | 1038 | { |
| 1039 | 1039 | int scanline = param; |
| 1040 | 1040 | |
| 1041 | 1041 | if(scanline == 224) // vblank irq |
| 1042 | | |
| 1042 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 1043 | 1043 | else if(((scanline % 64) == 0)) // timer irq TODO: timings |
| 1044 | | |
| 1044 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 1045 | 1045 | } |
| 1046 | 1046 | |
| 1047 | 1047 | |
| r18137 | r18138 | |
| 1055 | 1055 | /* basic machine hardware */ |
| 1056 | 1056 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Schems show 10MHz */ |
| 1057 | 1057 | MCFG_CPU_PROGRAM_MAP(wecleman_map) |
| 1058 | MCFG_TIMER_ADD_SCANLINE("scantimer", wecleman_scanline, "screen", 0, 1) | |
| 1058 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wecleman_state, wecleman_scanline, "screen", 0, 1) | |
| 1059 | 1059 | |
| 1060 | 1060 | MCFG_CPU_ADD("sub", M68000, 10000000) /* Schems show 10MHz */ |
| 1061 | 1061 | MCFG_CPU_PROGRAM_MAP(wecleman_sub_map) |
| r18137 | r18138 | |
| 1139 | 1139 | /* basic machine hardware */ |
| 1140 | 1140 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz - PCB is drawn in one set's readme */ |
| 1141 | 1141 | MCFG_CPU_PROGRAM_MAP(hotchase_map) |
| 1142 | MCFG_TIMER_ADD_SCANLINE("scantimer", hotchase_scanline, "screen", 0, 1) | |
| 1142 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wecleman_state, hotchase_scanline, "screen", 0, 1) | |
| 1143 | 1143 | |
| 1144 | 1144 | MCFG_CPU_ADD("sub", M68000, 10000000) /* 10 MHz - PCB is drawn in one set's readme */ |
| 1145 | 1145 | MCFG_CPU_PROGRAM_MAP(hotchase_sub_map) |
| r18137 | r18138 | |
|---|---|---|
| 455 | 455 | DEVCB_LINE(irqhandler) |
| 456 | 456 | }; |
| 457 | 457 | |
| 458 | ||
| 458 | TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::lastduel_timer_cb) | |
| 459 | 459 | { |
| 460 | lastduel_state *state = timer.machine().driver_data<lastduel_state>(); | |
| 461 | ||
| 462 | state->m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */ | |
| 460 | m_maincpu->set_input_line(4, HOLD_LINE); /* Controls */ | |
| 463 | 461 | } |
| 464 | 462 | |
| 465 | ||
| 463 | TIMER_DEVICE_CALLBACK_MEMBER(lastduel_state::madgear_timer_cb) | |
| 466 | 464 | { |
| 467 | lastduel_state *state = timer.machine().driver_data<lastduel_state>(); | |
| 468 | ||
| 469 | state->m_maincpu->set_input_line(6, HOLD_LINE); /* Controls */ | |
| 465 | m_maincpu->set_input_line(6, HOLD_LINE); /* Controls */ | |
| 470 | 466 | } |
| 471 | 467 | |
| 472 | 468 | MACHINE_START_MEMBER(lastduel_state,lastduel) |
| r18137 | r18138 | |
| 501 | 497 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Could be 8 MHz */ |
| 502 | 498 | MCFG_CPU_PROGRAM_MAP(lastduel_map) |
| 503 | 499 | MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq2_line_hold) |
| 504 | MCFG_TIMER_ADD_PERIODIC("timer_irq", lastduel_timer_cb, attotime::from_hz(120)) | |
| 500 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", lastduel_state, lastduel_timer_cb, attotime::from_hz(120)) | |
| 505 | 501 | |
| 506 | 502 | MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Accurate */ |
| 507 | 503 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
| 544 | 540 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* Accurate */ |
| 545 | 541 | MCFG_CPU_PROGRAM_MAP(madgear_map) |
| 546 | 542 | MCFG_CPU_VBLANK_INT_DRIVER("screen", lastduel_state, irq5_line_hold) |
| 547 | MCFG_TIMER_ADD_PERIODIC("timer_irq", madgear_timer_cb, attotime::from_hz(120)) | |
| 543 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", lastduel_state, madgear_timer_cb, attotime::from_hz(120)) | |
| 548 | 544 | |
| 549 | 545 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ |
| 550 | 546 | MCFG_CPU_PROGRAM_MAP(madgear_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 116 | 116 | return (vcount - 0x18) | 0x100; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | ||
| 119 | TIMER_DEVICE_CALLBACK_MEMBER(ddragon_state::ddragon_scanline) | |
| 120 | 120 | { |
| 121 | ddragon_state *state = timer.machine().driver_data<ddragon_state>(); | |
| 122 | 121 | int scanline = param; |
| 123 | int screen_height = | |
| 122 | int screen_height = machine().primary_screen->height(); | |
| 124 | 123 | int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1); |
| 125 | 124 | int vcount = scanline_to_vcount(scanline); |
| 126 | 125 | |
| 127 | 126 | /* update to the current point */ |
| 128 | 127 | if (scanline > 0) |
| 129 | | |
| 128 | machine().primary_screen->update_partial(scanline - 1); | |
| 130 | 129 | |
| 131 | 130 | /* on the rising edge of VBLK (vcount == F8), signal an NMI */ |
| 132 | 131 | if (vcount == 0xf8) |
| 133 | | |
| 132 | m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 134 | 133 | |
| 135 | 134 | /* set 1ms signal on rising edge of vcount & 8 */ |
| 136 | 135 | if (!(vcount_old & 8) && (vcount & 8)) |
| 137 | | |
| 136 | m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); | |
| 138 | 137 | } |
| 139 | 138 | |
| 140 | 139 | |
| r18137 | r18138 | |
| 966 | 965 | /* basic machine hardware */ |
| 967 | 966 | MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK) /* 12 MHz / 4 internally */ |
| 968 | 967 | MCFG_CPU_PROGRAM_MAP(ddragon_map) |
| 969 | MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1) | |
| 968 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1) | |
| 970 | 969 | |
| 971 | 970 | MCFG_CPU_ADD("sub", HD63701, MAIN_CLOCK / 2) /* 6 MHz / 4 internally */ |
| 972 | 971 | MCFG_CPU_PROGRAM_MAP(sub_map) |
| r18137 | r18138 | |
| 1029 | 1028 | /* basic machine hardware */ |
| 1030 | 1029 | MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK / 8) /* 1.5 MHz */ |
| 1031 | 1030 | MCFG_CPU_PROGRAM_MAP(ddragon_map) |
| 1032 | MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1) | |
| 1031 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1) | |
| 1033 | 1032 | |
| 1034 | 1033 | MCFG_CPU_ADD("sub", M6809, MAIN_CLOCK / 8) /* 1.5 Mhz */ |
| 1035 | 1034 | MCFG_CPU_PROGRAM_MAP(sub_map) |
| r18137 | r18138 | |
| 1075 | 1074 | /* basic machine hardware */ |
| 1076 | 1075 | MCFG_CPU_ADD("maincpu", HD6309, MAIN_CLOCK) /* 12 MHz / 4 internally */ |
| 1077 | 1076 | MCFG_CPU_PROGRAM_MAP(dd2_map) |
| 1078 | MCFG_TIMER_ADD_SCANLINE("scantimer", ddragon_scanline, "screen", 0, 1) | |
| 1077 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ddragon_state, ddragon_scanline, "screen", 0, 1) | |
| 1079 | 1078 | |
| 1080 | 1079 | MCFG_CPU_ADD("sub", Z80, MAIN_CLOCK / 3) /* 4 MHz */ |
| 1081 | 1080 | MCFG_CPU_PROGRAM_MAP(dd2_sub_map) |
| r18137 | r18138 | |
|---|---|---|
| 1533 | 1533 | **************************************************************************/ |
| 1534 | 1534 | |
| 1535 | 1535 | /* TODO: this is hackish */ |
| 1536 | ||
| 1536 | TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::bigrun_scanline) | |
| 1537 | 1537 | { |
| 1538 | 1538 | int scanline = param; |
| 1539 | 1539 | |
| 1540 | 1540 | if(scanline == 240) // vblank-out irq |
| 1541 | | |
| 1541 | machine().device("cpu1")->execute().set_input_line(4, HOLD_LINE); | |
| 1542 | 1542 | |
| 1543 | 1543 | if(scanline == 154) |
| 1544 | | |
| 1544 | machine().device("cpu1")->execute().set_input_line(2, HOLD_LINE); | |
| 1545 | 1545 | |
| 1546 | 1546 | if(scanline == 69) |
| 1547 | | |
| 1547 | machine().device("cpu1")->execute().set_input_line(1, HOLD_LINE); | |
| 1548 | 1548 | } |
| 1549 | 1549 | |
| 1550 | 1550 | |
| r18137 | r18138 | |
| 1560 | 1560 | /* basic machine hardware */ |
| 1561 | 1561 | MCFG_CPU_ADD("cpu1", M68000, 10000000) |
| 1562 | 1562 | MCFG_CPU_PROGRAM_MAP(bigrun_map) |
| 1563 | MCFG_TIMER_ADD_SCANLINE("scantimer", bigrun_scanline, "screen", 0, 1) | |
| 1563 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cischeat_state, bigrun_scanline, "screen", 0, 1) | |
| 1564 | 1564 | |
| 1565 | 1565 | MCFG_CPU_ADD("cpu2", M68000, 10000000) |
| 1566 | 1566 | MCFG_CPU_PROGRAM_MAP(bigrun_map2) |
| r18137 | r18138 | |
| 1691 | 1691 | 4] == 3 |
| 1692 | 1692 | */ |
| 1693 | 1693 | |
| 1694 | ||
| 1694 | TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::scudhamm_scanline) | |
| 1695 | 1695 | { |
| 1696 | 1696 | int scanline = param; |
| 1697 | 1697 | |
| 1698 | 1698 | if(scanline == 240) // vblank-out irq |
| 1699 | | |
| 1699 | machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 1700 | 1700 | |
| 1701 | 1701 | if(scanline == 120) // timer irq (clears a flag, presumably sprite DMA end) |
| 1702 | | |
| 1702 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 1703 | 1703 | } |
| 1704 | 1704 | |
| 1705 | 1705 | static MACHINE_CONFIG_START( scudhamm, cischeat_state ) |
| r18137 | r18138 | |
| 1707 | 1707 | /* basic machine hardware */ |
| 1708 | 1708 | MCFG_CPU_ADD("maincpu",M68000, 12000000) |
| 1709 | 1709 | MCFG_CPU_PROGRAM_MAP(scudhamm_map) |
| 1710 | MCFG_TIMER_ADD_SCANLINE("scantimer", scudhamm_scanline, "screen", 0, 1) | |
| 1710 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cischeat_state, scudhamm_scanline, "screen", 0, 1) | |
| 1711 | 1711 | |
| 1712 | 1712 | /* video hardware */ |
| 1713 | 1713 | MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_HAS_SHADOWS) |
| r18137 | r18138 | |
| 1741 | 1741 | Arm Champs II |
| 1742 | 1742 | **************************************************************************/ |
| 1743 | 1743 | |
| 1744 | ||
| 1744 | TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::armchamp2_scanline) | |
| 1745 | 1745 | { |
| 1746 | 1746 | int scanline = param; |
| 1747 | 1747 | |
| 1748 | 1748 | if(scanline == 240) // vblank-out irq |
| 1749 | | |
| 1749 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 1750 | 1750 | |
| 1751 | 1751 | if(scanline == 120) // timer irq (TODO: timing) |
| 1752 | | |
| 1752 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 1753 | 1753 | } |
| 1754 | 1754 | |
| 1755 | 1755 | static MACHINE_CONFIG_DERIVED( armchmp2, scudhamm ) |
| r18137 | r18138 | |
| 1758 | 1758 | MCFG_CPU_MODIFY("maincpu") |
| 1759 | 1759 | MCFG_CPU_PROGRAM_MAP(armchmp2_map) |
| 1760 | 1760 | MCFG_TIMER_MODIFY("scantimer") |
| 1761 | MCFG_TIMER_CALLBACK(armchamp2_scanline) | |
| 1761 | MCFG_TIMER_DRIVER_CALLBACK(cischeat_state, armchamp2_scanline) | |
| 1762 | 1762 | MACHINE_CONFIG_END |
| 1763 | 1763 | |
| 1764 | 1764 |
| r18137 | r18138 | |
|---|---|---|
| 441 | 441 | * |
| 442 | 442 | *************************************/ |
| 443 | 443 | |
| 444 | ||
| 444 | TIMER_DEVICE_CALLBACK_MEMBER(centiped_state::generate_interrupt) | |
| 445 | 445 | { |
| 446 | 446 | int scanline = param; |
| 447 | 447 | |
| 448 | 448 | /* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */ |
| 449 | 449 | if (scanline & 16) |
| 450 | | |
| 450 | machine().device("maincpu")->execute().set_input_line(0, ((scanline - 1) & 32) ? ASSERT_LINE : CLEAR_LINE); | |
| 451 | 451 | |
| 452 | 452 | /* do a partial update now to handle sprite multiplexing (Maze Invaders) */ |
| 453 | | |
| 453 | machine().primary_screen->update_partial(scanline); | |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | |
| r18137 | r18138 | |
| 1759 | 1759 | MCFG_ATARIVGEAROM_ADD("earom") |
| 1760 | 1760 | |
| 1761 | 1761 | /* timer */ |
| 1762 | MCFG_TIMER_ADD_SCANLINE("32v", generate_interrupt, "screen", 0, 16) | |
| 1762 | MCFG_TIMER_DRIVER_ADD_SCANLINE("32v", centiped_state, generate_interrupt, "screen", 0, 16) | |
| 1763 | 1763 | |
| 1764 | 1764 | /* video hardware */ |
| 1765 | 1765 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 297 | 297 | return state->m_irq_adr_table[state->m_last_irq_level]; |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | ||
| 300 | TIMER_DEVICE_CALLBACK_MEMBER(taitol_state::vbl_interrupt) | |
| 301 | 301 | { |
| 302 | taitol_state *state = timer.machine().driver_data<taitol_state>(); | |
| 303 | 302 | int scanline = param; |
| 304 | | |
| 303 | m_maincpu->set_irq_acknowledge_callback(irq_callback); | |
| 305 | 304 | |
| 306 | 305 | /* kludge to make plgirls boot */ |
| 307 | if ( | |
| 306 | if (m_maincpu->state_int(Z80_IM) != 2) | |
| 308 | 307 | return; |
| 309 | 308 | |
| 310 | 309 | // What is really generating interrupts 0 and 1 is still to be found |
| 311 | 310 | |
| 312 | if (scanline == 120 && ( | |
| 311 | if (scanline == 120 && (m_irq_enable & 1)) | |
| 313 | 312 | { |
| 314 | state->m_last_irq_level = 0; | |
| 315 | state->m_maincpu->set_input_line(0, HOLD_LINE); | |
| 313 | m_last_irq_level = 0; | |
| 314 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 316 | 315 | } |
| 317 | else if (scanline == 0 && ( | |
| 316 | else if (scanline == 0 && (m_irq_enable & 2)) | |
| 318 | 317 | { |
| 319 | state->m_last_irq_level = 1; | |
| 320 | state->m_maincpu->set_input_line(0, HOLD_LINE); | |
| 318 | m_last_irq_level = 1; | |
| 319 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 321 | 320 | } |
| 322 | else if (scanline == 240 && ( | |
| 321 | else if (scanline == 240 && (m_irq_enable & 4)) | |
| 323 | 322 | { |
| 324 | state->m_last_irq_level = 2; | |
| 325 | state->m_maincpu->set_input_line(0, HOLD_LINE); | |
| 323 | m_last_irq_level = 2; | |
| 324 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 326 | 325 | } |
| 327 | 326 | } |
| 328 | 327 | |
| r18137 | r18138 | |
| 1844 | 1843 | /* basic machine hardware */ |
| 1845 | 1844 | MCFG_CPU_ADD("maincpu", Z80, XTAL_13_33056MHz/2) /* verified freq on pin122 of TC0090LVC cpu */ |
| 1846 | 1845 | MCFG_CPU_PROGRAM_MAP(fhawk_map) |
| 1847 | MCFG_TIMER_ADD_SCANLINE("scantimer", vbl_interrupt, "screen", 0, 1) | |
| 1846 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitol_state, vbl_interrupt, "screen", 0, 1) | |
| 1848 | 1847 | |
| 1849 | 1848 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3) /* verified on pcb */ |
| 1850 | 1849 | MCFG_CPU_PROGRAM_MAP(fhawk_3_map) |
| r18137 | r18138 | |
| 1939 | 1938 | /* basic machine hardware */ |
| 1940 | 1939 | MCFG_CPU_ADD("maincpu", Z80, XTAL_13_33056MHz/2) /* verified freq on pin122 of TC0090LVC cpu */ |
| 1941 | 1940 | MCFG_CPU_PROGRAM_MAP(kurikint_map) |
| 1942 | MCFG_TIMER_ADD_SCANLINE("scantimer", vbl_interrupt, "screen", 0, 1) | |
| 1941 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitol_state, vbl_interrupt, "screen", 0, 1) | |
| 1943 | 1942 | |
| 1944 | 1943 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3) /* verified on pcb */ |
| 1945 | 1944 | MCFG_CPU_PROGRAM_MAP(kurikint_2_map) |
| r18137 | r18138 | |
| 1991 | 1990 | /* basic machine hardware */ |
| 1992 | 1991 | MCFG_CPU_ADD("maincpu", Z80, XTAL_13_33056MHz/2) /* verified freq on pin122 of TC0090LVC cpu */ |
| 1993 | 1992 | MCFG_CPU_PROGRAM_MAP(plotting_map) |
| 1994 | MCFG_TIMER_ADD_SCANLINE("scantimer", vbl_interrupt, "screen", 0, 1) | |
| 1993 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitol_state, vbl_interrupt, "screen", 0, 1) | |
| 1995 | 1994 | |
| 1996 | 1995 | MCFG_MACHINE_START_OVERRIDE(taitol_state,taito_l) |
| 1997 | 1996 | MCFG_MACHINE_RESET_OVERRIDE(taitol_state,plotting) |
| r18137 | r18138 | |
| 2077 | 2076 | /* basic machine hardware */ |
| 2078 | 2077 | MCFG_CPU_ADD("maincpu", Z80, XTAL_13_33056MHz/2) /* not verified */ |
| 2079 | 2078 | MCFG_CPU_PROGRAM_MAP(evilston_map) |
| 2080 | MCFG_TIMER_ADD_SCANLINE("scantimer", vbl_interrupt, "screen", 0, 1) | |
| 2079 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitol_state, vbl_interrupt, "screen", 0, 1) | |
| 2081 | 2080 | |
| 2082 | 2081 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_12MHz/3) /* not verified */ |
| 2083 | 2082 | MCFG_CPU_PROGRAM_MAP(evilston_2_map) |
| r18137 | r18138 | |
|---|---|---|
| 75 | 75 | m_sound_nmi_enabled = data & 1; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | ||
| 78 | TIMER_DEVICE_CALLBACK_MEMBER(espial_state::espial_scanline) | |
| 79 | 79 | { |
| 80 | espial_state *state = timer.machine().driver_data<espial_state>(); | |
| 81 | 80 | int scanline = param; |
| 82 | 81 | |
| 83 | if(scanline == 240 && state->m_main_nmi_enabled) // vblank-out irq | |
| 84 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 82 | if(scanline == 240 && m_main_nmi_enabled) // vblank-out irq | |
| 83 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 85 | 84 | |
| 86 | 85 | if(scanline == 16) // timer irq, checks soundlatch port then updates some sound related work RAM buffers |
| 87 | | |
| 86 | machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | |
| r18137 | r18138 | |
| 322 | 321 | /* basic machine hardware */ |
| 323 | 322 | MCFG_CPU_ADD("maincpu", Z80, 3072000) /* 3.072 MHz */ |
| 324 | 323 | MCFG_CPU_PROGRAM_MAP(espial_map) |
| 325 | MCFG_TIMER_ADD_SCANLINE("scantimer", espial_scanline, "screen", 0, 1) | |
| 324 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", espial_state, espial_scanline, "screen", 0, 1) | |
| 326 | 325 | |
| 327 | 326 | MCFG_CPU_ADD("audiocpu", Z80, 3072000) /* 2 MHz?????? */ |
| 328 | 327 | MCFG_CPU_PROGRAM_MAP(espial_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 1304 | 1304 | } |
| 1305 | 1305 | |
| 1306 | 1306 | /* TODO: fix this arrangement (derived from old deprecat lib) */ |
| 1307 | ||
| 1307 | TIMER_DEVICE_CALLBACK_MEMBER(ms32_state::ms32_interrupt) | |
| 1308 | 1308 | { |
| 1309 | 1309 | int scanline = param; |
| 1310 | if( scanline == 0) irq_raise(timer.machine(), 10); | |
| 1311 | if( scanline == 8) irq_raise(timer.machine(), 9); | |
| 1310 | if( scanline == 0) irq_raise(machine(), 10); | |
| 1311 | if( scanline == 8) irq_raise(machine(), 9); | |
| 1312 | 1312 | /* hayaosi1 needs at least 12 IRQ 0 per frame to work (see code at FFE02289) |
| 1313 | 1313 | kirarast needs it too, at least 8 per frame, but waits for a variable amount |
| 1314 | 1314 | 47pi2 needs ?? per frame (otherwise it hangs when you lose) |
| r18137 | r18138 | |
| 1317 | 1317 | desertwr |
| 1318 | 1318 | p47aces |
| 1319 | 1319 | */ |
| 1320 | if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise( | |
| 1320 | if( (scanline % 8) == 0 && scanline <= 224 ) irq_raise(machine(), 0); | |
| 1321 | 1321 | } |
| 1322 | 1322 | |
| 1323 | 1323 | |
| r18137 | r18138 | |
| 1394 | 1394 | /* basic machine hardware */ |
| 1395 | 1395 | MCFG_CPU_ADD("maincpu", V70, 20000000) // 20MHz |
| 1396 | 1396 | MCFG_CPU_PROGRAM_MAP(ms32_map) |
| 1397 | MCFG_TIMER_ADD_SCANLINE("scantimer", ms32_interrupt, "screen", 0, 1) | |
| 1397 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ms32_state, ms32_interrupt, "screen", 0, 1) | |
| 1398 | 1398 | |
| 1399 | 1399 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) |
| 1400 | 1400 | MCFG_CPU_PROGRAM_MAP(ms32_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 1081 | 1081 | MCFG_CPU_PROGRAM_MAP(mcrmono_map) |
| 1082 | 1082 | MCFG_CPU_IO_MAP(mcrmono_portmap) |
| 1083 | 1083 | MCFG_CPU_CONFIG(mcr_daisy_chain) |
| 1084 | MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1) | |
| 1084 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mcr3_state, mcr_interrupt, "screen", 0, 1) | |
| 1085 | 1085 | |
| 1086 | 1086 | MCFG_Z80CTC_ADD("ctc", MASTER_CLOCK/4 /* same as "maincpu" */, mcr_ctc_intf) |
| 1087 | 1087 |
| r18137 | r18138 | |
|---|---|---|
| 5251 | 5251 | 0x02: Video (VBLANK start?) |
| 5252 | 5252 | 0x01: Video (unused?) |
| 5253 | 5253 | */ |
| 5254 | ||
| 5254 | TIMER_DEVICE_CALLBACK_MEMBER(model3_state::model3_interrupt) | |
| 5255 | 5255 | { |
| 5256 | // model3_state *state = timer.machine().driver_data<model3_state>(); | |
| 5257 | 5256 | int scanline = param; |
| 5258 | 5257 | |
| 5259 | 5258 | if (scanline == 384) |
| 5260 | model3_set_irq_line( | |
| 5259 | model3_set_irq_line(machine(), 0x02, ASSERT_LINE); | |
| 5261 | 5260 | else if(scanline == 0) |
| 5262 | model3_set_irq_line( | |
| 5261 | model3_set_irq_line(machine(), 0x0d, ASSERT_LINE); | |
| 5263 | 5262 | } |
| 5264 | 5263 | |
| 5265 | 5264 | static const powerpc_config model3_10 = |
| r18137 | r18138 | |
| 5290 | 5289 | MCFG_CPU_ADD("maincpu", PPC603E, 66000000) |
| 5291 | 5290 | MCFG_CPU_CONFIG(model3_10) |
| 5292 | 5291 | MCFG_CPU_PROGRAM_MAP(model3_mem) |
| 5293 | MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1) | |
| 5292 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1) | |
| 5294 | 5293 | |
| 5295 | 5294 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 5296 | 5295 | MCFG_CPU_PROGRAM_MAP(model3_snd) |
| r18137 | r18138 | |
| 5333 | 5332 | MCFG_CPU_ADD("maincpu", PPC603E, 100000000) |
| 5334 | 5333 | MCFG_CPU_CONFIG(model3_15) |
| 5335 | 5334 | MCFG_CPU_PROGRAM_MAP(model3_mem) |
| 5336 | MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1) | |
| 5335 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1) | |
| 5337 | 5336 | |
| 5338 | 5337 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 5339 | 5338 | MCFG_CPU_PROGRAM_MAP(model3_snd) |
| r18137 | r18138 | |
| 5374 | 5373 | MCFG_CPU_ADD("maincpu", PPC603R, 166000000) |
| 5375 | 5374 | MCFG_CPU_CONFIG(model3_2x) |
| 5376 | 5375 | MCFG_CPU_PROGRAM_MAP(model3_mem) |
| 5377 | MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1) | |
| 5376 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1) | |
| 5378 | 5377 | |
| 5379 | 5378 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 5380 | 5379 | MCFG_CPU_PROGRAM_MAP(model3_snd) |
| r18137 | r18138 | |
| 5412 | 5411 | MCFG_CPU_ADD("maincpu", PPC603R, 166000000) |
| 5413 | 5412 | MCFG_CPU_CONFIG(model3_2x) |
| 5414 | 5413 | MCFG_CPU_PROGRAM_MAP(model3_mem) |
| 5415 | MCFG_TIMER_ADD_SCANLINE("scantimer", model3_interrupt, "screen", 0, 1) | |
| 5414 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", model3_state, model3_interrupt, "screen", 0, 1) | |
| 5416 | 5415 | |
| 5417 | 5416 | MCFG_CPU_ADD("audiocpu", M68000, 12000000) |
| 5418 | 5417 | MCFG_CPU_PROGRAM_MAP(model3_snd) |
| r18137 | r18138 | |
|---|---|---|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | |
| 29 | ||
| 29 | TIMER_DEVICE_CALLBACK_MEMBER(chqflag_state::chqflag_scanline) | |
| 30 | 30 | { |
| 31 | chqflag_state *state = timer.machine().driver_data<chqflag_state>(); | |
| 32 | 31 | int scanline = param; |
| 33 | 32 | |
| 34 | if(scanline == 240 && k051960_is_irq_enabled(state->m_k051960)) // vblank irq | |
| 35 | timer.machine().device("maincpu")->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); | |
| 36 | else if(((scanline % 32) == 0) && (k051960_is_nmi_enabled(state->m_k051960))) // timer irq | |
| 37 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 33 | if(scanline == 240 && k051960_is_irq_enabled(m_k051960)) // vblank irq | |
| 34 | machine().device("maincpu")->execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); | |
| 35 | else if(((scanline % 32) == 0) && (k051960_is_nmi_enabled(m_k051960))) // timer irq | |
| 36 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 38 | 37 | } |
| 39 | 38 | |
| 40 | 39 | WRITE8_MEMBER(chqflag_state::chqflag_bankswitch_w) |
| r18137 | r18138 | |
| 356 | 355 | /* basic machine hardware */ |
| 357 | 356 | MCFG_CPU_ADD("maincpu", KONAMI,XTAL_24MHz/8) /* 052001 (verified on pcb) */ |
| 358 | 357 | MCFG_CPU_PROGRAM_MAP(chqflag_map) |
| 359 | MCFG_TIMER_ADD_SCANLINE("scantimer", chqflag_scanline, "screen", 0, 1) | |
| 358 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", chqflag_state, chqflag_scanline, "screen", 0, 1) | |
| 360 | 359 | |
| 361 | 360 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ |
| 362 | 361 | MCFG_CPU_PROGRAM_MAP(chqflag_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 116 | 116 | return m_status ^ 0x01; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | ||
| 119 | TIMER_DEVICE_CALLBACK_MEMBER(mrflea_state::mrflea_slave_interrupt) | |
| 120 | 120 | { |
| 121 | mrflea_state *state = timer.machine().driver_data<mrflea_state>(); | |
| 122 | 121 | int scanline = param; |
| 123 | 122 | |
| 124 | if ((scanline == 248) || (scanline == 248/2 && (state->m_status & 0x08))) | |
| 125 | state->m_subcpu->set_input_line(0, HOLD_LINE); | |
| 123 | if ((scanline == 248) || (scanline == 248/2 && (m_status & 0x08))) | |
| 124 | m_subcpu->set_input_line(0, HOLD_LINE); | |
| 126 | 125 | } |
| 127 | 126 | |
| 128 | 127 | READ8_MEMBER(mrflea_state::mrflea_interrupt_type_r) |
| r18137 | r18138 | |
| 362 | 361 | MCFG_CPU_ADD("sub", Z80, 6000000) |
| 363 | 362 | MCFG_CPU_PROGRAM_MAP(mrflea_slave_map) |
| 364 | 363 | MCFG_CPU_IO_MAP(mrflea_slave_io_map) |
| 365 | MCFG_TIMER_ADD_SCANLINE("scantimer", mrflea_slave_interrupt, "screen", 0, 1) | |
| 364 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mrflea_state, mrflea_slave_interrupt, "screen", 0, 1) | |
| 366 | 365 | |
| 367 | 366 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 368 | 367 |
| r18137 | r18138 | |
|---|---|---|
| 1062 | 1062 | MCFG_FRAGMENT_ADD( sound_2151 ) |
| 1063 | 1063 | MACHINE_CONFIG_END |
| 1064 | 1064 | |
| 1065 | ||
| 1065 | TIMER_DEVICE_CALLBACK_MEMBER(dooyong_state::rshark_scanline) | |
| 1066 | 1066 | { |
| 1067 | 1067 | int scanline = param; |
| 1068 | 1068 | |
| 1069 | 1069 | if(scanline == 248) // vblank-out irq |
| 1070 | | |
| 1070 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 1071 | 1071 | |
| 1072 | 1072 | if(scanline == 120) // timer irq? |
| 1073 | | |
| 1073 | machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE); | |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | |
| r18137 | r18138 | |
| 1079 | 1079 | /* basic machine hardware */ |
| 1080 | 1080 | MCFG_CPU_ADD("maincpu", M68000, 8000000) /* measured on super-x */ |
| 1081 | 1081 | MCFG_CPU_PROGRAM_MAP(rshark_map) |
| 1082 | MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1) | |
| 1082 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1) | |
| 1083 | 1083 | |
| 1084 | 1084 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */ |
| 1085 | 1085 | MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) |
| r18137 | r18138 | |
| 1109 | 1109 | /* basic machine hardware */ |
| 1110 | 1110 | MCFG_CPU_ADD("maincpu", M68000, 8000000) /* measured on super-x */ |
| 1111 | 1111 | MCFG_CPU_PROGRAM_MAP(superx_map) |
| 1112 | MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1) | |
| 1112 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1) | |
| 1113 | 1113 | |
| 1114 | 1114 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */ |
| 1115 | 1115 | MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) |
| r18137 | r18138 | |
| 1139 | 1139 | /* basic machine hardware */ |
| 1140 | 1140 | MCFG_CPU_ADD("maincpu", M68000, 10000000) |
| 1141 | 1141 | MCFG_CPU_PROGRAM_MAP(popbingo_map) |
| 1142 | MCFG_TIMER_ADD_SCANLINE("scantimer", rshark_scanline, "screen", 0, 1) | |
| 1142 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dooyong_state, rshark_scanline, "screen", 0, 1) | |
| 1143 | 1143 | |
| 1144 | 1144 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) /* measured on super-x */ |
| 1145 | 1145 | MCFG_CPU_PROGRAM_MAP(bluehawk_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 1757 | 1757 | m_maincpu->set_input_line(0, CLEAR_LINE); |
| 1758 | 1758 | } |
| 1759 | 1759 | |
| 1760 | ||
| 1760 | TIMER_DEVICE_CALLBACK_MEMBER(hng64_state::hng64_irq) | |
| 1761 | 1761 | { |
| 1762 | hng64_state *state = timer.machine().driver_data<hng64_state>(); | |
| 1763 | 1762 | int scanline = param; |
| 1764 | 1763 | |
| 1765 | 1764 | switch(scanline) |
| 1766 | 1765 | { |
| 1767 | case 224*2: state->m_set_irq(0x0001); break; // lv 0 vblank irq | |
| 1768 | //case 0*2: state->m_set_irq(0x0002); break; // lv 1 | |
| 1769 | //case 64*2: state->m_set_irq(0x0004); break; // lv 2 | |
| 1770 | case 128*2: state->m_set_irq(0x0800); break; // lv 11 network irq? | |
| 1766 | case 224*2: m_set_irq(0x0001); break; // lv 0 vblank irq | |
| 1767 | //case 0*2: m_set_irq(0x0002); break; // lv 1 | |
| 1768 | //case 64*2: m_set_irq(0x0004); break; // lv 2 | |
| 1769 | case 128*2: m_set_irq(0x0800); break; // lv 11 network irq? | |
| 1771 | 1770 | } |
| 1772 | 1771 | } |
| 1773 | 1772 | |
| r18137 | r18138 | |
| 1832 | 1831 | MCFG_CPU_ADD("maincpu", VR4300BE, MASTER_CLOCK) // actually R4300 |
| 1833 | 1832 | MCFG_CPU_CONFIG(vr4300_config) |
| 1834 | 1833 | MCFG_CPU_PROGRAM_MAP(hng_map) |
| 1835 | MCFG_TIMER_ADD_SCANLINE("scantimer", hng64_irq, "screen", 0, 1) | |
| 1834 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hng64_state, hng64_irq, "screen", 0, 1) | |
| 1836 | 1835 | |
| 1837 | 1836 | MCFG_CPU_ADD("audiocpu", V33, 8000000) // v53, 16? mhz! |
| 1838 | 1837 | MCFG_CPU_PROGRAM_MAP(hng_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 29 | 29 | GFXDECODE_END |
| 30 | 30 | |
| 31 | 31 | |
| 32 | ||
| 32 | TIMER_DEVICE_CALLBACK_MEMBER(targeth_state::targeth_interrupt) | |
| 33 | 33 | { |
| 34 | targeth_state *state = timer.machine().driver_data<targeth_state>(); | |
| 35 | 34 | int scanline = param; |
| 36 | 35 | |
| 37 | 36 | if(scanline == 240) |
| 38 | 37 | { |
| 39 | 38 | /* IRQ 2: drives the game */ |
| 40 | | |
| 39 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 41 | 40 | } |
| 42 | 41 | |
| 43 | 42 | if(scanline == 0) |
| 44 | 43 | { |
| 45 | 44 | /* IRQ 4: Read 1P Gun */ |
| 46 | | |
| 45 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 47 | 46 | /* IRQ 6: Read 2P Gun */ |
| 48 | | |
| 47 | m_maincpu->set_input_line(6, HOLD_LINE); | |
| 49 | 48 | } |
| 50 | 49 | } |
| 51 | 50 | |
| r18137 | r18138 | |
| 176 | 175 | /* basic machine hardware */ |
| 177 | 176 | MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ |
| 178 | 177 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 179 | MCFG_TIMER_ADD_SCANLINE("scantimer", targeth_interrupt, "screen", 0, 1) | |
| 178 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", targeth_state, targeth_interrupt, "screen", 0, 1) | |
| 180 | 179 | |
| 181 | 180 | /* video hardware */ |
| 182 | 181 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 234 | 234 | MCFG_CPU_ADD("maincpu", H6280,21477200/3) |
| 235 | 235 | MCFG_CPU_PROGRAM_MAP(battlera_map) |
| 236 | 236 | MCFG_CPU_IO_MAP(battlera_portmap) |
| 237 | MCFG_TIMER_ADD_SCANLINE("scantimer", battlera_irq, "screen", 0, 1) /* 8 prelines, 232 lines, 16 vblank? */ | |
| 237 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", battlera_state, battlera_irq, "screen", 0, 1) /* 8 prelines, 232 lines, 16 vblank? */ | |
| 238 | 238 | |
| 239 | 239 | MCFG_CPU_ADD("audiocpu", H6280,21477200/3) |
| 240 | 240 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 381 | 381 | m_scroll[3] = 0; |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | ||
| 384 | TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::gundealr_scanline) | |
| 385 | 385 | { |
| 386 | 386 | int scanline = param; |
| 387 | 387 | |
| 388 | 388 | if(scanline == 240) // vblank-out irq |
| 389 | | |
| 389 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */ | |
| 390 | 390 | else if((scanline == 0) || (scanline == 120) ) //timer irq |
| 391 | | |
| 391 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 10h */ | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | static const ym2203_interface ym2203_config = |
| r18137 | r18138 | |
| 410 | 410 | MCFG_CPU_ADD("maincpu", Z80, 8000000) /* 8 MHz ??? */ |
| 411 | 411 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 412 | 412 | MCFG_CPU_IO_MAP(main_portmap) |
| 413 | MCFG_TIMER_ADD_SCANLINE("scantimer", gundealr_scanline, "screen", 0, 1) | |
| 413 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gundealr_state, gundealr_scanline, "screen", 0, 1) | |
| 414 | 414 | |
| 415 | 415 | |
| 416 | 416 | /* video hardware */ |
| r18137 | r18138 | |
| 433 | 433 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 434 | 434 | MACHINE_CONFIG_END |
| 435 | 435 | |
| 436 | ||
| 436 | TIMER_DEVICE_CALLBACK_MEMBER(gundealr_state::yamyam_mcu_sim) | |
| 437 | 437 | { |
| 438 | gundealr_state *state = timer.machine().driver_data<gundealr_state>(); | |
| 439 | 438 | static const UINT8 snipped_cmd03[8] = { 0x3a, 0x00, 0xc0, 0x47, 0x3a, 0x01, 0xc0, 0xc9 }; |
| 440 | 439 | static const UINT8 snipped_cmd05_1[5] = { 0xcd, 0x20, 0xe0, 0x7e, 0xc9 }; |
| 441 | 440 | static const UINT8 snipped_cmd05_2[8] = { 0xc5, 0x01, 0x00, 0x00, 0x4f, 0x09, 0xc1, 0xc9 }; |
| 442 | 441 | |
| 443 | 442 | int i; |
| 444 | 443 | |
| 445 | //logerror("e000 = %02x\n", state->m_rambase[0x000]); | |
| 446 | switch(state->m_rambase[0x000]) | |
| 444 | //logerror("e000 = %02x\n", m_rambase[0x000]); | |
| 445 | switch(m_rambase[0x000]) | |
| 447 | 446 | { |
| 448 | 447 | case 0x03: |
| 449 | | |
| 448 | m_rambase[0x001] = 0x03; | |
| 450 | 449 | /* |
| 451 | 450 | read dip switches |
| 452 | 451 | 3a 00 c0 ld a,($c000) |
| r18137 | r18138 | |
| 455 | 454 | c9 ret |
| 456 | 455 | */ |
| 457 | 456 | for(i=0;i<8;i++) |
| 458 | | |
| 457 | m_rambase[0x010+i] = snipped_cmd03[i]; | |
| 459 | 458 | |
| 460 | 459 | break; |
| 461 | 460 | case 0x04: |
| 462 | | |
| 461 | m_rambase[0x001] = 0x04; | |
| 463 | 462 | break; |
| 464 | 463 | case 0x05: |
| 465 | | |
| 464 | m_rambase[0x001] = 0x05; | |
| 466 | 465 | /* |
| 467 | 466 | add a to hl |
| 468 | 467 | c5 push bc |
| r18137 | r18138 | |
| 473 | 472 | c9 ret |
| 474 | 473 | */ |
| 475 | 474 | for(i=0;i<8;i++) |
| 476 | | |
| 475 | m_rambase[0x020+i] = snipped_cmd05_2[i]; | |
| 477 | 476 | |
| 478 | 477 | /* |
| 479 | 478 | lookup data in table |
| r18137 | r18138 | |
| 482 | 481 | c9 ret |
| 483 | 482 | */ |
| 484 | 483 | for(i=0;i<5;i++) |
| 485 | | |
| 484 | m_rambase[0x010+i] = snipped_cmd05_1[i]; | |
| 486 | 485 | |
| 487 | 486 | break; |
| 488 | 487 | case 0x0a: |
| 489 | | |
| 488 | m_rambase[0x001] = 0x08; | |
| 490 | 489 | break; |
| 491 | 490 | case 0x0d: |
| 492 | | |
| 491 | m_rambase[0x001] = 0x07; | |
| 493 | 492 | break; |
| 494 | 493 | } |
| 495 | 494 | |
| 496 | state->m_rambase[0x004] = timer.machine().root_device().ioport("IN2")->read(); | |
| 497 | state->m_rambase[0x005] = timer.machine().root_device().ioport("IN1")->read(); | |
| 498 | state->m_rambase[0x006] = timer.machine().root_device().ioport("IN0")->read(); | |
| 495 | m_rambase[0x004] = machine().root_device().ioport("IN2")->read(); | |
| 496 | m_rambase[0x005] = machine().root_device().ioport("IN1")->read(); | |
| 497 | m_rambase[0x006] = machine().root_device().ioport("IN0")->read(); | |
| 499 | 498 | } |
| 500 | 499 | |
| 501 | 500 | static MACHINE_CONFIG_DERIVED( yamyam, gundealr ) |
| 502 | 501 | |
| 503 | MCFG_TIMER_ADD_PERIODIC("mcusim", yamyam_mcu_sim, attotime::from_hz(8000000/60)) | |
| 502 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(8000000/60)) | |
| 504 | 503 | MACHINE_CONFIG_END |
| 505 | 504 | |
| 506 | 505 |
| r18137 | r18138 | |
|---|---|---|
| 664 | 664 | } |
| 665 | 665 | } |
| 666 | 666 | |
| 667 | ||
| 667 | TIMER_DEVICE_CALLBACK_MEMBER(renegade_state::renegade_interrupt) | |
| 668 | 668 | { |
| 669 | renegade_state *state = timer.machine().driver_data<renegade_state>(); | |
| 670 | 669 | int scanline = param; |
| 671 | 670 | |
| 672 | 671 | if (scanline == 112) // ??? |
| 673 | | |
| 672 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 674 | 673 | else if(scanline == 240) |
| 675 | | |
| 674 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 676 | 675 | } |
| 677 | 676 | |
| 678 | 677 | WRITE8_MEMBER(renegade_state::renegade_coin_counter_w) |
| r18137 | r18138 | |
| 935 | 934 | /* basic machine hardware */ |
| 936 | 935 | MCFG_CPU_ADD("maincpu", M6502, 12000000/8) /* 1.5 MHz (measured) */ |
| 937 | 936 | MCFG_CPU_PROGRAM_MAP(renegade_map) |
| 938 | MCFG_TIMER_ADD_SCANLINE("scantimer", renegade_interrupt, "screen", 0, 1) | |
| 937 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", renegade_state, renegade_interrupt, "screen", 0, 1) | |
| 939 | 938 | |
| 940 | 939 | MCFG_CPU_ADD("audiocpu", M6809, 12000000/8) |
| 941 | 940 | MCFG_CPU_PROGRAM_MAP(renegade_sound_map) /* IRQs are caused by the main CPU */ |
| r18137 | r18138 | |
|---|---|---|
| 753 | 753 | Back Street Soccer |
| 754 | 754 | ***************************************************************************/ |
| 755 | 755 | |
| 756 | ||
| 756 | TIMER_DEVICE_CALLBACK_MEMBER(suna16_state::bssoccer_interrupt) | |
| 757 | 757 | { |
| 758 | suna16_state *state = timer.machine().driver_data<suna16_state>(); | |
| 759 | 758 | int scanline = param; |
| 760 | 759 | |
| 761 | 760 | if(scanline == 240) |
| 762 | | |
| 761 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 763 | 762 | |
| 764 | 763 | if(scanline == 0) |
| 765 | | |
| 764 | m_maincpu->set_input_line(2, HOLD_LINE); // does RAM to sprite buffer copy here | |
| 766 | 765 | } |
| 767 | 766 | |
| 768 | 767 | static MACHINE_CONFIG_START( bssoccer, suna16_state ) |
| r18137 | r18138 | |
| 770 | 769 | /* basic machine hardware */ |
| 771 | 770 | MCFG_CPU_ADD("maincpu", M68000, 8000000) /* ? */ |
| 772 | 771 | MCFG_CPU_PROGRAM_MAP(bssoccer_map) |
| 773 | MCFG_TIMER_ADD_SCANLINE("scantimer", bssoccer_interrupt, "screen", 0, 1) | |
| 772 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", suna16_state, bssoccer_interrupt, "screen", 0, 1) | |
| 774 | 773 | |
| 775 | 774 | MCFG_CPU_ADD("audiocpu", Z80, 3579545) /* Z80B */ |
| 776 | 775 | MCFG_CPU_PROGRAM_MAP(bssoccer_sound_map) |
| r18137 | r18138 | |
| 944 | 943 | /* basic machine hardware */ |
| 945 | 944 | MCFG_CPU_ADD("maincpu", M68000, 24000000/4) |
| 946 | 945 | MCFG_CPU_PROGRAM_MAP(bestbest_map) |
| 947 | MCFG_TIMER_ADD_SCANLINE("scantimer", bssoccer_interrupt, "screen", 0, 1) | |
| 946 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", suna16_state, bssoccer_interrupt, "screen", 0, 1) | |
| 948 | 947 | |
| 949 | 948 | MCFG_CPU_ADD("audiocpu", Z80, 24000000/4) |
| 950 | 949 | MCFG_CPU_PROGRAM_MAP(bestbest_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 206 | 206 | |
| 207 | 207 | /* Interrupt Generators */ |
| 208 | 208 | |
| 209 | ||
| 209 | TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::deadang_main_scanline) | |
| 210 | 210 | { |
| 211 | 211 | int scanline = param; |
| 212 | 212 | |
| 213 | 213 | if(scanline == 240) // vblank-out irq |
| 214 | | |
| 214 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4); | |
| 215 | 215 | |
| 216 | 216 | if(scanline == 0) // vblank-in irq |
| 217 | | |
| 217 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4); | |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | ||
| 220 | TIMER_DEVICE_CALLBACK_MEMBER(deadang_state::deadang_sub_scanline) | |
| 221 | 221 | { |
| 222 | 222 | int scanline = param; |
| 223 | 223 | |
| 224 | 224 | if(scanline == 240) // vblank-out irq |
| 225 | | |
| 225 | machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc4/4); | |
| 226 | 226 | |
| 227 | 227 | if(scanline == 0) // vblank-in irq |
| 228 | | |
| 228 | machine().device("sub")->execute().set_input_line_and_vector(0, HOLD_LINE,0xc8/4); | |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /* Machine Drivers */ |
| r18137 | r18138 | |
| 235 | 235 | /* basic machine hardware */ |
| 236 | 236 | MCFG_CPU_ADD("maincpu", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */ |
| 237 | 237 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 238 | MCFG_TIMER_ADD_SCANLINE("scantimer1", deadang_main_scanline, "screen", 0, 1) | |
| 238 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer1", deadang_state, deadang_main_scanline, "screen", 0, 1) | |
| 239 | 239 | |
| 240 | 240 | MCFG_CPU_ADD("sub", V30,XTAL_16MHz/2) /* Sony 8623h9 CXQ70116D-8 (V30 compatible) */ |
| 241 | 241 | MCFG_CPU_PROGRAM_MAP(sub_map) |
| 242 | MCFG_TIMER_ADD_SCANLINE("scantimer2", deadang_sub_scanline, "screen", 0, 1) | |
| 242 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer2", deadang_state, deadang_sub_scanline, "screen", 0, 1) | |
| 243 | 243 | |
| 244 | 244 | SEIBU3A_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) |
| 245 | 245 |
| r18137 | r18138 | |
|---|---|---|
| 239 | 239 | m_flipscreen = 0; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | ||
| 242 | TIMER_DEVICE_CALLBACK_MEMBER(ikki_state::ikki_irq) | |
| 243 | 243 | { |
| 244 | ikki_state *state = timer.machine().driver_data<ikki_state>(); | |
| 245 | 244 | int scanline = param; |
| 246 | 245 | |
| 247 | 246 | if(scanline == 240 || scanline == 120) // TODO: where non-timer IRQ happens? |
| 248 | 247 | { |
| 249 | | |
| 248 | m_maincpu->set_input_line(0,HOLD_LINE); | |
| 250 | 249 | |
| 251 | | |
| 250 | m_irq_source = (scanline != 240); | |
| 252 | 251 | } |
| 253 | 252 | } |
| 254 | 253 | |
| r18137 | r18138 | |
| 260 | 259 | /* basic machine hardware */ |
| 261 | 260 | MCFG_CPU_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */ |
| 262 | 261 | MCFG_CPU_PROGRAM_MAP(ikki_cpu1) |
| 263 | MCFG_TIMER_ADD_SCANLINE("scantimer", ikki_irq, "screen", 0, 1) | |
| 262 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", ikki_state, ikki_irq, "screen", 0, 1) | |
| 264 | 263 | |
| 265 | 264 | MCFG_CPU_ADD("sub", Z80,8000000/2) /* 4.000MHz */ |
| 266 | 265 | MCFG_CPU_PROGRAM_MAP(ikki_cpu2) |
| r18137 | r18138 | |
|---|---|---|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | |
| 521 | ||
| 521 | TIMER_DEVICE_CALLBACK_MEMBER(system1_state::soundirq_gen) | |
| 522 | 522 | { |
| 523 | 523 | /* sound IRQ is generated on 32V, 96V, ... and auto-acknowledged */ |
| 524 | | |
| 524 | machine().device("soundcpu")->execute().set_input_line(0, HOLD_LINE); | |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | |
| r18137 | r18138 | |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | 604 | |
| 605 | ||
| 605 | TIMER_DEVICE_CALLBACK_MEMBER(system1_state::mcu_t0_callback) | |
| 606 | 606 | { |
| 607 | 607 | /* The T0 line is clocked by something; if it is not clocked fast |
| 608 | 608 | enough, the MCU will fail; on shtngmst this happens after 3 |
| r18137 | r18138 | |
| 610 | 610 | choplift is even more picky about it, affecting scroll speed |
| 611 | 611 | */ |
| 612 | 612 | |
| 613 | device_t *mcu = | |
| 613 | device_t *mcu = machine().device("mcu"); | |
| 614 | 614 | mcu->execute().set_input_line(MCS51_T0_LINE, ASSERT_LINE); |
| 615 | 615 | mcu->execute().set_input_line(MCS51_T0_LINE, CLEAR_LINE); |
| 616 | 616 | } |
| r18137 | r18138 | |
| 2151 | 2151 | |
| 2152 | 2152 | MCFG_CPU_ADD("soundcpu", Z80, SOUND_CLOCK/2) |
| 2153 | 2153 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| 2154 | MCFG_TIMER_ADD_SCANLINE("soundirq", soundirq_gen, "screen", 32, 64) | |
| 2154 | MCFG_TIMER_DRIVER_ADD_SCANLINE("soundirq", system1_state, soundirq_gen, "screen", 32, 64) | |
| 2155 | 2155 | |
| 2156 | 2156 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 2157 | 2157 | |
| r18137 | r18138 | |
| 2222 | 2222 | MCFG_CPU_IO_MAP(mcu_io_map) |
| 2223 | 2223 | MCFG_CPU_VBLANK_INT_DRIVER("screen", system1_state, mcu_irq_assert) |
| 2224 | 2224 | |
| 2225 | MCFG_TIMER_ADD_PERIODIC("mcu_t0", mcu_t0_callback, attotime::from_usec(2500)) | |
| 2225 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_t0", system1_state, mcu_t0_callback, attotime::from_usec(2500)) | |
| 2226 | 2226 | MACHINE_CONFIG_END |
| 2227 | 2227 | |
| 2228 | 2228 |
| r18137 | r18138 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | |
| 90 | 90 | /* timer handling */ |
| 91 | static TIMER_DEVICE_CALLBACK( polyplay_timer_callback ); | |
| 92 | 91 | |
| 93 | 92 | |
| 94 | 93 | |
| 95 | 94 | |
| 95 | ||
| 96 | 96 | /* Polyplay Sound Interface */ |
| 97 | 97 | static const samples_interface polyplay_samples_interface = |
| 98 | 98 | { |
| r18137 | r18138 | |
| 276 | 276 | MCFG_CPU_VBLANK_INT_DRIVER("screen", polyplay_state, coin_interrupt) |
| 277 | 277 | |
| 278 | 278 | |
| 279 | MCFG_TIMER_ADD("timer", polyplay_timer_callback) | |
| 279 | MCFG_TIMER_DRIVER_ADD("timer", polyplay_state, polyplay_timer_callback) | |
| 280 | 280 | |
| 281 | 281 | |
| 282 | 282 | /* video hardware */ |
| r18137 | r18138 | |
| 342 | 342 | ROM_END |
| 343 | 343 | |
| 344 | 344 | |
| 345 | ||
| 345 | TIMER_DEVICE_CALLBACK_MEMBER(polyplay_state::polyplay_timer_callback) | |
| 346 | 346 | { |
| 347 | | |
| 347 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0x4c); | |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | /* game driver */ |
| r18137 | r18138 | |
|---|---|---|
| 543 | 543 | m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period()); |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | ||
| 546 | TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_irq0_cb) | |
| 547 | 547 | { |
| 548 | namcofl_state *state = timer.machine().driver_data<namcofl_state>(); | |
| 549 | ||
| 550 | state->m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); | |
| 548 | m_mcu->set_input_line(M37710_LINE_IRQ0, HOLD_LINE); | |
| 551 | 549 | } |
| 552 | 550 | |
| 553 | ||
| 551 | TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_irq2_cb) | |
| 554 | 552 | { |
| 555 | namcofl_state *state = timer.machine().driver_data<namcofl_state>(); | |
| 556 | ||
| 557 | state->m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); | |
| 553 | m_mcu->set_input_line(M37710_LINE_IRQ2, HOLD_LINE); | |
| 558 | 554 | } |
| 559 | 555 | |
| 560 | ||
| 556 | TIMER_DEVICE_CALLBACK_MEMBER(namcofl_state::mcu_adc_cb) | |
| 561 | 557 | { |
| 562 | namcofl_state *state = timer.machine().driver_data<namcofl_state>(); | |
| 563 | ||
| 564 | state->m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); | |
| 558 | m_mcu->set_input_line(M37710_LINE_ADC, HOLD_LINE); | |
| 565 | 559 | } |
| 566 | 560 | |
| 567 | 561 | |
| r18137 | r18138 | |
| 591 | 585 | MCFG_CPU_PROGRAM_MAP(namcoc75_am) |
| 592 | 586 | MCFG_CPU_IO_MAP(namcoc75_io) |
| 593 | 587 | /* TODO: irq generation for these */ |
| 594 | MCFG_TIMER_ADD_PERIODIC("mcu_irq0", mcu_irq0_cb, attotime::from_hz(60)) | |
| 595 | MCFG_TIMER_ADD_PERIODIC("mcu_irq2", mcu_irq2_cb, attotime::from_hz(60)) | |
| 596 | MCFG_TIMER_ADD_PERIODIC("mcu_adc", mcu_adc_cb, attotime::from_hz(60)) | |
| 588 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq0", namcofl_state, mcu_irq0_cb, attotime::from_hz(60)) | |
| 589 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq2", namcofl_state, mcu_irq2_cb, attotime::from_hz(60)) | |
| 590 | MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_adc", namcofl_state, mcu_adc_cb, attotime::from_hz(60)) | |
| 597 | 591 | |
| 598 | 592 | MCFG_MACHINE_START_OVERRIDE(namcofl_state,namcofl) |
| 599 | 593 | MCFG_MACHINE_RESET_OVERRIDE(namcofl_state,namcofl) |
| r18137 | r18138 | |
|---|---|---|
| 254 | 254 | MCFG_7474_ADD("7474_9m_1", "7474_9m_1", galaxold_7474_9m_1_callback, NULL) |
| 255 | 255 | MCFG_7474_ADD("7474_9m_2", "7474_9m_1", NULL, galaxold_7474_9m_2_q_callback) |
| 256 | 256 | |
| 257 | MCFG_TIMER_ADD("int_timer", galaxold_interrupt_timer) | |
| 257 | MCFG_TIMER_DRIVER_ADD("int_timer", dambustr_state, galaxold_interrupt_timer) | |
| 258 | 258 | |
| 259 | 259 | /* video hardware */ |
| 260 | 260 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 867 | 867 | } |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | ||
| 870 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::tdragon_mcu_sim) | |
| 871 | 871 | { |
| 872 | mcu_run( | |
| 872 | mcu_run(machine(),1); | |
| 873 | 873 | } |
| 874 | 874 | |
| 875 | ||
| 875 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::hachamf_mcu_sim) | |
| 876 | 876 | { |
| 877 | mcu_run( | |
| 877 | mcu_run(machine(),0); | |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | 880 | static ADDRESS_MAP_START( tdragon_map, AS_PROGRAM, 16, nmk16_state ) |
| r18137 | r18138 | |
| 3512 | 3512 | DEVCB_LINE(ym2203_irqhandler) |
| 3513 | 3513 | }; |
| 3514 | 3514 | |
| 3515 | ||
| 3515 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline) | |
| 3516 | 3516 | { |
| 3517 | 3517 | int scanline = param; |
| 3518 | 3518 | |
| 3519 | 3519 | if(scanline == 240) // vblank-out irq |
| 3520 | | |
| 3520 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 3521 | 3521 | |
| 3522 | 3522 | /* This is either vblank-in or sprite dma irq complete, Vandyke definitely relies that irq fires at scanline ~0 instead of 112 (as per previous |
| 3523 | 3523 | cpu_getiloops function implementation), mostly noticeable with sword collisions and related attract mode behaviour. */ |
| 3524 | 3524 | if(scanline == 0) |
| 3525 | | |
| 3525 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 3526 | 3526 | } |
| 3527 | 3527 | |
| 3528 | 3528 | /* bee-oh board, almost certainly it has different timings */ |
| 3529 | ||
| 3529 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::manybloc_scanline) | |
| 3530 | 3530 | { |
| 3531 | 3531 | int scanline = param; |
| 3532 | 3532 | |
| 3533 | 3533 | if(scanline == 248) // vblank-out irq |
| 3534 | | |
| 3534 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 3535 | 3535 | |
| 3536 | 3536 | /* This is either vblank-in or sprite dma irq complete */ |
| 3537 | 3537 | if(scanline == 0) |
| 3538 | | |
| 3538 | machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE); | |
| 3539 | 3539 | } |
| 3540 | 3540 | |
| 3541 | 3541 | |
| r18137 | r18138 | |
| 3550 | 3550 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz */ |
| 3551 | 3551 | MCFG_CPU_PROGRAM_MAP(tharrier_map) |
| 3552 | 3552 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3553 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3553 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3554 | 3554 | |
| 3555 | 3555 | MCFG_CPU_ADD("audiocpu", Z80, 3000000) |
| 3556 | 3556 | MCFG_CPU_PROGRAM_MAP(tharrier_sound_map) |
| r18137 | r18138 | |
| 3595 | 3595 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10? MHz - check */ |
| 3596 | 3596 | MCFG_CPU_PROGRAM_MAP(manybloc_map) |
| 3597 | 3597 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 56)/* this needs to equal the framerate on this, rather than being double it .. */ |
| 3598 | MCFG_TIMER_ADD_SCANLINE("scantimer", manybloc_scanline, "screen", 0, 1) | |
| 3598 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, manybloc_scanline, "screen", 0, 1) | |
| 3599 | 3599 | |
| 3600 | 3600 | MCFG_CPU_ADD("audiocpu", Z80, 3000000) |
| 3601 | 3601 | MCFG_CPU_PROGRAM_MAP(tharrier_sound_map) |
| r18137 | r18138 | |
| 3638 | 3638 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ |
| 3639 | 3639 | MCFG_CPU_PROGRAM_MAP(mustang_map) |
| 3640 | 3640 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3641 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3641 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3642 | 3642 | |
| 3643 | 3643 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3644 | 3644 | |
| r18137 | r18138 | |
| 3679 | 3679 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ |
| 3680 | 3680 | MCFG_CPU_PROGRAM_MAP(mustangb_map) |
| 3681 | 3681 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3682 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3682 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3683 | 3683 | |
| 3684 | 3684 | SEIBU_SOUND_SYSTEM_CPU(14318180/4) |
| 3685 | 3685 | |
| r18137 | r18138 | |
| 3713 | 3713 | MCFG_CPU_ADD("maincpu", M68000, BIOSHIP_CRYSTAL1 ) /* 10.0 MHz (verified) */ |
| 3714 | 3714 | MCFG_CPU_PROGRAM_MAP(bioship_map) |
| 3715 | 3715 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 100)/* 112 breaks the title screen */ |
| 3716 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3716 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3717 | 3717 | |
| 3718 | 3718 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3719 | 3719 | |
| r18137 | r18138 | |
| 3754 | 3754 | MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) /* 68000p12 running at 10Mhz, verified on pcb */ |
| 3755 | 3755 | MCFG_CPU_PROGRAM_MAP(vandyke_map) |
| 3756 | 3756 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3757 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3757 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3758 | 3758 | |
| 3759 | 3759 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3760 | 3760 | |
| r18137 | r18138 | |
| 3795 | 3795 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz ? */ |
| 3796 | 3796 | MCFG_CPU_PROGRAM_MAP(vandykeb_map) |
| 3797 | 3797 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3798 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3798 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3799 | 3799 | |
| 3800 | 3800 | MCFG_CPU_ADD("mcu", PIC16C57, 12000000) /* 3MHz */ |
| 3801 | 3801 | MCFG_DEVICE_DISABLE() |
| r18137 | r18138 | |
| 3829 | 3829 | MCFG_CPU_ADD("maincpu", M68000, 10000000) /* 10 MHz (verified on pcb) */ |
| 3830 | 3830 | MCFG_CPU_PROGRAM_MAP(acrobatm_map) |
| 3831 | 3831 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3832 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3832 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3833 | 3833 | |
| 3834 | 3834 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3835 | 3835 | |
| r18137 | r18138 | |
| 3872 | 3872 | MCFG_CPU_PROGRAM_MAP(tdragonb_map) |
| 3873 | 3873 | //MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) |
| 3874 | 3874 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */ |
| 3875 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3875 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3876 | 3876 | |
| 3877 | 3877 | SEIBU_SOUND_SYSTEM_CPU(14318180/4) |
| 3878 | 3878 | |
| r18137 | r18138 | |
| 3903 | 3903 | MCFG_CPU_PROGRAM_MAP(tdragon_map) |
| 3904 | 3904 | //MCFG_CPU_VBLANK_INT_DRIVER("screen", nmk16_state, irq4_line_hold) |
| 3905 | 3905 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ?? drives music */ |
| 3906 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3906 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3907 | 3907 | |
| 3908 | 3908 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3909 | 3909 | |
| r18137 | r18138 | |
| 3920 | 3920 | MCFG_PALETTE_LENGTH(1024) |
| 3921 | 3921 | |
| 3922 | 3922 | MCFG_VIDEO_START_OVERRIDE(nmk16_state,macross) |
| 3923 | MCFG_TIMER_ADD_PERIODIC("coinsim", tdragon_mcu_sim, attotime::from_hz(10000)) | |
| 3923 | MCFG_TIMER_DRIVER_ADD_PERIODIC("coinsim", nmk16_state, tdragon_mcu_sim, attotime::from_hz(10000)) | |
| 3924 | 3924 | |
| 3925 | 3925 | /* sound hardware */ |
| 3926 | 3926 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
| 3978 | 3978 | MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ? */ |
| 3979 | 3979 | MCFG_CPU_PROGRAM_MAP(strahl_map) |
| 3980 | 3980 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 3981 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 3981 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 3982 | 3982 | |
| 3983 | 3983 | MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,NMK004) |
| 3984 | 3984 | |
| r18137 | r18138 | |
| 4036 | 4036 | MCFG_PALETTE_LENGTH(1024) |
| 4037 | 4037 | |
| 4038 | 4038 | MCFG_VIDEO_START_OVERRIDE(nmk16_state,macross) |
| 4039 | MCFG_TIMER_ADD_PERIODIC("coinsim", hachamf_mcu_sim, attotime::from_hz(10000)) | |
| 4039 | MCFG_TIMER_DRIVER_ADD_PERIODIC("coinsim", nmk16_state, hachamf_mcu_sim, attotime::from_hz(10000)) | |
| 4040 | 4040 | |
| 4041 | 4041 | /* sound hardware */ |
| 4042 | 4042 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
| 4815 | 4815 | /* basic machine hardware */ |
| 4816 | 4816 | MCFG_CPU_ADD("maincpu", M68000,XTAL_12MHz) /* 68000p10 running at 12mhz, verified on pcb */ |
| 4817 | 4817 | MCFG_CPU_PROGRAM_MAP(afega) |
| 4818 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 4818 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 4819 | 4819 | |
| 4820 | 4820 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_4MHz) /* verified on pcb */ |
| 4821 | 4821 | MCFG_CPU_PROGRAM_MAP(afega_sound_cpu) |
| r18137 | r18138 | |
| 4900 | 4900 | /* basic machine hardware */ |
| 4901 | 4901 | MCFG_CPU_ADD("maincpu", M68000,12000000) |
| 4902 | 4902 | MCFG_CPU_PROGRAM_MAP(afega) |
| 4903 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 4903 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 4904 | 4904 | |
| 4905 | 4905 | MCFG_CPU_ADD("audiocpu", Z80,4000000) |
| 4906 | 4906 | MCFG_CPU_PROGRAM_MAP(firehawk_sound_cpu) |
| r18137 | r18138 | |
| 4935 | 4935 | MCFG_CPU_ADD("maincpu", M68000,12000000) |
| 4936 | 4936 | MCFG_CPU_PROGRAM_MAP(twinactn_map) |
| 4937 | 4937 | MCFG_CPU_PERIODIC_INT_DRIVER(nmk16_state, irq1_line_hold, 112)/* ???????? */ |
| 4938 | MCFG_TIMER_ADD_SCANLINE("scantimer", nmk16_scanline, "screen", 0, 1) | |
| 4938 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nmk16_state, nmk16_scanline, "screen", 0, 1) | |
| 4939 | 4939 | |
| 4940 | 4940 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) |
| 4941 | 4941 | MCFG_CPU_PROGRAM_MAP(twinactn_sound_cpu) |
| r18137 | r18138 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | /*****************************************************************************/ |
| 227 | 227 | |
| 228 | ||
| 228 | TIMER_DEVICE_CALLBACK_MEMBER(m92_state::m92_scanline_interrupt) | |
| 229 | 229 | { |
| 230 | running_machine &machine = timer.machine(); | |
| 231 | m92_state *state = machine.driver_data<m92_state>(); | |
| 230 | m92_state *state = machine().driver_data<m92_state>(); | |
| 232 | 231 | int scanline = param; |
| 233 | 232 | |
| 234 | 233 | /* raster interrupt */ |
| 235 | if (scanline == | |
| 234 | if (scanline == m_raster_irq_position) | |
| 236 | 235 | { |
| 237 | machine.primary_screen->update_partial(scanline); | |
| 236 | machine().primary_screen->update_partial(scanline); | |
| 238 | 237 | state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_2); |
| 239 | 238 | } |
| 240 | 239 | |
| 241 | 240 | /* VBLANK interrupt */ |
| 242 | else if (scanline == machine.primary_screen->visible_area().max_y + 1) | |
| 241 | else if (scanline == machine().primary_screen->visible_area().max_y + 1) | |
| 243 | 242 | { |
| 244 | machine.primary_screen->update_partial(scanline); | |
| 243 | machine().primary_screen->update_partial(scanline); | |
| 245 | 244 | state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, M92_IRQ_0); |
| 246 | 245 | } |
| 247 | 246 | } |
| r18137 | r18138 | |
| 944 | 943 | MCFG_MACHINE_START_OVERRIDE(m92_state,m92) |
| 945 | 944 | MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92) |
| 946 | 945 | |
| 947 | MCFG_TIMER_ADD_SCANLINE("scantimer", m92_scanline_interrupt, "screen", 0, 1) | |
| 946 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m92_state, m92_scanline_interrupt, "screen", 0, 1) | |
| 948 | 947 | |
| 949 | 948 | /* video hardware */ |
| 950 | 949 | MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") |
| r18137 | r18138 | |
| 1030 | 1029 | MCFG_MACHINE_START_OVERRIDE(m92_state,m92) |
| 1031 | 1030 | MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92) |
| 1032 | 1031 | |
| 1033 | MCFG_TIMER_ADD_SCANLINE("scantimer", m92_scanline_interrupt, "screen", 0, 1) | |
| 1032 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", m92_state, m92_scanline_interrupt, "screen", 0, 1) | |
| 1034 | 1033 | |
| 1035 | 1034 | /* video hardware */ |
| 1036 | 1035 | MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") // not really... |
| r18137 | r18138 | |
|---|---|---|
| 377 | 377 | * |
| 378 | 378 | *************************************/ |
| 379 | 379 | |
| 380 | TIMER_DEVICE_CALLBACK( | |
| 380 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::dpoker_hopper_callback) | |
| 381 | 381 | { |
| 382 | mcr_state *state = timer.machine().driver_data<mcr_state>(); | |
| 383 | ||
| 384 | 382 | if (dpoker_output & 0x40) |
| 385 | 383 | { |
| 386 | 384 | // hopper timing is a guesstimate |
| 387 | 385 | dpoker_coin_status ^= 8; |
| 388 | | |
| 386 | m_dpoker_hopper_timer->adjust(attotime::from_msec((dpoker_coin_status & 8) ? 100 : 250)); | |
| 389 | 387 | } |
| 390 | 388 | else |
| 391 | 389 | { |
| 392 | 390 | dpoker_coin_status &= ~8; |
| 393 | 391 | } |
| 394 | 392 | |
| 395 | coin_counter_w( | |
| 393 | coin_counter_w(machine(), 3, dpoker_coin_status & 8); | |
| 396 | 394 | } |
| 397 | 395 | |
| 398 | TIMER_DEVICE_CALLBACK( | |
| 396 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::dpoker_coin_in_callback) | |
| 399 | 397 | { |
| 400 | 398 | dpoker_coin_status &= ~2; |
| 401 | 399 | } |
| r18137 | r18138 | |
| 1827 | 1825 | MCFG_CPU_CONFIG(mcr_daisy_chain) |
| 1828 | 1826 | MCFG_CPU_PROGRAM_MAP(cpu_90009_map) |
| 1829 | 1827 | MCFG_CPU_IO_MAP(cpu_90009_portmap) |
| 1830 | MCFG_TIMER_ADD_SCANLINE("scantimer", mcr_interrupt, "screen", 0, 1) | |
| 1828 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mcr_state, mcr_interrupt, "screen", 0, 1) | |
| 1831 | 1829 | |
| 1832 | 1830 | MCFG_Z80CTC_ADD("ctc", MAIN_OSC_MCR_I/8 /* same as "maincpu" */, mcr_ctc_intf) |
| 1833 | 1831 | |
| r18137 | r18138 | |
| 1863 | 1861 | static MACHINE_CONFIG_DERIVED( mcr_90009_dp, mcr_90009 ) |
| 1864 | 1862 | |
| 1865 | 1863 | /* basic machine hardware */ |
| 1866 | MCFG_TIMER_ADD("dp_coinin", dpoker_coin_in_callback) | |
| 1867 | MCFG_TIMER_ADD("dp_hopper", dpoker_hopper_callback) | |
| 1864 | MCFG_TIMER_DRIVER_ADD("dp_coinin", mcr_state, dpoker_coin_in_callback) | |
| 1865 | MCFG_TIMER_DRIVER_ADD("dp_hopper", mcr_state, dpoker_hopper_callback) | |
| 1868 | 1866 | MACHINE_CONFIG_END |
| 1869 | 1867 | |
| 1870 | 1868 | |
| r18137 | r18138 | |
| 1939 | 1937 | MCFG_CPU_PROGRAM_MAP(ipu_91695_map) |
| 1940 | 1938 | MCFG_CPU_IO_MAP(ipu_91695_portmap) |
| 1941 | 1939 | MCFG_TIMER_MODIFY("scantimer") |
| 1942 | MCFG_TIMER_CALLBACK(mcr_ipu_interrupt) | |
| 1940 | MCFG_TIMER_DRIVER_CALLBACK(mcr_state, mcr_ipu_interrupt) | |
| 1943 | 1941 | |
| 1944 | 1942 | MCFG_Z80CTC_ADD("ipu_ctc", 7372800/2 /* same as "ipu" */, nflfoot_ctc_intf) |
| 1945 | 1943 | MCFG_Z80PIO_ADD("ipu_pio0", 7372800/2, nflfoot_pio_intf) |
| r18137 | r18138 | |
|---|---|---|
| 1067 | 1067 | MCFG_MACHINE_START_OVERRIDE(_8080bw_state,schaser) |
| 1068 | 1068 | MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,schaser) |
| 1069 | 1069 | |
| 1070 | MCFG_TIMER_ADD("schaser_sh_555", schaser_effect_555_cb) | |
| 1070 | MCFG_TIMER_DRIVER_ADD("schaser_sh_555", _8080bw_state, schaser_effect_555_cb) | |
| 1071 | 1071 | |
| 1072 | 1072 | /* add shifter */ |
| 1073 | 1073 | MCFG_MB14241_ADD("mb14241") |
| r18137 | r18138 | |
| 2341 | 2341 | |
| 2342 | 2342 | */ |
| 2343 | 2343 | |
| 2344 | TIMER_DEVICE_CALLBACK( | |
| 2344 | TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::claybust_gun_callback) | |
| 2345 | 2345 | { |
| 2346 | _8080bw_state *state = timer.machine().driver_data<_8080bw_state>(); | |
| 2347 | 2346 | |
| 2348 | 2347 | // reset gun latch |
| 2349 | | |
| 2348 | m_claybust_gun_pos = 0; | |
| 2350 | 2349 | } |
| 2351 | 2350 | |
| 2352 | 2351 | CUSTOM_INPUT_MEMBER(_8080bw_state::claybust_gun_on_r) |
| r18137 | r18138 | |
| 2460 | 2459 | MCFG_CPU_MODIFY("maincpu") |
| 2461 | 2460 | MCFG_CPU_IO_MAP(claybust_io_map) |
| 2462 | 2461 | |
| 2463 | MCFG_TIMER_ADD("claybust_gun", claybust_gun_callback) | |
| 2462 | MCFG_TIMER_DRIVER_ADD("claybust_gun", _8080bw_state, claybust_gun_callback) | |
| 2464 | 2463 | |
| 2465 | 2464 | MCFG_MACHINE_START_OVERRIDE(_8080bw_state, claybust) |
| 2466 | 2465 |
| r18137 | r18138 | |
|---|---|---|
| 31 | 31 | * |
| 32 | 32 | *************************************/ |
| 33 | 33 | |
| 34 | ||
| 34 | TIMER_DEVICE_CALLBACK_MEMBER(orbit_state::nmi_32v) | |
| 35 | 35 | { |
| 36 | orbit_state *state = timer.machine().driver_data<orbit_state>(); | |
| 37 | 36 | int scanline = param; |
| 38 | int nmistate = (scanline & 32) && (state->m_misc_flags & 4); | |
| 39 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE); | |
| 37 | int nmistate = (scanline & 32) && (m_misc_flags & 4); | |
| 38 | m_maincpu->set_input_line(INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE); | |
| 40 | 39 | } |
| 41 | 40 | |
| 42 | 41 | |
| r18137 | r18138 | |
| 300 | 299 | MCFG_CPU_PROGRAM_MAP(orbit_map) |
| 301 | 300 | MCFG_CPU_VBLANK_INT_DRIVER("screen", orbit_state, orbit_interrupt) |
| 302 | 301 | |
| 303 | MCFG_TIMER_ADD_SCANLINE("32v", nmi_32v, "screen", 0, 32) | |
| 302 | MCFG_TIMER_DRIVER_ADD_SCANLINE("32v", orbit_state, nmi_32v, "screen", 0, 32) | |
| 304 | 303 | |
| 305 | 304 | |
| 306 | 305 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 7410 | 7410 | |
| 7411 | 7411 | ***************************************************************************/ |
| 7412 | 7412 | |
| 7413 | ||
| 7413 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::seta_interrupt_1_and_2) | |
| 7414 | 7414 | { |
| 7415 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 7416 | 7415 | int scanline = param; |
| 7417 | 7416 | |
| 7418 | 7417 | if(scanline == 240) |
| 7419 | | |
| 7418 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 7420 | 7419 | |
| 7421 | 7420 | if(scanline == 112) |
| 7422 | | |
| 7421 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 7423 | 7422 | } |
| 7424 | 7423 | |
| 7425 | ||
| 7424 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::seta_interrupt_2_and_4) | |
| 7426 | 7425 | { |
| 7427 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 7428 | 7426 | int scanline = param; |
| 7429 | 7427 | |
| 7430 | 7428 | if(scanline == 240) |
| 7431 | | |
| 7429 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 7432 | 7430 | |
| 7433 | 7431 | if(scanline == 112) |
| 7434 | | |
| 7432 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 7435 | 7433 | } |
| 7436 | 7434 | |
| 7437 | 7435 | |
| 7438 | ||
| 7436 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::seta_sub_interrupt) | |
| 7439 | 7437 | { |
| 7440 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 7441 | 7438 | int scanline = param; |
| 7442 | 7439 | |
| 7443 | 7440 | if(scanline == 240) |
| 7444 | | |
| 7441 | m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 7445 | 7442 | |
| 7446 | 7443 | if(scanline == 112) |
| 7447 | | |
| 7444 | m_subcpu->set_input_line(0, HOLD_LINE); | |
| 7448 | 7445 | } |
| 7449 | 7446 | |
| 7450 | 7447 | |
| r18137 | r18138 | |
| 7466 | 7463 | }; |
| 7467 | 7464 | |
| 7468 | 7465 | |
| 7469 | ||
| 7466 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::tndrcade_sub_interrupt) | |
| 7470 | 7467 | { |
| 7471 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 7472 | 7468 | int scanline = param; |
| 7473 | 7469 | |
| 7474 | 7470 | if(scanline == 240) |
| 7475 | | |
| 7471 | m_subcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 7476 | 7472 | |
| 7477 | 7473 | if((scanline % 16) == 0) |
| 7478 | | |
| 7474 | m_subcpu->set_input_line(0, HOLD_LINE); | |
| 7479 | 7475 | } |
| 7480 | 7476 | |
| 7481 | 7477 | static MACHINE_CONFIG_START( tndrcade, seta_state ) |
| r18137 | r18138 | |
| 7487 | 7483 | |
| 7488 | 7484 | MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ |
| 7489 | 7485 | MCFG_CPU_PROGRAM_MAP(tndrcade_sub_map) |
| 7490 | MCFG_TIMER_ADD_SCANLINE("scantimer", tndrcade_sub_interrupt, "screen", 0, 1) | |
| 7486 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, tndrcade_sub_interrupt, "screen", 0, 1) | |
| 7491 | 7487 | |
| 7492 | 7488 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7493 | 7489 | |
| r18137 | r18138 | |
| 7537 | 7533 | |
| 7538 | 7534 | MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ |
| 7539 | 7535 | MCFG_CPU_PROGRAM_MAP(twineagl_sub_map) |
| 7540 | MCFG_TIMER_ADD_SCANLINE("s_scantimer", seta_sub_interrupt, "screen", 0, 1) | |
| 7536 | MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) | |
| 7541 | 7537 | |
| 7542 | 7538 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7543 | 7539 | |
| r18137 | r18138 | |
| 7575 | 7571 | /* basic machine hardware */ |
| 7576 | 7572 | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ |
| 7577 | 7573 | MCFG_CPU_PROGRAM_MAP(downtown_map) |
| 7578 | MCFG_TIMER_ADD_SCANLINE("m_scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7574 | MCFG_TIMER_DRIVER_ADD_SCANLINE("m_scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7579 | 7575 | |
| 7580 | 7576 | MCFG_CPU_ADD("sub", M65C02, XTAL_16MHz/8) /* verified on pcb */ |
| 7581 | 7577 | MCFG_CPU_PROGRAM_MAP(downtown_sub_map) |
| 7582 | MCFG_TIMER_ADD_SCANLINE("s_scantimer", seta_sub_interrupt, "screen", 0, 1) | |
| 7578 | MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) | |
| 7583 | 7579 | |
| 7584 | 7580 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7585 | 7581 | |
| r18137 | r18138 | |
| 7614 | 7610 | 5 ints per frame |
| 7615 | 7611 | */ |
| 7616 | 7612 | |
| 7617 | ||
| 7613 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::calibr50_interrupt) | |
| 7618 | 7614 | { |
| 7619 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 7620 | 7615 | int scanline = param; |
| 7621 | 7616 | |
| 7622 | 7617 | if((scanline % 64) == 0) |
| 7623 | | |
| 7618 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 7624 | 7619 | |
| 7625 | 7620 | if(scanline == 248) |
| 7626 | | |
| 7621 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 7627 | 7622 | } |
| 7628 | 7623 | |
| 7629 | 7624 | |
| r18137 | r18138 | |
| 7632 | 7627 | /* basic machine hardware */ |
| 7633 | 7628 | MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ |
| 7634 | 7629 | MCFG_CPU_PROGRAM_MAP(usclssic_map) |
| 7635 | MCFG_TIMER_ADD_SCANLINE("scantimer", calibr50_interrupt, "screen", 0, 1) | |
| 7630 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, calibr50_interrupt, "screen", 0, 1) | |
| 7636 | 7631 | |
| 7637 | 7632 | MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ |
| 7638 | 7633 | MCFG_CPU_PROGRAM_MAP(calibr50_sub_map) |
| r18137 | r18138 | |
| 7680 | 7675 | /* basic machine hardware */ |
| 7681 | 7676 | MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz/2) /* verified on pcb */ |
| 7682 | 7677 | MCFG_CPU_PROGRAM_MAP(calibr50_map) |
| 7683 | MCFG_TIMER_ADD_SCANLINE("scantimer", calibr50_interrupt, "screen", 0, 1) | |
| 7678 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, calibr50_interrupt, "screen", 0, 1) | |
| 7684 | 7679 | |
| 7685 | 7680 | MCFG_CPU_ADD("sub", M65C02, XTAL_16MHz/8) /* verified on pcb */ |
| 7686 | 7681 | MCFG_CPU_PROGRAM_MAP(calibr50_sub_map) |
| r18137 | r18138 | |
| 7727 | 7722 | |
| 7728 | 7723 | MCFG_CPU_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ |
| 7729 | 7724 | MCFG_CPU_PROGRAM_MAP(metafox_sub_map) |
| 7730 | MCFG_TIMER_ADD_SCANLINE("s_scantimer", seta_sub_interrupt, "screen", 0, 1) | |
| 7725 | MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", seta_state, seta_sub_interrupt, "screen", 0, 1) | |
| 7731 | 7726 | |
| 7732 | 7727 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7733 | 7728 | |
| r18137 | r18138 | |
| 7763 | 7758 | /* basic machine hardware */ |
| 7764 | 7759 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 7765 | 7760 | MCFG_CPU_PROGRAM_MAP(atehate_map) |
| 7766 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7761 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7767 | 7762 | |
| 7768 | 7763 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7769 | 7764 | |
| r18137 | r18138 | |
| 7805 | 7800 | /* basic machine hardware */ |
| 7806 | 7801 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 7807 | 7802 | MCFG_CPU_PROGRAM_MAP(blandia_map) |
| 7808 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) | |
| 7803 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) | |
| 7809 | 7804 | |
| 7810 | 7805 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7811 | 7806 | |
| r18137 | r18138 | |
| 7838 | 7833 | /* basic machine hardware */ |
| 7839 | 7834 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 7840 | 7835 | MCFG_CPU_PROGRAM_MAP(blandiap_map) |
| 7841 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) | |
| 7836 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) | |
| 7842 | 7837 | |
| 7843 | 7838 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7844 | 7839 | |
| r18137 | r18138 | |
| 7912 | 7907 | /* basic machine hardware */ |
| 7913 | 7908 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 7914 | 7909 | MCFG_CPU_PROGRAM_MAP(daioh_map) |
| 7915 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7910 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7916 | 7911 | |
| 7917 | 7912 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7918 | 7913 | |
| r18137 | r18138 | |
| 7953 | 7948 | /* basic machine hardware */ |
| 7954 | 7949 | MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ |
| 7955 | 7950 | MCFG_CPU_PROGRAM_MAP(drgnunit_map) |
| 7956 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7951 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7957 | 7952 | |
| 7958 | 7953 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7959 | 7954 | |
| r18137 | r18138 | |
| 7988 | 7983 | /* basic machine hardware */ |
| 7989 | 7984 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 7990 | 7985 | MCFG_CPU_PROGRAM_MAP(drgnunit_map) |
| 7991 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7986 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 7992 | 7987 | |
| 7993 | 7988 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 7994 | 7989 | |
| r18137 | r18138 | |
| 8019 | 8014 | Seta Roulette |
| 8020 | 8015 | ***************************************************************************/ |
| 8021 | 8016 | |
| 8022 | ||
| 8017 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::setaroul_interrupt) | |
| 8023 | 8018 | { |
| 8024 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 8025 | 8019 | int scanline = param; |
| 8026 | 8020 | |
| 8027 | 8021 | if(scanline == 248) |
| 8028 | | |
| 8022 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 8029 | 8023 | |
| 8030 | 8024 | if(scanline == 112) |
| 8031 | | |
| 8025 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 8032 | 8026 | } |
| 8033 | 8027 | |
| 8034 | 8028 | |
| r18137 | r18138 | |
| 8037 | 8031 | /* basic machine hardware */ |
| 8038 | 8032 | MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ |
| 8039 | 8033 | MCFG_CPU_PROGRAM_MAP(setaroul_map) |
| 8040 | MCFG_TIMER_ADD_SCANLINE("scantimer", setaroul_interrupt, "screen", 0, 1) | |
| 8034 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, setaroul_interrupt, "screen", 0, 1) | |
| 8041 | 8035 | |
| 8042 | 8036 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8043 | 8037 | |
| r18137 | r18138 | |
| 8077 | 8071 | /* basic machine hardware */ |
| 8078 | 8072 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8079 | 8073 | MCFG_CPU_PROGRAM_MAP(wrofaero_map) |
| 8080 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8074 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8081 | 8075 | |
| 8082 | 8076 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8083 | 8077 | |
| r18137 | r18138 | |
| 8118 | 8112 | /* basic machine hardware */ |
| 8119 | 8113 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8120 | 8114 | MCFG_CPU_PROGRAM_MAP(extdwnhl_map) |
| 8121 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8115 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8122 | 8116 | |
| 8123 | 8117 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8124 | 8118 | |
| r18137 | r18138 | |
| 8172 | 8166 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8173 | 8167 | MCFG_CPU_PROGRAM_MAP(wrofaero_map) |
| 8174 | 8168 | #if __uPD71054_TIMER |
| 8175 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8169 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8176 | 8170 | #else |
| 8177 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8171 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8178 | 8172 | #endif // __uPD71054_TIMER |
| 8179 | 8173 | |
| 8180 | 8174 | #if __uPD71054_TIMER |
| r18137 | r18138 | |
| 8220 | 8214 | /* basic machine hardware */ |
| 8221 | 8215 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8222 | 8216 | MCFG_CPU_PROGRAM_MAP(wrofaero_map) |
| 8223 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8217 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8224 | 8218 | |
| 8225 | 8219 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8226 | 8220 | |
| r18137 | r18138 | |
| 8252 | 8246 | /* basic machine hardware */ |
| 8253 | 8247 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8254 | 8248 | MCFG_CPU_PROGRAM_MAP(jjsquawb_map) |
| 8255 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8249 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8256 | 8250 | |
| 8257 | 8251 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8258 | 8252 | |
| r18137 | r18138 | |
| 8330 | 8324 | /* basic machine hardware */ |
| 8331 | 8325 | MCFG_CPU_ADD("maincpu", M68000, 14318180/2) /* 7.143 MHz */ |
| 8332 | 8326 | MCFG_CPU_PROGRAM_MAP(orbs_map) |
| 8333 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8327 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8334 | 8328 | |
| 8335 | 8329 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8336 | 8330 | |
| r18137 | r18138 | |
| 8366 | 8360 | /* basic machine hardware */ |
| 8367 | 8361 | MCFG_CPU_ADD("maincpu", M68000, 14318180/2) /* 7.143 MHz */ |
| 8368 | 8362 | MCFG_CPU_PROGRAM_MAP(keroppi_map) |
| 8369 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8363 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8370 | 8364 | |
| 8371 | 8365 | MCFG_MACHINE_START_OVERRIDE(seta_state,keroppi) |
| 8372 | 8366 | |
| r18137 | r18138 | |
| 8404 | 8398 | /* basic machine hardware */ |
| 8405 | 8399 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8406 | 8400 | MCFG_CPU_PROGRAM_MAP(krzybowl_map) |
| 8407 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8401 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8408 | 8402 | |
| 8409 | 8403 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8410 | 8404 | |
| r18137 | r18138 | |
| 8528 | 8522 | #if __uPD71054_TIMER |
| 8529 | 8523 | MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) |
| 8530 | 8524 | #else |
| 8531 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8525 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8532 | 8526 | #endif // __uPD71054_TIMER |
| 8533 | 8527 | |
| 8534 | 8528 | #if __uPD71054_TIMER |
| r18137 | r18138 | |
| 8571 | 8565 | /* basic machine hardware */ |
| 8572 | 8566 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8573 | 8567 | MCFG_CPU_PROGRAM_MAP(oisipuzl_map) |
| 8574 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8568 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8575 | 8569 | |
| 8576 | 8570 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8577 | 8571 | |
| r18137 | r18138 | |
| 8682 | 8676 | /* basic machine hardware */ |
| 8683 | 8677 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8684 | 8678 | MCFG_CPU_PROGRAM_MAP(wrofaero_map) |
| 8685 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8679 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8686 | 8680 | |
| 8687 | 8681 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 8688 | 8682 | |
| r18137 | r18138 | |
| 8898 | 8892 | /* basic machine hardware */ |
| 8899 | 8893 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 8900 | 8894 | MCFG_CPU_PROGRAM_MAP(utoukond_map) |
| 8901 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8895 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 8902 | 8896 | |
| 8903 | 8897 | MCFG_CPU_ADD("audiocpu", Z80, 16000000/4) /* 4 MHz */ |
| 8904 | 8898 | MCFG_CPU_PROGRAM_MAP(utoukond_sound_map) |
| r18137 | r18138 | |
| 8946 | 8940 | #if __uPD71054_TIMER |
| 8947 | 8941 | MCFG_CPU_VBLANK_INT_DRIVER("screen", seta_state, wrofaero_interrupt) |
| 8948 | 8942 | #else |
| 8949 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8943 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) | |
| 8950 | 8944 | #endif // __uPD71054_TIMER |
| 8951 | 8945 | |
| 8952 | 8946 | #if __uPD71054_TIMER |
| r18137 | r18138 | |
| 9029 | 9023 | |
| 9030 | 9024 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 9031 | 9025 | MCFG_CPU_PROGRAM_MAP(zingzipbl_map) |
| 9032 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 9026 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 9033 | 9027 | |
| 9034 | 9028 | MCFG_DEVICE_REMOVE("x1snd") |
| 9035 | 9029 | |
| r18137 | r18138 | |
| 9047 | 9041 | /* basic machine hardware */ |
| 9048 | 9042 | MCFG_CPU_ADD("maincpu", M68000, 16000000/2) /* 8 MHz */ |
| 9049 | 9043 | MCFG_CPU_PROGRAM_MAP(pairlove_map) |
| 9050 | MCFG_TIMER_ADD_SCANLINE("scantimer", seta_interrupt_1_and_2, "screen", 0, 1) | |
| 9044 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) | |
| 9051 | 9045 | |
| 9052 | 9046 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 9053 | 9047 | |
| r18137 | r18138 | |
| 9078 | 9072 | Crazy Fight |
| 9079 | 9073 | ***************************************************************************/ |
| 9080 | 9074 | |
| 9081 | ||
| 9075 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::crazyfgt_interrupt) | |
| 9082 | 9076 | { |
| 9083 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 9084 | 9077 | int scanline = param; |
| 9085 | 9078 | |
| 9086 | 9079 | if((scanline % 48) == 0) |
| 9087 | | |
| 9080 | m_maincpu->set_input_line(2, HOLD_LINE); // should this be triggered by the 3812? | |
| 9088 | 9081 | |
| 9089 | 9082 | if(scanline == 240) |
| 9090 | | |
| 9083 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 9091 | 9084 | } |
| 9092 | 9085 | |
| 9093 | 9086 | static MACHINE_CONFIG_START( crazyfgt, seta_state ) |
| r18137 | r18138 | |
| 9095 | 9088 | /* basic machine hardware */ |
| 9096 | 9089 | MCFG_CPU_ADD("maincpu", M68000, 16000000) /* 16 MHz */ |
| 9097 | 9090 | MCFG_CPU_PROGRAM_MAP(crazyfgt_map) |
| 9098 | MCFG_TIMER_ADD_SCANLINE("scantimer", crazyfgt_interrupt, "screen", 0, 1) | |
| 9091 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, crazyfgt_interrupt, "screen", 0, 1) | |
| 9099 | 9092 | |
| 9100 | 9093 | MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) |
| 9101 | 9094 | |
| r18137 | r18138 | |
| 9128 | 9121 | ***************************************************************************/ |
| 9129 | 9122 | |
| 9130 | 9123 | // Test mode shows a 16ms and 2ms counters, then there's vblank and presumably ACIA irqs ... |
| 9131 | ||
| 9124 | TIMER_DEVICE_CALLBACK_MEMBER(seta_state::inttoote_interrupt) | |
| 9132 | 9125 | { |
| 9133 | seta_state *state = timer.machine().driver_data<seta_state>(); | |
| 9134 | 9126 | int scanline = param; |
| 9135 | 9127 | |
| 9136 | 9128 | /* ACIA irq */ |
| 9137 | 9129 | if(scanline == 15) |
| 9138 | | |
| 9130 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 9139 | 9131 | |
| 9140 | 9132 | if(scanline == 38) |
| 9141 | | |
| 9133 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 9142 | 9134 | |
| 9143 | 9135 | if(scanline == 61) |
| 9144 | | |
| 9136 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 9145 | 9137 | |
| 9146 | 9138 | if(scanline >= 85 && (scanline % 23) == 0) |
| 9147 | | |
| 9139 | m_maincpu->set_input_line(6, HOLD_LINE); | |
| 9148 | 9140 | } |
| 9149 | 9141 | |
| 9150 | 9142 | static const pia6821_interface inttoote_pia0_intf = |
| r18137 | r18138 | |
| 9189 | 9181 | /* basic machine hardware */ |
| 9190 | 9182 | MCFG_CPU_ADD("maincpu", M68000, 16000000) |
| 9191 | 9183 | MCFG_CPU_PROGRAM_MAP(inttoote_map) |
| 9192 | MCFG_TIMER_ADD_SCANLINE("scantimer", inttoote_interrupt, "screen", 0, 1) | |
| 9184 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, inttoote_interrupt, "screen", 0, 1) | |
| 9193 | 9185 | |
| 9194 | 9186 | MCFG_PIA6821_ADD("pia0", inttoote_pia0_intf) |
| 9195 | 9187 | MCFG_PIA6821_ADD("pia1", inttoote_pia1_intf) |
| r18137 | r18138 | |
|---|---|---|
| 2162 | 2162 | Funcube series |
| 2163 | 2163 | ***************************************************************************/ |
| 2164 | 2164 | |
| 2165 | ||
| 2165 | TIMER_DEVICE_CALLBACK_MEMBER(seta2_state::funcube_interrupt) | |
| 2166 | 2166 | { |
| 2167 | seta2_state *state = timer.machine().driver_data<seta2_state>(); | |
| 2168 | 2167 | int scanline = param; |
| 2169 | 2168 | |
| 2170 | 2169 | if(scanline == 368) |
| 2171 | | |
| 2170 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 2172 | 2171 | |
| 2173 | 2172 | if(scanline == 0) |
| 2174 | | |
| 2173 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 2175 | 2174 | } |
| 2176 | 2175 | |
| 2177 | 2176 | INTERRUPT_GEN_MEMBER(seta2_state::funcube_sub_timer_irq) |
| r18137 | r18138 | |
| 2213 | 2212 | |
| 2214 | 2213 | MCFG_CPU_ADD("maincpu", MCF5206E, XTAL_25_447MHz) |
| 2215 | 2214 | MCFG_CPU_PROGRAM_MAP(funcube_map) |
| 2216 | MCFG_TIMER_ADD_SCANLINE("scantimer", funcube_interrupt, "screen", 0, 1) | |
| 2215 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta2_state, funcube_interrupt, "screen", 0, 1) | |
| 2217 | 2216 | |
| 2218 | 2217 | MCFG_CPU_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK) |
| 2219 | 2218 | MCFG_CPU_PROGRAM_MAP(funcube_sub_map) |
| r18137 | r18138 | |
|---|---|---|
| 445 | 445 | }; |
| 446 | 446 | |
| 447 | 447 | |
| 448 | ||
| 448 | TIMER_DEVICE_CALLBACK_MEMBER(polepos_state::polepos_scanline) | |
| 449 | 449 | { |
| 450 | polepos_state *state = timer.machine().driver_data<polepos_state>(); | |
| 451 | 450 | int scanline = param; |
| 452 | 451 | |
| 453 | if (((scanline == 64) || (scanline == 192)) && state->m_main_irq_mask) // 64V | |
| 454 | timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 452 | if (((scanline == 64) || (scanline == 192)) && m_main_irq_mask) // 64V | |
| 453 | machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 455 | 454 | |
| 456 | if (scanline == 240 && | |
| 455 | if (scanline == 240 && m_sub_irq_mask) // VBLANK | |
| 457 | 456 | { |
| 458 | timer.machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); | |
| 459 | timer.machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); | |
| 457 | machine().device("sub")->execute().set_input_line(0, ASSERT_LINE); | |
| 458 | machine().device("sub2")->execute().set_input_line(0, ASSERT_LINE); | |
| 460 | 459 | } |
| 461 | 460 | } |
| 462 | 461 | |
| r18137 | r18138 | |
| 903 | 902 | MCFG_MACHINE_RESET_OVERRIDE(polepos_state,polepos) |
| 904 | 903 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 905 | 904 | |
| 906 | MCFG_TIMER_ADD_SCANLINE("scantimer", polepos_scanline, "screen", 0, 1) | |
| 905 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", polepos_state, polepos_scanline, "screen", 0, 1) | |
| 907 | 906 | |
| 908 | 907 | /* video hardware */ |
| 909 | 908 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 982 | 981 | MCFG_MACHINE_RESET_OVERRIDE(polepos_state,polepos) |
| 983 | 982 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 984 | 983 | |
| 985 | MCFG_TIMER_ADD_SCANLINE("scantimer", polepos_scanline, "screen", 0, 1) | |
| 984 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", polepos_state, polepos_scanline, "screen", 0, 1) | |
| 986 | 985 | |
| 987 | 986 | /* video hardware */ |
| 988 | 987 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 74 | 74 | membank("bank1")->set_entry(data & 0x03); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | ||
| 77 | TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::c1942_scanline) | |
| 78 | 78 | { |
| 79 | 79 | int scanline = param; |
| 80 | 80 | |
| 81 | 81 | if(scanline == 240) // vblank-out irq |
| 82 | | |
| 82 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */ | |
| 83 | 83 | |
| 84 | 84 | if(scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch) |
| 85 | | |
| 85 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
| r18137 | r18138 | |
| 258 | 258 | /* basic machine hardware */ |
| 259 | 259 | MCFG_CPU_ADD("maincpu", Z80, MAIN_CPU_CLOCK) /* 4 MHz ??? */ |
| 260 | 260 | MCFG_CPU_PROGRAM_MAP(c1942_map) |
| 261 | MCFG_TIMER_ADD_SCANLINE("scantimer", c1942_scanline, "screen", 0, 1) | |
| 261 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", _1942_state, c1942_scanline, "screen", 0, 1) | |
| 262 | 262 | |
| 263 | 263 | MCFG_CPU_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */ |
| 264 | 264 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 264 | 264 | * |
| 265 | 265 | *************************************/ |
| 266 | 266 | |
| 267 | ||
| 267 | TIMER_DEVICE_CALLBACK_MEMBER(qdrmfgp_state::qdrmfgp_interrupt) | |
| 268 | 268 | { |
| 269 | qdrmfgp_state *state = timer.machine().driver_data<qdrmfgp_state>(); | |
| 270 | 269 | int scanline = param; |
| 271 | 270 | |
| 272 | 271 | if(scanline == 0) |
| 273 | if (state->m_control & 0x0001) | |
| 274 | state->m_maincpu->set_input_line(1, HOLD_LINE); | |
| 272 | if (m_control & 0x0001) | |
| 273 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 275 | 274 | |
| 276 | 275 | /* trigger V-blank interrupt */ |
| 277 | 276 | if(scanline == 240) |
| 278 | if (state->m_control & 0x0004) | |
| 279 | state->m_maincpu->set_input_line(3, HOLD_LINE); | |
| 277 | if (m_control & 0x0004) | |
| 278 | m_maincpu->set_input_line(3, HOLD_LINE); | |
| 280 | 279 | } |
| 281 | 280 | |
| 282 | 281 | static void ide_interrupt(device_t *device, int state) |
| r18137 | r18138 | |
| 675 | 674 | /* basic machine hardware */ |
| 676 | 675 | MCFG_CPU_ADD("maincpu", M68000, 32000000/2) /* 16.000 MHz */ |
| 677 | 676 | MCFG_CPU_PROGRAM_MAP(qdrmfgp_map) |
| 678 | MCFG_TIMER_ADD_SCANLINE("scantimer", qdrmfgp_interrupt, "screen", 0, 1) | |
| 677 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", qdrmfgp_state, qdrmfgp_interrupt, "screen", 0, 1) | |
| 679 | 678 | |
| 680 | 679 | MCFG_MACHINE_START_OVERRIDE(qdrmfgp_state,qdrmfgp) |
| 681 | 680 | MCFG_NVRAM_ADD_1FILL("nvram") |
| r18137 | r18138 | |
|---|---|---|
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | #if 0 |
| 341 | ||
| 341 | TIMER_DEVICE_CALLBACK_MEMBER(segahang_state::hangon_irq) | |
| 342 | 342 | { |
| 343 | 343 | int scanline = param; |
| 344 | 344 |
| r18137 | r18138 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | ***************************************************************************/ |
| 131 | 131 | |
| 132 | ||
| 132 | TIMER_DEVICE_CALLBACK_MEMBER(argus_state::argus_scanline) | |
| 133 | 133 | { |
| 134 | 134 | int scanline = param; |
| 135 | 135 | |
| 136 | 136 | if(scanline == 240) // vblank-out irq |
| 137 | | |
| 137 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */ | |
| 138 | 138 | |
| 139 | 139 | if(scanline == 16) // vblank-in irq |
| 140 | | |
| 140 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */ | |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | ||
| 143 | TIMER_DEVICE_CALLBACK_MEMBER(argus_state::butasan_scanline) | |
| 144 | 144 | { |
| 145 | 145 | int scanline = param; |
| 146 | 146 | |
| 147 | 147 | if(scanline == 248) // vblank-out irq |
| 148 | | |
| 148 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xd7); /* RST 10h */ | |
| 149 | 149 | |
| 150 | 150 | if(scanline == 8) // vblank-in irq |
| 151 | | |
| 151 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); /* RST 08h */ | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /* Handler called by the YM2203 emulator when the internal timers cause an IRQ */ |
| r18137 | r18138 | |
| 545 | 545 | /* basic machine hardware */ |
| 546 | 546 | MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 4 MHz */ |
| 547 | 547 | MCFG_CPU_PROGRAM_MAP(argus_map) |
| 548 | MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1) | |
| 548 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1) | |
| 549 | 549 | |
| 550 | 550 | MCFG_CPU_ADD("audiocpu", Z80, 5000000) |
| 551 | 551 | MCFG_CPU_PROGRAM_MAP(sound_map_a) |
| r18137 | r18138 | |
| 589 | 589 | /* basic machine hardware */ |
| 590 | 590 | MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5 MHz */ |
| 591 | 591 | MCFG_CPU_PROGRAM_MAP(valtric_map) |
| 592 | MCFG_TIMER_ADD_SCANLINE("scantimer", argus_scanline, "screen", 0, 1) | |
| 592 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, argus_scanline, "screen", 0, 1) | |
| 593 | 593 | |
| 594 | 594 | MCFG_CPU_ADD("audiocpu", Z80, 5000000) |
| 595 | 595 | MCFG_CPU_PROGRAM_MAP(sound_map_a) |
| r18137 | r18138 | |
| 633 | 633 | /* basic machine hardware */ |
| 634 | 634 | MCFG_CPU_ADD("maincpu", Z80, 5000000) /* 5 MHz */ |
| 635 | 635 | MCFG_CPU_PROGRAM_MAP(butasan_map) |
| 636 | MCFG_TIMER_ADD_SCANLINE("scantimer", butasan_scanline, "screen", 0, 1) | |
| 636 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", argus_state, butasan_scanline, "screen", 0, 1) | |
| 637 | 637 | |
| 638 | 638 | MCFG_CPU_ADD("audiocpu", Z80, 5000000) |
| 639 | 639 | MCFG_CPU_PROGRAM_MAP(sound_map_b) |
| r18137 | r18138 | |
|---|---|---|
| 173 | 173 | return (vcount - 0x18) | 0x100; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | ||
| 176 | TIMER_DEVICE_CALLBACK_MEMBER(xain_state::xain_scanline) | |
| 177 | 177 | { |
| 178 | xain_state *state = timer.machine().driver_data<xain_state>(); | |
| 179 | 178 | int scanline = param; |
| 180 | int screen_height = | |
| 179 | int screen_height = machine().primary_screen->height(); | |
| 181 | 180 | int vcount_old = scanline_to_vcount((scanline == 0) ? screen_height - 1 : scanline - 1); |
| 182 | 181 | int vcount = scanline_to_vcount(scanline); |
| 183 | 182 | |
| 184 | 183 | /* update to the current point */ |
| 185 | 184 | if (scanline > 0) |
| 186 | 185 | { |
| 187 | | |
| 186 | machine().primary_screen->update_partial(scanline - 1); | |
| 188 | 187 | } |
| 189 | 188 | |
| 190 | 189 | /* FIRQ (IMS) fires every on every 8th scanline (except 0) */ |
| 191 | 190 | if (!(vcount_old & 8) && (vcount & 8)) |
| 192 | 191 | { |
| 193 | | |
| 192 | machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); | |
| 194 | 193 | } |
| 195 | 194 | |
| 196 | 195 | /* NMI fires on scanline 248 (VBL) and is latched */ |
| 197 | 196 | if (vcount == 0xf8) |
| 198 | 197 | { |
| 199 | | |
| 198 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 200 | 199 | } |
| 201 | 200 | |
| 202 | 201 | /* VBLANK input bit is held high from scanlines 248-255 */ |
| 203 | 202 | if (vcount >= 248-1) // -1 is a hack - see notes above |
| 204 | 203 | { |
| 205 | | |
| 204 | m_vblank = 1; | |
| 206 | 205 | } |
| 207 | 206 | else |
| 208 | 207 | { |
| 209 | | |
| 208 | m_vblank = 0; | |
| 210 | 209 | } |
| 211 | 210 | } |
| 212 | 211 | |
| r18137 | r18138 | |
| 579 | 578 | /* basic machine hardware */ |
| 580 | 579 | MCFG_CPU_ADD("maincpu", M6809, CPU_CLOCK) |
| 581 | 580 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 582 | MCFG_TIMER_ADD_SCANLINE("scantimer", xain_scanline, "screen", 0, 1) | |
| 581 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", xain_state, xain_scanline, "screen", 0, 1) | |
| 583 | 582 | |
| 584 | 583 | MCFG_CPU_ADD("sub", M6809, CPU_CLOCK) |
| 585 | 584 | MCFG_CPU_PROGRAM_MAP(cpu_map_B) |
| r18137 | r18138 | |
|---|---|---|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | |
| 116 | ||
| 116 | TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update) | |
| 117 | 117 | { |
| 118 | 118 | int scanline = param; |
| 119 | 119 | |
| r18137 | r18138 | |
| 123 | 123 | mystery yet */ |
| 124 | 124 | |
| 125 | 125 | /* INT 1 is on 32V */ |
| 126 | atarigen_scanline_int_gen( | |
| 126 | atarigen_scanline_int_gen(machine().device("maincpu")); | |
| 127 | 127 | |
| 128 | 128 | /* advance to the next interrupt */ |
| 129 | 129 | scanline += 64; |
| r18137 | r18138 | |
| 131 | 131 | scanline = 0; |
| 132 | 132 | |
| 133 | 133 | /* set a timer for it */ |
| 134 | timer.adjust( | |
| 134 | timer.adjust(machine().primary_screen->time_until_pos(scanline), scanline); | |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | |
| r18137 | r18138 | |
| 363 | 363 | |
| 364 | 364 | MCFG_WATCHDOG_VBLANK_INIT(8) |
| 365 | 365 | |
| 366 | MCFG_TIMER_ADD("scan_timer", scanline_update) | |
| 366 | MCFG_TIMER_DRIVER_ADD("scan_timer", foodf_state, scanline_update) | |
| 367 | 367 | |
| 368 | 368 | /* video hardware */ |
| 369 | 369 | MCFG_GFXDECODE(foodf) |
| r18137 | r18138 | |
|---|---|---|
| 342 | 342 | Interrupt Function |
| 343 | 343 | *******************************************************************************/ |
| 344 | 344 | |
| 345 | ||
| 345 | TIMER_DEVICE_CALLBACK_MEMBER(wwfwfest_state::wwfwfest_scanline) | |
| 346 | 346 | { |
| 347 | 347 | int scanline = param; |
| 348 | 348 | |
| r18137 | r18138 | |
| 350 | 350 | if (scanline % 16 == 0) |
| 351 | 351 | { |
| 352 | 352 | if (scanline > 0) |
| 353 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 354 | timer.machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE); | |
| 353 | machine().primary_screen->update_partial(scanline - 1); | |
| 354 | machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE); | |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | /* Vblank is raised on scanline 248 */ |
| 358 | 358 | if (scanline == 248) |
| 359 | 359 | { |
| 360 | timer.machine().primary_screen->update_partial(scanline - 1); | |
| 361 | timer.machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); | |
| 360 | machine().primary_screen->update_partial(scanline - 1); | |
| 361 | machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE); | |
| 362 | 362 | } |
| 363 | 363 | } |
| 364 | 364 | |
| r18137 | r18138 | |
| 387 | 387 | /* basic machine hardware */ |
| 388 | 388 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* 24 crystal, 12 rated chip */ |
| 389 | 389 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 390 | MCFG_TIMER_ADD_SCANLINE("scantimer", wwfwfest_scanline, "screen", 0, 1) | |
| 390 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wwfwfest_state, wwfwfest_scanline, "screen", 0, 1) | |
| 391 | 391 | |
| 392 | 392 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) |
| 393 | 393 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
| 106 | ||
| 106 | TIMER_DEVICE_CALLBACK_MEMBER(zodiack_state::zodiack_scanline) | |
| 107 | 107 | { |
| 108 | zodiack_state *state = timer.machine().driver_data<zodiack_state>(); | |
| 109 | 108 | int scanline = param; |
| 110 | 109 | |
| 111 | if(scanline == 240 && state->m_nmi_enable) // vblank-out irq | |
| 112 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 110 | if(scanline == 240 && m_nmi_enable) // vblank-out irq | |
| 111 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 113 | 112 | |
| 114 | 113 | if(scanline == 0 ) // vblank-in irq |
| 115 | | |
| 114 | machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); | |
| 116 | 115 | } |
| 117 | 116 | |
| 118 | 117 | INTERRUPT_GEN_MEMBER(zodiack_state::zodiack_sound_nmi_gen) |
| r18137 | r18138 | |
| 559 | 558 | /* basic machine hardware */ |
| 560 | 559 | MCFG_CPU_ADD("maincpu", Z80, 4000000) /* 4.00 MHz??? */ |
| 561 | 560 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 562 | MCFG_TIMER_ADD_SCANLINE("scantimer", zodiack_scanline, "screen", 0, 1) | |
| 561 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", zodiack_state, zodiack_scanline, "screen", 0, 1) | |
| 563 | 562 | |
| 564 | 563 | MCFG_CPU_ADD("audiocpu", Z80, 14318000/8) /* 1.78975 MHz??? */ |
| 565 | 564 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| 76 | ||
| 76 | TIMER_DEVICE_CALLBACK_MEMBER(iqblock_state::iqblock_irq) | |
| 77 | 77 | { |
| 78 | iqblock_state *state = timer.machine().driver_data<iqblock_state>(); | |
| 79 | 78 | int scanline = param; |
| 80 | 79 | |
| 81 | 80 | if((scanline % 16) != 0) |
| 82 | 81 | return; |
| 83 | 82 | |
| 84 | 83 | if((scanline % 32) == 16) |
| 85 | | |
| 84 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 86 | 85 | else if ((scanline % 32) == 0) |
| 87 | | |
| 86 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | |
| r18137 | r18138 | |
| 275 | 274 | MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */ |
| 276 | 275 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 277 | 276 | MCFG_CPU_IO_MAP(main_portmap) |
| 278 | MCFG_TIMER_ADD_SCANLINE("scantimer", iqblock_irq, "screen", 0, 1) | |
| 277 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", iqblock_state, iqblock_irq, "screen", 0, 1) | |
| 279 | 278 | |
| 280 | 279 | MCFG_I8255A_ADD( "ppi8255", ppi8255_intf ) |
| 281 | 280 |
| r18137 | r18138 | |
|---|---|---|
| 1737 | 1737 | soundirq /* IRQ Line */ |
| 1738 | 1738 | }; |
| 1739 | 1739 | |
| 1740 | ||
| 1740 | TIMER_DEVICE_CALLBACK_MEMBER(suna8_state::brickzn_interrupt) | |
| 1741 | 1741 | { |
| 1742 | suna8_state *state = timer.machine().driver_data<suna8_state>(); | |
| 1743 | 1742 | int scanline = param; |
| 1744 | 1743 | |
| 1745 | 1744 | if(scanline == 240) |
| 1746 | | |
| 1745 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 1747 | 1746 | if(scanline == 112) |
| 1748 | | |
| 1747 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 1749 | 1748 | |
| 1750 | 1749 | // TODO: NMI enable |
| 1751 | 1750 | } |
| r18137 | r18138 | |
| 1819 | 1818 | |
| 1820 | 1819 | /* 1 x 24 MHz crystal */ |
| 1821 | 1820 | |
| 1822 | ||
| 1821 | TIMER_DEVICE_CALLBACK_MEMBER(suna8_state::hardhea2_interrupt) | |
| 1823 | 1822 | { |
| 1824 | suna8_state *state = timer.machine().driver_data<suna8_state>(); | |
| 1825 | 1823 | int scanline = param; |
| 1826 | 1824 | |
| 1827 | 1825 | if(scanline == 240) |
| 1828 | | |
| 1826 | m_maincpu->set_input_line(0, HOLD_LINE); | |
| 1829 | 1827 | if(scanline == 112) |
| 1830 | if ( | |
| 1828 | if (m_nmi_enable) m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 1831 | 1829 | } |
| 1832 | 1830 | |
| 1833 | 1831 | MACHINE_RESET_MEMBER(suna8_state,hardhea2) |
| r18137 | r18138 | |
| 1841 | 1839 | |
| 1842 | 1840 | MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* SUNA T568009 */ |
| 1843 | 1841 | MCFG_CPU_PROGRAM_MAP(hardhea2_map) |
| 1844 | MCFG_TIMER_ADD_SCANLINE("scantimer", hardhea2_interrupt, "screen", 0, 1) | |
| 1842 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", suna8_state, hardhea2_interrupt, "screen", 0, 1) | |
| 1845 | 1843 | |
| 1846 | 1844 | MCFG_MACHINE_RESET_OVERRIDE(suna8_state,hardhea2) |
| 1847 | 1845 | MCFG_PALETTE_LENGTH(256) |
| r18137 | r18138 | |
| 1867 | 1865 | /* basic machine hardware */ |
| 1868 | 1866 | MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ |
| 1869 | 1867 | MCFG_CPU_PROGRAM_MAP(starfigh_map) |
| 1870 | MCFG_TIMER_ADD_SCANLINE("scantimer", brickzn_interrupt, "screen", 0, 1) | |
| 1868 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", suna8_state, brickzn_interrupt, "screen", 0, 1) | |
| 1871 | 1869 | |
| 1872 | 1870 | /* The sound section is identical to that of hardhead */ |
| 1873 | 1871 | MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ |
| r18137 | r18138 | |
| 1915 | 1913 | /* basic machine hardware */ |
| 1916 | 1914 | MCFG_CPU_ADD("maincpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ |
| 1917 | 1915 | MCFG_CPU_PROGRAM_MAP(sparkman_map) |
| 1918 | MCFG_TIMER_ADD_SCANLINE("scantimer", hardhea2_interrupt, "screen", 0, 1) | |
| 1916 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", suna8_state, hardhea2_interrupt, "screen", 0, 1) | |
| 1919 | 1917 | |
| 1920 | 1918 | MCFG_CPU_ADD("audiocpu", Z80, SUNA8_MASTER_CLOCK / 4) /* ? */ |
| 1921 | 1919 | MCFG_CPU_PROGRAM_MAP(hardhead_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 308 | 308 | MCFG_PALETTE_LENGTH(64 + 32) /* 64 for polygons, 32 for text */ |
| 309 | 309 | |
| 310 | 310 | |
| 311 | MCFG_TIMER_ADD("irvg_timer", irobot_irvg_done_callback) | |
| 312 | MCFG_TIMER_ADD("irmb_timer", irobot_irmb_done_callback) | |
| 311 | MCFG_TIMER_DRIVER_ADD("irvg_timer", irobot_state, irobot_irvg_done_callback) | |
| 312 | MCFG_TIMER_DRIVER_ADD("irmb_timer", irobot_state, irobot_irmb_done_callback) | |
| 313 | 313 | |
| 314 | 314 | /* sound hardware */ |
| 315 | 315 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | ||
| 186 | TIMER_DEVICE_CALLBACK_MEMBER(btime_state::audio_nmi_gen) | |
| 187 | 187 | { |
| 188 | btime_state *state = timer.machine().driver_data<btime_state>(); | |
| 189 | 188 | int scanline = param; |
| 190 | state->m_audio_nmi_state = scanline & 8; | |
| 191 | state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 189 | m_audio_nmi_state = scanline & 8; | |
| 190 | m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 192 | 191 | } |
| 193 | 192 | |
| 194 | 193 | |
| r18137 | r18138 | |
| 1463 | 1462 | |
| 1464 | 1463 | MCFG_CPU_ADD("audiocpu", M6502, HCLK1/3/2) |
| 1465 | 1464 | MCFG_CPU_PROGRAM_MAP(audio_map) |
| 1466 | MCFG_TIMER_ADD_SCANLINE("audionmi", audio_nmi_gen, "screen", 0, 8) | |
| 1465 | MCFG_TIMER_DRIVER_ADD_SCANLINE("audionmi", btime_state, audio_nmi_gen, "screen", 0, 8) | |
| 1467 | 1466 | |
| 1468 | 1467 | /* video hardware */ |
| 1469 | 1468 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 402 | 402 | }; |
| 403 | 403 | |
| 404 | 404 | |
| 405 | TIMER_DEVICE_CALLBACK( | |
| 405 | TIMER_DEVICE_CALLBACK_MEMBER(changela_state::changela_scanline) | |
| 406 | 406 | { |
| 407 | 407 | int scanline = param; |
| 408 | 408 | |
| 409 | 409 | if(scanline == 256) // vblank irq |
| 410 | | |
| 410 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xdf); | |
| 411 | 411 | else if(((scanline % 64) == 0)) // timer irq, 3 times per given vblank field |
| 412 | | |
| 412 | machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xcf); | |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | INTERRUPT_GEN_MEMBER(changela_state::chl_mcu_irq) |
| r18137 | r18138 | |
| 503 | 503 | |
| 504 | 504 | MCFG_CPU_ADD("maincpu", Z80,5000000) |
| 505 | 505 | MCFG_CPU_PROGRAM_MAP(changela_map) |
| 506 | MCFG_TIMER_ADD_SCANLINE("scantimer", changela_scanline, "screen", 0, 1) | |
| 506 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", changela_state, changela_scanline, "screen", 0, 1) | |
| 507 | 507 | |
| 508 | 508 | MCFG_CPU_ADD("mcu", M68705,2500000) |
| 509 | 509 | MCFG_CPU_PROGRAM_MAP(mcu_map) |
| r18137 | r18138 | |
|---|---|---|
| 82 | 82 | * |
| 83 | 83 | *************************************/ |
| 84 | 84 | |
| 85 | ||
| 85 | TIMER_DEVICE_CALLBACK_MEMBER(gberet_state::gberet_interrupt_tick) | |
| 86 | 86 | { |
| 87 | gberet_state *state = timer.machine().driver_data<gberet_state>(); | |
| 88 | UINT8 ticks_mask = ~state->m_interrupt_ticks & (state->m_interrupt_ticks + 1); // 0->1 | |
| 89 | state->m_interrupt_ticks++; | |
| 87 | UINT8 ticks_mask = ~m_interrupt_ticks & (m_interrupt_ticks + 1); // 0->1 | |
| 88 | m_interrupt_ticks++; | |
| 90 | 89 | |
| 91 | 90 | // NMI on d0 |
| 92 | if (ticks_mask & state->m_interrupt_mask & 1) | |
| 93 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 91 | if (ticks_mask & m_interrupt_mask & 1) | |
| 92 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE); | |
| 94 | 93 | |
| 95 | 94 | // IRQ on d3 (used by mrgoemon) |
| 96 | if (ticks_mask & state->m_interrupt_mask<<2 & 8) | |
| 97 | timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 95 | if (ticks_mask & m_interrupt_mask<<2 & 8) | |
| 96 | machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 98 | 97 | |
| 99 | 98 | // IRQ on d4 (used by gberet) |
| 100 | if (ticks_mask & state->m_interrupt_mask<<2 & 16) | |
| 101 | timer.machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 99 | if (ticks_mask & m_interrupt_mask<<2 & 16) | |
| 100 | machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 102 | 101 | } |
| 103 | 102 | |
| 104 | 103 | |
| r18137 | r18138 | |
| 423 | 422 | /* basic machine hardware */ |
| 424 | 423 | MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) // X1S (generated by a custom IC) |
| 425 | 424 | MCFG_CPU_PROGRAM_MAP(gberet_map) |
| 426 | MCFG_TIMER_ADD_SCANLINE("scantimer", gberet_interrupt_tick, "screen", 0, 16) | |
| 425 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gberet_state, gberet_interrupt_tick, "screen", 0, 16) | |
| 427 | 426 | |
| 428 | 427 | MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet) |
| 429 | 428 | MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet) |
| r18137 | r18138 | |
|---|---|---|
| 143 | 143 | MCFG_WATCHDOG_VBLANK_INIT(3) |
| 144 | 144 | |
| 145 | 145 | |
| 146 | MCFG_TIMER_ADD_PERIODIC("crash_timer", nitedrvr_crash_toggle_callback, PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1))) | |
| 146 | MCFG_TIMER_DRIVER_ADD_PERIODIC("crash_timer", nitedrvr_state, nitedrvr_crash_toggle_callback, PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1))) | |
| 147 | 147 | |
| 148 | 148 | /* video hardware */ |
| 149 | 149 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | ||
| 26 | TIMER_DEVICE_CALLBACK_MEMBER(sprint8_state::input_callback) | |
| 27 | 27 | { |
| 28 | sprint8_state *state = timer.machine().driver_data<sprint8_state>(); | |
| 29 | 28 | static const char *const dialnames[] = { "DIAL1", "DIAL2", "DIAL3", "DIAL4", "DIAL5", "DIAL6", "DIAL7", "DIAL8" }; |
| 30 | 29 | |
| 31 | 30 | int i; |
| 32 | 31 | |
| 33 | 32 | for (i = 0; i < 8; i++) |
| 34 | 33 | { |
| 35 | UINT8 val = | |
| 34 | UINT8 val = machine().root_device().ioport(dialnames[i])->read() >> 4; | |
| 36 | 35 | |
| 37 | signed char delta = (val - | |
| 36 | signed char delta = (val - m_dial[i]) & 15; | |
| 38 | 37 | |
| 39 | 38 | if (delta & 8) |
| 40 | 39 | delta |= 0xf0; /* extend sign to 8 bits */ |
| 41 | 40 | |
| 42 | | |
| 41 | m_steer_flag[i] = (delta != 0); | |
| 43 | 42 | |
| 44 | 43 | if (delta > 0) |
| 45 | | |
| 44 | m_steer_dir[i] = 0; | |
| 46 | 45 | |
| 47 | 46 | if (delta < 0) |
| 48 | | |
| 47 | m_steer_dir[i] = 1; | |
| 49 | 48 | |
| 50 | | |
| 49 | m_dial[i] = val; | |
| 51 | 50 | } |
| 52 | 51 | } |
| 53 | 52 | |
| r18137 | r18138 | |
| 456 | 455 | MCFG_CPU_PROGRAM_MAP(sprint8_map) |
| 457 | 456 | |
| 458 | 457 | |
| 459 | MCFG_TIMER_ADD_PERIODIC("input_timer", input_callback, attotime::from_hz(60)) | |
| 458 | MCFG_TIMER_DRIVER_ADD_PERIODIC("input_timer", sprint8_state, input_callback, attotime::from_hz(60)) | |
| 460 | 459 | |
| 461 | 460 | /* video hardware */ |
| 462 | 461 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | |
| 64 | ||
| 64 | TIMER_DEVICE_CALLBACK_MEMBER(dbz_state::dbz_scanline) | |
| 65 | 65 | { |
| 66 | dbz_state *state = timer.machine().driver_data<dbz_state>(); | |
| 67 | 66 | int scanline = param; |
| 68 | 67 | |
| 69 | 68 | if(scanline == 256) // vblank-out irq |
| 70 | | |
| 69 | machine().device("maincpu")->execute().set_input_line(M68K_IRQ_2, ASSERT_LINE); | |
| 71 | 70 | |
| 72 | if(scanline == 0 && k053246_is_irq_enabled(state->m_k053246)) // vblank-in irq | |
| 73 | timer.machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); //auto-acks apparently | |
| 71 | if(scanline == 0 && k053246_is_irq_enabled(m_k053246)) // vblank-in irq | |
| 72 | machine().device("maincpu")->execute().set_input_line(M68K_IRQ_4, HOLD_LINE); //auto-acks apparently | |
| 74 | 73 | } |
| 75 | 74 | |
| 76 | 75 | #if 0 |
| r18137 | r18138 | |
| 383 | 382 | /* basic machine hardware */ |
| 384 | 383 | MCFG_CPU_ADD("maincpu", M68000, 16000000) |
| 385 | 384 | MCFG_CPU_PROGRAM_MAP(dbz_map) |
| 386 | MCFG_TIMER_ADD_SCANLINE("scantimer", dbz_scanline, "screen", 0, 1) | |
| 385 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dbz_state, dbz_scanline, "screen", 0, 1) | |
| 387 | 386 | |
| 388 | 387 | MCFG_CPU_ADD("audiocpu", Z80, 4000000) |
| 389 | 388 | MCFG_CPU_PROGRAM_MAP(dbz_sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 347 | 347 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 348 | 348 | MACHINE_CONFIG_END |
| 349 | 349 | |
| 350 | ||
| 350 | TIMER_DEVICE_CALLBACK_MEMBER(circus_state::crash_scanline) | |
| 351 | 351 | { |
| 352 | 352 | int scanline = param; |
| 353 | 353 | |
| 354 | 354 | if(scanline == 256 || scanline == 0) // vblank-out / in irq |
| 355 | | |
| 355 | machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE); | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | static MACHINE_CONFIG_START( crash, circus_state ) |
| r18137 | r18138 | |
| 360 | 360 | /* basic machine hardware */ |
| 361 | 361 | MCFG_CPU_ADD("maincpu", M6502, XTAL_11_289MHz / 16) /* 705.562kHz */ |
| 362 | 362 | MCFG_CPU_PROGRAM_MAP(circus_map) |
| 363 | MCFG_TIMER_ADD_SCANLINE("scantimer", crash_scanline, "screen", 0, 1) | |
| 363 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", circus_state, crash_scanline, "screen", 0, 1) | |
| 364 | 364 | |
| 365 | 365 | |
| 366 | 366 | /* video hardware */ |
| r18137 | r18138 | |
|---|---|---|
| 542 | 542 | |
| 543 | 543 | |
| 544 | 544 | /* CPU#1 Interrups , lev 3,4 & 5 are tested on power up. The rest is rte, but lev 6 */ |
| 545 | ||
| 545 | TIMER_DEVICE_CALLBACK_MEMBER(galpani2_state::galpani2_interrupt1) | |
| 546 | 546 | { |
| 547 | galpani2_state *state = timer.machine().driver_data<galpani2_state>(); | |
| 548 | 547 | int scanline = param; |
| 549 | 548 | |
| 550 | 549 | if(scanline == 240) |
| 551 | | |
| 550 | m_maincpu->set_input_line(5, HOLD_LINE); | |
| 552 | 551 | |
| 553 | 552 | /* MCU related? */ |
| 554 | 553 | if(scanline == 128) |
| 555 | 554 | { |
| 556 | state->m_maincpu->set_input_line(3, HOLD_LINE); | |
| 557 | state->m_maincpu->set_input_line(4, HOLD_LINE); | |
| 555 | m_maincpu->set_input_line(3, HOLD_LINE); | |
| 556 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 558 | 557 | } |
| 559 | 558 | |
| 560 | 559 | if(scanline == 0) |
| 561 | | |
| 560 | m_maincpu->set_input_line(6, HOLD_LINE); // hblank? | |
| 562 | 561 | } |
| 563 | 562 | |
| 564 | 563 | /* CPU#2 interrupts, lev 3,4 & 5 are tested on power up. The rest is rte, but lev 7 */ |
| 565 | ||
| 564 | TIMER_DEVICE_CALLBACK_MEMBER(galpani2_state::galpani2_interrupt2) | |
| 566 | 565 | { |
| 567 | galpani2_state *state = timer.machine().driver_data<galpani2_state>(); | |
| 568 | 566 | int scanline = param; |
| 569 | 567 | |
| 570 | 568 | if(scanline == 240) |
| 571 | | |
| 569 | m_subcpu->set_input_line(5, HOLD_LINE); | |
| 572 | 570 | |
| 573 | 571 | if(scanline == 128) |
| 574 | | |
| 572 | m_subcpu->set_input_line(4, HOLD_LINE); | |
| 575 | 573 | |
| 576 | 574 | if(scanline == 0) |
| 577 | | |
| 575 | m_subcpu->set_input_line(3, HOLD_LINE); | |
| 578 | 576 | } |
| 579 | 577 | |
| 580 | 578 | static MACHINE_CONFIG_START( galpani2, galpani2_state ) |
| r18137 | r18138 | |
| 582 | 580 | /* basic machine hardware */ |
| 583 | 581 | MCFG_CPU_ADD("maincpu", M68000, XTAL_27MHz/2) /* Confirmed on galpani2i PCB */ |
| 584 | 582 | MCFG_CPU_PROGRAM_MAP(galpani2_mem1) |
| 585 | MCFG_TIMER_ADD_SCANLINE("m_scantimer", galpani2_interrupt1, "screen", 0, 1) | |
| 583 | MCFG_TIMER_DRIVER_ADD_SCANLINE("m_scantimer", galpani2_state, galpani2_interrupt1, "screen", 0, 1) | |
| 586 | 584 | //MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| 587 | 585 | |
| 588 | 586 | MCFG_CPU_ADD("sub", M68000, XTAL_27MHz/2) /* Confirmed on galpani2i PCB */ |
| 589 | 587 | MCFG_CPU_PROGRAM_MAP(galpani2_mem2) |
| 590 | MCFG_TIMER_ADD_SCANLINE("s_scantimer", galpani2_interrupt2, "screen", 0, 1) | |
| 588 | MCFG_TIMER_DRIVER_ADD_SCANLINE("s_scantimer", galpani2_state, galpani2_interrupt2, "screen", 0, 1) | |
| 591 | 589 | |
| 592 | 590 | MCFG_EEPROM_93C46_ADD("eeprom") |
| 593 | 591 |
| r18137 | r18138 | |
|---|---|---|
| 10 | 10 | #include "sound/discrete.h" |
| 11 | 11 | |
| 12 | 12 | |
| 13 | ||
| 13 | TIMER_DEVICE_CALLBACK_MEMBER(dragrace_state::dragrace_frame_callback) | |
| 14 | 14 | { |
| 15 | dragrace_state *state = timer.machine().driver_data<dragrace_state>(); | |
| 16 | 15 | int i; |
| 17 | 16 | static const char *const portnames[] = { "P1", "P2" }; |
| 18 | 17 | |
| 19 | 18 | for (i = 0; i < 2; i++) |
| 20 | 19 | { |
| 21 | switch ( | |
| 20 | switch (machine().root_device().ioport(portnames[i])->read()) | |
| 22 | 21 | { |
| 23 | case 0x01: state->m_gear[i] = 1; break; | |
| 24 | case 0x02: state->m_gear[i] = 2; break; | |
| 25 | case 0x04: state->m_gear[i] = 3; break; | |
| 26 | case 0x08: state->m_gear[i] = 4; break; | |
| 27 | case 0x10: state->m_gear[i] = 0; break; | |
| 22 | case 0x01: m_gear[i] = 1; break; | |
| 23 | case 0x02: m_gear[i] = 2; break; | |
| 24 | case 0x04: m_gear[i] = 3; break; | |
| 25 | case 0x08: m_gear[i] = 4; break; | |
| 26 | case 0x10: m_gear[i] = 0; break; | |
| 28 | 27 | } |
| 29 | 28 | } |
| 30 | 29 | |
| 31 | 30 | /* watchdog is disabled during service mode */ |
| 32 | | |
| 31 | machine().watchdog_enable(machine().root_device().ioport("IN0")->read() & 0x20); | |
| 33 | 32 | } |
| 34 | 33 | |
| 35 | 34 | |
| r18137 | r18138 | |
| 336 | 335 | MCFG_WATCHDOG_VBLANK_INIT(8) |
| 337 | 336 | |
| 338 | 337 | |
| 339 | MCFG_TIMER_ADD_PERIODIC("frame_timer", dragrace_frame_callback, attotime::from_hz(60)) | |
| 338 | MCFG_TIMER_DRIVER_ADD_PERIODIC("frame_timer", dragrace_state, dragrace_frame_callback, attotime::from_hz(60)) | |
| 340 | 339 | |
| 341 | 340 | /* video hardware */ |
| 342 | 341 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
|---|---|---|
| 155 | 155 | * |
| 156 | 156 | *************************************/ |
| 157 | 157 | |
| 158 | ||
| 158 | TIMER_DEVICE_CALLBACK_MEMBER(coolpool_state::nvram_write_timeout) | |
| 159 | 159 | { |
| 160 | coolpool_state *state = timer.machine().driver_data<coolpool_state>(); | |
| 161 | state->m_nvram_write_enable = 0; | |
| 160 | m_nvram_write_enable = 0; | |
| 162 | 161 | } |
| 163 | 162 | |
| 164 | 163 | |
| r18137 | r18138 | |
| 205 | 204 | * |
| 206 | 205 | *************************************/ |
| 207 | 206 | |
| 208 | ||
| 207 | TIMER_DEVICE_CALLBACK_MEMBER(coolpool_state::amerdart_audio_int_gen) | |
| 209 | 208 | { |
| 210 | coolpool_state *state = timer.machine().driver_data<coolpool_state>(); | |
| 211 | ||
| 212 | state->m_dsp->execute().set_input_line(0, ASSERT_LINE); | |
| 213 | state->m_dsp->execute().set_input_line(0, CLEAR_LINE); | |
| 209 | m_dsp->execute().set_input_line(0, ASSERT_LINE); | |
| 210 | m_dsp->execute().set_input_line(0, CLEAR_LINE); | |
| 214 | 211 | } |
| 215 | 212 | |
| 216 | 213 | |
| r18137 | r18138 | |
| 858 | 855 | MCFG_CPU_PROGRAM_MAP(amerdart_dsp_pgm_map) |
| 859 | 856 | /* Data Map is internal to the CPU */ |
| 860 | 857 | MCFG_CPU_IO_MAP(amerdart_dsp_io_map) |
| 861 | MCFG_TIMER_ADD_SCANLINE("audioint", amerdart_audio_int_gen, "screen", 0, 1) | |
| 858 | MCFG_TIMER_DRIVER_ADD_SCANLINE("audioint", coolpool_state, amerdart_audio_int_gen, "screen", 0, 1) | |
| 862 | 859 | |
| 863 | 860 | MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,amerdart) |
| 864 | 861 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 865 | 862 | |
| 866 | MCFG_TIMER_ADD("nvram_timer", nvram_write_timeout) | |
| 863 | MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout) | |
| 867 | 864 | |
| 868 | 865 | /* video hardware */ |
| 869 | 866 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 892 | 889 | MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,coolpool) |
| 893 | 890 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 894 | 891 | |
| 895 | MCFG_TIMER_ADD("nvram_timer", nvram_write_timeout) | |
| 892 | MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout) | |
| 896 | 893 | |
| 897 | 894 | /* video hardware */ |
| 898 | 895 | MCFG_TLC34076_ADD("tlc34076", tlc34076_6_bit_intf) |
| r18137 | r18138 | |
|---|---|---|
| 70 | 70 | device.execute().set_input_line(2, HOLD_LINE); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | ||
| 73 | TIMER_DEVICE_CALLBACK_MEMBER(nemesis_state::konamigt_interrupt) | |
| 74 | 74 | { |
| 75 | nemesis_state *state = timer.machine().driver_data<nemesis_state>(); | |
| 76 | 75 | int scanline = param; |
| 77 | 76 | |
| 78 | if (scanline == 240 && state->m_irq_on && (timer.machine().primary_screen->frame_number() & 1) == 0) | |
| 79 | state->m_maincpu->set_input_line(1, HOLD_LINE); | |
| 77 | if (scanline == 240 && m_irq_on && (machine().primary_screen->frame_number() & 1) == 0) | |
| 78 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 80 | 79 | |
| 81 | if (scanline == 0 && state->m_irq2_on) | |
| 82 | state->m_maincpu->set_input_line(2, HOLD_LINE); | |
| 80 | if (scanline == 0 && m_irq2_on) | |
| 81 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | ||
| 84 | TIMER_DEVICE_CALLBACK_MEMBER(nemesis_state::gx400_interrupt) | |
| 86 | 85 | { |
| 87 | nemesis_state *state = timer.machine().driver_data<nemesis_state>(); | |
| 88 | 86 | int scanline = param; |
| 89 | 87 | |
| 90 | if (scanline == 240 && state->m_irq1_on && (timer.machine().primary_screen->frame_number() & 1) == 0) | |
| 91 | state->m_maincpu->set_input_line(1, HOLD_LINE); | |
| 88 | if (scanline == 240 && m_irq1_on && (machine().primary_screen->frame_number() & 1) == 0) | |
| 89 | m_maincpu->set_input_line(1, HOLD_LINE); | |
| 92 | 90 | |
| 93 | if (scanline == 0 && state->m_irq2_on) | |
| 94 | state->m_maincpu->set_input_line(2, HOLD_LINE); | |
| 91 | if (scanline == 0 && m_irq2_on) | |
| 92 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 95 | 93 | |
| 96 | if (scanline == 120 && state->m_irq4_on) | |
| 97 | state->m_maincpu->set_input_line(4, HOLD_LINE); | |
| 94 | if (scanline == 120 && m_irq4_on) | |
| 95 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 98 | 96 | } |
| 99 | 97 | |
| 100 | 98 | |
| r18137 | r18138 | |
| 1598 | 1596 | /* basic machine hardware */ |
| 1599 | 1597 | MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */ |
| 1600 | 1598 | MCFG_CPU_PROGRAM_MAP(gx400_map) |
| 1601 | MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1) | |
| 1599 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1) | |
| 1602 | 1600 | |
| 1603 | 1601 | MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ |
| 1604 | 1602 | MCFG_CPU_PROGRAM_MAP(gx400_sound_map) |
| r18137 | r18138 | |
| 1641 | 1639 | /* basic machine hardware */ |
| 1642 | 1640 | MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */ |
| 1643 | 1641 | MCFG_CPU_PROGRAM_MAP(konamigt_map) |
| 1644 | MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1) | |
| 1642 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1) | |
| 1645 | 1643 | |
| 1646 | 1644 | MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ |
| 1647 | 1645 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
| 1680 | 1678 | /* basic machine hardware */ |
| 1681 | 1679 | MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */ |
| 1682 | 1680 | MCFG_CPU_PROGRAM_MAP(rf2_gx400_map) |
| 1683 | MCFG_TIMER_ADD_SCANLINE("scantimer", gx400_interrupt, "screen", 0, 1) | |
| 1681 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1) | |
| 1684 | 1682 | |
| 1685 | 1683 | MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ |
| 1686 | 1684 | MCFG_CPU_PROGRAM_MAP(gx400_sound_map) |
| r18137 | r18138 | |
| 1903 | 1901 | /* basic machine hardware */ |
| 1904 | 1902 | MCFG_CPU_ADD("maincpu", M68000,18432000/3) /* 6.144MHz */ |
| 1905 | 1903 | MCFG_CPU_PROGRAM_MAP(hcrash_map) |
| 1906 | MCFG_TIMER_ADD_SCANLINE("scantimer", konamigt_interrupt, "screen", 0, 1) | |
| 1904 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1) | |
| 1907 | 1905 | |
| 1908 | 1906 | MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ |
| 1909 | 1907 | MCFG_CPU_PROGRAM_MAP(sal_sound_map) |
| r18137 | r18138 | |
| 2648 | 2646 | /* basic machine hardware */ |
| 2649 | 2647 | MCFG_CPU_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */ |
| 2650 | 2648 | MCFG_CPU_PROGRAM_MAP(gx400_map) |
| 2651 | ||
| 2649 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1) | |
| 2652 | 2650 | MCFG_DEVICE_DISABLE() |
| 2653 | 2651 | |
| 2654 | 2652 | MCFG_CPU_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */ |
| r18137 | r18138 | |
|---|---|---|
| 416 | 416 | /* start old driver code */ |
| 417 | 417 | |
| 418 | 418 | |
| 419 | ||
| 419 | TIMER_DEVICE_CALLBACK_MEMBER(skns_state::interrupt_callback) | |
| 420 | 420 | { |
| 421 | | |
| 421 | machine().device("maincpu")->execute().set_input_line(param, HOLD_LINE); | |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | void skns_state::machine_reset() |
| r18137 | r18138 | |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | |
| 437 | ||
| 437 | TIMER_DEVICE_CALLBACK_MEMBER(skns_state::skns_irq) | |
| 438 | 438 | { |
| 439 | skns_state *state = timer.machine().driver_data<skns_state>(); | |
| 440 | 439 | int scanline = param; |
| 441 | 440 | |
| 442 | 441 | if(scanline == 240) |
| 443 | | |
| 442 | m_maincpu->set_input_line(5,HOLD_LINE); //vblank | |
| 444 | 443 | else if(scanline == 0) |
| 445 | | |
| 444 | m_maincpu->set_input_line(1,HOLD_LINE); // spc | |
| 446 | 445 | } |
| 447 | 446 | |
| 448 | 447 | /********************************************************************************** |
| r18137 | r18138 | |
| 757 | 756 | static MACHINE_CONFIG_START( skns, skns_state ) |
| 758 | 757 | MCFG_CPU_ADD("maincpu", SH2,28638000) |
| 759 | 758 | MCFG_CPU_PROGRAM_MAP(skns_map) |
| 760 | MCFG_TIMER_ADD_SCANLINE("scantimer", skns_irq, "screen", 0, 1) | |
| 759 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", skns_state, skns_irq, "screen", 0, 1) | |
| 761 | 760 | |
| 762 | 761 | MCFG_MSM6242_ADD("rtc", rtc_intf) |
| 763 | 762 | |
| 764 | 763 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 765 | 764 | |
| 766 | MCFG_TIMER_ADD_PERIODIC("int15_timer", interrupt_callback, attotime::from_msec(2)) | |
| 765 | MCFG_TIMER_DRIVER_ADD_PERIODIC("int15_timer", skns_state, interrupt_callback, attotime::from_msec(2)) | |
| 767 | 766 | MCFG_TIMER_PARAM(15) |
| 768 | MCFG_TIMER_ADD_PERIODIC("int11_timer", interrupt_callback, attotime::from_msec(8)) | |
| 767 | MCFG_TIMER_DRIVER_ADD_PERIODIC("int11_timer", skns_state, interrupt_callback, attotime::from_msec(8)) | |
| 769 | 768 | MCFG_TIMER_PARAM(11) |
| 770 | MCFG_TIMER_ADD_PERIODIC("int9_timer", interrupt_callback, attotime::from_hz(28638000/1824)) | |
| 769 | MCFG_TIMER_DRIVER_ADD_PERIODIC("int9_timer", skns_state, interrupt_callback, attotime::from_hz(28638000/1824)) | |
| 771 | 770 | MCFG_TIMER_PARAM(9) |
| 772 | 771 | |
| 773 | 772 | MCFG_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) |
| r18137 | r18138 | |
|---|---|---|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | ||
| 137 | TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline) | |
| 138 | 138 | { |
| 139 | 139 | int scanline = param; |
| 140 | 140 | |
| 141 | 141 | if(scanline == 224) // vblank-out irq |
| 142 | | |
| 142 | machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 143 | 143 | |
| 144 | 144 | /* Pandora "sprite end dma" irq? */ |
| 145 | 145 | if(scanline == 32) |
| 146 | | |
| 146 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
| 150 | ||
| 150 | TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galhustl_scanline) | |
| 151 | 151 | { |
| 152 | 152 | int scanline = param; |
| 153 | 153 | |
| 154 | 154 | if(scanline == 224) // vblank-out irq |
| 155 | | |
| 155 | machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE); | |
| 156 | 156 | |
| 157 | 157 | /* Pandora "sprite end dma" irq? */ |
| 158 | 158 | if(scanline == 32) |
| 159 | | |
| 159 | machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); | |
| 160 | 160 | |
| 161 | 161 | if(scanline == 0) // timer irq? |
| 162 | | |
| 162 | machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); | |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | |
| r18137 | r18138 | |
| 559 | 559 | /* basic machine hardware */ |
| 560 | 560 | MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */ |
| 561 | 561 | MCFG_CPU_PROGRAM_MAP(galpanic_map) |
| 562 | MCFG_TIMER_ADD_SCANLINE("scantimer", galpanic_scanline, "screen", 0, 1) | |
| 562 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1) | |
| 563 | 563 | |
| 564 | 564 | /* video hardware */ |
| 565 | 565 | MCFG_SCREEN_ADD("screen", RASTER) |
| r18137 | r18138 | |
| 621 | 621 | MCFG_CPU_MODIFY("maincpu") |
| 622 | 622 | MCFG_CPU_CLOCK(12000000) /* ? */ |
| 623 | 623 | MCFG_CPU_PROGRAM_MAP(supmodel_map) |
| 624 | ||
| 624 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1) | |
| 625 | 625 | |
| 626 | 626 | /* video hardware */ |
| 627 | 627 | MCFG_SCREEN_MODIFY("screen") |
| r18137 | r18138 | |
| 654 | 654 | MCFG_CPU_CLOCK(12000000) /* ? */ |
| 655 | 655 | MCFG_CPU_PROGRAM_MAP(galhustl_map) |
| 656 | 656 | MCFG_TIMER_MODIFY("scantimer") |
| 657 | MCFG_TIMER_CALLBACK(galhustl_scanline) | |
| 657 | MCFG_TIMER_DRIVER_CALLBACK(galpanic_state, galhustl_scanline) | |
| 658 | 658 | |
| 659 | 659 | /* video hardware */ |
| 660 | 660 | MCFG_SCREEN_MODIFY("screen") |
| r18137 | r18138 | |
| 673 | 673 | MCFG_CPU_CLOCK(12000000) /* ? */ |
| 674 | 674 | MCFG_CPU_PROGRAM_MAP(zipzap_map) |
| 675 | 675 | MCFG_TIMER_MODIFY("scantimer") |
| 676 | MCFG_TIMER_CALLBACK(galhustl_scanline) | |
| 676 | MCFG_TIMER_DRIVER_CALLBACK(galpanic_state, galhustl_scanline) | |
| 677 | 677 | |
| 678 | 678 | /* video hardware */ |
| 679 | 679 | MCFG_SCREEN_MODIFY("screen") |
| r18137 | r18138 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | ||
| 25 | TIMER_DEVICE_CALLBACK_MEMBER(finalizr_state::finalizr_scanline) | |
| 26 | 26 | { |
| 27 | finalizr_state *state = timer.machine().driver_data<finalizr_state>(); | |
| 28 | 27 | int scanline = param; |
| 29 | 28 | |
| 30 | if(scanline == 240 && state->m_irq_enable) // vblank irq | |
| 31 | timer.machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); | |
| 32 | else if(((scanline % 32) == 0) && state->m_nmi_enable) // timer irq | |
| 33 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 29 | if(scanline == 240 && m_irq_enable) // vblank irq | |
| 30 | machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE); | |
| 31 | else if(((scanline % 32) == 0) && m_nmi_enable) // timer irq | |
| 32 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | 35 | |
| r18137 | r18138 | |
| 279 | 278 | /* basic machine hardware */ |
| 280 | 279 | MCFG_CPU_ADD("maincpu", M6809,XTAL_18_432MHz/6) /* ??? */ |
| 281 | 280 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 282 | MCFG_TIMER_ADD_SCANLINE("scantimer", finalizr_scanline, "screen", 0, 1) | |
| 281 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", finalizr_state, finalizr_scanline, "screen", 0, 1) | |
| 283 | 282 | |
| 284 | 283 | MCFG_CPU_ADD("audiocpu", I8039,XTAL_18_432MHz/2) /* 9.216MHz clkin ?? */ |
| 285 | 284 | MCFG_CPU_PROGRAM_MAP(sound_map) |
| r18137 | r18138 | |
|---|---|---|
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | |
| 429 | ||
| 429 | TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::spacefev_vco_voltage_timer) | |
| 430 | 430 | { |
| 431 | device_t *sn = timer.machine().device("snsnd"); | |
| 432 | n8080_state *state = timer.machine().driver_data<n8080_state>(); | |
| 431 | device_t *sn = machine().device("snsnd"); | |
| 433 | 432 | double voltage = 0; |
| 434 | 433 | |
| 435 | if ( | |
| 434 | if (m_mono_flop[2]) | |
| 436 | 435 | { |
| 437 | voltage = 5 * (1 - exp(- | |
| 436 | voltage = 5 * (1 - exp(- m_sound_timer[2]->elapsed().as_double() / 0.22)); | |
| 438 | 437 | } |
| 439 | 438 | |
| 440 | 439 | sn76477_vco_voltage_w(sn, voltage); |
| 441 | 440 | } |
| 442 | 441 | |
| 443 | 442 | |
| 444 | ||
| 443 | TIMER_DEVICE_CALLBACK_MEMBER(n8080_state::helifire_dac_volume_timer) | |
| 445 | 444 | { |
| 446 | n8080_state *state = timer.machine().driver_data<n8080_state>(); | |
| 447 | double t = state->m_helifire_dac_timing - timer.machine().time().as_double(); | |
| 445 | double t = m_helifire_dac_timing - machine().time().as_double(); | |
| 448 | 446 | |
| 449 | if ( | |
| 447 | if (m_helifire_dac_phase) | |
| 450 | 448 | { |
| 451 | | |
| 449 | m_helifire_dac_volume = 1 - exp(t / ATTACK_RATE); | |
| 452 | 450 | } |
| 453 | 451 | else |
| 454 | 452 | { |
| 455 | | |
| 453 | m_helifire_dac_volume = exp(t / DECAY_RATE); | |
| 456 | 454 | } |
| 457 | 455 | } |
| 458 | 456 | |
| r18137 | r18138 | |
| 577 | 575 | MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map) |
| 578 | 576 | MCFG_CPU_IO_MAP(n8080_sound_io_map) |
| 579 | 577 | |
| 580 | MCFG_TIMER_ADD_PERIODIC("vco_timer", spacefev_vco_voltage_timer, attotime::from_hz(1000)) | |
| 578 | MCFG_TIMER_DRIVER_ADD_PERIODIC("vco_timer", n8080_state, spacefev_vco_voltage_timer, attotime::from_hz(1000)) | |
| 581 | 579 | |
| 582 | 580 | /* sound hardware */ |
| 583 | 581 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
| 617 | 615 | MCFG_CPU_PROGRAM_MAP(n8080_sound_cpu_map) |
| 618 | 616 | MCFG_CPU_IO_MAP(helifire_sound_io_map) |
| 619 | 617 | |
| 620 | MCFG_TIMER_ADD_PERIODIC("helifire_dac", helifire_dac_volume_timer, attotime::from_hz(1000) | |
| 618 | MCFG_TIMER_DRIVER_ADD_PERIODIC("helifire_dac", n8080_state, helifire_dac_volume_timer, attotime::from_hz(1000)) | |
| 621 | 619 | |
| 622 | 620 | /* sound hardware */ |
| 623 | 621 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r18137 | r18138 | |
|---|---|---|
| 869 | 869 | } |
| 870 | 870 | |
| 871 | 871 | |
| 872 | TIMER_DEVICE_CALLBACK( | |
| 872 | TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::schaser_effect_555_cb) | |
| 873 | 873 | { |
| 874 | _8080bw_state *state = timer.machine().driver_data<_8080bw_state>(); | |
| 875 | 874 | int effect = param; |
| 876 | 875 | attotime new_time; |
| 877 | 876 | |
| 878 | 877 | /* Toggle 555 output */ |
| 879 | state->m_schaser_effect_555_is_low = !state->m_schaser_effect_555_is_low; | |
| 880 | state->m_schaser_effect_555_time_remain = attotime::zero; | |
| 881 | state->m_schaser_effect_555_time_remain_savable = state->m_schaser_effect_555_time_remain.as_double(); | |
| 878 | m_schaser_effect_555_is_low = !m_schaser_effect_555_is_low; | |
| 879 | m_schaser_effect_555_time_remain = attotime::zero; | |
| 880 | m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double(); | |
| 882 | 881 | |
| 883 | if ( | |
| 882 | if (m_schaser_effect_555_is_low) | |
| 884 | 883 | new_time = PERIOD_OF_555_ASTABLE(0, RES_K(20), CAP_U(1)) / 2; |
| 885 | 884 | else |
| 886 | 885 | { |
| r18137 | r18138 | |
| 889 | 888 | else |
| 890 | 889 | new_time = attotime::never; |
| 891 | 890 | } |
| 892 | state->m_schaser_effect_555_timer->adjust(new_time, effect); | |
| 893 | sn76477_enable_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion)); | |
| 894 | sn76477_one_shot_cap_voltage_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT); | |
| 891 | m_schaser_effect_555_timer->adjust(new_time, effect); | |
| 892 | sn76477_enable_w(m_sn, !(m_schaser_effect_555_is_low || m_schaser_explosion)); | |
| 893 | sn76477_one_shot_cap_voltage_w(m_sn, !(m_schaser_effect_555_is_low || m_schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT); | |
| 895 | 894 | } |
| 896 | 895 | |
| 897 | 896 |
| r18137 | r18138 | |
|---|---|---|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
| 52 | TIMER_DEVICE_CALLBACK( | |
| 52 | TIMER_DEVICE_CALLBACK_MEMBER(galaxold_state::galaxold_interrupt_timer) | |
| 53 | 53 | { |
| 54 | ttl7474_device *target = | |
| 54 | ttl7474_device *target = machine().device<ttl7474_device>("7474_9m_2"); | |
| 55 | 55 | |
| 56 | 56 | /* 128V, 64V and 32V go to D */ |
| 57 | 57 | target->d_w(((param & 0xe0) != 0xe0) ? 1 : 0); |
| r18137 | r18138 | |
| 61 | 61 | |
| 62 | 62 | param = (param + 0x10) & 0xff; |
| 63 | 63 | |
| 64 | timer.adjust( | |
| 64 | timer.adjust(machine().primary_screen->time_until_pos(param), param); | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 |
| r18137 | r18138 | |
|---|---|---|
| 61 | 61 | m_combase[BYTE_XOR_BE(offset & 0xFFF)] = data; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | TIMER_DEVICE_CALLBACK( | |
| 64 | TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irvg_done_callback) | |
| 65 | 65 | { |
| 66 | irobot_state *state = timer.machine().driver_data<irobot_state>(); | |
| 67 | 66 | logerror("vg done. "); |
| 68 | | |
| 67 | m_irvg_running = 0; | |
| 69 | 68 | } |
| 70 | 69 | |
| 71 | 70 | WRITE8_MEMBER(irobot_state::irobot_statwr_w) |
| r18137 | r18138 | |
| 412 | 411 | load_oproms(machine()); |
| 413 | 412 | } |
| 414 | 413 | |
| 415 | TIMER_DEVICE_CALLBACK( | |
| 414 | TIMER_DEVICE_CALLBACK_MEMBER(irobot_state::irobot_irmb_done_callback) | |
| 416 | 415 | { |
| 417 | irobot_state *state = timer.machine().driver_data<irobot_state>(); | |
| 418 | 416 | logerror("mb done. "); |
| 419 | state->m_irmb_running = 0; | |
| 420 | timer.machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); | |
| 417 | m_irmb_running = 0; | |
| 418 | machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); | |
| 421 | 419 | } |
| 422 | 420 | |
| 423 | 421 |
| r18137 | r18138 | |
|---|---|---|
| 253 | 253 | * |
| 254 | 254 | *************************************/ |
| 255 | 255 | |
| 256 | TIMER_DEVICE_CALLBACK( | |
| 256 | TIMER_DEVICE_CALLBACK_MEMBER(williams_state::williams_va11_callback) | |
| 257 | 257 | { |
| 258 | pia6821_device *pia_1 = | |
| 258 | pia6821_device *pia_1 = machine().device<pia6821_device>("pia_1"); | |
| 259 | 259 | int scanline = param; |
| 260 | 260 | |
| 261 | 261 | /* the IRQ signal comes into CB1, and is set to VA11 */ |
| r18137 | r18138 | |
| 264 | 264 | /* set a timer for the next update */ |
| 265 | 265 | scanline += 0x20; |
| 266 | 266 | if (scanline >= 256) scanline = 0; |
| 267 | timer.adjust( | |
| 267 | timer.adjust(machine().primary_screen->time_until_pos(scanline), scanline); | |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | |
| r18137 | r18138 | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | |
| 280 | TIMER_DEVICE_CALLBACK( | |
| 280 | TIMER_DEVICE_CALLBACK_MEMBER(williams_state::williams_count240_callback) | |
| 281 | 281 | { |
| 282 | williams_state *state = timer.machine().driver_data<williams_state>(); | |
| 283 | pia6821_device *pia_1 = timer.machine().device<pia6821_device>("pia_1"); | |
| 282 | pia6821_device *pia_1 = machine().device<pia6821_device>("pia_1"); | |
| 284 | 283 | |
| 285 | 284 | /* the COUNT240 signal comes into CA1, and is set to the logical AND of VA10-VA13 */ |
| 286 | 285 | pia_1->ca1_w(1); |
| 287 | 286 | |
| 288 | 287 | /* set a timer to turn it off once the scanline counter resets */ |
| 289 | | |
| 288 | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), timer_expired_delegate(FUNC(williams_state::williams_count240_off_callback),this)); | |
| 290 | 289 | |
| 291 | 290 | /* set a timer for next frame */ |
| 292 | timer.adjust( | |
| 291 | timer.adjust(machine().primary_screen->time_until_pos(240)); | |
| 293 | 292 | } |
| 294 | 293 | |
| 295 | 294 | |
| r18137 | r18138 | |
| 406 | 405 | * |
| 407 | 406 | *************************************/ |
| 408 | 407 | |
| 409 | TIMER_DEVICE_CALLBACK( | |
| 408 | TIMER_DEVICE_CALLBACK_MEMBER(williams_state::williams2_va11_callback) | |
| 410 | 409 | { |
| 411 | pia6821_device *pia_0 = timer.machine().device<pia6821_device>("pia_0"); | |
| 412 | pia6821_device *pia_1 = timer.machine().device<pia6821_device>("pia_1"); | |
| 410 | pia6821_device *pia_0 = machine().device<pia6821_device>("pia_0"); | |
| 411 | pia6821_device *pia_1 = machine().device<pia6821_device>("pia_1"); | |
| 413 | 412 | int scanline = param; |
| 414 | 413 | |
| 415 | 414 | /* the IRQ signal comes into CB1, and is set to VA11 */ |
| r18137 | r18138 | |
| 419 | 418 | /* set a timer for the next update */ |
| 420 | 419 | scanline += 0x20; |
| 421 | 420 | if (scanline >= 256) scanline = 0; |
| 422 | timer.adjust( | |
| 421 | timer.adjust(machine().primary_screen->time_until_pos(scanline), scanline); | |
| 423 | 422 | } |
| 424 | 423 | |
| 425 | 424 | |
| r18137 | r18138 | |
| 432 | 431 | } |
| 433 | 432 | |
| 434 | 433 | |
| 435 | TIMER_DEVICE_CALLBACK( | |
| 434 | TIMER_DEVICE_CALLBACK_MEMBER(williams_state::williams2_endscreen_callback) | |
| 436 | 435 | { |
| 437 | williams_state *state = timer.machine().driver_data<williams_state>(); | |
| 438 | pia6821_device *pia_0 = timer.machine().device<pia6821_device>("pia_0"); | |
| 436 | pia6821_device *pia_0 = machine().device<pia6821_device>("pia_0"); | |
| 439 | 437 | |
| 440 | 438 | /* the /ENDSCREEN signal comes into CA1 */ |
| 441 | 439 | pia_0->ca1_w(0); |
| 442 | 440 | |
| 443 | 441 | /* set a timer to turn it off once the scanline counter resets */ |
| 444 | | |
| 442 | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(8), timer_expired_delegate(FUNC(williams_state::williams2_endscreen_off_callback),this)); | |
| 445 | 443 | |
| 446 | 444 | /* set a timer for next frame */ |
| 447 | timer.adjust( | |
| 445 | timer.adjust(machine().primary_screen->time_until_pos(254)); | |
| 448 | 446 | } |
| 449 | 447 | |
| 450 | 448 |
| r18137 | r18138 | |
|---|---|---|
| 186 | 186 | m_clr_gun_int = 1; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | TIMER_DEVICE_CALLBACK( | |
| 189 | TIMER_DEVICE_CALLBACK_MEMBER(gaelco2_state::bang_irq) | |
| 190 | 190 | { |
| 191 | gaelco2_state *state = timer.machine().driver_data<gaelco2_state>(); | |
| 192 | 191 | int scanline = param; |
| 193 | 192 | |
| 194 | 193 | if (scanline == 256){ |
| 195 | state->m_maincpu->set_input_line(2, HOLD_LINE); | |
| 196 | state->m_clr_gun_int = 0; | |
| 194 | m_maincpu->set_input_line(2, HOLD_LINE); | |
| 195 | m_clr_gun_int = 0; | |
| 197 | 196 | } |
| 198 | 197 | |
| 199 | if ((scanline % 64) == 0 && state->m_clr_gun_int) | |
| 200 | state->m_maincpu->set_input_line(4, HOLD_LINE); | |
| 198 | if ((scanline % 64) == 0 && m_clr_gun_int) | |
| 199 | m_maincpu->set_input_line(4, HOLD_LINE); | |
| 201 | 200 | } |
| 202 | 201 | |
| 203 | 202 | /*************************************************************************** |
| r18137 | r18138 | |
|---|---|---|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | |
| 251 | TIMER_DEVICE_CALLBACK( | |
| 251 | TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_state::nitedrvr_crash_toggle_callback) | |
| 252 | 252 | { |
| 253 | nitedrvr_state *state = timer.machine().driver_data<nitedrvr_state>(); | |
| 254 | ||
| 255 | if (state->m_crash_en && state->m_crash_data_en) | |
| 253 | if (m_crash_en && m_crash_data_en) | |
| 256 | 254 | { |
| 257 | state->m_crash_data--; | |
| 258 | address_space &space = timer.machine().driver_data()->generic_space(); | |
| 259 | discrete_sound_w(state->m_discrete, space, NITEDRVR_BANG_DATA, state->m_crash_data); // Crash Volume | |
| 260 | if (!state->m_crash_data) | |
| 261 | state->m_crash_data_en = 0; // Done counting? | |
| 255 | m_crash_data--; | |
| 256 | address_space &space = machine().driver_data()->generic_space(); | |
| 257 | discrete_sound_w(m_discrete, space, NITEDRVR_BANG_DATA, m_crash_data); // Crash Volume | |
| 258 | if (!m_crash_data) | |
| 259 | m_crash_data_en = 0; // Done counting? | |
| 262 | 260 | |
| 263 | if ( | |
| 261 | if (m_crash_data & 0x01) | |
| 264 | 262 | { |
| 265 | 263 | /* Invert video */ |
| 266 | palette_set_color(timer.machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */ | |
| 267 | palette_set_color(timer.machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */ | |
| 264 | palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */ | |
| 265 | palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */ | |
| 268 | 266 | } |
| 269 | 267 | else |
| 270 | 268 | { |
| 271 | 269 | /* Normal video */ |
| 272 | palette_set_color(timer.machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */ | |
| 273 | palette_set_color(timer.machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */ | |
| 270 | palette_set_color(machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */ | |
| 271 | palette_set_color(machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */ | |
| 274 | 272 | } |
| 275 | 273 | } |
| 276 | 274 | } |
| r18137 | r18138 | |
|---|---|---|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | |
| 37 | TIMER_DEVICE_CALLBACK( | |
| 37 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_state::balsente_interrupt_timer) | |
| 38 | 38 | { |
| 39 | balsente_state *state = timer.machine().driver_data<balsente_state>(); | |
| 40 | ||
| 41 | 39 | /* next interrupt after scanline 256 is scanline 64 */ |
| 42 | 40 | if (param == 256) |
| 43 | | |
| 41 | m_scanline_timer->adjust(machine().primary_screen->time_until_pos(64), 64); | |
| 44 | 42 | else |
| 45 | | |
| 43 | m_scanline_timer->adjust(machine().primary_screen->time_until_pos(param + 64), param + 64); | |
| 46 | 44 | |
| 47 | 45 | /* IRQ starts on scanline 0, 64, 128, etc. */ |
| 48 | | |
| 46 | machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, ASSERT_LINE); | |
| 49 | 47 | |
| 50 | 48 | /* it will turn off on the next HBLANK */ |
| 51 | | |
| 49 | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(param, BALSENTE_HBSTART), timer_expired_delegate(FUNC(balsente_state::irq_off),this)); | |
| 52 | 50 | |
| 53 | 51 | /* if this is Grudge Match, update the steering */ |
| 54 | if (state->m_grudge_steering_result & 0x80) | |
| 55 | update_grudge_steering(timer.machine()); | |
| 52 | if (m_grudge_steering_result & 0x80) | |
| 53 | update_grudge_steering(machine()); | |
| 56 | 54 | |
| 57 | 55 | /* if we're a shooter, we do a little more work */ |
| 58 | if ( | |
| 56 | if (m_shooter) | |
| 59 | 57 | { |
| 60 | 58 | UINT8 tempx, tempy; |
| 61 | 59 | |
| 62 | 60 | /* we latch the beam values on the first interrupt after VBLANK */ |
| 63 | 61 | if (param == 64) |
| 64 | 62 | { |
| 65 | state->m_shooter_x = timer.machine().root_device().ioport("FAKEX")->read(); | |
| 66 | state->m_shooter_y = timer.machine().root_device().ioport("FAKEY")->read(); | |
| 63 | m_shooter_x = machine().root_device().ioport("FAKEX")->read(); | |
| 64 | m_shooter_y = machine().root_device().ioport("FAKEY")->read(); | |
| 67 | 65 | } |
| 68 | 66 | |
| 69 | 67 | /* which bits get returned depends on which scanline we're at */ |
| 70 | tempx = state->m_shooter_x << ((param - 64) / 64); | |
| 71 | tempy = state->m_shooter_y << ((param - 64) / 64); | |
| 72 | state->m_nstocker_bits = ((tempx >> 4) & 0x08) | ((tempx >> 1) & 0x04) | | |
| 68 | tempx = m_shooter_x << ((param - 64) / 64); | |
| 69 | tempy = m_shooter_y << ((param - 64) / 64); | |
| 70 | m_nstocker_bits = ((tempx >> 4) & 0x08) | ((tempx >> 1) & 0x04) | | |
| 73 | 71 | ((tempy >> 6) & 0x02) | ((tempy >> 3) & 0x01); |
| 74 | 72 | } |
| 75 | 73 | } |
| r18137 | r18138 | |
| 721 | 719 | } |
| 722 | 720 | |
| 723 | 721 | |
| 724 | TIMER_DEVICE_CALLBACK( | |
| 722 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_state::balsente_counter_callback) | |
| 725 | 723 | { |
| 726 | balsente_state *state = timer.machine().driver_data<balsente_state>(); | |
| 727 | ||
| 728 | 724 | /* reset the counter and the count */ |
| 729 | state->m_counter[param].timer_active = 0; | |
| 730 | state->m_counter[param].count = 0; | |
| 725 | m_counter[param].timer_active = 0; | |
| 726 | m_counter[param].count = 0; | |
| 731 | 727 | |
| 732 | 728 | /* set the state of the OUT line */ |
| 733 | 729 | /* mode 0 and 1: when firing, transition OUT to high */ |
| 734 | if (state->m_counter[param].mode == 0 || state->m_counter[param].mode == 1) | |
| 735 | state->counter_set_out(param, 1); | |
| 730 | if (m_counter[param].mode == 0 || m_counter[param].mode == 1) | |
| 731 | counter_set_out(param, 1); | |
| 736 | 732 | |
| 737 | 733 | /* no other modes handled currently */ |
| 738 | 734 | } |
| r18137 | r18138 | |
| 867 | 863 | { |
| 868 | 864 | state->m_counter[0].count--; |
| 869 | 865 | if (state->m_counter[0].count == 0) |
| 870 | balsente_counter_callback( | |
| 866 | state->balsente_counter_callback(timer, NULL, 0); | |
| 871 | 867 | } |
| 872 | 868 | } |
| 873 | 869 | |
| r18137 | r18138 | |
| 876 | 872 | } |
| 877 | 873 | |
| 878 | 874 | |
| 879 | TIMER_DEVICE_CALLBACK( | |
| 875 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_state::balsente_clock_counter_0_ff) | |
| 880 | 876 | { |
| 881 | balsente_state *state = timer.machine().driver_data<balsente_state>(); | |
| 882 | ||
| 883 | 877 | /* clock the D value through the flip-flop */ |
| 884 | set_counter_0_ff(timer, ( | |
| 878 | set_counter_0_ff(timer, (m_counter_control >> 3) & 1); | |
| 885 | 879 | } |
| 886 | 880 | |
| 887 | 881 |
| r18137 | r18138 | |
|---|---|---|
| 16 | 16 | * |
| 17 | 17 | *************************************/ |
| 18 | 18 | |
| 19 | TIMER_DEVICE_CALLBACK( | |
| 19 | TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_state::mhavoc_cpu_irq_clock) | |
| 20 | 20 | { |
| 21 | mhavoc_state *state = timer.machine().driver_data<mhavoc_state>(); | |
| 22 | 21 | /* clock the LS161 driving the alpha CPU IRQ */ |
| 23 | if ( | |
| 22 | if (m_alpha_irq_clock_enable) | |
| 24 | 23 | { |
| 25 | state->m_alpha_irq_clock++; | |
| 26 | if ((state->m_alpha_irq_clock & 0x0c) == 0x0c) | |
| 24 | m_alpha_irq_clock++; | |
| 25 | if ((m_alpha_irq_clock & 0x0c) == 0x0c) | |
| 27 | 26 | { |
| 28 | timer.machine().device("alpha")->execute().set_input_line(0, ASSERT_LINE); | |
| 29 | state->m_alpha_irq_clock_enable = 0; | |
| 27 | machine().device("alpha")->execute().set_input_line(0, ASSERT_LINE); | |
| 28 | m_alpha_irq_clock_enable = 0; | |
| 30 | 29 | } |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 | /* clock the LS161 driving the gamma CPU IRQ */ |
| 34 | if ( | |
| 33 | if (m_has_gamma_cpu) | |
| 35 | 34 | { |
| 36 | state->m_gamma_irq_clock++; | |
| 37 | timer.machine().device("gamma")->execute().set_input_line(0, (state->m_gamma_irq_clock & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 35 | m_gamma_irq_clock++; | |
| 36 | machine().device("gamma")->execute().set_input_line(0, (m_gamma_irq_clock & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 38 | 37 | } |
| 39 | 38 | } |
| 40 | 39 |
| r18137 | r18138 | |
|---|---|---|
| 19 | 19 | bsktball_interrupt |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /* NMI every 32V, IRQ every VBLANK */ |
| 22 | TIMER_DEVICE_CALLBACK( | |
| 22 | TIMER_DEVICE_CALLBACK_MEMBER(bsktball_state::bsktball_scanline) | |
| 23 | 23 | { |
| 24 | bsktball_state *state = timer.machine().driver_data<bsktball_state>(); | |
| 25 | 24 | int scanline = param; |
| 26 | 25 | |
| 27 | 26 | if(scanline == 0) // vblank irq |
| 28 | timer.machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); | |
| 29 | else if(((scanline % 28) == 0) && (state->m_nmi_on)) // 32v timer irq | |
| 30 | timer.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 27 | machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE); | |
| 28 | else if(((scanline % 28) == 0) && (m_nmi_on)) // 32v timer irq | |
| 29 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 |
| r18137 | r18138 | |
|---|---|---|
| 182 | 182 | * |
| 183 | 183 | *************************************/ |
| 184 | 184 | |
| 185 | TIMER_DEVICE_CALLBACK( | |
| 185 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::mcr_interrupt) | |
| 186 | 186 | { |
| 187 | //mcr_state *state = timer.machine().driver_data<mcr_state>(); | |
| 188 | z80ctc_device *ctc = timer.machine().device<z80ctc_device>("ctc"); | |
| 187 | z80ctc_device *ctc = machine().device<z80ctc_device>("ctc"); | |
| 189 | 188 | int scanline = param; |
| 190 | 189 | |
| 191 | 190 | /* CTC line 2 is connected to VBLANK, which is once every 1/2 frame */ |
| r18137 | r18138 | |
| 205 | 204 | } |
| 206 | 205 | } |
| 207 | 206 | |
| 208 | TIMER_DEVICE_CALLBACK( | |
| 207 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_state::mcr_ipu_interrupt) | |
| 209 | 208 | { |
| 210 | //mcr_state *state = timer.machine().driver_data<mcr_state>(); | |
| 211 | z80ctc_device *ctc = timer.machine().device<z80ctc_device>("ctc"); | |
| 209 | z80ctc_device *ctc = machine().device<z80ctc_device>("ctc"); | |
| 212 | 210 | int scanline = param; |
| 213 | 211 | |
| 214 | 212 | /* CTC line 3 is connected to 493, which is signalled once every */ |
| r18137 | r18138 | |
|---|---|---|
| 90 | 90 | return data; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | TIMER_DEVICE_CALLBACK( | |
| 93 | TIMER_DEVICE_CALLBACK_MEMBER(decocass_state::decocass_audio_nmi_gen) | |
| 94 | 94 | { |
| 95 | decocass_state *state = timer.machine().driver_data<decocass_state>(); | |
| 96 | 95 | int scanline = param; |
| 97 | state->m_audio_nmi_state = scanline & 8; | |
| 98 | state->m_audiocpu->set_input_line(INPUT_LINE_NMI, (state->m_audio_nmi_enabled && state->m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 96 | m_audio_nmi_state = scanline & 8; | |
| 97 | m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_audio_nmi_enabled && m_audio_nmi_state) ? ASSERT_LINE : CLEAR_LINE); | |
| 99 | 98 | } |
| 100 | 99 | |
| 101 | 100 | WRITE8_MEMBER(decocass_state::decocass_sound_nmi_enable_w) |
| r18137 | r18138 | |
|---|---|---|
| 57 | 57 | virtual void machine_reset(); |
| 58 | 58 | virtual void palette_init(); |
| 59 | 59 | UINT32 screen_update_lazercmd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 60 | TIMER_DEVICE_CALLBACK_MEMBER(lazercmd_timer); | |
| 61 | TIMER_DEVICE_CALLBACK_MEMBER(bbonk_timer); | |
| 60 | 62 | }; |
| r18137 | r18138 | |
|---|---|---|
| 108 | 108 | DECLARE_VIDEO_START(jpmimpct); |
| 109 | 109 | DECLARE_MACHINE_START(impctawp); |
| 110 | 110 | DECLARE_MACHINE_RESET(impctawp); |
| 111 | TIMER_DEVICE_CALLBACK_MEMBER(duart_1_timer_event); | |
| 111 | 112 | }; |
| 112 | 113 | |
| 113 | 114 |
| r18137 | r18138 | |
|---|---|---|
| 108 | 108 | UINT32 screen_update_system2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 109 | 109 | UINT32 screen_update_system2_rowscroll(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 110 | 110 | INTERRUPT_GEN_MEMBER(mcu_irq_assert); |
| 111 | TIMER_DEVICE_CALLBACK_MEMBER(soundirq_gen); | |
| 112 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_t0_callback); | |
| 111 | 113 | }; |
| 112 | 114 | |
| 113 | 115 |
| r18137 | r18138 | |
|---|---|---|
| 57 | 57 | DECLARE_PALETTE_INIT(gberet); |
| 58 | 58 | UINT32 screen_update_gberet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 59 | 59 | UINT32 screen_update_gberetb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 60 | TIMER_DEVICE_CALLBACK_MEMBER(gberet_interrupt_tick); | |
| 60 | 61 | }; |
| r18137 | r18138 | |
|---|---|---|
| 61 | 61 | TIMER_CALLBACK_MEMBER(network_interrupt_callback); |
| 62 | 62 | TIMER_CALLBACK_MEMBER(vblank_interrupt_callback); |
| 63 | 63 | TIMER_CALLBACK_MEMBER(raster_interrupt_callback); |
| 64 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq0_cb); | |
| 65 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq2_cb); | |
| 66 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_adc_cb); | |
| 64 | 67 | }; |
| r18137 | r18138 | |
|---|---|---|
| 36 | 36 | virtual void video_start(); |
| 37 | 37 | virtual void palette_init(); |
| 38 | 38 | UINT32 screen_update_ikki(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | TIMER_DEVICE_CALLBACK_MEMBER(ikki_irq); | |
| 39 | 40 | }; |
| r18137 | r18138 | |
|---|---|---|
| 115 | 115 | DECLARE_READ32_MEMBER( hsync_ram_r ); |
| 116 | 116 | DECLARE_WRITE32_MEMBER( hsync_ram_w ); |
| 117 | 117 | DECLARE_DRIVER_INIT(beathead); |
| 118 | TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback); | |
| 118 | 119 | }; |
| r18137 | r18138 | |
|---|---|---|
| 50 | 50 | DECLARE_VIDEO_START(farwest); |
| 51 | 51 | UINT32 screen_update_ironhors(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | 52 | UINT32 screen_update_farwest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | TIMER_DEVICE_CALLBACK_MEMBER(ironhors_irq); | |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(farwest_irq); | |
| 53 | 55 | }; |
| r18137 | r18138 | |
|---|---|---|
| 73 | 73 | virtual void video_start(); |
| 74 | 74 | UINT32 screen_update_djboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 75 | 75 | void screen_eof_djboy(screen_device &screen, bool state); |
| 76 | TIMER_DEVICE_CALLBACK_MEMBER(djboy_scanline); | |
| 76 | 77 | }; |
| r18137 | r18138 | |
|---|---|---|
| 40 | 40 | UINT32 screen_update_robotbwl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 41 | 41 | UINT32 screen_update_crash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | 42 | UINT32 screen_update_ripcord(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 43 | TIMER_DEVICE_CALLBACK_MEMBER(crash_scanline); | |
| 43 | 44 | }; |
| 44 | 45 | /*----------- defined in audio/circus.c -----------*/ |
| 45 | 46 |
| r18137 | r18138 | |
|---|---|---|
| 79 | 79 | UINT32 screen_update_wecleman(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 80 | 80 | UINT32 screen_update_hotchase(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 81 | 81 | INTERRUPT_GEN_MEMBER(hotchase_sound_timer); |
| 82 | TIMER_DEVICE_CALLBACK_MEMBER(wecleman_scanline); | |
| 83 | TIMER_DEVICE_CALLBACK_MEMBER(hotchase_scanline); | |
| 82 | 84 | }; |
| 83 | 85 | |
| 84 | 86 | /*----------- defined in video/wecleman.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 60 | 60 | DECLARE_VIDEO_START(madgear); |
| 61 | 61 | UINT32 screen_update_lastduel(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 62 | 62 | UINT32 screen_update_madgear(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 63 | TIMER_DEVICE_CALLBACK_MEMBER(lastduel_timer_cb); | |
| 64 | TIMER_DEVICE_CALLBACK_MEMBER(madgear_timer_cb); | |
| 63 | 65 | }; |
| r18137 | r18138 | |
|---|---|---|
| 84 | 84 | UINT32 screen_update_scudhamm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 85 | 85 | UINT32 screen_update_cischeat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 86 | 86 | UINT32 screen_update_f1gpstar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 87 | TIMER_DEVICE_CALLBACK_MEMBER(bigrun_scanline); | |
| 88 | TIMER_DEVICE_CALLBACK_MEMBER(scudhamm_scanline); | |
| 89 | TIMER_DEVICE_CALLBACK_MEMBER(armchamp2_scanline); | |
| 87 | 90 | }; |
| r18137 | r18138 | |
|---|---|---|
| 259 | 259 | INTERRUPT_GEN_MEMBER(namcos22s_interrupt); |
| 260 | 260 | INTERRUPT_GEN_MEMBER(namcos22_interrupt); |
| 261 | 261 | TIMER_CALLBACK_MEMBER(alpine_steplock_callback); |
| 262 | TIMER_DEVICE_CALLBACK_MEMBER(dsp_master_serial_irq); | |
| 263 | TIMER_DEVICE_CALLBACK_MEMBER(dsp_slave_serial_irq); | |
| 264 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq); | |
| 262 | 265 | }; |
| 263 | 266 | |
| 264 | 267 | /*----------- defined in video/namcos22.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 182 | 182 | INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt); |
| 183 | 183 | TIMER_CALLBACK_MEMBER(stars_blink_callback); |
| 184 | 184 | TIMER_CALLBACK_MEMBER(stars_scroll_callback); |
| 185 | TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer); | |
| 185 | 186 | }; |
| 186 | 187 | |
| 187 | 188 | /*----------- defined in video/galaxold.c -----------*/ |
| r18137 | r18138 | |
| 190 | 191 | |
| 191 | 192 | /*----------- defined in machine/galaxold.c -----------*/ |
| 192 | 193 | |
| 193 | TIMER_DEVICE_CALLBACK( galaxold_interrupt_timer ); | |
| 194 | ||
| 195 | 194 | WRITE_LINE_DEVICE_HANDLER( galaxold_7474_9m_2_q_callback ); |
| 196 | 195 | WRITE_LINE_DEVICE_HANDLER( galaxold_7474_9m_1_callback ); |
| 197 | 196 |
| r18137 | r18138 | |
|---|---|---|
| 79 | 79 | UINT32 screen_update_bullsdrt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 80 | 80 | UINT32 screen_update_milliped(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 81 | 81 | UINT32 screen_update_warlords(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 82 | TIMER_DEVICE_CALLBACK_MEMBER(generate_interrupt); | |
| 82 | 83 | }; |
| r18137 | r18138 | |
|---|---|---|
| 65 | 65 | DECLARE_MACHINE_RESET(atarisy1); |
| 66 | 66 | DECLARE_VIDEO_START(atarisy1); |
| 67 | 67 | UINT32 screen_update_atarisy1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | TIMER_DEVICE_CALLBACK_MEMBER(delayed_joystick_int); | |
| 69 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_reset_yscroll_callback); | |
| 70 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3off_callback); | |
| 71 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3_callback); | |
| 68 | 72 | }; |
| 69 | 73 | |
| 70 | ||
| 71 | /*----------- defined in video/atarisy1.c -----------*/ | |
| 72 | ||
| 73 | TIMER_DEVICE_CALLBACK( atarisy1_int3_callback ); | |
| 74 | TIMER_DEVICE_CALLBACK( atarisy1_int3off_callback ); | |
| 75 | TIMER_DEVICE_CALLBACK( atarisy1_reset_yscroll_callback ); | |
| 76 | ||
| 77 | 74 | DECLARE_READ16_HANDLER( atarisy1_int3state_r ); |
| 78 | 75 | |
| 79 | 76 | DECLARE_WRITE16_HANDLER( atarisy1_spriteram_w ); |
| r18137 | r18138 | |
|---|---|---|
| 51 | 51 | virtual void machine_reset(); |
| 52 | 52 | virtual void video_start(); |
| 53 | 53 | UINT32 screen_update_dbz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(dbz_scanline); | |
| 54 | 55 | }; |
| 55 | 56 | |
| 56 | 57 | /*----------- defined in video/dbz.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 44 | 44 | virtual void video_start(); |
| 45 | 45 | UINT32 screen_update_shadfrce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 46 | 46 | void screen_eof_shadfrce(screen_device &screen, bool state); |
| 47 | TIMER_DEVICE_CALLBACK_MEMBER(shadfrce_scanline); | |
| 47 | 48 | }; |
| r18137 | r18138 | |
|---|---|---|
| 80 | 80 | DECLARE_VIDEO_START(polepos); |
| 81 | 81 | DECLARE_PALETTE_INIT(polepos); |
| 82 | 82 | UINT32 screen_update_polepos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 83 | TIMER_DEVICE_CALLBACK_MEMBER(polepos_scanline); | |
| 83 | 84 | }; |
| 84 | 85 | |
| 85 | 86 |
| r18137 | r18138 | |
|---|---|---|
| 41 | 41 | UINT32 screen_update_qdrmfgp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | 42 | INTERRUPT_GEN_MEMBER(qdrmfgp2_interrupt); |
| 43 | 43 | TIMER_CALLBACK_MEMBER(gp2_timer_callback); |
| 44 | TIMER_DEVICE_CALLBACK_MEMBER(qdrmfgp_interrupt); | |
| 44 | 45 | }; |
| 45 | 46 | |
| 46 | 47 | /*----------- defined in video/qdrmfgp.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 47 | 47 | virtual void video_start(); |
| 48 | 48 | virtual void palette_init(); |
| 49 | 49 | UINT32 screen_update_spdodgeb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 50 | TIMER_DEVICE_CALLBACK_MEMBER(spdodgeb_interrupt); | |
| 50 | 51 | }; |
| 51 | 52 | |
| 52 | TIMER_DEVICE_CALLBACK( spdodgeb_interrupt ); |
| r18137 | r18138 | |
|---|---|---|
| 201 | 201 | INTERRUPT_GEN_MEMBER(wrofaero_interrupt); |
| 202 | 202 | TIMER_CALLBACK_MEMBER(uPD71054_timer_callback); |
| 203 | 203 | TIMER_CALLBACK_MEMBER(keroppi_prize_hop_callback); |
| 204 | TIMER_DEVICE_CALLBACK_MEMBER(seta_interrupt_1_and_2); | |
| 205 | TIMER_DEVICE_CALLBACK_MEMBER(seta_interrupt_2_and_4); | |
| 206 | TIMER_DEVICE_CALLBACK_MEMBER(seta_sub_interrupt); | |
| 207 | TIMER_DEVICE_CALLBACK_MEMBER(tndrcade_sub_interrupt); | |
| 208 | TIMER_DEVICE_CALLBACK_MEMBER(calibr50_interrupt); | |
| 209 | TIMER_DEVICE_CALLBACK_MEMBER(setaroul_interrupt); | |
| 210 | TIMER_DEVICE_CALLBACK_MEMBER(crazyfgt_interrupt); | |
| 211 | TIMER_DEVICE_CALLBACK_MEMBER(inttoote_interrupt); | |
| 204 | 212 | }; |
| 205 | 213 | |
| 206 | 214 | /*----------- defined in video/seta.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 27 | 27 | virtual void video_start(); |
| 28 | 28 | virtual void palette_init(); |
| 29 | 29 | UINT32 screen_update_higemaru(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 30 | TIMER_DEVICE_CALLBACK_MEMBER(higemaru_scanline); | |
| 30 | 31 | }; |
| r18137 | r18138 | |
|---|---|---|
| 63 | 63 | virtual void machine_start(); |
| 64 | 64 | virtual void machine_reset(); |
| 65 | 65 | TIMER_CALLBACK_MEMBER(delayed_gamma_w); |
| 66 | TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_cpu_irq_clock); | |
| 66 | 67 | }; |
| 67 | 68 | |
| 68 | /*----------- defined in machine/mhavoc.c -----------*/ | |
| 69 | TIMER_DEVICE_CALLBACK( mhavoc_cpu_irq_clock ); |
| r18137 | r18138 | |
|---|---|---|
| 23 | 23 | TILE_GET_INFO_MEMBER(get_tile_info1); |
| 24 | 24 | virtual void video_start(); |
| 25 | 25 | UINT32 screen_update_hexion(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 26 | TIMER_DEVICE_CALLBACK_MEMBER(hexion_scanline); | |
| 26 | 27 | }; |
| r18137 | r18138 | |
|---|---|---|
| 40 | 40 | virtual void video_start(); |
| 41 | 41 | virtual void palette_init(); |
| 42 | 42 | UINT32 screen_update_1942(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 43 | TIMER_DEVICE_CALLBACK_MEMBER(c1942_scanline); | |
| 43 | 44 | }; |
| r18137 | r18138 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE8_MEMBER(sound_slave_dac_w); |
| 37 | 37 | virtual void palette_init(); |
| 38 | 38 | TIMER_CALLBACK_MEMBER(sound_delayed_w); |
| 39 | TIMER_DEVICE_CALLBACK_MEMBER(master_sound_nmi_callback); | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | /*----------- defined in video/exterm.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 68 | 68 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 69 | 69 | DECLARE_PALETTE_INIT(zodiack); |
| 70 | 70 | INTERRUPT_GEN_MEMBER(zodiack_sound_nmi_gen); |
| 71 | TIMER_DEVICE_CALLBACK_MEMBER(zodiack_scanline); | |
| 71 | 72 | }; |
| 72 | 73 | |
| 73 | 74 | class percuss_state : public zodiack_state |
| r18137 | r18138 | |
|---|---|---|
| 41 | 41 | DECLARE_WRITE8_MEMBER(battlera_adpcm_reset_w); |
| 42 | 42 | virtual void video_start(); |
| 43 | 43 | UINT32 screen_update_battlera(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 44 | TIMER_DEVICE_CALLBACK_MEMBER(battlera_irq); | |
| 44 | 45 | }; |
| 45 | ||
| 46 | /*----------- defined in video/battlera.c -----------*/ | |
| 47 | TIMER_DEVICE_CALLBACK( battlera_irq ); |
| r18137 | r18138 | |
|---|---|---|
| 69 | 69 | virtual void machine_start(); |
| 70 | 70 | virtual void video_start(); |
| 71 | 71 | UINT32 screen_update_xain(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 72 | TIMER_DEVICE_CALLBACK_MEMBER(xain_scanline); | |
| 72 | 73 | }; |
| r18137 | r18138 | |
|---|---|---|
| 42 | 42 | virtual void machine_reset(); |
| 43 | 43 | virtual void video_start(); |
| 44 | 44 | UINT32 screen_update_gundealr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | TIMER_DEVICE_CALLBACK_MEMBER(gundealr_scanline); | |
| 46 | TIMER_DEVICE_CALLBACK_MEMBER(yamyam_mcu_sim); | |
| 45 | 47 | }; |
| r18137 | r18138 | |
|---|---|---|
| 51 | 51 | virtual void machine_reset(); |
| 52 | 52 | virtual void video_start(); |
| 53 | 53 | UINT32 screen_update_bionicc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(bionicc_scanline); | |
| 54 | 55 | }; |
| r18137 | r18138 | |
|---|---|---|
| 73 | 73 | virtual void machine_reset(); |
| 74 | 74 | virtual void video_start(); |
| 75 | 75 | UINT32 screen_update_renegade(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 76 | TIMER_DEVICE_CALLBACK_MEMBER(renegade_interrupt); | |
| 76 | 77 | }; |
| r18137 | r18138 | |
|---|---|---|
| 116 | 116 | DECLARE_MACHINE_RESET(pgm); |
| 117 | 117 | UINT32 screen_update_pgm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 118 | 118 | void screen_eof_pgm(screen_device &screen, bool state); |
| 119 | TIMER_DEVICE_CALLBACK_MEMBER(pgm_interrupt); | |
| 119 | 120 | }; |
| 120 | 121 | |
| 121 | 122 | |
| r18137 | r18138 | |
| 317 | 318 | |
| 318 | 319 | INPUT_PORTS_EXTERN( pgm ); |
| 319 | 320 | |
| 320 | TIMER_DEVICE_CALLBACK( pgm_interrupt ); | |
| 321 | ||
| 322 | 321 | GFXDECODE_EXTERN( pgm ); |
| 323 | 322 | |
| 324 | 323 | MACHINE_CONFIG_EXTERN( pgm ); |
| r18137 | r18138 | |
|---|---|---|
| 30 | 30 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 31 | 31 | virtual void video_start(); |
| 32 | 32 | UINT32 screen_update_iqblock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 33 | TIMER_DEVICE_CALLBACK_MEMBER(iqblock_irq); | |
| 33 | 34 | }; |
| r18137 | r18138 | |
|---|---|---|
| 188 | 188 | virtual void video_start(); |
| 189 | 189 | UINT32 screen_update_hng64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 190 | 190 | void screen_eof_hng64(screen_device &screen, bool state); |
| 191 | TIMER_DEVICE_CALLBACK_MEMBER(hng64_irq); | |
| 191 | 192 | }; |
| 192 | 193 | |
| 193 | 194 | /*----------- defined in video/hng64.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 47 | 47 | DECLARE_VIDEO_RESET(bombsa); |
| 48 | 48 | UINT32 screen_update_psychic5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 49 | 49 | UINT32 screen_update_bombsa(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 50 | TIMER_DEVICE_CALLBACK_MEMBER(psychic5_scanline); | |
| 50 | 51 | }; |
| r18137 | r18138 | |
|---|---|---|
| 110 | 110 | UINT32 screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 111 | 111 | void screen_eof_captaven(screen_device &screen, bool state); |
| 112 | 112 | INTERRUPT_GEN_MEMBER(deco32_vbl_interrupt); |
| 113 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt_gen); | |
| 114 | TIMER_DEVICE_CALLBACK_MEMBER(lockload_vbl_irq); | |
| 113 | 115 | }; |
| 114 | 116 | |
| 115 | 117 | class dragngun_state : public deco32_state |
| r18137 | r18138 | |
|---|---|---|
| 35 | 35 | virtual void machine_reset(); |
| 36 | 36 | virtual void video_start(); |
| 37 | 37 | UINT32 screen_update_blockout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 38 | TIMER_DEVICE_CALLBACK_MEMBER(blockout_scanline); | |
| 38 | 39 | }; |
| r18137 | r18138 | |
|---|---|---|
| 70 | 70 | DECLARE_MACHINE_START(tomahawk); |
| 71 | 71 | UINT32 screen_update_astrof(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 72 | 72 | UINT32 screen_update_tomahawk(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 73 | TIMER_DEVICE_CALLBACK_MEMBER(irq_callback); | |
| 73 | 74 | }; |
| 74 | 75 | |
| 75 | 76 | /*----------- defined in audio/astrof.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 35 | 35 | UINT32 screen_update_polyplay(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 36 | 36 | INTERRUPT_GEN_MEMBER(periodic_interrupt); |
| 37 | 37 | INTERRUPT_GEN_MEMBER(coin_interrupt); |
| 38 | TIMER_DEVICE_CALLBACK_MEMBER(polyplay_timer_callback); | |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 |
| r18137 | r18138 | |
|---|---|---|
| 27 | 27 | virtual void video_start(); |
| 28 | 28 | virtual void palette_init(); |
| 29 | 29 | UINT32 screen_update_pingpong(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 30 | TIMER_DEVICE_CALLBACK_MEMBER(pingpong_interrupt); | |
| 31 | TIMER_DEVICE_CALLBACK_MEMBER(merlinmm_interrupt); | |
| 30 | 32 | }; |
| 31 | 33 |
| r18137 | r18138 | |
|---|---|---|
| 38 | 38 | UINT32 screen_update_sprint8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | 39 | void screen_eof_sprint8(screen_device &screen, bool state); |
| 40 | 40 | TIMER_CALLBACK_MEMBER(sprint8_collision_callback); |
| 41 | TIMER_DEVICE_CALLBACK_MEMBER(input_callback); | |
| 41 | 42 | }; |
| 42 | 43 | |
| 43 | 44 | /*----------- defined in drivers/sprint8.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 128 | 128 | UINT32 screen_update_ssv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 129 | 129 | UINT32 screen_update_gdfs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 130 | 130 | UINT32 screen_update_eaglshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 131 | TIMER_DEVICE_CALLBACK_MEMBER(ssv_interrupt); | |
| 132 | TIMER_DEVICE_CALLBACK_MEMBER(gdfs_interrupt); | |
| 131 | 133 | }; |
| 132 | 134 | |
| 133 | 135 | /*----------- defined in video/ssv.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 18 | 18 | DECLARE_DRIVER_INIT(beezer); |
| 19 | 19 | virtual void machine_start(); |
| 20 | 20 | UINT32 screen_update_beezer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 21 | TIMER_DEVICE_CALLBACK_MEMBER(beezer_interrupt); | |
| 21 | 22 | }; |
| 22 | 23 | |
| 23 | 24 | |
| r18137 | r18138 | |
| 60 | 61 | DECLARE_WRITE8_DEVICE_HANDLER( beezer_timer1_w ); |
| 61 | 62 | DECLARE_READ8_DEVICE_HANDLER( beezer_noise_r ); |
| 62 | 63 | |
| 63 | /*----------- defined in video/beezer.c -----------*/ | |
| 64 | 64 | |
| 65 | TIMER_DEVICE_CALLBACK( beezer_interrupt ); | |
| 66 |
| r18137 | r18138 | |
|---|---|---|
| 35 | 35 | virtual void machine_reset(); |
| 36 | 36 | virtual void palette_init(); |
| 37 | 37 | UINT32 screen_update_bladestl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 38 | TIMER_DEVICE_CALLBACK_MEMBER(bladestl_scanline); | |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 | /*----------- defined in video/bladestl.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 28 | 28 | virtual void machine_start(); |
| 29 | 29 | virtual void video_start(); |
| 30 | 30 | UINT32 screen_update_srumbler(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 31 | TIMER_DEVICE_CALLBACK_MEMBER(srumbler_interrupt); | |
| 31 | 32 | }; |
| r18137 | r18138 | |
|---|---|---|
| 44 | 44 | virtual void machine_reset(); |
| 45 | 45 | UINT32 screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 46 | 46 | INTERRUPT_GEN_MEMBER(cpuB_interrupt); |
| 47 | TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline); | |
| 47 | 48 | }; |
| 48 | 49 | |
| 49 | 50 | /*----------- defined in video/overdriv.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 53 | 53 | UINT32 screen_update_xmen6p_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | 54 | UINT32 screen_update_xmen6p_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | 55 | void screen_eof_xmen6p(screen_device &screen, bool state); |
| 56 | TIMER_DEVICE_CALLBACK_MEMBER(xmen_scanline); | |
| 56 | 57 | }; |
| 57 | 58 | |
| 58 | 59 | /*----------- defined in video/xmen.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 136 | 136 | DECLARE_MACHINE_RESET(model1_vr); |
| 137 | 137 | UINT32 screen_update_model1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 138 | 138 | void screen_eof_model1(screen_device &screen, bool state); |
| 139 | TIMER_DEVICE_CALLBACK_MEMBER(model1_interrupt); | |
| 139 | 140 | }; |
| 140 | 141 | |
| 141 | 142 |
| r18137 | r18138 | |
|---|---|---|
| 142 | 142 | UINT32 screen_update_bubl2000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 143 | 143 | void screen_eof_nmk(screen_device &screen, bool state); |
| 144 | 144 | void screen_eof_strahl(screen_device &screen, bool state); |
| 145 | TIMER_DEVICE_CALLBACK_MEMBER(tdragon_mcu_sim); | |
| 146 | TIMER_DEVICE_CALLBACK_MEMBER(hachamf_mcu_sim); | |
| 147 | TIMER_DEVICE_CALLBACK_MEMBER(nmk16_scanline); | |
| 148 | TIMER_DEVICE_CALLBACK_MEMBER(manybloc_scanline); | |
| 145 | 149 | }; |
| r18137 | r18138 | |
|---|---|---|
| 99 | 99 | TIMER_CALLBACK_MEMBER(behind_the_beam_update); |
| 100 | 100 | TIMER_CALLBACK_MEMBER(delayed_sound_data_w); |
| 101 | 101 | TIMER_CALLBACK_MEMBER(blitter_done); |
| 102 | TIMER_DEVICE_CALLBACK_MEMBER(grmatch_palette_update); | |
| 102 | 103 | }; |
| 103 | 104 | |
| 104 | 105 | |
| r18137 | r18138 | |
| 116 | 117 | DECLARE_READ8_HANDLER( slikshot_z80_control_r ); |
| 117 | 118 | DECLARE_WRITE8_HANDLER( slikshot_z80_control_w ); |
| 118 | 119 | |
| 119 | /*----------- defined in video/itech8.c -----------*/ | |
| 120 | TIMER_DEVICE_CALLBACK( grmatch_palette_update ); |
| r18137 | r18138 | |
|---|---|---|
| 87 | 87 | UINT32 screen_update_nemesis(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 88 | 88 | INTERRUPT_GEN_MEMBER(nemesis_interrupt); |
| 89 | 89 | INTERRUPT_GEN_MEMBER(blkpnthr_interrupt); |
| 90 | TIMER_DEVICE_CALLBACK_MEMBER(konamigt_interrupt); | |
| 91 | TIMER_DEVICE_CALLBACK_MEMBER(gx400_interrupt); | |
| 90 | 92 | }; |
| r18137 | r18138 | |
|---|---|---|
| 75 | 75 | UINT32 screen_update_magspot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 76 | 76 | UINT32 screen_update_devzone(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 77 | 77 | UINT32 screen_update_nomnlnd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 78 | TIMER_DEVICE_CALLBACK_MEMBER(panic_scanline); | |
| 78 | 79 | }; |
| r18137 | r18138 | |
|---|---|---|
| 50 | 50 | virtual void video_start(); |
| 51 | 51 | UINT32 screen_update_gradius3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | 52 | INTERRUPT_GEN_MEMBER(cpuA_interrupt); |
| 53 | TIMER_DEVICE_CALLBACK_MEMBER(gradius3_sub_scanline); | |
| 53 | 54 | }; |
| 54 | 55 | |
| 55 | 56 | /*----------- defined in video/gradius3.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 163 | 163 | DECLARE_MACHINE_RESET(model2_common); |
| 164 | 164 | DECLARE_MACHINE_RESET(model2_scsp); |
| 165 | 165 | UINT32 screen_update_model2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 166 | TIMER_DEVICE_CALLBACK_MEMBER(model2_timer_cb); | |
| 167 | TIMER_DEVICE_CALLBACK_MEMBER(model2_interrupt); | |
| 168 | TIMER_DEVICE_CALLBACK_MEMBER(model2c_interrupt); | |
| 166 | 169 | }; |
| 167 | 170 | |
| 168 | 171 | /*----------- defined in video/model2.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 223 | 223 | DECLARE_READ8_MEMBER(mirrorcolorram_r); |
| 224 | 224 | DECLARE_READ8_MEMBER(cdsteljn_input_r); |
| 225 | 225 | DECLARE_WRITE8_MEMBER(cdsteljn_mux_w); |
| 226 | TIMER_DEVICE_CALLBACK_MEMBER(decocass_audio_nmi_gen); | |
| 226 | 227 | private: |
| 227 | 228 | DECLARE_READ8_MEMBER(decocass_type1_latch_26_pass_3_inv_2_r); |
| 228 | 229 | DECLARE_READ8_MEMBER(decocass_type1_pass_136_r); |
| r18137 | r18138 | |
| 251 | 252 | UINT8 *missile_ram, int interleave); |
| 252 | 253 | }; |
| 253 | 254 | |
| 254 | TIMER_DEVICE_CALLBACK(decocass_audio_nmi_gen); |
| r18137 | r18138 | |
|---|---|---|
| 72 | 72 | UINT32 screen_update_dadandrn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 73 | 73 | UINT32 screen_update_martchmp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 74 | 74 | INTERRUPT_GEN_MEMBER(ddd_interrupt); |
| 75 | TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_interrupt); | |
| 76 | TIMER_DEVICE_CALLBACK_MEMBER(metamrph_interrupt); | |
| 77 | TIMER_DEVICE_CALLBACK_MEMBER(mchamp_interrupt); | |
| 75 | 78 | }; |
| r18137 | r18138 | |
|---|---|---|
| 131 | 131 | // internal state |
| 132 | 132 | UINT8 m_adc_select; |
| 133 | 133 | bool m_shadow; |
| 134 | TIMER_DEVICE_CALLBACK_MEMBER(hangon_irq); | |
| 134 | 135 | }; |
| r18137 | r18138 | |
|---|---|---|
| 81 | 81 | INTERRUPT_GEN_MEMBER(konamigx_vbinterrupt); |
| 82 | 82 | INTERRUPT_GEN_MEMBER(tms_sync); |
| 83 | 83 | TIMER_CALLBACK_MEMBER(dmaend_callback); |
| 84 | TIMER_DEVICE_CALLBACK_MEMBER(konamigx_hbinterrupt); | |
| 84 | 85 | }; |
| 85 | 86 | |
| 86 | 87 |
| r18137 | r18138 | |
|---|---|---|
| 32 | 32 | virtual void palette_init(); |
| 33 | 33 | UINT32 screen_update_sprcros2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 34 | 34 | INTERRUPT_GEN_MEMBER(sprcros2_s_interrupt); |
| 35 | TIMER_DEVICE_CALLBACK_MEMBER(sprcros2_m_interrupt); | |
| 35 | 36 | }; |
| r18137 | r18138 | |
|---|---|---|
| 53 | 53 | DECLARE_VIDEO_START(netwars); |
| 54 | 54 | UINT32 screen_update_espial(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | 55 | INTERRUPT_GEN_MEMBER(espial_sound_nmi_gen); |
| 56 | TIMER_DEVICE_CALLBACK_MEMBER(espial_scanline); | |
| 56 | 57 | }; |
| r18137 | r18138 | |
|---|---|---|
| 46 | 46 | UINT32 screen_update_orbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 47 | 47 | INTERRUPT_GEN_MEMBER(orbit_interrupt); |
| 48 | 48 | TIMER_CALLBACK_MEMBER(irq_off); |
| 49 | TIMER_DEVICE_CALLBACK_MEMBER(nmi_32v); | |
| 49 | 50 | }; |
| 50 | 51 | /*----------- defined in audio/orbit.c -----------*/ |
| 51 | 52 | DECLARE_WRITE8_DEVICE_HANDLER( orbit_note_w ); |
| r18137 | r18138 | |
|---|---|---|
| 74 | 74 | INTERRUPT_GEN_MEMBER(seta2_interrupt); |
| 75 | 75 | INTERRUPT_GEN_MEMBER(samshoot_interrupt); |
| 76 | 76 | INTERRUPT_GEN_MEMBER(funcube_sub_timer_irq); |
| 77 | TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt); | |
| 77 | 78 | }; |
| r18137 | r18138 | |
|---|---|---|
| 199 | 199 | DECLARE_MACHINE_RESET(model3_21); |
| 200 | 200 | UINT32 screen_update_model3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 201 | 201 | TIMER_CALLBACK_MEMBER(model3_sound_timer_tick); |
| 202 | TIMER_DEVICE_CALLBACK_MEMBER(model3_interrupt); | |
| 202 | 203 | }; |
| 203 | 204 | |
| 204 | 205 |
| r18137 | r18138 | |
|---|---|---|
| 483 | 483 | INTERRUPT_GEN_MEMBER(hginga_irq); |
| 484 | 484 | INTERRUPT_GEN_MEMBER(mjflove_irq); |
| 485 | 485 | INTERRUPT_GEN_MEMBER(hparadis_irq); |
| 486 | TIMER_DEVICE_CALLBACK_MEMBER(neruton_irq_scanline); | |
| 487 | TIMER_DEVICE_CALLBACK_MEMBER(majxtal7_vblank_interrupt); | |
| 488 | TIMER_DEVICE_CALLBACK_MEMBER(tenkai_interrupt); | |
| 486 | 489 | }; |
| 487 | 490 | |
| 488 | 491 | //----------- defined in drivers/dynax.c ----------- |
| r18137 | r18138 | |
|---|---|---|
| 49 | 49 | virtual void video_start(); |
| 50 | 50 | virtual void palette_init(); |
| 51 | 51 | UINT32 screen_update_fastlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | TIMER_DEVICE_CALLBACK_MEMBER(fastlane_scanline); | |
| 52 | 53 | }; |
| r18137 | r18138 | |
|---|---|---|
| 39 | 39 | DECLARE_VIDEO_START(st0016); |
| 40 | 40 | void st0016_draw_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 41 | 41 | UINT32 screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | TIMER_DEVICE_CALLBACK_MEMBER(st0016_int); | |
| 42 | 43 | }; |
| 43 | 44 | |
| 44 | 45 | #define ISMACS (st0016_game&0x80) |
| r18137 | r18138 | |
|---|---|---|
| 45 | 45 | virtual void machine_start(); |
| 46 | 46 | virtual void machine_reset(); |
| 47 | 47 | UINT32 screen_update_mrflea(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 48 | TIMER_DEVICE_CALLBACK_MEMBER(mrflea_slave_interrupt); | |
| 48 | 49 | }; |
| r18137 | r18138 | |
|---|---|---|
| 44 | 44 | virtual void video_start(); |
| 45 | 45 | DECLARE_VIDEO_START(wwfwfstb); |
| 46 | 46 | UINT32 screen_update_wwfwfest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 47 | TIMER_DEVICE_CALLBACK_MEMBER(wwfwfest_scanline); | |
| 47 | 48 | }; |
| r18137 | r18138 | |
|---|---|---|
| 83 | 83 | UINT32 screen_update_argus(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 84 | 84 | UINT32 screen_update_valtric(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 85 | 85 | UINT32 screen_update_butasan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 86 | TIMER_DEVICE_CALLBACK_MEMBER(argus_scanline); | |
| 87 | TIMER_DEVICE_CALLBACK_MEMBER(butasan_scanline); | |
| 86 | 88 | }; |
| r18137 | r18138 | |
|---|---|---|
| 63 | 63 | UINT32 screen_update_snk6502(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 64 | 64 | INTERRUPT_GEN_MEMBER(satansat_interrupt); |
| 65 | 65 | INTERRUPT_GEN_MEMBER(snk6502_interrupt); |
| 66 | TIMER_DEVICE_CALLBACK_MEMBER(sasuke_update_counter); | |
| 66 | 67 | }; |
| 67 | 68 | |
| 68 | 69 |
| r18137 | r18138 | |
|---|---|---|
| 18 | 18 | m107_state(const machine_config &mconfig, device_type type, const char *tag) |
| 19 | 19 | : driver_device(mconfig, type, tag), |
| 20 | 20 | m_spriteram(*this, "spriteram"), |
| 21 | m_vram_data(*this, "vram_data") { } | |
| 21 | m_vram_data(*this, "vram_data"), | |
| 22 | m_maincpu(*this, "maincpu") { } | |
| 22 | 23 | |
| 23 | 24 | required_shared_ptr<UINT16> m_spriteram; |
| 24 | 25 | required_shared_ptr<UINT16> m_vram_data; |
| 26 | required_device<cpu_device> m_maincpu; | |
| 25 | 27 | |
| 26 | 28 | UINT8 m_irq_vectorbase; |
| 27 | 29 | int m_sound_status; |
| r18137 | r18138 | |
| 50 | 52 | virtual void machine_start(); |
| 51 | 53 | virtual void video_start(); |
| 52 | 54 | UINT32 screen_update_m107(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | TIMER_DEVICE_CALLBACK_MEMBER(m107_scanline_interrupt); | |
| 53 | 56 | }; |
| r18137 | r18138 | |
|---|---|---|
| 113 | 113 | UINT32 screen_update_megasys1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 114 | 114 | void screen_eof_megasys1(screen_device &screen, bool state); |
| 115 | 115 | INTERRUPT_GEN_MEMBER(megasys1D_irq); |
| 116 | TIMER_DEVICE_CALLBACK_MEMBER(megasys1A_scanline); | |
| 117 | TIMER_DEVICE_CALLBACK_MEMBER(megasys1B_scanline); | |
| 116 | 118 | }; |
| r18137 | r18138 | |
|---|---|---|
| 69 | 69 | UINT32 screen_update_airbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 70 | 70 | void screen_eof_airbustr(screen_device &screen, bool state); |
| 71 | 71 | INTERRUPT_GEN_MEMBER(slave_interrupt); |
| 72 | TIMER_DEVICE_CALLBACK_MEMBER(airbustr_scanline); | |
| 72 | 73 | }; |
| r18137 | r18138 | |
|---|---|---|
| 36 | 36 | DECLARE_MACHINE_RESET(foodf); |
| 37 | 37 | DECLARE_VIDEO_START(foodf); |
| 38 | 38 | UINT32 screen_update_foodf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 39 | TIMER_DEVICE_CALLBACK_MEMBER(scanline_update); | |
| 39 | 40 | }; |
| r18137 | r18138 | |
|---|---|---|
| 203 | 203 | UINT32 screen_update_cave(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 204 | 204 | INTERRUPT_GEN_MEMBER(cave_interrupt); |
| 205 | 205 | TIMER_CALLBACK_MEMBER(cave_vblank_end); |
| 206 | TIMER_DEVICE_CALLBACK_MEMBER(cave_vblank_start); | |
| 206 | 207 | }; |
| 207 | 208 | |
| 208 | 209 | /*----------- defined in video/cave.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 51 | 51 | virtual void palette_init(); |
| 52 | 52 | UINT32 screen_update_thedeep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | INTERRUPT_GEN_MEMBER(thedeep_mcu_irq); |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(thedeep_interrupt); | |
| 54 | 55 | }; |
| r18137 | r18138 | |
|---|---|---|
| 112 | 112 | TIMER_CALLBACK_MEMBER(williams_deferred_snd_cmd_w); |
| 113 | 113 | TIMER_CALLBACK_MEMBER(blaster_deferred_snd_cmd_w); |
| 114 | 114 | TIMER_CALLBACK_MEMBER(williams2_deferred_snd_cmd_w); |
| 115 | TIMER_DEVICE_CALLBACK_MEMBER(williams_va11_callback); | |
| 116 | TIMER_DEVICE_CALLBACK_MEMBER(williams_count240_callback); | |
| 117 | TIMER_DEVICE_CALLBACK_MEMBER(williams2_va11_callback); | |
| 118 | TIMER_DEVICE_CALLBACK_MEMBER(williams2_endscreen_callback); | |
| 115 | 119 | }; |
| 116 | 120 | |
| 117 | 121 | |
| r18137 | r18138 | |
| 165 | 169 | extern const pia6821_interface tshoot_snd_pia_intf; |
| 166 | 170 | extern const pia6821_interface joust2_pia_1_intf; |
| 167 | 171 | |
| 168 | /* timer callbacks */ | |
| 169 | TIMER_DEVICE_CALLBACK( williams_va11_callback ); | |
| 170 | TIMER_DEVICE_CALLBACK( williams_count240_callback ); | |
| 171 | TIMER_DEVICE_CALLBACK( williams2_va11_callback ); | |
| 172 | TIMER_DEVICE_CALLBACK( williams2_endscreen_callback ); | |
| 173 | ||
| 174 | 172 | /*----------- defined in video/williams.c -----------*/ |
| 175 | 173 | |
| 176 | 174 | #define WILLIAMS_BLITTER_NONE 0 /* no blitter */ |
| r18137 | r18138 | |
|---|---|---|
| 91 | 91 | UINT32 screen_update_changela(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 92 | 92 | INTERRUPT_GEN_MEMBER(chl_mcu_irq); |
| 93 | 93 | TIMER_CALLBACK_MEMBER(changela_scanline_callback); |
| 94 | TIMER_DEVICE_CALLBACK_MEMBER(changela_scanline); | |
| 94 | 95 | }; |
| r18137 | r18138 | |
|---|---|---|
| 38 | 38 | DECLARE_MACHINE_RESET(uballoon); |
| 39 | 39 | UINT32 screen_update_suna16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 40 | 40 | UINT32 screen_update_bestbest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 41 | TIMER_DEVICE_CALLBACK_MEMBER(bssoccer_interrupt); | |
| 41 | 42 | }; |
| r18137 | r18138 | |
|---|---|---|
| 28 | 28 | virtual void video_start(); |
| 29 | 29 | virtual void palette_init(); |
| 30 | 30 | UINT32 screen_update_darkmist(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 31 | TIMER_DEVICE_CALLBACK_MEMBER(darkmist_scanline); | |
| 31 | 32 | }; |
| r18137 | r18138 | |
|---|---|---|
| 57 | 57 | virtual void machine_reset(); |
| 58 | 58 | virtual void video_start(); |
| 59 | 59 | UINT32 screen_update_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 60 | TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_crash_toggle_callback); | |
| 60 | 61 | }; |
| 61 | 62 | |
| 62 | /*----------- defined in machine/nitedrvr.c -----------*/ | |
| 63 | TIMER_DEVICE_CALLBACK( nitedrvr_crash_toggle_callback ); | |
| 64 | ||
| 65 | 63 | /*----------- defined in audio/nitedrvr.c -----------*/ |
| 66 | 64 | DISCRETE_SOUND_EXTERN( nitedrvr ); |
| r18137 | r18138 | |
|---|---|---|
| 104 | 104 | DECLARE_VIDEO_START(suna8_textdim0); |
| 105 | 105 | DECLARE_MACHINE_RESET(hardhea2); |
| 106 | 106 | UINT32 screen_update_suna8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 107 | TIMER_DEVICE_CALLBACK_MEMBER(brickzn_interrupt); | |
| 108 | TIMER_DEVICE_CALLBACK_MEMBER(hardhea2_interrupt); | |
| 107 | 109 | }; |
| 108 | 110 | |
| 109 | 111 | /*----------- defined in audio/suna8.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 114 | 114 | UINT32 screen_update_bnj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 115 | 115 | UINT32 screen_update_zoar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 116 | 116 | UINT32 screen_update_disco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 117 | TIMER_DEVICE_CALLBACK_MEMBER(audio_nmi_gen); | |
| 117 | 118 | }; |
| r18137 | r18138 | |
|---|---|---|
| 103 | 103 | DECLARE_MACHINE_RESET(mitchell); |
| 104 | 104 | DECLARE_VIDEO_START(pang); |
| 105 | 105 | UINT32 screen_update_pang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 106 | TIMER_DEVICE_CALLBACK_MEMBER(mitchell_irq); | |
| 106 | 107 | }; |
| r18137 | r18138 | |
|---|---|---|
| 38 | 38 | DECLARE_VIDEO_START(mlc); |
| 39 | 39 | UINT32 screen_update_mlc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 40 | 40 | void screen_eof_mlc(screen_device &screen, bool state); |
| 41 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt_gen); | |
| 41 | 42 | }; |
| r18137 | r18138 | |
|---|---|---|
| 180 | 180 | INTERRUPT_GEN_MEMBER(start_of_vblank_int); |
| 181 | 181 | TIMER_CALLBACK_MEMBER(end_of_vblank_int); |
| 182 | 182 | TIMER_CALLBACK_MEMBER(update_sprites); |
| 183 | TIMER_DEVICE_CALLBACK_MEMBER(signal_v60_irq_callback); | |
| 183 | 184 | }; |
| 184 | 185 | |
| 185 | 186 | /*----------- defined in machine/segas32.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 49 | 49 | UINT32 screen_update_snowbro3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 50 | 50 | UINT32 screen_update_wintbob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 51 | void screen_eof_snowbros(screen_device &screen, bool state); |
| 52 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros_irq); | |
| 53 | TIMER_DEVICE_CALLBACK_MEMBER(snowbros3_irq); | |
| 52 | 54 | }; |
| r18137 | r18138 | |
|---|---|---|
| 108 | 108 | UINT32 screen_update_splndrbt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 109 | 109 | TIMER_CALLBACK_MEMBER(equites_nmi_callback); |
| 110 | 110 | TIMER_CALLBACK_MEMBER(equites_frq_adjuster_callback); |
| 111 | TIMER_DEVICE_CALLBACK_MEMBER(equites_scanline); | |
| 112 | TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline); | |
| 111 | 113 | }; |
| r18137 | r18138 | |
|---|---|---|
| 51 | 51 | virtual void video_start(); |
| 52 | 52 | virtual void palette_init(); |
| 53 | 53 | UINT32 screen_update_galpani2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | TIMER_DEVICE_CALLBACK_MEMBER(galpani2_interrupt1); | |
| 55 | TIMER_DEVICE_CALLBACK_MEMBER(galpani2_interrupt2); | |
| 54 | 56 | }; |
| 55 | 57 | |
| 56 | 58 |
| r18137 | r18138 | |
|---|---|---|
| 49 | 49 | virtual void video_start(); |
| 50 | 50 | UINT32 screen_update_ddragon3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 51 | UINT32 screen_update_ctribe(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | TIMER_DEVICE_CALLBACK_MEMBER(ddragon3_scanline); | |
| 52 | 53 | }; |
| r18137 | r18138 | |
|---|---|---|
| 113 | 113 | virtual void machine_start(); |
| 114 | 114 | virtual void machine_reset(); |
| 115 | 115 | UINT32 screen_update_system24(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 116 | TIMER_DEVICE_CALLBACK_MEMBER(irq_timer_cb); | |
| 117 | TIMER_DEVICE_CALLBACK_MEMBER(irq_timer_clear_cb); | |
| 118 | TIMER_DEVICE_CALLBACK_MEMBER(irq_frc_cb); | |
| 119 | TIMER_DEVICE_CALLBACK_MEMBER(irq_vbl); | |
| 116 | 120 | }; |
| r18137 | r18138 | |
|---|---|---|
| 54 | 54 | virtual void video_start(); |
| 55 | 55 | virtual void palette_init(); |
| 56 | 56 | UINT32 screen_update_dragrace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 57 | TIMER_DEVICE_CALLBACK_MEMBER(dragrace_frame_callback); | |
| 57 | 58 | }; |
| 58 | 59 | |
| 59 | 60 | /*----------- defined in audio/dragrace.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 59 | 59 | DECLARE_MACHINE_RESET(amerdart); |
| 60 | 60 | DECLARE_MACHINE_RESET(coolpool); |
| 61 | 61 | TIMER_CALLBACK_MEMBER(deferred_iop_w); |
| 62 | TIMER_DEVICE_CALLBACK_MEMBER(nvram_write_timeout); | |
| 63 | TIMER_DEVICE_CALLBACK_MEMBER(amerdart_audio_int_gen); | |
| 62 | 64 | }; |
| r18137 | r18138 | |
|---|---|---|
| 49 | 49 | virtual void video_start(); |
| 50 | 50 | virtual void palette_init(); |
| 51 | 51 | UINT32 screen_update_exedexes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | TIMER_DEVICE_CALLBACK_MEMBER(exedexes_scanline); | |
| 52 | 53 | }; |
| r18137 | r18138 | |
|---|---|---|
| 136 | 136 | DECLARE_MACHINE_RESET(sknsk); |
| 137 | 137 | UINT32 screen_update_skns(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 138 | 138 | void screen_eof_skns(screen_device &screen, bool state); |
| 139 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt_callback); | |
| 140 | TIMER_DEVICE_CALLBACK_MEMBER(skns_irq); | |
| 139 | 141 | }; |
| 140 | 142 | |
| 141 | 143 | /*----------- defined in video/suprnova.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 100 | 100 | DECLARE_MACHINE_RESET(ddragon); |
| 101 | 101 | DECLARE_VIDEO_START(ddragon); |
| 102 | 102 | UINT32 screen_update_ddragon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 103 | TIMER_DEVICE_CALLBACK_MEMBER(ddragon_scanline); | |
| 103 | 104 | }; |
| r18137 | r18138 | |
|---|---|---|
| 106 | 106 | UINT32 screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 107 | 107 | |
| 108 | 108 | INTERRUPT_GEN_MEMBER(polaris_interrupt); |
| 109 | TIMER_DEVICE_CALLBACK_MEMBER(claybust_gun_callback); | |
| 110 | TIMER_DEVICE_CALLBACK_MEMBER(schaser_effect_555_cb); | |
| 109 | 111 | }; |
| 110 | 112 | |
| 111 | 113 | |
| r18137 | r18138 | |
| 122 | 124 | |
| 123 | 125 | extern const sn76477_interface schaser_sn76477_interface; |
| 124 | 126 | DISCRETE_SOUND_EXTERN( schaser ); |
| 125 | ||
| 127 |
| r18137 | r18138 | |
|---|---|---|
| 121 | 121 | DECLARE_MACHINE_RESET(cachat); |
| 122 | 122 | UINT32 screen_update_taitol(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 123 | 123 | void screen_eof_taitol(screen_device &screen, bool state); |
| 124 | TIMER_DEVICE_CALLBACK_MEMBER(vbl_interrupt); | |
| 124 | 125 | }; |
| 125 | 126 | |
| 126 | 127 | /*----------- defined in video/taito_l.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 198 | 198 | TIMER_CALLBACK_MEMBER(m6850_data_ready_callback); |
| 199 | 199 | TIMER_CALLBACK_MEMBER(m6850_w_callback); |
| 200 | 200 | TIMER_CALLBACK_MEMBER(adc_finished); |
| 201 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_interrupt_timer); | |
| 202 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_counter_callback); | |
| 203 | TIMER_DEVICE_CALLBACK_MEMBER(balsente_clock_counter_0_ff); | |
| 201 | 204 | }; |
| 202 | 205 | |
| 203 | 206 | |
| 204 | 207 | /*----------- defined in machine/balsente.c -----------*/ |
| 205 | ||
| 206 | TIMER_DEVICE_CALLBACK( balsente_interrupt_timer ); | |
| 207 | ||
| 208 | 208 | void balsente_noise_gen(device_t *device, int count, short *buffer); |
| 209 | ||
| 210 | TIMER_DEVICE_CALLBACK( balsente_counter_callback ); | |
| 211 | ||
| 212 | TIMER_DEVICE_CALLBACK( balsente_clock_counter_0_ff ); | |
| 213 |
| r18137 | r18138 | |
|---|---|---|
| 66 | 66 | virtual void video_start(); |
| 67 | 67 | UINT32 screen_update_xexex(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 68 | 68 | TIMER_CALLBACK_MEMBER(dmaend_callback); |
| 69 | TIMER_DEVICE_CALLBACK_MEMBER(xexex_interrupt); | |
| 69 | 70 | }; |
| 70 | 71 | |
| 71 | 72 | /*----------- defined in video/xexex.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 70 | 70 | UINT32 screen_update_edrandy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 71 | 71 | UINT32 screen_update_robocop2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 72 | 72 | UINT32 screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 73 | TIMER_DEVICE_CALLBACK_MEMBER(interrupt_gen); | |
| 73 | 74 | }; |
| r18137 | r18138 | |
|---|---|---|
| 78 | 78 | UINT32 screen_update_m92(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 79 | 79 | UINT32 screen_update_ppan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 80 | 80 | TIMER_CALLBACK_MEMBER(spritebuffer_callback); |
| 81 | TIMER_DEVICE_CALLBACK_MEMBER(m92_scanline_interrupt); | |
| 81 | 82 | }; |
| 82 | 83 | |
| 83 | 84 | /*----------- defined in drivers/m92.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 52 | 52 | UINT32 screen_update_gaelco2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 53 | 53 | UINT32 screen_update_gaelco2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | 54 | UINT32 screen_update_gaelco2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | TIMER_DEVICE_CALLBACK_MEMBER(bang_irq); | |
| 55 | 56 | }; |
| 56 | 57 | |
| 57 | 58 | |
| 58 | 59 | /*----------- defined in machine/gaelco2.c -----------*/ |
| 59 | 60 | |
| 60 | TIMER_DEVICE_CALLBACK( bang_irq ); | |
| 61 | 61 | DECLARE_WRITE16_DEVICE_HANDLER( gaelco2_eeprom_cs_w ); |
| 62 | 62 | DECLARE_WRITE16_DEVICE_HANDLER( gaelco2_eeprom_sk_w ); |
| 63 | 63 | DECLARE_WRITE16_DEVICE_HANDLER( gaelco2_eeprom_data_w ); |
| r18137 | r18138 | |
|---|---|---|
| 54 | 54 | virtual void video_start(); |
| 55 | 55 | virtual void palette_init(); |
| 56 | 56 | UINT32 screen_update_finalizr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 57 | TIMER_DEVICE_CALLBACK_MEMBER(finalizr_scanline); | |
| 57 | 58 | }; |
| r18137 | r18138 | |
|---|---|---|
| 27 | 27 | UINT32 screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 28 | 28 | UINT32 screen_update_comad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 29 | 29 | void screen_eof_galpanic(screen_device &screen, bool state); |
| 30 | TIMER_DEVICE_CALLBACK_MEMBER(galpanic_scanline); | |
| 31 | TIMER_DEVICE_CALLBACK_MEMBER(galhustl_scanline); | |
| 30 | 32 | }; |
| 31 | 33 | |
| 32 | 34 | /*----------- defined in video/galpanic.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 102 | 102 | DECLARE_MACHINE_START(nflfoot); |
| 103 | 103 | UINT32 screen_update_mcr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 104 | 104 | TIMER_CALLBACK_MEMBER(ipu_watchdog_reset); |
| 105 | TIMER_DEVICE_CALLBACK_MEMBER(dpoker_hopper_callback); | |
| 106 | TIMER_DEVICE_CALLBACK_MEMBER(dpoker_coin_in_callback); | |
| 107 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_interrupt); | |
| 108 | TIMER_DEVICE_CALLBACK_MEMBER(mcr_ipu_interrupt); | |
| 105 | 109 | }; |
| 106 | 110 | |
| 107 | 111 | |
| r18137 | r18138 | |
| 126 | 130 | extern UINT32 mcr_cpu_board; |
| 127 | 131 | extern UINT32 mcr_sprite_board; |
| 128 | 132 | |
| 129 | TIMER_DEVICE_CALLBACK( mcr_interrupt ); | |
| 130 | TIMER_DEVICE_CALLBACK( mcr_ipu_interrupt ); | |
| 131 | ||
| 132 | 133 | /*----------- defined in video/mcr.c -----------*/ |
| 133 | 134 | |
| 134 | 135 | extern INT8 mcr12_sprite_xoffs; |
| r18137 | r18138 | |
|---|---|---|
| 111 | 111 | virtual void machine_reset(); |
| 112 | 112 | virtual void video_start(); |
| 113 | 113 | UINT32 screen_update_namcona1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 114 | TIMER_DEVICE_CALLBACK_MEMBER(namcona1_interrupt); | |
| 115 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_interrupt); | |
| 114 | 116 | }; |
| r18137 | r18138 | |
|---|---|---|
| 56 | 56 | virtual void video_start(); |
| 57 | 57 | virtual void palette_init(); |
| 58 | 58 | UINT32 screen_update_bsktball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 59 | TIMER_DEVICE_CALLBACK_MEMBER(bsktball_scanline); | |
| 59 | 60 | }; |
| 60 | 61 | |
| 61 | /*----------- defined in machine/bsktball.c -----------*/ | |
| 62 | ||
| 63 | TIMER_DEVICE_CALLBACK( bsktball_scanline ); | |
| 64 | ||
| 65 | 62 | /*----------- defined in audio/bsktball.c -----------*/ |
| 66 | 63 | |
| 67 | 64 | DECLARE_WRITE8_DEVICE_HANDLER( bsktball_bounce_w ); |
| r18137 | r18138 | |
|---|---|---|
| 44 | 44 | virtual void machine_reset(); |
| 45 | 45 | virtual void video_start(); |
| 46 | 46 | UINT32 screen_update_chqflag(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 47 | TIMER_DEVICE_CALLBACK_MEMBER(chqflag_scanline); | |
| 47 | 48 | }; |
| 48 | 49 | |
| 49 | 50 | /*----------- defined in video/chqflag.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 87 | 87 | UINT32 screen_update_primella(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 88 | 88 | UINT32 screen_update_rshark(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 89 | 89 | UINT32 screen_update_popbingo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 90 | TIMER_DEVICE_CALLBACK_MEMBER(rshark_scanline); | |
| 90 | 91 | }; |
| r18137 | r18138 | |
|---|---|---|
| 65 | 65 | DECLARE_MACHINE_RESET(mgcrystl); |
| 66 | 66 | UINT32 screen_update_kaneko16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 67 | 67 | UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_interrupt); | |
| 69 | TIMER_DEVICE_CALLBACK_MEMBER(shogwarr_interrupt); | |
| 68 | 70 | }; |
| 69 | 71 | |
| 70 | 72 | class kaneko16_gtmr_state : public kaneko16_state |
| r18137 | r18138 | |
|---|---|---|
| 88 | 88 | virtual void video_start(); |
| 89 | 89 | DECLARE_VIDEO_START(f1superb); |
| 90 | 90 | UINT32 screen_update_ms32(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 91 | TIMER_DEVICE_CALLBACK_MEMBER(ms32_interrupt); | |
| 91 | 92 | }; |
| r18137 | r18138 | |
|---|---|---|
| 27 | 27 | TILE_GET_INFO_MEMBER(get_bg0_tile_info); |
| 28 | 28 | virtual void video_start(); |
| 29 | 29 | UINT32 screen_update_wwfsstar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 30 | TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_scanline); | |
| 30 | 31 | }; |
| r18137 | r18138 | |
|---|---|---|
| 146 | 146 | void screen_eof_phantom2(screen_device &screen, bool state); |
| 147 | 147 | TIMER_CALLBACK_MEMBER(maze_tone_timing_timer_callback); |
| 148 | 148 | TIMER_CALLBACK_MEMBER(mw8080bw_interrupt_callback); |
| 149 | TIMER_DEVICE_CALLBACK_MEMBER(spcenctr_strobe_timer_callback); | |
| 149 | 150 | }; |
| 150 | 151 | |
| 151 | 152 |
| r18137 | r18138 | |
|---|---|---|
| 21 | 21 | TILE_GET_INFO_MEMBER(get_tile_info_targeth_screen1); |
| 22 | 22 | virtual void video_start(); |
| 23 | 23 | UINT32 screen_update_targeth(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 24 | TIMER_DEVICE_CALLBACK_MEMBER(targeth_interrupt); | |
| 24 | 25 | }; |
| r18137 | r18138 | |
|---|---|---|
| 82 | 82 | UINT32 screen_update_helifire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 83 | 83 | void screen_eof_helifire(screen_device &screen, bool state); |
| 84 | 84 | TIMER_CALLBACK_MEMBER(spacefev_stop_red_cannon); |
| 85 | TIMER_DEVICE_CALLBACK_MEMBER(rst1_tick); | |
| 86 | TIMER_DEVICE_CALLBACK_MEMBER(rst2_tick); | |
| 87 | TIMER_DEVICE_CALLBACK_MEMBER(spacefev_vco_voltage_timer); | |
| 88 | TIMER_DEVICE_CALLBACK_MEMBER(helifire_dac_volume_timer); | |
| 85 | 89 | }; |
| 86 | 90 | |
| 87 | 91 | /*----------- defined in video/n8080.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 118 | 118 | UINT32 screen_update_gaelco3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 119 | 119 | INTERRUPT_GEN_MEMBER(vblank_gen); |
| 120 | 120 | TIMER_CALLBACK_MEMBER(delayed_sound_w); |
| 121 | TIMER_DEVICE_CALLBACK_MEMBER(adsp_autobuffer_irq); | |
| 121 | 122 | }; |
| 122 | 123 | |
| 123 | 124 | /*----------- defined in video/gaelco3d.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 226 | 226 | UINT32 screen_update_galaxian(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 227 | 227 | INTERRUPT_GEN_MEMBER(interrupt_gen); |
| 228 | 228 | INTERRUPT_GEN_MEMBER(fakechange_interrupt_gen); |
| 229 | TIMER_DEVICE_CALLBACK_MEMBER(checkmaj_irq0_gen); | |
| 230 | TIMER_DEVICE_CALLBACK_MEMBER(galaxian_stars_blink_timer); | |
| 229 | 231 | }; |
| 230 | 232 | |
| 231 | 233 | |
| 232 | 234 | /*----------- defined in video/galaxian.c -----------*/ |
| 233 | TIMER_DEVICE_CALLBACK( galaxian_stars_blink_timer ); | |
| 234 | 235 | |
| 235 | 236 | /* special purpose background rendering */ |
| 236 | 237 | void galaxian_draw_background(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| r18137 | r18138 | |
|---|---|---|
| 93 | 93 | TIMER_CALLBACK_MEMBER(vblank_end_callback); |
| 94 | 94 | TIMER_CALLBACK_MEMBER(magerror_irq_callback); |
| 95 | 95 | TIMER_CALLBACK_MEMBER(hyprduel_blit_done); |
| 96 | TIMER_DEVICE_CALLBACK_MEMBER(hyprduel_interrupt); | |
| 96 | 97 | }; |
| r18137 | r18138 | |
|---|---|---|
| 81 | 81 | INTERRUPT_GEN_MEMBER(namconb2_interrupt); |
| 82 | 82 | TIMER_CALLBACK_MEMBER(namconb1_TriggerPOSIRQ); |
| 83 | 83 | TIMER_CALLBACK_MEMBER(namconb2_TriggerPOSIRQ); |
| 84 | TIMER_DEVICE_CALLBACK_MEMBER(mcu_interrupt); | |
| 84 | 85 | }; |
| r18137 | r18138 | |
|---|---|---|
| 32 | 32 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 33 | 33 | virtual void video_start(); |
| 34 | 34 | UINT32 screen_update_vb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 35 | TIMER_DEVICE_CALLBACK_MEMBER(vball_scanline); | |
| 35 | 36 | }; |
| 36 | 37 | |
| 37 | 38 |
| r18137 | r18138 | |
|---|---|---|
| 31 | 31 | virtual void video_start(); |
| 32 | 32 | virtual void palette_init(); |
| 33 | 33 | UINT32 screen_update_strnskil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 34 | TIMER_DEVICE_CALLBACK_MEMBER(strnskil_irq); | |
| 34 | 35 | }; |
| r18137 | r18138 | |
|---|---|---|
| 26 | 26 | virtual void video_start(); |
| 27 | 27 | virtual void palette_init(); |
| 28 | 28 | UINT32 screen_update_shaolins(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 29 | TIMER_DEVICE_CALLBACK_MEMBER(shaolins_interrupt); | |
| 29 | 30 | }; |
| r18137 | r18138 | |
|---|---|---|
| 33 | 33 | TILE_GET_INFO_MEMBER(get_text_tile_info); |
| 34 | 34 | virtual void video_start(); |
| 35 | 35 | UINT32 screen_update_deadang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 36 | TIMER_DEVICE_CALLBACK_MEMBER(deadang_main_scanline); | |
| 37 | TIMER_DEVICE_CALLBACK_MEMBER(deadang_sub_scanline); | |
| 36 | 38 | }; |
| r18137 | r18138 | |
|---|---|---|
| 20 | 20 | DECLARE_READ16_MEMBER(io_r); |
| 21 | 21 | virtual void machine_start(); |
| 22 | 22 | UINT32 screen_update_parentj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 23 | TIMER_DEVICE_CALLBACK_MEMBER(parentj_interrupt); | |
| 23 | 24 | }; |
| r18137 | r18138 | |
|---|---|---|
| 40 | 40 | virtual void machine_reset(); |
| 41 | 41 | virtual void video_start(); |
| 42 | 42 | UINT32 screen_update_bishi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 43 | TIMER_DEVICE_CALLBACK_MEMBER(bishi_scanline); | |
| 43 | 44 | }; |
| 44 | 45 | |
| 45 | 46 | /*----------- defined in video/bishi.c -----------*/ |
| r18137 | r18138 | |
|---|---|---|
| 79 | 79 | virtual void palette_init(); |
| 80 | 80 | UINT32 screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 81 | 81 | TIMER_CALLBACK_MEMBER(scanline_callback); |
| 82 | TIMER_DEVICE_CALLBACK_MEMBER(irobot_irvg_done_callback); | |
| 83 | TIMER_DEVICE_CALLBACK_MEMBER(irobot_irmb_done_callback); | |
| 82 | 84 | }; |
| 83 | 85 | |
| 84 | /*----------- defined in machine/irobot.c -----------*/ | |
| 85 | TIMER_DEVICE_CALLBACK( irobot_irvg_done_callback ); | |
| 86 | TIMER_DEVICE_CALLBACK( irobot_irmb_done_callback ); | |
| 87 | ||
| 88 | 86 | /*----------- defined in video/irobot.c -----------*/ |
| 89 | 87 | void irobot_poly_clear(running_machine &machine); |
| 90 | 88 | void irobot_run_video(running_machine &machine); |
| r18137 | r18138 | |
|---|---|---|
| 846 | 846 | * |
| 847 | 847 | *************************************/ |
| 848 | 848 | |
| 849 | TIMER_DEVICE_CALLBACK( | |
| 849 | TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::galaxian_stars_blink_timer) | |
| 850 | 850 | { |
| 851 | galaxian_state *state = timer.machine().driver_data<galaxian_state>(); | |
| 852 | state->m_stars_blink_state++; | |
| 851 | m_stars_blink_state++; | |
| 853 | 852 | } |
| 854 | 853 | |
| 855 | 854 |
| r18137 | r18138 | |
|---|---|---|
| 301 | 301 | * |
| 302 | 302 | *************************************/ |
| 303 | 303 | |
| 304 | TIMER_DEVICE_CALLBACK( | |
| 304 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_reset_yscroll_callback) | |
| 305 | 305 | { |
| 306 | atarisy1_state *state = timer.machine().driver_data<atarisy1_state>(); | |
| 307 | state->m_playfield_tilemap->set_scrolly(0, param); | |
| 306 | m_playfield_tilemap->set_scrolly(0, param); | |
| 308 | 307 | } |
| 309 | 308 | |
| 310 | 309 | |
| r18137 | r18138 | |
| 382 | 381 | * |
| 383 | 382 | *************************************/ |
| 384 | 383 | |
| 385 | TIMER_DEVICE_CALLBACK( | |
| 384 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3off_callback) | |
| 386 | 385 | { |
| 387 | address_space &space = | |
| 386 | address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM); | |
| 388 | 387 | |
| 389 | 388 | /* clear the state */ |
| 390 | 389 | atarigen_scanline_int_ack_w(space, 0, 0, 0xffff); |
| 391 | 390 | } |
| 392 | 391 | |
| 393 | 392 | |
| 394 | TIMER_DEVICE_CALLBACK( | |
| 393 | TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3_callback) | |
| 395 | 394 | { |
| 396 | atarisy1_state *state = timer.machine().driver_data<atarisy1_state>(); | |
| 397 | 395 | int scanline = param; |
| 398 | 396 | |
| 399 | 397 | /* update the state */ |
| 400 | atarigen_scanline_int_gen( | |
| 398 | atarigen_scanline_int_gen(machine().device("maincpu")); | |
| 401 | 399 | |
| 402 | 400 | /* set a timer to turn it off */ |
| 403 | | |
| 401 | m_int3off_timer->adjust(machine().primary_screen->scan_period()); | |
| 404 | 402 | |
| 405 | 403 | /* determine the time of the next one */ |
| 406 | state->m_next_timer_scanline = -1; | |
| 407 | update_timers(timer.machine(), scanline); | |
| 404 | m_next_timer_scanline = -1; | |
| 405 | update_timers(machine(), scanline); | |
| 408 | 406 | } |
| 409 | 407 | |
| 410 | 408 |
| r18137 | r18138 | |
|---|---|---|
| 82 | 82 | ***************************************************************************/ |
| 83 | 83 | |
| 84 | 84 | |
| 85 | TIMER_DEVICE_CALLBACK( | |
| 85 | TIMER_DEVICE_CALLBACK_MEMBER(spdodgeb_state::spdodgeb_interrupt) | |
| 86 | 86 | { |
| 87 | spdodgeb_state *state = timer.machine().driver_data<spdodgeb_state>(); | |
| 88 | 87 | int scanline = param; |
| 89 | 88 | |
| 90 | 89 | if (scanline == 256) |
| 91 | 90 | { |
| 92 | state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 93 | timer.machine().primary_screen->update_partial(256); | |
| 91 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); | |
| 92 | machine().primary_screen->update_partial(256); | |
| 94 | 93 | } |
| 95 | 94 | else if ((scanline % 8) == 0) |
| 96 | 95 | { |
| 97 | state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); | |
| 98 | timer.machine().primary_screen->update_partial(scanline+16); /* TODO: pretty off ... */ | |
| 96 | m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); | |
| 97 | machine().primary_screen->update_partial(scanline+16); /* TODO: pretty off ... */ | |
| 99 | 98 | } |
| 100 | 99 | } |
| 101 | 100 |
| r18137 | r18138 | |
|---|---|---|
| 361 | 361 | |
| 362 | 362 | /******************************************************************************/ |
| 363 | 363 | |
| 364 | TIMER_DEVICE_CALLBACK( | |
| 364 | TIMER_DEVICE_CALLBACK_MEMBER(battlera_state::battlera_irq) | |
| 365 | 365 | { |
| 366 | battlera_state *state = timer.machine().driver_data<battlera_state>(); | |
| 367 | state->m_current_scanline = param; /* 8 lines clipped at top */ | |
| 366 | m_current_scanline = param; /* 8 lines clipped at top */ | |
| 368 | 367 | |
| 369 | 368 | /* If raster interrupt occurs, refresh screen _up_ to this point */ |
| 370 | if (state->m_rcr_enable && (state->m_current_scanline+56)==state->m_HuC6270_registers[6]) { | |
| 371 | timer.machine().primary_screen->update_partial(state->m_current_scanline); | |
| 372 | state->m_maincpu->set_input_line(0, HOLD_LINE); /* RCR interrupt */ | |
| 369 | if (m_rcr_enable && (m_current_scanline+56)==m_HuC6270_registers[6]) { | |
| 370 | machine().primary_screen->update_partial(m_current_scanline); | |
| 371 | m_maincpu->set_input_line(0, HOLD_LINE); /* RCR interrupt */ | |
| 373 | 372 | } |
| 374 | 373 | |
| 375 | 374 | /* Start of vblank */ |
| 376 | else if (state->m_current_scanline==240) { | |
| 377 | state->m_bldwolf_vblank=1; | |
| 378 | timer.machine().primary_screen->update_partial(240); | |
| 379 | if (state->m_irq_enable) | |
| 380 | state->m_maincpu->set_input_line(0, HOLD_LINE); /* VBL */ | |
| 375 | else if (m_current_scanline==240) { | |
| 376 | m_bldwolf_vblank=1; | |
| 377 | machine().primary_screen->update_partial(240); | |
| 378 | if (m_irq_enable) | |
| 379 | m_maincpu->set_input_line(0, HOLD_LINE); /* VBL */ | |
| 381 | 380 | } |
| 382 | 381 | |
| 383 | 382 | /* End of vblank */ |
| 384 | if (state->m_current_scanline==254) { | |
| 385 | state->m_bldwolf_vblank=0; | |
| 383 | if (m_current_scanline==254) { | |
| 384 | m_bldwolf_vblank=0; | |
| 386 | 385 | } |
| 387 | 386 | } |
| r18137 | r18138 | |
|---|---|---|
| 4 | 4 | #include "includes/beezer.h" |
| 5 | 5 | |
| 6 | 6 | |
| 7 | TIMER_DEVICE_CALLBACK( | |
| 7 | TIMER_DEVICE_CALLBACK_MEMBER(beezer_state::beezer_interrupt) | |
| 8 | 8 | { |
| 9 | 9 | int scanline = param; |
| 10 | // beezer_state *state = timer.machine().driver_data<beezer_state>(); | |
| 11 | via6522_device *via_0 = timer.machine().device<via6522_device>("via6522_0"); | |
| 10 | via6522_device *via_0 = machine().device<via6522_device>("via6522_0"); | |
| 12 | 11 | |
| 13 | 12 | via_0->write_ca2((scanline & 0x20) ? 1 : 0); |
| 14 | 13 | #if 0 |
| 15 | 14 | if (scanline == 240) // actually unused by the game! (points to a tight loop) |
| 16 | | |
| 15 | m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE); | |
| 17 | 16 | else |
| 18 | | |
| 17 | m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE); | |
| 19 | 18 | #endif |
| 20 | 19 | } |
| 21 | 20 |
| r18137 | r18138 | |
|---|---|---|
| 568 | 568 | } |
| 569 | 569 | |
| 570 | 570 | |
| 571 | TIMER_DEVICE_CALLBACK( | |
| 571 | TIMER_DEVICE_CALLBACK_MEMBER(itech8_state::grmatch_palette_update) | |
| 572 | 572 | { |
| 573 | itech8_state *state = timer.machine().driver_data<itech8_state>(); | |
| 574 | struct tms34061_display &tms_state = state->m_tms_state; | |
| 573 | struct tms34061_display &tms_state = m_tms_state; | |
| 575 | 574 | /* if the high bit is set, we are supposed to latch the palette values */ |
| 576 | if ( | |
| 575 | if (m_grmatch_palcontrol & 0x80) | |
| 577 | 576 | { |
| 578 | 577 | /* the TMS34070s latch at the start of the frame, based on the first few bytes */ |
| 579 | UINT32 page_offset = (tms_state.dispstart & 0x0ffff) | | |
| 578 | UINT32 page_offset = (tms_state.dispstart & 0x0ffff) | m_grmatch_xscroll; | |
| 580 | 579 | int page, x; |
| 581 | 580 | |
| 582 | 581 | /* iterate over both pages */ |
| r18137 | r18138 | |
| 587 | 586 | { |
| 588 | 587 | UINT8 data0 = base[x * 2 + 0]; |
| 589 | 588 | UINT8 data1 = base[x * 2 + 1]; |
| 590 | | |
| 589 | m_grmatch_palette[page][x] = MAKE_RGB(pal4bit(data0 >> 0), pal4bit(data1 >> 4), pal4bit(data1 >> 0)); | |
| 591 | 590 | } |
| 592 | 591 | } |
| 593 | 592 | } |
| Previous | 199869 Revisions | Next |