From d36311e4346ba56e97de4da0c4dfeabcbaa6d3b9 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 24 Aug 2018 15:33:29 -0400 Subject: [PATCH] png2hgr: full row lookup table for HGR --- hgr-utils/png2hgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hgr-utils/png2hgr.c b/hgr-utils/png2hgr.c index 980a11f7..5cc581a6 100644 --- a/hgr-utils/png2hgr.c +++ b/hgr-utils/png2hgr.c @@ -247,10 +247,15 @@ static int hgr_offset_table[48]={ static int hgr_offset(int y) { - int temp; + int temp,temp2,address; temp=y/8; + temp2=y%8; - return hgr_offset_table[temp]; + temp2=temp2*0x400; + + address=hgr_offset_table[temp]+temp2; + + return address; } static unsigned char apple2_image[8192];