Exemple #1
0
        SIDRenderer the_renderer; // Reference to current renderer

        #endregion Fields

        #region Constructors

        public MOS6581(C64 c64)
        {
            the_c64 = c64;
            the_renderer = null;
            for (int i = 0; i < regs.Length; i++)
                regs[i] = 0;

            // Open the renderer
            open_close_renderer(SIDType.SIDTYPE_NONE, GlobalPrefs.ThePrefs.SIDType);
        }
Exemple #2
0
        private void open_close_renderer(SIDType old_type, SIDType new_type)
        {
            if (old_type == new_type)
                return;

            the_renderer = null;

            // Create new renderer
            if (new_type == SIDType.SIDTYPE_DIGITAL)
                the_renderer = new DigitalRenderer();
            else
                the_renderer = null;

            // Stuff the current register values into the new renderer
            if (the_renderer != null)
                for (UInt16 i = 0; i < 25; i++)
                    the_renderer.WriteRegister(i, regs[i]);
        }