예제 #1
0
        public frmYM2612(frmMain frm, int chipID, int zoom, MDChipParams.YM2612 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;
            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeYM2612, null, zoom);
            screenInit();
            update();
        }
예제 #2
0
        public frmHuC6280(frmMain frm, int chipID, int zoom, MDChipParams.HuC6280 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;

            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeHuC6280, null, zoom);
            DrawBuff.screenInitHuC6280(frameBuffer);
            update();
        }
예제 #3
0
        public frmYM2612MIDI(frmMain frm, int zoom, MDChipParams.YM2612MIDI newParam)
        {
            parent    = frm;
            this.zoom = zoom;

            InitializeComponent();
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.frmYM2612MIDI_MouseWheel);

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeYM2612MIDI, null, zoom);
            DrawBuff.screenInitYM2612MIDI(frameBuffer);
            update();
        }
예제 #4
0
        public frmMixer2(frmMain frm, int zoom, MDChipParams.Mixer newParam)
        {
            parent    = frm;
            this.zoom = zoom;

            InitializeComponent();
            pbScreen.MouseWheel += new MouseEventHandler(this.pbScreen_MouseWheel);

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeMixer, null, zoom);
            DrawBuff.screenInitMixer(frameBuffer);
            update();
        }
예제 #5
0
        public frmMIDI(frmMain frm, int chipID, int zoom, MIDIParam newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;

            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeMIDI_GM, null, zoom);
            DrawBuff.screenInitMIDI(frameBuffer);
            update();
        }
예제 #6
0
        public frmVRC7(frmMain frm, int chipID, int zoom, MDChipParams.VRC7 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;
            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeVRC7, null, zoom);
            bool VRC7Type = false;
            int  tp       = VRC7Type ? 1 : 0;

            DrawBuff.screenInitVRC7(frameBuffer, tp);
            update();
        }
예제 #7
0
        public frmYMF262(frmMain frm, int chipID, int zoom, MDChipParams.YMF262 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;
            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeYMF262, null, zoom);
            bool YMF262Type = false;// (chipID == 0) ? parent.setting.YMF262Type.UseScci : parent.setting.YMF262Type.UseScci;
            int  tp         = YMF262Type ? 1 : 0;

            DrawBuff.screenInitYMF262(frameBuffer, tp);
            update();
        }
예제 #8
0
        public frmSN76489(frmMain frm, int chipID, int zoom, MDChipParams.SN76489 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;

            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeSN76489, null, zoom);
            bool SN76489Type = (chipID == 0) ? parent.setting.SN76489Type.UseScci : parent.setting.SN76489SType.UseScci;
            int  tp          = SN76489Type ? 1 : 0;

            DrawBuff.screenInitSN76489(frameBuffer, tp);
            update();
        }
예제 #9
0
        public frmYM2203(frmMain frm, int chipID, int zoom, MDChipParams.YM2203 newParam)
        {
            parent      = frm;
            this.chipID = chipID;
            this.zoom   = zoom;
            InitializeComponent();

            this.newParam = newParam;
            frameBuffer.Add(pbScreen, Properties.Resources.planeYM2203, null, zoom);
            bool YM2203Type          = (chipID == 0) ? parent.setting.YM2203Type.UseScci : parent.setting.YM2203SType.UseScci;
            int  YM2203SoundLocation = (chipID == 0) ? parent.setting.YM2203Type.SoundLocation : parent.setting.YM2203SType.SoundLocation;
            int  tp = !YM2203Type ? 0 : (YM2203SoundLocation < 0 ? 2 : 1);

            DrawBuff.screenInitYM2203(frameBuffer, tp);
            update();
        }
예제 #10
0
        private void DisplayFrameWindow(IObservable <Frame> frames)
        {
            var frameBuffer = new FrameBuffer();

            frames.Subscribe(
                frame => frameBuffer.Add(frame),
                err => { },
                () =>
            {
                frameBuffer.Render(imagePixels =>
                {
                    _bodyIndexBitmap.WritePixels(
                        new Int32Rect(0, 0, _bodyIndexBitmap.PixelWidth, _bodyIndexBitmap.PixelHeight),
                        imagePixels,
                        _bodyIndexBitmap.PixelWidth * BytesPerPixel,
                        0);
                });
            });
        }
예제 #11
0
        public void Tick()
        {
            if (Recording && !SomethingChangeInTheFrame())
            {
                if (SomethingChangeInTheFrame())
                {
                    StartRecordVisualMemory();
                }
                else
                {
                    StopRecordVisualMemory();
                }
            }

            if (Recording)
            {
                FrameBuffer.Add(CurrentFrame);
                PreviousFrame = CurrentFrame;
            }
        }