factor out some common FX routines, also move font data to D100/LC1

This commit is contained in:
4am 2024-05-26 13:41:21 -04:00
parent 1c15f9daa1
commit c7db1050cc
189 changed files with 817 additions and 803 deletions

View File

@ -1,7 +1,7 @@
# action shots slideshow of games that begin with "S"
SS2B=SS2
STAR.THIEF2=STAR.THIEF
SPACE.WARRIOR
SS2B=SS2
SARACEN
STATION.5
SABOTAGE

View File

@ -20,6 +20,8 @@ RELBASE=$2000
FirstMover
!pseudopc RELBASE {
!source "src/fx.lib.a"
;------------------------------------------------------------------------------
; Reenter
; This is the primary entry point for returning to the launcher from anywhere.
@ -106,7 +108,6 @@ ResetVector ; 6 bytes, copied to $100
; these routines will only be called after relocating to language card
!source "src/ui.search.mode.a" ; \__ execution falls through
!source "src/ui.animation.a" ; /
!source "src/ui.browse.mode.a"
!source "src/ui.attract.mode.a"
!source "src/ui.attract.hgr.a"
@ -152,108 +153,70 @@ gGlobalPrefsStore
; flips out if it has certain values (it will
; be set to $55 as part of the 64K memory test,
; which is apparently one of the acceptable values)
!if (RELBASE != $2000) and (* != iRippleCoordinates3Bit) { !serious "iRippleCoordinates3Bit=",*,", fix constants.a" }
jmp RippleCoordinates3Bit
!if (RELBASE != $2000) and (* != iReverseCoordinates3Bit) { !serious "iReverseCoordinates3Bit=",*,", fix constants.a" }
jmp ReverseCoordinates3Bit
!if (RELBASE != $2000) and (* != iRippleCoordinates2Bit) { !serious "iRippleCoordinates2Bit=",*,", fix constants.a" }
jmp RippleCoordinates2Bit
!if (RELBASE != $2000) and (* != iReverseCoordinates2Bit) { !serious "iReverseCoordinates2Bit=",*,", fix constants.a" }
jmp ReverseCoordinates2Bit
!if (RELBASE != $2000) and (* != iRippleCoordinates1Bit4) { !serious "iRippleCoordinates1Bit4=",*,", fix constants.a" }
jmp RippleCoordinates1Bit4
!if (RELBASE != $2000) and (* != iRippleCoordinates1Bit3) { !serious "iRippleCoordinates1Bit3=",*,", fix constants.a" }
jmp RippleCoordinates1Bit3
!if (RELBASE != $2000) and (* != iRippleCoordinates1Bit2) { !serious "iRippleCoordinates1Bit2=",*,", fix constants.a" }
jmp RippleCoordinates1Bit2
!if (RELBASE != $2000) and (* != iRippleCoordinates1Bit) { !serious "iRippleCoordinates1Bit=",*,", fix constants.a" }
jmp RippleCoordinates1Bit
!if (RELBASE != $2000) and (* != iReverseCoordinates1Bit) { !serious "iReverseCoordinates1Bit=",*,", fix constants.a" }
jmp ReverseCoordinates1Bit
!if (RELBASE != $2000) and (* != iWaitForKeyWithTimeout) { !serious "iWaitForKeyWithTimeout=",*,", fix constants.a" }
jmp WaitForKeyWithTimeout
!if (RELBASE != $2000) and (* != iBuildHGRTables) { !serious "iBuildHGRTables=",*,", fix constants.a" }
jmp BuildHGRTables
!if (RELBASE != $2000) and (* != iLoadFXDATA) { !serious "iLoadFXDATA=",*,", fix constants.a" }
jmp LoadFXDATA
!if (RELBASE != $2000) and (* != iLoadXSingle) { !serious "iLoadXSingle=",*,", fix constants.a" }
jmp LoadXSingle
!if (RELBASE != $2000) and (* != iAddToPath) { !serious "iAddToPath=",*,", fix constants.a" }
jmp AddToPath
!if (RELBASE != $2000) and (* != iLoadFileDirect) { !serious "iLoadFileDirect=",*,", fix constants.a" }
jmp LoadFileDirect
!if (RELBASE != $2000) and (* != WaitForVBL) { !serious "WaitForVBL=",*,", fix constants.a" }
jmp WaitForVBL_iie ; SMC to RTS on a II+
!if (RELBASE != $2000) and (* != UnwaitForVBL) { !serious "UnwaitForVBL=",*,", fix constants.a" }
rts ; SMC to JMP on a IIc
!word iUnwaitForVBL
SwitchToBank2
+READ_RAM2_WRITE_RAM2
rts
; BuildHGRTables (label is on constants.a)
!if (RELBASE != $2000) and (* != BuildHGRTables) {
!serious "BuildHGRTables=",*,", fix constants.a"
}
; out: A clobbered
; X=$C0
; Z=1
; Y preserved
ldx #0
- txa
and #$F8
bpl +
ora #5
+ asl
bpl +
ora #5
+ asl
asl
sta $0201, x
txa
and #7
rol
asl $0201, x
rol
ora #$20
sta $0301, x
inx
cpx #$C0
bne -
rts
; WaitForKeyWithTimeout (label is in constants.a)
!if (RELBASE != $2000) and (* != WaitForKeyWithTimeout) {
!serious "WaitForKeyWithTimeout=",*,", fix constants.a"
}
; in: A = timeout length (like standard $FCA8 wait routine)
; out: A clobbered
; X/Y preserved
sec
@wait1 pha
@wait2 sbc #1
bne @wait2
pla
bit $C000
bmi @exit
sbc #1
bne @wait1
@exit rts
; iLoadFXDATA (label is in constants.a)
!if (RELBASE != $2000) and (* != iLoadFXDATA) {
!serious "iLoadFXDATA=",*,", fix constants.a"
}
jmp LoadFXDATA ; no direct calling - target can move
; iLoadXSingle (label is in constants.a)
!if (RELBASE != $2000) and (* != iLoadXSingle) {
!serious "iLoadXSingle=",*,", fix constants.a"
}
jmp LoadXSingle ; no direct calling - target can move
; iAddToPath (label is in constants.a)
!if (RELBASE != $2000) and (* != iAddToPath) {
!serious "iAddToPath=",*,", fix constants.a"
}
jmp AddToPath ; no direct calling - target can move
; iLoadFileDirect (label is in constants.a)
!if (RELBASE != $2000) and (* != iLoadFileDirect) {
!serious "iLoadFileDirect=",*,", fix constants.a"
}
jmp LoadFileDirect ; no direct calling - target can move
; WaitForVBL (label is in constants.a)
!if (RELBASE != $2000) and (* != WaitForVBL) {
!serious "WaitForVBL=",*,", fix constants.a"
}
jmp WaitForVBL_iie ; SMC to RTS on a II+
; UnwaitForVBL (label is in constants.a)
!if (RELBASE != $2000) and (* != UnwaitForVBL) {
!serious "UnwaitForVBL=",*,", fix constants.a"
}
rts ; SMC to JMP on a IIc
!word iUnwaitForVBL
; MockingboardStuff (label is in constants.a)
!if (RELBASE != $2000) and (* != MockingboardStuff) {
!serious "MockingboardStuff=",*,", fix constants.a"
}
; slot number where Mockingboard was detected and type of board
; #$00 if no Mockingboard detected
!byte $FD ; MockingboardStuff ($FFF8)
!if (RELBASE != $2000) and (* != MockingboardStuff) { !serious "MockingboardStuff=",*,", fix constants.a" }
!byte $FD
; MachineStatus (label is in constants.a so prelaunchers can use it)
!if (RELBASE != $2000) and (* != MachineStatus) {
!serious "MachineStatus=",*,", fix constants.a"
}
; MachineStatus (label is in constants.a)
; 7 6 5 4 3 2 1 0
; | | | | | | | +- bit 0 reserved
; | | | | | | +--- bit 1 reserved
@ -264,10 +227,10 @@ SwitchToBank2
; | +------------- bit 6 = 1 if 128K
; +--------------- bit 7 = 1 if joystick
; Use the bit masks defined in constants.a
!byte $FD ; MachineStatus ($FFF9)
!if (RELBASE != $2000) and (* != $FFFA) {
!serious "Expected LC vectors to start at $FFFA, found ",*
}
!if (RELBASE != $2000) and (* != MachineStatus) { !serious "MachineStatus=",*,", fix constants.a" }
!byte $FD
!if (RELBASE != $2000) and (* != $FFFA) { !serious "Expected LC vectors to start at $FFFA, found ",* }
!word Reenter ; NMI vector ($FFFA-B)
!word Reenter ; reset vector ($FFFC-D)
!word Ignore ; IRQ vector ($FFFE-F)
@ -286,7 +249,7 @@ COPYSRC = *
!if LCRAM2_END >= DisableAccelerator {
!error "code is too large: ends at ", LCRAM2_END
}
FONTDST = $E000
FONTDST = $D100
}
EvenLasterMover
FONTSRC = *

