src/emu/sound/sn76496.c
| r15506 | r15507 | |
| 111 | 111 | * Test the NCR7496; Smspower says the whitenoise taps are A and E, |
| 112 | 112 | but this needs verification on real hardware. |
| 113 | 113 | * Factor out common code so that the SAA1099 can share some code. |
| 114 | | * Convert to modern device |
| 114 | |
| 115 | 115 | ***************************************************************************/ |
| 116 | 116 | |
| 117 | 117 | #include "emu.h" |
| r15506 | r15507 | |
| 613 | 613 | DEFINE_LEGACY_SOUND_DEVICE(NCR7496, ncr7496); |
| 614 | 614 | DEFINE_LEGACY_SOUND_DEVICE(GAMEGEAR, gamegear); |
| 615 | 615 | DEFINE_LEGACY_SOUND_DEVICE(SEGAPSG, segapsg); |
| 616 | |
| 617 | /***************************************************************** |
| 618 | New class implementation |
| 619 | Michael Zapf, June 2012 |
| 620 | *****************************************************************/ |
| 621 | |
| 622 | sn76496_base_device::sn76496_base_device(const machine_config &mconfig, device_type type, const char *name, |
| 623 | const char *tag, int feedbackmask, int noisetap1, int noisetap2, bool negate, bool stereo, int clockdivider, int freq0, |
| 624 | device_t *owner, UINT32 clock) |
| 625 | |
| 626 | : device_t(mconfig, type, name, tag, owner, clock), |
| 627 | device_sound_interface(mconfig, *this), |
| 628 | m_feedback_mask(feedbackmask), |
| 629 | m_whitenoise_tap1(noisetap1), |
| 630 | m_whitenoise_tap2(noisetap2), |
| 631 | m_negate(negate), |
| 632 | m_stereo(stereo), |
| 633 | m_clock_divider(clockdivider), |
| 634 | m_freq0_is_max(freq0) |
| 635 | { |
| 636 | } |
| 637 | |
| 638 | void sn76496_base_device::device_start() |
| 639 | { |
| 640 | int sample_rate = clock()/2; |
| 641 | int i; |
| 642 | double out; |
| 643 | int gain; |
| 644 | |
| 645 | const sn76496_config *conf = reinterpret_cast<const sn76496_config *>(static_config()); |
| 646 | m_ready.resolve(conf->ready, *this); |
| 647 | |
| 648 | m_sound = machine().sound().stream_alloc(*this, 0, (m_stereo? 2:1), sample_rate, this); |
| 649 | |
| 650 | for (i = 0; i < 4; i++) m_volume[i] = 0; |
| 651 | |
| 652 | m_last_register = 0; |
| 653 | for (i = 0; i < 8; i+=2) |
| 654 | { |
| 655 | m_register[i] = 0; |
| 656 | m_register[i + 1] = 0x0f; // volume = 0 |
| 657 | } |
| 658 | |
| 659 | for (i = 0; i < 4; i++) |
| 660 | { |
| 661 | m_output[i] = 0; |
| 662 | m_period[i] = 0; |
| 663 | m_count[i] = 0; |
| 664 | } |
| 665 | |
| 666 | m_RNG = m_feedback_mask; |
| 667 | m_output[3] = m_RNG & 1; |
| 668 | |
| 669 | m_cycles_to_ready = 1; // assume ready is not active immediately on init. is this correct? |
| 670 | m_stereo_mask = 0xFF; // all channels enabled |
| 671 | m_current_clock = m_clock_divider-1; |
| 672 | |
| 673 | // set gain |
| 674 | gain = 0; |
| 675 | |
| 676 | gain &= 0xff; |
| 677 | |
| 678 | // increase max output basing on gain (0.2 dB per step) |
| 679 | out = MAX_OUTPUT / 4; // four channels, each gets 1/4 of the total range |
| 680 | while (gain-- > 0) |
| 681 | out *= 1.023292992; // = (10 ^ (0.2/20)) |
| 682 | |
| 683 | // build volume table (2dB per step) |
| 684 | for (i = 0; i < 15; i++) |
| 685 | { |
| 686 | // limit volume to avoid clipping |
| 687 | if (out > MAX_OUTPUT / 4) m_vol_table[i] = MAX_OUTPUT / 4; |
| 688 | else m_vol_table[i] = out; |
| 689 | |
| 690 | out /= 1.258925412; /* = 10 ^ (2/20) = 2dB */ |
| 691 | } |
| 692 | m_vol_table[15] = 0; |
| 693 | |
| 694 | m_ready_state = true; |
| 695 | |
| 696 | register_for_save_states(); |
| 697 | } |
| 698 | |
| 699 | READ_LINE_MEMBER( sn76496_base_device::ready_r ) |
| 700 | { |
| 701 | m_sound->update(); |
| 702 | return (m_cycles_to_ready > 0)? FALSE : TRUE; |
| 703 | } |
| 704 | |
| 705 | WRITE8_MEMBER( sn76496_base_device::stereo_w ) |
| 706 | { |
| 707 | m_sound->update(); |
| 708 | if (m_stereo) m_stereo_mask = data; |
| 709 | else fatalerror("sn76496_base_device: Call to stereo write with mono chip!\n"); |
| 710 | } |
| 711 | |
| 712 | WRITE8_MEMBER( sn76496_base_device::write ) |
| 713 | { |
| 714 | int n, r, c; |
| 715 | |
| 716 | // update the output buffer before changing the registers |
| 717 | m_sound->update(); |
| 718 | |
| 719 | // set number of cycles until READY is active; this is always one |
| 720 | // 'sample', i.e. it equals the clock divider exactly; until the |
| 721 | // clock divider is fully supported, we delay until one sample has |
| 722 | // played. The fact that this below is '2' and not '1' is because |
| 723 | // of a ?race condition? in the mess crvision driver, where after |
| 724 | // any sample is played at all, no matter what, the cycles_to_ready |
| 725 | // ends up never being not ready, unless this value is greater than |
| 726 | // 1. Once the full clock divider stuff is written, this should no |
| 727 | // longer be an issue. |
| 728 | |
| 729 | m_cycles_to_ready = 2; |
| 730 | |
| 731 | if (data & 0x80) |
| 732 | { |
| 733 | r = (data & 0x70) >> 4; |
| 734 | m_last_register = r; |
| 735 | m_register[r] = (m_register[r] & 0x3f0) | (data & 0x0f); |
| 736 | } |
| 737 | else |
| 738 | { |
| 739 | r = m_last_register; |
| 740 | } |
| 741 | |
| 742 | c = r >> 1; |
| 743 | switch (r) |
| 744 | { |
| 745 | case 0: // tone 0: frequency |
| 746 | case 2: // tone 1: frequency |
| 747 | case 4: // tone 2: frequency |
| 748 | if ((data & 0x80) == 0) m_register[r] = (m_register[r] & 0x0f) | ((data & 0x3f) << 4); |
| 749 | if ((m_register[r] != 0) || (!m_freq0_is_max)) m_period[c] = m_register[r]; |
| 750 | else m_period[c] = 0x400; |
| 751 | |
| 752 | if (r == 4) |
| 753 | { |
| 754 | // update noise shift frequency |
| 755 | if ((m_register[6] & 0x03) == 0x03) m_period[3] = m_period[2]<<1; |
| 756 | } |
| 757 | break; |
| 758 | case 1: // tone 0: volume |
| 759 | case 3: // tone 1: volume |
| 760 | case 5: // tone 2: volume |
| 761 | case 7: // noise: volume |
| 762 | m_volume[c] = m_vol_table[data & 0x0f]; |
| 763 | if ((data & 0x80) == 0) m_register[r] = (m_register[r] & 0x3f0) | (data & 0x0f); |
| 764 | break; |
| 765 | case 6: // noise: frequency, mode |
| 766 | { |
| 767 | if ((data & 0x80) == 0) logerror("sn76496_base_device: write to reg 6 with bit 7 clear; data was %03x, new write is %02x! report this to LN!\n", m_register[6], data); |
| 768 | if ((data & 0x80) == 0) m_register[r] = (m_register[r] & 0x3f0) | (data & 0x0f); |
| 769 | n = m_register[6]; |
| 770 | // N/512,N/1024,N/2048,Tone #3 output |
| 771 | m_period[3] = ((n&3) == 3)? (m_period[2]<<1) : (1 << (5+(n&3))); |
| 772 | m_RNG = m_feedback_mask; |
| 773 | } |
| 774 | break; |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | inline bool sn76496_base_device::in_noise_mode() |
| 779 | { |
| 780 | return ((m_register[6] & 4)!=0); |
| 781 | } |
| 782 | |
| 783 | void sn76496_base_device::countdown_cycles() |
| 784 | { |
| 785 | if (m_cycles_to_ready > 0) |
| 786 | { |
| 787 | m_cycles_to_ready--; |
| 788 | if (m_ready_state==true) m_ready(CLEAR_LINE); |
| 789 | m_ready_state = false; |
| 790 | } |
| 791 | else |
| 792 | { |
| 793 | if (m_ready_state==false) m_ready(ASSERT_LINE); |
| 794 | m_ready_state = true; |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | void sn76496_base_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| 799 | { |
| 800 | int i; |
| 801 | stream_sample_t *lbuffer = outputs[0]; |
| 802 | stream_sample_t *rbuffer = (m_stereo)? outputs[1] : NULL; |
| 803 | |
| 804 | INT16 out = 0; |
| 805 | INT16 out2 = 0; |
| 806 | |
| 807 | while (samples > 0) |
| 808 | { |
| 809 | // clock chip once |
| 810 | if (m_current_clock > 0) // not ready for new divided clock |
| 811 | { |
| 812 | m_current_clock--; |
| 813 | } |
| 814 | else // ready for new divided clock, make a new sample |
| 815 | { |
| 816 | m_current_clock = m_clock_divider-1; |
| 817 | // decrement Cycles to READY by one |
| 818 | countdown_cycles(); |
| 819 | |
| 820 | // handle channels 0,1,2 |
| 821 | for (i = 0; i < 3; i++) |
| 822 | { |
| 823 | m_count[i]--; |
| 824 | if (m_count[i] <= 0) |
| 825 | { |
| 826 | m_output[i] ^= 1; |
| 827 | m_count[i] = m_period[i]; |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | // handle channel 3 |
| 832 | m_count[3]--; |
| 833 | if (m_count[3] <= 0) |
| 834 | { |
| 835 | // if noisemode is 1, both taps are enabled |
| 836 | // if noisemode is 0, the lower tap, whitenoisetap2, is held at 0 |
| 837 | if (((m_RNG & m_whitenoise_tap1)!=0) != (((m_RNG & m_whitenoise_tap2)!=0) && in_noise_mode())) |
| 838 | { |
| 839 | m_RNG >>= 1; |
| 840 | m_RNG |= m_feedback_mask; |
| 841 | } |
| 842 | else |
| 843 | { |
| 844 | m_RNG >>= 1; |
| 845 | } |
| 846 | m_output[3] = m_RNG & 1; |
| 847 | |
| 848 | m_count[3] = m_period[3]; |
| 849 | } |
| 850 | } |
| 851 | |
| 852 | if (m_stereo) |
| 853 | { |
| 854 | out = ((((m_stereo_mask & 0x10)!=0) && (m_output[0]!=0))? m_volume[0] : 0) |
| 855 | + ((((m_stereo_mask & 0x20)!=0) && (m_output[1]!=0))? m_volume[1] : 0) |
| 856 | + ((((m_stereo_mask & 0x40)!=0) && (m_output[2]!=0))? m_volume[2] : 0) |
| 857 | + ((((m_stereo_mask & 0x80)!=0) && (m_output[3]!=0))? m_volume[3] : 0); |
| 858 | |
| 859 | out2= ((((m_stereo_mask & 0x1)!=0) && (m_output[0]!=0))? m_volume[0] : 0) |
| 860 | + ((((m_stereo_mask & 0x2)!=0) && (m_output[1]!=0))? m_volume[1] : 0) |
| 861 | + ((((m_stereo_mask & 0x4)!=0) && (m_output[2]!=0))? m_volume[2] : 0) |
| 862 | + ((((m_stereo_mask & 0x8)!=0) && (m_output[3]!=0))? m_volume[3] : 0); |
| 863 | } |
| 864 | else |
| 865 | { |
| 866 | out= ((m_output[0]!=0)? m_volume[0]:0) |
| 867 | +((m_output[1]!=0)? m_volume[1]:0) |
| 868 | +((m_output[2]!=0)? m_volume[2]:0) |
| 869 | +((m_output[3]!=0)? m_volume[3]:0); |
| 870 | } |
| 871 | |
| 872 | if (m_negate) { out = -out; out2 = -out2; } |
| 873 | |
| 874 | *(lbuffer++) = out; |
| 875 | if (m_stereo) *(rbuffer++) = out2; |
| 876 | samples--; |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | void sn76496_base_device::register_for_save_states() |
| 881 | { |
| 882 | save_item(NAME(m_vol_table)); |
| 883 | save_item(NAME(m_register)); |
| 884 | save_item(NAME(m_last_register)); |
| 885 | save_item(NAME(m_volume)); |
| 886 | save_item(NAME(m_RNG)); |
| 887 | // save_item(NAME(m_clock_divider)); |
| 888 | save_item(NAME(m_current_clock)); |
| 889 | // save_item(NAME(m_feedback_mask)); |
| 890 | // save_item(NAME(m_whitenoise_tap1)); |
| 891 | // save_item(NAME(m_whitenoise_tap2)); |
| 892 | // save_item(NAME(m_negate)); |
| 893 | // save_item(NAME(m_stereo)); |
| 894 | save_item(NAME(m_stereo_mask)); |
| 895 | save_item(NAME(m_period)); |
| 896 | save_item(NAME(m_count)); |
| 897 | save_item(NAME(m_output)); |
| 898 | save_item(NAME(m_cycles_to_ready)); |
| 899 | // save_item(NAME(m_freq0_is_max)); |
| 900 | } |
| 901 | |
| 902 | const device_type SN76496N = &device_creator<sn76496n_device>; |
| 903 | const device_type U8106N = &device_creator<u8106n_device>; |
| 904 | const device_type Y2404N = &device_creator<y2404n_device>; |
| 905 | const device_type SN76489N = &device_creator<sn76489n_device>; |
| 906 | const device_type SN76489AN = &device_creator<sn76489an_device>; |
| 907 | const device_type SN76494N = &device_creator<sn76494n_device>; |
| 908 | const device_type SN94624N = &device_creator<sn94624n_device>; |
| 909 | const device_type NCR7496N = &device_creator<ncr7496n_device>; |
| 910 | const device_type GAMEGEARN = &device_creator<gamegearn_device>; |
| 911 | const device_type SEGAPSGN = &device_creator<segapsgn_device>; |
| 912 | |
src/emu/sound/sn76496.h
| r15506 | r15507 | |
| 20 | 20 | DECLARE_LEGACY_SOUND_DEVICE(GAMEGEAR, gamegear); |
| 21 | 21 | DECLARE_LEGACY_SOUND_DEVICE(SEGAPSG, segapsg); |
| 22 | 22 | |
| 23 | /***************************************************************** |
| 24 | New class implementation |
| 25 | Michael Zapf, June 2012 |
| 26 | *****************************************************************/ |
| 27 | |
| 28 | extern const device_type SN76496N; |
| 29 | extern const device_type U8106N; |
| 30 | extern const device_type Y2404N; |
| 31 | extern const device_type SN76489N; |
| 32 | extern const device_type SN76489AN; |
| 33 | extern const device_type SN76494N; |
| 34 | extern const device_type SN94624N; |
| 35 | extern const device_type NCR7496N; |
| 36 | extern const device_type GAMEGEARN; |
| 37 | extern const device_type SEGAPSGN; |
| 38 | |
| 39 | typedef struct _sn76496_config |
| 40 | { |
| 41 | devcb_write_line ready; |
| 42 | } sn76496_config; |
| 43 | |
| 44 | class sn76496_base_device : public device_t, public device_sound_interface |
| 45 | { |
| 46 | public: |
| 47 | sn76496_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, |
| 48 | int feedbackmask, int noisetap1, int noisetap2, bool negate, bool stereo, int clockdivider, int freq0, |
| 49 | device_t *owner, UINT32 clock); |
| 50 | DECLARE_READ_LINE_MEMBER( ready_r ); |
| 51 | DECLARE_WRITE8_MEMBER( stereo_w ); |
| 52 | DECLARE_WRITE8_MEMBER( write ); |
| 53 | |
| 54 | protected: |
| 55 | void device_start(); |
| 56 | void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); |
| 57 | |
| 58 | private: |
| 59 | inline bool in_noise_mode(); |
| 60 | void register_for_save_states(); |
| 61 | void countdown_cycles(); |
| 62 | |
| 63 | bool m_ready_state; |
| 64 | |
| 65 | devcb_resolved_write_line m_ready; |
| 66 | |
| 67 | sound_stream* m_sound; |
| 68 | |
| 69 | const INT32 m_feedback_mask; // mask for feedback |
| 70 | const INT32 m_whitenoise_tap1; // mask for white noise tap 1 (higher one, usually bit 14) |
| 71 | const INT32 m_whitenoise_tap2; // mask for white noise tap 2 (lower one, usually bit 13) |
| 72 | const bool m_negate; // output negate flag |
| 73 | const bool m_stereo; // whether we're dealing with stereo or not |
| 74 | const INT32 m_clock_divider; // clock divider |
| 75 | const bool m_freq0_is_max; // flag for if frequency zero acts as if it is one more than max (0x3ff+1) or if it acts like 0 |
| 76 | |
| 77 | INT32 m_vol_table[16]; // volume table (for 4-bit to db conversion) |
| 78 | INT32 m_register[8]; // registers |
| 79 | INT32 m_last_register; // last register written |
| 80 | INT32 m_volume[4]; // db volume of voice 0-2 and noise |
| 81 | UINT32 m_RNG; // noise generator LFSR |
| 82 | INT32 m_current_clock; |
| 83 | INT32 m_stereo_mask; // the stereo output mask |
| 84 | INT32 m_period[4]; // Length of 1/2 of waveform |
| 85 | INT32 m_count[4]; // Position within the waveform |
| 86 | INT32 m_output[4]; // 1-bit output of each channel, pre-volume |
| 87 | INT32 m_cycles_to_ready; // number of cycles until the READY line goes active |
| 88 | }; |
| 89 | |
| 90 | // SN76496: Whitenoise verified, phase verified, periodic verified (by Michael Zapf) |
| 91 | class sn76496n_device : public sn76496_base_device |
| 92 | { |
| 93 | public: |
| 94 | sn76496n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 95 | : sn76496_base_device(mconfig, SN76496N, "SN76496N", tag, 0x10000, 0x04, 0x08, false, false, 8, true, owner, clock) |
| 96 | { } |
| 97 | }; |
| 98 | |
| 99 | // U8106 not verified yet. todo: verify; (a custom marked sn76489? only used on mr. do and maybe other universal games) |
| 100 | class u8106n_device : public sn76496_base_device |
| 101 | { |
| 102 | public: |
| 103 | u8106n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 104 | : sn76496_base_device(mconfig, U8106N, "U8106N", tag, 0x4000, 0x01, 0x02, true, false, 8, true, owner, clock) |
| 105 | { } |
| 106 | }; |
| 107 | |
| 108 | // Y2404 not verified yet. todo: verify; (don't be fooled by the Y, it's a TI chip, not Yamaha) |
| 109 | class y2404n_device : public sn76496_base_device |
| 110 | { |
| 111 | public: |
| 112 | y2404n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 113 | : sn76496_base_device(mconfig, Y2404N, "Y2404N", tag, 0x10000, 0x04, 0x08, false, false, 8, true, owner, clock) |
| 114 | { } |
| 115 | }; |
| 116 | |
| 117 | // SN76489 not verified yet. todo: verify; |
| 118 | class sn76489n_device : public sn76496_base_device |
| 119 | { |
| 120 | public: |
| 121 | sn76489n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 122 | : sn76496_base_device(mconfig, SN76489N, "SN76489N", tag, 0x4000, 0x01, 0x02, true, false, 8, true, owner, clock) |
| 123 | { } |
| 124 | }; |
| 125 | |
| 126 | // SN76489A: whitenoise verified, phase verified, periodic verified (by plgdavid) |
| 127 | class sn76489an_device : public sn76496_base_device |
| 128 | { |
| 129 | public: |
| 130 | sn76489an_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 131 | : sn76496_base_device(mconfig, SN76489AN, "SN76489AN", tag, 0x10000, 0x04, 0x08, false, false, 8, true, owner, clock) |
| 132 | { } |
| 133 | }; |
| 134 | |
| 135 | // SN76494 not verified, (according to datasheet: same as sn76489a but without the /8 divider) |
| 136 | class sn76494n_device : public sn76496_base_device |
| 137 | { |
| 138 | public: |
| 139 | sn76494n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 140 | : sn76496_base_device(mconfig, SN76494N, "SN76494N", tag, 0x10000, 0x04, 0x08, false, false, 1, true, owner, clock) |
| 141 | { } |
| 142 | }; |
| 143 | |
| 144 | // SN94624 whitenoise verified, phase verified, period verified; verified by PlgDavid |
| 145 | class sn94624n_device : public sn76496_base_device |
| 146 | { |
| 147 | public: |
| 148 | sn94624n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 149 | : sn76496_base_device(mconfig, SN94624N, "SN94624N", tag, 0x4000, 0x01, 0x02, true, false, 1, true, owner, clock) |
| 150 | { } |
| 151 | }; |
| 152 | |
| 153 | // NCR7496 not verified; info from smspower wiki |
| 154 | class ncr7496n_device : public sn76496_base_device |
| 155 | { |
| 156 | public: |
| 157 | ncr7496n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 158 | : sn76496_base_device(mconfig, NCR7496N, "NCR7496N", tag, 0x8000, 0x02, 0x20, false, false, 8, true, owner, clock) |
| 159 | { } |
| 160 | }; |
| 161 | |
| 162 | // Verified by Justin Kerk |
| 163 | class gamegearn_device : public sn76496_base_device |
| 164 | { |
| 165 | public: |
| 166 | gamegearn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 167 | : sn76496_base_device(mconfig, GAMEGEARN, "Game Gear PSGN", tag, 0x8000, 0x01, 0x08, true, true, 8, false, owner, clock) |
| 168 | { } |
| 169 | }; |
| 170 | |
| 171 | // todo: verify; from smspower wiki, assumed to have same invert as gamegear |
| 172 | class segapsgn_device : public sn76496_base_device |
| 173 | { |
| 174 | public: |
| 175 | segapsgn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 176 | : sn76496_base_device(mconfig, SEGAPSGN, "SEGA VDP PSGN", tag, 0x8000, 0x01, 0x08, true, false, 8, false, owner, clock) |
| 177 | { } |
| 178 | }; |
| 179 | |
| 23 | 180 | #endif /* __SN76496_H__ */ |
src/mess/machine/ti99/videowrp.c
| r15506 | r15507 | |
| 177 | 177 | |
| 178 | 178 | /**************************************************************************/ |
| 179 | 179 | |
| 180 | | // TODO: Should propagate READY to the system. However, READY is implemented |
| 181 | | // to be read instead of pushing the level. |
| 182 | | |
| 183 | | ti_sound_system_device::ti_sound_system_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 184 | | : bus8z_device(mconfig, TISOUND, "TI sound chip wrapper", tag, owner, clock) |
| 180 | /* |
| 181 | Sound subsystem. |
| 182 | TODO: Seriously consider to simplify this by connecting to the datamux |
| 183 | directly. We don't do anything reasonable here. |
| 184 | */ |
| 185 | static const sn76496_config sound_config = |
| 185 | 186 | { |
| 186 | | } |
| 187 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ti_sound_system_device, sound_ready), |
| 188 | }; |
| 187 | 189 | |
| 188 | 190 | WRITE8_MEMBER( ti_sound_system_device::write ) |
| 189 | 191 | { |
| 190 | | sn76496_w(m_sound_chip, offset, data); |
| 192 | m_sound_chip->write(space, 0, data); |
| 191 | 193 | } |
| 192 | 194 | |
| 193 | 195 | void ti_sound_system_device::device_start(void) |
| 194 | 196 | { |
| 195 | | m_sound_chip = machine().device(TISOUNDCHIP_TAG); |
| 197 | const ti_sound_config *conf = reinterpret_cast<const ti_sound_config *>(static_config()); |
| 198 | m_console_ready.resolve(conf->ready, *this); |
| 199 | m_sound_chip = subdevice<sn76496_base_device>(TISOUNDCHIP_TAG); |
| 196 | 200 | } |
| 197 | 201 | |
| 202 | WRITE_LINE_MEMBER( ti_sound_system_device::sound_ready ) |
| 203 | { |
| 204 | m_console_ready(state); |
| 205 | } |
| 206 | |
| 207 | MACHINE_CONFIG_FRAGMENT( sn94624 ) |
| 208 | MCFG_SPEAKER_STANDARD_MONO("sound_out") |
| 209 | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624N, 3579545/8) /* 3.579545 MHz */ |
| 210 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75) |
| 211 | MCFG_SOUND_CONFIG(sound_config) |
| 212 | MACHINE_CONFIG_END |
| 213 | |
| 214 | MACHINE_CONFIG_FRAGMENT( sn76496 ) |
| 215 | MCFG_SPEAKER_STANDARD_MONO("sound_out") |
| 216 | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496N, 3579545) /* 3.579545 MHz */ |
| 217 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "sound_out", 0.75) |
| 218 | MCFG_SOUND_CONFIG(sound_config) |
| 219 | MACHINE_CONFIG_END |
| 220 | |
| 221 | machine_config_constructor ti_sound_sn94624_device::device_mconfig_additions() const |
| 222 | { |
| 223 | return MACHINE_CONFIG_NAME( sn94624 ); |
| 224 | } |
| 225 | |
| 226 | machine_config_constructor ti_sound_sn76496_device::device_mconfig_additions() const |
| 227 | { |
| 228 | return MACHINE_CONFIG_NAME( sn76496 ); |
| 229 | } |
| 230 | |
| 198 | 231 | /**************************************************************************/ |
| 199 | 232 | |
| 200 | 233 | const device_type TI99VIDEO = &device_creator<ti_std_video_device>; |
| 201 | 234 | const device_type V9938VIDEO = &device_creator<ti_exp_video_device>; |
| 202 | | const device_type TISOUND = &device_creator<ti_sound_system_device>; |
| 235 | const device_type TISOUND_94624 = &device_creator<ti_sound_sn94624_device>; |
| 236 | const device_type TISOUND_76496 = &device_creator<ti_sound_sn76496_device>; |
src/mess/machine/ti99/videowrp.h
| r15506 | r15507 | |
| 15 | 15 | #include "video/tms9928a.h" |
| 16 | 16 | #include "video/v9938.h" |
| 17 | 17 | #include "ti99defs.h" |
| 18 | #include "sound/sn76496.h" |
| 18 | 19 | |
| 19 | 20 | class ti_video_device : public bus8z_device |
| 20 | 21 | { |
| r15506 | r15507 | |
| 59 | 60 | v9938_device *m_v9938; |
| 60 | 61 | }; |
| 61 | 62 | |
| 63 | extern const device_type TI99VIDEO; |
| 64 | extern const device_type V9938VIDEO; |
| 65 | |
| 66 | /****************************************************************************/ |
| 62 | 67 | /* |
| 63 | | Sound device wrapper (required until sn74296 is converted to a modern device); |
| 64 | | let's hitchhike here - it is not required to create yet another file |
| 65 | | that will be dropped later. |
| 68 | Sound device |
| 66 | 69 | */ |
| 70 | |
| 71 | extern const device_type TISOUND_94624; |
| 72 | extern const device_type TISOUND_76496; |
| 73 | |
| 74 | typedef struct _ti_sound_config |
| 75 | { |
| 76 | devcb_write_line ready; |
| 77 | } ti_sound_config; |
| 78 | |
| 79 | #define TI_SOUND_CONFIG(name) \ |
| 80 | const ti_sound_config(name) = |
| 81 | |
| 67 | 82 | class ti_sound_system_device : public bus8z_device |
| 68 | 83 | { |
| 69 | 84 | public: |
| 70 | | ti_sound_system_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 85 | ti_sound_system_device(const machine_config &mconfig, device_type type, const char *tag, const char *name, device_t *owner, UINT32 clock) |
| 86 | : bus8z_device(mconfig, type, name, tag, owner, clock) { }; |
| 87 | |
| 71 | 88 | // Cannot read from sound; just ignore silently |
| 72 | 89 | DECLARE_READ8Z_MEMBER(readz) { }; |
| 73 | 90 | DECLARE_WRITE8_MEMBER(write); |
| 91 | DECLARE_WRITE_LINE_MEMBER( sound_ready ); // connect to console READY |
| 74 | 92 | |
| 75 | 93 | protected: |
| 76 | 94 | void device_start(void); |
| 95 | virtual machine_config_constructor device_mconfig_additions() const =0; |
| 77 | 96 | |
| 78 | 97 | private: |
| 79 | | device_t *m_sound_chip; |
| 98 | sn76496_base_device* m_sound_chip; |
| 99 | devcb_resolved_write_line m_console_ready; |
| 80 | 100 | }; |
| 81 | 101 | |
| 102 | /* |
| 103 | The version that sits in the TI-99/4A |
| 104 | */ |
| 105 | class ti_sound_sn94624_device : public ti_sound_system_device |
| 106 | { |
| 107 | public: |
| 108 | ti_sound_sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 109 | : ti_sound_system_device(mconfig, TISOUND_94624, tag, "Onboard sound (SN94624)", owner, clock) { } |
| 110 | |
| 111 | protected: |
| 112 | machine_config_constructor device_mconfig_additions() const; |
| 113 | }; |
| 114 | |
| 115 | /* |
| 116 | The version that sits in the TI-99/8 and Geneve |
| 117 | */ |
| 118 | class ti_sound_sn76496_device : public ti_sound_system_device |
| 119 | { |
| 120 | public: |
| 121 | ti_sound_sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 122 | : ti_sound_system_device(mconfig, TISOUND_76496, tag, "Onboard sound (SN76496)", owner, clock) { } |
| 123 | |
| 124 | protected: |
| 125 | machine_config_constructor device_mconfig_additions() const; |
| 126 | }; |
| 127 | |
| 128 | |
| 82 | 129 | /****************************************************************************/ |
| 83 | 130 | |
| 84 | 131 | #define MCFG_TI_TMS991x_ADD_NTSC(_tag, _chip, _tmsparam) \ |
| r15506 | r15507 | |
| 118 | 165 | MCFG_PALETTE_LENGTH(512) \ |
| 119 | 166 | MCFG_PALETTE_INIT(v9938) |
| 120 | 167 | |
| 121 | | #define MCFG_TI_SOUND_ADD(_tag) \ |
| 122 | | MCFG_DEVICE_ADD(_tag, TISOUND, 0) |
| 168 | #define MCFG_TI_SOUND_94624_ADD(_tag, _conf) \ |
| 169 | MCFG_DEVICE_ADD(_tag, TISOUND_94624, 0) \ |
| 170 | MCFG_DEVICE_CONFIG( _conf ) |
| 123 | 171 | |
| 124 | | extern const device_type TI99VIDEO; |
| 125 | | extern const device_type V9938VIDEO; |
| 126 | | extern const device_type TISOUND; |
| 172 | #define MCFG_TI_SOUND_76496_ADD(_tag, _conf) \ |
| 173 | MCFG_DEVICE_ADD(_tag, TISOUND_76496, 0) \ |
| 174 | MCFG_DEVICE_CONFIG( _conf ) |
| 127 | 175 | |
| 128 | 176 | #endif /* __TIVIDEO__ */ |
| 129 | 177 | |
src/mess/drivers/ti99_8.c
| r15506 | r15507 | |
| 797 | 797 | NO_OVERFLOW_INT |
| 798 | 798 | }; |
| 799 | 799 | |
| 800 | static TI_SOUND_CONFIG( sound_conf ) |
| 801 | { |
| 802 | DEVCB_DRIVER_LINE_MEMBER(ti99_8, console_ready) // READY |
| 803 | }; |
| 804 | |
| 800 | 805 | /* |
| 801 | 806 | Format: |
| 802 | 807 | Name, mode, stop, mask, select, write, read8z function, write8 function |
| r15506 | r15507 | |
| 960 | 965 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 961 | 966 | |
| 962 | 967 | /* Sound hardware */ |
| 963 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 964 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */ |
| 965 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 966 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 968 | MCFG_TI_SOUND_76496_ADD( TISOUND_TAG, sound_conf ) |
| 967 | 969 | |
| 968 | 970 | /* Cassette drives */ |
| 971 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 969 | 972 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 970 | 973 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 971 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 974 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 972 | 975 | |
| 973 | 976 | /* Console GROMs */ |
| 974 | 977 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
| r15506 | r15507 | |
| 1007 | 1010 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 1008 | 1011 | |
| 1009 | 1012 | /* Sound hardware */ |
| 1010 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1011 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */ |
| 1012 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 1013 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 1013 | MCFG_TI_SOUND_76496_ADD( TISOUND_TAG, sound_conf ) |
| 1014 | 1014 | |
| 1015 | 1015 | /* Cassette drives */ |
| 1016 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 1016 | 1017 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 1017 | 1018 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 1018 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1019 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 1019 | 1020 | |
| 1020 | 1021 | /* Console GROMs */ |
| 1021 | 1022 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
src/mess/drivers/ti99_4p.c
| r15506 | r15507 | |
| 39 | 39 | #include "cpu/tms9900/tms9900.h" |
| 40 | 40 | #include "sound/wave.h" |
| 41 | 41 | #include "sound/dac.h" |
| 42 | | #include "sound/sn76496.h" |
| 43 | 42 | |
| 44 | 43 | #include "machine/tms9901.h" |
| 45 | 44 | #include "machine/ti99/peribox.h" |
| r15506 | r15507 | |
| 64 | 63 | : driver_device(mconfig, type, tag) { } |
| 65 | 64 | |
| 66 | 65 | DECLARE_WRITE_LINE_MEMBER( console_ready ); |
| 66 | DECLARE_WRITE_LINE_MEMBER( console_ready_dmux ); |
| 67 | |
| 67 | 68 | DECLARE_WRITE_LINE_MEMBER( extint ); |
| 68 | 69 | DECLARE_WRITE_LINE_MEMBER( notconnected ); |
| 69 | 70 | DECLARE_READ8_MEMBER( interrupt_level ); |
| r15506 | r15507 | |
| 120 | 121 | UINT16 *m_scratchpad; |
| 121 | 122 | |
| 122 | 123 | // READY line |
| 123 | | bool m_ready_line, m_ready_line1; |
| 124 | int m_ready_line, m_ready_line_dmux; |
| 124 | 125 | |
| 125 | 126 | private: |
| 126 | 127 | DECLARE_READ16_MEMBER( datamux_read ); |
| r15506 | r15507 | |
| 152 | 153 | UINT8 m_highbyte; |
| 153 | 154 | UINT8 m_latch; |
| 154 | 155 | |
| 155 | | /* Mapper registers */ |
| 156 | // Mapper registers |
| 156 | 157 | UINT8 m_mapper[16]; |
| 158 | |
| 159 | int m_ready_prev; // for debugging purposes only |
| 160 | |
| 157 | 161 | }; |
| 158 | 162 | |
| 159 | 163 | static ADDRESS_MAP_START(memmap, AS_PROGRAM, 16, ti99_4p) |
| r15506 | r15507 | |
| 431 | 435 | if (clock==ASSERT_LINE && m_waitcount!=0) |
| 432 | 436 | { |
| 433 | 437 | m_waitcount--; |
| 434 | | if (m_waitcount==0) console_ready(ASSERT_LINE); |
| 438 | if (m_waitcount==0) console_ready_dmux(ASSERT_LINE); |
| 435 | 439 | } |
| 436 | 440 | } |
| 437 | 441 | |
| r15506 | r15507 | |
| 452 | 456 | |
| 453 | 457 | // Insert four wait states and let CPU enter wait state |
| 454 | 458 | m_waitcount = 6; |
| 455 | | console_ready(CLEAR_LINE); |
| 459 | console_ready_dmux(CLEAR_LINE); |
| 456 | 460 | |
| 457 | 461 | return (hbyte<<8) | m_latch ; |
| 458 | 462 | } |
| r15506 | r15507 | |
| 486 | 490 | |
| 487 | 491 | // Insert four wait states and let CPU enter wait state |
| 488 | 492 | m_waitcount = 6; |
| 489 | | console_ready(CLEAR_LINE); |
| 493 | console_ready_dmux(CLEAR_LINE); |
| 490 | 494 | } |
| 491 | 495 | |
| 492 | 496 | /*************************************************************************** |
| r15506 | r15507 | |
| 720 | 724 | */ |
| 721 | 725 | WRITE_LINE_MEMBER( ti99_4p::console_ready ) |
| 722 | 726 | { |
| 723 | | if (VERBOSE>6) LOG("ti99_4p: READY level = %02x\n", state); |
| 724 | 727 | m_ready_line = state; |
| 728 | int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; |
| 725 | 729 | |
| 726 | | m_cpu->set_ready((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); |
| 730 | if (VERBOSE>6) |
| 731 | { |
| 732 | if (m_ready_prev != combined) LOG("ti99_4p: READY level = %d\n", combined); |
| 733 | } |
| 734 | m_ready_prev = combined; |
| 735 | m_cpu->set_ready(combined); |
| 727 | 736 | } |
| 728 | 737 | |
| 738 | /* |
| 739 | The exception of the above rule. Memory access over the datamux also operates |
| 740 | the READY line, and the datamux raises READY depending on the clock pulse. |
| 741 | So we must make sure this does not interfere. |
| 742 | */ |
| 743 | WRITE_LINE_MEMBER( ti99_4p::console_ready_dmux ) |
| 744 | { |
| 745 | m_ready_line_dmux = state; |
| 746 | int combined = (m_ready_line == ASSERT_LINE && m_ready_line_dmux == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE; |
| 747 | |
| 748 | if (VERBOSE>7) |
| 749 | { |
| 750 | if (m_ready_prev != combined) LOG("ti99_4p: READY dmux level = %d\n", state); |
| 751 | } |
| 752 | m_ready_prev = combined; |
| 753 | m_cpu->set_ready(combined); |
| 754 | } |
| 755 | |
| 756 | |
| 729 | 757 | WRITE_LINE_MEMBER( ti99_4p::extint ) |
| 730 | 758 | { |
| 731 | 759 | if (VERBOSE>6) LOG("ti99_4p: EXTINT level = %02x\n", state); |
| r15506 | r15507 | |
| 804 | 832 | driver->m_peribox->senila(CLEAR_LINE); |
| 805 | 833 | driver->m_peribox->senilb(CLEAR_LINE); |
| 806 | 834 | |
| 807 | | driver->m_ready_line = driver->m_ready_line1 = ASSERT_LINE; |
| 835 | driver->m_ready_line = driver->m_ready_line_dmux = ASSERT_LINE; |
| 808 | 836 | |
| 809 | 837 | UINT16 *rom = (UINT16*)(*machine.root_device().memregion("maincpu")); |
| 810 | 838 | driver->m_rom0 = rom + 0x2000; |
| r15506 | r15507 | |
| 821 | 849 | m_tms9901->set_single_int(2, state); |
| 822 | 850 | } |
| 823 | 851 | |
| 852 | static TI_SOUND_CONFIG( sound_conf ) |
| 853 | { |
| 854 | DEVCB_DRIVER_LINE_MEMBER(ti99_4p, console_ready) // READY |
| 855 | }; |
| 856 | |
| 824 | 857 | /* |
| 825 | 858 | Reset the machine. |
| 826 | 859 | */ |
| r15506 | r15507 | |
| 863 | 896 | MCFG_PERIBOX_SG_ADD( PERIBOX_TAG, peribox_conf ) |
| 864 | 897 | |
| 865 | 898 | /* sound hardware */ |
| 866 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 867 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 868 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 869 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 899 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 870 | 900 | |
| 871 | 901 | /* Cassette drives */ |
| 902 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 872 | 903 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 873 | 904 | |
| 874 | 905 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 875 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 906 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 876 | 907 | MACHINE_CONFIG_END |
| 877 | 908 | |
| 878 | 909 | |
src/mess/drivers/ti99_4x.c
| r15506 | r15507 | |
| 40 | 40 | |
| 41 | 41 | #include "emu.h" |
| 42 | 42 | #include "cpu/tms9900/tms9900.h" |
| 43 | | #include "sound/sn76496.h" |
| 44 | 43 | |
| 45 | 44 | #include "sound/wave.h" |
| 46 | 45 | #include "video/v9938.h" |
| r15506 | r15507 | |
| 364 | 363 | 0x70000 // Address bus prefix (AMA/AMB/AMC) |
| 365 | 364 | }; |
| 366 | 365 | |
| 366 | static TI_SOUND_CONFIG( sound_conf ) |
| 367 | { |
| 368 | DEVCB_DRIVER_LINE_MEMBER(ti99_4x, console_ready) // READY |
| 369 | }; |
| 370 | |
| 367 | 371 | READ8_MEMBER( ti99_4x::cruread ) |
| 368 | 372 | { |
| 369 | 373 | // if (VERBOSE>6) LOG("read access to CRU address %04x\n", offset << 4); |
| r15506 | r15507 | |
| 898 | 902 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 899 | 903 | |
| 900 | 904 | /* sound hardware */ |
| 901 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 902 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 903 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 904 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 905 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 905 | 906 | |
| 906 | 907 | /* Cassette drives */ |
| 908 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 907 | 909 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 908 | 910 | MCFG_CASSETTE_ADD( CASSETTE2_TAG, default_cassette_interface ) |
| 909 | 911 | |
| 910 | 912 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 911 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 913 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 912 | 914 | |
| 913 | 915 | /* GROM devices */ |
| 914 | 916 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
| r15506 | r15507 | |
| 944 | 946 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 945 | 947 | |
| 946 | 948 | /* sound hardware */ |
| 947 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 948 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 949 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 950 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 949 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 951 | 950 | |
| 952 | 951 | /* Cassette drives */ |
| 952 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 953 | 953 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 954 | 954 | MCFG_CASSETTE_ADD( CASSETTE2_TAG, default_cassette_interface ) |
| 955 | 955 | |
| 956 | 956 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 957 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 957 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 958 | 958 | |
| 959 | 959 | /* GROM devices */ |
| 960 | 960 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
| r15506 | r15507 | |
| 1023 | 1023 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 1024 | 1024 | |
| 1025 | 1025 | /* sound hardware */ |
| 1026 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1027 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 1028 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 1029 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 1026 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 1030 | 1027 | |
| 1031 | 1028 | /* Cassette drives */ |
| 1029 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 1032 | 1030 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 1033 | 1031 | MCFG_CASSETTE_ADD( CASSETTE2_TAG, default_cassette_interface ) |
| 1034 | 1032 | |
| 1035 | 1033 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 1036 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1034 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 1037 | 1035 | |
| 1038 | 1036 | /* GROM devices */ |
| 1039 | 1037 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
| r15506 | r15507 | |
| 1066 | 1064 | MCFG_PERIBOX_ADD( PERIBOX_TAG, peribox_conf ) |
| 1067 | 1065 | |
| 1068 | 1066 | /* sound hardware */ |
| 1069 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1070 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 1071 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 1072 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 1067 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 1073 | 1068 | |
| 1074 | 1069 | /* Cassette drives */ |
| 1070 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 1075 | 1071 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 1076 | 1072 | MCFG_CASSETTE_ADD( CASSETTE2_TAG, default_cassette_interface ) |
| 1077 | 1073 | |
| 1078 | 1074 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 1079 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1075 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 1080 | 1076 | |
| 1081 | 1077 | /* GROM devices */ |
| 1082 | 1078 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |
| r15506 | r15507 | |
| 1124 | 1120 | MCFG_PERIBOX_EV_ADD( PERIBOX_TAG, peribox_conf ) |
| 1125 | 1121 | |
| 1126 | 1122 | /* sound hardware */ |
| 1127 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1128 | | MCFG_SOUND_ADD(TISOUNDCHIP_TAG, SN94624, 3579545/8) /* 3.579545 MHz */ |
| 1129 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 1130 | | MCFG_TI_SOUND_ADD( TISOUND_TAG ) |
| 1123 | MCFG_TI_SOUND_94624_ADD( TISOUND_TAG, sound_conf ) |
| 1131 | 1124 | |
| 1132 | 1125 | /* Cassette drives */ |
| 1126 | MCFG_SPEAKER_STANDARD_MONO("cass_out") |
| 1133 | 1127 | MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface ) |
| 1134 | 1128 | MCFG_CASSETTE_ADD( CASSETTE2_TAG, default_cassette_interface ) |
| 1135 | 1129 | |
| 1136 | 1130 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 1137 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1131 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) |
| 1138 | 1132 | |
| 1139 | 1133 | /* GROM devices */ |
| 1140 | 1134 | MCFG_GROM_ADD( GROM0_TAG, grom0_config ) |