Exemplo n.º 1
0
        /// <summary>
        /// Machine object constructor
        /// </summary>
        public Machine()
        {
            // Setup address spave
            mem = new AddressSpace
            {
                machine = this
            };

            // Setup CPU
            cpu            = new M6502(mem);
            breakpoint     = new BreakPoints();
            trace          = new Trace();
            mem.breakpoint = breakpoint;

            Devices = new ArrayList();
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mem"></param>
        public M6502(AddressSpace mem)
        {
            Mem = mem;

            InstallOpcodes();

            // be safe; some devices capture clocks w/negative offsets
            Clock = 9;

            // force explicit Reset() to get CPU going
            IsJammed = false;

            // initialize processor status, bit 5 is always set
            P = 1 << 5;

            Disassembler = new M6502DASM(mem, this);

            machine = mem.machine;
        }
Exemplo n.º 3
0
 public FileReader(AddressSpace addr)
 {
     addrspace = addr;
     errmsg    = "";
 }
Exemplo n.º 4
0
 public M6502DASM(AddressSpace mem, M6502 cpu)
 {
     Mem = mem;
     CPU = cpu;
     InstallOpcodeHandlers();
 }