Add extended testing of pixel_draw and fix a pixel_draw bugg (error of max 8px)

This commit is contained in:
hugova 2025-06-28 20:12:58 +02:00
parent d691d692b9
commit 846d792aee
3 changed files with 76 additions and 35 deletions

View file

@ -1,5 +1,5 @@
binary_factor: binary_factor:
.byte %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 .byte %10000000, %01000000, %00100000, %00010000, %00001000, %00000100, %00000010, %00000001
Bitmap = $4000 Bitmap = $4000
;;This is used by pixel_draw! look at it for more detail ;;This is used by pixel_draw! look at it for more detail

View file

@ -1,9 +1,50 @@
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- ;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
.scope pixel_test .scope pixel_test
.include "pixel.inc" .include "pixel.inc"
LDA #$40
LDA #$50
STA X_pos STA X_pos
LDA #$40 LDA #$50
STA Y_pos STA Y_pos
test_x:
NOP
NOP
NOP
NOP
DEY
BNE test_x
DEX
BNE test_x
jsr pixel_draw jsr pixel_draw
LDX #$20
LDY #$ff
DEC X_pos
BNE test_x
end_test_x:
LDA #$50
STA X_pos
LDA #$50
STA Y_pos
test_y:
NOP
NOP
NOP
NOP
DEY
BNE test_y
DEX
BNE test_y
jsr pixel_draw
LDX #$20
LDY #$ff
DEC Y_pos
BNE test_y
end_test_y:
.endscope .endscope

0
wip-hugo/source.s Executable file → Normal file
View file