mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-17 07:31:19 +00:00
shave some bytes
This commit is contained in:
parent
ba8559c3cf
commit
96508fb725
@ -46,6 +46,7 @@
|
||||
sta .mirror_copymasks+$60
|
||||
|
||||
sta $C004
|
||||
; X=0
|
||||
}
|
||||
|
||||
!macro FX_PRECOMPUTED_1BIT_DHGR .coords {
|
||||
|
@ -103,14 +103,13 @@ Loop ldy #0
|
||||
bne +
|
||||
inc input+1
|
||||
+ lda reverse_input
|
||||
beq +
|
||||
php
|
||||
dec reverse_input
|
||||
dec reverse_input
|
||||
jmp Loop
|
||||
+ dec reverse_input
|
||||
dec reverse_input
|
||||
plp
|
||||
bne +
|
||||
dec reverse_input+1
|
||||
bit $c000
|
||||
bmi +
|
||||
jmp Loop
|
||||
+ rts
|
||||
bmi ++
|
||||
+ jmp Loop
|
||||
++ rts
|
||||
|
@ -15,13 +15,14 @@ EndCoordinates1Bit=Coordinates1Bit+$3480
|
||||
|
||||
!macro BUILD_MIRROR_COLS .mirror_cols {
|
||||
; build lookup table to get $27-y for y in $00..$27
|
||||
ldx #$27
|
||||
ldx #$28
|
||||
ldy #$00
|
||||
- tya
|
||||
sta .mirror_cols, x
|
||||
sta .mirror_cols-1, x
|
||||
iny
|
||||
dex
|
||||
bpl -
|
||||
bne -
|
||||
; X=0
|
||||
}
|
||||
|
||||
!macro BUILD_SPARSE_BITMASKS .copymasks, .mirror_copymasks {
|
||||
@ -109,17 +110,17 @@ EndCoordinates1Bit=Coordinates1Bit+$3480
|
||||
|
||||
!macro DEC_INPUT_AND_LOOP .loop {
|
||||
lda input
|
||||
beq +
|
||||
php
|
||||
dec input
|
||||
dec input
|
||||
jmp .loop
|
||||
+ dec input
|
||||
dec input
|
||||
plp
|
||||
bne +
|
||||
dec input+1
|
||||
bit $c000
|
||||
bmi +
|
||||
jmp .loop
|
||||
+ rts
|
||||
bpl .loop
|
||||
bmi ++
|
||||
+ jmp .loop
|
||||
++ rts
|
||||
}
|
||||
|
||||
!macro FX_INITONCE_1BIT .CoordinatesFile, .Start {
|
||||
|
@ -62,14 +62,13 @@ Loop ldy #0
|
||||
bne +
|
||||
inc input+1
|
||||
+ lda reverse_input
|
||||
beq +
|
||||
php
|
||||
dec reverse_input
|
||||
dec reverse_input
|
||||
jmp Loop
|
||||
+ dec reverse_input
|
||||
dec reverse_input
|
||||
plp
|
||||
bne +
|
||||
dec reverse_input+1
|
||||
bit $c000
|
||||
bmi +
|
||||
jmp Loop
|
||||
+ rts
|
||||
bmi ++
|
||||
+ jmp Loop
|
||||
++ rts
|
||||
|
@ -21,9 +21,9 @@ input = $FE ; word
|
||||
+FX_INITONCE_1BIT CoordinatesFile, Start
|
||||
|
||||
Start
|
||||
+BUILD_HGR_LOOKUP_TABLES hgrlo, hgr1hi
|
||||
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
|
||||
+BUILD_MIRROR_COLS mirror_cols
|
||||
+BUILD_HGR_LOOKUP_TABLES_X_IS_ALREADY_0 hgrlo, hgr1hi
|
||||
+BUILD_HGR_MIRROR_LOOKUP_TABLES hgrlomirror, hgr1himirror
|
||||
+BUILD_SPARSE_BITMASKS copymasks, mirror_copymasks
|
||||
+LDADDR Coordinates1Bit
|
||||
+ST16 input
|
||||
@ -74,17 +74,16 @@ Loop ldy #0
|
||||
bne +
|
||||
inc input+1
|
||||
+ lda reverse_input
|
||||
beq +
|
||||
php
|
||||
dec reverse_input
|
||||
dec reverse_input
|
||||
jmp Loop
|
||||
+ dec reverse_input
|
||||
dec reverse_input
|
||||
plp
|
||||
bne +
|
||||
dec reverse_input+1
|
||||
bit $c000
|
||||
bmi +
|
||||
jmp Loop
|
||||
+ rts
|
||||
bmi ++
|
||||
+ jmp Loop
|
||||
++ rts
|
||||
|
||||
CoordinatesFile
|
||||
!byte 14
|
||||
|
Loading…
x
Reference in New Issue
Block a user