trunk/src/mame/audio/8080bw.c
r18036 | r18037 | |
16 | 16 | |
17 | 17 | MACHINE_START_MEMBER(_8080bw_state,extra_8080bw_sh) |
18 | 18 | { |
19 | | |
20 | 19 | m_speaker = machine().device("speaker"); |
21 | 20 | |
22 | 21 | save_item(NAME(m_port_1_last_extra)); |
r18036 | r18037 | |
820 | 819 | /* disable effect - stops at end of low cycle */ |
821 | 820 | if (!m_schaser_effect_555_is_low) |
822 | 821 | { |
823 | | m_schaser_effect_555_time_remain = m_schaser_effect_555_timer->remaining(); |
| 822 | m_schaser_effect_555_time_remain = m_schaser_effect_555_timer->time_left(); |
824 | 823 | m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double(); |
825 | 824 | m_schaser_effect_555_timer->adjust(attotime::never); |
826 | 825 | } |
r18036 | r18037 | |
870 | 869 | } |
871 | 870 | |
872 | 871 | |
873 | | static TIMER_CALLBACK( schaser_effect_555_cb ) |
| 872 | TIMER_DEVICE_CALLBACK( schaser_effect_555_cb ) |
874 | 873 | { |
875 | | _8080bw_state *state = machine.driver_data<_8080bw_state>(); |
| 874 | _8080bw_state *state = timer.machine().driver_data<_8080bw_state>(); |
876 | 875 | int effect = param; |
877 | 876 | attotime new_time; |
| 877 | |
878 | 878 | /* Toggle 555 output */ |
879 | 879 | state->m_schaser_effect_555_is_low = !state->m_schaser_effect_555_is_low; |
880 | 880 | state->m_schaser_effect_555_time_remain = attotime::zero; |
r18036 | r18037 | |
905 | 905 | |
906 | 906 | MACHINE_START_MEMBER(_8080bw_state,schaser_sh) |
907 | 907 | { |
908 | | |
909 | | m_schaser_effect_555_timer = machine().scheduler().timer_alloc(FUNC(schaser_effect_555_cb)); |
910 | | |
911 | 908 | save_item(NAME(m_schaser_explosion)); |
912 | 909 | save_item(NAME(m_schaser_effect_555_is_low)); |
913 | 910 | save_item(NAME(m_schaser_effect_555_time_remain_savable)); |
r18036 | r18037 | |
1042 | 1039 | |
1043 | 1040 | WRITE8_MEMBER(_8080bw_state::schasercv_sh_port_1_w) |
1044 | 1041 | { |
1045 | | |
1046 | 1042 | /* bit 2 = 2nd speedup |
1047 | 1043 | bit 3 = 1st speedup |
1048 | 1044 | Death is a stream of ff's with some fe's thrown in */ |
r18036 | r18037 | |
1057 | 1053 | |
1058 | 1054 | WRITE8_MEMBER(_8080bw_state::schasercv_sh_port_2_w) |
1059 | 1055 | { |
1060 | | |
1061 | 1056 | speaker_level_w(m_speaker, (data & 0x01) ? 1 : 0); /* End-of-Level */ |
1062 | 1057 | |
1063 | 1058 | machine().sound().system_enable(data & 0x10); |
trunk/src/mame/includes/8080bw.h
r18036 | r18037 | |
14 | 14 | { |
15 | 15 | public: |
16 | 16 | _8080bw_state(const machine_config &mconfig, device_type type, const char *tag) |
17 | | : mw8080bw_state(mconfig, type, tag) { } |
| 17 | : mw8080bw_state(mconfig, type, tag), |
| 18 | m_schaser_effect_555_timer(*this, "schaser_sh_555") |
| 19 | { } |
18 | 20 | |
19 | | /* misc game specific */ |
20 | | emu_timer *m_schaser_effect_555_timer; |
21 | | attotime m_schaser_effect_555_time_remain; |
22 | | INT32 m_schaser_effect_555_time_remain_savable; |
23 | | int m_schaser_effect_555_is_low; |
24 | | int m_schaser_explosion; |
25 | | int m_schaser_last_effect; |
26 | | UINT8 m_polaris_cloud_speed; |
27 | | UINT8 m_polaris_cloud_pos; |
28 | | UINT8 m_schaser_background_disable; |
29 | | UINT8 m_schaser_background_select; |
30 | | UINT8 m_c8080bw_flip_screen; |
31 | | UINT8 m_color_map; |
32 | | UINT8 m_screen_red; |
| 21 | /* devices/memory pointers */ |
| 22 | optional_device<timer_device> m_schaser_effect_555_timer; |
33 | 23 | |
34 | 24 | device_t *m_speaker; |
35 | 25 | |
| 26 | |
| 27 | /* misc game specific */ |
| 28 | UINT8 m_c8080bw_flip_screen; |
| 29 | UINT8 m_color_map; |
| 30 | UINT8 m_screen_red; |
| 31 | |
| 32 | attotime m_schaser_effect_555_time_remain; |
| 33 | INT32 m_schaser_effect_555_time_remain_savable; |
| 34 | int m_schaser_effect_555_is_low; |
| 35 | int m_schaser_explosion; |
| 36 | int m_schaser_last_effect; |
| 37 | UINT8 m_polaris_cloud_speed; |
| 38 | UINT8 m_polaris_cloud_pos; |
| 39 | UINT8 m_schaser_background_disable; |
| 40 | UINT8 m_schaser_background_select; |
| 41 | |
| 42 | |
36 | 43 | DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r); |
| 44 | |
37 | 45 | DECLARE_READ8_MEMBER(indianbt_r); |
38 | 46 | DECLARE_WRITE8_MEMBER(steelwkr_sh_port_3_w); |
39 | 47 | DECLARE_WRITE8_MEMBER(invadpt2_sh_port_1_w); |
r18036 | r18037 | |
61 | 69 | DECLARE_READ8_MEMBER(invmulti_eeprom_r); |
62 | 70 | DECLARE_WRITE8_MEMBER(invmulti_eeprom_w); |
63 | 71 | DECLARE_WRITE8_MEMBER(invmulti_bank_w); |
| 72 | |
64 | 73 | DECLARE_DRIVER_INIT(invmulti); |
65 | 74 | DECLARE_DRIVER_INIT(vortex); |
| 75 | |
66 | 76 | DECLARE_MACHINE_START(extra_8080bw); |
67 | 77 | DECLARE_MACHINE_START(schaser); |
68 | 78 | DECLARE_MACHINE_RESET(schaser); |
r18036 | r18037 | |
74 | 84 | DECLARE_MACHINE_START(extra_8080bw_vh); |
75 | 85 | DECLARE_MACHINE_START(schaser_sh); |
76 | 86 | DECLARE_MACHINE_RESET(schaser_sh); |
| 87 | |
77 | 88 | UINT32 screen_update_invadpt2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
78 | 89 | UINT32 screen_update_cosmo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
79 | 90 | UINT32 screen_update_rollingc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
r18036 | r18037 | |
85 | 96 | UINT32 screen_update_polaris(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
86 | 97 | UINT32 screen_update_ballbomb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
87 | 98 | UINT32 screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 99 | |
88 | 100 | INTERRUPT_GEN_MEMBER(polaris_interrupt); |
89 | 101 | }; |
90 | 102 | |
r18036 | r18037 | |
102 | 114 | |
103 | 115 | extern const sn76477_interface schaser_sn76477_interface; |
104 | 116 | DISCRETE_SOUND_EXTERN( schaser ); |
| 117 | TIMER_DEVICE_CALLBACK( schaser_effect_555_cb ); |