View File

@ -190,9 +190,9 @@
dey
bne @LM
+READ_RAM1_WRITE_RAM1
ldy #4
@ELM lda FONTSRC,x
; relocate font data to $E000
@ELM lda FONTSRC,x ; relocate font data to $D100/LC1
sta FONTDST,x
inx
bne @ELM

View File

@ -2,7 +2,7 @@
;(c) 2023 by 4am
;
; initialize and clear screen
; assumes zero page is completely trashed other than |zpCharMask|
; assumes zero page is completely trashed
; assumes ROM is banked in on entry
;
; note: this file is included by both the launcher and proboothd

View File

@ -4,12 +4,10 @@
!ifndef RELEASE {
LoadingVersion
!byte 8
!text " build "
+PSTRING " build "
LoadingBuild
!word BUILDNUMBER
} else {
LoadingVersion
!byte 12
!text " v5.1"
+PSTRING " v5.1"
}

View File

@ -9,7 +9,7 @@
; D000 - reserved
; D001..D06E - gGlobalPrefsStore
; ...unused...
; E000..E3FF - HGR font data
; D100..D4FF - HGR font data
; ...unused...
; E6C9..FFEB - main program code
; FFEC..FFF9 - API functions and global constants available for main program
@ -156,28 +156,39 @@ BestMatchScore = $FC ; byte
; main memory
gStackSize = 6 ; seems like only six are needed
gPathname = $BFD0 ; used by SetPath/AddToPath
gKeyLen = $1F00
gKey = $1F01
UILine1 = $1FB0
UILine2 = $1FD8
UI_ToPlay = $1FF7
ProBootEntry = $2025
gKeyLen = $1F00 ; used by ParseKeyValueList
gKey = $1F01 ; ""
gValLen = $1F80 ; ""
gVal = $1F81 ; ""
UILine1 = $1FB0 ; used by DrawUI
UILine2 = $1FD8 ; ""
UI_ToPlay = $1FF7 ; ""
ProBootEntry = $2025 ; used by ProBoot
gValLen = $1F80
gVal = $1F81
gSearchIndex = $6000
gSearchCache = $A000
; LC RAM 1 & 2
BuildHGRTables = $FFAF
WaitForKeyWithTimeout = $FFD5
iLoadFXDATA = $FFE6
iLoadXSingle = $FFE9
iAddToPath = $FFEC
iLoadFileDirect = $FFEF ; note: you really want LC RAM 2 banked in before calling this
WaitForVBL = $FFF2
UnwaitForVBL = $FFF5
; these are defined here because they are also called by other targets
; that are assembled separately, e.g. prelaunchers, demo launchers, and graphic effects
iRippleCoordinates3Bit = $FFBE
iReverseCoordinates3Bit = $FFC1
iRippleCoordinates2Bit = $FFC4
iReverseCoordinates2Bit = $FFC7
iRippleCoordinates1Bit4 = $FFCA
iRippleCoordinates1Bit3 = $FFCD
iRippleCoordinates1Bit2 = $FFD0
iRippleCoordinates1Bit = $FFD3
iReverseCoordinates1Bit = $FFD6
iWaitForKeyWithTimeout = $FFD9
iBuildHGRTables = $FFDC
iLoadFXDATA = $FFDF
iLoadXSingle = $FFE2
iAddToPath = $FFE5
iLoadFileDirect = $FFE8 ; note: you really want LC RAM 2 banked in before calling this
WaitForVBL = $FFEB
UnwaitForVBL = $FFEE
MockingboardStuff = $FFF8 ; bit 7 = 1 if SC-01 speech chip present (Speech I)
; bit 6 = 1 if SSI-263 speech chip present (Mockingboard "B"-"D")
@ -240,5 +251,16 @@ ldrhi2 = $65 ; constant
PrelaunchInit = $EB
; addresses used by graphic effects
hgrlo = $0201 ; $C0 bytes
hgrhi = $0301 ; $C0 bytes
hgr1hi = hgrhi
Coordinates1Bit= $8600 ; $3481 bytes ($3480 on disk + 1 byte EOF marker added at runtime)
EndCoordinates1Bit = Coordinates1Bit + $3480
Coordinates2Bit= $8100 ; $3C01 bytes ($3C00 on disk + 1 byte EOF marker added at runtime)
EndCoordinates2Bit = Coordinates2Bit + $3C00
Coordinates3Bit= $6B00 ; $5001 bytes ($5000 on disk + 1 byte EOF marker added at runtime)
EndCoordinates3Bit = Coordinates3Bit + $5000
_CONSTANTS_=*
}

