Previous | 199869 Revisions | Next |
r18186 Friday 28th September, 2012 at 08:39:43 UTC by Miodrag Milanović |
---|
Replace some *_DEVICE_HANDLER with _MEMBER calls, mostly audio (no whatsnew) |
[src/mame/audio] | 8080bw.c asteroid.c avalnche.c blockade.c bsktball.c bzone.c canyon.c cchasm.c cinemat.c copsnrob.c crbaloon.c dkong.c firetrk.c harddriv.c llander.c m79amb.c mario.c micro3d.c mw8080bw.c orbit.c poolshrk.c qix.c redalert.c segag80r.c senjyo.c skyraid.c spiders.c sprint8.c starwars.c subs.c suna8.c turbo.c zaxxon.c |
[src/mame/drivers] | 8080bw.c asteroid.c avalnche.c blockade.c bsktball.c bzone.c canyon.c circus.c circusc.c crbaloon.c dragrace.c firetrk.c harddriv.c m79amb.c mario.c micro3d.c mw8080bw.c orbit.c poolshrk.c skyraid.c spiders.c sprint8.c subs.c suna8.c turbo.c zaxxon.c |
[src/mame/includes] | 8080bw.h asteroid.h avalnche.h blockade.h bsktball.h bzone.h canyon.h cchasm.h cinemat.h circus.h circusc.h copsnrob.h crbaloon.h dkong.h dragrace.h firetrk.h harddriv.h m79amb.h mario.h micro3d.h mw8080bw.h nitedrvr.h orbit.h poolshrk.h qix.h redalert.h segag80r.h senjyo.h skyraid.h spiders.h sprint8.h starwars.h subs.h suna8.h turbo.h zaxxon.h |
[src/mame/machine] | mw8080bw.c nitedrvr.c |
r18185 | r18186 | |
---|---|---|
82 | 82 | : driver_device(mconfig, type, tag), |
83 | 83 | m_video_ram(*this,"video_ram"), |
84 | 84 | m_sprite_ram(*this,"sprite_ram"), |
85 | m_vidhw(DKONG_BOARD) { } | |
85 | m_vidhw(DKONG_BOARD), | |
86 | m_discrete(*this, "discrete") { } | |
86 | 87 | |
87 | 88 | /* memory pointers */ |
88 | 89 | required_shared_ptr<UINT8> m_video_ram; |
r18185 | r18186 | |
108 | 109 | const UINT8 * m_color_codes; |
109 | 110 | emu_timer * m_scanline_timer; |
110 | 111 | INT8 m_vidhw; /* Selected video hardware RS Conversion / TKG04 */ |
111 | ||
112 | ||
113 | required_device<discrete_device> m_discrete; | |
112 | 114 | /* radar scope */ |
113 | 115 | |
114 | 116 | UINT8 * m_gfx4; |
r18185 | r18186 | |
218 | 220 | INTERRUPT_GEN_MEMBER(s2650_interrupt); |
219 | 221 | INTERRUPT_GEN_MEMBER(vblank_irq); |
220 | 222 | TIMER_CALLBACK_MEMBER(scanline_callback); |
223 | DECLARE_WRITE8_MEMBER(M58817_command_w); | |
224 | DECLARE_READ8_MEMBER(dkong_voice_status_r); | |
225 | DECLARE_READ8_MEMBER(dkong_tune_r); | |
226 | DECLARE_WRITE8_MEMBER(dkong_p1_w); | |
221 | 227 | }; |
222 | 228 | |
223 | 229 | /*----------- defined in audio/dkong.c -----------*/ |
r18185 | r18186 | |
---|---|---|
43 | 43 | m_blink(*this, "blink"), |
44 | 44 | m_drone_x(*this, "drone_x"), |
45 | 45 | m_drone_y(*this, "drone_y"), |
46 | m_drone_rot(*this, "drone_rot"){ } | |
46 | m_drone_rot(*this, "drone_rot"), | |
47 | m_discrete(*this, "discrete"){ } | |
47 | 48 | |
48 | 49 | UINT8 m_in_service_mode; |
49 | 50 | UINT32 m_dial[2]; |
r18185 | r18186 | |
59 | 60 | optional_shared_ptr<UINT8> m_drone_x; |
60 | 61 | optional_shared_ptr<UINT8> m_drone_y; |
61 | 62 | optional_shared_ptr<UINT8> m_drone_rot; |
63 | required_device<discrete_device> m_discrete; | |
62 | 64 | UINT8 m_flash; |
63 | 65 | UINT8 m_crash[2]; |
64 | 66 | UINT8 m_skid[2]; |
r18185 | r18186 | |
106 | 108 | UINT32 screen_update_montecar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
107 | 109 | INTERRUPT_GEN_MEMBER(firetrk_interrupt); |
108 | 110 | TIMER_CALLBACK_MEMBER(periodic_callback); |
111 | DECLARE_WRITE8_MEMBER(firetrk_skid_reset_w); | |
112 | DECLARE_WRITE8_MEMBER(montecar_skid_reset_w); | |
113 | DECLARE_WRITE8_MEMBER(firetrk_crash_snd_w); | |
114 | DECLARE_WRITE8_MEMBER(firetrk_skid_snd_w); | |
115 | DECLARE_WRITE8_MEMBER(firetrk_motor_snd_w); | |
116 | DECLARE_WRITE8_MEMBER(superbug_motor_snd_w); | |
117 | DECLARE_WRITE8_MEMBER(firetrk_xtndply_w); | |
109 | 118 | }; |
110 | 119 | |
111 | 120 | |
112 | 121 | /*----------- defined in audio/firetrk.c -----------*/ |
113 | 122 | |
114 | DECLARE_WRITE8_DEVICE_HANDLER( firetrk_skid_reset_w ); | |
115 | DECLARE_WRITE8_DEVICE_HANDLER( montecar_skid_reset_w ); | |
116 | DECLARE_WRITE8_DEVICE_HANDLER( firetrk_crash_snd_w ); | |
117 | DECLARE_WRITE8_DEVICE_HANDLER( firetrk_skid_snd_w ); | |
118 | DECLARE_WRITE8_DEVICE_HANDLER( firetrk_motor_snd_w ); | |
119 | DECLARE_WRITE8_DEVICE_HANDLER( superbug_motor_snd_w ); | |
120 | DECLARE_WRITE8_DEVICE_HANDLER( firetrk_xtndply_w ); | |
121 | 123 | |
122 | 124 | DISCRETE_SOUND_EXTERN( firetrk ); |
123 | 125 | DISCRETE_SOUND_EXTERN( superbug ); |
r18185 | r18186 | |
---|---|---|
83 | 83 | virtual void video_start(); |
84 | 84 | UINT32 screen_update_senjyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
85 | 85 | INTERRUPT_GEN_MEMBER(senjyo_interrupt); |
86 | DECLARE_READ8_MEMBER(pio_pa_r); | |
86 | 87 | }; |
87 | 88 | |
88 | 89 | /*----------- defined in audio/senjyo.c -----------*/ |
r18185 | r18186 | |
---|---|---|
106 | 106 | UINT32 screen_update_suna8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
107 | 107 | TIMER_DEVICE_CALLBACK_MEMBER(brickzn_interrupt); |
108 | 108 | TIMER_DEVICE_CALLBACK_MEMBER(hardhea2_interrupt); |
109 | DECLARE_WRITE8_MEMBER(suna8_play_samples_w); | |
110 | DECLARE_WRITE8_MEMBER(rranger_play_samples_w); | |
111 | DECLARE_WRITE8_MEMBER(suna8_samples_number_w); | |
109 | 112 | }; |
110 | 113 | |
111 | 114 | /*----------- defined in audio/suna8.c -----------*/ |
112 | 115 | |
113 | DECLARE_WRITE8_DEVICE_HANDLER( suna8_play_samples_w ); | |
114 | DECLARE_WRITE8_DEVICE_HANDLER( rranger_play_samples_w ); | |
115 | DECLARE_WRITE8_DEVICE_HANDLER( suna8_samples_number_w ); | |
116 | 116 | SAMPLES_START( suna8_sh_start ); |
r18185 | r18186 | |
---|---|---|
220 | 220 | INTERRUPT_GEN_MEMBER(hd68k_irq_gen); |
221 | 221 | TIMER_CALLBACK_MEMBER(deferred_adsp_bank_switch); |
222 | 222 | TIMER_CALLBACK_MEMBER(rddsp32_sync_cb); |
223 | DECLARE_WRITE16_MEMBER(hdsnddsp_dac_w); | |
223 | 224 | }; |
224 | 225 | |
225 | 226 | |
r18185 | r18186 | |
342 | 343 | /*----------- defined in audio/harddriv.c -----------*/ |
343 | 344 | |
344 | 345 | void hdsnd_init(running_machine &machine); |
345 | DECLARE_WRITE16_DEVICE_HANDLER( hdsnddsp_dac_w ); | |
346 | 346 | |
347 | ||
348 | 347 | /*----------- defined in video/harddriv.c -----------*/ |
349 | 348 | |
350 | 349 |
r18185 | r18186 | |
---|---|---|
73 | 73 | UINT32 screen_update_razmataz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
74 | 74 | UINT32 screen_update_congo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
75 | 75 | INTERRUPT_GEN_MEMBER(vblank_int); |
76 | DECLARE_WRITE8_MEMBER(zaxxon_sound_a_w); | |
77 | DECLARE_WRITE8_MEMBER(zaxxon_sound_b_w); | |
78 | DECLARE_WRITE8_MEMBER(zaxxon_sound_c_w); | |
79 | DECLARE_WRITE8_MEMBER(congo_sound_b_w); | |
80 | DECLARE_WRITE8_MEMBER(congo_sound_c_w); | |
76 | 81 | }; |
77 | 82 | |
78 | 83 | |
79 | 84 | /*----------- defined in audio/zaxxon.c -----------*/ |
80 | ||
81 | DECLARE_WRITE8_DEVICE_HANDLER( zaxxon_sound_a_w ); | |
82 | DECLARE_WRITE8_DEVICE_HANDLER( zaxxon_sound_b_w ); | |
83 | DECLARE_WRITE8_DEVICE_HANDLER( zaxxon_sound_c_w ); | |
84 | ||
85 | DECLARE_WRITE8_DEVICE_HANDLER( congo_sound_b_w ); | |
86 | DECLARE_WRITE8_DEVICE_HANDLER( congo_sound_c_w ); | |
87 | ||
88 | 85 | MACHINE_CONFIG_EXTERN( zaxxon_samples ); |
89 | 86 | MACHINE_CONFIG_EXTERN( congo_samples ); |
r18185 | r18186 | |
---|---|---|
132 | 132 | UINT32 screen_update_subroc3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
133 | 133 | UINT32 screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
134 | 134 | TIMER_CALLBACK_MEMBER(delayed_i8255_w); |
135 | DECLARE_WRITE8_MEMBER(turbo_sound_a_w); | |
136 | DECLARE_WRITE8_MEMBER(turbo_sound_b_w); | |
137 | DECLARE_WRITE8_MEMBER(turbo_sound_c_w); | |
138 | DECLARE_WRITE8_MEMBER(subroc3d_sound_a_w); | |
139 | DECLARE_WRITE8_MEMBER(subroc3d_sound_b_w); | |
140 | DECLARE_WRITE8_MEMBER(subroc3d_sound_c_w); | |
141 | DECLARE_WRITE8_MEMBER(buckrog_sound_a_w); | |
142 | DECLARE_WRITE8_MEMBER(buckrog_sound_b_w); | |
135 | 143 | }; |
136 | 144 | |
137 | 145 | |
r18185 | r18186 | |
139 | 147 | MACHINE_CONFIG_EXTERN( turbo_samples ); |
140 | 148 | MACHINE_CONFIG_EXTERN( subroc3d_samples ); |
141 | 149 | MACHINE_CONFIG_EXTERN( buckrog_samples ); |
142 | ||
143 | DECLARE_WRITE8_DEVICE_HANDLER( turbo_sound_a_w ); | |
144 | DECLARE_WRITE8_DEVICE_HANDLER( turbo_sound_b_w ); | |
145 | DECLARE_WRITE8_DEVICE_HANDLER( turbo_sound_c_w ); | |
146 | ||
147 | DECLARE_WRITE8_DEVICE_HANDLER( subroc3d_sound_a_w ); | |
148 | DECLARE_WRITE8_DEVICE_HANDLER( subroc3d_sound_b_w ); | |
149 | DECLARE_WRITE8_DEVICE_HANDLER( subroc3d_sound_c_w ); | |
150 | ||
151 | DECLARE_WRITE8_DEVICE_HANDLER( buckrog_sound_a_w ); | |
152 | DECLARE_WRITE8_DEVICE_HANDLER( buckrog_sound_b_w ); |
r18185 | r18186 | |
---|---|---|
63 | 63 | DECLARE_DRIVER_INIT(starwars); |
64 | 64 | virtual void machine_reset(); |
65 | 65 | TIMER_CALLBACK_MEMBER(math_run_clear); |
66 | DECLARE_READ8_MEMBER(r6532_porta_r); | |
67 | DECLARE_WRITE8_MEMBER(r6532_porta_w); | |
68 | DECLARE_WRITE_LINE_MEMBER(snd_interrupt); | |
66 | 69 | }; |
67 | 70 | |
68 | 71 |
r18185 | r18186 | |
---|---|---|
21 | 21 | nitedrvr_state(const machine_config &mconfig, device_type type, const char *tag) |
22 | 22 | : driver_device(mconfig, type, tag) , |
23 | 23 | m_videoram(*this, "videoram"), |
24 | m_hvc(*this, "hvc"){ } | |
24 | m_hvc(*this, "hvc"), | |
25 | m_discrete(*this, "discrete"){ } | |
25 | 26 | |
26 | 27 | /* memory pointers */ |
27 | 28 | required_shared_ptr<UINT8> m_videoram; |
r18185 | r18186 | |
43 | 44 | |
44 | 45 | /* devices */ |
45 | 46 | cpu_device *m_maincpu; |
46 | device | |
47 | required_device<discrete_device> m_discrete; | |
47 | 48 | DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r); |
48 | 49 | DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w); |
49 | 50 | DECLARE_READ8_MEMBER(nitedrvr_in0_r); |
r18185 | r18186 | |
---|---|---|
33 | 33 | DECLARE_WRITE_LINE_MEMBER(cchasm_6840_irq); |
34 | 34 | virtual void video_start(); |
35 | 35 | TIMER_CALLBACK_MEMBER(cchasm_refresh_end); |
36 | DECLARE_WRITE_LINE_MEMBER(ctc_timer_1_w); | |
37 | DECLARE_WRITE_LINE_MEMBER(ctc_timer_2_w); | |
36 | 38 | }; |
37 | 39 | |
38 | 40 | /*----------- defined in audio/cchasm.c -----------*/ |
r18185 | r18186 | |
---|---|---|
7 | 7 | : driver_device(mconfig, type, tag) , |
8 | 8 | m_pos_ram(*this, "pos_ram"), |
9 | 9 | m_alpha_num_ram(*this, "alpha_num_ram"), |
10 | m_obj_ram(*this, "obj_ram"){ } | |
10 | m_obj_ram(*this, "obj_ram"), | |
11 | m_discrete(*this, "discrete"){ } | |
11 | 12 | |
12 | 13 | int m_analog_range; |
13 | 14 | int m_analog_offset; |
r18185 | r18186 | |
17 | 18 | required_shared_ptr<UINT8> m_pos_ram; |
18 | 19 | required_shared_ptr<UINT8> m_alpha_num_ram; |
19 | 20 | required_shared_ptr<UINT8> m_obj_ram; |
20 | ||
21 | required_device<discrete_device> m_discrete; | |
21 | 22 | bitmap_ind16 m_helper; |
22 | 23 | DECLARE_READ8_MEMBER(skyraid_port_0_r); |
23 | 24 | DECLARE_WRITE8_MEMBER(skyraid_range_w); |
r18185 | r18186 | |
26 | 27 | virtual void video_start(); |
27 | 28 | virtual void palette_init(); |
28 | 29 | UINT32 screen_update_skyraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
30 | DECLARE_WRITE8_MEMBER(skyraid_sound_w); | |
29 | 31 | }; |
30 | 32 | |
31 | 33 | /*----------- defined in audio/skyraid.c -----------*/ |
32 | 34 | DISCRETE_SOUND_EXTERN( skyraid ); |
33 | DECLARE_WRITE8_DEVICE_HANDLER( skyraid_sound_w ); | |
34 |
r18185 | r18186 | |
---|---|---|
17 | 17 | m_bulletsram(*this, "bulletsram"), |
18 | 18 | m_carimage(*this, "carimage"), |
19 | 19 | m_cary(*this, "cary"), |
20 | m_videoram(*this, "videoram"){ } | |
20 | m_videoram(*this, "videoram"), | |
21 | m_discrete(*this, "discrete"){ } | |
21 | 22 | |
22 | 23 | /* memory pointers */ |
23 | 24 | required_shared_ptr<UINT8> m_trucky; |
r18185 | r18186 | |
26 | 27 | required_shared_ptr<UINT8> m_carimage; |
27 | 28 | required_shared_ptr<UINT8> m_cary; |
28 | 29 | required_shared_ptr<UINT8> m_videoram; |
29 | ||
30 | required_device<discrete_device> m_discrete; | |
30 | 31 | /* misc */ |
31 | 32 | UINT8 m_misc; |
32 | 33 | UINT8 m_ic_h3_data; |
r18185 | r18186 | |
---|---|---|
28 | 28 | dragrace_state(const machine_config &mconfig, device_type type, const char *tag) |
29 | 29 | : driver_device(mconfig, type, tag) , |
30 | 30 | m_playfield_ram(*this, "playfield_ram"), |
31 | m_position_ram(*this, "position_ram"){ } | |
31 | m_position_ram(*this, "position_ram"), | |
32 | m_discrete(*this, "discrete"){ } | |
32 | 33 | |
33 | 34 | /* memory pointers */ |
34 | 35 | required_shared_ptr<UINT8> m_playfield_ram; |
r18185 | r18186 | |
42 | 43 | int m_gear[2]; |
43 | 44 | |
44 | 45 | /* devices */ |
45 | device | |
46 | required_device<discrete_device> m_discrete; | |
46 | 47 | DECLARE_WRITE8_MEMBER(dragrace_misc_w); |
47 | 48 | DECLARE_WRITE8_MEMBER(dragrace_misc_clear_w); |
48 | 49 | DECLARE_READ8_MEMBER(dragrace_input_r); |
r18185 | r18186 | |
---|---|---|
1 | 1 | #ifndef MARIO_H_ |
2 | 2 | #define MARIO_H_ |
3 | 3 | |
4 | #include "sound/discrete.h" | |
5 | ||
4 | 6 | /* |
5 | 7 | * From the schematics: |
6 | 8 | * |
r18185 | r18186 | |
36 | 38 | mario_state(const machine_config &mconfig, device_type type, const char *tag) |
37 | 39 | : driver_device(mconfig, type, tag) , |
38 | 40 | m_spriteram(*this, "spriteram"), |
39 | m_videoram(*this, "videoram"){ } | |
41 | m_videoram(*this, "videoram"), | |
42 | m_discrete(*this, "discrete"){ } | |
40 | 43 | |
41 | 44 | /* memory pointers */ |
42 | 45 | |
r18185 | r18186 | |
57 | 60 | |
58 | 61 | required_shared_ptr<UINT8> m_spriteram; |
59 | 62 | required_shared_ptr<UINT8> m_videoram; |
63 | required_device<discrete_device> m_discrete; | |
60 | 64 | tilemap_t *m_bg_tilemap; |
61 | 65 | int m_monitor; |
62 | 66 | |
r18185 | r18186 | |
83 | 87 | virtual void palette_init(); |
84 | 88 | UINT32 screen_update_mario(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
85 | 89 | INTERRUPT_GEN_MEMBER(vblank_irq); |
90 | DECLARE_WRITE8_MEMBER(mario_sh_sound_w); | |
91 | DECLARE_WRITE8_MEMBER(mario_sh1_w); | |
92 | DECLARE_WRITE8_MEMBER(mario_sh2_w); | |
86 | 93 | }; |
87 | 94 | |
88 | 95 | /*----------- defined in audio/mario.c -----------*/ |
89 | 96 | |
90 | DECLARE_WRITE8_DEVICE_HANDLER( mario_sh1_w ); | |
91 | DECLARE_WRITE8_DEVICE_HANDLER( mario_sh2_w ); | |
92 | ||
93 | ||
94 | 97 | MACHINE_CONFIG_EXTERN( mario_audio ); |
95 | 98 | MACHINE_CONFIG_EXTERN( masao_audio ); |
96 | 99 |
r18185 | r18186 | |
---|---|---|
19 | 19 | bsktball_state(const machine_config &mconfig, device_type type, const char *tag) |
20 | 20 | : driver_device(mconfig, type, tag) , |
21 | 21 | m_videoram(*this, "videoram"), |
22 | m_motion(*this, "motion"){ } | |
22 | m_motion(*this, "motion"), | |
23 | m_discrete(*this, "discrete"){ } | |
23 | 24 | |
24 | 25 | /* memory pointers */ |
25 | 26 | required_shared_ptr<UINT8> m_videoram; |
26 | 27 | required_shared_ptr<UINT8> m_motion; |
28 | required_device<discrete_device> m_discrete; | |
27 | 29 | |
28 | 30 | /* video-related */ |
29 | 31 | tilemap_t *m_bg_tilemap; |
r18185 | r18186 | |
57 | 59 | virtual void palette_init(); |
58 | 60 | UINT32 screen_update_bsktball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
59 | 61 | TIMER_DEVICE_CALLBACK_MEMBER(bsktball_scanline); |
62 | DECLARE_WRITE8_MEMBER(bsktball_bounce_w); | |
63 | DECLARE_WRITE8_MEMBER(bsktball_note_w); | |
64 | DECLARE_WRITE8_MEMBER(bsktball_noise_reset_w); | |
60 | 65 | }; |
61 | 66 | |
62 | 67 | /*----------- defined in audio/bsktball.c -----------*/ |
63 | 68 | |
64 | DECLARE_WRITE8_DEVICE_HANDLER( bsktball_bounce_w ); | |
65 | DECLARE_WRITE8_DEVICE_HANDLER( bsktball_note_w ); | |
66 | DECLARE_WRITE8_DEVICE_HANDLER( bsktball_noise_reset_w ); | |
67 | ||
68 | 69 | DISCRETE_SOUND_EXTERN( bsktball ); |
r18185 | r18186 | |
---|---|---|
3 | 3 | Sigma Spiders hardware |
4 | 4 | |
5 | 5 | ***************************************************************************/ |
6 | #include "sound/discrete.h" | |
6 | 7 | |
7 | ||
8 | 8 | #define NUM_PENS (8) |
9 | 9 | |
10 | 10 | class spiders_state : public driver_device |
r18185 | r18186 | |
12 | 12 | public: |
13 | 13 | spiders_state(const machine_config &mconfig, device_type type, const char *tag) |
14 | 14 | : driver_device(mconfig, type, tag) , |
15 | m_ram(*this, "ram"){ } | |
15 | m_ram(*this, "ram"), | |
16 | m_discrete(*this, "discrete"){ } | |
16 | 17 | |
17 | 18 | required_shared_ptr<UINT8> m_ram; |
19 | required_device<discrete_device> m_discrete; | |
18 | 20 | UINT8 m_flipscreen; |
19 | 21 | UINT16 m_gfx_rom_address; |
20 | 22 | UINT8 m_gfx_rom_ctrl_mode; |
r18185 | r18186 | |
31 | 33 | virtual void machine_start(); |
32 | 34 | INTERRUPT_GEN_MEMBER(update_pia_1); |
33 | 35 | DECLARE_WRITE8_MEMBER(ic60_74123_output_changed); |
36 | DECLARE_WRITE8_MEMBER(spiders_audio_command_w); | |
37 | DECLARE_WRITE8_MEMBER(spiders_audio_a_w); | |
38 | DECLARE_WRITE8_MEMBER(spiders_audio_b_w); | |
39 | DECLARE_WRITE8_MEMBER(spiders_audio_ctrl_w); | |
34 | 40 | }; |
35 | 41 | |
36 | 42 | /*----------- defined in audio/spiders.c -----------*/ |
37 | DECLARE_WRITE8_DEVICE_HANDLER( spiders_audio_command_w ); | |
38 | DECLARE_WRITE8_DEVICE_HANDLER( spiders_audio_a_w ); | |
39 | DECLARE_WRITE8_DEVICE_HANDLER( spiders_audio_b_w ); | |
40 | DECLARE_WRITE8_DEVICE_HANDLER( spiders_audio_ctrl_w ); | |
41 | ||
42 | 43 | MACHINE_CONFIG_EXTERN( spiders_audio ); |
r18185 | r18186 | |
---|---|---|
66 | 66 | DECLARE_VIDEO_START(cinemat_qb3color); |
67 | 67 | UINT32 screen_update_cinemat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
68 | 68 | UINT32 screen_update_spacewar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
69 | DECLARE_READ8_MEMBER(sound_porta_r); | |
70 | DECLARE_READ8_MEMBER(sound_portb_r); | |
71 | DECLARE_WRITE8_MEMBER(sound_portb_w); | |
72 | DECLARE_WRITE8_MEMBER(sound_output_w); | |
69 | 73 | }; |
70 | 74 | |
71 | 75 | /*----------- defined in audio/cinemat.c -----------*/ |
r18185 | r18186 | |
---|---|---|
41 | 41 | UINT32 screen_update_demoneye(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
42 | 42 | UINT32 screen_update_panther(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
43 | 43 | INTERRUPT_GEN_MEMBER(redalert_vblank_interrupt); |
44 | DECLARE_WRITE8_MEMBER(redalert_analog_w); | |
45 | DECLARE_WRITE8_MEMBER(redalert_AY8910_w); | |
46 | DECLARE_WRITE_LINE_MEMBER(sod_callback); | |
47 | DECLARE_READ_LINE_MEMBER(sid_callback); | |
48 | DECLARE_WRITE8_MEMBER(demoneye_ay8910_latch_1_w); | |
49 | DECLARE_READ8_MEMBER(demoneye_ay8910_latch_2_r); | |
50 | DECLARE_WRITE8_MEMBER(demoneye_ay8910_data_w); | |
44 | 51 | }; |
45 | 52 | /*----------- defined in audio/redalert.c -----------*/ |
46 | 53 |
r18185 | r18186 | |
---|---|---|
22 | 22 | subs_state(const machine_config &mconfig, device_type type, const char *tag) |
23 | 23 | : driver_device(mconfig, type, tag) , |
24 | 24 | m_spriteram(*this, "spriteram"), |
25 | m_videoram(*this, "videoram"){ } | |
25 | m_videoram(*this, "videoram"), | |
26 | m_discrete(*this, "discrete"){ } | |
26 | 27 | |
27 | 28 | required_shared_ptr<UINT8> m_spriteram; |
28 | 29 | required_shared_ptr<UINT8> m_videoram; |
30 | required_device<discrete_device> m_discrete; | |
29 | 31 | int m_steering_buf1; |
30 | 32 | int m_steering_buf2; |
31 | 33 | int m_steering_val1; |
r18185 | r18186 | |
45 | 47 | UINT32 screen_update_subs_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
46 | 48 | UINT32 screen_update_subs_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
47 | 49 | INTERRUPT_GEN_MEMBER(subs_interrupt); |
50 | DECLARE_WRITE8_MEMBER(subs_sonar1_w); | |
51 | DECLARE_WRITE8_MEMBER(subs_sonar2_w); | |
52 | DECLARE_WRITE8_MEMBER(subs_crash_w); | |
53 | DECLARE_WRITE8_MEMBER(subs_explode_w); | |
54 | DECLARE_WRITE8_MEMBER(subs_noise_reset_w); | |
48 | 55 | }; |
49 | 56 | |
50 | 57 | /*----------- defined in audio/subs.c -----------*/ |
51 | 58 | |
52 | DECLARE_WRITE8_DEVICE_HANDLER( subs_noise_reset_w ); | |
53 | DECLARE_WRITE8_DEVICE_HANDLER( subs_sonar2_w ); | |
54 | DECLARE_WRITE8_DEVICE_HANDLER( subs_sonar1_w ); | |
55 | DECLARE_WRITE8_DEVICE_HANDLER( subs_crash_w ); | |
56 | DECLARE_WRITE8_DEVICE_HANDLER( subs_explode_w ); | |
57 | ||
58 | 59 | DISCRETE_SOUND_EXTERN( subs ); |
r18185 | r18186 | |
---|---|---|
16 | 16 | _8080bw_state(const machine_config &mconfig, device_type type, const char *tag) |
17 | 17 | : mw8080bw_state(mconfig, type, tag), |
18 | 18 | m_schaser_effect_555_timer(*this, "schaser_sh_555"), |
19 | m_claybust_gun_on(*this, "claybust_gun") | |
19 | m_claybust_gun_on(*this, "claybust_gun"), | |
20 | m_discrete(*this, "discrete") | |
20 | 21 | { } |
21 | 22 | |
22 | 23 | /* devices/memory pointers */ |
23 | 24 | optional_device<timer_device> m_schaser_effect_555_timer; |
24 | 25 | optional_device<timer_device> m_claybust_gun_on; |
25 | ||
26 | required_device<discrete_device> m_discrete; | |
26 | 27 | device_t *m_speaker; |
27 | 28 | |
28 | 29 | |
r18185 | r18186 | |
108 | 109 | INTERRUPT_GEN_MEMBER(polaris_interrupt); |
109 | 110 | TIMER_DEVICE_CALLBACK_MEMBER(claybust_gun_callback); |
110 | 111 | TIMER_DEVICE_CALLBACK_MEMBER(schaser_effect_555_cb); |
112 | DECLARE_WRITE8_MEMBER(indianbt_sh_port_3_w); | |
113 | DECLARE_WRITE8_MEMBER(polaris_sh_port_1_w); | |
114 | DECLARE_WRITE8_MEMBER(polaris_sh_port_2_w); | |
115 | DECLARE_WRITE8_MEMBER(polaris_sh_port_3_w); | |
111 | 116 | }; |
112 | 117 | |
113 | 118 | |
114 | 119 | /*----------- defined in audio/8080bw.c -----------*/ |
115 | 120 | extern const samples_interface lrescue_samples_interface; |
116 | 121 | |
117 | DECLARE_WRITE8_DEVICE_HANDLER( indianbt_sh_port_3_w ); | |
118 | 122 | DISCRETE_SOUND_EXTERN( indianbt ); |
119 | ||
120 | DECLARE_WRITE8_DEVICE_HANDLER( polaris_sh_port_1_w ); | |
121 | DECLARE_WRITE8_DEVICE_HANDLER( polaris_sh_port_2_w ); | |
122 | DECLARE_WRITE8_DEVICE_HANDLER( polaris_sh_port_3_w ); | |
123 | 123 | DISCRETE_SOUND_EXTERN( polaris ); |
124 | 124 | |
125 | 125 | extern const sn76477_interface schaser_sn76477_interface; |
r18185 | r18186 | |
---|---|---|
1 | 1 | #include "sound/discrete.h" |
2 | 2 | |
3 | class m79amb_state : public driver_device | |
4 | { | |
5 | public: | |
6 | m79amb_state(const machine_config &mconfig, device_type type, const char *tag) | |
7 | : driver_device(mconfig, type, tag) , | |
8 | m_videoram(*this, "videoram"), | |
9 | m_mask(*this, "mask"), | |
10 | m_discrete(*this, "discrete"){ } | |
3 | 11 | |
12 | /* memory pointers */ | |
13 | required_shared_ptr<UINT8> m_videoram; | |
14 | required_shared_ptr<UINT8> m_mask; | |
15 | ||
16 | required_device<discrete_device> m_discrete; | |
17 | ||
18 | /* misc */ | |
19 | UINT8 m_lut_gun1[0x100]; | |
20 | UINT8 m_lut_gun2[0x100]; | |
21 | DECLARE_WRITE8_MEMBER(ramtek_videoram_w); | |
22 | DECLARE_READ8_MEMBER(gray5bit_controller0_r); | |
23 | DECLARE_READ8_MEMBER(gray5bit_controller1_r); | |
24 | DECLARE_WRITE8_MEMBER(m79amb_8002_w); | |
25 | DECLARE_DRIVER_INIT(m79amb); | |
26 | UINT32 screen_update_ramtek(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
27 | INTERRUPT_GEN_MEMBER(m79amb_interrupt); | |
28 | DECLARE_WRITE8_MEMBER(m79amb_8000_w); | |
29 | DECLARE_WRITE8_MEMBER(m79amb_8003_w); | |
30 | }; | |
31 | ||
4 | 32 | /*----------- defined in audio/m79amb.c -----------*/ |
5 | 33 | |
6 | 34 | DISCRETE_SOUND_EXTERN( m79amb ); |
7 | 35 | |
8 | DECLARE_WRITE8_DEVICE_HANDLER( m79amb_8000_w ); | |
9 | DECLARE_WRITE8_DEVICE_HANDLER( m79amb_8003_w ); |
r18185 | r18186 | |
---|---|---|
38 | 38 | : driver_device(mconfig, type, tag), |
39 | 39 | m_maincpu(*this,"maincpu"), |
40 | 40 | m_main_ram(*this, "main_ram"), |
41 | m_colorram(*this, "colorram") | |
41 | m_colorram(*this, "colorram"), | |
42 | m_discrete(*this, "discrete") | |
42 | 43 | { } |
43 | 44 | |
44 | 45 | /* device/memory pointers */ |
45 | 46 | required_device<cpu_device> m_maincpu; |
46 | 47 | required_shared_ptr<UINT8> m_main_ram; |
47 | 48 | optional_shared_ptr<UINT8> m_colorram; |
48 | ||
49 | required_device<discrete_device> m_discrete; | |
50 | ||
49 | 51 | /* sound-related */ |
50 | 52 | UINT8 m_port_1_last; |
51 | 53 | UINT8 m_port_2_last; |
r18185 | r18186 | |
76 | 78 | samples_device *m_samples2; |
77 | 79 | device_t *m_sn1; |
78 | 80 | device_t *m_sn2; |
79 | device_t *m_sn; | |
80 | device_t *m_discrete; | |
81 | device_t *m_sn; | |
81 | 82 | |
82 | 83 | DECLARE_READ8_MEMBER(mw8080bw_shift_result_rev_r); |
83 | 84 | DECLARE_READ8_MEMBER(mw8080bw_reversable_shift_result_r); |
r18185 | r18186 | |
147 | 148 | TIMER_CALLBACK_MEMBER(maze_tone_timing_timer_callback); |
148 | 149 | TIMER_CALLBACK_MEMBER(mw8080bw_interrupt_callback); |
149 | 150 | TIMER_DEVICE_CALLBACK_MEMBER(spcenctr_strobe_timer_callback); |
151 | DECLARE_WRITE8_MEMBER(midway_tone_generator_lo_w); | |
152 | DECLARE_WRITE8_MEMBER(midway_tone_generator_hi_w); | |
153 | DECLARE_WRITE8_MEMBER(tornbase_audio_w); | |
154 | DECLARE_WRITE8_MEMBER(boothill_audio_w); | |
155 | DECLARE_WRITE8_MEMBER(checkmat_audio_w); | |
156 | DECLARE_WRITE8_MEMBER(desertgu_audio_1_w); | |
157 | DECLARE_WRITE8_MEMBER(desertgu_audio_2_w); | |
158 | DECLARE_WRITE8_MEMBER(dplay_audio_w); | |
159 | DECLARE_WRITE8_MEMBER(clowns_audio_2_w); | |
160 | DECLARE_WRITE8_MEMBER(spacwalk_audio_1_w); | |
161 | DECLARE_WRITE8_MEMBER(spacwalk_audio_2_w); | |
162 | DECLARE_WRITE8_MEMBER(shuffle_audio_1_w); | |
163 | DECLARE_WRITE8_MEMBER(shuffle_audio_2_w); | |
164 | DECLARE_WRITE8_MEMBER(dogpatch_audio_w); | |
165 | DECLARE_WRITE8_MEMBER(spcenctr_audio_1_w); | |
166 | DECLARE_WRITE8_MEMBER(spcenctr_audio_2_w); | |
167 | DECLARE_WRITE8_MEMBER(spcenctr_audio_3_w); | |
168 | DECLARE_WRITE8_MEMBER(bowler_audio_1_w); | |
169 | DECLARE_WRITE8_MEMBER(invaders_audio_1_w); | |
170 | DECLARE_WRITE8_MEMBER(invaders_audio_2_w); | |
171 | DECLARE_WRITE8_MEMBER(blueshrk_audio_w); | |
172 | DECLARE_WRITE8_MEMBER(invad2ct_audio_1_w); | |
173 | DECLARE_WRITE8_MEMBER(invad2ct_audio_2_w); | |
174 | DECLARE_WRITE8_MEMBER(invad2ct_audio_3_w); | |
175 | DECLARE_WRITE8_MEMBER(invad2ct_audio_4_w); | |
150 | 176 | }; |
151 | 177 | |
152 | 178 | |
r18185 | r18186 | |
200 | 226 | |
201 | 227 | /*----------- defined in audio/mw8080bw.c -----------*/ |
202 | 228 | |
203 | DECLARE_WRITE8_DEVICE_HANDLER( midway_tone_generator_lo_w ); | |
204 | DECLARE_WRITE8_DEVICE_HANDLER( midway_tone_generator_hi_w ); | |
205 | 229 | |
206 | 230 | MACHINE_CONFIG_EXTERN( seawolf_audio ); |
207 | 231 | |
208 | 232 | MACHINE_CONFIG_EXTERN( gunfight_audio ); |
209 | 233 | |
210 | 234 | MACHINE_CONFIG_EXTERN( tornbase_audio ); |
211 | DECLARE_WRITE8_DEVICE_HANDLER( tornbase_audio_w ); | |
212 | 235 | |
213 | 236 | MACHINE_CONFIG_EXTERN( zzzap_audio ); |
214 | 237 | |
r18185 | r18186 | |
216 | 239 | void maze_write_discrete(device_t *device, UINT8 maze_tone_timing_state); |
217 | 240 | |
218 | 241 | MACHINE_CONFIG_EXTERN( boothill_audio ); |
219 | DECLARE_WRITE8_DEVICE_HANDLER( boothill_audio_w ); | |
220 | 242 | |
221 | 243 | MACHINE_CONFIG_EXTERN( checkmat_audio ); |
222 | DECLARE_WRITE8_DEVICE_HANDLER( checkmat_audio_w ); | |
223 | 244 | |
224 | 245 | MACHINE_CONFIG_EXTERN( desertgu_audio ); |
225 | DECLARE_WRITE8_DEVICE_HANDLER( desertgu_audio_1_w ); | |
226 | DECLARE_WRITE8_DEVICE_HANDLER( desertgu_audio_2_w ); | |
227 | 246 | |
228 | 247 | MACHINE_CONFIG_EXTERN( dplay_audio ); |
229 | DECLARE_WRITE8_DEVICE_HANDLER( dplay_audio_w ); | |
230 | 248 | |
231 | 249 | MACHINE_CONFIG_EXTERN( gmissile_audio ); |
232 | 250 | |
233 | 251 | MACHINE_CONFIG_EXTERN( m4_audio ); |
234 | 252 | |
235 | 253 | MACHINE_CONFIG_EXTERN( clowns_audio ); |
236 | DECLARE_WRITE8_DEVICE_HANDLER( clowns_audio_2_w ); | |
237 | 254 | |
238 | 255 | MACHINE_CONFIG_EXTERN( spacwalk_audio ); |
239 | DECLARE_WRITE8_DEVICE_HANDLER( spacwalk_audio_1_w ); | |
240 | DECLARE_WRITE8_DEVICE_HANDLER( spacwalk_audio_2_w ); | |
241 | 256 | |
242 | 257 | MACHINE_CONFIG_EXTERN( shuffle_audio ); |
243 | DECLARE_WRITE8_DEVICE_HANDLER( shuffle_audio_1_w ); | |
244 | DECLARE_WRITE8_DEVICE_HANDLER( shuffle_audio_2_w ); | |
245 | 258 | |
246 | 259 | MACHINE_CONFIG_EXTERN( dogpatch_audio ); |
247 | DECLARE_WRITE8_DEVICE_HANDLER( dogpatch_audio_w ); | |
248 | 260 | |
249 | 261 | MACHINE_CONFIG_EXTERN( spcenctr_audio ); |
250 | DECLARE_WRITE8_DEVICE_HANDLER( spcenctr_audio_1_w ); | |
251 | DECLARE_WRITE8_DEVICE_HANDLER( spcenctr_audio_2_w ); | |
252 | DECLARE_WRITE8_DEVICE_HANDLER( spcenctr_audio_3_w ); | |
253 | 262 | |
254 | 263 | MACHINE_CONFIG_EXTERN( phantom2_audio ); |
255 | 264 | |
256 | 265 | MACHINE_CONFIG_EXTERN( bowler_audio ); |
257 | DECLARE_WRITE8_DEVICE_HANDLER( bowler_audio_1_w ); | |
258 | 266 | |
259 | 267 | MACHINE_CONFIG_EXTERN( invaders_samples_audio ); |
260 | 268 | MACHINE_CONFIG_EXTERN( invaders_audio ); |
261 | DECLARE_WRITE8_DEVICE_HANDLER( invaders_audio_1_w ); | |
262 | DECLARE_WRITE8_DEVICE_HANDLER( invaders_audio_2_w ); | |
263 | 269 | |
264 | 270 | MACHINE_CONFIG_EXTERN( blueshrk_audio ); |
265 | DECLARE_WRITE8_DEVICE_HANDLER( blueshrk_audio_w ); | |
266 | 271 | |
267 | 272 | MACHINE_CONFIG_EXTERN( invad2ct_audio ); |
268 | DECLARE_WRITE8_DEVICE_HANDLER( invad2ct_audio_1_w ); | |
269 | DECLARE_WRITE8_DEVICE_HANDLER( invad2ct_audio_2_w ); | |
270 | DECLARE_WRITE8_DEVICE_HANDLER( invad2ct_audio_3_w ); | |
271 | DECLARE_WRITE8_DEVICE_HANDLER( invad2ct_audio_4_w ); |
r18185 | r18186 | |
---|---|---|
9 | 9 | m_pos_h_ram(*this, "pos_h_ram"), |
10 | 10 | m_pos_v_ram(*this, "pos_v_ram"), |
11 | 11 | m_pos_d_ram(*this, "pos_d_ram"), |
12 | m_team(*this, "team"){ } | |
12 | m_team(*this, "team"), | |
13 | m_discrete(*this, "discrete"){ } | |
13 | 14 | |
14 | 15 | int m_steer_dir[8]; |
15 | 16 | int m_steer_flag[8]; |
r18185 | r18186 | |
21 | 22 | required_shared_ptr<UINT8> m_pos_v_ram; |
22 | 23 | required_shared_ptr<UINT8> m_pos_d_ram; |
23 | 24 | required_shared_ptr<UINT8> m_team; |
25 | required_device<discrete_device> m_discrete; | |
24 | 26 | tilemap_t* m_tilemap1; |
25 | 27 | tilemap_t* m_tilemap2; |
26 | 28 | bitmap_ind16 m_helper1; |
r18185 | r18186 | |
39 | 41 | void screen_eof_sprint8(screen_device &screen, bool state); |
40 | 42 | TIMER_CALLBACK_MEMBER(sprint8_collision_callback); |
41 | 43 | TIMER_DEVICE_CALLBACK_MEMBER(input_callback); |
44 | DECLARE_WRITE8_MEMBER(sprint8_crash_w); | |
45 | DECLARE_WRITE8_MEMBER(sprint8_screech_w); | |
46 | DECLARE_WRITE8_MEMBER(sprint8_attract_w); | |
47 | DECLARE_WRITE8_MEMBER(sprint8_motor_w); | |
42 | 48 | }; |
43 | 49 | |
44 | 50 | /*----------- defined in drivers/sprint8.c -----------*/ |
r18185 | r18186 | |
47 | 53 | /*----------- defined in audio/sprint8.c -----------*/ |
48 | 54 | |
49 | 55 | DISCRETE_SOUND_EXTERN( sprint8 ); |
50 | ||
51 | DECLARE_WRITE8_DEVICE_HANDLER( sprint8_crash_w ); | |
52 | DECLARE_WRITE8_DEVICE_HANDLER( sprint8_screech_w ); | |
53 | DECLARE_WRITE8_DEVICE_HANDLER( sprint8_attract_w ); | |
54 | DECLARE_WRITE8_DEVICE_HANDLER( sprint8_motor_w ); |
r18185 | r18186 | |
---|---|---|
12 | 12 | public: |
13 | 13 | avalnche_state(const machine_config &mconfig, device_type type, const char *tag) |
14 | 14 | : driver_device(mconfig, type, tag) , |
15 | m_videoram(*this, "videoram"){ } | |
15 | m_videoram(*this, "videoram"), | |
16 | m_discrete(*this, "discrete") { } | |
16 | 17 | |
17 | 18 | /* video-related */ |
18 | 19 | required_shared_ptr<UINT8> m_videoram; |
20 | required_device<discrete_device> m_discrete; | |
19 | 21 | |
20 | 22 | UINT8 m_avalance_video_inverted; |
21 | 23 | DECLARE_WRITE8_MEMBER(avalance_video_invert_w); |
r18185 | r18186 | |
26 | 28 | virtual void machine_start(); |
27 | 29 | virtual void machine_reset(); |
28 | 30 | UINT32 screen_update_avalnche(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
31 | DECLARE_WRITE8_MEMBER(avalnche_noise_amplitude_w); | |
32 | DECLARE_WRITE8_MEMBER(avalnche_attract_enable_w); | |
33 | DECLARE_WRITE8_MEMBER(avalnche_audio_w); | |
34 | DECLARE_WRITE8_MEMBER(catch_audio_w); | |
29 | 35 | }; |
30 | 36 | |
31 | 37 | /*----------- defined in audio/avalnche.c -----------*/ |
32 | ||
33 | 38 | DISCRETE_SOUND_EXTERN( avalnche ); |
34 | DECLARE_WRITE8_DEVICE_HANDLER( avalnche_noise_amplitude_w ); | |
35 | DECLARE_WRITE8_DEVICE_HANDLER( avalnche_attract_enable_w ); | |
36 | DECLARE_WRITE8_DEVICE_HANDLER( avalnche_audio_w ); | |
37 | 39 | |
38 | DECLARE_WRITE8_HANDLER( catch_audio_w ); |
r18185 | r18186 | |
---|---|---|
22 | 22 | public: |
23 | 23 | canyon_state(const machine_config &mconfig, device_type type, const char *tag) |
24 | 24 | : driver_device(mconfig, type, tag) , |
25 | m_videoram(*this, "videoram"){ } | |
25 | m_videoram(*this, "videoram"), | |
26 | m_discrete(*this, "discrete"){ } | |
26 | 27 | |
27 | 28 | /* memory pointers */ |
28 | 29 | required_shared_ptr<UINT8> m_videoram; |
29 | 30 | |
31 | required_device<discrete_device> m_discrete; | |
32 | ||
30 | 33 | /* video-related */ |
31 | 34 | tilemap_t *m_bg_tilemap; |
32 | 35 | DECLARE_READ8_MEMBER(canyon_switches_r); |
r18185 | r18186 | |
37 | 40 | virtual void video_start(); |
38 | 41 | virtual void palette_init(); |
39 | 42 | UINT32 screen_update_canyon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
43 | DECLARE_WRITE8_MEMBER(canyon_motor_w); | |
44 | DECLARE_WRITE8_MEMBER(canyon_explode_w); | |
45 | DECLARE_WRITE8_MEMBER(canyon_attract_w); | |
46 | DECLARE_WRITE8_MEMBER(canyon_whistle_w); | |
40 | 47 | }; |
41 | 48 | |
42 | 49 | |
43 | 50 | /*----------- defined in audio/canyon.c -----------*/ |
44 | ||
45 | DECLARE_WRITE8_DEVICE_HANDLER( canyon_motor_w ); | |
46 | DECLARE_WRITE8_DEVICE_HANDLER( canyon_explode_w ); | |
47 | DECLARE_WRITE8_DEVICE_HANDLER( canyon_attract_w ); | |
48 | DECLARE_WRITE8_DEVICE_HANDLER( canyon_whistle_w ); | |
49 | ||
50 | 51 | DISCRETE_SOUND_EXTERN( canyon ); |
r18185 | r18186 | |
---|---|---|
6 | 6 | |
7 | 7 | #include "sound/dac.h" |
8 | 8 | #include "sound/sn76496.h" |
9 | ||
9 | #include "sound/discrete.h" | |
10 | 10 | class circusc_state : public driver_device |
11 | 11 | { |
12 | 12 | public: |
r18185 | r18186 | |
19 | 19 | m_spriteram_2(*this, "spriteram_2"), |
20 | 20 | m_spriteram(*this, "spriteram"), |
21 | 21 | m_sn_1(*this, "sn1"), |
22 | m_sn_2(*this, "sn2"){ } | |
22 | m_sn_2(*this, "sn2"), | |
23 | m_discrete(*this, "discrete"){ } | |
23 | 24 | |
24 | 25 | /* memory pointers */ |
25 | 26 | required_shared_ptr<UINT8> m_spritebank; |
r18185 | r18186 | |
40 | 41 | required_device<sn76496_new_device> m_sn_1; |
41 | 42 | required_device<sn76496_new_device> m_sn_2; |
42 | 43 | dac_device *m_dac; |
43 | device | |
44 | required_device<discrete_device> m_discrete; | |
44 | 45 | |
45 | 46 | UINT8 m_irq_mask; |
46 | 47 | DECLARE_READ8_MEMBER(circusc_sh_timer_r); |
r18185 | r18186 | |
---|---|---|
6 | 6 | public: |
7 | 7 | blockade_state(const machine_config &mconfig, device_type type, const char *tag) |
8 | 8 | : driver_device(mconfig, type, tag) , |
9 | m_videoram(*this, "videoram"){ } | |
9 | m_videoram(*this, "videoram"), | |
10 | m_discrete(*this, "discrete"){ } | |
10 | 11 | |
11 | 12 | required_shared_ptr<UINT8> m_videoram; |
12 | ||
13 | required_device<discrete_device> m_discrete; | |
13 | 14 | /* video-related */ |
14 | 15 | tilemap_t *m_bg_tilemap; |
15 | 16 | |
r18185 | r18186 | |
28 | 29 | virtual void palette_init(); |
29 | 30 | UINT32 screen_update_blockade(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
30 | 31 | INTERRUPT_GEN_MEMBER(blockade_interrupt); |
32 | DECLARE_WRITE8_MEMBER(blockade_sound_freq_w); | |
31 | 33 | }; |
32 | 34 | |
33 | 35 | /*----------- defined in audio/blockade.c -----------*/ |
34 | 36 | |
35 | 37 | extern const samples_interface blockade_samples_interface; |
36 | 38 | DISCRETE_SOUND_EXTERN( blockade ); |
37 | ||
38 | DECLARE_WRITE8_DEVICE_HANDLER( blockade_sound_freq_w ); |
r18185 | r18186 | |
---|---|---|
102 | 102 | INTERRUPT_GEN_MEMBER(segag80r_vblank_start); |
103 | 103 | INTERRUPT_GEN_MEMBER(sindbadm_vblank_start); |
104 | 104 | TIMER_CALLBACK_MEMBER(vblank_latch_clear); |
105 | DECLARE_WRITE8_MEMBER(sega005_sound_a_w); | |
106 | DECLARE_WRITE8_MEMBER(sega005_sound_b_w); | |
107 | DECLARE_WRITE8_MEMBER(monsterb_sound_a_w); | |
108 | DECLARE_WRITE8_MEMBER(monsterb_sound_b_w); | |
109 | DECLARE_READ8_MEMBER(n7751_status_r); | |
110 | DECLARE_WRITE8_MEMBER(n7751_command_w); | |
111 | DECLARE_WRITE8_MEMBER(n7751_rom_control_w); | |
112 | DECLARE_WRITE8_MEMBER(n7751_p2_w); | |
105 | 113 | }; |
106 | 114 | |
107 | 115 |
r18185 | r18186 | |
---|---|---|
4 | 4 | |
5 | 5 | *************************************************************************/ |
6 | 6 | |
7 | #include "sound/discrete.h" | |
7 | 8 | |
8 | 9 | #define CRBALOON_MASTER_XTAL (XTAL_9_987MHz) |
9 | 10 | |
r18185 | r18186 | |
16 | 17 | m_videoram(*this, "videoram"), |
17 | 18 | m_colorram(*this, "colorram"), |
18 | 19 | m_spriteram(*this, "spriteram"), |
19 | m_pc3092_data(*this, "pc3092_data"){ } | |
20 | m_pc3092_data(*this, "pc3092_data"), | |
21 | m_discrete(*this, "discrete"){ } | |
20 | 22 | |
21 | 23 | required_shared_ptr<UINT8> m_videoram; |
22 | 24 | required_shared_ptr<UINT8> m_colorram; |
23 | 25 | required_shared_ptr<UINT8> m_spriteram; |
24 | 26 | required_shared_ptr<UINT8> m_pc3092_data; |
27 | required_device<discrete_device> m_discrete; | |
25 | 28 | UINT16 m_collision_address; |
26 | 29 | UINT8 m_collision_address_clear; |
27 | 30 | tilemap_t *m_bg_tilemap; |
r18185 | r18186 | |
38 | 41 | virtual void palette_init(); |
39 | 42 | UINT32 screen_update_crbaloon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
40 | 43 | INTERRUPT_GEN_MEMBER(vblank_irq); |
44 | DECLARE_WRITE8_MEMBER(crbaloon_audio_set_music_freq); | |
45 | DECLARE_WRITE8_MEMBER(crbaloon_audio_set_music_enable); | |
46 | DECLARE_WRITE8_MEMBER(crbaloon_audio_set_laugh_enable); | |
41 | 47 | }; |
42 | 48 | |
43 | 49 | |
44 | 50 | /*----------- defined in audio/crbaloon.c -----------*/ |
45 | 51 | |
46 | DECLARE_WRITE8_DEVICE_HANDLER( crbaloon_audio_set_music_freq ); | |
47 | DECLARE_WRITE8_DEVICE_HANDLER( crbaloon_audio_set_music_enable ); | |
48 | 52 | void crbaloon_audio_set_explosion_enable(device_t *sn, int enabled); |
49 | 53 | void crbaloon_audio_set_breath_enable(device_t *sn, int enabled); |
50 | 54 | void crbaloon_audio_set_appear_enable(device_t *sn, int enabled); |
51 | DECLARE_WRITE8_DEVICE_HANDLER( crbaloon_audio_set_laugh_enable ); | |
52 | 55 | MACHINE_CONFIG_EXTERN( crbaloon_audio ); |
53 | 56 | |
54 | 57 | /*----------- defined in video/crbaloon.c -----------*/ |
r18185 | r18186 | |
---|---|---|
9 | 9 | #include "video/mc6845.h" |
10 | 10 | #include "machine/6821pia.h" |
11 | 11 | #include "sound/sn76496.h" |
12 | #include "sound/discrete.h" | |
12 | 13 | |
13 | ||
14 | 14 | #define MAIN_CLOCK_OSC 20000000 /* 20 MHz */ |
15 | 15 | #define SLITHER_CLOCK_OSC 21300000 /* 21.3 MHz */ |
16 | 16 | #define SOUND_CLOCK_OSC 7372800 /* 7.3728 MHz */ |
r18185 | r18186 | |
33 | 33 | m_videoram_address(*this, "videoram_addr"), |
34 | 34 | m_videoram_mask(*this, "videoram_mask"), |
35 | 35 | m_paletteram(*this, "paletteram"), |
36 | m_scanline_latch(*this, "scanline_latch") { } | |
36 | m_scanline_latch(*this, "scanline_latch"), | |
37 | m_discrete(*this, "discrete") { } | |
37 | 38 | |
38 | 39 | /* devices */ |
39 | 40 | optional_device<sn76489_new_device> m_sn1; |
r18185 | r18186 | |
54 | 55 | UINT8 m_palette_bank; |
55 | 56 | UINT8 m_leds; |
56 | 57 | required_shared_ptr<UINT8> m_scanline_latch; |
58 | required_device<discrete_device> m_discrete; | |
57 | 59 | pen_t m_pens[NUM_PENS]; |
58 | 60 | DECLARE_WRITE8_MEMBER(zookeep_bankswitch_w); |
59 | 61 | DECLARE_WRITE8_MEMBER(qix_data_firq_w); |
r18185 | r18186 | |
97 | 99 | DECLARE_READ8_MEMBER(slither_trak_ud_r); |
98 | 100 | DECLARE_WRITE_LINE_MEMBER(display_enable_changed); |
99 | 101 | DECLARE_WRITE8_MEMBER(qix_flip_screen_w); |
102 | DECLARE_WRITE8_MEMBER(qix_dac_w); | |
103 | DECLARE_WRITE8_MEMBER(qix_vol_w); | |
104 | DECLARE_WRITE8_MEMBER(sndpia_2_warning_w); | |
105 | DECLARE_WRITE8_MEMBER(sync_sndpia1_porta_w); | |
106 | DECLARE_WRITE8_MEMBER(slither_coinctl_w); | |
107 | DECLARE_WRITE_LINE_MEMBER(qix_pia_dint); | |
108 | DECLARE_WRITE_LINE_MEMBER(qix_pia_sint); | |
100 | 109 | }; |
101 | 110 | |
102 | 111 |
r18185 | r18186 | |
---|---|---|
5 | 5 | *************************************************************************/ |
6 | 6 | |
7 | 7 | #include "devlegcy.h" |
8 | #include "sound/discrete.h" | |
8 | 9 | |
9 | 10 | #define BZONE_MASTER_CLOCK (XTAL_12_096MHz) |
10 | 11 | #define BZONE_CLOCK_3KHZ (MASTER_CLOCK / 4096) |
r18185 | r18186 | |
13 | 14 | { |
14 | 15 | public: |
15 | 16 | bzone_state(const machine_config &mconfig, device_type type, const char *tag) |
16 | : driver_device(mconfig, type, tag) { } | |
17 | : driver_device(mconfig, type, tag), | |
18 | m_discrete(*this, "discrete") { } | |
17 | 19 | |
20 | required_device<discrete_device> m_discrete; | |
21 | ||
18 | 22 | UINT8 m_analog_data; |
19 | 23 | UINT8 m_rb_input_select; |
20 | 24 | DECLARE_WRITE8_MEMBER(bzone_coin_counter_w); |
r18185 | r18186 | |
27 | 31 | virtual void machine_start(); |
28 | 32 | DECLARE_MACHINE_START(redbaron); |
29 | 33 | INTERRUPT_GEN_MEMBER(bzone_interrupt); |
34 | DECLARE_WRITE8_MEMBER(bzone_sounds_w); | |
30 | 35 | }; |
31 | 36 | |
32 | 37 | |
33 | 38 | /*----------- defined in audio/bzone.c -----------*/ |
34 | ||
35 | DECLARE_WRITE8_DEVICE_HANDLER( bzone_sounds_w ); | |
36 | ||
37 | 39 | MACHINE_CONFIG_EXTERN( bzone_audio ); |
38 | 40 | |
39 | 41 | /*----------- defined in audio/redbaron.c -----------*/ |
r18185 | r18186 | |
---|---|---|
21 | 21 | orbit_state(const machine_config &mconfig, device_type type, const char *tag) |
22 | 22 | : driver_device(mconfig, type, tag) , |
23 | 23 | m_playfield_ram(*this, "playfield_ram"), |
24 | m_sprite_ram(*this, "sprite_ram"){ } | |
24 | m_sprite_ram(*this, "sprite_ram"), | |
25 | m_discrete(*this, "discrete"){ } | |
25 | 26 | |
26 | 27 | /* memory pointers */ |
27 | 28 | required_shared_ptr<UINT8> m_playfield_ram; |
28 | 29 | required_shared_ptr<UINT8> m_sprite_ram; |
30 | ||
31 | required_device<discrete_device> m_discrete; | |
29 | 32 | |
30 | 33 | /* video-related */ |
31 | 34 | tilemap_t *m_bg_tilemap; |
r18185 | r18186 | |
36 | 39 | |
37 | 40 | /* devices */ |
38 | 41 | cpu_device *m_maincpu; |
39 | device_t *m_discrete; | |
40 | 42 | DECLARE_WRITE8_MEMBER(orbit_misc_w); |
41 | 43 | DECLARE_WRITE8_MEMBER(orbit_playfield_w); |
42 | 44 | TILE_GET_INFO_MEMBER(get_tile_info); |
r18185 | r18186 | |
47 | 49 | INTERRUPT_GEN_MEMBER(orbit_interrupt); |
48 | 50 | TIMER_CALLBACK_MEMBER(irq_off); |
49 | 51 | TIMER_DEVICE_CALLBACK_MEMBER(nmi_32v); |
52 | DECLARE_WRITE8_MEMBER(orbit_note_w); | |
53 | DECLARE_WRITE8_MEMBER(orbit_note_amp_w); | |
54 | DECLARE_WRITE8_MEMBER(orbit_noise_amp_w); | |
55 | DECLARE_WRITE8_MEMBER(orbit_noise_rst_w); | |
50 | 56 | }; |
51 | 57 | /*----------- defined in audio/orbit.c -----------*/ |
52 | DECLARE_WRITE8_DEVICE_HANDLER( orbit_note_w ); | |
53 | DECLARE_WRITE8_DEVICE_HANDLER( orbit_note_amp_w ); | |
54 | DECLARE_WRITE8_DEVICE_HANDLER( orbit_noise_amp_w ); | |
55 | DECLARE_WRITE8_DEVICE_HANDLER( orbit_noise_rst_w ); | |
58 | ||
56 | 59 | DISCRETE_SOUND_EXTERN( orbit ); |
r18185 | r18186 | |
---|---|---|
5 | 5 | public: |
6 | 6 | circus_state(const machine_config &mconfig, device_type type, const char *tag) |
7 | 7 | : driver_device(mconfig, type, tag) , |
8 | m_videoram(*this, "videoram"){ } | |
8 | m_videoram(*this, "videoram"), | |
9 | m_discrete(*this, "discrete"){ } | |
9 | 10 | |
10 | 11 | /* memory pointers */ |
11 | 12 | required_shared_ptr<UINT8> m_videoram; |
r18185 | r18186 | |
19 | 20 | /* devices */ |
20 | 21 | cpu_device *m_maincpu; |
21 | 22 | samples_device *m_samples; |
22 | device | |
23 | required_device<discrete_device> m_discrete; | |
23 | 24 | |
24 | 25 | /* game id */ |
25 | 26 | int m_game_id; |
r18185 | r18186 | |
---|---|---|
12 | 12 | asteroid_state(const machine_config &mconfig, device_type type, const char *tag) |
13 | 13 | : driver_device(mconfig, type, tag) , |
14 | 14 | m_ram1(*this, "ram1"), |
15 | m_ram2(*this, "ram2"){ } | |
15 | m_ram2(*this, "ram2"), | |
16 | m_discrete(*this, "discrete") { } | |
16 | 17 | |
17 | 18 | optional_shared_ptr<UINT8> m_ram1; |
18 | 19 | optional_shared_ptr<UINT8> m_ram2; |
20 | required_device<discrete_device> m_discrete; | |
19 | 21 | DECLARE_WRITE8_MEMBER(astdelux_coin_counter_w); |
20 | 22 | DECLARE_WRITE8_MEMBER(llander_led_w); |
21 | 23 | DECLARE_READ8_MEMBER(asteroid_IN0_r); |
r18185 | r18186 | |
32 | 34 | INTERRUPT_GEN_MEMBER(asteroid_interrupt); |
33 | 35 | INTERRUPT_GEN_MEMBER(asterock_interrupt); |
34 | 36 | INTERRUPT_GEN_MEMBER(llander_interrupt); |
37 | DECLARE_WRITE8_MEMBER(asteroid_explode_w); | |
38 | DECLARE_WRITE8_MEMBER(asteroid_thump_w); | |
39 | DECLARE_WRITE8_MEMBER(asteroid_sounds_w); | |
40 | DECLARE_WRITE8_MEMBER(astdelux_sounds_w); | |
41 | DECLARE_WRITE8_MEMBER(asteroid_noise_reset_w); | |
42 | DECLARE_WRITE8_MEMBER(llander_snd_reset_w); | |
43 | DECLARE_WRITE8_MEMBER(llander_sounds_w); | |
35 | 44 | }; |
36 | 45 | |
37 | 46 | /*----------- defined in audio/asteroid.c -----------*/ |
r18185 | r18186 | |
39 | 48 | DISCRETE_SOUND_EXTERN( asteroid ); |
40 | 49 | DISCRETE_SOUND_EXTERN( astdelux ); |
41 | 50 | |
42 | DECLARE_WRITE8_DEVICE_HANDLER( asteroid_explode_w ); | |
43 | DECLARE_WRITE8_DEVICE_HANDLER( asteroid_thump_w ); | |
44 | DECLARE_WRITE8_DEVICE_HANDLER( asteroid_sounds_w ); | |
45 | DECLARE_WRITE8_DEVICE_HANDLER( asteroid_noise_reset_w ); | |
46 | DECLARE_WRITE8_DEVICE_HANDLER( astdelux_sounds_w ); | |
47 | ||
48 | ||
49 | 51 | /*----------- defined in audio/llander.c -----------*/ |
50 | 52 | |
51 | 53 | DISCRETE_SOUND_EXTERN( llander ); |
52 | ||
53 | DECLARE_WRITE8_DEVICE_HANDLER( llander_snd_reset_w ); | |
54 | DECLARE_WRITE8_DEVICE_HANDLER( llander_sounds_w ); |
r18185 | r18186 | |
---|---|---|
117 | 117 | INTERRUPT_GEN_MEMBER(micro3d_vblank); |
118 | 118 | TIMER_CALLBACK_MEMBER(mac_done_callback); |
119 | 119 | TIMER_CALLBACK_MEMBER(adc_done_callback); |
120 | DECLARE_WRITE8_MEMBER(micro3d_upd7759_w); | |
120 | 121 | }; |
121 | 122 | |
122 | 123 | struct micro3d_vtx |
r18185 | r18186 | |
134 | 135 | |
135 | 136 | /*----------- defined in audio/micro3d.c -----------*/ |
136 | 137 | |
137 | DECLARE_WRITE8_DEVICE_HANDLER( micro3d_upd7759_w ); | |
138 | ||
139 | 138 | void micro3d_noise_sh_w(running_machine &machine, UINT8 data); |
140 | 139 | |
141 | 140 | class micro3d_sound_device : public device_t, |
r18185 | r18186 | |
---|---|---|
15 | 15 | : driver_device(mconfig, type, tag) , |
16 | 16 | m_playfield_ram(*this, "playfield_ram"), |
17 | 17 | m_hpos_ram(*this, "hpos_ram"), |
18 | m_vpos_ram(*this, "vpos_ram"){ } | |
18 | m_vpos_ram(*this, "vpos_ram"), | |
19 | m_discrete(*this, "discrete"){ } | |
19 | 20 | |
20 | 21 | int m_da_latch; |
21 | 22 | required_shared_ptr<UINT8> m_playfield_ram; |
22 | 23 | required_shared_ptr<UINT8> m_hpos_ram; |
23 | 24 | required_shared_ptr<UINT8> m_vpos_ram; |
25 | required_device<discrete_device> m_discrete; | |
24 | 26 | tilemap_t* m_bg_tilemap; |
25 | 27 | DECLARE_WRITE8_MEMBER(poolshrk_da_latch_w); |
26 | 28 | DECLARE_WRITE8_MEMBER(poolshrk_led_w); |
r18185 | r18186 | |
32 | 34 | virtual void video_start(); |
33 | 35 | virtual void palette_init(); |
34 | 36 | UINT32 screen_update_poolshrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
37 | DECLARE_WRITE8_MEMBER(poolshrk_scratch_sound_w); | |
38 | DECLARE_WRITE8_MEMBER(poolshrk_score_sound_w); | |
39 | DECLARE_WRITE8_MEMBER(poolshrk_click_sound_w); | |
40 | DECLARE_WRITE8_MEMBER(poolshrk_bump_sound_w); | |
35 | 41 | }; |
36 | 42 | |
37 | 43 | |
38 | 44 | /*----------- defined in audio/poolshrk.c -----------*/ |
39 | ||
40 | DECLARE_WRITE8_DEVICE_HANDLER( poolshrk_scratch_sound_w ); | |
41 | DECLARE_WRITE8_DEVICE_HANDLER( poolshrk_score_sound_w ); | |
42 | DECLARE_WRITE8_DEVICE_HANDLER( poolshrk_click_sound_w ); | |
43 | DECLARE_WRITE8_DEVICE_HANDLER( poolshrk_bump_sound_w ); | |
44 | 45 | DISCRETE_SOUND_EXTERN( poolshrk ); |
r18185 | r18186 | |
---|---|---|
274 | 274 | static ADDRESS_MAP_START( soundmem_io, AS_IO, 8, micro3d_state ) |
275 | 275 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
276 | 276 | AM_RANGE(0xfd00, 0xfd01) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_r, ym2151_w) |
277 | AM_RANGE(0xfe00, 0xfe00) AM_ | |
277 | AM_RANGE(0xfe00, 0xfe00) AM_WRITE(micro3d_upd7759_w) | |
278 | 278 | AM_RANGE(0xff00, 0xff00) AM_WRITE(micro3d_snd_dac_a) |
279 | 279 | AM_RANGE(0xff01, 0xff01) AM_WRITE(micro3d_snd_dac_b) |
280 | 280 | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P3) AM_READWRITE(micro3d_sound_io_r, micro3d_sound_io_w) |
r18185 | r18186 | |
---|---|---|
679 | 679 | |
680 | 680 | |
681 | 681 | static ADDRESS_MAP_START( driversnd_dsp_io_map, AS_IO, 16, harddriv_state ) |
682 | AM_RANGE(0, 0) AM_READ(hdsnddsp_rom_r | |
682 | AM_RANGE(0, 0) AM_READWRITE(hdsnddsp_rom_r, hdsnddsp_dac_w) | |
683 | 683 | AM_RANGE(1, 1) AM_READ(hdsnddsp_comram_r) |
684 | 684 | AM_RANGE(2, 2) AM_READ(hdsnddsp_compare_r) |
685 | 685 | AM_RANGE(1, 2) AM_WRITENOP |
r18185 | r18186 | |
---|---|---|
470 | 470 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") |
471 | 471 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ_PORT("IN3") |
472 | 472 | |
473 | AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("discrete", invaders_audio_1_w) | |
474 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", invaders_audio_2_w) | |
473 | AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) | |
474 | AM_RANGE(0x05, 0x05) AM_WRITE(invaders_audio_2_w) | |
475 | 475 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
476 | 476 | ADDRESS_MAP_END |
477 | 477 | |
r18185 | r18186 | |
1393 | 1393 | static ADDRESS_MAP_START( polaris_io_map, AS_IO, 8, _8080bw_state ) |
1394 | 1394 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1395 | 1395 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
1396 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_ | |
1396 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(polaris_sh_port_1_w) | |
1397 | 1397 | AM_RANGE(0x03, 0x03) AM_DEVREADWRITE_LEGACY("mb14241", mb14241_shift_result_r, mb14241_shift_data_w) |
1398 | AM_RANGE(0x04, 0x04) AM_ | |
1398 | AM_RANGE(0x04, 0x04) AM_WRITE(polaris_sh_port_2_w) | |
1399 | 1399 | AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w) |
1400 | AM_RANGE(0x06, 0x06) AM_ | |
1400 | AM_RANGE(0x06, 0x06) AM_WRITE(polaris_sh_port_3_w) | |
1401 | 1401 | ADDRESS_MAP_END |
1402 | 1402 | |
1403 | 1403 | |
r18185 | r18186 | |
1748 | 1748 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1749 | 1749 | AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w) |
1750 | 1750 | AM_RANGE(0x06, 0x06) AM_WRITENOP /* sound ? */ |
1751 | AM_RANGE(0x07, 0x07) AM_ | |
1751 | AM_RANGE(0x07, 0x07) AM_WRITE(indianbt_sh_port_3_w) | |
1752 | 1752 | ADDRESS_MAP_END |
1753 | 1753 | |
1754 | 1754 | |
r18185 | r18186 | |
2103 | 2103 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
2104 | 2104 | |
2105 | 2105 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2106 | AM_RANGE(0x01, 0x01) AM_ | |
2106 | AM_RANGE(0x01, 0x01) AM_WRITE(invaders_audio_1_w) | |
2107 | 2107 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2108 | AM_RANGE(0x07, 0x07) AM_ | |
2108 | AM_RANGE(0x07, 0x07) AM_WRITE(invaders_audio_2_w) | |
2109 | 2109 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2110 | 2110 | ADDRESS_MAP_END |
2111 | 2111 |
r18185 | r18186 | |
---|---|---|
311 | 311 | AM_RANGE(0x1810, 0x1810) AM_DEVREAD_LEGACY("mathbox", mathbox_lo_r) |
312 | 312 | AM_RANGE(0x1818, 0x1818) AM_DEVREAD_LEGACY("mathbox", mathbox_hi_r) |
313 | 313 | AM_RANGE(0x1820, 0x182f) AM_DEVREADWRITE("pokey", pokey_device, read, write) |
314 | AM_RANGE(0x1840, 0x1840) AM_ | |
314 | AM_RANGE(0x1840, 0x1840) AM_WRITE(bzone_sounds_w) | |
315 | 315 | AM_RANGE(0x1860, 0x187f) AM_DEVWRITE_LEGACY("mathbox", mathbox_go_w) |
316 | 316 | AM_RANGE(0x2000, 0x2fff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x2000) |
317 | 317 | AM_RANGE(0x3000, 0x7fff) AM_ROM |
r18185 | r18186 | |
---|---|---|
326 | 326 | DEVCB_NULL, /* line CB1 in */ |
327 | 327 | DEVCB_NULL, /* line CA2 in */ |
328 | 328 | DEVCB_NULL, /* line CB2 in */ |
329 | DEVCB_DEVICE_HANDLER("discrete", spiders_audio_ctrl_w), /* port A out */ | |
330 | DEVCB_DEVICE_HANDLER("pia4", spiders_audio_command_w), /* port B out */ | |
329 | DEVCB_DRIVER_MEMBER(spiders_state, spiders_audio_ctrl_w), /* port A out */ | |
330 | DEVCB_DRIVER_MEMBER(spiders_state, spiders_audio_command_w), /* port B out */ | |
331 | 331 | DEVCB_NULL, /* line CA2 out */ |
332 | 332 | DEVCB_NULL, /* port CB2 out */ |
333 | 333 | DEVCB_DRIVER_LINE_MEMBER(spiders_state,main_cpu_irq), /* IRQA */ |
r18185 | r18186 | |
350 | 350 | DEVCB_NULL, /* line CB1 in */ |
351 | 351 | DEVCB_NULL, /* line CA2 in */ |
352 | 352 | DEVCB_NULL, /* line CB2 in */ |
353 | DEVCB_DEVICE_HANDLER("discrete", spiders_audio_a_w), /* port A out */ | |
354 | DEVCB_DEVICE_HANDLER("discrete", spiders_audio_b_w), /* port B out */ | |
353 | DEVCB_DRIVER_MEMBER(spiders_state, spiders_audio_a_w), /* port A out */ | |
354 | DEVCB_DRIVER_MEMBER(spiders_state, spiders_audio_b_w), /* port B out */ | |
355 | 355 | DEVCB_NULL, /* line CA2 out */ |
356 | 356 | DEVCB_NULL, /* port CB2 out */ |
357 | 357 | DEVCB_DRIVER_LINE_MEMBER(spiders_state,audio_cpu_irq), /* IRQA */ |
r18185 | r18186 | |
---|---|---|
110 | 110 | AM_RANGE(0x1c20, 0x1c2f) AM_WRITEONLY AM_SHARE("pos_d_ram") |
111 | 111 | AM_RANGE(0x1c30, 0x1c37) AM_WRITE(sprint8_lockout_w) |
112 | 112 | AM_RANGE(0x1d00, 0x1d00) AM_WRITE(sprint8_int_reset_w) |
113 | AM_RANGE(0x1d01, 0x1d01) AM_DEVWRITE_LEGACY("discrete", sprint8_crash_w) | |
114 | AM_RANGE(0x1d02, 0x1d02) AM_DEVWRITE_LEGACY("discrete", sprint8_screech_w) | |
113 | AM_RANGE(0x1d01, 0x1d01) AM_WRITE(sprint8_crash_w) | |
114 | AM_RANGE(0x1d02, 0x1d02) AM_WRITE(sprint8_screech_w) | |
115 | 115 | AM_RANGE(0x1d03, 0x1d03) AM_WRITENOP |
116 | 116 | AM_RANGE(0x1d04, 0x1d04) AM_WRITENOP |
117 | 117 | AM_RANGE(0x1d05, 0x1d05) AM_WRITEONLY AM_SHARE("team") |
118 | AM_RANGE(0x1d06, 0x1d06) AM_DEVWRITE_LEGACY("discrete", sprint8_attract_w) | |
119 | AM_RANGE(0x1e00, 0x1e07) AM_DEVWRITE_LEGACY("discrete", sprint8_motor_w) | |
118 | AM_RANGE(0x1d06, 0x1d06) AM_WRITE(sprint8_attract_w) | |
119 | AM_RANGE(0x1e00, 0x1e07) AM_WRITE(sprint8_motor_w) | |
120 | 120 | AM_RANGE(0x1f00, 0x1f00) AM_WRITENOP /* probably a watchdog, disabled in service mode */ |
121 | 121 | AM_RANGE(0x2000, 0x3fff) AM_ROM |
122 | 122 | AM_RANGE(0xf800, 0xffff) AM_ROM |
r18185 | r18186 | |
---|---|---|
61 | 61 | |
62 | 62 | m_audiocpu = machine().device<cpu_device>("audiocpu"); |
63 | 63 | m_dac = machine().device<dac_device>("dac"); |
64 | m_discrete = machine().device("fltdisc"); | |
65 | 64 | |
66 | 65 | save_item(NAME(m_sn_latch)); |
67 | 66 | } |
r18185 | r18186 | |
---|---|---|
266 | 266 | |
267 | 267 | m_maincpu = machine().device<cpu_device>("maincpu"); |
268 | 268 | m_samples = machine().device<samples_device>("samples"); |
269 | m_discrete = machine().device("discrete"); | |
270 | 269 | |
271 | 270 | save_item(NAME(m_clown_x)); |
272 | 271 | save_item(NAME(m_clown_y)); |
r18185 | r18186 | |
---|---|---|
618 | 618 | { |
619 | 619 | |
620 | 620 | if (offset & 0x01) |
621 | tornbase_audio_w( | |
621 | tornbase_audio_w(space, 0, data); | |
622 | 622 | |
623 | 623 | if (offset & 0x02) |
624 | 624 | mb14241_shift_count_w(m_mb14241, space, 0, data); |
r18185 | r18186 | |
991 | 991 | |
992 | 992 | AM_RANGE(0x01, 0x01) AM_WRITE(mw8080bw_reversable_shift_count_w) |
993 | 993 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
994 | AM_RANGE(0x03, 0x03) AM_ | |
994 | AM_RANGE(0x03, 0x03) AM_WRITE(boothill_audio_w) | |
995 | 995 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
996 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
997 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
996 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
997 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
998 | 998 | ADDRESS_MAP_END |
999 | 999 | |
1000 | 1000 | |
r18185 | r18186 | |
1069 | 1069 | WRITE8_MEMBER(mw8080bw_state::checkmat_io_w) |
1070 | 1070 | { |
1071 | 1071 | |
1072 | if (offset & 0x01) checkmat_audio_w( | |
1072 | if (offset & 0x01) checkmat_audio_w(space, 0, data); | |
1073 | 1073 | |
1074 | 1074 | if (offset & 0x02) watchdog_reset_w(space, 0, data); |
1075 | 1075 | } |
r18185 | r18186 | |
1217 | 1217 | |
1218 | 1218 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1219 | 1219 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1220 | AM_RANGE(0x03, 0x03) AM_ | |
1220 | AM_RANGE(0x03, 0x03) AM_WRITE(desertgu_audio_1_w) | |
1221 | 1221 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1222 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
1223 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
1224 | AM_RANGE(0x07, 0x07) AM_DEVWRITE_LEGACY("discrete", desertgu_audio_2_w) | |
1222 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
1223 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
1224 | AM_RANGE(0x07, 0x07) AM_WRITE(desertgu_audio_2_w) | |
1225 | 1225 | ADDRESS_MAP_END |
1226 | 1226 | |
1227 | 1227 | |
r18185 | r18186 | |
1339 | 1339 | |
1340 | 1340 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1341 | 1341 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1342 | AM_RANGE(0x03, 0x03) AM_ | |
1342 | AM_RANGE(0x03, 0x03) AM_WRITE(dplay_audio_w) | |
1343 | 1343 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1344 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
1345 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
1344 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
1345 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
1346 | 1346 | ADDRESS_MAP_END |
1347 | 1347 | |
1348 | 1348 | |
r18185 | r18186 | |
1727 | 1727 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1728 | 1728 | AM_RANGE(0x03, 0x03) AM_WRITE(clowns_audio_1_w) |
1729 | 1729 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1730 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
1731 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
1732 | AM_RANGE(0x07, 0x07) AM_DEVWRITE_LEGACY("discrete", clowns_audio_2_w) | |
1730 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
1731 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
1732 | AM_RANGE(0x07, 0x07) AM_WRITE(clowns_audio_2_w) | |
1733 | 1733 | ADDRESS_MAP_END |
1734 | 1734 | |
1735 | 1735 | |
r18185 | r18186 | |
1863 | 1863 | |
1864 | 1864 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1865 | 1865 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1866 | AM_RANGE(0x03, 0x03) AM_ | |
1866 | AM_RANGE(0x03, 0x03) AM_WRITE(spacwalk_audio_1_w) | |
1867 | 1867 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
1868 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
1869 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
1870 | AM_RANGE(0x07, 0x07) AM_DEVWRITE_LEGACY("discrete", spacwalk_audio_2_w) | |
1868 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
1869 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
1870 | AM_RANGE(0x07, 0x07) AM_WRITE(spacwalk_audio_2_w) | |
1871 | 1871 | ADDRESS_MAP_END |
1872 | 1872 | |
1873 | 1873 | static INPUT_PORTS_START( spacwalk ) |
r18185 | r18186 | |
1959 | 1959 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
1960 | 1960 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
1961 | 1961 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_WRITE(watchdog_reset_w) |
1962 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("discrete", shuffle_audio_1_w) | |
1963 | AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("discrete", shuffle_audio_2_w) | |
1962 | AM_RANGE(0x05, 0x05) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_1_w) | |
1963 | AM_RANGE(0x06, 0x06) AM_MIRROR(0x08) AM_WRITE(shuffle_audio_2_w) | |
1964 | 1964 | ADDRESS_MAP_END |
1965 | 1965 | |
1966 | 1966 | |
r18185 | r18186 | |
2036 | 2036 | |
2037 | 2037 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2038 | 2038 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2039 | AM_RANGE(0x03, 0x03) AM_ | |
2039 | AM_RANGE(0x03, 0x03) AM_WRITE(dogpatch_audio_w) | |
2040 | 2040 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2041 | AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_lo_w) | |
2042 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("discrete", midway_tone_generator_hi_w) | |
2041 | AM_RANGE(0x05, 0x05) AM_WRITE(midway_tone_generator_lo_w) | |
2042 | AM_RANGE(0x06, 0x06) AM_WRITE(midway_tone_generator_hi_w) | |
2043 | 2043 | ADDRESS_MAP_END |
2044 | 2044 | |
2045 | 2045 | |
r18185 | r18186 | |
2163 | 2163 | watchdog_reset_w(space, 0, data); /* - - - - - 0 1 0 */ |
2164 | 2164 | |
2165 | 2165 | else if ((offset & 0x5f) == 0x01) |
2166 | spcenctr_audio_1_w( | |
2166 | spcenctr_audio_1_w(space, 0, data); /* - 0 - 0 0 0 0 1 */ | |
2167 | 2167 | |
2168 | 2168 | else if ((offset & 0x5f) == 0x09) |
2169 | spcenctr_audio_2_w( | |
2169 | spcenctr_audio_2_w(space, 0, data); /* - 0 - 0 1 0 0 1 */ | |
2170 | 2170 | |
2171 | 2171 | else if ((offset & 0x5f) == 0x11) |
2172 | spcenctr_audio_3_w( | |
2172 | spcenctr_audio_3_w(space, 0, data); /* - 0 - 1 0 0 0 1 */ | |
2173 | 2173 | |
2174 | 2174 | else if ((offset & 0x07) == 0x03) |
2175 | 2175 | { /* - - - - - 0 1 1 */ |
r18185 | r18186 | |
2430 | 2430 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2431 | 2431 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2432 | 2432 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2433 | AM_RANGE(0x05, 0x05) AM_ | |
2433 | AM_RANGE(0x05, 0x05) AM_WRITE(bowler_audio_1_w) | |
2434 | 2434 | AM_RANGE(0x06, 0x06) AM_WRITE(bowler_audio_2_w) |
2435 | 2435 | AM_RANGE(0x07, 0x07) AM_WRITE(bowler_lights_1_w) |
2436 | 2436 | AM_RANGE(0x08, 0x08) AM_WRITE(bowler_audio_3_w) |
r18185 | r18186 | |
2611 | 2611 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
2612 | 2612 | |
2613 | 2613 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2614 | AM_RANGE(0x03, 0x03) AM_ | |
2614 | AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) | |
2615 | 2615 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2616 | AM_RANGE(0x05, 0x05) AM_ | |
2616 | AM_RANGE(0x05, 0x05) AM_WRITE(invaders_audio_2_w) | |
2617 | 2617 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2618 | 2618 | ADDRESS_MAP_END |
2619 | 2619 | |
r18185 | r18186 | |
2743 | 2743 | |
2744 | 2744 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2745 | 2745 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2746 | AM_RANGE(0x03, 0x03) AM_ | |
2746 | AM_RANGE(0x03, 0x03) AM_WRITE(blueshrk_audio_w) | |
2747 | 2747 | AM_RANGE(0x04, 0x04) AM_WRITE(watchdog_reset_w) |
2748 | 2748 | ADDRESS_MAP_END |
2749 | 2749 | |
r18185 | r18186 | |
2821 | 2821 | AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN2") |
2822 | 2822 | AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) |
2823 | 2823 | |
2824 | AM_RANGE(0x01, 0x01) AM_ | |
2824 | AM_RANGE(0x01, 0x01) AM_WRITE(invad2ct_audio_3_w) | |
2825 | 2825 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
2826 | AM_RANGE(0x03, 0x03) AM_ | |
2826 | AM_RANGE(0x03, 0x03) AM_WRITE(invad2ct_audio_1_w) | |
2827 | 2827 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
2828 | AM_RANGE(0x05, 0x05) AM_ | |
2828 | AM_RANGE(0x05, 0x05) AM_WRITE(invad2ct_audio_2_w) | |
2829 | 2829 | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
2830 | AM_RANGE(0x07, 0x07) AM_ | |
2830 | AM_RANGE(0x07, 0x07) AM_WRITE(invad2ct_audio_4_w) | |
2831 | 2831 | ADDRESS_MAP_END |
2832 | 2832 | |
2833 | 2833 |
r18185 | r18186 | |
---|---|---|
117 | 117 | AM_RANGE(0x2003, 0x2003) AM_MIRROR(0x0ffc) AM_READNOP |
118 | 118 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_WRITE(watchdog_reset_w) |
119 | 119 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0ff8) AM_WRITE(avalance_credit_1_lamp_w) |
120 | AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x0ff8) AM_ | |
120 | AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x0ff8) AM_WRITE(avalnche_attract_enable_w) | |
121 | 121 | AM_RANGE(0x4002, 0x4002) AM_MIRROR(0x0ff8) AM_WRITE(avalance_video_invert_w) |
122 | 122 | AM_RANGE(0x4003, 0x4003) AM_MIRROR(0x0ff8) AM_WRITE(avalance_credit_2_lamp_w) |
123 | AM_RANGE(0x4004, 0x4006) AM_MIRROR(0x0ff8) AM_ | |
123 | AM_RANGE(0x4004, 0x4006) AM_MIRROR(0x0ff8) AM_WRITE(avalnche_audio_w) | |
124 | 124 | AM_RANGE(0x4007, 0x4007) AM_MIRROR(0x0ff8) AM_WRITE(avalance_start_lamp_w) |
125 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_ | |
125 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_WRITE(avalnche_noise_amplitude_w) | |
126 | 126 | AM_RANGE(0x6000, 0x7fff) AM_ROM |
127 | 127 | ADDRESS_MAP_END |
128 | 128 | |
r18185 | r18186 | |
135 | 135 | AM_RANGE(0x2003, 0x2003) AM_MIRROR(0x0ffc) AM_READNOP |
136 | 136 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_WRITE(watchdog_reset_w) |
137 | 137 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0ff8) AM_WRITE(avalance_credit_1_lamp_w) |
138 | // AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x0ff8) AM_ | |
138 | // AM_RANGE(0x4001, 0x4001) AM_MIRROR(0x0ff8) AM_WRITE(avalnche_attract_enable_w) /* It is attract_enable just like avalnche, but not hooked up yet. */ | |
139 | 139 | AM_RANGE(0x4002, 0x4002) AM_MIRROR(0x0ff8) AM_WRITE(avalance_video_invert_w) |
140 | 140 | AM_RANGE(0x4003, 0x4003) AM_MIRROR(0x0ff8) AM_WRITE(avalance_credit_2_lamp_w) |
141 | AM_RANGE(0x4004, 0x4006) AM_MIRROR(0x0ff8) AM_WRITE | |
141 | AM_RANGE(0x4004, 0x4006) AM_MIRROR(0x0ff8) AM_WRITE(catch_audio_w) | |
142 | 142 | AM_RANGE(0x4007, 0x4007) AM_MIRROR(0x0ff8) AM_WRITE(avalance_start_lamp_w) |
143 | 143 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_WRITE(catch_coin_counter_w) |
144 | 144 | AM_RANGE(0x7000, 0x7fff) AM_ROM |
r18185 | r18186 | |
---|---|---|
156 | 156 | |
157 | 157 | WRITE8_MEMBER(crbaloon_state::port_sound_w) |
158 | 158 | { |
159 | device_t *discrete = machine().device("discrete"); | |
160 | 159 | device_t *sn = machine().device("snsnd"); |
161 | 160 | |
162 | 161 | /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ |
r18185 | r18186 | |
167 | 166 | machine().sound().system_enable((data & 0x02) ? TRUE : FALSE); |
168 | 167 | |
169 | 168 | /* D2 - unlabeled - music enable */ |
170 | crbaloon_audio_set_music_enable( | |
169 | crbaloon_audio_set_music_enable(space, 0, (data & 0x04) ? TRUE : FALSE); | |
171 | 170 | |
172 | 171 | /* D3 - EXPLOSION */ |
173 | 172 | crbaloon_audio_set_explosion_enable(sn, (data & 0x08) ? TRUE : FALSE); |
r18185 | r18186 | |
179 | 178 | crbaloon_audio_set_appear_enable(sn, (data & 0x20) ? TRUE : FALSE); |
180 | 179 | |
181 | 180 | /* D6 - unlabeled - laugh enable */ |
182 | crbaloon_audio_set_laugh_enable( | |
181 | crbaloon_audio_set_laugh_enable(space, 0, (data & 0x40) ? TRUE : FALSE); | |
183 | 182 | |
184 | 183 | /* D7 - unlabeled - goes to PC3259 pin 16 */ |
185 | 184 | |
r18185 | r18186 | |
221 | 220 | AM_RANGE(0x00, 0x00) AM_WRITENOP /* not connected */ |
222 | 221 | AM_RANGE(0x01, 0x01) AM_WRITENOP /* watchdog */ |
223 | 222 | AM_RANGE(0x02, 0x04) AM_WRITEONLY AM_SHARE("spriteram") |
224 | AM_RANGE(0x05, 0x05) AM_ | |
223 | AM_RANGE(0x05, 0x05) AM_WRITE(crbaloon_audio_set_music_freq) | |
225 | 224 | AM_RANGE(0x06, 0x06) AM_WRITE(port_sound_w) |
226 | 225 | AM_RANGE(0x07, 0x0b) AM_WRITE(pc3092_w) AM_SHARE("pc3092_data") |
227 | 226 | AM_RANGE(0x0c, 0x0c) AM_WRITENOP /* MSK - to PC3259 */ |
r18185 | r18186 | |
340 | 339 | void crbaloon_state::machine_reset() |
341 | 340 | { |
342 | 341 | address_space &space = machine().device("maincpu")->memory().space(AS_IO); |
343 | device_t *discrete = machine().device("discrete"); | |
344 | 342 | |
345 | 343 | pc3092_reset(); |
346 | 344 | port_sound_w(space, 0, 0); |
347 | crbaloon_audio_set_music_freq( | |
345 | crbaloon_audio_set_music_freq(space, 0, 0); | |
348 | 346 | } |
349 | 347 | |
350 | 348 |
r18185 | r18186 | |
---|---|---|
884 | 884 | static I8255A_INTERFACE( zaxxon_ppi_intf ) |
885 | 885 | { |
886 | 886 | DEVCB_NULL, /* Port A read */ |
887 | DEVCB_ | |
887 | DEVCB_DRIVER_MEMBER(zaxxon_state, zaxxon_sound_a_w), /* Port A write */ | |
888 | 888 | DEVCB_NULL, /* Port B read */ |
889 | DEVCB_ | |
889 | DEVCB_DRIVER_MEMBER(zaxxon_state, zaxxon_sound_b_w), /* Port B write */ | |
890 | 890 | DEVCB_NULL, /* Port C read */ |
891 | DEVCB_ | |
891 | DEVCB_DRIVER_MEMBER(zaxxon_state, zaxxon_sound_c_w) /* Port C write */ | |
892 | 892 | }; |
893 | 893 | |
894 | 894 | static I8255A_INTERFACE( congo_ppi_intf ) |
r18185 | r18186 | |
896 | 896 | DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), /* Port A read */ |
897 | 897 | DEVCB_NULL, /* Port A write */ |
898 | 898 | DEVCB_NULL, /* Port B read */ |
899 | DEVCB_ | |
899 | DEVCB_DRIVER_MEMBER(zaxxon_state, congo_sound_b_w), /* Port B write */ | |
900 | 900 | DEVCB_NULL, /* Port C read */ |
901 | DEVCB_ | |
901 | DEVCB_DRIVER_MEMBER(zaxxon_state, congo_sound_c_w) /* Port C write */ | |
902 | 902 | }; |
903 | 903 | |
904 | 904 |
r18185 | r18186 | |
---|---|---|
320 | 320 | AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("scroll_y") |
321 | 321 | AM_RANGE(0x1020, 0x1020) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("scroll_x") |
322 | 322 | AM_RANGE(0x1040, 0x1040) AM_MIRROR(0x001f) AM_WRITE(crash_reset_w) |
323 | AM_RANGE(0x1060, 0x1060) AM_MIRROR(0x001f) AM_ | |
323 | AM_RANGE(0x1060, 0x1060) AM_MIRROR(0x001f) AM_WRITE(firetrk_skid_reset_w) | |
324 | 324 | AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("car_rot") |
325 | 325 | AM_RANGE(0x10a0, 0x10a0) AM_MIRROR(0x001f) AM_WRITE(steer_reset_w) |
326 | 326 | AM_RANGE(0x10c0, 0x10c0) AM_MIRROR(0x001f) AM_WRITE(watchdog_reset_w) |
327 | 327 | AM_RANGE(0x10e0, 0x10e0) AM_MIRROR(0x001f) AM_WRITE(blink_on_w) AM_SHARE("blink") |
328 | AM_RANGE(0x1400, 0x1400) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_motor_snd_w) | |
329 | AM_RANGE(0x1420, 0x1420) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_crash_snd_w) | |
330 | AM_RANGE(0x1440, 0x1440) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_skid_snd_w) | |
328 | AM_RANGE(0x1400, 0x1400) AM_MIRROR(0x001f) AM_WRITE(firetrk_motor_snd_w) | |
329 | AM_RANGE(0x1420, 0x1420) AM_MIRROR(0x001f) AM_WRITE(firetrk_crash_snd_w) | |
330 | AM_RANGE(0x1440, 0x1440) AM_MIRROR(0x001f) AM_WRITE(firetrk_skid_snd_w) | |
331 | 331 | AM_RANGE(0x1460, 0x1460) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_x") |
332 | 332 | AM_RANGE(0x1480, 0x1480) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_y") |
333 | 333 | AM_RANGE(0x14a0, 0x14a0) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_rot") |
334 | 334 | AM_RANGE(0x14c0, 0x14c0) AM_MIRROR(0x001f) AM_WRITE(firetrk_output_w) |
335 | AM_RANGE(0x14e0, 0x14e0) AM_MIRROR(0x001f) AM_ | |
335 | AM_RANGE(0x14e0, 0x14e0) AM_MIRROR(0x001f) AM_WRITE(firetrk_xtndply_w) | |
336 | 336 | AM_RANGE(0x1800, 0x1807) AM_MIRROR(0x03f8) AM_READ(firetrk_input_r) AM_WRITENOP |
337 | 337 | AM_RANGE(0x1c00, 0x1c03) AM_MIRROR(0x03fc) AM_READ(firetrk_dip_r) |
338 | 338 | AM_RANGE(0x2000, 0x3fff) AM_ROM |
r18185 | r18186 | |
345 | 345 | AM_RANGE(0x0100, 0x0100) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("scroll_y") |
346 | 346 | AM_RANGE(0x0120, 0x0120) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("scroll_x") |
347 | 347 | AM_RANGE(0x0140, 0x0140) AM_MIRROR(0x001f) AM_WRITE(crash_reset_w) |
348 | AM_RANGE(0x0160, 0x0160) AM_MIRROR(0x001f) AM_ | |
348 | AM_RANGE(0x0160, 0x0160) AM_MIRROR(0x001f) AM_WRITE(firetrk_skid_reset_w) | |
349 | 349 | AM_RANGE(0x0180, 0x0180) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("car_rot") |
350 | 350 | AM_RANGE(0x01a0, 0x01a0) AM_MIRROR(0x001f) AM_WRITE(steer_reset_w) |
351 | 351 | AM_RANGE(0x01c0, 0x01c0) AM_MIRROR(0x001f) AM_WRITE(watchdog_reset_w) |
352 | 352 | AM_RANGE(0x01e0, 0x01e0) AM_MIRROR(0x001f) AM_WRITE(blink_on_w) AM_SHARE("blink") |
353 | 353 | AM_RANGE(0x0200, 0x0207) AM_MIRROR(0x0018) AM_READ(firetrk_input_r) |
354 | AM_RANGE(0x0220, 0x0220) AM_MIRROR(0x001f) AM_ | |
354 | AM_RANGE(0x0220, 0x0220) AM_MIRROR(0x001f) AM_WRITE(firetrk_xtndply_w) | |
355 | 355 | AM_RANGE(0x0240, 0x0243) AM_MIRROR(0x001c) AM_READ(firetrk_dip_r) |
356 | 356 | AM_RANGE(0x0260, 0x026f) AM_MIRROR(0x0010) AM_WRITE(superbug_output_w) |
357 | AM_RANGE(0x0280, 0x0280) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", superbug_motor_snd_w) | |
358 | AM_RANGE(0x02a0, 0x02a0) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_crash_snd_w) | |
359 | AM_RANGE(0x02c0, 0x02c0) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_skid_snd_w) | |
357 | AM_RANGE(0x0280, 0x0280) AM_MIRROR(0x001f) AM_WRITE(superbug_motor_snd_w) | |
358 | AM_RANGE(0x02a0, 0x02a0) AM_MIRROR(0x001f) AM_WRITE(firetrk_crash_snd_w) | |
359 | AM_RANGE(0x02c0, 0x02c0) AM_MIRROR(0x001f) AM_WRITE(firetrk_skid_snd_w) | |
360 | 360 | AM_RANGE(0x0400, 0x041f) AM_RAM AM_SHARE("alpha_num_ram") |
361 | 361 | AM_RANGE(0x0500, 0x05ff) AM_RAM AM_SHARE("playfield_ram") |
362 | 362 | AM_RANGE(0x0800, 0x1fff) AM_ROM |
r18185 | r18186 | |
374 | 374 | AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("car_rot") |
375 | 375 | AM_RANGE(0x10a0, 0x10a0) AM_MIRROR(0x001f) AM_WRITE(steer_reset_w) |
376 | 376 | AM_RANGE(0x10c0, 0x10c0) AM_MIRROR(0x001f) AM_WRITE(watchdog_reset_w) |
377 | AM_RANGE(0x10e0, 0x10e0) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", montecar_skid_reset_w) | |
378 | AM_RANGE(0x1400, 0x1400) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_motor_snd_w) | |
379 | AM_RANGE(0x1420, 0x1420) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_crash_snd_w) | |
380 | AM_RANGE(0x1440, 0x1440) AM_MIRROR(0x001f) AM_DEVWRITE_LEGACY("discrete", firetrk_skid_snd_w) | |
377 | AM_RANGE(0x10e0, 0x10e0) AM_MIRROR(0x001f) AM_WRITE(montecar_skid_reset_w) | |
378 | AM_RANGE(0x1400, 0x1400) AM_MIRROR(0x001f) AM_WRITE(firetrk_motor_snd_w) | |
379 | AM_RANGE(0x1420, 0x1420) AM_MIRROR(0x001f) AM_WRITE(firetrk_crash_snd_w) | |
380 | AM_RANGE(0x1440, 0x1440) AM_MIRROR(0x001f) AM_WRITE(firetrk_skid_snd_w) | |
381 | 381 | AM_RANGE(0x1460, 0x1460) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_x") |
382 | 382 | AM_RANGE(0x1480, 0x1480) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_y") |
383 | 383 | AM_RANGE(0x14a0, 0x14a0) AM_MIRROR(0x001f) AM_WRITEONLY AM_SHARE("drone_rot") |
r18185 | r18186 | |
---|---|---|
282 | 282 | static I8255_INTERFACE(turbo_8255_intf_2) |
283 | 283 | { |
284 | 284 | DEVCB_NULL, |
285 | DEVCB_ | |
285 | DEVCB_DRIVER_MEMBER(turbo_state,turbo_sound_a_w), | |
286 | 286 | DEVCB_NULL, |
287 | DEVCB_ | |
287 | DEVCB_DRIVER_MEMBER(turbo_state,turbo_sound_b_w), | |
288 | 288 | DEVCB_NULL, |
289 | DEVCB_ | |
289 | DEVCB_DRIVER_MEMBER(turbo_state,turbo_sound_c_w) | |
290 | 290 | }; |
291 | 291 | |
292 | 292 | static I8255_INTERFACE(turbo_8255_intf_3) |
r18185 | r18186 | |
355 | 355 | static I8255_INTERFACE(subroc3d_8255_intf_1) |
356 | 356 | { |
357 | 357 | DEVCB_NULL, |
358 | DEVCB_ | |
358 | DEVCB_DRIVER_MEMBER(turbo_state,subroc3d_sound_a_w), | |
359 | 359 | DEVCB_NULL, |
360 | DEVCB_ | |
360 | DEVCB_DRIVER_MEMBER(turbo_state,subroc3d_sound_b_w), | |
361 | 361 | DEVCB_NULL, |
362 | DEVCB_ | |
362 | DEVCB_DRIVER_MEMBER(turbo_state,subroc3d_sound_c_w) | |
363 | 363 | }; |
364 | 364 | |
365 | 365 | |
r18185 | r18186 | |
424 | 424 | static I8255_INTERFACE(buckrog_8255_intf_1) |
425 | 425 | { |
426 | 426 | DEVCB_NULL, |
427 | DEVCB_ | |
427 | DEVCB_DRIVER_MEMBER(turbo_state,buckrog_sound_a_w), | |
428 | 428 | DEVCB_NULL, |
429 | DEVCB_ | |
429 | DEVCB_DRIVER_MEMBER(turbo_state,buckrog_sound_b_w), | |
430 | 430 | DEVCB_NULL, |
431 | 431 | DEVCB_DRIVER_MEMBER(turbo_state,buckrog_ppi1c_w) |
432 | 432 | }; |
r18185 | r18186 | |
---|---|---|
245 | 245 | AM_RANGE(0x3000, 0x3000) AM_WRITE_LEGACY(avgdvg_go_w) |
246 | 246 | AM_RANGE(0x3200, 0x3200) AM_WRITE(asteroid_bank_switch_w) |
247 | 247 | AM_RANGE(0x3400, 0x3400) AM_WRITE(watchdog_reset_w) |
248 | AM_RANGE(0x3600, 0x3600) AM_DEVWRITE_LEGACY("discrete", asteroid_explode_w) | |
249 | AM_RANGE(0x3a00, 0x3a00) AM_DEVWRITE_LEGACY("discrete", asteroid_thump_w) | |
250 | AM_RANGE(0x3c00, 0x3c05) AM_DEVWRITE_LEGACY("discrete", asteroid_sounds_w) | |
251 | AM_RANGE(0x3e00, 0x3e00) AM_DEVWRITE_LEGACY("discrete", asteroid_noise_reset_w) | |
248 | AM_RANGE(0x3600, 0x3600) AM_WRITE(asteroid_explode_w) | |
249 | AM_RANGE(0x3a00, 0x3a00) AM_WRITE(asteroid_thump_w) | |
250 | AM_RANGE(0x3c00, 0x3c05) AM_WRITE(asteroid_sounds_w) | |
251 | AM_RANGE(0x3e00, 0x3e00) AM_WRITE(asteroid_noise_reset_w) | |
252 | 252 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x4000) |
253 | 253 | AM_RANGE(0x5000, 0x57ff) AM_ROM /* vector rom */ |
254 | 254 | AM_RANGE(0x6800, 0x7fff) AM_ROM |
r18185 | r18186 | |
268 | 268 | AM_RANGE(0x3000, 0x3000) AM_WRITE_LEGACY(avgdvg_go_w) |
269 | 269 | AM_RANGE(0x3200, 0x323f) AM_DEVWRITE("earom", atari_vg_earom_device, write) |
270 | 270 | AM_RANGE(0x3400, 0x3400) AM_WRITE(watchdog_reset_w) |
271 | AM_RANGE(0x3600, 0x3600) AM_ | |
271 | AM_RANGE(0x3600, 0x3600) AM_WRITE(asteroid_explode_w) | |
272 | 272 | AM_RANGE(0x3a00, 0x3a00) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w) |
273 | 273 | AM_RANGE(0x3c00, 0x3c01) AM_WRITE(astdelux_led_w) |
274 | AM_RANGE(0x3c03, 0x3c03) AM_ | |
274 | AM_RANGE(0x3c03, 0x3c03) AM_WRITE(astdelux_sounds_w) | |
275 | 275 | AM_RANGE(0x3c04, 0x3c04) AM_WRITE(astdelux_bank_switch_w) |
276 | 276 | AM_RANGE(0x3c05, 0x3c07) AM_WRITE(astdelux_coin_counter_w) |
277 | AM_RANGE(0x3e00, 0x3e00) AM_ | |
277 | AM_RANGE(0x3e00, 0x3e00) AM_WRITE(asteroid_noise_reset_w) | |
278 | 278 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x4000) |
279 | 279 | AM_RANGE(0x4800, 0x57ff) AM_ROM /* vector rom */ |
280 | 280 | AM_RANGE(0x6000, 0x7fff) AM_ROM |
r18185 | r18186 | |
291 | 291 | AM_RANGE(0x3000, 0x3000) AM_WRITE_LEGACY(avgdvg_go_w) |
292 | 292 | AM_RANGE(0x3200, 0x3200) AM_WRITE(llander_led_w) |
293 | 293 | AM_RANGE(0x3400, 0x3400) AM_WRITE(watchdog_reset_w) |
294 | AM_RANGE(0x3c00, 0x3c00) AM_DEVWRITE_LEGACY("discrete", llander_sounds_w) | |
295 | AM_RANGE(0x3e00, 0x3e00) AM_DEVWRITE_LEGACY("discrete", llander_snd_reset_w) | |
294 | AM_RANGE(0x3c00, 0x3c00) AM_WRITE(llander_sounds_w) | |
295 | AM_RANGE(0x3e00, 0x3e00) AM_WRITE(llander_snd_reset_w) | |
296 | 296 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("vectorram") AM_REGION("maincpu", 0x4000) |
297 | 297 | AM_RANGE(0x4800, 0x5fff) AM_ROM /* vector rom */ |
298 | 298 | AM_RANGE(0x6000, 0x7fff) AM_ROM |
r18185 | r18186 | |
---|---|---|
104 | 104 | AM_RANGE(0x0800, 0x080f) AM_MIRROR(0x23f0) AM_WRITEONLY AM_SHARE("hpos_ram") |
105 | 105 | AM_RANGE(0x0c00, 0x0c0f) AM_MIRROR(0x23f0) AM_WRITEONLY AM_SHARE("vpos_ram") |
106 | 106 | AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2000) AM_READWRITE(poolshrk_input_r, poolshrk_watchdog_w) |
107 | AM_RANGE(0x1400, 0x17ff) AM_MIRROR(0x2000) AM_DEVWRITE_LEGACY("discrete", poolshrk_scratch_sound_w) | |
108 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x2000) AM_DEVWRITE_LEGACY("discrete", poolshrk_score_sound_w) | |
109 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x2000) AM_DEVWRITE_LEGACY("discrete", poolshrk_click_sound_w) | |
107 | AM_RANGE(0x1400, 0x17ff) AM_MIRROR(0x2000) AM_WRITE(poolshrk_scratch_sound_w) | |
108 | AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x2000) AM_WRITE(poolshrk_score_sound_w) | |
109 | AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x2000) AM_WRITE(poolshrk_click_sound_w) | |
110 | 110 | AM_RANGE(0x4000, 0x4000) AM_NOP /* diagnostic ROM location */ |
111 | 111 | AM_RANGE(0x6000, 0x63ff) AM_WRITE(poolshrk_da_latch_w) |
112 | AM_RANGE(0x6400, 0x67ff) AM_ | |
112 | AM_RANGE(0x6400, 0x67ff) AM_WRITE(poolshrk_bump_sound_w) | |
113 | 113 | AM_RANGE(0x6800, 0x6bff) AM_READ(poolshrk_irq_reset_r) |
114 | 114 | AM_RANGE(0x6c00, 0x6fff) AM_WRITE(poolshrk_led_w) |
115 | 115 | AM_RANGE(0x7000, 0x7fff) AM_ROM |
r18185 | r18186 | |
---|---|---|
47 | 47 | |
48 | 48 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, subs_state ) |
49 | 49 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) |
50 | AM_RANGE(0x0000, 0x0000) AM_ | |
50 | AM_RANGE(0x0000, 0x0000) AM_WRITE(subs_noise_reset_w) | |
51 | 51 | AM_RANGE(0x0000, 0x0007) AM_READ(subs_control_r) |
52 | 52 | AM_RANGE(0x0020, 0x0020) AM_WRITE(subs_steer_reset_w) |
53 | 53 | AM_RANGE(0x0020, 0x0027) AM_READ(subs_coin_r) |
r18185 | r18186 | |
55 | 55 | AM_RANGE(0x0060, 0x0063) AM_READ(subs_options_r) |
56 | 56 | AM_RANGE(0x0060, 0x0061) AM_WRITE(subs_lamp1_w) |
57 | 57 | AM_RANGE(0x0062, 0x0063) AM_WRITE(subs_lamp2_w) |
58 | AM_RANGE(0x0064, 0x0065) AM_DEVWRITE_LEGACY("discrete", subs_sonar2_w) | |
59 | AM_RANGE(0x0066, 0x0067) AM_DEVWRITE_LEGACY("discrete", subs_sonar1_w) | |
58 | AM_RANGE(0x0064, 0x0065) AM_WRITE(subs_sonar2_w) | |
59 | AM_RANGE(0x0066, 0x0067) AM_WRITE(subs_sonar1_w) | |
60 | 60 | // Schematics show crash and explode reversed. But this is proper. |
61 | AM_RANGE(0x0068, 0x0069) AM_DEVWRITE_LEGACY("discrete", subs_explode_w) | |
62 | AM_RANGE(0x006a, 0x006b) AM_DEVWRITE_LEGACY("discrete", subs_crash_w) | |
61 | AM_RANGE(0x0068, 0x0069) AM_WRITE(subs_explode_w) | |
62 | AM_RANGE(0x006a, 0x006b) AM_WRITE(subs_crash_w) | |
63 | 63 | AM_RANGE(0x006c, 0x006d) AM_WRITE(subs_invert1_w) |
64 | 64 | AM_RANGE(0x006e, 0x006f) AM_WRITE(subs_invert2_w) |
65 | 65 | AM_RANGE(0x0090, 0x009f) AM_SHARE("spriteram") |
r18185 | r18186 | |
---|---|---|
138 | 138 | AM_RANGE(0x6000, 0x6fff) AM_RAM |
139 | 139 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("spriteram") /* physical sprite ram */ |
140 | 140 | AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(mario_videoram_w) AM_SHARE("videoram") |
141 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_DEVWRITE_LEGACY("discrete", mario_sh1_w) /* Mario run sample */ | |
142 | AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_DEVWRITE_LEGACY("discrete", mario_sh2_w) /* Luigi run sample */ | |
141 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_WRITE(mario_sh1_w) /* Mario run sample */ | |
142 | AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(mario_sh2_w) /* Luigi run sample */ | |
143 | 143 | AM_RANGE(0x7d00, 0x7d00) AM_WRITE(mario_scroll_w) |
144 | 144 | AM_RANGE(0x7e80, 0x7e80) AM_WRITE(mario_gfxbank_w) |
145 | 145 | AM_RANGE(0x7e82, 0x7e82) AM_WRITE(mario_flip_w) |
r18185 | r18186 | |
---|---|---|
78 | 78 | AM_RANGE(0x1400, 0x1401) AM_READ_PORT("SYSTEM") |
79 | 79 | AM_RANGE(0x1c00, 0x1c0f) AM_WRITEONLY AM_SHARE("obj_ram") |
80 | 80 | AM_RANGE(0x4000, 0x4000) AM_WRITE(skyraid_scroll_w) |
81 | AM_RANGE(0x4400, 0x4400) AM_ | |
81 | AM_RANGE(0x4400, 0x4400) AM_WRITE(skyraid_sound_w) | |
82 | 82 | AM_RANGE(0x4800, 0x4800) AM_WRITE(skyraid_range_w) |
83 | 83 | AM_RANGE(0x5000, 0x5000) AM_WRITE(watchdog_reset_w) |
84 | 84 | AM_RANGE(0x5800, 0x5800) AM_WRITE(skyraid_offset_w) |
r18185 | r18186 | |
---|---|---|
58 | 58 | #include "includes/m79amb.h" |
59 | 59 | #include "cpu/i8085/i8085.h" |
60 | 60 | |
61 | class m79amb_state : public driver_device | |
62 | { | |
63 | public: | |
64 | m79amb_state(const machine_config &mconfig, device_type type, const char *tag) | |
65 | : driver_device(mconfig, type, tag) , | |
66 | m_videoram(*this, "videoram"), | |
67 | m_mask(*this, "mask"){ } | |
68 | ||
69 | /* memory pointers */ | |
70 | required_shared_ptr<UINT8> m_videoram; | |
71 | required_shared_ptr<UINT8> m_mask; | |
72 | ||
73 | /* misc */ | |
74 | UINT8 m_lut_gun1[0x100]; | |
75 | UINT8 m_lut_gun2[0x100]; | |
76 | DECLARE_WRITE8_MEMBER(ramtek_videoram_w); | |
77 | DECLARE_READ8_MEMBER(gray5bit_controller0_r); | |
78 | DECLARE_READ8_MEMBER(gray5bit_controller1_r); | |
79 | DECLARE_WRITE8_MEMBER(m79amb_8002_w); | |
80 | DECLARE_DRIVER_INIT(m79amb); | |
81 | UINT32 screen_update_ramtek(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); | |
82 | INTERRUPT_GEN_MEMBER(m79amb_interrupt); | |
83 | }; | |
84 | ||
85 | ||
86 | 61 | WRITE8_MEMBER(m79amb_state::ramtek_videoram_w) |
87 | 62 | { |
88 | 63 | m_videoram[offset] = data & ~*m_mask; |
r18185 | r18186 | |
141 | 116 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
142 | 117 | AM_RANGE(0x4000, 0x5fff) AM_RAM_WRITE(ramtek_videoram_w) AM_SHARE("videoram") |
143 | 118 | AM_RANGE(0x6000, 0x63ff) AM_RAM /* ?? */ |
144 | AM_RANGE(0x8000, 0x8000) AM_READ_PORT("8000") AM_ | |
119 | AM_RANGE(0x8000, 0x8000) AM_READ_PORT("8000") AM_WRITE(m79amb_8000_w) | |
145 | 120 | AM_RANGE(0x8001, 0x8001) AM_WRITEONLY AM_SHARE("mask") |
146 | 121 | AM_RANGE(0x8002, 0x8002) AM_READ_PORT("8002") AM_WRITE(m79amb_8002_w) |
147 | AM_RANGE(0x8003, 0x8003) AM_ | |
122 | AM_RANGE(0x8003, 0x8003) AM_WRITE(m79amb_8003_w) | |
148 | 123 | AM_RANGE(0x8004, 0x8004) AM_READ(gray5bit_controller0_r) |
149 | 124 | AM_RANGE(0x8005, 0x8005) AM_READ(gray5bit_controller1_r) |
150 | 125 | AM_RANGE(0xc000, 0xc07f) AM_RAM /* ?? */ |
r18185 | r18186 | |
---|---|---|
108 | 108 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, canyon_state ) |
109 | 109 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) |
110 | 110 | AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x100) AM_RAM |
111 | AM_RANGE(0x0400, 0x0401) AM_DEVWRITE_LEGACY("discrete", canyon_motor_w) | |
112 | AM_RANGE(0x0500, 0x0500) AM_DEVWRITE_LEGACY("discrete", canyon_explode_w) | |
111 | AM_RANGE(0x0400, 0x0401) AM_WRITE(canyon_motor_w) | |
112 | AM_RANGE(0x0500, 0x0500) AM_WRITE(canyon_explode_w) | |
113 | 113 | AM_RANGE(0x0501, 0x0501) AM_WRITE(watchdog_reset_w) /* watchdog, disabled in service mode */ |
114 | AM_RANGE(0x0600, 0x0603) AM_ | |
114 | AM_RANGE(0x0600, 0x0603) AM_WRITE(canyon_whistle_w) | |
115 | 115 | AM_RANGE(0x0680, 0x0683) AM_WRITE(canyon_led_w) |
116 | AM_RANGE(0x0700, 0x0703) AM_ | |
116 | AM_RANGE(0x0700, 0x0703) AM_WRITE(canyon_attract_w) | |
117 | 117 | AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(canyon_videoram_w) AM_SHARE("videoram") |
118 | 118 | AM_RANGE(0x1000, 0x17ff) AM_READ(canyon_switches_r) AM_WRITENOP /* sloppy code writes here */ |
119 | 119 | AM_RANGE(0x1800, 0x1fff) AM_READ(canyon_options_r) |
r18185 | r18186 | |
---|---|---|
112 | 112 | AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x07ff) AM_READ_PORT("BUTTONS") |
113 | 113 | AM_RANGE(0x3000, 0x33bf) AM_MIRROR(0x0400) AM_RAM_WRITE(orbit_playfield_w) AM_SHARE("playfield_ram") |
114 | 114 | AM_RANGE(0x33c0, 0x33ff) AM_MIRROR(0x0400) AM_RAM AM_SHARE("sprite_ram") |
115 | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("discrete", orbit_note_w) | |
116 | AM_RANGE(0x3900, 0x3900) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("discrete", orbit_noise_amp_w) | |
117 | AM_RANGE(0x3a00, 0x3a00) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("discrete", orbit_note_amp_w) | |
115 | AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x00ff) AM_WRITE(orbit_note_w) | |
116 | AM_RANGE(0x3900, 0x3900) AM_MIRROR(0x00ff) AM_WRITE(orbit_noise_amp_w) | |
117 | AM_RANGE(0x3a00, 0x3a00) AM_MIRROR(0x00ff) AM_WRITE(orbit_note_amp_w) | |
118 | 118 | AM_RANGE(0x3c00, 0x3c0f) AM_MIRROR(0x00f0) AM_WRITE(orbit_misc_w) |
119 | AM_RANGE(0x3e00, 0x3e00) AM_MIRROR(0x00ff) AM_ | |
119 | AM_RANGE(0x3e00, 0x3e00) AM_MIRROR(0x00ff) AM_WRITE(orbit_noise_rst_w) | |
120 | 120 | AM_RANGE(0x3f00, 0x3f00) AM_MIRROR(0x00ff) AM_WRITE(watchdog_reset_w) |
121 | 121 | AM_RANGE(0x6000, 0x7fff) AM_ROM |
122 | 122 | ADDRESS_MAP_END |
r18185 | r18186 | |
273 | 273 | { |
274 | 274 | |
275 | 275 | m_maincpu = machine().device<cpu_device>("maincpu"); |
276 | m_discrete = machine().device("discrete"); | |
277 | 276 | |
278 | 277 | save_item(NAME(m_misc_flags)); |
279 | 278 | save_item(NAME(m_flip_screen)); |
r18185 | r18186 | |
---|---|---|
311 | 311 | |
312 | 312 | void dragrace_state::machine_start() |
313 | 313 | { |
314 | ||
315 | m_discrete = machine().device("discrete"); | |
316 | ||
317 | 314 | save_item(NAME(m_misc_flags)); |
318 | 315 | save_item(NAME(m_gear)); |
319 | 316 | } |
r18185 | r18186 | |
---|---|---|
80 | 80 | AM_RANGE(0x0802, 0x0802) AM_READ_PORT("IN1") |
81 | 81 | AM_RANGE(0x0803, 0x0803) AM_READ_PORT("DSW") |
82 | 82 | AM_RANGE(0x1000, 0x1000) AM_WRITENOP /* Timer Reset */ |
83 | AM_RANGE(0x1010, 0x1010) AM_ | |
83 | AM_RANGE(0x1010, 0x1010) AM_WRITE(bsktball_bounce_w) /* Crowd Amp / Bounce */ | |
84 | 84 | AM_RANGE(0x1022, 0x1023) AM_WRITENOP /* Coin Counter */ |
85 | 85 | AM_RANGE(0x1024, 0x1025) AM_WRITE(bsktball_led1_w) /* LED 1 */ |
86 | 86 | AM_RANGE(0x1026, 0x1027) AM_WRITE(bsktball_led2_w) /* LED 2 */ |
87 | 87 | AM_RANGE(0x1028, 0x1029) AM_WRITE(bsktball_ld1_w) /* LD 1 */ |
88 | 88 | AM_RANGE(0x102a, 0x102b) AM_WRITE(bsktball_ld2_w) /* LD 2 */ |
89 | AM_RANGE(0x102c, 0x102d) AM_ | |
89 | AM_RANGE(0x102c, 0x102d) AM_WRITE(bsktball_noise_reset_w) /* Noise Reset */ | |
90 | 90 | AM_RANGE(0x102e, 0x102f) AM_WRITE(bsktball_nmion_w) /* NMI On */ |
91 | AM_RANGE(0x1030, 0x1030) AM_ | |
91 | AM_RANGE(0x1030, 0x1030) AM_WRITE(bsktball_note_w) /* Music Ckt Note Dvsr */ | |
92 | 92 | AM_RANGE(0x1800, 0x1bbf) AM_RAM_WRITE(bsktball_videoram_w) AM_SHARE("videoram") /* DISPLAY */ |
93 | 93 | AM_RANGE(0x1bc0, 0x1bff) AM_RAM AM_SHARE("motion") |
94 | 94 | AM_RANGE(0x1c00, 0x1cff) AM_RAM |
r18185 | r18186 | |
---|---|---|
1607 | 1607 | AY8910_DEFAULT_LOADS, |
1608 | 1608 | DEVCB_NULL, |
1609 | 1609 | DEVCB_NULL, |
1610 | DEVCB_DEVICE_HANDLER("samples", suna8_play_samples_w), | |
1611 | DEVCB_DEVICE_HANDLER("samples", suna8_samples_number_w) | |
1610 | DEVCB_DRIVER_MEMBER(suna8_state, suna8_play_samples_w), | |
1611 | DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w) | |
1612 | 1612 | }; |
1613 | 1613 | |
1614 | 1614 | static const samples_interface suna8_samples_interface = |
r18185 | r18186 | |
1676 | 1676 | AY8910_DEFAULT_LOADS, |
1677 | 1677 | DEVCB_NULL, |
1678 | 1678 | DEVCB_NULL, |
1679 | DEVCB_DEVICE_HANDLER("samples", rranger_play_samples_w), | |
1680 | DEVCB_DEVICE_HANDLER("samples", suna8_samples_number_w), | |
1679 | DEVCB_DRIVER_MEMBER(suna8_state, rranger_play_samples_w), | |
1680 | DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w), | |
1681 | 1681 | }, |
1682 | 1682 | DEVCB_NULL |
1683 | 1683 | }; |
r18185 | r18186 | |
1856 | 1856 | AY8910_DEFAULT_LOADS, |
1857 | 1857 | DEVCB_NULL, |
1858 | 1858 | DEVCB_NULL, |
1859 | DEVCB_DEVICE_HANDLER("samples", suna8_play_samples_w), | |
1860 | DEVCB_DEVICE_HANDLER("samples", suna8_samples_number_w) | |
1859 | DEVCB_DRIVER_MEMBER(suna8_state, suna8_play_samples_w), | |
1860 | DEVCB_DRIVER_MEMBER(suna8_state, suna8_samples_number_w) | |
1861 | 1861 | }; |
1862 | 1862 | |
1863 | 1863 | static MACHINE_CONFIG_START( starfigh, suna8_state ) |
r18185 | r18186 | |
---|---|---|
126 | 126 | static ADDRESS_MAP_START( main_io_map, AS_IO, 8, blockade_state ) |
127 | 127 | AM_RANGE(0x01, 0x01) AM_READWRITE(blockade_input_port_0_r, blockade_coin_latch_w) |
128 | 128 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1") |
129 | AM_RANGE(0x02, 0x02) AM_ | |
129 | AM_RANGE(0x02, 0x02) AM_WRITE(blockade_sound_freq_w) | |
130 | 130 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") |
131 | 131 | AM_RANGE(0x04, 0x04) AM_WRITE(blockade_env_on_w) |
132 | 132 | AM_RANGE(0x08, 0x08) AM_WRITE(blockade_env_off_w) |
r18185 | r18186 | |
---|---|---|
40 | 40 | * |
41 | 41 | *************************************/ |
42 | 42 | |
43 | ||
43 | WRITE8_MEMBER(redalert_state::redalert_analog_w) | |
44 | 44 | { |
45 | 45 | /* this port triggers analog sounds |
46 | 46 | D0 = Formation Aircraft? |
r18185 | r18186 | |
74 | 74 | } |
75 | 75 | |
76 | 76 | |
77 | ||
77 | WRITE8_MEMBER(redalert_state::redalert_AY8910_w) | |
78 | 78 | { |
79 | | |
79 | device_t *device = machine().device("aysnd"); | |
80 | 80 | /* BC2 is connected to a pull-up resistor, so BC2=1 always */ |
81 | 81 | switch (data & 0x03) |
82 | 82 | { |
r18185 | r18186 | |
86 | 86 | |
87 | 87 | /* BC1=1, BDIR=0 : read from PSG */ |
88 | 88 | case 0x01: |
89 | | |
89 | m_ay8910_latch_1 = ay8910_r(device, space, 0); | |
90 | 90 | break; |
91 | 91 | |
92 | 92 | /* BC1=0, BDIR=1 : write to PSG */ |
r18185 | r18186 | |
94 | 94 | case 0x02: |
95 | 95 | case 0x03: |
96 | 96 | default: |
97 | ay8910_data_address_w(device, space, data, | |
97 | ay8910_data_address_w(device, space, data, m_ay8910_latch_2); | |
98 | 98 | break; |
99 | 99 | } |
100 | 100 | } |
r18185 | r18186 | |
119 | 119 | DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), |
120 | 120 | DEVCB_NULL, /* port A/B read */ |
121 | 121 | DEVCB_NULL, |
122 | DEVCB_ | |
122 | DEVCB_DRIVER_MEMBER(redalert_state,redalert_analog_w) /* port A/B write */ | |
123 | 123 | }; |
124 | 124 | |
125 | 125 | |
126 | 126 | static ADDRESS_MAP_START( redalert_audio_map, AS_PROGRAM, 8, redalert_state ) |
127 | 127 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) |
128 | 128 | AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x0c00) AM_RAM |
129 | AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0ffe) AM_READNOP AM_ | |
129 | AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0ffe) AM_READNOP AM_WRITE(redalert_AY8910_w) | |
130 | 130 | AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x0ffe) AM_READWRITE(redalert_ay8910_latch_1_r, redalert_ay8910_latch_2_w) |
131 | 131 | AM_RANGE(0x2000, 0x6fff) AM_NOP |
132 | 132 | AM_RANGE(0x7000, 0x77ff) AM_MIRROR(0x0800) AM_ROM |
r18185 | r18186 | |
159 | 159 | } |
160 | 160 | |
161 | 161 | |
162 | ||
162 | WRITE_LINE_MEMBER(redalert_state::sod_callback) | |
163 | 163 | { |
164 | hc55516_digit_w( | |
164 | hc55516_digit_w(machine().device("cvsd"), state); | |
165 | 165 | } |
166 | 166 | |
167 | 167 | |
168 | ||
168 | READ_LINE_MEMBER(redalert_state::sid_callback) | |
169 | 169 | { |
170 | return hc55516_clock_state_r( | |
170 | return hc55516_clock_state_r(machine().device("cvsd")); | |
171 | 171 | } |
172 | 172 | |
173 | 173 | |
r18185 | r18186 | |
175 | 175 | { |
176 | 176 | DEVCB_NULL, /* STATUS changed callback */ |
177 | 177 | DEVCB_NULL, /* INTE changed callback */ |
178 | DEVCB_LINE(sid_callback), /* SID changed callback (8085A only) */ | |
179 | DEVCB_LINE(sod_callback) /* SOD changed callback (8085A only) */ | |
178 | DEVCB_DRIVER_LINE_MEMBER(redalert_state,sid_callback), /* SID changed callback (8085A only) */ | |
179 | DEVCB_DRIVER_LINE_MEMBER(redalert_state,sod_callback) /* SOD changed callback (8085A only) */ | |
180 | 180 | }; |
181 | 181 | |
182 | 182 | |
r18185 | r18186 | |
286 | 286 | } |
287 | 287 | |
288 | 288 | |
289 | ||
289 | WRITE8_MEMBER(redalert_state::demoneye_ay8910_latch_1_w) | |
290 | 290 | { |
291 | redalert_state *state = space.machine().driver_data<redalert_state>(); | |
292 | state->m_ay8910_latch_1 = data; | |
291 | m_ay8910_latch_1 = data; | |
293 | 292 | } |
294 | 293 | |
295 | 294 | |
296 | ||
295 | READ8_MEMBER(redalert_state::demoneye_ay8910_latch_2_r) | |
297 | 296 | { |
298 | redalert_state *state = space.machine().driver_data<redalert_state>(); | |
299 | return state->m_ay8910_latch_2; | |
297 | return m_ay8910_latch_2; | |
300 | 298 | } |
301 | 299 | |
302 | 300 | |
303 | ||
301 | WRITE8_MEMBER(redalert_state::demoneye_ay8910_data_w) | |
304 | 302 | { |
305 | redalert_state *state = space.machine().driver_data<redalert_state>(); | |
306 | device_t *ay1 = space.machine().device("ay1"); | |
307 | device_t *ay2 = space.machine().device("ay2"); | |
303 | device_t *ay1 = machine().device("ay1"); | |
304 | device_t *ay2 = machine().device("ay2"); | |
308 | 305 | |
309 | switch ( | |
306 | switch (m_ay8910_latch_1 & 0x03) | |
310 | 307 | { |
311 | 308 | case 0x00: |
312 | if ( | |
309 | if (m_ay8910_latch_1 & 0x10) | |
313 | 310 | ay8910_data_w(ay1, space, 0, data); |
314 | 311 | |
315 | if ( | |
312 | if (m_ay8910_latch_1 & 0x20) | |
316 | 313 | ay8910_data_w(ay2, space, 0, data); |
317 | 314 | |
318 | 315 | break; |
319 | 316 | |
320 | 317 | case 0x01: |
321 | if (state->m_ay8910_latch_1 & 0x10) | |
322 | state->m_ay8910_latch_2 = ay8910_r(ay1, space, 0); | |
318 | if (m_ay8910_latch_1 & 0x10) | |
319 | m_ay8910_latch_2 = ay8910_r(ay1, space, 0); | |
323 | 320 | |
324 | if (state->m_ay8910_latch_1 & 0x20) | |
325 | state->m_ay8910_latch_2 = ay8910_r(ay2, space, 0); | |
321 | if (m_ay8910_latch_1 & 0x20) | |
322 | m_ay8910_latch_2 = ay8910_r(ay2, space, 0); | |
326 | 323 | |
327 | 324 | break; |
328 | 325 | |
329 | 326 | case 0x03: |
330 | if ( | |
327 | if (m_ay8910_latch_1 & 0x10) | |
331 | 328 | ay8910_address_w(ay1, space, 0, data); |
332 | 329 | |
333 | if ( | |
330 | if (m_ay8910_latch_1 & 0x20) | |
334 | 331 | ay8910_address_w(ay2, space, 0, data); |
335 | 332 | |
336 | 333 | break; |
337 | 334 | |
338 | 335 | default: |
339 | logerror("demoneye_ay8910_data_w called with latch %02X data %02X\n", | |
336 | logerror("demoneye_ay8910_data_w called with latch %02X data %02X\n", m_ay8910_latch_1, data); | |
340 | 337 | break; |
341 | 338 | } |
342 | 339 | } |
r18185 | r18186 | |
363 | 360 | |
364 | 361 | static const pia6821_interface demoneye_pia_intf = |
365 | 362 | { |
366 | DEVCB_ | |
363 | DEVCB_DRIVER_MEMBER(redalert_state,demoneye_ay8910_latch_2_r), /* port A in */ | |
367 | 364 | DEVCB_NULL, /* port B in */ |
368 | 365 | DEVCB_NULL, /* line CA1 in */ |
369 | 366 | DEVCB_NULL, /* line CB1 in */ |
370 | 367 | DEVCB_NULL, /* line CA2 in */ |
371 | 368 | DEVCB_NULL, /* line CB2 in */ |
372 | DEVCB_HANDLER(demoneye_ay8910_data_w), /* port A out */ | |
373 | DEVCB_HANDLER(demoneye_ay8910_latch_1_w), /* port B out */ | |
369 | DEVCB_DRIVER_MEMBER(redalert_state,demoneye_ay8910_data_w), /* port A out */ | |
370 | DEVCB_DRIVER_MEMBER(redalert_state,demoneye_ay8910_latch_1_w), /* port B out */ | |
374 | 371 | DEVCB_NULL, /* line CA2 out */ |
375 | 372 | DEVCB_NULL, /* port CB2 out */ |
376 | 373 | DEVCB_NULL, /* IRQA */ |
r18185 | r18186 | |
---|---|---|
29 | 29 | * |
30 | 30 | *************************************/ |
31 | 31 | |
32 | ||
32 | READ8_MEMBER(starwars_state::r6532_porta_r) | |
33 | 33 | { |
34 | 34 | /* Configured as follows: */ |
35 | 35 | /* d7 (in) Main Ready Flag */ |
r18185 | r18186 | |
42 | 42 | /* d1 (out) TMS5220 Not Read */ |
43 | 43 | /* d0 (out) TMS5220 Not Write */ |
44 | 44 | /* Note: bit 4 is always set to avoid sound self test */ |
45 | UINT8 olddata = riot6532_porta_in_get(device); | |
45 | UINT8 olddata = riot6532_porta_in_get(machine().device("riot")); | |
46 | 46 | |
47 | return (olddata & 0xc0) | 0x10 | (tms5220_readyq_r( | |
47 | return (olddata & 0xc0) | 0x10 | (tms5220_readyq_r(machine().device("tms")) << 2); | |
48 | 48 | } |
49 | 49 | |
50 | 50 | |
51 | ||
51 | WRITE8_MEMBER(starwars_state::r6532_porta_w) | |
52 | 52 | { |
53 | device_t *device = machine().device("tms"); | |
53 | 54 | /* handle 5220 read */ |
54 | 55 | tms5220_rsq_w(device, (data & 2)>>1); |
55 | 56 | /* handle 5220 write */ |
r18185 | r18186 | |
57 | 58 | } |
58 | 59 | |
59 | 60 | |
60 | ||
61 | WRITE_LINE_MEMBER(starwars_state::snd_interrupt) | |
61 | 62 | { |
62 | | |
63 | machine().device("audiocpu")->execute().set_input_line(M6809_IRQ_LINE, state); | |
63 | 64 | } |
64 | 65 | |
65 | 66 | |
66 | 67 | const riot6532_interface starwars_riot6532_intf = |
67 | 68 | { |
68 | DEVCB_ | |
69 | DEVCB_DRIVER_MEMBER(starwars_state,r6532_porta_r), | |
69 | 70 | DEVCB_DEVICE_HANDLER("tms", tms5220_status_r), |
70 | DEVCB_D | |
71 | DEVCB_DRIVER_MEMBER(starwars_state,r6532_porta_w), | |
71 | 72 | DEVCB_DEVICE_HANDLER("tms", tms5220_data_w), |
72 | DEVCB_LINE(snd_interrupt) | |
73 | DEVCB_DRIVER_LINE_MEMBER(starwars_state,snd_interrupt) | |
73 | 74 | }; |
74 | 75 | |
75 | 76 |
r18185 | r18186 | |
---|---|---|
12 | 12 | sub sound functions |
13 | 13 | ***************************************************************************/ |
14 | 14 | |
15 | WRITE8_ | |
15 | WRITE8_MEMBER(subs_state::subs_sonar1_w) | |
16 | 16 | { |
17 | discrete_sound_w(d | |
17 | discrete_sound_w(m_discrete, space, SUBS_SONAR1_EN, offset & 0x01); | |
18 | 18 | } |
19 | 19 | |
20 | WRITE8_ | |
20 | WRITE8_MEMBER(subs_state::subs_sonar2_w) | |
21 | 21 | { |
22 | discrete_sound_w(d | |
22 | discrete_sound_w(m_discrete, space, SUBS_SONAR2_EN, offset & 0x01); | |
23 | 23 | } |
24 | 24 | |
25 | WRITE8_ | |
25 | WRITE8_MEMBER(subs_state::subs_crash_w) | |
26 | 26 | { |
27 | discrete_sound_w(d | |
27 | discrete_sound_w(m_discrete, space, SUBS_CRASH_EN, offset & 0x01); | |
28 | 28 | } |
29 | 29 | |
30 | WRITE8_ | |
30 | WRITE8_MEMBER(subs_state::subs_explode_w) | |
31 | 31 | { |
32 | discrete_sound_w(d | |
32 | discrete_sound_w(m_discrete, space, SUBS_EXPLODE_EN, offset & 0x01); | |
33 | 33 | } |
34 | 34 | |
35 | WRITE8_ | |
35 | WRITE8_MEMBER(subs_state::subs_noise_reset_w) | |
36 | 36 | { |
37 | 37 | /* Pulse noise reset */ |
38 | discrete_sound_w(d | |
38 | discrete_sound_w(m_discrete, space, SUBS_NOISE_RESET, 0); | |
39 | 39 | } |
40 | 40 | |
41 | 41 |
r18185 | r18186 | |
---|---|---|
279 | 279 | m_port_2_last_extra = data; |
280 | 280 | } |
281 | 281 | |
282 | WRITE8_ | |
282 | WRITE8_MEMBER(_8080bw_state::indianbt_sh_port_3_w) | |
283 | 283 | { |
284 | discrete_sound_w(d | |
284 | discrete_sound_w(m_discrete, space, INDIANBT_MUSIC_DATA, data); | |
285 | 285 | } |
286 | 286 | |
287 | 287 | |
r18185 | r18186 | |
597 | 597 | |
598 | 598 | DISCRETE_SOUND_END |
599 | 599 | |
600 | WRITE8_ | |
600 | WRITE8_MEMBER(_8080bw_state::polaris_sh_port_1_w) | |
601 | 601 | { |
602 | discrete_sound_w(d | |
602 | discrete_sound_w(m_discrete, space, POLARIS_MUSIC_DATA, data); | |
603 | 603 | } |
604 | 604 | |
605 | WRITE8_ | |
605 | WRITE8_MEMBER(_8080bw_state::polaris_sh_port_2_w) | |
606 | 606 | { |
607 | 607 | /* 0x01 - SX0 - Shot */ |
608 | discrete_sound_w(d | |
608 | discrete_sound_w(m_discrete, space, POLARIS_SX0_EN, data & 0x01); | |
609 | 609 | |
610 | 610 | /* 0x02 - SX1 - Ship Hit (Sub) */ |
611 | discrete_sound_w(d | |
611 | discrete_sound_w(m_discrete, space, POLARIS_SX1_EN, data & 0x02); | |
612 | 612 | |
613 | 613 | /* 0x04 - SX2 - Ship */ |
614 | discrete_sound_w(d | |
614 | discrete_sound_w(m_discrete, space, POLARIS_SX2_EN, data & 0x04); | |
615 | 615 | |
616 | 616 | /* 0x08 - SX3 - Explosion */ |
617 | discrete_sound_w(d | |
617 | discrete_sound_w(m_discrete, space, POLARIS_SX3_EN, data & 0x08); | |
618 | 618 | |
619 | 619 | /* 0x10 - SX4 */ |
620 | 620 | |
621 | 621 | /* 0x20 - SX5 - Sound Enable */ |
622 | discrete_sound_w(d | |
622 | discrete_sound_w(m_discrete, space, POLARIS_SX5_EN, data & 0x20); | |
623 | 623 | } |
624 | 624 | |
625 | WRITE8_ | |
625 | WRITE8_MEMBER(_8080bw_state::polaris_sh_port_3_w) | |
626 | 626 | { |
627 | _8080bw_state *state = space.machine().driver_data<_8080bw_state>(); | |
628 | 627 | |
629 | coin_lockout_global_w( | |
628 | coin_lockout_global_w(machine(), data & 0x04); /* SX8 */ | |
630 | 629 | |
631 | | |
630 | m_c8080bw_flip_screen = data & 0x20; /* SX11 */ | |
632 | 631 | |
633 | 632 | /* 0x01 - SX6 - Plane Down */ |
634 | discrete_sound_w(d | |
633 | discrete_sound_w(m_discrete, space, POLARIS_SX6_EN, data & 0x01); | |
635 | 634 | |
636 | 635 | /* 0x02 - SX7 - Plane Up */ |
637 | discrete_sound_w(d | |
636 | discrete_sound_w(m_discrete, space, POLARIS_SX7_EN, data & 0x02); | |
638 | 637 | |
639 | 638 | /* 0x08 - SX9 - Hit */ |
640 | discrete_sound_w(d | |
639 | discrete_sound_w(m_discrete, space, POLARIS_SX9_EN, data & 0x08); | |
641 | 640 | |
642 | 641 | /* 0x10 - SX10 - Hit */ |
643 | discrete_sound_w(d | |
642 | discrete_sound_w(m_discrete, space, POLARIS_SX10_EN, data & 0x10); | |
644 | 643 | } |
645 | 644 | |
646 | 645 |
r18185 | r18186 | |
---|---|---|
320 | 320 | /* the ports are guessed from operation */ |
321 | 321 | /* the schematics do not show the actual hookup */ |
322 | 322 | |
323 | WRITE8_ | |
323 | WRITE8_MEMBER(m79amb_state::m79amb_8000_w) | |
324 | 324 | { |
325 | 325 | /* these values are not latched */ |
326 | 326 | /* they are pulsed when the port is addressed */ |
327 | 327 | /* the discrete system will just trigger from them */ |
328 | discrete_sound_w(device, space, M79AMB_SHOT_EN, data & 0x01); | |
329 | discrete_sound_w(device, space, M79AMB_BOOM_EN, data & 0x02); | |
330 | discrete_sound_w(device, space, M79AMB_THUD_EN, data & 0x04); | |
328 | discrete_sound_w(m_discrete, space, M79AMB_SHOT_EN, data & 0x01); | |
329 | discrete_sound_w(m_discrete, space, M79AMB_BOOM_EN, data & 0x02); | |
330 | discrete_sound_w(m_discrete, space, M79AMB_THUD_EN, data & 0x04); | |
331 | 331 | }; |
332 | 332 | |
333 | WRITE8_ | |
333 | WRITE8_MEMBER(m79amb_state::m79amb_8003_w) | |
334 | 334 | { |
335 | 335 | /* Self Test goes low on reset and lights LED */ |
336 | 336 | /* LED goes off on pass */ |
337 | 337 | output_set_value("SELF_TEST", data & 0x01); |
338 | discrete_sound_w(device, space, M79AMB_MC_REV_EN, data & 0x02); | |
339 | discrete_sound_w(device, space, M79AMB_MC_CONTROL_EN, data & 0x04); | |
340 | discrete_sound_w(device, space, M79AMB_TANK_TRUCK_JEEP_EN, data & 0x08); | |
341 | discrete_sound_w(device, space, M79AMB_WHISTLE_B_EN, data & 0x10); | |
342 | discrete_sound_w(device, space, M79AMB_WHISTLE_A_EN, data & 0x20); | |
338 | discrete_sound_w(m_discrete, space, M79AMB_MC_REV_EN, data & 0x02); | |
339 | discrete_sound_w(m_discrete, space, M79AMB_MC_CONTROL_EN, data & 0x04); | |
340 | discrete_sound_w(m_discrete, space, M79AMB_TANK_TRUCK_JEEP_EN, data & 0x08); | |
341 | discrete_sound_w(m_discrete, space, M79AMB_WHISTLE_B_EN, data & 0x10); | |
342 | discrete_sound_w(m_discrete, space, M79AMB_WHISTLE_A_EN, data & 0x20); | |
343 | 343 | } |
r18185 | r18186 | |
---|---|---|
83 | 83 | }; |
84 | 84 | |
85 | 85 | |
86 | WRITE8_ | |
86 | WRITE8_MEMBER(mw8080bw_state::midway_tone_generator_lo_w) | |
87 | 87 | { |
88 | discrete_sound_w(d | |
88 | discrete_sound_w(m_discrete, space, MIDWAY_TONE_EN, (data >> 0) & 0x01); | |
89 | 89 | |
90 | discrete_sound_w(d | |
90 | discrete_sound_w(m_discrete, space, MIDWAY_TONE_DATA_L, (data >> 1) & 0x1f); | |
91 | 91 | |
92 | 92 | /* D6 and D7 are not connected */ |
93 | 93 | } |
94 | 94 | |
95 | 95 | |
96 | WRITE8_ | |
96 | WRITE8_MEMBER(mw8080bw_state::midway_tone_generator_hi_w) | |
97 | 97 | { |
98 | discrete_sound_w(d | |
98 | discrete_sound_w(m_discrete, space, MIDWAY_TONE_DATA_H, data & 0x3f); | |
99 | 99 | |
100 | 100 | /* D6 and D7 are not connected */ |
101 | 101 | } |
r18185 | r18186 | |
326 | 326 | MACHINE_CONFIG_END |
327 | 327 | |
328 | 328 | |
329 | WRITE8_ | |
329 | WRITE8_MEMBER(mw8080bw_state::tornbase_audio_w) | |
330 | 330 | { |
331 | discrete_sound_w(d | |
331 | discrete_sound_w(m_discrete, space, TORNBASE_TONE_240_EN, (data >> 0) & 0x01); | |
332 | 332 | |
333 | discrete_sound_w(d | |
333 | discrete_sound_w(m_discrete, space, TORNBASE_TONE_960_EN, (data >> 1) & 0x01); | |
334 | 334 | |
335 | discrete_sound_w(d | |
335 | discrete_sound_w(m_discrete, space, TORNBASE_TONE_120_EN, (data >> 2) & 0x01); | |
336 | 336 | |
337 | 337 | /* if (data & 0x08) enable SIREN sound */ |
338 | 338 | |
339 | 339 | /* if (data & 0x10) enable CHEER sound */ |
340 | 340 | |
341 | if (tornbase_get_cabinet_type( | |
341 | if (tornbase_get_cabinet_type(machine()) == TORNBASE_CAB_TYPE_UPRIGHT_OLD) | |
342 | 342 | { |
343 | 343 | /* if (data & 0x20) enable WHISTLE sound */ |
344 | 344 | |
r18185 | r18186 | |
351 | 351 | /* if (data & 0x40) enable WHISTLE sound */ |
352 | 352 | } |
353 | 353 | |
354 | coin_counter_w( | |
354 | coin_counter_w(machine(), 0, (data >> 7) & 0x01); | |
355 | 355 | } |
356 | 356 | |
357 | 357 | |
r18185 | r18186 | |
820 | 820 | MACHINE_CONFIG_END |
821 | 821 | |
822 | 822 | |
823 | WRITE8_ | |
823 | WRITE8_MEMBER(mw8080bw_state::boothill_audio_w) | |
824 | 824 | { |
825 | 825 | /* D0 and D1 are not connected */ |
826 | 826 | |
827 | coin_counter_w( | |
827 | coin_counter_w(machine(), 0, (data >> 2) & 0x01); | |
828 | 828 | |
829 | discrete_sound_w(d | |
829 | discrete_sound_w(m_discrete, space, BOOTHILL_GAME_ON_EN, (data >> 3) & 0x01); | |
830 | 830 | |
831 | discrete_sound_w(d | |
831 | discrete_sound_w(m_discrete, space, BOOTHILL_LEFT_SHOT_EN, (data >> 4) & 0x01); | |
832 | 832 | |
833 | discrete_sound_w(d | |
833 | discrete_sound_w(m_discrete, space, BOOTHILL_RIGHT_SHOT_EN, (data >> 5) & 0x01); | |
834 | 834 | |
835 | discrete_sound_w(d | |
835 | discrete_sound_w(m_discrete, space, BOOTHILL_LEFT_HIT_EN, (data >> 6) & 0x01); | |
836 | 836 | |
837 | discrete_sound_w(d | |
837 | discrete_sound_w(m_discrete, space, BOOTHILL_RIGHT_HIT_EN, (data >> 7) & 0x01); | |
838 | 838 | } |
839 | 839 | |
840 | 840 | |
r18185 | r18186 | |
1049 | 1049 | MACHINE_CONFIG_END |
1050 | 1050 | |
1051 | 1051 | |
1052 | WRITE8_ | |
1052 | WRITE8_MEMBER(mw8080bw_state::checkmat_audio_w) | |
1053 | 1053 | { |
1054 | discrete_sound_w(d | |
1054 | discrete_sound_w(m_discrete, space, CHECKMAT_TONE_EN, data & 0x01); | |
1055 | 1055 | |
1056 | discrete_sound_w(d | |
1056 | discrete_sound_w(m_discrete, space, CHECKMAT_BOOM_EN, (data >> 1) & 0x01); | |
1057 | 1057 | |
1058 | coin_counter_w( | |
1058 | coin_counter_w(machine(), 0, (data >> 2) & 0x01); | |
1059 | 1059 | |
1060 | | |
1060 | machine().sound().system_enable((data >> 3) & 0x01); | |
1061 | 1061 | |
1062 | discrete_sound_w(device, space, CHECKMAT_TONE_DATA_45, (data >> 4) & 0x03); | |
1063 | discrete_sound_w(device, space, CHECKMAT_TONE_DATA_67, (data >> 6) & 0x03); | |
1062 | discrete_sound_w(m_discrete, space, CHECKMAT_TONE_DATA_45, (data >> 4) & 0x03); | |
1063 | discrete_sound_w(m_discrete, space, CHECKMAT_TONE_DATA_67, (data >> 6) & 0x03); | |
1064 | 1064 | } |
1065 | 1065 | |
1066 | 1066 | |
r18185 | r18186 | |
1260 | 1260 | MACHINE_CONFIG_END |
1261 | 1261 | |
1262 | 1262 | |
1263 | WRITE8_ | |
1263 | WRITE8_MEMBER(mw8080bw_state::desertgu_audio_1_w) | |
1264 | 1264 | { |
1265 | 1265 | /* D0 and D1 are not connected */ |
1266 | 1266 | |
1267 | coin_counter_w( | |
1267 | coin_counter_w(machine(), 0, (data >> 2) & 0x01); | |
1268 | 1268 | |
1269 | discrete_sound_w(d | |
1269 | discrete_sound_w(m_discrete, space, DESERTGU_GAME_ON_EN, (data >> 3) & 0x01); | |
1270 | 1270 | |
1271 | discrete_sound_w(d | |
1271 | discrete_sound_w(m_discrete, space, DESERTGU_RIFLE_SHOT_EN, (data >> 4) & 0x01); | |
1272 | 1272 | |
1273 | discrete_sound_w(d | |
1273 | discrete_sound_w(m_discrete, space, DESERTGU_BOTTLE_HIT_EN, (data >> 5) & 0x01); | |
1274 | 1274 | |
1275 | discrete_sound_w(d | |
1275 | discrete_sound_w(m_discrete, space, DESERTGU_ROAD_RUNNER_HIT_EN, (data >> 6) & 0x01); | |
1276 | 1276 | |
1277 | discrete_sound_w(d | |
1277 | discrete_sound_w(m_discrete, space, DESERTGU_CREATURE_HIT_EN, (data >> 7) & 0x01); | |
1278 | 1278 | } |
1279 | 1279 | |
1280 | 1280 | |
1281 | WRITE8_ | |
1281 | WRITE8_MEMBER(mw8080bw_state::desertgu_audio_2_w) | |
1282 | 1282 | { |
1283 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
1284 | 1283 | |
1285 | discrete_sound_w(d | |
1284 | discrete_sound_w(m_discrete, space, DESERTGU_ROADRUNNER_BEEP_BEEP_EN, (data >> 0) & 0x01); | |
1286 | 1285 | |
1287 | discrete_sound_w(d | |
1286 | discrete_sound_w(m_discrete, space, DESERTGU_TRIGGER_CLICK_EN, (data >> 1) & 0x01); | |
1288 | 1287 | |
1289 | 1288 | output_set_value("Player1_Gun_Recoil", (data >> 2) & 0x01); |
1290 | 1289 | |
1291 | | |
1290 | m_desertgun_controller_select = (data >> 3) & 0x01; | |
1292 | 1291 | |
1293 | 1292 | /* D4-D7 are not connected */ |
1294 | 1293 | } |
r18185 | r18186 | |
1527 | 1526 | MACHINE_CONFIG_END |
1528 | 1527 | |
1529 | 1528 | |
1530 | WRITE8_ | |
1529 | WRITE8_MEMBER(mw8080bw_state::dplay_audio_w) | |
1531 | 1530 | { |
1532 | discrete_sound_w(d | |
1531 | discrete_sound_w(m_discrete, space, DPLAY_TONE_ON_EN, (data >> 0) & 0x01); | |
1533 | 1532 | |
1534 | discrete_sound_w(d | |
1533 | discrete_sound_w(m_discrete, space, DPLAY_CHEER_EN, (data >> 1) & 0x01); | |
1535 | 1534 | |
1536 | discrete_sound_w(d | |
1535 | discrete_sound_w(m_discrete, space, DPLAY_SIREN_EN, (data >> 2) & 0x01); | |
1537 | 1536 | |
1538 | discrete_sound_w(d | |
1537 | discrete_sound_w(m_discrete, space, DPLAY_WHISTLE_EN, (data >> 3) & 0x01); | |
1539 | 1538 | |
1540 | discrete_sound_w(d | |
1539 | discrete_sound_w(m_discrete, space, DPLAY_GAME_ON_EN, (data >> 4) & 0x01); | |
1541 | 1540 | |
1542 | coin_counter_w( | |
1541 | coin_counter_w(machine(), 0, (data >> 5) & 0x01); | |
1543 | 1542 | |
1544 | 1543 | /* D6 and D7 are not connected */ |
1545 | 1544 | } |
r18185 | r18186 | |
1946 | 1945 | } |
1947 | 1946 | |
1948 | 1947 | |
1949 | WRITE8_ | |
1948 | WRITE8_MEMBER(mw8080bw_state::clowns_audio_2_w) | |
1950 | 1949 | { |
1951 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
1952 | UINT8 rising_bits = data & ~state->m_port_2_last; | |
1950 | UINT8 rising_bits = data & ~m_port_2_last; | |
1953 | 1951 | |
1954 | discrete_sound_w(d | |
1952 | discrete_sound_w(m_discrete, space, CLOWNS_POP_BOTTOM_EN, (data >> 0) & 0x01); | |
1955 | 1953 | |
1956 | discrete_sound_w(d | |
1954 | discrete_sound_w(m_discrete, space, CLOWNS_POP_MIDDLE_EN, (data >> 1) & 0x01); | |
1957 | 1955 | |
1958 | discrete_sound_w(d | |
1956 | discrete_sound_w(m_discrete, space, CLOWNS_POP_TOP_EN, (data >> 2) & 0x01); | |
1959 | 1957 | |
1960 | | |
1958 | machine().sound().system_enable((data >> 3) & 0x01); | |
1961 | 1959 | |
1962 | discrete_sound_w(d | |
1960 | discrete_sound_w(m_discrete, space, CLOWNS_SPRINGBOARD_HIT_EN, (data >> 4) & 0x01); | |
1963 | 1961 | |
1964 | if (rising_bits & 0x20) | |
1962 | if (rising_bits & 0x20) m_samples->start(0, 0); /* springboard miss */ | |
1965 | 1963 | |
1966 | 1964 | /* D6 and D7 are not connected */ |
1967 | 1965 | |
1968 | | |
1966 | m_port_2_last = data; | |
1969 | 1967 | } |
1970 | 1968 | |
1971 | 1969 | |
r18185 | r18186 | |
2302 | 2300 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
2303 | 2301 | MACHINE_CONFIG_END |
2304 | 2302 | |
2305 | WRITE8_ | |
2303 | WRITE8_MEMBER(mw8080bw_state::spacwalk_audio_1_w) | |
2306 | 2304 | { |
2307 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
2308 | 2305 | |
2309 | coin_counter_w( | |
2306 | coin_counter_w(machine(), 0, (data >> 0) & 0x01); | |
2310 | 2307 | |
2311 | | |
2308 | m_clowns_controller_select = (data >> 1) & 0x01; | |
2312 | 2309 | |
2313 | | |
2310 | machine().sound().system_enable((data >> 2) & 0x01); | |
2314 | 2311 | |
2315 | discrete_sound_w(d | |
2312 | discrete_sound_w(m_discrete, space, SPACWALK_SPACE_SHIP_EN, (data >> 3) & 0x01); | |
2316 | 2313 | } |
2317 | 2314 | |
2318 | WRITE8_ | |
2315 | WRITE8_MEMBER(mw8080bw_state::spacwalk_audio_2_w) | |
2319 | 2316 | { |
2320 | discrete_sound_w(d | |
2317 | discrete_sound_w(m_discrete, space, SPACWALK_TARGET_HIT_BOTTOM_EN, (data >> 0) & 0x01); | |
2321 | 2318 | |
2322 | discrete_sound_w(d | |
2319 | discrete_sound_w(m_discrete, space, SPACWALK_TARGET_HIT_MIDDLE_EN, (data >> 1) & 0x01); | |
2323 | 2320 | |
2324 | discrete_sound_w(d | |
2321 | discrete_sound_w(m_discrete, space, SPACWALK_TARGET_HIT_TOP_EN, (data >> 2) & 0x01); | |
2325 | 2322 | |
2326 | discrete_sound_w(d | |
2323 | discrete_sound_w(m_discrete, space, SPACWALK_SPRINGBOARD_HIT1_EN, (data >> 3) & 0x01); | |
2327 | 2324 | |
2328 | discrete_sound_w(d | |
2325 | discrete_sound_w(m_discrete, space, SPACWALK_SPRINGBOARD_HIT2_EN, (data >> 4) & 0x01); | |
2329 | 2326 | |
2330 | discrete_sound_w(d | |
2327 | discrete_sound_w(m_discrete, space, SPACWALK_SPRINGBOARD_MISS_EN, (data >> 5) & 0x01); | |
2331 | 2328 | } |
2332 | 2329 | |
2333 | 2330 | |
r18185 | r18186 | |
2534 | 2531 | MACHINE_CONFIG_END |
2535 | 2532 | |
2536 | 2533 | |
2537 | WRITE8_ | |
2534 | WRITE8_MEMBER(mw8080bw_state::shuffle_audio_1_w) | |
2538 | 2535 | { |
2539 | discrete_sound_w(d | |
2536 | discrete_sound_w(m_discrete, space, SHUFFLE_CLICK_EN, (data >> 0) & 0x01); | |
2540 | 2537 | |
2541 | discrete_sound_w(d | |
2538 | discrete_sound_w(m_discrete, space, SHUFFLE_ROLLOVER_EN, (data >> 1) & 0x01); | |
2542 | 2539 | |
2543 | | |
2540 | machine().sound().system_enable((data >> 2) & 0x01); | |
2544 | 2541 | |
2545 | discrete_sound_w(d | |
2542 | discrete_sound_w(m_discrete, space, NODE_29, (data >> 3) & 0x07); | |
2546 | 2543 | |
2547 | discrete_sound_w(device, space, SHUFFLE_ROLLING_3_EN, (data >> 3) & 0x01); | |
2548 | discrete_sound_w(device, space, SHUFFLE_ROLLING_2_EN, (data >> 4) & 0x01); | |
2549 | discrete_sound_w(device, space, SHUFFLE_ROLLING_1_EN, (data >> 5) & 0x01); | |
2544 | discrete_sound_w(m_discrete, space, SHUFFLE_ROLLING_3_EN, (data >> 3) & 0x01); | |
2545 | discrete_sound_w(m_discrete, space, SHUFFLE_ROLLING_2_EN, (data >> 4) & 0x01); | |
2546 | discrete_sound_w(m_discrete, space, SHUFFLE_ROLLING_1_EN, (data >> 5) & 0x01); | |
2550 | 2547 | |
2551 | 2548 | /* D6 and D7 are not connected */ |
2552 | 2549 | } |
2553 | 2550 | |
2554 | 2551 | |
2555 | WRITE8_ | |
2552 | WRITE8_MEMBER(mw8080bw_state::shuffle_audio_2_w) | |
2556 | 2553 | { |
2557 | discrete_sound_w(d | |
2554 | discrete_sound_w(m_discrete, space, SHUFFLE_FOUL_EN, (data >> 0) & 0x01); | |
2558 | 2555 | |
2559 | coin_counter_w( | |
2556 | coin_counter_w(machine(), 0, (data >> 1) & 0x01); | |
2560 | 2557 | |
2561 | 2558 | /* D2-D7 are not connected */ |
2562 | 2559 | } |
r18185 | r18186 | |
2714 | 2711 | MACHINE_CONFIG_END |
2715 | 2712 | |
2716 | 2713 | |
2717 | WRITE8_ | |
2714 | WRITE8_MEMBER(mw8080bw_state::dogpatch_audio_w) | |
2718 | 2715 | { |
2719 | 2716 | /* D0, D1 and D7 are not used */ |
2720 | 2717 | |
2721 | coin_counter_w( | |
2718 | coin_counter_w(machine(), 0, (data >> 2) & 0x01); | |
2722 | 2719 | |
2723 | space.machine().sound().system_enable((data >> 3) & 0x01); | |
2724 | discrete_sound_w(device, space, DOGPATCH_GAME_ON_EN, (data >> 3) & 0x01); | |
2720 | machine().sound().system_enable((data >> 3) & 0x01); | |
2721 | discrete_sound_w(m_discrete, space, DOGPATCH_GAME_ON_EN, (data >> 3) & 0x01); | |
2725 | 2722 | |
2726 | discrete_sound_w(d | |
2723 | discrete_sound_w(m_discrete, space, DOGPATCH_LEFT_SHOT_EN, (data >> 4) & 0x01); | |
2727 | 2724 | |
2728 | discrete_sound_w(d | |
2725 | discrete_sound_w(m_discrete, space, DOGPATCH_RIGHT_SHOT_EN, (data >> 5) & 0x01); | |
2729 | 2726 | |
2730 | discrete_sound_w(d | |
2727 | discrete_sound_w(m_discrete, space, DOGPATCH_HIT_EN, (data >> 6) & 0x01); | |
2731 | 2728 | } |
2732 | 2729 | |
2733 | 2730 | |
r18185 | r18186 | |
3252 | 3249 | |
3253 | 3250 | |
3254 | 3251 | |
3255 | WRITE8_ | |
3252 | WRITE8_MEMBER(mw8080bw_state::spcenctr_audio_1_w) | |
3256 | 3253 | { |
3257 | | |
3254 | machine().sound().system_enable((data >> 0) & 0x01); | |
3258 | 3255 | |
3259 | 3256 | /* D1 is marked as 'OPTIONAL SWITCH VIDEO FOR COCKTAIL', |
3260 | 3257 | but it is never set by the software */ |
3261 | 3258 | |
3262 | discrete_sound_w(d | |
3259 | discrete_sound_w(m_discrete, space, SPCENCTR_CRASH_EN, (data >> 2) & 0x01); | |
3263 | 3260 | |
3264 | 3261 | /* D3-D7 are not connected */ |
3265 | 3262 | } |
3266 | 3263 | |
3267 | 3264 | |
3268 | WRITE8_ | |
3265 | WRITE8_MEMBER(mw8080bw_state::spcenctr_audio_2_w) | |
3269 | 3266 | { |
3270 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
3271 | 3267 | |
3272 | 3268 | /* set WIND SOUND FREQ(data & 0x0f) 0, if no wind */ |
3273 | 3269 | |
3274 | discrete_sound_w(d | |
3270 | discrete_sound_w(m_discrete, space, SPCENCTR_EXPLOSION_EN, (data >> 4) & 0x01); | |
3275 | 3271 | |
3276 | discrete_sound_w(d | |
3272 | discrete_sound_w(m_discrete, space, SPCENCTR_PLAYER_SHOT_EN, (data >> 5) & 0x01); | |
3277 | 3273 | |
3278 | 3274 | /* D6 and D7 are not connected */ |
3279 | 3275 | |
3280 | | |
3276 | m_port_2_last = data; | |
3281 | 3277 | } |
3282 | 3278 | |
3283 | 3279 | |
3284 | WRITE8_ | |
3280 | WRITE8_MEMBER(mw8080bw_state::spcenctr_audio_3_w) | |
3285 | 3281 | { |
3286 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
3287 | 3282 | |
3288 | 3283 | /* if (data & 0x01) enable SCREECH (hit the sides) sound */ |
3289 | 3284 | |
3290 | discrete_sound_w(d | |
3285 | discrete_sound_w(m_discrete, space, SPCENCTR_ENEMY_SHIP_SHOT_EN, (data >> 1) & 0x01); | |
3291 | 3286 | |
3292 | | |
3287 | m_spcenctr_strobe_state = (data >> 2) & 0x01; | |
3293 | 3288 | |
3294 | 3289 | output_set_value("LAMP", (data >> 3) & 0x01); |
3295 | 3290 | |
3296 | discrete_sound_w(d | |
3291 | discrete_sound_w(m_discrete, space, SPCENCTR_BONUS_EN, (data >> 4) & 0x01); | |
3297 | 3292 | |
3298 | sn76477_enable_w( | |
3293 | sn76477_enable_w(m_sn, (data >> 5) & 0x01); /* saucer sound */ | |
3299 | 3294 | |
3300 | 3295 | /* D6 and D7 are not connected */ |
3301 | 3296 | } |
r18185 | r18186 | |
3461 | 3456 | MACHINE_CONFIG_END |
3462 | 3457 | |
3463 | 3458 | |
3464 | WRITE8_ | |
3459 | WRITE8_MEMBER(mw8080bw_state::bowler_audio_1_w) | |
3465 | 3460 | { |
3466 | 3461 | /* D0 - selects controller on the cocktail PCB */ |
3467 | 3462 | |
3468 | coin_counter_w( | |
3463 | coin_counter_w(machine(), 0, (data >> 1) & 0x01); | |
3469 | 3464 | |
3470 | | |
3465 | machine().sound().system_enable((data >> 2) & 0x01); | |
3471 | 3466 | |
3472 | discrete_sound_w(d | |
3467 | discrete_sound_w(m_discrete, space, BOWLER_FOWL_EN, (data >> 3) & 0x01); | |
3473 | 3468 | |
3474 | 3469 | /* D4 - appears to be a screen flip, but it's |
3475 | 3470 | shown unconnected on the schematics for both the |
r18185 | r18186 | |
4184 | 4179 | MACHINE_CONFIG_END |
4185 | 4180 | |
4186 | 4181 | |
4187 | WRITE8_ | |
4182 | WRITE8_MEMBER(mw8080bw_state::invaders_audio_1_w) | |
4188 | 4183 | { |
4189 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
4190 | 4184 | |
4191 | sn76477_enable_w( | |
4185 | sn76477_enable_w(m_sn, (~data >> 0) & 0x01); /* saucer sound */ | |
4192 | 4186 | |
4193 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_MISSILE_EN, 1), data & 0x02); | |
4194 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 1), data & 0x04); | |
4195 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); | |
4196 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); | |
4187 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_MISSILE_EN, 1), data & 0x02); | |
4188 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 1), data & 0x04); | |
4189 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); | |
4190 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); | |
4197 | 4191 | |
4198 | | |
4192 | machine().sound().system_enable(data & 0x20); | |
4199 | 4193 | |
4200 | 4194 | /* D6 and D7 are not connected */ |
4201 | 4195 | } |
4202 | 4196 | |
4203 | 4197 | |
4204 | WRITE8_ | |
4198 | WRITE8_MEMBER(mw8080bw_state::invaders_audio_2_w) | |
4205 | 4199 | { |
4206 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
4207 | 4200 | |
4208 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_FLEET_DATA, 1), data & 0x0f); | |
4209 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 1), data & 0x10); | |
4201 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_FLEET_DATA, 1), data & 0x0f); | |
4202 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 1), data & 0x10); | |
4210 | 4203 | |
4211 | 4204 | /* the flip screen line is only connected on the cocktail PCB */ |
4212 | if (invaders_is_cabinet_cocktail( | |
4205 | if (invaders_is_cabinet_cocktail(machine())) | |
4213 | 4206 | { |
4214 | | |
4207 | m_invaders_flip_screen = (data >> 5) & 0x01; | |
4215 | 4208 | } |
4216 | 4209 | |
4217 | 4210 | /* D6 and D7 are not connected */ |
r18185 | r18186 | |
4589 | 4582 | MACHINE_CONFIG_END |
4590 | 4583 | |
4591 | 4584 | |
4592 | WRITE8_ | |
4585 | WRITE8_MEMBER(mw8080bw_state::blueshrk_audio_w) | |
4593 | 4586 | { |
4594 | discrete_sound_w(d | |
4587 | discrete_sound_w(m_discrete, space, BLUESHRK_GAME_ON_EN, (data >> 0) & 0x01); | |
4595 | 4588 | |
4596 | discrete_sound_w(d | |
4589 | discrete_sound_w(m_discrete, space, BLUESHRK_SHOT_EN, (data >> 1) & 0x01); | |
4597 | 4590 | |
4598 | discrete_sound_w(d | |
4591 | discrete_sound_w(m_discrete, space, BLUESHRK_HIT_EN, (data >> 2) & 0x01); | |
4599 | 4592 | |
4600 | discrete_sound_w(d | |
4593 | discrete_sound_w(m_discrete, space, BLUESHRK_SHARK_EN, (data >> 3) & 0x01); | |
4601 | 4594 | |
4602 | 4595 | /* if (data & 0x10) enable KILLED DIVER sound, this circuit |
4603 | 4596 | doesn't appear to be on the schematics */ |
4604 | 4597 | |
4605 | discrete_sound_w(d | |
4598 | discrete_sound_w(m_discrete, space, BLUESHRK_OCTOPUS_EN, (data >> 5) & 0x01); | |
4606 | 4599 | |
4607 | 4600 | /* D6 and D7 are not connected */ |
4608 | 4601 | } |
r18185 | r18186 | |
4817 | 4810 | MACHINE_CONFIG_END |
4818 | 4811 | |
4819 | 4812 | |
4820 | WRITE8_ | |
4813 | WRITE8_MEMBER(mw8080bw_state::invad2ct_audio_1_w) | |
4821 | 4814 | { |
4822 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
4823 | 4815 | |
4824 | sn76477_enable_w( | |
4816 | sn76477_enable_w(m_sn1, (~data >> 0) & 0x01); /* saucer sound */ | |
4825 | 4817 | |
4826 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_MISSILE_EN, 1), data & 0x02); | |
4827 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 1), data & 0x04); | |
4828 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); | |
4829 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); | |
4818 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_MISSILE_EN, 1), data & 0x02); | |
4819 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 1), data & 0x04); | |
4820 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 1), data & 0x08); | |
4821 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 1), data & 0x10); | |
4830 | 4822 | |
4831 | | |
4823 | machine().sound().system_enable(data & 0x20); | |
4832 | 4824 | |
4833 | 4825 | /* D6 and D7 are not connected */ |
4834 | 4826 | } |
4835 | 4827 | |
4836 | 4828 | |
4837 | WRITE8_ | |
4829 | WRITE8_MEMBER(mw8080bw_state::invad2ct_audio_2_w) | |
4838 | 4830 | { |
4839 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_FLEET_DATA, 1), data & 0x0f); | |
4840 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 1), data & 0x10); | |
4831 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_FLEET_DATA, 1), data & 0x0f); | |
4832 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 1), data & 0x10); | |
4841 | 4833 | |
4842 | 4834 | /* D5-D7 are not connected */ |
4843 | 4835 | } |
4844 | 4836 | |
4845 | 4837 | |
4846 | WRITE8_ | |
4838 | WRITE8_MEMBER(mw8080bw_state::invad2ct_audio_3_w) | |
4847 | 4839 | { |
4848 | mw8080bw_state *state = space.machine().driver_data<mw8080bw_state>(); | |
4849 | 4840 | |
4850 | sn76477_enable_w( | |
4841 | sn76477_enable_w(m_sn2, (~data >> 0) & 0x01); /* saucer sound */ | |
4851 | 4842 | |
4852 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_MISSILE_EN, 2), data & 0x02); | |
4853 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 2), data & 0x04); | |
4854 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 2), data & 0x08); | |
4855 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 2), data & 0x10); | |
4843 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_MISSILE_EN, 2), data & 0x02); | |
4844 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_EXPLOSION_EN, 2), data & 0x04); | |
4845 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_INVADER_HIT_EN, 2), data & 0x08); | |
4846 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_BONUS_MISSLE_BASE_EN, 2), data & 0x10); | |
4856 | 4847 | |
4857 | 4848 | /* D5-D7 are not connected */ |
4858 | 4849 | } |
4859 | 4850 | |
4860 | 4851 | |
4861 | WRITE8_ | |
4852 | WRITE8_MEMBER(mw8080bw_state::invad2ct_audio_4_w) | |
4862 | 4853 | { |
4863 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_FLEET_DATA, 2), data & 0x0f); | |
4864 | discrete_sound_w(device, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 2), data & 0x10); | |
4854 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_FLEET_DATA, 2), data & 0x0f); | |
4855 | discrete_sound_w(m_discrete, space, INVADERS_NODE(INVADERS_SAUCER_HIT_EN, 2), data & 0x10); | |
4865 | 4856 | |
4866 | 4857 | /* D5-D7 are not connected */ |
4867 | 4858 | } |
r18185 | r18186 | |
---|---|---|
96 | 96 | } |
97 | 97 | |
98 | 98 | |
99 | ||
99 | WRITE_LINE_MEMBER(cchasm_state::ctc_timer_1_w) | |
100 | 100 | { |
101 | cchasm_state *drvstate = device->machine().driver_data<cchasm_state>(); | |
102 | 101 | if (state) /* rising edge */ |
103 | 102 | { |
104 | drvstate->m_output[0] ^= 0x7f; | |
105 | drvstate->m_channel_active[0] = 1; | |
106 | device->machine().device<dac_device>("dac1")->write_unsigned8(drvstate->m_output[0]); | |
103 | m_output[0] ^= 0x7f; | |
104 | m_channel_active[0] = 1; | |
105 | machine().device<dac_device>("dac1")->write_unsigned8(m_output[0]); | |
107 | 106 | } |
108 | 107 | } |
109 | 108 | |
110 | ||
109 | WRITE_LINE_MEMBER(cchasm_state::ctc_timer_2_w) | |
111 | 110 | { |
112 | cchasm_state *drvstate = device->machine().driver_data<cchasm_state>(); | |
113 | 111 | if (state) /* rising edge */ |
114 | 112 | { |
115 | drvstate->m_output[1] ^= 0x7f; | |
116 | drvstate->m_channel_active[1] = 1; | |
117 | device->machine().device<dac_device>("dac2")->write_unsigned8(drvstate->m_output[0]); | |
113 | m_output[1] ^= 0x7f; | |
114 | m_channel_active[1] = 1; | |
115 | machine().device<dac_device>("dac2")->write_unsigned8(m_output[0]); | |
118 | 116 | } |
119 | 117 | } |
120 | 118 | |
r18185 | r18186 | |
122 | 120 | { |
123 | 121 | DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_IRQ0), /* interrupt handler */ |
124 | 122 | DEVCB_NULL, /* ZC/TO0 callback */ |
125 | DEVCB_LINE(ctc_timer_1_w), /* ZC/TO1 callback */ | |
126 | DEVCB_LINE(ctc_timer_2_w) /* ZC/TO2 callback */ | |
123 | DEVCB_DRIVER_LINE_MEMBER(cchasm_state,ctc_timer_1_w), /* ZC/TO1 callback */ | |
124 | DEVCB_DRIVER_LINE_MEMBER(cchasm_state,ctc_timer_2_w) /* ZC/TO2 callback */ | |
127 | 125 | }; |
128 | 126 | |
129 | 127 | SOUND_START( cchasm ) |
r18185 | r18186 | |
---|---|---|
1212 | 1212 | |
1213 | 1213 | */ |
1214 | 1214 | |
1215 | ||
1215 | WRITE8_MEMBER(dkong_state::M58817_command_w) | |
1216 | 1216 | { |
1217 | device_t *device = machine().device("tms"); | |
1217 | 1218 | tms5110_ctl_w(device, space, 0, data & 0x0f); |
1218 | 1219 | tms5110_pdc_w(device, (data>>4) & 0x01); |
1219 | 1220 | /* FIXME 0x20 is CS */ |
r18185 | r18186 | |
1234 | 1235 | logerror("dkong_speech_w: 0x%02x\n", data); |
1235 | 1236 | } |
1236 | 1237 | |
1237 | static DECLARE_READ8_DEVICE_HANDLER( dkong_voice_status_r ); | |
1238 | static READ8_DEVICE_HANDLER( dkong_voice_status_r ) | |
1238 | READ8_MEMBER(dkong_state::dkong_voice_status_r) | |
1239 | 1239 | { |
1240 | 1240 | /* only provided for documentation purposes |
1241 | 1241 | * not actually used |
r18185 | r18186 | |
1243 | 1243 | return 0; |
1244 | 1244 | } |
1245 | 1245 | |
1246 | ||
1246 | READ8_MEMBER(dkong_state::dkong_tune_r) | |
1247 | 1247 | { |
1248 | dkong_state *state = space.machine().driver_data<dkong_state>(); | |
1249 | UINT8 page = latch8_r(state->m_dev_vp2, space, 0) & 0x47; | |
1248 | device_t *device = machine().device("ls175.3d"); | |
1249 | UINT8 page = latch8_r(m_dev_vp2, space, 0) & 0x47; | |
1250 | 1250 | |
1251 | 1251 | if ( page & 0x40 ) |
1252 | 1252 | { |
1253 | return (latch8_r(device, space, 0) & 0x0F) | (dkong_voice_status_r( | |
1253 | return (latch8_r(device, space, 0) & 0x0F) | (dkong_voice_status_r(space, 0) << 4); | |
1254 | 1254 | } |
1255 | 1255 | else |
1256 | 1256 | { |
1257 | /* printf("%s:rom access\n",space.machine().describe_context()); */ | |
1258 | return (state->m_snd_rom[0x1000 + (page & 7) * 256 + offset]); | |
1257 | /* printf("%s:rom access\n",machine().describe_context()); */ | |
1258 | return (m_snd_rom[0x1000 + (page & 7) * 256 + offset]); | |
1259 | 1259 | } |
1260 | 1260 | } |
1261 | 1261 | |
1262 | ||
1262 | WRITE8_MEMBER(dkong_state::dkong_p1_w) | |
1263 | 1263 | { |
1264 | discrete_sound_w(d | |
1264 | discrete_sound_w(m_discrete,space,DS_DAC,data); | |
1265 | 1265 | } |
1266 | 1266 | |
1267 | 1267 | |
r18185 | r18186 | |
1291 | 1291 | ADDRESS_MAP_END |
1292 | 1292 | |
1293 | 1293 | static ADDRESS_MAP_START( dkong_sound_io_map, AS_IO, 8, dkong_state ) |
1294 | AM_RANGE(0x00, 0xFF) AM_ | |
1294 | AM_RANGE(0x00, 0xFF) AM_READ(dkong_tune_r) | |
1295 | 1295 | AM_WRITE(dkong_voice_w) |
1296 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_ | |
1296 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(dkong_tune_r) | |
1297 | 1297 | AM_WRITE(dkong_voice_w) |
1298 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_ | |
1298 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dkong_p1_w) /* only write to dac */ | |
1299 | 1299 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_LATCH8_READWRITE("virtual_p2") |
1300 | 1300 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_LATCH8_READBIT("ls259.6h", 5) |
1301 | 1301 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_LATCH8_READBIT("ls259.6h", 4) |
r18185 | r18186 | |
1303 | 1303 | |
1304 | 1304 | static ADDRESS_MAP_START( dkongjr_sound_io_map, AS_IO, 8, dkong_state ) |
1305 | 1305 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_LATCH8_READ("ls174.3d") |
1306 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_ | |
1306 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dkong_p1_w) /* only write to dac */ | |
1307 | 1307 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_LATCH8_READWRITE("virtual_p2") |
1308 | 1308 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_LATCH8_READBIT("ls259.6h", 5) |
1309 | 1309 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_LATCH8_READBIT("ls259.6h", 4) |
r18185 | r18186 | |
1311 | 1311 | |
1312 | 1312 | static ADDRESS_MAP_START( radarscp1_sound_io_map, AS_IO, 8, dkong_state ) |
1313 | 1313 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_DEVREAD_LEGACY("ls175.3d", latch8_r) |
1314 | AM_RANGE(0x00, 0xff) AM_ | |
1314 | AM_RANGE(0x00, 0xff) AM_WRITE(dkong_p1_w) /* DAC here */ | |
1315 | 1315 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_LATCH8_READ("virtual_p1") |
1316 | AM_ | |
1316 | AM_WRITE(M58817_command_w) | |
1317 | 1317 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_LATCH8_WRITE("virtual_p2") |
1318 | 1318 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_LATCH8_READBIT("ls259.6h", 5) |
1319 | 1319 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_LATCH8_READBIT("ls259.6h", 4) |
r18185 | r18186 | |
---|---|---|
9 | 9 | #include "sound/discrete.h" |
10 | 10 | |
11 | 11 | |
12 | WRITE8_ | |
12 | WRITE8_MEMBER(firetrk_state::firetrk_skid_reset_w) | |
13 | 13 | { |
14 | firetrk_state *state = space.machine().driver_data<firetrk_state>(); | |
15 | state->m_skid[0] = 0; | |
16 | state->m_skid[1] = 0; | |
14 | m_skid[0] = 0; | |
15 | m_skid[1] = 0; | |
17 | 16 | |
18 | 17 | // also SUPERBUG_SKID_EN |
19 | discrete_sound_w(d | |
18 | discrete_sound_w(m_discrete, space, FIRETRUCK_SKID_EN, 1); | |
20 | 19 | } |
21 | 20 | |
22 | 21 | |
23 | WRITE8_ | |
22 | WRITE8_MEMBER(firetrk_state::montecar_skid_reset_w) | |
24 | 23 | { |
25 | discrete_sound_w(d | |
24 | discrete_sound_w(m_discrete, space, MONTECAR_SKID_EN, 1); | |
26 | 25 | } |
27 | 26 | |
28 | 27 | |
29 | WRITE8_ | |
28 | WRITE8_MEMBER(firetrk_state::firetrk_crash_snd_w) | |
30 | 29 | { |
31 | 30 | // also SUPERBUG_CRASH_DATA and MONTECAR_CRASH_DATA |
32 | discrete_sound_w(d | |
31 | discrete_sound_w(m_discrete, space, FIRETRUCK_CRASH_DATA, data >> 4); | |
33 | 32 | } |
34 | 33 | |
35 | 34 | |
36 | WRITE8_ | |
35 | WRITE8_MEMBER(firetrk_state::firetrk_skid_snd_w) | |
37 | 36 | { |
38 | 37 | // also SUPERBUG_SKID_EN and MONTECAR_SKID_EN |
39 | discrete_sound_w(d | |
38 | discrete_sound_w(m_discrete, space, FIRETRUCK_SKID_EN, 0); | |
40 | 39 | } |
41 | 40 | |
42 | 41 | |
43 | WRITE8_ | |
42 | WRITE8_MEMBER(firetrk_state::firetrk_motor_snd_w) | |
44 | 43 | { |
45 | 44 | // also MONTECAR_DRONE_MOTOR_DATA |
46 | discrete_sound_w(d | |
45 | discrete_sound_w(m_discrete, space, FIRETRUCK_SIREN_DATA, data >> 4); | |
47 | 46 | |
48 | 47 | // also MONTECAR_MOTOR_DATA |
49 | discrete_sound_w(d | |
48 | discrete_sound_w(m_discrete, space, FIRETRUCK_MOTOR_DATA, data & 0x0f); | |
50 | 49 | } |
51 | 50 | |
52 | 51 | |
53 | WRITE8_ | |
52 | WRITE8_MEMBER(firetrk_state::superbug_motor_snd_w) | |
54 | 53 | { |
55 | discrete_sound_w(d | |
54 | discrete_sound_w(m_discrete, space, SUPERBUG_SPEED_DATA, data & 0x0f); | |
56 | 55 | } |
57 | 56 | |
58 | 57 | |
59 | WRITE8_ | |
58 | WRITE8_MEMBER(firetrk_state::firetrk_xtndply_w) | |
60 | 59 | { |
61 | 60 | // also SUPERBUG_ASR_EN (extended play) |
62 | discrete_sound_w(d | |
61 | discrete_sound_w(m_discrete, space, FIRETRUCK_XTNDPLY_EN, data); | |
63 | 62 | } |
64 | 63 | |
65 | 64 |
r18185 | r18186 | |
---|---|---|
20 | 20 | Avalanche memory audio output handlers |
21 | 21 | ***************************************************************************/ |
22 | 22 | |
23 | WRITE8_ | |
23 | WRITE8_MEMBER(avalnche_state::avalnche_noise_amplitude_w) | |
24 | 24 | { |
25 | discrete_sound_w(d | |
25 | discrete_sound_w(m_discrete, space, AVALNCHE_SOUNDLVL_DATA, data & 0x3f); | |
26 | 26 | } |
27 | 27 | |
28 | WRITE8_ | |
28 | WRITE8_MEMBER(avalnche_state::avalnche_attract_enable_w) | |
29 | 29 | { |
30 | discrete_sound_w(d | |
30 | discrete_sound_w(m_discrete, space, AVALNCHE_ATTRACT_EN, data & 0x01); | |
31 | 31 | } |
32 | 32 | |
33 | WRITE8_ | |
33 | WRITE8_MEMBER(avalnche_state::avalnche_audio_w) | |
34 | 34 | { |
35 | 35 | int bit = data & 0x01; |
36 | 36 | |
37 | 37 | switch (offset & 0x07) |
38 | 38 | { |
39 | 39 | case 0x00: /* AUD0 */ |
40 | discrete_sound_w(d | |
40 | discrete_sound_w(m_discrete, space, AVALNCHE_AUD0_EN, bit); | |
41 | 41 | break; |
42 | 42 | |
43 | 43 | case 0x01: /* AUD1 */ |
44 | discrete_sound_w(d | |
44 | discrete_sound_w(m_discrete, space, AVALNCHE_AUD1_EN, bit); | |
45 | 45 | break; |
46 | 46 | |
47 | 47 | case 0x02: /* AUD2 */ |
48 | 48 | default: |
49 | discrete_sound_w(d | |
49 | discrete_sound_w(m_discrete, space, AVALNCHE_AUD2_EN, bit); | |
50 | 50 | break; |
51 | 51 | } |
52 | 52 | } |
r18185 | r18186 | |
128 | 128 | Catch memory audio output handlers |
129 | 129 | ***************************************************************************/ |
130 | 130 | |
131 | WRITE8_ | |
131 | WRITE8_MEMBER(avalnche_state::catch_audio_w) | |
132 | 132 | { |
133 | 133 | /* Different from avalnche, it plays a sound (offset 0/1/2) on data bit 0 rising edge. |
134 | 134 | There's no indication that the game silences sound, it's probably done automatically. */ |
r18185 | r18186 | |
---|---|---|
14 | 14 | * |
15 | 15 | *************************************/ |
16 | 16 | |
17 | WRITE8_ | |
17 | WRITE8_MEMBER(canyon_state::canyon_motor_w) | |
18 | 18 | { |
19 | discrete_sound_w(d | |
19 | discrete_sound_w(m_discrete, space, NODE_RELATIVE(CANYON_MOTOR1_DATA, (offset & 0x01)), data & 0x0f); | |
20 | 20 | } |
21 | 21 | |
22 | 22 | |
23 | WRITE8_ | |
23 | WRITE8_MEMBER(canyon_state::canyon_explode_w) | |
24 | 24 | { |
25 | discrete_sound_w(d | |
25 | discrete_sound_w(m_discrete, space, CANYON_EXPLODE_DATA, data >> 4); | |
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | WRITE8_ | |
29 | WRITE8_MEMBER(canyon_state::canyon_attract_w) | |
30 | 30 | { |
31 | discrete_sound_w(d | |
31 | discrete_sound_w(m_discrete, space, NODE_RELATIVE(CANYON_ATTRACT1_EN, (offset & 0x01)), offset & 0x02); | |
32 | 32 | } |
33 | 33 | |
34 | 34 | |
35 | WRITE8_ | |
35 | WRITE8_MEMBER(canyon_state::canyon_whistle_w) | |
36 | 36 | { |
37 | discrete_sound_w(d | |
37 | discrete_sound_w(m_discrete, space, NODE_RELATIVE(CANYON_WHISTLE1_EN, (offset & 0x01)), offset & 0x02); | |
38 | 38 | } |
39 | 39 | |
40 | 40 |
r18185 | r18186 | |
---|---|---|
110 | 110 | * |
111 | 111 | *************************************/ |
112 | 112 | |
113 | WRITE8_ | |
113 | WRITE8_MEMBER(zaxxon_state::zaxxon_sound_a_w) | |
114 | 114 | { |
115 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); | |
116 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
117 | UINT8 diff = data ^ state->m_sound_state[0]; | |
118 | state->m_sound_state[0] = data; | |
115 | samples_device *samples = machine().device<samples_device>("samples"); | |
116 | UINT8 diff = data ^ m_sound_state[0]; | |
117 | m_sound_state[0] = data; | |
119 | 118 | |
120 | 119 | /* PLAYER SHIP A/B: volume */ |
121 | 120 | samples->set_volume(10, 0.5 + 0.157 * (data & 0x03)); |
r18185 | r18186 | |
146 | 145 | } |
147 | 146 | |
148 | 147 | |
149 | WRITE8_ | |
148 | WRITE8_MEMBER(zaxxon_state::zaxxon_sound_b_w) | |
150 | 149 | { |
151 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); | |
152 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
153 | UINT8 diff = data ^ state->m_sound_state[1]; | |
154 | state->m_sound_state[1] = data; | |
150 | samples_device *samples = machine().device<samples_device>("samples"); | |
151 | UINT8 diff = data ^ m_sound_state[1]; | |
152 | m_sound_state[1] = data; | |
155 | 153 | |
156 | 154 | /* S-EXP: channel 4 */ |
157 | 155 | if ((diff & 0x10) && !(data & 0x10)) samples->start(4, 4); |
r18185 | r18186 | |
164 | 162 | } |
165 | 163 | |
166 | 164 | |
167 | WRITE8_ | |
165 | WRITE8_MEMBER(zaxxon_state::zaxxon_sound_c_w) | |
168 | 166 | { |
169 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); | |
170 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
171 | UINT8 diff = data ^ state->m_sound_state[2]; | |
172 | state->m_sound_state[2] = data; | |
167 | samples_device *samples = machine().device<samples_device>("samples"); | |
168 | UINT8 diff = data ^ m_sound_state[2]; | |
169 | m_sound_state[2] = data; | |
173 | 170 | |
174 | 171 | /* SHOT: channel 7 */ |
175 | 172 | if ((diff & 0x01) && !(data & 0x01)) samples->start(7, 7); |
r18185 | r18186 | |
221 | 218 | * |
222 | 219 | *************************************/ |
223 | 220 | |
224 | WRITE8_ | |
221 | WRITE8_MEMBER(zaxxon_state::congo_sound_b_w) | |
225 | 222 | { |
226 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); | |
227 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
228 | UINT8 diff = data ^ state->m_sound_state[1]; | |
229 | state->m_sound_state[1] = data; | |
223 | samples_device *samples = machine().device<samples_device>("samples"); | |
224 | UINT8 diff = data ^ m_sound_state[1]; | |
225 | m_sound_state[1] = data; | |
230 | 226 | |
231 | 227 | /* bit 7 = mute */ |
232 | 228 | |
r18185 | r18186 | |
235 | 231 | } |
236 | 232 | |
237 | 233 | |
238 | WRITE8_ | |
234 | WRITE8_MEMBER(zaxxon_state::congo_sound_c_w) | |
239 | 235 | { |
240 | zaxxon_state *state = space.machine().driver_data<zaxxon_state>(); | |
241 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
242 | UINT8 diff = data ^ state->m_sound_state[2]; | |
243 | state->m_sound_state[2] = data; | |
236 | samples_device *samples = machine().device<samples_device>("samples"); | |
237 | UINT8 diff = data ^ m_sound_state[2]; | |
238 | m_sound_state[2] = data; | |
244 | 239 | |
245 | 240 | /* BASS DRUM: channel 1 */ |
246 | 241 | if ((diff & 0x01) && !(data & 0x01)) samples->start(1, 1); |
r18185 | r18186 | |
---|---|---|
492 | 492 | return (SND[(0x1000 + (p2 & 0x0f) * 256 + offset) & mask]); |
493 | 493 | } |
494 | 494 | |
495 | ||
495 | WRITE8_MEMBER(mario_state::mario_sh_sound_w) | |
496 | 496 | { |
497 | discrete_sound_w(d | |
497 | discrete_sound_w(m_discrete, space, DS_DAC, data); | |
498 | 498 | } |
499 | 499 | |
500 | 500 | WRITE8_MEMBER(mario_state::mario_sh_p1_w) |
r18185 | r18186 | |
534 | 534 | /* Sound 0 and 1 are pulsed !*/ |
535 | 535 | |
536 | 536 | /* Mario running sample */ |
537 | WRITE8_ | |
537 | WRITE8_MEMBER(mario_state::mario_sh1_w) | |
538 | 538 | { |
539 | discrete_sound_w(d | |
539 | discrete_sound_w(m_discrete, space, DS_SOUND0_INP, 0); | |
540 | 540 | } |
541 | 541 | |
542 | 542 | /* Luigi running sample */ |
543 | WRITE8_ | |
543 | WRITE8_MEMBER(mario_state::mario_sh2_w) | |
544 | 544 | { |
545 | discrete_sound_w(d | |
545 | discrete_sound_w(m_discrete, space, DS_SOUND1_INP, 0); | |
546 | 546 | } |
547 | 547 | |
548 | 548 | /* Misc samples */ |
r18185 | r18186 | |
593 | 593 | ADDRESS_MAP_END |
594 | 594 | |
595 | 595 | static ADDRESS_MAP_START( mario_sound_io_map, AS_IO, 8, mario_state ) |
596 | AM_RANGE(0x00, 0xff) AM_READ(mario_sh_tune_r) AM_ | |
596 | AM_RANGE(0x00, 0xff) AM_READ(mario_sh_tune_r) AM_WRITE(mario_sh_sound_w) | |
597 | 597 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(mario_sh_p1_r, mario_sh_p1_w) |
598 | 598 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(mario_sh_p2_r, mario_sh_p2_w) |
599 | 599 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(mario_sh_t0_r) |
r18185 | r18186 | |
---|---|---|
278 | 278 | DISCRETE_SOUND_END |
279 | 279 | |
280 | 280 | |
281 | WRITE8_ | |
281 | WRITE8_MEMBER(asteroid_state::asteroid_explode_w) | |
282 | 282 | { |
283 | discrete_sound_w(d | |
283 | discrete_sound_w(m_discrete,space,ASTEROID_EXPLODE_DATA,(data&0x3c)>>2); // Volume | |
284 | 284 | /* We will modify the pitch data to send the divider value. */ |
285 | 285 | switch ((data&0xc0)) |
286 | 286 | { |
r18185 | r18186 | |
297 | 297 | data = 5; |
298 | 298 | break; |
299 | 299 | } |
300 | discrete_sound_w(d | |
300 | discrete_sound_w(m_discrete, space, ASTEROID_EXPLODE_PITCH, data); | |
301 | 301 | } |
302 | 302 | |
303 | WRITE8_ | |
303 | WRITE8_MEMBER(asteroid_state::asteroid_thump_w) | |
304 | 304 | { |
305 | discrete_sound_w(device, space, ASTEROID_THUMP_EN, data & 0x10); | |
306 | discrete_sound_w(device, space, ASTEROID_THUMP_DATA, data & 0x0f); | |
305 | discrete_sound_w(m_discrete, space, ASTEROID_THUMP_EN, data & 0x10); | |
306 | discrete_sound_w(m_discrete, space, ASTEROID_THUMP_DATA, data & 0x0f); | |
307 | 307 | } |
308 | 308 | |
309 | WRITE8_ | |
309 | WRITE8_MEMBER(asteroid_state::asteroid_sounds_w) | |
310 | 310 | { |
311 | discrete_sound_w(d | |
311 | discrete_sound_w(m_discrete, space, NODE_RELATIVE(ASTEROID_SAUCER_SND_EN, offset), data & 0x80); | |
312 | 312 | } |
313 | 313 | |
314 | WRITE8_ | |
314 | WRITE8_MEMBER(asteroid_state::astdelux_sounds_w) | |
315 | 315 | { |
316 | 316 | /* Only ever activates the thrusters in Astdelux */ |
317 | discrete_sound_w(d | |
317 | discrete_sound_w(m_discrete, space, ASTEROID_THRUST_EN, data & 0x80); | |
318 | 318 | } |
319 | 319 | |
320 | WRITE8_ | |
320 | WRITE8_MEMBER(asteroid_state::asteroid_noise_reset_w) | |
321 | 321 | { |
322 | discrete_sound_w(d | |
322 | discrete_sound_w(m_discrete, space, ASTEROID_NOISE_RESET, 0); | |
323 | 323 | } |
r18185 | r18186 | |
---|---|---|
688 | 688 | |
689 | 689 | WRITE8_MEMBER(copsnrob_state::copsnrob_misc_w) |
690 | 690 | { |
691 | device_t *device = machine().device("discrete"); | |
692 | 691 | UINT8 latched_data = m_ic_h3_data; |
693 | 692 | UINT8 special_data = data & 0x01; |
694 | 693 | |
r18185 | r18186 | |
704 | 703 | switch (offset) |
705 | 704 | { |
706 | 705 | case 0x00: |
707 | discrete_sound_w(d | |
706 | discrete_sound_w(m_discrete, space, COPSNROB_MOTOR3_INV, special_data); | |
708 | 707 | break; |
709 | 708 | |
710 | 709 | case 0x01: |
711 | discrete_sound_w(d | |
710 | discrete_sound_w(m_discrete, space, COPSNROB_MOTOR2_INV, special_data); | |
712 | 711 | break; |
713 | 712 | |
714 | 713 | case 0x02: |
715 | discrete_sound_w(d | |
714 | discrete_sound_w(m_discrete, space, COPSNROB_MOTOR1_INV, special_data); | |
716 | 715 | break; |
717 | 716 | |
718 | 717 | case 0x03: |
719 | discrete_sound_w(d | |
718 | discrete_sound_w(m_discrete, space, COPSNROB_MOTOR0_INV, special_data); | |
720 | 719 | break; |
721 | 720 | |
722 | 721 | case 0x04: |
723 | discrete_sound_w(d | |
722 | discrete_sound_w(m_discrete, space, COPSNROB_SCREECH_INV, special_data); | |
724 | 723 | break; |
725 | 724 | |
726 | 725 | case 0x05: |
727 | discrete_sound_w(d | |
726 | discrete_sound_w(m_discrete, space, COPSNROB_CRASH_INV, special_data); | |
728 | 727 | break; |
729 | 728 | |
730 | 729 | case 0x06: |
r18185 | r18186 | |
733 | 732 | break; |
734 | 733 | |
735 | 734 | case 0x07: |
736 | discrete_sound_w(d | |
735 | discrete_sound_w(m_discrete, space, COPSNROB_AUDIO_ENABLE, special_data); | |
737 | 736 | //machine().sound().system_mute(special_data); |
738 | 737 | break; |
739 | 738 |
r18185 | r18186 | |
---|---|---|
11 | 11 | #include "includes/suna8.h" |
12 | 12 | |
13 | 13 | |
14 | WRITE8_ | |
14 | WRITE8_MEMBER(suna8_state::suna8_play_samples_w) | |
15 | 15 | { |
16 | suna8_state *state = space.machine().driver_data<suna8_state>(); | |
17 | 16 | if( data ) |
18 | 17 | { |
19 | samples_device *samples = downcast<samples_device *>(device); | |
18 | samples_device *samples = downcast<samples_device *>(machine().device("samples")); | |
20 | 19 | if( ~data & 0x10 ) |
21 | 20 | { |
22 | samples->start_raw(0, & | |
21 | samples->start_raw(0, &m_samplebuf[0x800*m_sample], 0x0800, 4000); | |
23 | 22 | } |
24 | 23 | else if( ~data & 0x08 ) |
25 | 24 | { |
26 | state->m_sample &= 3; | |
27 | samples->start_raw(0, &state->m_samplebuf[0x800*(state->m_sample+7)], 0x0800, 4000); | |
25 | m_sample &= 3; | |
26 | samples->start_raw(0, &m_samplebuf[0x800*(m_sample+7)], 0x0800, 4000); | |
28 | 27 | } |
29 | 28 | } |
30 | 29 | } |
31 | 30 | |
32 | WRITE8_ | |
31 | WRITE8_MEMBER(suna8_state::rranger_play_samples_w) | |
33 | 32 | { |
34 | suna8_state *state = space.machine().driver_data<suna8_state>(); | |
35 | 33 | if( data ) |
36 | 34 | { |
37 | if(( | |
35 | if(( m_sample != 0 ) && ( ~data & 0x30 )) // don't play m_sample zero when the bit is active | |
38 | 36 | { |
39 | samples_device *samples = downcast<samples_device *>(device); | |
40 | samples->start_raw(0, &state->m_samplebuf[0x800*state->m_sample], 0x0800, 4000); | |
37 | samples_device *samples = downcast<samples_device *>(machine().device("samples")); | |
38 | samples->start_raw(0, &m_samplebuf[0x800*m_sample], 0x0800, 4000); | |
41 | 39 | } |
42 | 40 | } |
43 | 41 | } |
44 | 42 | |
45 | WRITE8_ | |
43 | WRITE8_MEMBER(suna8_state::suna8_samples_number_w) | |
46 | 44 | { |
47 | suna8_state *state = space.machine().driver_data<suna8_state>(); | |
48 | state->m_sample = data & 0xf; | |
45 | m_sample = data & 0xf; | |
49 | 46 | } |
50 | 47 | |
51 | 48 | SAMPLES_START( suna8_sh_start ) |
r18185 | r18186 | |
---|---|---|
155 | 155 | * |
156 | 156 | *************************************/ |
157 | 157 | |
158 | WRITE8_ | |
158 | WRITE8_MEMBER(poolshrk_state::poolshrk_scratch_sound_w) | |
159 | 159 | { |
160 | discrete_sound_w(d | |
160 | discrete_sound_w(m_discrete, space, POOLSHRK_SCRATCH_SND, offset & 1); | |
161 | 161 | } |
162 | 162 | |
163 | WRITE8_ | |
163 | WRITE8_MEMBER(poolshrk_state::poolshrk_score_sound_w) | |
164 | 164 | { |
165 | discrete_sound_w(d | |
165 | discrete_sound_w(m_discrete, space, POOLSHRK_SCORE_EN, 1); /* this will trigger the sound code for 1 sample */ | |
166 | 166 | } |
167 | 167 | |
168 | WRITE8_ | |
168 | WRITE8_MEMBER(poolshrk_state::poolshrk_click_sound_w) | |
169 | 169 | { |
170 | discrete_sound_w(d | |
170 | discrete_sound_w(m_discrete, space, POOLSHRK_CLICK_EN, 1); /* this will trigger the sound code for 1 sample */ | |
171 | 171 | } |
172 | 172 | |
173 | WRITE8_ | |
173 | WRITE8_MEMBER(poolshrk_state::poolshrk_bump_sound_w) | |
174 | 174 | { |
175 | discrete_sound_w(d | |
175 | discrete_sound_w(m_discrete, space, POOLSHRK_BUMP_EN, offset & 1); | |
176 | 176 | } |
r18185 | r18186 | |
---|---|---|
18 | 18 | #define QIX_VOL_DATA_R NODE_04 |
19 | 19 | |
20 | 20 | |
21 | static WRITE_LINE_DEVICE_HANDLER( qix_pia_dint ); | |
22 | static WRITE_LINE_DEVICE_HANDLER( qix_pia_sint ); | |
23 | 21 | |
24 | 22 | |
23 | ||
24 | ||
25 | 25 | /*************************************************************************** |
26 | 26 | Audio handlers |
27 | 27 | ***************************************************************************/ |
28 | 28 | |
29 | ||
29 | WRITE8_MEMBER(qix_state::qix_dac_w) | |
30 | 30 | { |
31 | discrete_sound_w(d | |
31 | discrete_sound_w(m_discrete, space, QIX_DAC_DATA, data); | |
32 | 32 | } |
33 | 33 | |
34 | ||
34 | WRITE8_MEMBER(qix_state::qix_vol_w) | |
35 | 35 | { |
36 | discrete_sound_w(d | |
36 | discrete_sound_w(m_discrete, space, QIX_VOL_DATA, data); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | |
r18185 | r18186 | |
93 | 93 | * |
94 | 94 | *************************************/ |
95 | 95 | |
96 | ||
96 | WRITE8_MEMBER(qix_state::sndpia_2_warning_w) | |
97 | 97 | { |
98 | 98 | popmessage("PIA 5 write!!"); |
99 | 99 | } |
r18185 | r18186 | |
106 | 106 | } |
107 | 107 | |
108 | 108 | |
109 | ||
109 | WRITE8_MEMBER(qix_state::sync_sndpia1_porta_w) | |
110 | 110 | { |
111 | device_t *device = machine().device("sndpia1"); | |
111 | 112 | /* we need to synchronize this so the sound CPU doesn't drop anything important */ |
112 | | |
113 | machine().scheduler().synchronize(FUNC(deferred_sndpia1_porta_w), data, (void *)downcast<pia6821_device *>(device)); | |
113 | 114 | } |
114 | 115 | |
115 | 116 | |
116 | ||
117 | WRITE8_MEMBER(qix_state::slither_coinctl_w) | |
117 | 118 | { |
118 | coin_lockout_w(space.machine(), 0, (~data >> 6) & 1); | |
119 | coin_counter_w(space.machine(), 0, (data >> 5) & 1); | |
119 | coin_lockout_w(machine(), 0, (~data >> 6) & 1); | |
120 | coin_counter_w(machine(), 0, (data >> 5) & 1); | |
120 | 121 | } |
121 | 122 | |
122 | 123 | |
r18185 | r18186 | |
127 | 128 | * |
128 | 129 | *************************************/ |
129 | 130 | |
130 | ||
131 | WRITE_LINE_MEMBER(qix_state::qix_pia_dint) | |
131 | 132 | { |
132 | pia6821_device *pia = downcast<pia6821_device *>(device); | |
133 | pia6821_device *pia = downcast<pia6821_device *>(machine().device("sndpia0")); | |
133 | 134 | int combined_state = pia->irq_a_state() | pia->irq_b_state(); |
134 | 135 | |
135 | 136 | /* DINT is connected to the data CPU's IRQ line */ |
136 | | |
137 | machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); | |
137 | 138 | } |
138 | 139 | |
139 | 140 | |
140 | ||
141 | WRITE_LINE_MEMBER(qix_state::qix_pia_sint) | |
141 | 142 | { |
142 | pia6821_device *pia = downcast<pia6821_device *>(device); | |
143 | pia6821_device *pia = downcast<pia6821_device *>(machine().device("sndpia1")); | |
143 | 144 | int combined_state = pia->irq_a_state() | pia->irq_b_state(); |
144 | 145 | |
145 | 146 | /* SINT is connected to the sound CPU's IRQ line */ |
146 | | |
147 | machine().device("audiocpu")->execute().set_input_line(M6800_IRQ_LINE, combined_state ? ASSERT_LINE : CLEAR_LINE); | |
147 | 148 | } |
148 | 149 | |
149 | 150 | |
r18185 | r18186 | |
177 | 178 | DEVCB_NULL, /* line CB1 in */ |
178 | 179 | DEVCB_NULL, /* line CA2 in */ |
179 | 180 | DEVCB_NULL, /* line CB2 in */ |
180 | DEVCB_DEVICE_HANDLER("sndpia1", sync_sndpia1_porta_w), /* port A out */ | |
181 | DEVCB_DEVICE_HANDLER("discrete", qix_vol_w), /* port B out */ | |
181 | DEVCB_DRIVER_MEMBER(qix_state,sync_sndpia1_porta_w), /* port A out */ | |
182 | DEVCB_DRIVER_MEMBER(qix_state,qix_vol_w), /* port B out */ | |
182 | 183 | DEVCB_DEVICE_LINE_MEMBER("sndpia1", pia6821_device, ca1_w), /* line CA2 out */ |
183 | 184 | DEVCB_DRIVER_MEMBER(qix_state,qix_flip_screen_w), /* port CB2 out */ |
184 | DEVCB_LINE(qix_pia_dint), /* IRQA */ | |
185 | DEVCB_LINE(qix_pia_dint) /* IRQB */ | |
185 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_dint), /* IRQA */ | |
186 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_dint) /* IRQB */ | |
186 | 187 | }; |
187 | 188 | |
188 | 189 | static const pia6821_interface qixsnd_pia_1_intf = |
r18185 | r18186 | |
194 | 195 | DEVCB_NULL, /* line CA2 in */ |
195 | 196 | DEVCB_NULL, /* line CB2 in */ |
196 | 197 | DEVCB_DEVICE_MEMBER("sndpia0", pia6821_device, porta_w), /* port A out */ |
197 | DEVCB_D | |
198 | DEVCB_DRIVER_MEMBER(qix_state,qix_dac_w), /* port B out */ | |
198 | 199 | DEVCB_DEVICE_LINE_MEMBER("sndpia0", pia6821_device, ca1_w), /* line CA2 out */ |
199 | 200 | DEVCB_NULL, /* line CB2 out */ |
200 | DEVCB_LINE(qix_pia_sint), /* IRQA */ | |
201 | DEVCB_LINE(qix_pia_sint) /* IRQB */ | |
201 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_sint), /* IRQA */ | |
202 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_sint) /* IRQB */ | |
202 | 203 | }; |
203 | 204 | |
204 | 205 | static const pia6821_interface qixsnd_pia_2_intf = |
r18185 | r18186 | |
209 | 210 | DEVCB_NULL, /* line CB1 in */ |
210 | 211 | DEVCB_NULL, /* line CA2 in */ |
211 | 212 | DEVCB_NULL, /* line CB2 in */ |
212 | DEVCB_HANDLER(sndpia_2_warning_w), /* port A out */ | |
213 | DEVCB_HANDLER(sndpia_2_warning_w), /* port B out */ | |
214 | DEVCB_HANDLER(sndpia_2_warning_w), /* line CA2 out */ | |
215 | DEVCB_HANDLER(sndpia_2_warning_w), /* line CB2 out */ | |
213 | DEVCB_DRIVER_MEMBER(qix_state,sndpia_2_warning_w), /* port A out */ | |
214 | DEVCB_DRIVER_MEMBER(qix_state,sndpia_2_warning_w), /* port B out */ | |
215 | DEVCB_DRIVER_MEMBER(qix_state,sndpia_2_warning_w), /* line CA2 out */ | |
216 | DEVCB_DRIVER_MEMBER(qix_state,sndpia_2_warning_w), /* line CB2 out */ | |
216 | 217 | DEVCB_NULL, |
217 | 218 | DEVCB_NULL |
218 | 219 | }; |
r18185 | r18186 | |
226 | 227 | DEVCB_NULL, /* line CA2 in */ |
227 | 228 | DEVCB_NULL, /* line CB2 in */ |
228 | 229 | DEVCB_NULL, /* port A out */ |
229 | DEVCB_ | |
230 | DEVCB_DRIVER_MEMBER(qix_state,slither_coinctl_w), /* port B out */ | |
230 | 231 | DEVCB_NULL, /* line CA2 out */ |
231 | 232 | DEVCB_DRIVER_MEMBER(qix_state,qix_flip_screen_w), /* port CB2 out */ |
232 | DEVCB_LINE(qix_pia_dint), /* IRQA */ | |
233 | DEVCB_LINE(qix_pia_dint) /* IRQB */ | |
233 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_dint), /* IRQA */ | |
234 | DEVCB_DRIVER_LINE_MEMBER(qix_state,qix_pia_dint) /* IRQB */ | |
234 | 235 | }; |
235 | 236 | |
236 | 237 |
r18185 | r18186 | |
---|---|---|
36 | 36 | DISCRETE_OUTPUT(NODE_10, 7500) |
37 | 37 | DISCRETE_SOUND_END |
38 | 38 | |
39 | WRITE8_ | |
39 | WRITE8_MEMBER(blockade_state::blockade_sound_freq_w) | |
40 | 40 | { |
41 | discrete_sound_w(d | |
41 | discrete_sound_w(m_discrete,space,BLOCKADE_NOTE_DATA, data); | |
42 | 42 | return; |
43 | 43 | } |
44 | 44 |
r18185 | r18186 | |
---|---|---|
172 | 172 | |
173 | 173 | |
174 | 174 | |
175 | WRITE8_ | |
175 | WRITE8_MEMBER(spiders_state::spiders_audio_command_w) | |
176 | 176 | { |
177 | pia6821_device *pia = downcast<pia6821_device *>(device); | |
177 | pia6821_device *pia = downcast<pia6821_device *>(machine().device("pia4")); | |
178 | 178 | pia->set_a_input(data & 0xf8, 0); |
179 | 179 | pia->ca1_w(data & 0x80 ? 1 : 0); |
180 | 180 | } |
181 | 181 | |
182 | 182 | |
183 | WRITE8_ | |
183 | WRITE8_MEMBER(spiders_state::spiders_audio_a_w) | |
184 | 184 | { |
185 | discrete_sound_w(d | |
185 | discrete_sound_w(m_discrete, space, SPIDER_WEB_SOUND_MOD_DATA, 1 + (data & 4) * 8 + (data & 2) * 4 + (data & 1) * 2); | |
186 | 186 | } |
187 | 187 | |
188 | WRITE8_ | |
188 | WRITE8_MEMBER(spiders_state::spiders_audio_b_w) | |
189 | 189 | { |
190 | discrete_sound_w(d | |
190 | discrete_sound_w(m_discrete, space, SPIDERS_WEB_SOUND_DATA, data); | |
191 | 191 | } |
192 | 192 | |
193 | 193 | |
194 | WRITE8_ | |
194 | WRITE8_MEMBER(spiders_state::spiders_audio_ctrl_w) | |
195 | 195 | { |
196 | discrete_sound_w(device, space, SPIDERS_FIRE_EN, data & 0x10 ? 1 : 0); | |
197 | discrete_sound_w(device, space, SPIDERS_EXP_EN, data & 0x08 ? 1 : 0); | |
198 | discrete_sound_w(device, space, SPIDERS_SUPER_WEB_EXPL_EN, data & 0x04 ? 1 : 0); | |
199 | discrete_sound_w(device, space, SPIDERS_SUPER_WEB_EN, data & 0x02 ? 1 : 0); | |
200 | discrete_sound_w(device, space, SPIDERS_X_EN, data & 0x01 ? 1 : 0); | |
196 | discrete_sound_w(m_discrete, space, SPIDERS_FIRE_EN, data & 0x10 ? 1 : 0); | |
197 | discrete_sound_w(m_discrete, space, SPIDERS_EXP_EN, data & 0x08 ? 1 : 0); | |
198 | discrete_sound_w(m_discrete, space, SPIDERS_SUPER_WEB_EXPL_EN, data & 0x04 ? 1 : 0); | |
199 | discrete_sound_w(m_discrete, space, SPIDERS_SUPER_WEB_EN, data & 0x02 ? 1 : 0); | |
200 | discrete_sound_w(m_discrete, space, SPIDERS_X_EN, data & 0x01 ? 1 : 0); | |
201 | 201 | } |
202 | 202 | |
203 | 203 |
r18185 | r18186 | |
---|---|---|
376 | 376 | static SOUND_START( sega005 ); |
377 | 377 | static STREAM_UPDATE( sega005_stream_update ); |
378 | 378 | static TIMER_CALLBACK( sega005_auto_timer ); |
379 | static DECLARE_WRITE8_DEVICE_HANDLER( sega005_sound_a_w ); | |
380 | static DECLARE_WRITE8_DEVICE_HANDLER( sega005_sound_b_w ); | |
381 | 379 | |
382 | 380 | /* |
383 | 381 | 005 |
r18185 | r18186 | |
458 | 456 | static I8255A_INTERFACE( ppi8255_005_intf ) |
459 | 457 | { |
460 | 458 | DEVCB_NULL, /* Port A read */ |
461 | DEVCB_ | |
459 | DEVCB_DRIVER_MEMBER(segag80r_state,sega005_sound_a_w), /* Port A write */ | |
462 | 460 | DEVCB_NULL, /* Port B read */ |
463 | DEVCB_ | |
461 | DEVCB_DRIVER_MEMBER(segag80r_state,sega005_sound_b_w), /* Port B write */ | |
464 | 462 | DEVCB_NULL, /* Port C read */ |
465 | 463 | DEVCB_NULL /* Port C write */ |
466 | 464 | }; |
r18185 | r18186 | |
506 | 504 | * |
507 | 505 | *************************************/ |
508 | 506 | |
509 | ||
507 | WRITE8_MEMBER(segag80r_state::sega005_sound_a_w) | |
510 | 508 | { |
511 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); | |
512 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
513 | UINT8 diff = data ^ state->m_sound_state[0]; | |
514 | state->m_sound_state[0] = data; | |
509 | samples_device *samples = machine().device<samples_device>("samples"); | |
510 | UINT8 diff = data ^ m_sound_state[0]; | |
511 | m_sound_state[0] = data; | |
515 | 512 | |
516 | 513 | /* LARGE EXPL: channel 0 */ |
517 | 514 | if ((diff & 0x01) && !(data & 0x01)) samples->start(0, 0); |
r18185 | r18186 | |
565 | 562 | } |
566 | 563 | |
567 | 564 | |
568 | ||
565 | WRITE8_MEMBER(segag80r_state::sega005_sound_b_w) | |
569 | 566 | { |
570 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); | |
571 | 567 | /* |
572 | 568 | D6: manual timer clock (0->1) |
573 | 569 | D5: 0 = manual timer, 1 = auto timer |
574 | 570 | D4: 1 = hold/reset address counter to 0 |
575 | 571 | D3-D0: upper 4 bits of ROM address |
576 | 572 | */ |
577 | UINT8 diff = data ^ state->m_sound_state[1]; | |
578 | state->m_sound_state[1] = data; | |
573 | UINT8 diff = data ^ m_sound_state[1]; | |
574 | m_sound_state[1] = data; | |
579 | 575 | |
580 | 576 | //mame_printf_debug("sound[%d] = %02X\n", 1, data); |
581 | 577 | |
582 | 578 | /* force a stream update */ |
583 | | |
579 | m_sega005_stream->update(); | |
584 | 580 | |
585 | 581 | /* ROM address */ |
586 | | |
582 | m_sound_addr = ((data & 0x0f) << 7) | (m_sound_addr & 0x7f); | |
587 | 583 | |
588 | 584 | /* reset both sound address and square wave counters */ |
589 | 585 | if (data & 0x10) |
590 | 586 | { |
591 | state->m_sound_addr &= 0x780; | |
592 | state->m_square_state = 0; | |
587 | m_sound_addr &= 0x780; | |
588 | m_square_state = 0; | |
593 | 589 | } |
594 | 590 | |
595 | 591 | /* manual clock */ |
596 | 592 | if ((diff & 0x40) && (data & 0x40) && !(data & 0x20) && !(data & 0x10)) |
597 | | |
593 | m_sound_addr = (m_sound_addr & 0x780) | ((m_sound_addr + 1) & 0x07f); | |
598 | 594 | |
599 | 595 | /* update the sound data */ |
600 | sega005_update_sound_data( | |
596 | sega005_update_sound_data(machine()); | |
601 | 597 | } |
602 | 598 | |
603 | 599 | |
r18185 | r18186 | |
783 | 779 | *************************************/ |
784 | 780 | |
785 | 781 | static SOUND_START( monsterb ); |
786 | static DECLARE_WRITE8_DEVICE_HANDLER( monsterb_sound_a_w ); | |
787 | static DECLARE_WRITE8_DEVICE_HANDLER( monsterb_sound_b_w ); | |
788 | static DECLARE_READ8_DEVICE_HANDLER( n7751_status_r ); | |
789 | static DECLARE_WRITE8_DEVICE_HANDLER( n7751_command_w ); | |
782 | ||
790 | 783 | static DECLARE_WRITE8_DEVICE_HANDLER( n7751_rom_control_w ); |
791 | 784 | |
792 | ||
793 | static DECLARE_WRITE8_DEVICE_HANDLER( n7751_p2_w ); | |
794 | ||
795 | ||
796 | 785 | /* |
797 | 786 | Monster Bash |
798 | 787 | |
r18185 | r18186 | |
839 | 828 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(n7751_command_r) |
840 | 829 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(n7751_rom_r) |
841 | 830 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
842 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_ | |
831 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(n7751_p2_w) | |
843 | 832 | AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE_LEGACY("audio_8243", i8243_prog_w) |
844 | 833 | ADDRESS_MAP_END |
845 | 834 | |
r18185 | r18186 | |
854 | 843 | static I8255A_INTERFACE( monsterb_ppi_intf ) |
855 | 844 | { |
856 | 845 | DEVCB_NULL, /* Port A read */ |
857 | DEVCB_ | |
846 | DEVCB_DRIVER_MEMBER(segag80r_state,monsterb_sound_a_w), /* Port A write */ | |
858 | 847 | DEVCB_NULL, /* Port B read */ |
859 | DEVCB_HANDLER(monsterb_sound_b_w), /* Port B write */ | |
860 | DEVCB_HANDLER(n7751_status_r), /* Port C read */ | |
861 | DEVCB_HANDLER(n7751_command_w) /* Port C write */ | |
848 | DEVCB_DRIVER_MEMBER(segag80r_state,monsterb_sound_b_w), /* Port B write */ | |
849 | DEVCB_DRIVER_MEMBER(segag80r_state,n7751_status_r), /* Port C read */ | |
850 | DEVCB_DRIVER_MEMBER(segag80r_state,n7751_command_w) /* Port C write */ | |
862 | 851 | }; |
863 | 852 | |
864 | 853 | |
r18185 | r18186 | |
911 | 900 | * |
912 | 901 | *************************************/ |
913 | 902 | |
914 | ||
903 | WRITE8_MEMBER(segag80r_state::monsterb_sound_a_w) | |
915 | 904 | { |
916 | device_t *tms = | |
905 | device_t *tms = machine().device("music"); | |
917 | 906 | int enable_val; |
918 | 907 | |
919 | 908 | /* Lower four data lines get decoded into 13 control lines */ |
920 | 909 | tms36xx_note_w(tms, 0, data & 15); |
921 | 910 | |
922 | 911 | /* Top four data lines address an 82S123 ROM that enables/disables voices */ |
923 | enable_val = | |
912 | enable_val = machine().root_device().memregion("prom")->base()[(data & 0xF0) >> 4]; | |
924 | 913 | tms3617_enable_w(tms, enable_val >> 2); |
925 | 914 | } |
926 | 915 | |
r18185 | r18186 | |
932 | 921 | * |
933 | 922 | *************************************/ |
934 | 923 | |
935 | ||
924 | WRITE8_MEMBER(segag80r_state::monsterb_sound_b_w) | |
936 | 925 | { |
937 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); | |
938 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
939 | UINT8 diff = data ^ state->m_sound_state[1]; | |
940 | state->m_sound_state[1] = data; | |
926 | samples_device *samples = machine().device<samples_device>("samples"); | |
927 | UINT8 diff = data ^ m_sound_state[1]; | |
928 | m_sound_state[1] = data; | |
941 | 929 | |
942 | 930 | /* SHOT: channel 0 */ |
943 | 931 | if ((diff & 0x01) && !(data & 0x01)) samples->start(0, 0); |
r18185 | r18186 | |
956 | 944 | * |
957 | 945 | *************************************/ |
958 | 946 | |
959 | ||
947 | READ8_MEMBER(segag80r_state::n7751_status_r) | |
960 | 948 | { |
961 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); | |
962 | return state->m_n7751_busy << 4; | |
949 | return m_n7751_busy << 4; | |
963 | 950 | } |
964 | 951 | |
965 | 952 | |
966 | ||
953 | WRITE8_MEMBER(segag80r_state::n7751_command_w) | |
967 | 954 | { |
968 | segag80r_state *state = space.machine().driver_data<segag80r_state>(); | |
969 | 955 | /* |
970 | 956 | Z80 7751 control port |
971 | 957 | |
972 | 958 | D0-D2 = connected to 7751 port C |
973 | 959 | D3 = /INT line |
974 | 960 | */ |
975 | state->m_n7751_command = data & 0x07; | |
976 | space.machine().device("audiocpu")->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); | |
977 | space.machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); | |
961 | m_n7751_command = data & 0x07; | |
962 | machine().device("audiocpu")->execute().set_input_line(0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); | |
963 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); | |
978 | 964 | } |
979 | 965 | |
980 | 966 | |
r18185 | r18186 | |
1028 | 1014 | } |
1029 | 1015 | |
1030 | 1016 | |
1031 | ||
1017 | WRITE8_MEMBER(segag80r_state::n7751_p2_w) | |
1032 | 1018 | { |
1033 | | |
1019 | device_t *device = machine().device("audio_8243"); | |
1034 | 1020 | /* write to P2; low 4 bits go to 8243 */ |
1035 | 1021 | i8243_p2_w(device, space, offset, data & 0x0f); |
1036 | 1022 | |
1037 | 1023 | /* output of bit $80 indicates we are ready (1) or busy (0) */ |
1038 | 1024 | /* no other outputs are used */ |
1039 | | |
1025 | m_n7751_busy = data >> 7; | |
1040 | 1026 | } |
1041 | 1027 | |
1042 | 1028 |
r18185 | r18186 | |
---|---|---|
1331 | 1331 | } |
1332 | 1332 | |
1333 | 1333 | |
1334 | ||
1334 | READ8_MEMBER(cinemat_state::sound_porta_r) | |
1335 | 1335 | { |
1336 | cinemat_state *state = space.machine().driver_data<cinemat_state>(); | |
1337 | 1336 | /* bits 0-3 are the sound data; bit 4 is the data ready */ |
1338 | return | |
1337 | return m_sound_fifo[m_sound_fifo_out] | ((m_sound_fifo_in != m_sound_fifo_out) << 4); | |
1339 | 1338 | } |
1340 | 1339 | |
1341 | 1340 | |
1342 | ||
1341 | READ8_MEMBER(cinemat_state::sound_portb_r) | |
1343 | 1342 | { |
1344 | cinemat_state *state = space.machine().driver_data<cinemat_state>(); | |
1345 | return state->m_last_portb_write; | |
1343 | return m_last_portb_write; | |
1346 | 1344 | } |
1347 | 1345 | |
1348 | 1346 | |
1349 | ||
1347 | WRITE8_MEMBER(cinemat_state::sound_portb_w) | |
1350 | 1348 | { |
1351 | cinemat_state *state = space.machine().driver_data<cinemat_state>(); | |
1352 | 1349 | /* watch for a 0->1 edge on bit 0 ("shift out") to advance the data pointer */ |
1353 | if ((data & 1) != (state->m_last_portb_write & 1) && (data & 1) != 0) | |
1354 | state->m_sound_fifo_out = (state->m_sound_fifo_out + 1) % 16; | |
1350 | if ((data & 1) != (m_last_portb_write & 1) && (data & 1) != 0) | |
1351 | m_sound_fifo_out = (m_sound_fifo_out + 1) % 16; | |
1355 | 1352 | |
1356 | 1353 | /* watch for a 0->1 edge of bit 1 ("hard reset") to reset the FIFO */ |
1357 | if ((data & 2) != (state->m_last_portb_write & 2) && (data & 2) != 0) | |
1358 | state->m_sound_fifo_in = state->m_sound_fifo_out = 0; | |
1354 | if ((data & 2) != (m_last_portb_write & 2) && (data & 2) != 0) | |
1355 | m_sound_fifo_in = m_sound_fifo_out = 0; | |
1359 | 1356 | |
1360 | 1357 | /* bit 2 controls the global mute */ |
1361 | if ((data & 4) != (state->m_last_portb_write & 4)) | |
1362 | space.machine().sound().system_mute(data & 4); | |
1358 | if ((data & 4) != (m_last_portb_write & 4)) | |
1359 | machine().sound().system_mute(data & 4); | |
1363 | 1360 | |
1364 | 1361 | /* remember the last value written */ |
1365 | | |
1362 | m_last_portb_write = data; | |
1366 | 1363 | } |
1367 | 1364 | |
1368 | 1365 | |
1369 | ||
1366 | WRITE8_MEMBER(cinemat_state::sound_output_w) | |
1370 | 1367 | { |
1371 | 1368 | logerror("sound_output = %02X\n", data); |
1372 | 1369 | } |
r18185 | r18186 | |
1376 | 1373 | { |
1377 | 1374 | AY8910_LEGACY_OUTPUT, |
1378 | 1375 | AY8910_DEFAULT_LOADS, |
1379 | DEVCB_HANDLER(sound_porta_r), | |
1380 | DEVCB_HANDLER(sound_portb_r), | |
1376 | DEVCB_DRIVER_MEMBER(cinemat_state,sound_porta_r), | |
1377 | DEVCB_DRIVER_MEMBER(cinemat_state,sound_portb_r), | |
1381 | 1378 | DEVCB_NULL, |
1382 | DEVCB_ | |
1379 | DEVCB_DRIVER_MEMBER(cinemat_state,sound_portb_w) | |
1383 | 1380 | }; |
1384 | 1381 | |
1385 | 1382 | static const ay8910_interface demon_ay8910_interface_3 = |
r18185 | r18186 | |
1389 | 1386 | DEVCB_NULL, |
1390 | 1387 | DEVCB_NULL, |
1391 | 1388 | DEVCB_NULL, |
1392 | DEVCB_ | |
1389 | DEVCB_DRIVER_MEMBER(cinemat_state,sound_output_w) | |
1393 | 1390 | }; |
1394 | 1391 | |
1395 | 1392 |
r18185 | r18186 | |
---|---|---|
80 | 80 | DISCRETE_OUTPUT(NODE_90, 65534.0/(9.2+9.2+600+1000)) // Take the output from the mixer |
81 | 81 | DISCRETE_SOUND_END |
82 | 82 | |
83 | WRITE8_ | |
83 | WRITE8_MEMBER(asteroid_state::llander_snd_reset_w) | |
84 | 84 | { |
85 | 85 | /* Resets the LFSR that is used for the white noise generator */ |
86 | discrete_sound_w(d | |
86 | discrete_sound_w(m_discrete, space, LLANDER_NOISE_RESET, 0); /* Reset */ | |
87 | 87 | } |
88 | 88 | |
89 | WRITE8_ | |
89 | WRITE8_MEMBER(asteroid_state::llander_sounds_w) | |
90 | 90 | { |
91 | discrete_sound_w(device, space, LLANDER_THRUST_DATA, data & 0x07); /* Thrust volume */ | |
92 | discrete_sound_w(device, space, LLANDER_TONE3K_EN, data & 0x10); /* Tone 3KHz enable */ | |
93 | discrete_sound_w(device, space, LLANDER_TONE6K_EN, data & 0x20); /* Tone 6KHz enable */ | |
94 | discrete_sound_w(device, space, LLANDER_EXPLOD_EN, data & 0x08); /* Explosion */ | |
91 | discrete_sound_w(m_discrete, space, LLANDER_THRUST_DATA, data & 0x07); /* Thrust volume */ | |
92 | discrete_sound_w(m_discrete, space, LLANDER_TONE3K_EN, data & 0x10); /* Tone 3KHz enable */ | |
93 | discrete_sound_w(m_discrete, space, LLANDER_TONE6K_EN, data & 0x20); /* Tone 6KHz enable */ | |
94 | discrete_sound_w(m_discrete, space, LLANDER_EXPLOD_EN, data & 0x08); /* Explosion */ | |
95 | 95 | } |
96 | 96 |
r18185 | r18186 | |
---|---|---|
69 | 69 | * |
70 | 70 | *************************************/ |
71 | 71 | |
72 | WRITE8_ | |
72 | WRITE8_MEMBER(turbo_state::turbo_sound_a_w) | |
73 | 73 | { |
74 | 74 | #if (!DISCRETE_TEST) |
75 | samples_device *samples = | |
75 | samples_device *samples = machine().device<samples_device>("samples"); | |
76 | 76 | #endif |
77 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
78 | 77 | #if (!DISCRETE_TEST) |
79 | UINT8 diff = data ^ | |
78 | UINT8 diff = data ^ m_sound_state[0]; | |
80 | 79 | #endif |
81 | | |
80 | m_sound_state[0] = data; | |
82 | 81 | |
83 | 82 | #if (!DISCRETE_TEST) |
84 | 83 | |
r18185 | r18186 | |
98 | 97 | if ((diff & 0x10) && !(data & 0x10)) samples->start(1, 3); |
99 | 98 | |
100 | 99 | /* OSEL0 */ |
101 | | |
100 | m_turbo_osel = (m_turbo_osel & 6) | ((data >> 5) & 1); | |
102 | 101 | |
103 | 102 | /* /SLIP: channel 2 */ |
104 | 103 | if ((diff & 0x40) && !(data & 0x40)) samples->start(2, 4); |
r18185 | r18186 | |
107 | 106 | if ((diff & 0x80) && !(data & 0x80)) samples->start(3, 5); |
108 | 107 | |
109 | 108 | /* update any samples */ |
110 | turbo_update_samples( | |
109 | turbo_update_samples(this, samples); | |
111 | 110 | |
112 | 111 | #else |
113 | 112 | |
114 | if (((data ^ state->m_last_sound_a) & 0x1e) && (state->m_last_sound_a & 0x1e) != 0x1e) | |
115 | space.machine().scheduler().timer_set(attotime::from_hz(20000), FUNC(update_sound_a), data); | |
113 | if (((data ^ m_last_sound_a) & 0x1e) && (m_last_sound_a & 0x1e) != 0x1e) | |
114 | machine().scheduler().timer_set(attotime::from_hz(20000), FUNC(update_sound_a), data); | |
116 | 115 | else |
117 | 116 | update_sound_a(data); |
118 | 117 | |
119 | | |
118 | m_last_sound_a = data; | |
120 | 119 | |
121 | 120 | #endif |
122 | 121 | } |
123 | 122 | |
124 | 123 | |
125 | WRITE8_ | |
124 | WRITE8_MEMBER(turbo_state::turbo_sound_b_w) | |
126 | 125 | { |
127 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
128 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
129 | UINT8 diff = data ^ state->m_sound_state[1]; | |
130 | state->m_sound_state[1] = data; | |
126 | samples_device *samples = machine().device<samples_device>("samples"); | |
127 | UINT8 diff = data ^ m_sound_state[1]; | |
128 | m_sound_state[1] = data; | |
131 | 129 | |
132 | 130 | /* ACC0-ACC5 */ |
133 | state->m_turbo_accel = data & 0x3f; | |
134 | output_set_value("tachometer", state->m_turbo_accel); | |
131 | m_turbo_accel = data & 0x3f; | |
132 | output_set_value("tachometer", m_turbo_accel); | |
135 | 133 | |
136 | 134 | /* /AMBU: channel 4 */ |
137 | 135 | if ((diff & 0x40) && !(data & 0x40) && !samples->playing(4)) samples->start(4, 8, true); |
r18185 | r18186 | |
141 | 139 | if ((diff & 0x80) && !(data & 0x80)) samples->start(2, 6); |
142 | 140 | |
143 | 141 | /* update any samples */ |
144 | turbo_update_samples( | |
142 | turbo_update_samples(this, samples); | |
145 | 143 | } |
146 | 144 | |
147 | 145 | |
148 | WRITE8_ | |
146 | WRITE8_MEMBER(turbo_state::turbo_sound_c_w) | |
149 | 147 | { |
150 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
151 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
148 | samples_device *samples = machine().device<samples_device>("samples"); | |
152 | 149 | |
153 | 150 | /* OSEL1-2 */ |
154 | | |
151 | m_turbo_osel = (m_turbo_osel & 1) | ((data & 3) << 1); | |
155 | 152 | |
156 | 153 | /* BSEL0-1 */ |
157 | | |
154 | m_turbo_bsel = (data >> 2) & 3; | |
158 | 155 | |
159 | 156 | /* SPEED0-3 */ |
160 | 157 | output_set_value("speed", (data >> 4) & 0x0f); |
161 | 158 | |
162 | 159 | /* update any samples */ |
163 | turbo_update_samples( | |
160 | turbo_update_samples(this, samples); | |
164 | 161 | } |
165 | 162 | |
166 | 163 | |
r18185 | r18186 | |
295 | 292 | * |
296 | 293 | *************************************/ |
297 | 294 | |
298 | WRITE8_ | |
295 | WRITE8_MEMBER(turbo_state::subroc3d_sound_a_w) | |
299 | 296 | { |
300 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
301 | state->m_sound_state[0] = data; | |
297 | m_sound_state[0] = data; | |
302 | 298 | |
303 | 299 | /* DIS0-3 contained in bits 0-3 */ |
304 | 300 | /* DIR0-2 contained in bits 4-6 */ |
r18185 | r18186 | |
325 | 321 | } |
326 | 322 | |
327 | 323 | |
328 | WRITE8_ | |
324 | WRITE8_MEMBER(turbo_state::subroc3d_sound_b_w) | |
329 | 325 | { |
330 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
331 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
332 | UINT8 diff = data ^ state->m_sound_state[1]; | |
333 | state->m_sound_state[1] = data; | |
326 | samples_device *samples = machine().device<samples_device>("samples"); | |
327 | UINT8 diff = data ^ m_sound_state[1]; | |
328 | m_sound_state[1] = data; | |
334 | 329 | |
335 | 330 | /* bit 0 latches direction/volume for missile */ |
336 | 331 | if ((diff & 0x01) && (data & 0x01)) |
337 | 332 | { |
338 | state->m_subroc3d_mdis = state->m_sound_state[0] & 0x0f; | |
339 | state->m_subroc3d_mdir = (state->m_sound_state[0] >> 4) & 0x07; | |
333 | m_subroc3d_mdis = m_sound_state[0] & 0x0f; | |
334 | m_subroc3d_mdir = (m_sound_state[0] >> 4) & 0x07; | |
340 | 335 | if (!samples->playing(0)) |
341 | 336 | { |
342 | 337 | samples->start(0, 0, true); |
343 | 338 | samples->start(1, 0, true); |
344 | 339 | } |
345 | subroc3d_update_volume(samples, 0, | |
340 | subroc3d_update_volume(samples, 0, m_subroc3d_mdis, m_subroc3d_mdir); | |
346 | 341 | } |
347 | 342 | |
348 | 343 | /* bit 1 latches direction/volume for torpedo */ |
349 | 344 | if ((diff & 0x02) && (data & 0x02)) |
350 | 345 | { |
351 | state->m_subroc3d_tdis = state->m_sound_state[0] & 0x0f; | |
352 | state->m_subroc3d_tdir = (state->m_sound_state[0] >> 4) & 0x07; | |
346 | m_subroc3d_tdis = m_sound_state[0] & 0x0f; | |
347 | m_subroc3d_tdir = (m_sound_state[0] >> 4) & 0x07; | |
353 | 348 | if (!samples->playing(2)) |
354 | 349 | { |
355 | 350 | samples->start(2, 1, true); |
356 | 351 | samples->start(3, 1, true); |
357 | 352 | } |
358 | subroc3d_update_volume(samples, 2, | |
353 | subroc3d_update_volume(samples, 2, m_subroc3d_tdis, m_subroc3d_tdir); | |
359 | 354 | } |
360 | 355 | |
361 | 356 | /* bit 2 latches direction/volume for fighter */ |
362 | 357 | if ((diff & 0x04) && (data & 0x04)) |
363 | 358 | { |
364 | state->m_subroc3d_fdis = state->m_sound_state[0] & 0x0f; | |
365 | state->m_subroc3d_fdir = (state->m_sound_state[0] >> 4) & 0x07; | |
359 | m_subroc3d_fdis = m_sound_state[0] & 0x0f; | |
360 | m_subroc3d_fdir = (m_sound_state[0] >> 4) & 0x07; | |
366 | 361 | if (!samples->playing(4)) |
367 | 362 | { |
368 | 363 | samples->start(4, 2, true); |
369 | 364 | samples->start(5, 2, true); |
370 | 365 | } |
371 | subroc3d_update_volume(samples, 4, | |
366 | subroc3d_update_volume(samples, 4, m_subroc3d_fdis, m_subroc3d_fdir); | |
372 | 367 | } |
373 | 368 | |
374 | 369 | /* bit 3 latches direction/volume for hit */ |
375 | 370 | if ((diff & 0x08) && (data & 0x08)) |
376 | 371 | { |
377 | state->m_subroc3d_hdis = state->m_sound_state[0] & 0x0f; | |
378 | state->m_subroc3d_hdir = (state->m_sound_state[0] >> 4) & 0x07; | |
379 | subroc3d_update_volume(samples, 6, state->m_subroc3d_hdis, state->m_subroc3d_hdir); | |
372 | m_subroc3d_hdis = m_sound_state[0] & 0x0f; | |
373 | m_subroc3d_hdir = (m_sound_state[0] >> 4) & 0x07; | |
374 | subroc3d_update_volume(samples, 6, m_subroc3d_hdis, m_subroc3d_hdir); | |
380 | 375 | } |
381 | 376 | } |
382 | 377 | |
383 | 378 | |
384 | WRITE8_ | |
379 | WRITE8_MEMBER(turbo_state::subroc3d_sound_c_w) | |
385 | 380 | { |
386 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
387 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
388 | UINT8 diff = data ^ state->m_sound_state[2]; | |
389 | state->m_sound_state[2] = data; | |
381 | samples_device *samples = machine().device<samples_device>("samples"); | |
382 | UINT8 diff = data ^ m_sound_state[2]; | |
383 | m_sound_state[2] = data; | |
390 | 384 | |
391 | 385 | /* /FIRE TRIG */ |
392 | 386 | /* FIRE SELECT */ |
r18185 | r18186 | |
400 | 394 | /* /HIT TRIG -> HIT.L/R: channels 6+7 */ |
401 | 395 | if ((diff & 0x08) && (data & 0x08)) |
402 | 396 | { |
403 | samples->start(6, (state->m_sound_state[0] & 0x80) ? 4 : 3); | |
404 | samples->start(7, (state->m_sound_state[0] & 0x80) ? 4 : 3); | |
397 | samples->start(6, (m_sound_state[0] & 0x80) ? 4 : 3); | |
398 | samples->start(7, (m_sound_state[0] & 0x80) ? 4 : 3); | |
405 | 399 | } |
406 | 400 | |
407 | 401 | /* /ALARM TRIG -> ALARM.M: channel 10 */ |
r18185 | r18186 | |
415 | 409 | samples->set_volume(11, (data & 0x40) ? 0 : 1.0); |
416 | 410 | |
417 | 411 | /* /GAME START */ |
418 | | |
412 | machine().sound().system_mute(data & 0x80); | |
419 | 413 | } |
420 | 414 | |
421 | 415 | |
r18185 | r18186 | |
505 | 499 | } |
506 | 500 | |
507 | 501 | |
508 | WRITE8_ | |
502 | WRITE8_MEMBER(turbo_state::buckrog_sound_a_w) | |
509 | 503 | { |
510 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
511 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
512 | UINT8 diff = data ^ state->m_sound_state[0]; | |
513 | state->m_sound_state[0] = data; | |
504 | samples_device *samples = machine().device<samples_device>("samples"); | |
505 | UINT8 diff = data ^ m_sound_state[0]; | |
506 | m_sound_state[0] = data; | |
514 | 507 | |
515 | 508 | /* clock HIT DIS from bits 0-2 */ |
516 | 509 | if ((diff & 0x10) && (data & 0x10)) |
r18185 | r18186 | |
519 | 512 | /* clock ACC from bits 0-3 */ |
520 | 513 | if ((diff & 0x20) && (data & 0x20)) |
521 | 514 | { |
522 | state->m_buckrog_myship = data & 0x0f; | |
523 | buckrog_update_samples(state, samples); | |
515 | m_buckrog_myship = data & 0x0f; | |
516 | buckrog_update_samples(this, samples); | |
524 | 517 | } |
525 | 518 | |
526 | 519 | /* /ALARM0: channel 0 */ |
r18185 | r18186 | |
531 | 524 | } |
532 | 525 | |
533 | 526 | |
534 | WRITE8_ | |
527 | WRITE8_MEMBER(turbo_state::buckrog_sound_b_w) | |
535 | 528 | { |
536 | samples_device *samples = space.machine().device<samples_device>("samples"); | |
537 | turbo_state *state = space.machine().driver_data<turbo_state>(); | |
538 | UINT8 diff = data ^ state->m_sound_state[1]; | |
539 | state->m_sound_state[1] = data; | |
529 | samples_device *samples = machine().device<samples_device>("samples"); | |
530 | UINT8 diff = data ^ m_sound_state[1]; | |
531 | m_sound_state[1] = data; | |
540 | 532 | |
541 | 533 | /* /ALARM3: channel 0 */ |
542 | 534 | if ((diff & 0x01) && !(data & 0x01)) samples->start(0, 2); |
r18185 | r18186 | |
554 | 546 | if ((diff & 0x10) && !(data & 0x10)) |
555 | 547 | { |
556 | 548 | samples->start(3, 7); |
557 | buckrog_update_samples( | |
549 | buckrog_update_samples(this, samples); | |
558 | 550 | } |
559 | 551 | |
560 | 552 | /* /REBOUND: channel 4 */ |
r18185 | r18186 | |
564 | 556 | if ((diff & 0x40) && (data & 0x40) && !samples->playing(5)) |
565 | 557 | { |
566 | 558 | samples->start(5, 8, true); |
567 | buckrog_update_samples( | |
559 | buckrog_update_samples(this, samples); | |
568 | 560 | } |
569 | 561 | if ((diff & 0x40) && !(data & 0x40) && samples->playing(5)) samples->stop(5); |
570 | 562 | |
571 | 563 | /* GAME ON */ |
572 | | |
564 | machine().sound().system_enable(data & 0x80); | |
573 | 565 | } |
574 | 566 | |
575 | 567 |
r18185 | r18186 | |
---|---|---|
387 | 387 | DEVCB_INPUT_PORT("IN3") |
388 | 388 | }; |
389 | 389 | |
390 | WRITE8_ | |
390 | WRITE8_MEMBER(bzone_state::bzone_sounds_w) | |
391 | 391 | { |
392 | discrete_sound_w(d | |
392 | discrete_sound_w(m_discrete, space, BZ_INPUT, data); | |
393 | 393 | |
394 | 394 | output_set_value("startled", (data >> 6) & 1); |
395 | | |
395 | machine().sound().system_enable(data & 0x20); | |
396 | 396 | } |
397 | 397 | |
398 | 398 |
r18185 | r18186 | |
---|---|---|
283 | 283 | DISCRETE_SOUND_END |
284 | 284 | |
285 | 285 | |
286 | WRITE8_ | |
286 | WRITE8_MEMBER(skyraid_state::skyraid_sound_w) | |
287 | 287 | { |
288 | 288 | /* BIT0 => PLANE SWEEP */ |
289 | 289 | /* BIT1 => MISSILE */ |
r18185 | r18186 | |
292 | 292 | /* BIT4 => PLANE ON */ |
293 | 293 | /* BIT5 => ATTRACT */ |
294 | 294 | |
295 | discrete_sound_w(device, space, SKYRAID_PLANE_SWEEP_EN, data & 0x01); | |
296 | discrete_sound_w(device, space, SKYRAID_MISSILE_EN, data & 0x02); | |
297 | discrete_sound_w(device, space, SKYRAID_EXPLOSION_EN, data & 0x04); | |
298 | set_led_status(space.machine(), 0, !(data & 0x08)); | |
299 | discrete_sound_w(device, space, SKYRAID_PLANE_ON_EN, data & 0x10); | |
300 | discrete_sound_w(device, space, SKYRAID_ATTRACT_EN, data & 0x20); | |
295 | discrete_sound_w(m_discrete, space, SKYRAID_PLANE_SWEEP_EN, data & 0x01); | |
296 | discrete_sound_w(m_discrete, space, SKYRAID_MISSILE_EN, data & 0x02); | |
297 | discrete_sound_w(m_discrete, space, SKYRAID_EXPLOSION_EN, data & 0x04); | |
298 | set_led_status(machine(), 0, !(data & 0x08)); | |
299 | discrete_sound_w(m_discrete, space, SKYRAID_PLANE_ON_EN, data & 0x10); | |
300 | discrete_sound_w(m_discrete, space, SKYRAID_ATTRACT_EN, data & 0x20); | |
301 | 301 | } |
r18185 | r18186 | |
---|---|---|
293 | 293 | DISCRETE_SOUND_END |
294 | 294 | |
295 | 295 | |
296 | WRITE8_ | |
296 | WRITE8_MEMBER(sprint8_state::sprint8_crash_w) | |
297 | 297 | { |
298 | discrete_sound_w(d | |
298 | discrete_sound_w(m_discrete, space, SPRINT8_CRASH_EN, data & 0x01); | |
299 | 299 | } |
300 | 300 | |
301 | WRITE8_ | |
301 | WRITE8_MEMBER(sprint8_state::sprint8_screech_w) | |
302 | 302 | { |
303 | discrete_sound_w(d | |
303 | discrete_sound_w(m_discrete, space, SPRINT8_SCREECH_EN, data & 0x01); | |
304 | 304 | } |
305 | 305 | |
306 | WRITE8_ | |
306 | WRITE8_MEMBER(sprint8_state::sprint8_attract_w) | |
307 | 307 | { |
308 | discrete_sound_w(d | |
308 | discrete_sound_w(m_discrete, space, SPRINT8_ATTRACT_EN, data & 0x01); | |
309 | 309 | } |
310 | 310 | |
311 | WRITE8_ | |
311 | WRITE8_MEMBER(sprint8_state::sprint8_motor_w) | |
312 | 312 | { |
313 | discrete_sound_w(d | |
313 | discrete_sound_w(m_discrete, space, NODE_RELATIVE(SPRINT8_MOTOR1_EN, offset & 0x07), data & 0x01); | |
314 | 314 | } |
r18185 | r18186 | |
---|---|---|
13 | 13 | * |
14 | 14 | *************************************/ |
15 | 15 | |
16 | WRITE8_ | |
16 | WRITE8_MEMBER(orbit_state::orbit_note_w) | |
17 | 17 | { |
18 | discrete_sound_w(d | |
18 | discrete_sound_w(m_discrete, space, ORBIT_NOTE_FREQ, (~data) & 0xff); | |
19 | 19 | } |
20 | 20 | |
21 | WRITE8_ | |
21 | WRITE8_MEMBER(orbit_state::orbit_note_amp_w) | |
22 | 22 | { |
23 | discrete_sound_w(device, space, ORBIT_ANOTE1_AMP, data & 0x0f); | |
24 | discrete_sound_w(device, space, ORBIT_ANOTE2_AMP, data >> 4); | |
23 | discrete_sound_w(m_discrete, space, ORBIT_ANOTE1_AMP, data & 0x0f); | |
24 | discrete_sound_w(m_discrete, space, ORBIT_ANOTE2_AMP, data >> 4); | |
25 | 25 | } |
26 | 26 | |
27 | WRITE8_ | |
27 | WRITE8_MEMBER(orbit_state::orbit_noise_amp_w) | |
28 | 28 | { |
29 | discrete_sound_w(device, space, ORBIT_NOISE1_AMP, data & 0x0f); | |
30 | discrete_sound_w(device, space, ORBIT_NOISE2_AMP, data >> 4); | |
29 | discrete_sound_w(m_discrete, space, ORBIT_NOISE1_AMP, data & 0x0f); | |
30 | discrete_sound_w(m_discrete, space, ORBIT_NOISE2_AMP, data >> 4); | |
31 | 31 | } |
32 | 32 | |
33 | WRITE8_ | |
33 | WRITE8_MEMBER(orbit_state::orbit_noise_rst_w) | |
34 | 34 | { |
35 | discrete_sound_w(d | |
35 | discrete_sound_w(m_discrete, space, ORBIT_NOISE_EN, 0); | |
36 | 36 | } |
37 | 37 | |
38 | 38 |
r18185 | r18186 | |
---|---|---|
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | WRITE8_ | |
33 | WRITE8_MEMBER(crbaloon_state::crbaloon_audio_set_music_freq) | |
34 | 34 | { |
35 | discrete_sound_w(d | |
35 | discrete_sound_w(m_discrete, space, CRBALOON_MUSIC_DATA, data); | |
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | WRITE8_ | |
39 | WRITE8_MEMBER(crbaloon_state::crbaloon_audio_set_music_enable) | |
40 | 40 | { |
41 | discrete_sound_w(d | |
41 | discrete_sound_w(m_discrete, space, CRBALOON_MUSIC_EN, data); | |
42 | 42 | } |
43 | 43 | |
44 | 44 | |
r18185 | r18186 | |
64 | 64 | } |
65 | 65 | |
66 | 66 | |
67 | WRITE8_ | |
67 | WRITE8_MEMBER(crbaloon_state::crbaloon_audio_set_laugh_enable) | |
68 | 68 | { |
69 | discrete_sound_w(d | |
69 | discrete_sound_w(m_discrete, space, CRBALOON_LAUGH_EN, data); | |
70 | 70 | } |
71 | 71 | |
72 | 72 |
r18185 | r18186 | |
---|---|---|
12 | 12 | |
13 | 13 | /* z80 pio */ |
14 | 14 | |
15 | ||
15 | READ8_MEMBER(senjyo_state::pio_pa_r) | |
16 | 16 | { |
17 | senjyo_state *state = space.machine().driver_data<senjyo_state>(); | |
18 | 17 | |
19 | return | |
18 | return m_sound_cmd; | |
20 | 19 | } |
21 | 20 | |
22 | 21 | Z80PIO_INTERFACE( senjyo_pio_intf ) |
23 | 22 | { |
24 | 23 | DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0), |
25 | DEVCB_ | |
24 | DEVCB_DRIVER_MEMBER(senjyo_state,pio_pa_r), | |
26 | 25 | DEVCB_NULL, |
27 | 26 | DEVCB_NULL, |
28 | 27 | DEVCB_NULL, |
r18185 | r18186 | |
---|---|---|
10 | 10 | /*************************************************************************** |
11 | 11 | Sound handlers |
12 | 12 | ***************************************************************************/ |
13 | WRITE8_ | |
13 | WRITE8_MEMBER(bsktball_state::bsktball_bounce_w) | |
14 | 14 | { |
15 | discrete_sound_w(device, space, BSKTBALL_CROWD_DATA, data & 0x0f); // Crowd | |
16 | discrete_sound_w(device, space, BSKTBALL_BOUNCE_EN, data & 0x10); // Bounce | |
15 | discrete_sound_w(m_discrete, space, BSKTBALL_CROWD_DATA, data & 0x0f); // Crowd | |
16 | discrete_sound_w(m_discrete, space, BSKTBALL_BOUNCE_EN, data & 0x10); // Bounce | |
17 | 17 | } |
18 | 18 | |
19 | WRITE8_ | |
19 | WRITE8_MEMBER(bsktball_state::bsktball_note_w) | |
20 | 20 | { |
21 | discrete_sound_w(d | |
21 | discrete_sound_w(m_discrete, space, BSKTBALL_NOTE_DATA, data); // Note | |
22 | 22 | } |
23 | 23 | |
24 | WRITE8_ | |
24 | WRITE8_MEMBER(bsktball_state::bsktball_noise_reset_w) | |
25 | 25 | { |
26 | discrete_sound_w(d | |
26 | discrete_sound_w(m_discrete, space, BSKTBALL_NOISE_EN, offset & 0x01); | |
27 | 27 | } |
28 | 28 | |
29 | 29 |
r18185 | r18186 | |
---|---|---|
393 | 393 | } |
394 | 394 | } |
395 | 395 | |
396 | WRITE8_ | |
396 | WRITE8_MEMBER(micro3d_state::micro3d_upd7759_w) | |
397 | 397 | { |
398 | device_t *device = machine().device("upd7759"); | |
398 | 399 | upd7759_port_w(device, space, 0, data); |
399 | 400 | upd7759_start_w(device, 0); |
400 | 401 | upd7759_start_w(device, 1); |
r18185 | r18186 | |
---|---|---|
293 | 293 | * |
294 | 294 | *************************************/ |
295 | 295 | |
296 | WRITE16_ | |
296 | WRITE16_MEMBER(harddriv_state::hdsnddsp_dac_w) | |
297 | 297 | { |
298 | harddriv_state *state = space.machine().driver_data<harddriv_state>(); | |
299 | 298 | |
300 | 299 | /* DAC L */ |
301 | if (!state->m_dacmute) | |
302 | downcast<dac_device *>(device)->write_signed16(data ^ 0x8000); | |
300 | if (!m_dacmute) | |
301 | downcast<dac_device *>(machine().device("dac"))->write_signed16(data ^ 0x8000); | |
303 | 302 | } |
304 | 303 | |
305 | 304 |
r18185 | r18186 | |
---|---|---|
277 | 277 | { |
278 | 278 | |
279 | 279 | m_maincpu = machine().device<cpu_device>("maincpu"); |
280 | m_discrete = machine().device("discrete"); | |
281 | 280 | |
282 | 281 | save_item(NAME(m_gear)); |
283 | 282 | save_item(NAME(m_track)); |
r18185 | r18186 | |
---|---|---|
104 | 104 | m_sn = machine().device("snsnd"); |
105 | 105 | m_sn1 = machine().device("sn1"); |
106 | 106 | m_sn2 = machine().device("sn2"); |
107 | m_discrete = machine().device("discrete"); | |
108 | 107 | m_mb14241 = machine().device("mb14241"); |
109 | 108 | } |
110 | 109 |
Previous | 199869 Revisions | Next |