Added double buffering 2
This commit is contained in:
@@ -1596,7 +1596,7 @@ namespace Core.Cpu
|
|||||||
if ((n & 0x02) != 0) AF.Low |= 0x20;
|
if ((n & 0x02) != 0) AF.Low |= 0x20;
|
||||||
return 16;
|
return 16;
|
||||||
}
|
}
|
||||||
case 0xA9: // CPD (The opcode that just crashed!)
|
case 0xA9: // CPD
|
||||||
{
|
{
|
||||||
byte memVal = ReadMemory(HL.Word);
|
byte memVal = ReadMemory(HL.Word);
|
||||||
byte result = (byte)(AF.High - memVal);
|
byte result = (byte)(AF.High - memVal);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Core.Io
|
|||||||
// The ULA owns the frame buffer now!
|
// The ULA owns the frame buffer now!
|
||||||
public const int ScreenWidth = 320;
|
public const int ScreenWidth = 320;
|
||||||
public const int ScreenHeight = 256; // Perfectly cropped size
|
public const int ScreenHeight = 256; // Perfectly cropped size
|
||||||
public int[] FrameBuffer { get; private set; }
|
public int[] FrameBuffer { get; private set; } = new int[ScreenWidth * ScreenHeight];
|
||||||
public int[] FrontBuffer { get; private set; } = new int[ScreenWidth * ScreenHeight];
|
public int[] FrontBuffer { get; private set; } = new int[ScreenWidth * ScreenHeight];
|
||||||
|
|
||||||
private int _ulaFrameCount = 0;
|
private int _ulaFrameCount = 0;
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ namespace Desktop
|
|||||||
if (scanlineCount % 312 == 0)
|
if (scanlineCount % 312 == 0)
|
||||||
{
|
{
|
||||||
_cpu.RequestInterrupt(); // 50Hz interrupt
|
_cpu.RequestInterrupt(); // 50Hz interrupt
|
||||||
|
_ula.CommitFrame();
|
||||||
TotalFrameCount++;
|
TotalFrameCount++;
|
||||||
|
|
||||||
if (highSpeed)
|
if (highSpeed)
|
||||||
|
|||||||
Reference in New Issue
Block a user