trunk/src/mame/includes/segag80r.h
r17586 | r17587 | |
5 | 5 | *************************************************************************/ |
6 | 6 | |
7 | 7 | #include "machine/segag80.h" |
| 8 | #include "sound/sn76496.h" |
8 | 9 | |
9 | 10 | class segag80r_state : public driver_device |
10 | 11 | { |
r17586 | r17587 | |
12 | 13 | segag80r_state(const machine_config &mconfig, device_type type, const char *tag) |
13 | 14 | : driver_device(mconfig, type, tag) , |
14 | 15 | m_mainram(*this, "mainram"), |
15 | | m_videoram(*this, "videoram"){ } |
16 | | |
| 16 | m_videoram(*this, "videoram"), |
| 17 | m_sn1(*this, "sn1"), |
| 18 | m_sn2(*this, "sn2"){ } |
| 19 | |
17 | 20 | required_shared_ptr<UINT8> m_mainram; |
18 | 21 | required_shared_ptr<UINT8> m_videoram; |
| 22 | |
| 23 | optional_device<sn76496_new_device> m_sn1; |
| 24 | optional_device<sn76496_new_device> m_sn2; |
19 | 25 | |
20 | 26 | UINT8 m_sound_state[2]; |
21 | 27 | UINT8 m_sound_rate; |
trunk/src/mame/includes/circusc.h
r17586 | r17587 | |
5 | 5 | *************************************************************************/ |
6 | 6 | |
7 | 7 | #include "sound/dac.h" |
| 8 | #include "sound/sn76496.h" |
8 | 9 | |
9 | 10 | class circusc_state : public driver_device |
10 | 11 | { |
r17586 | r17587 | |
16 | 17 | m_colorram(*this, "colorram"), |
17 | 18 | m_videoram(*this, "videoram"), |
18 | 19 | m_spriteram_2(*this, "spriteram_2"), |
19 | | m_spriteram(*this, "spriteram"){ } |
| 20 | m_spriteram(*this, "spriteram"), |
| 21 | m_sn_1(*this, "sn1"), |
| 22 | m_sn_2(*this, "sn2"){ } |
20 | 23 | |
21 | 24 | /* memory pointers */ |
22 | 25 | required_shared_ptr<UINT8> m_spritebank; |
r17586 | r17587 | |
34 | 37 | |
35 | 38 | /* devices */ |
36 | 39 | cpu_device *m_audiocpu; |
37 | | device_t *m_sn1; |
38 | | device_t *m_sn2; |
| 40 | required_device<sn76496_new_device> m_sn_1; |
| 41 | required_device<sn76496_new_device> m_sn_2; |
39 | 42 | dac_device *m_dac; |
40 | 43 | device_t *m_discrete; |
41 | 44 | |
trunk/src/mame/includes/lasso.h
r17586 | r17587 | |
4 | 4 | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
| 7 | #include "sound/sn76496.h" |
| 8 | |
7 | 9 | class lasso_state : public driver_device |
8 | 10 | { |
9 | 11 | public: |
r17586 | r17587 | |
16 | 18 | m_chip_data(*this, "chip_data"), |
17 | 19 | m_bitmap_ram(*this, "bitmap_ram"), |
18 | 20 | m_last_colors(*this, "last_colors"), |
19 | | m_track_scroll(*this, "track_scroll"){ } |
| 21 | m_track_scroll(*this, "track_scroll"), |
| 22 | m_sn_1(*this, "sn76489.1"), |
| 23 | m_sn_2(*this, "sn76489.2"){ } |
20 | 24 | |
21 | 25 | /* memory pointers */ |
22 | 26 | required_shared_ptr<UINT8> m_videoram; |
r17586 | r17587 | |
37 | 41 | /* devices */ |
38 | 42 | device_t *m_maincpu; |
39 | 43 | device_t *m_audiocpu; |
40 | | device_t *m_sn_1; |
41 | | device_t *m_sn_2; |
| 44 | optional_device<sn76489_new_device> m_sn_1; |
| 45 | optional_device<sn76489_new_device> m_sn_2; |
42 | 46 | DECLARE_WRITE8_MEMBER(sound_command_w); |
43 | 47 | DECLARE_WRITE8_MEMBER(pinbo_sound_command_w); |
44 | 48 | DECLARE_READ8_MEMBER(sound_status_r); |
trunk/src/mame/includes/spcforce.h
r17586 | r17587 | |
| 1 | #include "sound/sn76496.h" |
| 2 | |
1 | 3 | class spcforce_state : public driver_device |
2 | 4 | { |
3 | 5 | public: |
r17586 | r17587 | |
5 | 7 | : driver_device(mconfig, type, tag) , |
6 | 8 | m_scrollram(*this, "scrollram"), |
7 | 9 | m_videoram(*this, "videoram"), |
8 | | m_colorram(*this, "colorram"){ } |
| 10 | m_colorram(*this, "colorram"), |
| 11 | m_sn1(*this, "sn1"), |
| 12 | m_sn2(*this, "sn2"), |
| 13 | m_sn3(*this, "sn3"){ } |
9 | 14 | |
| 15 | |
10 | 16 | required_shared_ptr<UINT8> m_scrollram; |
11 | 17 | required_shared_ptr<UINT8> m_videoram; |
12 | 18 | required_shared_ptr<UINT8> m_colorram; |
13 | 19 | |
| 20 | required_device<sn76496_new_device> m_sn1; |
| 21 | required_device<sn76496_new_device> m_sn2; |
| 22 | required_device<sn76496_new_device> m_sn3; |
| 23 | |
14 | 24 | int m_sn76496_latch; |
15 | 25 | int m_sn76496_select; |
16 | 26 | |
trunk/src/mame/includes/gberet.h
r17586 | r17587 | |
4 | 4 | |
5 | 5 | ***************************************************************************/ |
6 | 6 | |
| 7 | #include "sound/sn76496.h" |
| 8 | |
7 | 9 | class gberet_state : public driver_device |
8 | 10 | { |
9 | 11 | public: |
r17586 | r17587 | |
14 | 16 | m_spriteram2(*this, "spriteram2"), |
15 | 17 | m_spriteram(*this, "spriteram"), |
16 | 18 | m_scrollram(*this, "scrollram"), |
17 | | m_soundlatch(*this, "soundlatch"){ } |
| 19 | m_soundlatch(*this, "soundlatch"), |
| 20 | m_sn(*this, "snsnd") { } |
18 | 21 | |
19 | 22 | /* memory pointers */ |
20 | 23 | required_shared_ptr<UINT8> m_colorram; |
r17586 | r17587 | |
23 | 26 | required_shared_ptr<UINT8> m_spriteram; |
24 | 27 | optional_shared_ptr<UINT8> m_scrollram; |
25 | 28 | optional_shared_ptr<UINT8> m_soundlatch; |
| 29 | |
| 30 | /* devices */ |
| 31 | required_device<sn76489a_new_device> m_sn; |
26 | 32 | |
27 | 33 | /* video-related */ |
28 | 34 | tilemap_t * m_bg_tilemap; |
trunk/src/mame/includes/homedata.h
r17586 | r17587 | |
1 | 1 | #include "sound/dac.h" |
| 2 | #include "sound/sn76496.h" |
2 | 3 | |
3 | 4 | class homedata_state : public driver_device |
4 | 5 | { |
r17586 | r17587 | |
6 | 7 | homedata_state(const machine_config &mconfig, device_type type, const char *tag) |
7 | 8 | : driver_device(mconfig, type, tag) , |
8 | 9 | m_vreg(*this, "vreg"), |
9 | | m_videoram(*this, "videoram"){ } |
| 10 | m_videoram(*this, "videoram") {} |
10 | 11 | |
11 | 12 | /* memory pointers */ |
12 | 13 | optional_shared_ptr<UINT8> m_vreg; |
r17586 | r17587 | |
39 | 40 | device_t *m_audiocpu; |
40 | 41 | dac_device *m_dac; |
41 | 42 | device_t *m_ym; |
42 | | device_t *m_sn; |
| 43 | sn76489a_new_device *m_sn; |
43 | 44 | UINT8 m_prot_data; |
44 | 45 | DECLARE_READ8_MEMBER(mrokumei_keyboard_r); |
45 | 46 | DECLARE_WRITE8_MEMBER(mrokumei_keyboard_select_w); |
trunk/src/mame/drivers/guab.c
r17586 | r17587 | |
76 | 76 | { |
77 | 77 | public: |
78 | 78 | guab_state(const machine_config &mconfig, device_type type, const char *tag) |
79 | | : driver_device(mconfig, type, tag) { } |
80 | | |
| 79 | : driver_device(mconfig, type, tag) , |
| 80 | m_sn(*this, "snsnd") { } |
| 81 | |
| 82 | /* devices */ |
| 83 | required_device<sn76489_new_device> m_sn; |
| 84 | |
81 | 85 | struct ef9369 m_pal; |
82 | 86 | emu_timer *m_fdc_timer; |
83 | 87 | struct wd1770 m_fdc; |
r17586 | r17587 | |
651 | 655 | } |
652 | 656 | case 0x30: |
653 | 657 | { |
654 | | sn76496_w(machine().device("snsnd"), 0, data & 0xff); |
| 658 | m_sn->write(space, 0, data & 0xff); |
655 | 659 | break; |
656 | 660 | } |
657 | 661 | case 0x31: |
r17586 | r17587 | |
774 | 778 | |
775 | 779 | /************************************* |
776 | 780 | * |
| 781 | * Sound interface |
| 782 | * |
| 783 | *************************************/ |
| 784 | |
| 785 | |
| 786 | //------------------------------------------------- |
| 787 | // sn76496_config psg_intf |
| 788 | //------------------------------------------------- |
| 789 | |
| 790 | static const sn76496_config psg_intf = |
| 791 | { |
| 792 | DEVCB_NULL |
| 793 | }; |
| 794 | |
| 795 | |
| 796 | /************************************* |
| 797 | * |
777 | 798 | * Machine driver |
778 | 799 | * |
779 | 800 | *************************************/ |
r17586 | r17587 | |
813 | 834 | MCFG_SPEAKER_STANDARD_MONO("mono") |
814 | 835 | |
815 | 836 | /* TODO: Verify clock */ |
816 | | MCFG_SOUND_ADD("snsnd", SN76489, 2000000) |
| 837 | MCFG_SOUND_ADD("snsnd", SN76489_NEW, 2000000) |
817 | 838 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 839 | MCFG_SOUND_CONFIG(psg_intf) |
818 | 840 | |
819 | 841 | /* 6840 PTM */ |
820 | 842 | MCFG_PTM6840_ADD("6840ptm", ptm_intf) |
trunk/src/mame/drivers/segag80r.c
r17586 | r17587 | |
301 | 301 | /* the data lines are flipped */ |
302 | 302 | WRITE8_MEMBER(segag80r_state::sindbadm_sn1_SN76496_w) |
303 | 303 | { |
304 | | device_t *device = machine().device("sn1"); |
305 | | sn76496_w(device, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); |
| 304 | m_sn1->write(space, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); |
306 | 305 | } |
307 | 306 | WRITE8_MEMBER(segag80r_state::sindbadm_sn2_SN76496_w) |
308 | 307 | { |
309 | | device_t *device = machine().device("sn2"); |
310 | | sn76496_w(device, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); |
| 308 | m_sn2->write(space, offset, BITSWAP8(data, 0,1,2,3,4,5,6,7)); |
311 | 309 | } |
312 | 310 | |
313 | 311 | |
r17586 | r17587 | |
816 | 814 | GFXDECODE_END |
817 | 815 | |
818 | 816 | |
| 817 | /************************************* |
| 818 | * |
| 819 | * Sound interface |
| 820 | * |
| 821 | *************************************/ |
| 822 | |
| 823 | |
| 824 | //------------------------------------------------- |
| 825 | // sn76496_config psg_intf |
| 826 | //------------------------------------------------- |
819 | 827 | |
| 828 | static const sn76496_config psg_intf = |
| 829 | { |
| 830 | DEVCB_NULL |
| 831 | }; |
| 832 | |
| 833 | |
820 | 834 | /************************************* |
821 | 835 | * |
822 | 836 | * Machine drivers |
r17586 | r17587 | |
934 | 948 | MCFG_CPU_PERIODIC_INT(irq0_line_hold,4*60) |
935 | 949 | |
936 | 950 | /* sound hardware */ |
937 | | MCFG_SOUND_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/4) |
| 951 | MCFG_SOUND_ADD("sn1", SN76496_NEW, SINDBADM_SOUND_CLOCK/4) |
938 | 952 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 953 | MCFG_SOUND_CONFIG(psg_intf) |
939 | 954 | |
940 | | MCFG_SOUND_ADD("sn2", SN76496, SINDBADM_SOUND_CLOCK/2) |
| 955 | MCFG_SOUND_ADD("sn2", SN76496_NEW, SINDBADM_SOUND_CLOCK/2) |
941 | 956 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 957 | MCFG_SOUND_CONFIG(psg_intf) |
942 | 958 | MACHINE_CONFIG_END |
943 | 959 | |
944 | 960 | |
trunk/src/mame/drivers/circusc.c
r17586 | r17587 | |
52 | 52 | #include "machine/konami1.h" |
53 | 53 | #include "cpu/m6809/m6809.h" |
54 | 54 | #include "sound/dac.h" |
55 | | #include "sound/sn76496.h" |
56 | 55 | #include "sound/discrete.h" |
57 | 56 | #include "includes/circusc.h" |
58 | 57 | |
r17586 | r17587 | |
62 | 61 | circusc_state *state = machine.driver_data<circusc_state>(); |
63 | 62 | |
64 | 63 | state->m_audiocpu = machine.device<cpu_device>("audiocpu"); |
65 | | state->m_sn1 = machine.device("sn1"); |
66 | | state->m_sn2 = machine.device("sn2"); |
67 | 64 | state->m_dac = machine.device<dac_device>("dac"); |
68 | 65 | state->m_discrete = machine.device("fltdisc"); |
69 | 66 | |
r17586 | r17587 | |
118 | 115 | |
119 | 116 | /* CS3 */ |
120 | 117 | case 1: |
121 | | sn76496_w(m_sn1, 0, m_sn_latch); |
| 118 | m_sn_1->write(space, 0, m_sn_latch); |
122 | 119 | break; |
123 | 120 | |
124 | 121 | /* CS4 */ |
125 | 122 | case 2: |
126 | | sn76496_w(m_sn2, 0, m_sn_latch); |
| 123 | m_sn_2->write(space, 0, m_sn_latch); |
127 | 124 | break; |
128 | 125 | |
129 | 126 | /* CS5 */ |
r17586 | r17587 | |
302 | 299 | GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 16*16, 16 ) |
303 | 300 | GFXDECODE_END |
304 | 301 | |
| 302 | |
| 303 | /************************************* |
| 304 | * |
| 305 | * Sound interface |
| 306 | * |
| 307 | *************************************/ |
| 308 | |
| 309 | |
| 310 | //------------------------------------------------- |
| 311 | // sn76496_config psg_intf |
| 312 | //------------------------------------------------- |
| 313 | |
| 314 | static const sn76496_config psg_intf = |
| 315 | { |
| 316 | DEVCB_NULL |
| 317 | }; |
| 318 | |
| 319 | |
305 | 320 | static const discrete_mixer_desc circusc_mixer_desc = |
306 | 321 | {DISC_MIXER_IS_RESISTOR, |
307 | 322 | {RES_K(2.2), RES_K(2.2), RES_K(10)}, |
r17586 | r17587 | |
371 | 386 | /* sound hardware */ |
372 | 387 | MCFG_SPEAKER_STANDARD_MONO("mono") |
373 | 388 | |
374 | | MCFG_SOUND_ADD("sn1", SN76496, XTAL_14_31818MHz/8) |
| 389 | MCFG_SOUND_ADD("sn1", SN76496_NEW, XTAL_14_31818MHz/8) |
| 390 | MCFG_SOUND_CONFIG(psg_intf) |
375 | 391 | MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 0) |
376 | 392 | |
377 | | MCFG_SOUND_ADD("sn2", SN76496, XTAL_14_31818MHz/8) |
| 393 | MCFG_SOUND_ADD("sn2", SN76496_NEW, XTAL_14_31818MHz/8) |
| 394 | MCFG_SOUND_CONFIG(psg_intf) |
378 | 395 | MCFG_SOUND_ROUTE_EX(0, "fltdisc", 1.0, 1) |
379 | 396 | |
380 | 397 | MCFG_DAC_ADD("dac") |
trunk/src/mame/drivers/lasso.c
r17586 | r17587 | |
32 | 32 | #include "cpu/m6502/m6502.h" |
33 | 33 | #include "cpu/z80/z80.h" |
34 | 34 | #include "sound/dac.h" |
35 | | #include "sound/sn76496.h" |
36 | 35 | #include "sound/ay8910.h" |
37 | 36 | #include "includes/lasso.h" |
38 | 37 | |
r17586 | r17587 | |
69 | 68 | UINT8 to_write = BITSWAP8(*m_chip_data, 0, 1, 2, 3, 4, 5, 6, 7); |
70 | 69 | |
71 | 70 | if (~data & 0x01) /* chip #0 */ |
72 | | sn76496_w(m_sn_1, 0, to_write); |
| 71 | m_sn_1->write(space, 0, to_write); |
73 | 72 | |
74 | 73 | if (~data & 0x02) /* chip #1 */ |
75 | | sn76496_w(m_sn_2, 0, to_write); |
| 74 | m_sn_2->write(space, 0, to_write); |
76 | 75 | } |
77 | 76 | |
78 | 77 | |
r17586 | r17587 | |
459 | 458 | GFXDECODE_END |
460 | 459 | |
461 | 460 | |
| 461 | /************************************* |
| 462 | * |
| 463 | * Sound interface |
| 464 | * |
| 465 | *************************************/ |
| 466 | |
| 467 | |
| 468 | //------------------------------------------------- |
| 469 | // sn76496_config psg_intf |
| 470 | //------------------------------------------------- |
462 | 471 | |
| 472 | static const sn76496_config psg_intf = |
| 473 | { |
| 474 | DEVCB_NULL |
| 475 | }; |
| 476 | |
| 477 | |
463 | 478 | static MACHINE_START( lasso ) |
464 | 479 | { |
465 | 480 | lasso_state *state = machine.driver_data<lasso_state>(); |
466 | 481 | |
467 | 482 | state->m_maincpu = machine.device("maincpu"); |
468 | 483 | state->m_audiocpu = machine.device("audiocpu"); |
469 | | state->m_sn_1 = machine.device("sn76489.1"); |
470 | | state->m_sn_2 = machine.device("sn76489.2"); |
471 | | |
| 484 | |
472 | 485 | state->save_item(NAME(state->m_gfxbank)); |
473 | 486 | } |
474 | 487 | |
r17586 | r17587 | |
529 | 542 | /* sound hardware */ |
530 | 543 | MCFG_SPEAKER_STANDARD_MONO("mono") |
531 | 544 | |
532 | | MCFG_SOUND_ADD("sn76489.1", SN76489, 2000000) |
| 545 | MCFG_SOUND_ADD("sn76489.1", SN76489_NEW, 2000000) |
533 | 546 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 547 | MCFG_SOUND_CONFIG(psg_intf) |
534 | 548 | |
535 | | MCFG_SOUND_ADD("sn76489.2", SN76489, 2000000) |
| 549 | MCFG_SOUND_ADD("sn76489.2", SN76489_NEW, 2000000) |
536 | 550 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 551 | MCFG_SOUND_CONFIG(psg_intf) |
537 | 552 | MACHINE_CONFIG_END |
538 | 553 | |
539 | 554 | static MACHINE_CONFIG_DERIVED( lasso, base ) |
trunk/src/mame/drivers/spcforce.c
r17586 | r17587 | |
36 | 36 | #include "emu.h" |
37 | 37 | #include "cpu/i8085/i8085.h" |
38 | 38 | #include "cpu/mcs48/mcs48.h" |
39 | | #include "sound/sn76496.h" |
40 | 39 | #include "includes/spcforce.h" |
41 | 40 | |
42 | 41 | |
r17586 | r17587 | |
49 | 48 | READ8_MEMBER(spcforce_state::spcforce_SN76496_select_r) |
50 | 49 | { |
51 | 50 | |
52 | | if (~m_sn76496_select & 0x40) return sn76496_ready_r(machine().device("sn1")); |
53 | | if (~m_sn76496_select & 0x20) return sn76496_ready_r(machine().device("sn2")); |
54 | | if (~m_sn76496_select & 0x10) return sn76496_ready_r(machine().device("sn3")); |
| 51 | if (~m_sn76496_select & 0x40) return m_sn1->ready_r(); |
| 52 | if (~m_sn76496_select & 0x20) return m_sn2->ready_r(); |
| 53 | if (~m_sn76496_select & 0x10) return m_sn3->ready_r(); |
55 | 54 | |
| 55 | |
56 | 56 | return 0; |
57 | 57 | } |
58 | 58 | |
r17586 | r17587 | |
61 | 61 | |
62 | 62 | m_sn76496_select = data; |
63 | 63 | |
64 | | if (~data & 0x40) sn76496_w(machine().device("sn1"), 0, m_sn76496_latch); |
65 | | if (~data & 0x20) sn76496_w(machine().device("sn2"), 0, m_sn76496_latch); |
66 | | if (~data & 0x10) sn76496_w(machine().device("sn3"), 0, m_sn76496_latch); |
| 64 | if (~data & 0x40) m_sn1->write(space, 0, m_sn76496_latch); |
| 65 | if (~data & 0x20) m_sn2->write(space, 0, m_sn76496_latch); |
| 66 | if (~data & 0x10) m_sn3->write(space, 0, m_sn76496_latch); |
| 67 | |
67 | 68 | } |
68 | 69 | |
69 | 70 | READ8_MEMBER(spcforce_state::spcforce_t0_r) |
r17586 | r17587 | |
241 | 242 | } |
242 | 243 | } |
243 | 244 | |
| 245 | |
| 246 | //------------------------------------------------- |
| 247 | // sn76496_config psg_intf |
| 248 | //------------------------------------------------- |
| 249 | |
| 250 | static const sn76496_config psg_intf = |
| 251 | { |
| 252 | DEVCB_NULL |
| 253 | }; |
| 254 | |
| 255 | |
244 | 256 | static INTERRUPT_GEN( vblank_irq ) |
245 | 257 | { |
246 | 258 | spcforce_state *state = device->machine().driver_data<spcforce_state>(); |
r17586 | r17587 | |
277 | 289 | /* sound hardware */ |
278 | 290 | MCFG_SPEAKER_STANDARD_MONO("mono") |
279 | 291 | |
280 | | MCFG_SOUND_ADD("sn1", SN76496, 2000000) |
| 292 | MCFG_SOUND_ADD("sn1", SN76496_NEW, 2000000) |
281 | 293 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 294 | MCFG_SOUND_CONFIG(psg_intf) |
282 | 295 | |
283 | | MCFG_SOUND_ADD("sn2", SN76496, 2000000) |
| 296 | MCFG_SOUND_ADD("sn2", SN76496_NEW, 2000000) |
284 | 297 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 298 | MCFG_SOUND_CONFIG(psg_intf) |
285 | 299 | |
286 | | MCFG_SOUND_ADD("sn3", SN76496, 2000000) |
| 300 | MCFG_SOUND_ADD("sn3", SN76496_NEW, 2000000) |
287 | 301 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 302 | MCFG_SOUND_CONFIG(psg_intf) |
288 | 303 | MACHINE_CONFIG_END |
289 | 304 | |
290 | 305 | |
trunk/src/mame/drivers/gberet.c
r17586 | r17587 | |
145 | 145 | |
146 | 146 | WRITE8_MEMBER(gberet_state::gberet_sound_w) |
147 | 147 | { |
148 | | sn76496_w(machine().device("snsnd"), 0, *m_soundlatch); |
| 148 | m_sn->write(space, 0, *m_soundlatch); |
149 | 149 | } |
150 | 150 | |
151 | 151 | static ADDRESS_MAP_START( gberet_map, AS_PROGRAM, 8, gberet_state ) |
r17586 | r17587 | |
218 | 218 | AM_RANGE(0xe900, 0xe9ff) AM_RAM AM_SHARE("spriteram") |
219 | 219 | AM_RANGE(0xf000, 0xf000) AM_WRITENOP // coin counter not supported |
220 | 220 | AM_RANGE(0xf200, 0xf200) AM_READ_PORT("DSW2") |
221 | | AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) |
| 221 | AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("snsnd", sn76489a_new_device, write) |
222 | 222 | AM_RANGE(0xf600, 0xf600) AM_READ_PORT("P2") |
223 | 223 | AM_RANGE(0xf601, 0xf601) AM_READ_PORT("DSW1") |
224 | 224 | AM_RANGE(0xf602, 0xf602) AM_READ_PORT("P1") |
r17586 | r17587 | |
381 | 381 | |
382 | 382 | /************************************* |
383 | 383 | * |
| 384 | * Sound interface |
| 385 | * |
| 386 | *************************************/ |
| 387 | |
| 388 | |
| 389 | //------------------------------------------------- |
| 390 | // sn76496_config psg_intf |
| 391 | //------------------------------------------------- |
| 392 | |
| 393 | static const sn76496_config psg_intf = |
| 394 | { |
| 395 | DEVCB_NULL |
| 396 | }; |
| 397 | |
| 398 | |
| 399 | /************************************* |
| 400 | * |
384 | 401 | * Machine drivers |
385 | 402 | * |
386 | 403 | *************************************/ |
r17586 | r17587 | |
430 | 447 | /* sound hardware */ |
431 | 448 | MCFG_SPEAKER_STANDARD_MONO("mono") |
432 | 449 | |
433 | | MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_18_432MHz/12) /* type verified on real and bootleg pcb */ |
| 450 | MCFG_SOUND_ADD("snsnd", SN76489A_NEW, XTAL_18_432MHz/12) /* type verified on real and bootleg pcb */ |
434 | 451 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 452 | MCFG_SOUND_CONFIG(psg_intf) |
435 | 453 | MACHINE_CONFIG_END |
436 | 454 | |
437 | 455 | static MACHINE_CONFIG_DERIVED( mrgoemon, gberet ) |
r17586 | r17587 | |
469 | 487 | /* sound hardware */ |
470 | 488 | MCFG_SPEAKER_STANDARD_MONO("mono") |
471 | 489 | |
472 | | MCFG_SOUND_ADD("snsnd", SN76489A, XTAL_20MHz/12) // divider guessed |
| 490 | MCFG_SOUND_ADD("snsnd", SN76489A_NEW, XTAL_20MHz/12) // divider guessed |
473 | 491 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 492 | MCFG_SOUND_CONFIG(psg_intf) |
474 | 493 | MACHINE_CONFIG_END |
475 | 494 | |
476 | 495 | |
trunk/src/mame/drivers/homedata.c
r17586 | r17587 | |
222 | 222 | #include "includes/homedata.h" |
223 | 223 | #include "sound/dac.h" |
224 | 224 | #include "sound/2203intf.h" |
225 | | #include "sound/sn76496.h" |
226 | 225 | |
227 | 226 | static INTERRUPT_GEN( homedata_irq ) |
228 | 227 | { |
r17586 | r17587 | |
499 | 498 | coin_counter_w(machine(), 0, ~data & 0x80); |
500 | 499 | |
501 | 500 | if (BIT(m_upd7807_portc, 5) && !BIT(data, 5)) /* clock 1->0 */ |
502 | | sn76496_w(m_sn, 0, m_upd7807_porta); |
| 501 | m_sn->write(space, 0, m_upd7807_porta); |
503 | 502 | |
504 | 503 | m_upd7807_portc = data; |
505 | 504 | } |
r17586 | r17587 | |
537 | 536 | AM_RANGE(0x8000, 0x8000) AM_WRITE(mrokumei_blitter_start_w) // in some games also ROM bank switch to access service ROM |
538 | 537 | AM_RANGE(0x8001, 0x8001) AM_WRITE(mrokumei_keyboard_select_w) |
539 | 538 | AM_RANGE(0x8002, 0x8002) AM_WRITE(mrokumei_sound_cmd_w) |
540 | | AM_RANGE(0x8003, 0x8003) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) |
| 539 | AM_RANGE(0x8003, 0x8003) AM_DEVWRITE("snsnd", sn76489a_new_device, write) |
541 | 540 | AM_RANGE(0x8006, 0x8006) AM_WRITE(homedata_blitter_param_w) |
542 | 541 | AM_RANGE(0x8007, 0x8007) AM_WRITE(mrokumei_blitter_bank_w) |
543 | 542 | AM_RANGE(0x8000, 0xffff) AM_ROM |
r17586 | r17587 | |
1124 | 1123 | GFXDECODE_END |
1125 | 1124 | |
1126 | 1125 | |
| 1126 | /************************************* |
| 1127 | * |
| 1128 | * Sound interface |
| 1129 | * |
| 1130 | *************************************/ |
| 1131 | |
| 1132 | |
| 1133 | //------------------------------------------------- |
| 1134 | // sn76496_config psg_intf |
| 1135 | //------------------------------------------------- |
1127 | 1136 | |
| 1137 | static const sn76496_config psg_intf = |
| 1138 | { |
| 1139 | DEVCB_NULL |
| 1140 | }; |
| 1141 | |
| 1142 | |
1128 | 1143 | static MACHINE_START( homedata ) |
1129 | 1144 | { |
1130 | 1145 | homedata_state *state = machine.driver_data<homedata_state>(); |
r17586 | r17587 | |
1132 | 1147 | state->m_maincpu = machine.device("maincpu"); |
1133 | 1148 | state->m_audiocpu = machine.device("audiocpu"); |
1134 | 1149 | state->m_ym = machine.device("ymsnd"); |
1135 | | state->m_sn = machine.device("snsnd"); |
| 1150 | state->m_sn = machine.device<sn76489a_new_device>("snsnd"); |
1136 | 1151 | state->m_dac = machine.device<dac_device>("dac"); |
1137 | 1152 | |
1138 | 1153 | state->save_item(NAME(state->m_visible_page)); |
r17586 | r17587 | |
1265 | 1280 | /* sound hardware */ |
1266 | 1281 | MCFG_SPEAKER_STANDARD_MONO("mono") |
1267 | 1282 | |
1268 | | MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually |
| 1283 | MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 16000000/4) // SN76489AN actually |
1269 | 1284 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1285 | MCFG_SOUND_CONFIG(psg_intf) |
1270 | 1286 | |
1271 | 1287 | MCFG_DAC_ADD("dac") |
1272 | 1288 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
r17586 | r17587 | |
1384 | 1400 | /* sound hardware */ |
1385 | 1401 | MCFG_SPEAKER_STANDARD_MONO("mono") |
1386 | 1402 | |
1387 | | MCFG_SOUND_ADD("snsnd", SN76489A, 16000000/4) // SN76489AN actually |
| 1403 | MCFG_SOUND_ADD("snsnd", SN76489A_NEW, 16000000/4) // SN76489AN actually |
1388 | 1404 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1405 | MCFG_SOUND_CONFIG(psg_intf) |
1389 | 1406 | |
1390 | 1407 | MCFG_DAC_ADD("dac") |
1391 | 1408 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |