Esempio n. 1
0
        public void PortWrite(ushort in_address, byte in_byte)
        {
            switch (in_address & 0x0f)
            {
            case 0:
            case 1:
                TVCManagers.Default.AudioManager.AdvanceChannel(m_SN76489_audio_channel_index, m_tvcomputer.GetCPUTicks());
                m_SN76489.WriteRegister(in_byte);
                break;

            case 2:
                TVCManagers.Default.AudioManager.AdvanceChannel(m_SAA1099_audio_channel_index, m_tvcomputer.GetCPUTicks());
                m_SAA1099.WriteControlRegister(in_byte);
                break;

            case 3:
                TVCManagers.Default.AudioManager.AdvanceChannel(m_SAA1099_audio_channel_index, m_tvcomputer.GetCPUTicks());
                m_SAA1099.WriteAddressRegister(in_byte);
                break;

            case 4:
            case 5:
                break;

            case 6:
            case 7:
                m_page_register = in_byte;
                break;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Z80 port write routine
        /// </summary>
        /// <param name="in_address"></param>
        /// <param name="in_byte"></param>
        public void PortWrite(ushort in_address, byte in_byte)
        {
            switch (in_address & 0x0f)
            {
            case SOUND_REGISTER:
                TVCManagers.Default.AudioManager.AdvanceChannel(m_audio_channel_index, m_tvcomputer.GetCPUTicks());
                m_sound_chip.WriteRegister(in_byte);
                break;

            case PAGE_REGISTER:
                m_current_page_address = (UInt16)((in_byte & PAGE_ADDRESS_MASK) << 13);
                m_sound_chip_enable    = (in_byte & SOUND_ENABLE_MASK) != 0;
                break;
            }
        }