Пример #1
0
        public DebuggerForm(Emulator AttachedEmu, VoidNoParams FDU)
        {
            InitializeComponent();
            AttachedEmulator = AttachedEmu;
            UpdateInfo();
            ForceDisplayUpdate = FDU;
            ForceDisplayUpdate();

            MemoryDraw          = new DrawItemEventHandler(vlbMemory_DrawItem);
            vlbMemory.Count     = 0x1000;
            vlbMemory.DrawItem += MemoryDraw;
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();

            //Emulator component.
            Emu = new Emulator();

            //Register Tick Handler. This event is raised every frame by SDL.
            SdlDotNet.Core.Events.Tick += new EventHandler <TickEventArgs>(Events_Tick);

            //Set the FPS that SDL will try to match.
            TargetRenderFPS           = 60;
            SdlDotNet.Core.Events.Fps = TargetRenderFPS;

            //Set the FPS at which the Tick event must be raised.
            SdlDotNet.Core.Events.TargetFps = 60;

            //This delegate allows the debugger to redraw the output window after every step. (Normally it is just done once a frame)
            UpdateDisplayDel = new VoidNoParams(UpdateDisplay);

            //Ready the input handler and attach it to the emulator
            InpHand = new InputHandler();
            Emu.AttachInputHandler(InpHand);
            this.KeyDown += new KeyEventHandler(InpHand.KeyDown);
            this.KeyUp   += new KeyEventHandler(InpHand.KeyUp);

            //Attach the input handler to the input mapper form
            InputMapper = new InputMapperForm(InpHand);

            //Attach the redraw delegate to the debugger
            Debugger = new DebuggerForm(Emu, UpdateDisplayDel);

            //Create a "NumericInput" form. This is used to get the Target FPS when the user wants to change it.
            NumInp       = new NumericInputFrom();
            NumInp.Title = "Target FPS";
        }