mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-27 15:29:47 +00:00
tfv: back to where we were before we started messing with page flipping
This commit is contained in:
parent
2b9a86f35a
commit
05ba5f99eb
@ -48,7 +48,7 @@ backgrounds.inc: $(PNG2RLE) \
|
|||||||
TFV: tfv.o
|
TFV: tfv.o
|
||||||
ld65 -o TFV tfv.o -C ./apple2_1000.inc
|
ld65 -o TFV tfv.o -C ./apple2_1000.inc
|
||||||
|
|
||||||
tfv.o: tfv.s opener.s utils.s backgrounds.inc zp.inc
|
tfv.o: tfv.s opener.s title.s utils.s backgrounds.inc zp.inc
|
||||||
ca65 -o tfv.o tfv.s -l tfv.lst
|
ca65 -o tfv.o tfv.s -l tfv.lst
|
||||||
|
|
||||||
|
|
||||||
|
53
tfv/tfv.s
53
tfv/tfv.s
@ -1,31 +1,34 @@
|
|||||||
.include "zp.inc"
|
.include "zp.inc"
|
||||||
|
|
||||||
|
;================================
|
||||||
|
; Clear screen and setup graphics
|
||||||
|
;================================
|
||||||
|
|
||||||
jsr HOME
|
jsr HOME
|
||||||
jsr set_gr_page0
|
jsr set_gr_page0
|
||||||
|
|
||||||
|
;===================================
|
||||||
|
; zero out the zero page that we use
|
||||||
|
;===================================
|
||||||
|
|
||||||
; memset()
|
; memset()
|
||||||
|
|
||||||
; Clear page0 to 00
|
;===================================
|
||||||
|
; Clear top/bottom of page 0
|
||||||
|
;===================================
|
||||||
|
|
||||||
lda #$0
|
lda #$0
|
||||||
sta DRAW_PAGE
|
sta DRAW_PAGE
|
||||||
jsr clear_top
|
jsr clear_top
|
||||||
|
|
||||||
; Clear bottom page0 to ' '
|
|
||||||
jsr clear_bottom
|
jsr clear_bottom
|
||||||
|
|
||||||
; clc
|
;===================================
|
||||||
;infinite:
|
; Clear top/bottom of page 1
|
||||||
; bcc infinite
|
;===================================
|
||||||
|
|
||||||
; Clear page1 to 00
|
|
||||||
|
|
||||||
lda #$4
|
lda #$4
|
||||||
sta DRAW_PAGE
|
sta DRAW_PAGE
|
||||||
jsr clear_top
|
jsr clear_top
|
||||||
|
|
||||||
; Clear bottom page1 to ' '
|
|
||||||
jsr clear_bottom
|
jsr clear_bottom
|
||||||
|
|
||||||
;==========================
|
;==========================
|
||||||
@ -38,32 +41,7 @@
|
|||||||
; show the title screen
|
; show the title screen
|
||||||
;======================
|
;======================
|
||||||
|
|
||||||
title_screen:
|
jsr title_screen
|
||||||
|
|
||||||
jsr CLRTOP
|
|
||||||
|
|
||||||
lda #$c
|
|
||||||
sta BASH
|
|
||||||
lda #$0
|
|
||||||
sta BASL ; load image off-screen 0xc00
|
|
||||||
|
|
||||||
lda #>(title_rle)
|
|
||||||
sta GBASH
|
|
||||||
lda #<(title_rle)
|
|
||||||
sta GBASL
|
|
||||||
jsr load_rle_gr
|
|
||||||
|
|
||||||
jsr gr_copy
|
|
||||||
|
|
||||||
lda #20
|
|
||||||
sta YPOS
|
|
||||||
lda #20
|
|
||||||
sta XPOS
|
|
||||||
|
|
||||||
jsr gr_copy
|
|
||||||
|
|
||||||
jsr wait_until_keypressed
|
|
||||||
|
|
||||||
|
|
||||||
enter_name:
|
enter_name:
|
||||||
|
|
||||||
@ -165,7 +143,7 @@ flying_start:
|
|||||||
jsr set_gr_page0
|
jsr set_gr_page0
|
||||||
|
|
||||||
flying_loop:
|
flying_loop:
|
||||||
jsr gr_copy
|
jsr gr_copy_to_current
|
||||||
|
|
||||||
jsr put_sprite
|
jsr put_sprite
|
||||||
|
|
||||||
@ -228,6 +206,7 @@ exit:
|
|||||||
|
|
||||||
.include "opener.s"
|
.include "opener.s"
|
||||||
.include "utils.s"
|
.include "utils.s"
|
||||||
|
.include "title.s"
|
||||||
|
|
||||||
;===============================================
|
;===============================================
|
||||||
; Variables
|
; Variables
|
||||||
|
12
tfv/utils.s
12
tfv/utils.s
@ -57,6 +57,8 @@ load_rle_gr:
|
|||||||
iny ; (we should check if we had
|
iny ; (we should check if we had
|
||||||
; bad luck and overflows page)
|
; bad luck and overflows page)
|
||||||
|
|
||||||
|
iny ; skip ysize
|
||||||
|
|
||||||
rle_loop:
|
rle_loop:
|
||||||
lda (GBASL),y ; load run value
|
lda (GBASL),y ; load run value
|
||||||
cmp #$ff ; if 0xff
|
cmp #$ff ; if 0xff
|
||||||
@ -159,12 +161,12 @@ set_gr_page0:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
;=========================================================
|
;=========================================================
|
||||||
; gr_copy
|
; gr_copy_to_current
|
||||||
;=========================================================
|
;=========================================================
|
||||||
; for now copy 0xc00 to 0x400
|
; copy 0xc00 to DRAW_PAGE
|
||||||
; 2 + 8*38 + 4*80*23 + 4*120*26 + 13 = 20,159 = 20ms = 50Hz
|
; 2 + 8*38 + 4*80*23 + 4*120*26 + 13 = 20,159 = 20ms = 50Hz
|
||||||
;
|
;
|
||||||
gr_copy:
|
gr_copy_to_current:
|
||||||
ldx #0 ; set y to zero ; 2
|
ldx #0 ; set y to zero ; 2
|
||||||
|
|
||||||
gr_copy_loop:
|
gr_copy_loop:
|
||||||
@ -176,7 +178,9 @@ gr_copy_loop:
|
|||||||
sta OUTL ; out and in are the same ; 3
|
sta OUTL ; out and in are the same ; 3
|
||||||
sta INL ; 3
|
sta INL ; 3
|
||||||
lda gr_offsets+1,Y ; lookup high byte for line addr ; 5
|
lda gr_offsets+1,Y ; lookup high byte for line addr ; 5
|
||||||
|
adc DRAW_PAGE
|
||||||
sta OUTH ; 3
|
sta OUTH ; 3
|
||||||
|
lda gr_offsets+1,Y ; lookup high byte for line addr ; 5
|
||||||
adc #$8 ; for now, fixed 0xc ; 2
|
adc #$8 ; for now, fixed 0xc ; 2
|
||||||
sta INH ; 3
|
sta INH ; 3
|
||||||
ldx TEMP ; restore y ; 3
|
ldx TEMP ; restore y ; 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user