Skip to content

Commit

Permalink
#2 Removed old frame based StandardCharacterMode-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Mar 29, 2020
1 parent e2e1efd commit e1acb3a
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ComputerSystems/Commodore64/Vic/VicIi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,30 +269,6 @@ private bool IsInDisplay(Point p) {
return DisplayFrame.Contains(p);
}


public void UpdateScreenBufferPixels() {
var bgColor = Colors.FromByte((byte)(C64.Vic._registers[0x21] & 0b00001111));

for (var i = 0; i < 1000; i++) {
var petsciiCode = vicRead((ushort)(getScreenMemoryPointer() + i));
var fgColor = Colors.FromByte((byte)(C64.Memory[C64MemoryOffsets.SCREEN_COLOR_RAM + i] & 0b00001111));
//var fgColor = Colors.FromByte((byte)(vicRead((ushort)(0x0800 + i)) & 0b00001111));

var line = i / 40;
var characterInLine = i % 40;

for (int row = 0; row <= 7; row++) {
var charRow = vicRead((ushort)(getCharacterMemoryPointer() + petsciiCode * 8 + row));

for (int col = 0; col <= 7; col++) {
ScreenBufferPixels[DisplayFrame.Y + line * 8 + row, DisplayFrame.X + characterInLine * 8 + col] = charRow.IsBitSet(7 - (BitIndex)col) ? fgColor : bgColor;
}

}

}
}

public int getScreenMemoryPointer() {
var bit4to7 = C64.Memory.Read(0xD018) >> 4 & 0b00001111;

Expand Down

0 comments on commit e1acb3a

Please sign in to comment.