Beispiel #1
0
        fm_operator <RegisterType, RegisterType_OPS> [] m_operator = new fm_operator <RegisterType, RegisterType_OPS> [OPERATORS]; // operator pointers  //std::unique_ptr<fm_operator<RegisterType>> m_operator[OPERATORS]; // operator pointers


        // constructor
        public fm_engine_base(ymfm_interface intf)
        {
            m_intf              = intf;
            m_env_counter       = 0;
            m_status            = 0;
            m_clock_prescale    = (uint8_t)register_ops.DEFAULT_PRESCALE;
            m_irq_mask          = (uint8_t)(STATUS_TIMERA | STATUS_TIMERB);
            m_irq_state         = 0;
            m_timer_running     = new uint8_t[] { 0, 0 };
            m_active_channels   = ALL_CHANNELS;
            m_modified_channels = ALL_CHANNELS;
            m_prepare_count     = 0;


            // inform the interface of their engine
            m_intf.m_engine = this;


            m_regs = new RegisterType();


            // create the channels
            for (uint32_t chnum = 0; chnum < CHANNELS; chnum++)
            {
                m_channel[chnum] = new fm_channel <RegisterType, RegisterType_OPS>(this, register_ops.channel_offset(chnum));
            }

            // create the operators
            for (uint32_t opnum = 0; opnum < OPERATORS; opnum++)
            {
                m_operator[opnum] = new fm_operator <RegisterType, RegisterType_OPS>(this, register_ops.operator_offset(opnum));
            }

            // do the initial operator assignment
            assign_operators();
        }
Beispiel #2
0
 // internal constructor
 ym2151(ymfm_interface intf, opm_variant variant)
 {
     m_variant = variant;
     m_address = 0;
     m_fm      = new ym2151_fm_engine(intf);
 }
Beispiel #3
0
        ym2151_fm_engine m_fm;           // core FM engine


        // constructor
        public ym2151(ymfm_interface intf) : this(intf, opm_variant.VARIANT_YM2151)
        {
        }