From 9b5fd7d6e5d3063c5b9794c84df213654937397e Mon Sep 17 00:00:00 2001 From: hugova Date: Thu, 8 May 2025 22:35:25 +0200 Subject: [PATCH] limit pixel_draw to only write pixel with 0 - 255 x_pos --- wip-hugo/routines/pixel/pixel.inc | 2 +- wip-hugo/routines/pixel/pixel_draw.s | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wip-hugo/routines/pixel/pixel.inc b/wip-hugo/routines/pixel/pixel.inc index 8f68222..91a68da 100644 --- a/wip-hugo/routines/pixel/pixel.inc +++ b/wip-hugo/routines/pixel/pixel.inc @@ -1,5 +1,5 @@ Y_pos = $FB - X_pos = $FC ; 16-bit value (uses FD) + X_pos = $FC byte_to_paint = $FE btp_mem_pos = $F9 ; 16-bit value (uses FA), byte to paint memory position C = $F7 ; 16-bit value (uses F8) diff --git a/wip-hugo/routines/pixel/pixel_draw.s b/wip-hugo/routines/pixel/pixel_draw.s index e53ca0d..8893e10 100755 --- a/wip-hugo/routines/pixel/pixel_draw.s +++ b/wip-hugo/routines/pixel/pixel_draw.s @@ -36,7 +36,7 @@ end__: AND X_pos STA btp_mem_pos - LDA X_pos + 1 + LDA #$00 STA btp_mem_pos + 1 ;;The y_pos adds offset because chunk offsets + inside chunk offset.