Add VirtualWidth to IVideoProvider and the (numerous) implementations. This is just phase 1, client needs to be updated to utilize this information, and some cores (especially PCE) should be updated in a more involved way to provide better TV emulation.
This commit is contained in:
parent
4d91471bab
commit
b599c69c18
|
@ -420,7 +420,8 @@ namespace BizHawk.Emulation.Consoles.Atari
|
|||
|
||||
public int[] frameBuffer = new int[320 * 262];
|
||||
public int[] GetVideoBuffer() { return frameBuffer; }
|
||||
public int BufferWidth { get { return 320; } }
|
||||
public int VirtualWidth { get { return 320; } }
|
||||
public int BufferWidth { get { return 320; } }
|
||||
public int BufferHeight { get { return 262; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
|
||||
|
|
|
@ -384,6 +384,7 @@ namespace BizHawk.Emulation.Consoles.Calculator
|
|||
}
|
||||
return pixels;
|
||||
}
|
||||
public int VirtualWidth { get { return 96; } }
|
||||
public int BufferWidth { get { return 96; } }
|
||||
public int BufferHeight { get { return 64; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
|
|
|
@ -87,7 +87,8 @@ namespace BizHawk.Emulation.Consoles.Coleco
|
|||
}
|
||||
|
||||
public int[] GetVideoBuffer() { return frameBuffer; }
|
||||
public int BufferWidth { get { return 256; } }
|
||||
public int VirtualWidth { get { return 256; } }
|
||||
public int BufferWidth { get { return 256; } }
|
||||
public int BufferHeight { get { return 192; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
public void GetSamples(short[] samples)
|
||||
|
|
|
@ -499,7 +499,8 @@ namespace BizHawk.Emulation.Consoles.Coleco
|
|||
return mode == VdpMode.SMS ? FrameBuffer : GameGearFrameBuffer;
|
||||
}
|
||||
|
||||
public int BufferWidth
|
||||
public int VirtualWidth { get { return BufferWidth; } }
|
||||
public int BufferWidth
|
||||
{
|
||||
get { return mode == VdpMode.SMS ? 256 : 160; }
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Consoles.GB
|
|||
inBIOS = !skipBIOS;
|
||||
HardReset();
|
||||
}
|
||||
|
||||
public int VirtualWidth { get { return 160; } }
|
||||
public int BufferWidth { get { return 160; } }
|
||||
public int BufferHeight { get { return 144; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
|
|
|
@ -754,7 +754,8 @@ namespace BizHawk.Emulation.Consoles.Gameboy
|
|||
return buf;
|
||||
}
|
||||
|
||||
public int BufferWidth { get { return 160; } }
|
||||
public int VirtualWidth { get { return 160; } }
|
||||
public int BufferWidth { get { return 160; } }
|
||||
public int BufferHeight { get { return 144; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
}
|
||||
return pixels;
|
||||
}
|
||||
public int VirtualWidth { get { return BufferWidth; } }
|
||||
public int BufferWidth { get { return right - left + 1; } }
|
||||
public int BufferHeight { get { return bottom - top + 1; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
|
|
|
@ -343,24 +343,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
int FrameHeight = 240;
|
||||
int[] FrameBuffer = new int[256 * 240];
|
||||
|
||||
public int[] GetVideoBuffer()
|
||||
{
|
||||
return FrameBuffer;
|
||||
}
|
||||
public int[] GetVideoBuffer() { return FrameBuffer; }
|
||||
|
||||
public int BufferWidth
|
||||
{
|
||||
get { return FramePitch; }
|
||||
}
|
||||
|
||||
public int BufferHeight
|
||||
{
|
||||
get { return FrameHeight; }
|
||||
}
|
||||
|
||||
public int BackgroundColor
|
||||
{
|
||||
get { return vce.Palette[256]; }
|
||||
}
|
||||
public int VirtualWidth { get { return FramePitch; } }
|
||||
public int BufferWidth { get { return FramePitch; } }
|
||||
public int BufferHeight { get { return FrameHeight; } }
|
||||
public int BackgroundColor { get { return vce.Palette[256]; } }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -498,24 +498,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
}
|
||||
}
|
||||
|
||||
public int[] GetVideoBuffer()
|
||||
{
|
||||
return FrameBuffer;
|
||||
}
|
||||
public int[] GetVideoBuffer() { return FrameBuffer; }
|
||||
|
||||
public int BufferWidth
|
||||
{
|
||||
get { return FrameWidth; }
|
||||
}
|
||||
|
||||
public int BufferHeight
|
||||
{
|
||||
get { return FrameHeight; }
|
||||
}
|
||||
|
||||
public int BackgroundColor
|
||||
{
|
||||
get { return VCE.Palette[0]; }
|
||||
}
|
||||
public int VirtualWidth { get { return FrameWidth; } }
|
||||
public int BufferWidth { get { return FrameWidth; } }
|
||||
public int BufferHeight { get { return FrameHeight; } }
|
||||
public int BackgroundColor { get { return VCE.Palette[0]; } }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,6 +314,8 @@ namespace BizHawk.Emulation.Consoles.Sega
|
|||
return FrameBuffer;
|
||||
}
|
||||
|
||||
public int VirtualWidth { get { return 320; } }
|
||||
|
||||
public int BufferWidth
|
||||
{
|
||||
get { return FrameWidth; }
|
||||
|
|
|
@ -494,6 +494,7 @@ namespace BizHawk.Emulation.Consoles.Sega
|
|||
return mode == VdpMode.SMS ? FrameBuffer : GameGearFrameBuffer;
|
||||
}
|
||||
|
||||
public int VirtualWidth { get { return BufferWidth; } }
|
||||
public int BufferWidth
|
||||
{
|
||||
get { return mode == VdpMode.SMS ? 256 : 160; }
|
||||
|
|
|
@ -50,7 +50,8 @@ namespace BizHawk
|
|||
public void LoadStateBinary(BinaryReader reader) { }
|
||||
public byte[] SaveStateBinary() { return new byte[1]; }
|
||||
public int[] GetVideoBuffer() { return frameBuffer; }
|
||||
public int BufferWidth { get { return 256; } }
|
||||
public int VirtualWidth { get { return 256; } }
|
||||
public int BufferWidth { get { return 256; } }
|
||||
public int BufferHeight { get { return 192; } }
|
||||
public int BackgroundColor { get { return 0; } }
|
||||
public void GetSamples(short[] samples) { }
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
{
|
||||
int[] GetVideoBuffer();
|
||||
|
||||
int VirtualWidth { get; } // Used for controlling aspect ratio. Just return BufferWidth if you dont know what to do with this.
|
||||
|
||||
int BufferWidth { get; }
|
||||
int BufferHeight { get; }
|
||||
int BackgroundColor { get; }
|
||||
|
|
|
@ -91,6 +91,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
int[] vb;
|
||||
int bw, bh, bc;
|
||||
public int VirtualWidth { get { return bw; } }
|
||||
public int BufferWidth { get {return bw;} }
|
||||
public int BufferHeight { get { return bh; } }
|
||||
public int BackgroundColor { get { return bc; } }
|
||||
|
|
|
@ -556,17 +556,6 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public class VideoProviderData : IVideoProvider
|
||||
{
|
||||
public int[] VideoBuffer;
|
||||
|
||||
public int BufferWidth { get; set; }
|
||||
public int BufferHeight { get; set; }
|
||||
public int BackgroundColor { get; set; }
|
||||
|
||||
public int[] GetVideoBuffer() { return VideoBuffer; }
|
||||
}
|
||||
|
||||
public class DisplayManager : IDisposable
|
||||
{
|
||||
public DisplayManager()
|
||||
|
|
Loading…
Reference in New Issue