second: work on lens code

this is mostly just moving things around and trying not to break it
This commit is contained in:
Vince Weaver 2023-11-02 11:38:10 -04:00
parent e37536bb2d
commit 4215f84611
4 changed files with 105 additions and 105 deletions

View File

@ -3,8 +3,9 @@ include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
PNG2GR = ../../../../utils/gr-utils/png2gr
PNG2SPRITES = ../../../../utils/gr-utils/png2sprites
all: lenspic.gr.zx02
all: lenspic.gr.zx02 lens_sprites.inc
####
@ -14,6 +15,13 @@ lenspic.gr.zx02: lenspic.gr
lenspic.gr: lenspic.png
$(PNG2GR) lenspic.png lenspic.gr
####
lens_sprites.inc: lens_sprites.png
$(PNG2SPRITES) lens_sprites.png lens_sprite 0 0 11 24 > lens_sprites.inc
$(PNG2SPRITES) lens_sprites.png lens_mask 13 0 11 24 >> lens_sprites.inc
####

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -19,27 +19,109 @@ lens_start:
sta current_pattern_smc+1
jsr pt3_set_pattern
;================================
; Clear screen and setup graphics
;================================
bit SET_GR
bit HIRES
bit FULLGR
bit PAGE1
bit PAGE1 ; set page 1
bit LORES ; Lo-res graphics
;================================
; ROTO
;================================
lda #0
sta DISP_PAGE
lda #4
sta DRAW_PAGE
;===================================
; Clear top/bottom of page 0 and 1
;===================================
jsr clear_screens
;===================================
; init the multiply tables
;===================================
jsr init_multiply_tables
;======================
; show the title screen
;======================
; Title Screen
title_screen:
load_background:
;===========================
; Clear both bottoms
; jsr clear_bottoms
;=============================
; Load title
lda #<lens_zx02
sta zx_src_l+1
lda #>lens_zx02
sta zx_src_h+1
lda #$40
jsr zx02_full_decomp
;=================================
; copy to both pages
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
; wait
; TODO: draw lens
lda #15
jsr wait_seconds
;=================================
;=================================
; do rotozoom
;=================================
;=================================
jsr do_rotozoom
lens_end:
rts
;===============================================
; External modules
;===============================================
.include "roto.s"
.include "rotozoom.s"
.include "../gr_pageflip.s"
;.include "../gr_fast_clear.s"
.include "../gr_copy.s"
.include "../gr_offsets.s"
.include "../c00_scrn_offsets.s"
.include "../multiply_fast.s"
.include "../wait_keypress.s"
.include "../zx02_optim.s"
.include "../irq_wait.s"
.include "roto.s"
;===============================================
; Data
;===============================================
lens_zx02:
.incbin "graphics/lenspic.gr.zx02"

View File

@ -1,76 +1,6 @@
; do a (hopefully fast) roto-zoom
do_rotozoom:
;================================
; Clear screen and setup graphics
;================================
bit PAGE1 ; set page 1
bit LORES ; Lo-res graphics
lda #0
sta DISP_PAGE
lda #4
sta DRAW_PAGE
;===================================
; Clear top/bottom of page 0 and 1
;===================================
jsr clear_screens
;===================================
; init the multiply tables
;===================================
jsr init_multiply_tables
;======================
; show the title screen
;======================
; Title Screen
title_screen:
load_background:
;===========================
; Clear both bottoms
; jsr clear_bottoms
;=============================
; Load title
lda #<lens_zx02
sta zx_src_l+1
lda #>lens_zx02
sta zx_src_h+1
lda #$40
jsr zx02_full_decomp
;=================================
; copy to both pages
jsr gr_copy_to_current
jsr page_flip
jsr gr_copy_to_current
; wait
; TODO: draw lens
lda #15
jsr wait_seconds
;=================================
; main loop
@ -88,7 +18,9 @@ main_loop:
jsr page_flip
;============================
; wait for end
;============================
lda #47
jsr wait_for_pattern
@ -97,6 +29,10 @@ main_loop:
rts
no_keypress:
clc
@ -170,29 +106,3 @@ scaleaddl: .byte $10
scaleaddh: .byte $00
;===============================================
; External modules
;===============================================
.include "rotozoom.s"
.include "../gr_pageflip.s"
;.include "../gr_fast_clear.s"
.include "../gr_copy.s"
.include "../gr_offsets.s"
.include "../c00_scrn_offsets.s"
.include "../multiply_fast.s"
;===============================================
; Data
;===============================================
lens_zx02:
.incbin "graphics/lenspic.gr.zx02"