Exemplo n.º 1
0
        // internal interface for PSG component of YM device
        // FIXME: these should be private, but vector06 accesses them directly
        void ay8910_write_ym(int addr, uint8_t data)
        {
            if ((addr & 1) != 0)
            {
                if (m_active)
                {
                    /* Data port */
                    if (m_register_latch == AY_ESHAPE || m_regs[m_register_latch] != data)
                    {
                        /* update the output buffer before changing the register */
                        m_channel.update();
                    }

                    ay8910_write_reg(m_register_latch, data);
                }
            }
            else
            {
                m_active = (data >> 4) == 0; // mask programmed 4-bit code
                if (m_active)
                {
                    /* Register port */
                    m_register_latch = data & 0x0f;
                }
                else
                {
                    logerror("{0}: warning - {1} upper address mismatch\n", machine().describe_context(), name());
                }
            }
        }
Exemplo n.º 2
0
        //DECLARE_WRITE8_MEMBER(data_w) { write_data(data); }


        // VCLK slave mode option
        // if VCLK and reset or data is changed at the same time,
        // call vclk_w after data_w and reset_w.
        //DECLARE_WRITE_LINE_MEMBER(vclk_w);


        // option , selected pin selector

        /*
         *    Handle a change of the selector
         */
        public void playmode_w(int select)
        {
            int bitwidth = ((select & 4) != 0) ? 4 : 3;

            if ((select & 3) != (((m_s1 ? 1 : 0) << 1) | (m_s2 ? 1 : 0)))
            {
                m_stream.update();

                m_s1 = BIT(select, 1) != 0;
                m_s2 = BIT(select, 0) != 0;

                /* timer set */
                notify_clock_changed();
            }

            if (m_bitwidth != bitwidth)
            {
                m_stream.update();
                m_bitwidth = (u8)bitwidth;
            }
        }
Exemplo n.º 3
0
 // set the current value
 protected void set_value(u32 value)
 {
     m_stream.update();
     m_curval = m_value_map[value & (m_value_map.size() - 1)];
 }
Exemplo n.º 4
0
 // update streams
 protected virtual ChipClass update_streams()
 {
     m_stream.update();
     return(m_chip);
 }