Example #1
0
        public override void Initialize()
        {
            _memory      = Machine.Memory;
            VideoService = new Services.VideoService();

//#if SILVERLIGHT || WPF
            unchecked
            {
                _colorBlack      = (int)0xFF000000;            // BGRA
                _colorDarkBlue   = (int)0xFF000099;
                _colorDarkGreen  = (int)0xFF117722;
                _colorMediumBlue = (int)0xFF0000FF;
                _colorBrown      = (int)0xFF885500;
                _colorLightGrey  = (int)0xFF99AAAA;
                _colorGreen      = (int)0xFF00EE11;
                _colorAquamarine = (int)0xFF55FFAA;
                _colorDeepRed    = (int)0xFFFF1111;
                _colorPurple     = (int)0xFFDD00DD;
                _colorDarkGrey   = (int)0xFF445555;
                _colorLightBlue  = (int)0xFF33AAFF;
                _colorOrange     = (int)0xFFFF4411;
                _colorPink       = (int)0xFFFF9988;
                _colorYellow     = (int)0xFFFFFF11;
                _colorWhite      = (int)0xFFFFFFFF;
                _colorMonochrome = (int)0xFF00AA00;
            }
//#else
//			_colorBlack = 0xFF000000; // RGBA
//			_colorDarkBlue = 0xFF990000;
//			_colorDarkGreen = 0xFF227711;
//			_colorMediumBlue = 0xFFFF0000;
//			_colorBrown = 0xFF005588;
//			_colorLightGrey = 0xFFAAAA99;
//			_colorGreen = 0xFF11EE00;
//			_colorAquamarine = 0xFFAAFF55;
//			_colorDeepRed = 0xFF1111FF;
//			_colorPurple = 0xFFDD00DD;
//			_colorDarkGrey = 0xFF555544;
//			_colorLightBlue = 0xFFFFAA33;
//			_colorOrange = 0xFF1144FF;
//			_colorPink = 0xFF8899FF;
//			_colorYellow = 0xFF11FFFF;
//			_colorWhite = 0xFFFFFFFF;
//			_colorMonochrome = 0xFF00AA00;
//#endif
            SetPalette();

            IsMonochrome   = false;
            ScannerOptions = ScannerOptions.None;

            IsVBlank = true;

            Machine.Events.AddEvent(_cyclesPerVBlankPreset, _leaveVBlankEvent); // align flush events with scanner; assumes vcount preset at start of frame [3-15, 3-16]
            Machine.Events.AddEvent(_cyclesPerVSync, _resetVSyncEvent);
            Machine.Events.AddEvent(_cyclesPerFlash, _inverseTextEvent);
        }
Example #2
0
        public override void Initialize()
        {
            _memory = Machine.Memory;
			VideoService = new Services.VideoService();

//#if SILVERLIGHT || WPF
			unchecked
			{
				_colorBlack = (int)0xFF000000; // BGRA
				_colorDarkBlue = (int)0xFF000099;
				_colorDarkGreen = (int)0xFF117722;
				_colorMediumBlue = (int)0xFF0000FF;
				_colorBrown = (int)0xFF885500;
				_colorLightGrey = (int)0xFF99AAAA;
				_colorGreen = (int)0xFF00EE11;
				_colorAquamarine = (int)0xFF55FFAA;
				_colorDeepRed = (int)0xFFFF1111;
				_colorPurple = (int)0xFFDD00DD;
				_colorDarkGrey = (int)0xFF445555;
				_colorLightBlue = (int)0xFF33AAFF;
				_colorOrange = (int)0xFFFF4411;
				_colorPink = (int)0xFFFF9988;
				_colorYellow = (int)0xFFFFFF11;
				_colorWhite = (int)0xFFFFFFFF;
				_colorMonochrome = (int)0xFF00AA00;
			}
//#else
//			_colorBlack = 0xFF000000; // RGBA
//			_colorDarkBlue = 0xFF990000;
//			_colorDarkGreen = 0xFF227711;
//			_colorMediumBlue = 0xFFFF0000;
//			_colorBrown = 0xFF005588;
//			_colorLightGrey = 0xFFAAAA99;
//			_colorGreen = 0xFF11EE00;
//			_colorAquamarine = 0xFFAAFF55;
//			_colorDeepRed = 0xFF1111FF;
//			_colorPurple = 0xFFDD00DD;
//			_colorDarkGrey = 0xFF555544;
//			_colorLightBlue = 0xFFFFAA33;
//			_colorOrange = 0xFF1144FF;
//			_colorPink = 0xFF8899FF;
//			_colorYellow = 0xFF11FFFF;
//			_colorWhite = 0xFFFFFFFF;
//			_colorMonochrome = 0xFF00AA00;
//#endif
            SetPalette();

            IsMonochrome = false;
            ScannerOptions = ScannerOptions.None;

            IsVBlank = true;

            Machine.Events.AddEvent(_cyclesPerVBlankPreset, _leaveVBlankEvent); // align flush events with scanner; assumes vcount preset at start of frame [3-15, 3-16]
            Machine.Events.AddEvent(_cyclesPerVSync, _resetVSyncEvent);
            Machine.Events.AddEvent(_cyclesPerFlash, _inverseTextEvent);
        }