From 151b969c7c67ccfff040ac9497baa8b4cabd27dc Mon Sep 17 00:00:00 2001 From: Bjorn Einar Bjarntes Date: Sun, 19 Dec 2021 19:47:16 +0100 Subject: [PATCH] think my hack worked... --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index b935e02..67c609a 100644 --- a/src/main.c +++ b/src/main.c @@ -6,6 +6,7 @@ short x; BYTE y; BYTE direction; short ad; +short tmpY; void setHiRes() { *(BYTE*)0xd011 = *(BYTE*)0xd011 | 0xb0 ; // Graphics on @@ -30,7 +31,8 @@ void setAndClearHiRes(){ } void calcAdress(){ - ad = 0x2000+((y & 0xf8) << 3) +((y & 0xf8) << 4) +((y & 0xf8) << 4) + (y & 7)+ (x&(0xfff8)); + tmpY = (y & 0xf8) << 3; + ad = 0x2000+tmpY + (tmpY << 2) + (y & 7)+ (x&(0xfff8)); } BYTE isPositionWhite() {