mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-07 03:26:10 +00:00
some minor tweaks and comments
This commit is contained in:
@@ -5,22 +5,22 @@
|
|||||||
!to "build/FX/BIT.FIZZLE",plain
|
!to "build/FX/BIT.FIZZLE",plain
|
||||||
*=$6000
|
*=$6000
|
||||||
|
|
||||||
copymasks = $6100 ; [256 bytes, page-aligned]
|
addrs = $6100 ; [256 bytes, page-aligned]
|
||||||
addrs = $6200 ; [256 bytes, page-aligned]
|
copymasks = $6200 ; [256 bytes, page-aligned]
|
||||||
|
|
||||||
jsr swapzp ; copy LFSR code to zero page
|
jsr swapzp ; copy LFSR code to zero page
|
||||||
|
|
||||||
inx
|
inx ; X=0
|
||||||
lda #1 ; create copymask lookup table
|
lda #%00000001 ; create copymask lookup table
|
||||||
-- ldy #$20
|
-- ldy #$20
|
||||||
ora #$80
|
ora #%10000000
|
||||||
- sta copymasks, x
|
- sta copymasks, x
|
||||||
inx
|
inx
|
||||||
dey
|
dey
|
||||||
bne -
|
bne -
|
||||||
asl
|
asl
|
||||||
bne --
|
bne --
|
||||||
|
; X=0
|
||||||
clc
|
clc
|
||||||
-- ldy #$20 ; create address lookup table
|
-- ldy #$20 ; create address lookup table
|
||||||
tya
|
tya
|
||||||
@@ -31,7 +31,7 @@ addrs = $6200 ; [256 bytes, page-aligned]
|
|||||||
bne -
|
bne -
|
||||||
txa
|
txa
|
||||||
bne --
|
bne --
|
||||||
|
; X,Y=0
|
||||||
jsr $0 ; call LFSR code on zero page
|
jsr $0 ; call LFSR code on zero page
|
||||||
|
|
||||||
lda $4000 ; last lousy byte (because LFSR never hits 0)
|
lda $4000 ; last lousy byte (because LFSR never hits 0)
|
||||||
@@ -44,7 +44,7 @@ swapzp ldx #(end-start-1)
|
|||||||
sty $0, x
|
sty $0, x
|
||||||
dex
|
dex
|
||||||
bpl -
|
bpl -
|
||||||
rts
|
rts ; X=#$FF
|
||||||
|
|
||||||
start
|
start
|
||||||
!pseudopc 0 {
|
!pseudopc 0 {
|
||||||
|
@@ -10,7 +10,7 @@ copymasks = $6200 ; [128 bytes, should not cross page boundar
|
|||||||
|
|
||||||
jsr swapzp ; copy LFSR code to zero page
|
jsr swapzp ; copy LFSR code to zero page
|
||||||
|
|
||||||
ldx #0
|
inx ; X=0
|
||||||
lda #%00000011 ; create copymask lookup table
|
lda #%00000011 ; create copymask lookup table
|
||||||
-- ldy #$20
|
-- ldy #$20
|
||||||
ora #%10000000
|
ora #%10000000
|
||||||
@@ -21,8 +21,9 @@ copymasks = $6200 ; [128 bytes, should not cross page boundar
|
|||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
bne --
|
bne --
|
||||||
|
|
||||||
|
tax ; X=0
|
||||||
clc
|
clc
|
||||||
ldx #0
|
|
||||||
-- ldy #$20 ; create address lookup table
|
-- ldy #$20 ; create address lookup table
|
||||||
tya
|
tya
|
||||||
- sta addrs, x
|
- sta addrs, x
|
||||||
@@ -32,7 +33,7 @@ copymasks = $6200 ; [128 bytes, should not cross page boundar
|
|||||||
bne -
|
bne -
|
||||||
txa
|
txa
|
||||||
bne --
|
bne --
|
||||||
|
; X,Y=0
|
||||||
jsr $0 ; call LFSR code on zero page
|
jsr $0 ; call LFSR code on zero page
|
||||||
|
|
||||||
lda $4000 ; last lousy byte (because LFSR never hits 0)
|
lda $4000 ; last lousy byte (because LFSR never hits 0)
|
||||||
@@ -45,7 +46,7 @@ swapzp ldx #(end-start-1)
|
|||||||
sty $0, x
|
sty $0, x
|
||||||
dex
|
dex
|
||||||
bpl -
|
bpl -
|
||||||
rts
|
rts ; X=#$FF
|
||||||
|
|
||||||
start
|
start
|
||||||
!pseudopc 0 {
|
!pseudopc 0 {
|
||||||
|
@@ -16,7 +16,7 @@ addrs=$A100 ; [128 bytes, can be anywhere in main memor
|
|||||||
sbc #1
|
sbc #1
|
||||||
dex
|
dex
|
||||||
bpl -
|
bpl -
|
||||||
inx
|
inx ; X=0
|
||||||
|
|
||||||
sta $C005 ; pre-copy SHR SCB and palette
|
sta $C005 ; pre-copy SHR SCB and palette
|
||||||
ldy #0
|
ldy #0
|
||||||
@@ -28,13 +28,13 @@ addrs=$A100 ; [128 bytes, can be anywhere in main memor
|
|||||||
sta $9F00, y
|
sta $9F00, y
|
||||||
iny
|
iny
|
||||||
bne -
|
bne -
|
||||||
|
; X,Y=0
|
||||||
jsr $0 ; call LFSR code on zero page
|
jsr $0 ; call LFSR code on zero page
|
||||||
|
|
||||||
lda $2000 ; last lousy byte (because LFSR never hits 0)
|
lda $2000 ; last lousy byte (because LFSR never hits 0)
|
||||||
sta $2000
|
sta $2000
|
||||||
|
sta $C004
|
||||||
sta $C004 ; restore and exit
|
; fall through to restore and exit
|
||||||
swapzp ldx #(end-start-1)
|
swapzp ldx #(end-start-1)
|
||||||
- ldy start, x
|
- ldy start, x
|
||||||
lda $0, x
|
lda $0, x
|
||||||
|
Reference in New Issue
Block a user