Atari 2600 - remove doubled width hack, so it is now 160x262, still todo: don't show vblank scanlines and find a reasonable cropping default

This commit is contained in:
adelikat 2014-05-02 21:47:02 +00:00
parent 5c046134ef
commit bf363a4c42
1 changed files with 6 additions and 5 deletions

View File

@ -115,7 +115,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public int VirtualWidth
{
get { return 320; }
get { return ScreenWidth; }
}
public int VirtualHeight
@ -125,7 +125,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public int BufferWidth
{
get { return 320; }
get { return ScreenWidth; }
}
public int BufferHeight
@ -473,20 +473,21 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
}
}
private const int ScreenWidth = 160;
// TODO: Remove the magic numbers from this function to allow for a variable height screen
public void OutputFrame()
{
for (int row = 0; row < 262; row++)
{
for (int col = 0; col < 320; col++)
for (int col = 0; col < ScreenWidth; col++)
{
if (_scanlinesBuffer.Count > row)
{
FrameBuffer[(row * 320) + col] = (int)(_scanlinesBuffer[row][col / 2] | 0xFF000000);
FrameBuffer[(row * ScreenWidth) + col] = (int)(_scanlinesBuffer[row][col] | 0xFF000000);
}
else
{
FrameBuffer[(row * 320) + col] = unchecked((int)0xFF000000);
FrameBuffer[(row * ScreenWidth) + col] = unchecked((int)0xFF000000);
}
}
}