Exemplo n.º 1
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;
            }
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 6
0
 //-------------------------------------------------
 //  state_export - called prior to new state
 //  reading the state
 //-------------------------------------------------
 protected virtual void state_export(device_state_entry entry)
 {
 }
Exemplo n.º 7
0
        // derived class overrides

        //-------------------------------------------------
        //  state_import - called after new state is
        //  written to perform any post-processing
        //-------------------------------------------------
        public virtual void state_import(device_state_entry entry)
        {
        }
Exemplo n.º 8
0
        // configuration access
        //const simple_list<device_state_entry> &state_entries() const { return m_state_list; }


        // state getters

        u64 state_int(int index)
        {
            device_state_entry entry = state_find_entry(index); return((entry == null) ? 0 : entry.value());
        }
Exemplo n.º 9
0
 protected override void state_string_export(device_state_entry entry, out string str)
 {
     throw new emu_unimplemented();
 }
Exemplo n.º 10
0
 public override void state_import(device_state_entry entry)
 {
     throw new emu_unimplemented();
 }
Exemplo n.º 11
0
 protected override void state_export(device_state_entry entry)
 {
     ((m6502_device)device()).device_state_interface_state_export(entry);
 }
Exemplo n.º 12
0
 protected override void state_string_export(device_state_entry entry, out string str)
 {
     ((m6809_base_device)device()).device_state_interface_state_string_export(entry, out str);
 }
Exemplo n.º 13
0
 public override void state_import(device_state_entry entry)
 {
     ((m6809_base_device)device()).device_state_interface_state_import(entry);
 }
Exemplo n.º 14
0
 public override void state_string_export(device_state_entry entry, out string str)
 {
     mb88_cpu_device mb88 = (mb88_cpu_device)device(); mb88.device_state_interface_state_string_export(entry, out str);
 }
Exemplo n.º 15
0
 // device_state_interface overrides
 public override void state_import(device_state_entry entry)
 {
     mb88_cpu_device mb88 = (mb88_cpu_device)device(); mb88.device_state_interface_state_import(entry);
 }
Exemplo n.º 16
0
 //-------------------------------------------------
 //  state_string_import - called after new state is
 //  written to perform any post-processing
 //-------------------------------------------------
 protected virtual void state_string_import(device_state_entry entry, string str)
 {
 }
Exemplo n.º 17
0
 //-------------------------------------------------
 //  state_string_export - called after new state is
 //  written to perform any post-processing
 //-------------------------------------------------
 protected virtual void state_string_export(device_state_entry entry, out string str)
 {
     str = "";
 }
Exemplo n.º 18
0
Arquivo: m6502.cs Projeto: kwanboy/mcs
 public override void state_export(device_state_entry entry)
 {
     m6502_device m6502 = (m6502_device)device(); m6502.device_state_interface_state_export(entry);
 }