Esempio n. 1
0
        public override void Write(int _fullAddress, byte _val, bool _internal)
        {
            byte xval = Read(_fullAddress, true);

            base.Write(_fullAddress, _val, _internal);

            int ofs = _fullAddress - BaseAddress;

            ofs         %= 32;
            _fullAddress = BaseAddress + ofs;

            //  voices
            if ((ofs >= 0) && (ofs < 21))
            {
                int currVoice = 0;
                if (ofs >= 7)
                {
                    currVoice = 1;
                }
                if (ofs >= 14)
                {
                    currVoice = 2;
                }

                SIDVoice v = GetVoice(currVoice);
                v.Write(_fullAddress - BaseAddress, _val);
            }

            switch (_fullAddress)
            {
            case 0xd417:
            {
                FilterSettings = GetFilterSettings();
                break;
            }

            case 0xd418:
            {
                FilterSettings = GetFilterSettings();

                SetSIDVolume(FilterSettings.Volume);

                SIDVoice v = GetVoice(2);
                v.Mute = FilterSettings.Voice3Muted;

                break;
            }
            }
        }