From 3fad901873c8dca71c6a75b2a3de94ad4c34bde3 Mon Sep 17 00:00:00 2001 From: Bjorn Einar Bjarntes Date: Sun, 19 Dec 2021 15:57:51 +0100 Subject: [PATCH] asking some questions --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ab33da4..f6d071a 100644 --- a/src/main.c +++ b/src/main.c @@ -36,12 +36,12 @@ BYTE isPositionWhite() { // https://archive.org/details/The_Graphics_Book_for_the_Commodore_65/page/n129/ void setPositionWhite() { - // TODO this 8 times something divided must be just masking ad = 0x2000+ ((y >> 3) << 6) +((y >> 3) << 7) +((y >> 3) << 7) + (y & 7)+(x&(0xfff8)); *(short*)(ad) = *(short*)(ad) | 1 << ((7-(x & 7))); } void setPositionBlack() { + // TODO is it faster to somehow reuse y >> 3 than do it many times, and maybe add the same result twice... ad = 0x2000+((y >> 3) << 6) +((y >> 3) << 7) +((y >> 3) << 7) + (y & 7)+ (x&(0xfff8)); *(short*)(ad) = (*(short*)(ad)) & ~(1 << ((7-(x & 7)))); }