コード例 #1
0
        public device_state_entry state_add(device_state_entry entry)  //device_state_entry &state_add(std::unique_ptr<device_state_entry> &&entry);
        {
            // append to the end of the list
            m_state_list.push_back(entry);  //m_state_list.push_back(std::move(entry));
            device_state_entry new_entry = m_state_list.back();

            // set the fast entry if applicable
            if (new_entry.index() >= FAST_STATE_MIN && new_entry.index() <= FAST_STATE_MAX && !new_entry.divider())
            {
                m_fast_state[new_entry.index() - FAST_STATE_MIN] = new_entry;
            }

            return(new_entry);
        }
コード例 #2
0
        // device_state_interface overrides
        //virtual void state_import(const device_state_entry &entry) override;

        void device_state_interface_state_export(device_state_entry entry)
        {
            switch (entry.index())
            {
            case STATE_GENPC:     XPC = pc_to_external(PPC); break;

            case STATE_GENPCBASE: XPC = pc_to_external(NPC); break;
            }
        }
コード例 #3
0
 public void device_state_interface_state_string_export(device_state_entry entry, out string str)
 {
     str = "";
     switch (entry.index())
     {
     case STATE_GENFLAGS:
         str = string.Format("{0}{1}{2}{3}{4}{5}",
                             TEST_ST() != 0 ? 'T' : 't',
                             TEST_ZF() != 0 ? 'Z' : 'z',
                             TEST_CF() != 0 ? 'C' : 'c',
                             TEST_VF() != 0 ? 'V' : 'v',
                             TEST_SF() != 0 ? 'S' : 's',
                             TEST_NF() != 0 ? 'I' : 'i');
         break;
     }
 }
コード例 #4
0
        // device_state_interface overrides
        public void device_state_interface_state_import(device_state_entry entry)
        {
            switch (entry.index())
            {
            case STATE_GENFLAGS:
                m_st = (m_debugger_flags & 0x01) != 0 ? (byte)1 : (byte)0;
                m_zf = (m_debugger_flags & 0x02) != 0 ? (byte)1 : (byte)0;
                m_cf = (m_debugger_flags & 0x04) != 0 ? (byte)1 : (byte)0;
                m_vf = (m_debugger_flags & 0x08) != 0 ? (byte)1 : (byte)0;
                m_sf = (m_debugger_flags & 0x10) != 0 ? (byte)1 : (byte)0;
                m_nf = (m_debugger_flags & 0x20) != 0 ? (byte)1 : (byte)0;
                break;

            case STATE_GENPC:
            case STATE_GENPCBASE:
                m_PC = (byte)(m_debugger_pc & 0x3f);
                m_PA = (byte)((m_debugger_pc >> 6) & 0x1f);
                break;
            }
        }
コード例 #5
0
        public void device_state_interface_state_export(device_state_entry entry)
        {
            switch (entry.index())
            {
            case STATE_GENFLAGS:
                m_debugger_flags = 0;
                if (TEST_ST() != 0)
                {
                    m_debugger_flags |= 0x01;
                }
                if (TEST_ZF() != 0)
                {
                    m_debugger_flags |= 0x02;
                }
                if (TEST_CF() != 0)
                {
                    m_debugger_flags |= 0x04;
                }
                if (TEST_VF() != 0)
                {
                    m_debugger_flags |= 0x08;
                }
                if (TEST_SF() != 0)
                {
                    m_debugger_flags |= 0x10;
                }
                if (TEST_NF() != 0)
                {
                    m_debugger_flags |= 0x20;
                }
                break;

            case STATE_GENPC:
            case STATE_GENPCBASE:
                m_debugger_pc = GETPC();
                break;
            }
        }