Fixed a scrolling bug, added C-style comments to Forge

This commit is contained in:
2024-05-12 23:48:47 -05:00
parent b7ce04d245
commit bd54ae1ef0
3 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ fn init_palette<P: PeekPoke>(machine: &mut P) {
}
fn to_byte_address((x, y): (Word, Word), reg: DisplayRegisters) -> Word {
let row_start = (y + reg.row_offset % reg.height) * reg.width + reg.screen;
let row_start = ((y + reg.row_offset) % reg.height) * reg.width + reg.screen;
((x + reg.col_offset) % reg.width) + row_start
}