the screen is george colored :)

This commit is contained in:
august kline 2024-02-04 23:02:59 -05:00
parent cf0f87649f
commit 7ce48e59fc
1 changed files with 5 additions and 4 deletions

View File

@ -3461,8 +3461,9 @@ fn main() {
memory.write(i, 0x22).unwrap(); memory.write(i, 0x22).unwrap();
} }
} }
let bitmask = [128, 64, 32, 16, 8, 4, 2, 1]; // let bitmask = [128, 64, 32, 16, 8, 4, 2, 1];
// let bitmask = [1, 2, 4, 8, 16, 32, 64, 128]; let bitmask = [1, 2, 4, 8, 16, 32, 64, 128]; // I think this is how the bytes will be
// serialized? low bits first?
let mut buffer: Vec<u32> = vec![0; 512 * 380]; let mut buffer: Vec<u32> = vec![0; 512 * 380];
let mut window = match Window::new("george", 512, 380, WindowOptions::default()) { let mut window = match Window::new("george", 512, 380, WindowOptions::default()) {
Ok(win) => win, Ok(win) => win,
@ -3476,8 +3477,8 @@ fn main() {
let byte = memory.read(addr).unwrap(); let byte = memory.read(addr).unwrap();
for i in 0..8 { for i in 0..8 {
match byte & bitmask[i] == 0 { match byte & bitmask[i] == 0 {
true => continue, true => buffer[(addr - 0x6000) as usize * 8 + i] = 0x000000,
false => buffer[(addr - 0x6000) as usize * 8 + i] = 0xFFFFFF, false => buffer[(addr - 0x6000) as usize * 8 + i] = 0xFFCC00,
} }
} }
} }