Esempio n. 1
0
        // construction/destruction
        protected m6800_cpu_device(machine_config mconfig, string tag, device_t owner, uint32_t clock)
            : this(mconfig, M6800, tag, owner, clock, m6800_insn, cycles_6800, null)
        {
            m_class_interfaces.Add(new device_execute_interface_m6800(mconfig, this));
            m_class_interfaces.Add(new device_memory_interface_m6800(mconfig, this));
            m_class_interfaces.Add(new device_state_interface_m6800(mconfig, this));
            m_class_interfaces.Add(new device_disasm_interface_m6800(mconfig, this));

            m_dimemory = GetClassInterface <device_memory_interface_m6800>();
            m_diexec   = GetClassInterface <device_execute_interface_m6800>();
            m_distate  = GetClassInterface <device_state_interface_m6800>();
        }
Esempio n. 2
0
        m6808_cpu_device(machine_config mconfig, string tag, device_t owner, uint32_t clock)
            : base(mconfig, M6808, tag, owner, clock, m6800_insn, cycles_6800)
        {
            m_class_interfaces.Add(new device_execute_interface_m6802(mconfig, this));
            m_class_interfaces.Add(new device_memory_interface_m6800(mconfig, this));
            m_class_interfaces.Add(new device_state_interface_m6800(mconfig, this));
            m_class_interfaces.Add(new device_disasm_interface_m6800(mconfig, this));

            m_dimemory = GetClassInterface <device_memory_interface_m6800>();
            m_diexec   = GetClassInterface <device_execute_interface_m6802>();
            m_distate  = GetClassInterface <device_state_interface_m6800>();


            set_ram_enable(false);
        }
Esempio n. 3
0
        // device-level overrides
        protected override void device_start()
        {
            m_dimemory = GetClassInterface <device_memory_interface_m6800>();
            m_diexec   = GetClassInterface <device_execute_interface_m6800>();
            m_distate  = GetClassInterface <device_state_interface_m6800>();


            m_program       = m_dimemory.space(AS_PROGRAM);
            m_cache         = m_program.cache(0, 0, (int)endianness_t.ENDIANNESS_BIG);
            m_opcodes       = m_dimemory.has_space(AS_OPCODES) ? m_dimemory.space(AS_OPCODES) : m_program;
            m_opcodes_cache = m_opcodes.cache(0, 0, (int)endianness_t.ENDIANNESS_BIG);

            m_pc.d         = 0;
            m_s.d          = 0;
            m_x.d          = 0;
            m_d.d          = 0;
            m_cc           = 0;
            m_wai_state    = 0;
            m_irq_state[0] = 0;
            m_irq_state[1] = 0;
            m_irq_state[2] = 0;

            save_item(m_ppc.w.l, "m_ppc.w.l");
            save_item(m_pc.w.l, "m_pc.w.l");
            save_item(m_s.w.l, "m_s.w.l");
            save_item(m_x.w.l, "m_x.w.l");
            save_item(m_d.w.l, "m_d.w.l");
            save_item(m_cc, "m_cc");
            save_item(m_wai_state, "m_wai_state");
            save_item(m_nmi_state, "m_nmi_state");
            save_item(m_nmi_pending, "m_nmi_pending");
            save_item(m_irq_state, "m_irq_state");

            m_distate.state_add(M6800_A, "A", m_d.b.h).formatstr("%02X");
            m_distate.state_add(M6800_B, "B", m_d.b.l).formatstr("%02X");
            m_distate.state_add(M6800_PC, "PC", m_pc.w.l).formatstr("%04X");
            m_distate.state_add(M6800_S, "S", m_s.w.l).formatstr("%04X");
            m_distate.state_add(M6800_X, "X", m_x.w.l).formatstr("%04X");
            m_distate.state_add(M6800_CC, "CC", m_cc).formatstr("%02X");
            m_distate.state_add(M6800_WAI_STATE, "WAI", m_wai_state).formatstr("%01X");

            m_distate.state_add(STATE_GENPC, "GENPC", m_pc.w.l).noshow();
            m_distate.state_add(STATE_GENPCBASE, "CURPC", m_pc.w.l).noshow();
            m_distate.state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).formatstr("%8s").noshow();

            set_icountptr(m_icountRef);
        }