megademo: more ill-advised messing with alignment

This commit is contained in:
Vince Weaver 2018-11-01 22:32:28 -04:00
parent 35880038c8
commit 057e417756
7 changed files with 58 additions and 22 deletions

View File

@ -36,6 +36,7 @@
31607 -- space-bars auto-driving
32038 -- align letters, few extra thanks
31976 -- no room to thank Talbot Hall
31574 -- optimize some aligns while trying to find firework bug
Further ideas to reduce:
+ Optimize all the .align calls

View File

@ -43,7 +43,7 @@ X_OLD = $FD
X_OLDER = $FE
FWTEMP = $FF
.align $100
;.align $100
;===========================
; LAUNCH_FIREWORK

View File

@ -29,7 +29,9 @@ MIXCLR = $C052
HISCR = $C055
.align $100
;.align $100
.assert >hgr = >hgr_after, error, "hgr crosses page"
;==========================
; HGR
@ -68,9 +70,18 @@ bkgnd_loop:
and #$1f ; see if $40 or $60
bne bkgnd_loop
rts
hgr_after:
.assert >msktbl = >msktbl_after, error, "msktbl crosses page"
msktbl: .byte $81,$82,$84,$88,$90,$A0,$C0 ; original
msktbl_after:
.align $100
.assert >hposn = >hposn_after, error, "hposn crosses page"
;====================================================
; HPOSN
@ -220,22 +231,6 @@ done_mod:
;===========
; 23
;=====================================
; HPLOT0
;=====================================
; point in (YX),A
; 244 cycles
hplot0:
; F457
jsr hposn ; 6+210
lda HGR_BITS ; 3
eor (GBASL),y ; 5+
and HMASK ; 3
eor (GBASL),y ; 5+
sta (GBASL),y ; 6
rts ; 6
;============
; 244
;===================================
; COLOR_SHIFT
@ -259,7 +254,34 @@ done_color_shift:
nop ; 2
rts ; 6
.align $100
hposn_after:
;.align $100
.assert >hplot0 = >hplot0_after, error, "hplot0 crosses page"
;=====================================
; HPLOT0
;=====================================
; point in (YX),A
; 244 cycles
hplot0:
; F457
jsr hposn ; 6+210
lda HGR_BITS ; 3
eor (GBASL),y ; 5+
and HMASK ; 3
eor (GBASL),y ; 5+
sta (GBASL),y ; 6
rts ; 6
;============
; 244
hplot0_after:
.assert >hcolor_equals = >hcolor_equals_after, error, "hce crosses page"
;=============================
; HCOLOR_EQUALS
@ -278,3 +300,4 @@ hcolor_equals:
colortbl:
.byte $00,$2A,$55,$7F,$80,$AA,$D5,$FF
hcolor_equals_after:

View File

@ -3,6 +3,8 @@
.align $100
.assert >fw_letters = >fw_letters_done, error, "fw_letters crosses page"
fw_letters:
; .byte 22,28,
.byte " ",128
@ -61,7 +63,9 @@ fw_letters:
.byte 255
;.align $100
fw_letters_done:
.align $100
letters_bm:
;.byte 1,12

View File

@ -48,6 +48,8 @@ apple_iie:
; jsr arriving_there
; jsr fireworks
; C64 Opening Sequence
jsr c64_opener
@ -115,7 +117,7 @@ apple_iie:
.include "gr_hline.s"
.include "vapor_lock.s"
.include "delay_a.s"
.include "wait_keypress.s"
; .include "wait_keypress.s"
.include "random16.s"
.align $100
.include "fireworks.s"

View File

@ -10,6 +10,8 @@
; all forced to be 126
.assert >move_letters = >move_letters_after, error, "move_letters crosses page"
move_letters:
ldy WAITING ; 3
beq not_waiting ; 3
@ -188,3 +190,5 @@ waste_28:
inc BLARGH ; 5
inc BLARGH ; 5
rts ; 6
move_letters_after:

View File

@ -11,6 +11,8 @@ SEEDH = $4F
XOR_MAGIC = $7657 ; "vW"
.assert >random16 = >random16_after, error, "random16 crosses page"
;=============================
; random16
;=============================
@ -116,4 +118,4 @@ cep:
random16_after: