Пример #1
0
        protected virtual void InitM_test6502()
        {
            Disp_Raster dr;
            stateName = "test6502";
            interval = 1;
            InstructsPerMilisec = 2;
            refreshVal = 8;

            _programMemory = _workingMemory = new Mem_Base(4069);
            m_video = new Vid_Base();
            m_cpu = cpu_test6502 = new C_6502(_programMemory, m_video);
            m_display = new Disp_Raster(m_video);
            m_video.resolution = new Size(64, 32);
            dr = (Disp_Raster)m_display;
        }
Пример #2
0
        protected virtual void InitM_C64()
        {
            //byte[] bts;
            Disp_Raster dr;
            stateName = "C64";
            interval = 1;
            InstructsPerMilisec = 2;
            refreshVal = 8;
            _programMemory = _workingMemory = new Mem_Base(80000);

            #region Connect ROMs
            #region Basic
            _basicROM = new Mem_ROM(
                (0xBFFF - 0xA000)
            ,	file.LoadBytes(dir.Join(
                    _pathSettings.bios_commodore_c64
                ,	"Basic.bin"
                ))
            );
            #endregion
            #region Kernal
            _kernalROM = new Mem_ROM(
                (0xFFFF - 0xE000)
            ,	file.LoadBytes(dir.Join(
                    _pathSettings.bios_commodore_c64
                ,	"Kernal.bin"
                ))
            );
            #endregion
            #endregion

            m_video = new Vid_Base();
            m_cpu = cpu_6502 = new C_6502(_programMemory, m_video);
            m_display = new Disp_Raster(m_video);
            m_video.resolution = new Size(320, 200);
            dr = (Disp_Raster)m_display;
            m_cpu.PC = (ushort)(
                (_programMemory._bank[0xFFFD] << 8)
            |	_programMemory._bank[0xFFFC]
            );
        }
Пример #3
0
 public Disp_Raster(Vid_Base vid)
     : base("RasterDisplay", vid)
 {
     InitDisp_Raster();
 }
Пример #4
0
 public Disp_Base(string name, Vid_Base vid)
     : base()
 {
     InitDisplay(name, vid);
 }
Пример #5
0
 protected virtual void InitDisplay(string name, Vid_Base vid)
 {
     BackColor=Color.Black;
     m_meta = new metaData(name);
     video = vid;
 }
Пример #6
0
        public M_Base(string name, C_Base cpu, Mem_Base prgMem, Mem_Base wrkMem
					, Vid_Base vid, Disp_Base disp)
        {
            InitM_Base(name, cpu, prgMem, wrkMem, vid, disp);
        }
Пример #7
0
		public C_Chip8(Mem_Base mem, Vid_Base vid): base(CHIP_NAME, mem, vid) {
			InitC_Chip8();
		}
Пример #8
0
        public C_Base(string name, Mem_Base sharedMem
						, Mem_Base prgMem, Mem_Base wrkMem, Vid_Base vid)
        {
            InitC_Base(name, prgMem, wrkMem, vid);
        }
Пример #9
0
        public Display(Vid_Base vid, Device dvc, SwapChain sc
						, PresentParameters pp)
            : base()
        {
            InitDisplay(vid, dvc, sc, pp);
        }
Пример #10
0
 public Display(Vid_Base vid, Device dvc, SwapChain sc)
     : base()
 {
     InitDisplay(vid, dvc, sc, null);
 }
Пример #11
0
 public Display(Vid_Base vid, Device dvc)
     : base()
 {
     InitDisplay(vid, dvc, null, null);
 }
Пример #12
0
 public Display(Vid_Base vid)
     : base()
 {
     InitDisplay(vid, null, null, null);
 }
Пример #13
0
        protected virtual void InitDisplay(Vid_Base vid, Device dvc, SwapChain sc
		                                   , PresentParameters pp)
        {
            if(dvc==null) dvc = Device.FromPointer(this.Handle);
            if(pp==null) pp = new PresentParameters();
            if(sc==null) sc = new SwapChain(dvc, pp);

            m_device3D = dvc;
            m_presentParameters = pp;
            m_swapChain = sc;
            m_video = vid;
        }
Пример #14
0
        public void Init(M_Base _machine, consoleRef _Console)
        {
            machine = _machine;
            cpu = machine.cpu;
            programMemory = machine.programMemory;
            workingMemory = machine.workingMemory;
            video = machine.video;
            display = machine.display;

            console = _Console;
            OnInit(new EventArgs());
        }
Пример #15
0
        protected virtual void InitC_Base(string name = ""
						, Mem_Base prgMem = null, Mem_Base wrkMem = null
						, Vid_Base vid=null)
        {
            DoCycle = new DoCycleDelegate(DoCycle_Main);
            m_meta=new metaData(name);
            programMemory = prgMem;
            workingMemory = wrkMem;
            video=vid;
        }
Пример #16
0
 public C_Base(string name, Mem_Base sharedMem, Vid_Base vid)
 {
     InitC_Base(name, sharedMem, sharedMem, vid);
 }
Пример #17
0
        protected virtual void InitM_Base(string name="", C_Base cpu=null
					, Mem_Base prgMem = null, Mem_Base wrkMem = null
					, Vid_Base vid=null, Disp_Base disp=null)
        {
            _settings = settings.main;
            _pathSettings = _settings.paths;

            meta = new metaData(name);
            _timer = new System.Timers.Timer();
            _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);

            m_cpu = cpu;
            _programMemory = prgMem;
            _workingMemory = wrkMem;
            m_video = vid;
            m_display = disp;

            //ThreadStart ts = new ThreadStart(
            interval = 0;
            _threadStart = new ThreadStart(this.Runner);

            rewindStates = new state[rewindMax];
        }
Пример #18
0
 public C_6502(Mem_Base mem, Vid_Base vid)
     : base("CPU.6502", mem, vid)
 {
     InitC_6502();
 }
Пример #19
0
        public M_Base(string name, C_Base cpu, Mem_Base mem
					, Vid_Base vid, Disp_Base disp)
        {
            InitM_Base(name, cpu, mem, mem, vid, disp);
        }