457
src/fx.lib.a Normal file
View File

@ -0,0 +1,457 @@
;license:MIT
;(c) 2024 by 4am
;
; common routines used by graphic effects
;
; Note: launcher code can call these routines directly. However,
; graphic effects are assembled as separate targets and must call
; these routines indirectly via the vectors defined in constants.a,
; e.g. iBuildHGRTables instead of BuildHGRTables.
;
; based on routine by John Brooks
; posted on comp.sys.apple2 on 2018-07-11
; https://groups.google.com/d/msg/comp.sys.apple2/v2HOfHOmeNQ/zD76fJg_BAAJ
BuildHGRTables
; out: populates tables at $0201 (hgrlo) and $0301 (hgrhi)
; A clobbered
; X=$C0 (important! some callers rely on this)
; Z=1
; Y preserved
ldx #0
- txa
and #$F8
bpl +
ora #5
+ asl
bpl +
ora #5
+ asl
asl
sta hgrlo, x
txa
and #7
rol
asl hgrlo, x
rol
ora #$20
sta hgrhi, x
inx
cpx #$C0
bne -
rts
WaitForKeyWithTimeout
; in: A = timeout length (like standard $FCA8 wait routine)
; out: A clobbered (not always 0 if key is pressed, but also not the key pressed)
; X/Y preserved
sec
@wait1 pha
@wait2 sbc #1
bne @wait2
pla
bit KBD
bmi @exit
sbc #1
bne @wait1
@exit rts
ReverseCoordinates1Bit
ldy #0 ; <Coordinates1Bit
sty $f0
lda #>Coordinates1Bit
sta $f1
lda #<(EndCoordinates1Bit - 2)
sta $f2
lda #>(EndCoordinates1Bit - 2)
sta $f3
clc
!byte $24
- sec
-- lda ($f0), y
pha
lda ($f2), y
sta ($f0), y
pla
sta ($f2), y
iny
bcc -
ldy #0
!byte $24
- clc
inc $f0
bne +
inc $f1
+ lda $f1
eor #>(Coordinates1Bit + $1A40)
bne +
lda $f0
eor #<(Coordinates1Bit + $1A40)
beq ++
+ lda $f2
bne +
dec $f3
+ dec $f2
bcs -
bcc -- ; always
++ rts
!zone {
RippleCoordinates1Bit4
lda #<aslmod4
+HIDE_NEXT_2_BYTES
RippleCoordinates1Bit3
lda #<aslmod3
+HIDE_NEXT_2_BYTES
RippleCoordinates1Bit2
lda #<aslmod2
+HIDE_NEXT_2_BYTES
RippleCoordinates1Bit
lda #<aslmod
sta @jsr+1
lda #2 ; <(Coordinates1Bit + 2)
sta $f0
ldy #0
sty $f1
lda #$16 ; <(Coordinates1Bit + 22)
sta $f2
sty $f3
lda #$1f
sta $ee
lda #$0d
sta $ef
lda Coordinates1Bit + 2
sta $e0
lda Coordinates1Bit + 3
sta $e1
lda Coordinates1Bit + 22
sta $e2
lda Coordinates1Bit + 23
sta $e3
--- ldx #4
-- ldy $ee, x
lda $ef, x
@jsr jsr aslmod ; SMC on entry
sty $ee, x
sta $ef, x
sty $ec
clc
adc #>Coordinates1Bit
sta $ed
ldy #0
!byte $24
- sec
lda ($ec), y
pha
lda $de, x
sta ($ec), y
pla
sta $de, x
inx
iny
bcc -
dex
dex
dex
dex
bne --
dec $ee
bne ---
dec $ef
bpl ---
bmi exit ; always branches
aslmod4 jsr aslmod
aslmod3 jsr aslmod
aslmod2 jsr aslmod
aslmod cmp #$1A
!if (>aslmod != >aslmod4) {
!serious "aslmod entry points are not on the same page"
}
bcc +
bne ++
cpy #$40
bcc +
++ iny
+ pha
tya
asl
tay
pla
rol
cmp #$34
bcc exit
bne ++
cpy #$80
bcc exit
++ pha
tya
sbc #$80
tay
pla
sbc #$34
exit rts
}
ReverseCoordinates2Bit
ldy #0 ; <Coordinates2Bit
sty $f0
lda #>Coordinates2Bit
sta $f1
lda #<(EndCoordinates2Bit - 2)
sta $f2
lda #>(EndCoordinates2Bit - 2)
sta $f3
ldx #$1E ; #$3C/2
clc
!byte $24
- sec
-- lda ($f0), y
pha
lda ($f2), y
sta ($f0), y
pla
sta ($f2), y
iny
bcc -
ldy #0
!byte $24
- clc
inc $f0
bne +
inc $f1
dex
beq ++
+ lda $f2
bne +
dec $f3
+ dec $f2
bcs -
bcc -- ; always branches
++ rts
RippleCoordinates2Bit
ldy #0
ldx #$33
- lda @ptrtbl, x
sta $c0, x
dex
bpl -
lda #$9b
sta $fe
iny
sty $ff
ldx #6
- lda Coordinates2Bit + 1, x
sta $7f, x
lda Coordinates2Bit + 9, x
sta $85, x
lda Coordinates2Bit + 17, x
sta $8b, x
lda Coordinates2Bit + 65, x
sta $9b, x
dex
bne -
lda Coordinates2Bit + 28
sta $92
lda Coordinates2Bit + 29
sta $93
ldx #4
- lda Coordinates2Bit + 33, x
sta $93, x
lda Coordinates2Bit + 41, x
sta $97, x
lda Coordinates2Bit + 83, x
sta $a1, x
dex
bne -
ldx #2
- lda Coordinates2Bit + 125, x
sta $a5, x
lda Coordinates2Bit + 131, x
sta $a7, x
lda Coordinates2Bit + 139, x
sta $a9, x
lda Coordinates2Bit + 169, x
sta $ab, x
lda Coordinates2Bit + 237, x
sta $ad, x
lda Coordinates2Bit + 2193, x
sta $af, x
lda Coordinates2Bit + 6581, x
sta $b1, x
dex
bne -
--- ldx #$34
-- lda $be, x
tay
ora $bf, x
beq +
lda $bf, x
jsr @aslmod
sty $be, x
sta $bf, x
sty $fc
clc
adc #>Coordinates2Bit
sta $fd
ldy #0
!byte $24
- sec
lda ($fc), y
pha
lda $7e, x
sta ($fc), y
pla
sta $7e, x
inx
iny
bcc -
dex
dex
+ dex
dex
bne --
ldy #1
lda $fe
eor #<(411 - 2)
beq +
ldy #9
eor #<(411 - 2) xor <(411 - 136)
bne ++
+
- ldx @zerotbl, y
sta $0, x
sta $1, x
dey
bpl -
++ dec $fe
bne ---
dec $ff
bpl ---
bmi @exit ; always branches
@aslmod jsr +
+ cmp #$1E
bcc +
iny
+ pha
tya
asl
tay
pla
rol
cmp #$3C
bcc @exit
sbc #$3C
@exit rts
@ptrtbl !word 2, 4, 6, 10, 12, 14, 18, 20
!word 22, 28, 34, 36, 42, 44, 66, 68
!word 70, 84, 86, 126, 132, 140, 170, 238
!word 2194, 6582
@zerotbl !byte $f0, $f2, $ca, $d2, $d8, $e0, $e2, $e6, $ea, $ee
;!macro FX_REVERSE_3BIT {
ReverseCoordinates3Bit
ldy #0 ; <Coordinates3Bit
sty $f0
lda #>Coordinates3Bit
sta $f1
lda #<(EndCoordinates3Bit - 2)
sta $f2
lda #>(EndCoordinates3Bit - 2)
sta $f3
ldx #$28 ; #$50/2
clc
!byte $24
- sec
-- lda ($f0), y
pha
lda ($f2), y
sta ($f0), y
pla
sta ($f2), y
iny
bcc -
ldy #0
!byte $24
- clc
inc $f0
bne +
inc $f1
dex
beq ++
+ lda $f2
bne +
dec $f3
+ dec $f2
bcs -
bcc -- ; always branches
++ rts
;!macro FX_RIPPLE_3BIT {
RippleCoordinates3Bit
ldx #$1B
- lda @ripplezp, x
sta $e0, x
dex
bpl -
--- ldx #$0c
-- ldy $ee, x
lda $ef, x
jsr @aslmod
sty $ee, x
sta $ef, x
sty $ec
clc
adc #>Coordinates3Bit
sta $ed
ldy #0
!byte $24
- sec
lda ($ec), y
pha
lda $de, x
sta ($ec), y
pla
sta $de, x
inx
iny
bcc -
dex
dex
dex
dex
bne --
dec $ee
bne ---
dec $ef
bpl ---
bmi @exit ; always branches
@aslmod jsr +
+ cmp #$28
bcc +
iny
+ pha
tya
asl
tay
pla
rol
cmp #$50
bcc @exit
sbc #$50
@exit rts
@ripplezp
!byte $1F,$F3,$20,$F3,$20,$14,$20,$D3
!byte $1E,$F3,$1F,$54,$00,$00,$AA,$06
!byte $02,$00,$04,$00,$06,$00,$0C,$00
!byte $16,$00,$1A,$00

View File

@ -5,13 +5,13 @@
!to "build/FX.INDEXED/DHGR.TWOPASS.LR",plain
*=$6000
hgrlo = $0201 ; [$C0 bytes, main memory only]
hgr1hi = $0301 ; [$C0 bytes, main memory only]
;hgrlo = $0201 ; [$C0 bytes, main memory only] defined in constants.a
;hgr1hi = $0301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
+COPY_TO_0 start, end
jsr BuildHGRTables
jsr iBuildHGRTables
jmp loop
start
@ -44,7 +44,7 @@ dst sta $FDFD ,y ; SMC
cpx #$C0
bcc rowloop
lda #$10
jsr WaitForKeyWithTimeout
jsr iWaitForKeyWithTimeout
bmi exit
iny
cpy #$28

View File

@ -81,8 +81,8 @@ tmpy = $05 ; [byte] used by drawing routines
box = $0E ; [byte] counter in main loop
BoxStages = $10 ; [$30 bytes] current stage for each box
auxsrc_hgrhi = $BD01 ; [$C0 bytes] HGR base addresses (hi) starting at $9000
hgrlo = $0201 ; [$C0 bytes] HGR base addresses (lo) starting at $2000
hgrhi = $0301 ; [$C0 bytes] HGR base addresses (hi) starting at $2000
;hgrlo = $0201 ; [$C0 bytes] HGR base addresses (lo) starting at $2000 (defined in constants.a)
;hgrhi = $0301 ; [$C0 bytes] HGR base addresses (hi) starting at $2000 (defined in constants.a)
BoxesX = $BE90 ; [$30 bytes] starting row for each box
BoxesY = $BEC0 ; [$30 bytes] starting byte offset for each box
@ -322,7 +322,7 @@ GenerateBoxes
bne -
; X=0 here
jsr BuildHGRTables
jsr iBuildHGRTables
; X=$C0 here
- lda hgrhi-1, x

View File

@ -5,14 +5,14 @@
!to "build/FX.INDEXED/DHGR.BAR.DISSLV",plain
*=$6000
hgrlo = $0201 ; [$C0 bytes, main memory only]
hgr1hi = $0301 ; [$C0 bytes, main memory only]
;hgrlo = $0201 ; [$C0 bytes, main memory only] defined in constants.a
;hgr1hi = $0301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
+COPY_TO_0 start, end
;X=0
jsr BuildHGRTables
jsr iBuildHGRTables
jmp loop
start
@ -61,7 +61,7 @@ dst2 sta $FDFD, y ; SMC
bcc -
jsr tomain
lda #$30
jsr WaitForKeyWithTimeout
jsr iWaitForKeyWithTimeout
bmi exit
dec row2
inc row1

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
jsr iReverseCoordinates1Bit
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
jsr iReverseCoordinates1Bit
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,8 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -5,15 +5,15 @@
!to "build/FX.INDEXED/DHGR.DIAGONAL",plain
*=$6000
hgrlo = $0201 ; [$C0 bytes, main memory only]
hgr1hi = $0301 ; [$C0 bytes, main memory only]
;hgrlo = $0201 ; [$C0 bytes, main memory only] defined in constants.a
copymasks= $02C1 ; [$08 bytes, different values in main and auxmem]
;hgr1hi = $0301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
+COPY_TO_0 start, end
;X=0
jsr BuildHGRTables
jsr iBuildHGRTables
ldy #8 ; copy copymask arrays into place in main and auxmem
- lda copymasks_main-1, y

View File

@ -26,7 +26,7 @@ input = $FE ; word
Start
+BUILD_DITHER_MASKS_DHGR dithermasks
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_AUXMEM $60, 4

View File

@ -17,7 +17,7 @@ input = $FE ; word
+BUILD_DITHER_MASKS_DHGR dithermasks
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_AUXMEM $60, 4

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_RIPPLE_1BIT aslmod
jsr iRippleCoordinates1Bit
Start
!source "src/fx/fx.dhgr.dither.radial.common.a"

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
!source "src/fx/fx.dhgr.dither.radial.common.a"

View File

@ -5,9 +5,9 @@
!to "build/FX.INDEXED/DHGR.FLICK",plain
*=$6000
hgrlo = $201 ; [$C0 bytes, main memory only]
;hgrlo = $201 ; [$C0 bytes, main memory only] defined in constants.a
startrows_by_column = $2C1 ; [$28 bytes, main memory only]
hgr1hi = $301 ; [$C0 bytes, main memory only]
;hgr1hi = $301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
@ -18,7 +18,7 @@ hgr1hi = $301 ; [$C0 bytes, main memory only]
sta startrows_by_column-1, x
dex
bne -
jsr BuildHGRTables
jsr iBuildHGRTables
jmp loop
start

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
jsr iReverseCoordinates1Bit
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -51,7 +51,7 @@
!macro FX_PRECOMPUTED_1BIT_DHGR .coords {
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_0 start, end
@ -143,7 +143,7 @@ end
!macro FX_PRECOMPUTED_1BIT_DHGR_DITHER .coords, .endcoords {
+BUILD_DITHER_MASKS_DHGR dithermasks
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols

View File

@ -53,7 +53,7 @@
!macro FX_PRECOMPUTED_2BIT_DHGR .coords {
+BUILD_SPARSE_BITMASKS_2BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_0 start, end
jmp InputLoop
@ -128,7 +128,7 @@ end
!macro FX_PRECOMPUTED_2BIT_DHGR_DITHER .coords, .endcoords {
+BUILD_DITHER_MASKS_DHGR dithermasks
+BUILD_SPARSE_BITMASKS_2BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_MIRROR_COLS_DHGR mirror_cols
; phase 1 - in reverse, with additional masking (dithering)

View File

@ -5,14 +5,14 @@
!to "build/FX.INDEXED/DHGR.R.BY.PIXEL",plain
*=$6000
hgrlo = $0201 ; [$C0 bytes, main memory only, offset by 1 because lookups will be based on $0200,x]
hgr1hi = $0301 ; [$C0 bytes, main memory only]
;hgrlo = $0201 ; [$C0 bytes, main memory only] defined in constants.a
copymasks= $02C1 ; [$07 bytes, different values in main and auxmem]
;hgr1hi = $0301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
+COPY_TO_0 start, end
jsr BuildHGRTables
jsr iBuildHGRTables
ldy #7 ; copy copymask arrays into place in main and auxmem
- lda copymasks_main-1, y

View File

@ -23,7 +23,7 @@ input = $FE ; word
Start
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_AUXMEM $60, 4

View File

@ -14,7 +14,7 @@ reverse_input = $FC ; word
input = $FE ; word
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_AUXMEM $60, 4

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_RIPPLE_1BIT aslmod
jsr iRippleCoordinates1Bit
Start
!source "src/fx/fx.dhgr.radial.common.a"

View File

@ -22,7 +22,7 @@ input = $FE ; word
Start
+BUILD_SPARSE_BITMASKS_1BIT_DHGR copymasks, mirror_copymasks
jsr BuildHGRTables
jsr iBuildHGRTables
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
+BUILD_MIRROR_COLS_DHGR mirror_cols
+COPY_TO_AUXMEM $60, 4

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
!source "src/fx/fx.dhgr.radial.common.a"

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_RIPPLE_1BIT aslmod3
jsr iRippleCoordinates1Bit3
Start
!source "src/fx/fx.dhgr.radial.common.a"

View File

@ -9,13 +9,13 @@
; mainmem alternate #$11/#$44
; auxmem alternate #$08/#$22
hgrlo = $0201 ; [$C0 bytes, main memory only]
hgr1hi = $0301 ; [$C0 bytes, main memory only]
;hgrlo = $0201 ; [$C0 bytes, main memory only] defined in constants.a
;hgr1hi = $0301 ; [$C0 bytes, main memory only] defined in constants.a
!source "src/fx/macros.a"
+COPY_TO_0 start, end
jsr BuildHGRTables
jsr iBuildHGRTables
jmp loop
start

View File

@ -8,7 +8,8 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
jsr iReverseCoordinates1Bit
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,8 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_REVERSE_1BIT
jsr iReverseCoordinates1Bit
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,8 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
jsr EndCoordinates1Bit+1
jsr iRippleCoordinates1Bit2
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,8 @@
!source "src/fx/fx.dhgr.precomputed.1bit.a"
+FX_INITONCE_1BIT CoordinatesFile, Start
+FX_RIPPLE_1BIT aslmod4
jsr iRippleCoordinates1Bit4
Start
+FX_PRECOMPUTED_1BIT_DHGR Coordinates1Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_REVERSE_2BIT
jsr iReverseCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit

View File

@ -8,7 +8,7 @@
!source "src/fx/fx.dhgr.precomputed.2bit.a"
+FX_INITONCE_2BIT CoordinatesFile, Start
+FX_RIPPLE_2BIT
jsr iRippleCoordinates2Bit
Start
+FX_PRECOMPUTED_2BIT_DHGR Coordinates2Bit
<