From e5f9def572ae7f203ddee540f58b5e04e93567f9 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Fri, 29 Dec 2023 22:37:18 +0100 Subject: [PATCH 1/3] Added SPRCTL0 and SPRCTL1 bit definitions for ca65 --- asminc/lynx.inc | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/asminc/lynx.inc b/asminc/lynx.inc index 403d15d07..a24044713 100644 --- a/asminc/lynx.inc +++ b/asminc/lynx.inc @@ -81,8 +81,42 @@ MATHJ = $FC6F ; Suzy Misc -SPRCTL0 = $FC80 -SPRCTL1 = $FC81 +SPRCTL0 = $FC80 +; Sprite bits-per-pixel definitions +BPP_MASK = %11000000 ; Mask for settings bits per pixel +BPP_1 = %00000000 +BPP_2 = %01000000 +BPP_3 = %10000000 +BPP_4 = %11000000 +; More sprite control 0 bit definitions +HFLIP = %00100000 +VFLIP = %00010000 +; Sprite types - redefined to reflect the reality caused by the shadow error +TYPE_SHADOW = %00000111 +TYPE_XOR = %00000110 +TYPE_NONCOLL = %00000101 ; Non-colliding +TYPE_NORMAL = %00000100 +TYPE_BOUNDARY = %00000011 +TYPE_BSHADOW = %00000010 ; Background shadow +TYPE_BACKNONCOLL = %00000001 ; Background non-colliding +TYPE_BACKGROUND = %00000000 + +SPRCTL1 = $FC81 +LITERAL = %10000000 +PACKED = %00000000 +ALGO3 = %01000000 ; Broken, do not set this bit! +; Sprite reload mask definitions +RELOAD_MASK = %00110000 +RENONE = %00000000 ; Reload nothing +REHV = %00010000 ; Reload hsize, vsize +REHVS = %00100000 ; Reload hsize, vsize, stretch +REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt +; More sprite control 1 bit definitions +REUSEPAL = %00001000 +SKIP = %00000100 +DRAWUP = %00000010 +DRAWLEFT = %00000001 + SPRCOLL = $FC82 SPRINIT = $FC83 SUZYHREV = $FC88 From 061d907a11599cf3ad565ffbc155ce0e93156a72 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Fri, 29 Dec 2023 22:46:15 +0100 Subject: [PATCH 2/3] Fixed tabs instead of spaces --- asminc/lynx.inc | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/asminc/lynx.inc b/asminc/lynx.inc index a24044713..198af415b 100644 --- a/asminc/lynx.inc +++ b/asminc/lynx.inc @@ -81,41 +81,41 @@ MATHJ = $FC6F ; Suzy Misc -SPRCTL0 = $FC80 +SPRCTL0 = $FC80 ; Sprite bits-per-pixel definitions -BPP_MASK = %11000000 ; Mask for settings bits per pixel -BPP_1 = %00000000 -BPP_2 = %01000000 -BPP_3 = %10000000 -BPP_4 = %11000000 +BPP_MASK = %11000000 ; Mask for settings bits per pixel +BPP_1 = %00000000 +BPP_2 = %01000000 +BPP_3 = %10000000 +BPP_4 = %11000000 ; More sprite control 0 bit definitions -HFLIP = %00100000 -VFLIP = %00010000 +HFLIP = %00100000 +VFLIP = %00010000 ; Sprite types - redefined to reflect the reality caused by the shadow error -TYPE_SHADOW = %00000111 -TYPE_XOR = %00000110 +TYPE_SHADOW = %00000111 +TYPE_XOR = %00000110 TYPE_NONCOLL = %00000101 ; Non-colliding -TYPE_NORMAL = %00000100 +TYPE_NORMAL = %00000100 TYPE_BOUNDARY = %00000011 TYPE_BSHADOW = %00000010 ; Background shadow TYPE_BACKNONCOLL = %00000001 ; Background non-colliding TYPE_BACKGROUND = %00000000 -SPRCTL1 = $FC81 -LITERAL = %10000000 -PACKED = %00000000 -ALGO3 = %01000000 ; Broken, do not set this bit! +SPRCTL1 = $FC81 +LITERAL = %10000000 +PACKED = %00000000 +ALGO3 = %01000000 ; Broken, do not set this bit! ; Sprite reload mask definitions -RELOAD_MASK = %00110000 -RENONE = %00000000 ; Reload nothing -REHV = %00010000 ; Reload hsize, vsize -REHVS = %00100000 ; Reload hsize, vsize, stretch -REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt +RELOAD_MASK = %00110000 +RENONE = %00000000 ; Reload nothing +REHV = %00010000 ; Reload hsize, vsize +REHVS = %00100000 ; Reload hsize, vsize, stretch +REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt ; More sprite control 1 bit definitions -REUSEPAL = %00001000 -SKIP = %00000100 -DRAWUP = %00000010 -DRAWLEFT = %00000001 +REUSEPAL = %00001000 +SKIP = %00000100 +DRAWUP = %00000010 +DRAWLEFT = %00000001 SPRCOLL = $FC82 SPRINIT = $FC83 From 66e354961c659bf7466542d577f0bf16811bb875 Mon Sep 17 00:00:00 2001 From: Alex Thissen Date: Fri, 29 Dec 2023 22:48:36 +0100 Subject: [PATCH 3/3] Missed some tabs --- asminc/lynx.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/asminc/lynx.inc b/asminc/lynx.inc index 198af415b..5ae17f6ef 100644 --- a/asminc/lynx.inc +++ b/asminc/lynx.inc @@ -95,22 +95,22 @@ VFLIP = %00010000 TYPE_SHADOW = %00000111 TYPE_XOR = %00000110 TYPE_NONCOLL = %00000101 ; Non-colliding -TYPE_NORMAL = %00000100 -TYPE_BOUNDARY = %00000011 +TYPE_NORMAL = %00000100 +TYPE_BOUNDARY = %00000011 TYPE_BSHADOW = %00000010 ; Background shadow TYPE_BACKNONCOLL = %00000001 ; Background non-colliding -TYPE_BACKGROUND = %00000000 +TYPE_BACKGROUND = %00000000 SPRCTL1 = $FC81 LITERAL = %10000000 PACKED = %00000000 -ALGO3 = %01000000 ; Broken, do not set this bit! +ALGO3 = %01000000 ; Broken, do not set this bit! ; Sprite reload mask definitions RELOAD_MASK = %00110000 -RENONE = %00000000 ; Reload nothing -REHV = %00010000 ; Reload hsize, vsize -REHVS = %00100000 ; Reload hsize, vsize, stretch -REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt +RENONE = %00000000 ; Reload nothing +REHV = %00010000 ; Reload hsize, vsize +REHVS = %00100000 ; Reload hsize, vsize, stretch +REHVST = %00110000 ; Reload hsize, vsize, stretch, tilt ; More sprite control 1 bit definitions REUSEPAL = %00001000 SKIP = %00000100