2600 video setting stuff
This commit is contained in:
parent
1f242120e6
commit
0a017f7f27
|
@ -7,6 +7,8 @@ using System.Linq;
|
|||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
||||
{
|
||||
[CoreAttributes(
|
||||
|
@ -288,8 +290,35 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
public bool ShowBall { get; set; }
|
||||
public bool ShowPlayfield { get; set; }
|
||||
|
||||
public int TopLine { get; set; }
|
||||
public int BottomLine { get; set; }
|
||||
public int NTSCTopLine
|
||||
{
|
||||
get { return _NTSCTopLine; }
|
||||
set { _NTSCTopLine = Math.Min(64, Math.Max(value, 0)); }
|
||||
}
|
||||
public int NTSCBottomLine
|
||||
{
|
||||
get { return _NTSCBottomLine; }
|
||||
set { _NTSCBottomLine = Math.Min(260, Math.Max(value, 192)); }
|
||||
}
|
||||
[JsonIgnore]
|
||||
private int _NTSCTopLine = 24;
|
||||
[JsonIgnore]
|
||||
private int _NTSCBottomLine = 248;
|
||||
|
||||
public int PALTopLine
|
||||
{
|
||||
get { return _PALTopLine; }
|
||||
set { _PALTopLine = Math.Min(64, Math.Max(value, 0)); }
|
||||
}
|
||||
public int PALBottomLine
|
||||
{
|
||||
get { return _PALBottomLine; }
|
||||
set { _PALBottomLine = Math.Min(310, Math.Max(value, 192)); }
|
||||
}
|
||||
[JsonIgnore]
|
||||
private int _PALTopLine = 24;
|
||||
[JsonIgnore]
|
||||
private int _PALBottomLine = 296;
|
||||
|
||||
public int BackgroundColor { get; set; }
|
||||
|
||||
|
@ -309,10 +338,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
ShowMissle2 = true,
|
||||
ShowBall = true,
|
||||
ShowPlayfield = true,
|
||||
|
||||
TopLine = 24,
|
||||
BottomLine = 248,
|
||||
|
||||
BackgroundColor = 0
|
||||
};
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
|
||||
public int VirtualHeight
|
||||
{
|
||||
get { return _core.Settings.BottomLine - _core.Settings.TopLine; }
|
||||
get { return BufferHeight; }
|
||||
}
|
||||
|
||||
public int BufferWidth
|
||||
|
@ -129,7 +129,13 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
|
||||
public int BufferHeight
|
||||
{
|
||||
get { return _core.Settings.BottomLine - _core.Settings.TopLine; }
|
||||
get
|
||||
{
|
||||
if (false)
|
||||
return _core.Settings.PALBottomLine - _core.Settings.PALTopLine;
|
||||
else
|
||||
return _core.Settings.NTSCBottomLine - _core.Settings.NTSCTopLine;
|
||||
}
|
||||
}
|
||||
|
||||
public int BackgroundColor
|
||||
|
@ -475,12 +481,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
public int[] FrameBuffer = new int[ScreenWidth * MaxScreenHeight];
|
||||
|
||||
private const int ScreenWidth = 160;
|
||||
private const int MaxScreenHeight = 262;
|
||||
private const int MaxScreenHeight = 312;
|
||||
|
||||
public void OutputFrame()
|
||||
{
|
||||
var topLine = _core.Settings.TopLine;
|
||||
var bottomLine = _core.Settings.BottomLine;
|
||||
var topLine = _core.Settings.NTSCTopLine;
|
||||
var bottomLine = _core.Settings.NTSCBottomLine;
|
||||
|
||||
for (int row = topLine; row < bottomLine; row++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue