public Planar4(int width, int height, int bpp, int fontHeight, VideoModeType modeType, VideoHandler video) : base(width, height, bpp, true, fontHeight, modeType, video) { unsafe { this.planes = (byte **)this.planesBuffer.ToPointer(); byte *vram = (byte *)video.VideoRam.ToPointer(); this.planes[0] = vram + PlaneSize * 0; this.planes[1] = vram + PlaneSize * 1; this.planes[2] = vram + PlaneSize * 2; this.planes[3] = vram + PlaneSize * 3; } this.graphics = video.Graphics; this.sequencer = video.Sequencer; unsafe { this.latches = this.latchesBuffer.ToPointer(); this.expandedForeground = this.latchesBuffer.ToPointer(); this.expandedBackground = this.expandedForeground + 4; } }
protected VesaWindowed(int width, int height, int bpp, bool planar, int fontHeight, VideoModeType modeType, VideoHandler video) : base(width, height, bpp, planar, fontHeight, VideoModeType.Graphics, video) { unsafe { this.videoRam = (byte *)video.VideoRam.ToPointer(); } }
private protected VideoMode(int width, int height, int bpp, bool planar, int fontHeight, VideoModeType modeType, VideoHandler video) { this.Width = width; this.Height = height; this.OriginalHeight = height; this.BitsPerPixel = bpp; this.IsPlanar = planar; this.FontHeight = fontHeight; this.VideoModeType = modeType; this.dac = video.Dac; this.crtController = video.CrtController; this.attributeController = video.AttributeController; this.VideoRam = GetVideoRamPointer(video); InitializeFont(video.VirtualMachine.PhysicalMemory); }