plasmag: try to optimize

This commit is contained in:
Vince Weaver 2023-09-07 15:26:57 -04:00
parent 2aca9de337
commit 0cf99d0216
2 changed files with 26 additions and 6 deletions

View File

@ -85,7 +85,7 @@ make_tables:
lda #$40
sta thirty_two+1
; ideally, convert 4->3
; ideally, convert input4->input3
; load 3 input (assume on same page)
lda #<three_input
sta sin_table_input1_smc+1

View File

@ -32,16 +32,14 @@ PARAM4 = $63
; =============================================================================
plasma_debut:
jsr HGR
jsr HGR ; have table gen appear on hgr page1
bit FULLGR
jsr make_tables
; bit PAGE1 ; set page 1
; bit SET_GR ; set graphics
bit LORES ; set lo-res
bit LORES ; set lo-res
jsr init_lores_colors
jsr init_lores_colors ; FIXME: inline?
do_plasma:
; init
@ -155,6 +153,7 @@ init_lores_colors:
ldx #0
ldy #0
; 347
init_lores_colors_loop:
lda lores_colors_lookup,X
sta lores_colors_fine,Y
@ -171,6 +170,27 @@ init_lores_colors_loop:
and #$f
tax
jmp init_lores_colors_loop
.if 0
init_lores_colors_loop:
lda lores_colors_lookup,X
ldy #3
lol:
sta lores_colors_fine,Y
dey
bne lol
clc
lda #4
adc lol+1
sta lol+1
beq done_init_lores_colors
inx
txa
and #$f
tax
jmp init_lores_colors_loop
.endif
done_init_lores_colors:
rts