mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
mode7: more work on starfield
This commit is contained in:
parent
7ecbf2ef7a
commit
f20186cf9f
@ -11,3 +11,5 @@
|
|||||||
+ Pause longer at end
|
+ Pause longer at end
|
||||||
|
|
||||||
+ Loading, make it full screen hires
|
+ Loading, make it full screen hires
|
||||||
|
|
||||||
|
+ Use compressed data as the "random" data for the starfields?
|
||||||
|
@ -128,10 +128,10 @@ mockingboard_setup_done:
|
|||||||
;================================
|
;================================
|
||||||
|
|
||||||
main_loop:
|
main_loop:
|
||||||
jsr title_routine
|
; jsr title_routine
|
||||||
|
|
||||||
jsr checkerboard_demo
|
; jsr checkerboard_demo
|
||||||
jsr island_demo
|
; jsr island_demo
|
||||||
jsr star_demo
|
jsr star_demo
|
||||||
jsr star_credits
|
jsr star_credits
|
||||||
|
|
||||||
|
@ -6,15 +6,16 @@ NUMSTARS EQU 16
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Plan:
|
; State Number Length Speed BGColor CLS
|
||||||
; Ship at rest 0 - 4
|
; =========== ====== ====== ===== ======= ===
|
||||||
; Flash 5
|
; Ship at rest 0 64 0 black 1
|
||||||
; Ship at warp 25
|
; Flash 1 8 3 blue 1
|
||||||
; Crazy background
|
; Moving stars 2 64 5 black 1
|
||||||
; Ship moves off
|
; Crazy stars 3 64 5 black 0
|
||||||
; Back to stars
|
; Ship moves off 4 64 5 black 1
|
||||||
; Rasterbars+credits
|
; Shrinking line 5 64 5 black 1
|
||||||
; Done
|
; Back to stars 6 256 5 black 1
|
||||||
|
; Done 7
|
||||||
|
|
||||||
;=====================
|
;=====================
|
||||||
;=====================
|
;=====================
|
||||||
@ -40,9 +41,11 @@ starfield_demo:
|
|||||||
lda #0 ; 2
|
lda #0 ; 2
|
||||||
sta DRAW_PAGE ; 3
|
sta DRAW_PAGE ; 3
|
||||||
sta RANDOM_POINTER ; 3
|
sta RANDOM_POINTER ; 3
|
||||||
|
sta STATE
|
||||||
; always multiply with low byte as zero
|
; always multiply with low byte as zero
|
||||||
sta NUM2L ; 3
|
sta NUM2L ; 3
|
||||||
sta FRAME_COUNT
|
sta FRAME_COUNT
|
||||||
|
sta SPEED
|
||||||
|
|
||||||
ldy #(NUMSTARS-1) ; 2
|
ldy #(NUMSTARS-1) ; 2
|
||||||
init_stars:
|
init_stars:
|
||||||
@ -61,12 +64,30 @@ starfield_loop:
|
|||||||
;===============
|
;===============
|
||||||
; clear screen
|
; clear screen
|
||||||
;===============
|
;===============
|
||||||
|
; check clear screen state machine
|
||||||
|
|
||||||
|
lda STATE ; get state
|
||||||
|
|
||||||
|
cmp #3 ; state 3 -- don't clear
|
||||||
|
beq no_clear
|
||||||
|
|
||||||
|
cmp #1 ; state 1 -- blue background
|
||||||
|
bne black_back
|
||||||
|
lda #COLOR_BOTH_LIGHTBLUE
|
||||||
|
bne back_color
|
||||||
|
black_back:
|
||||||
|
lda #0 ; otherwise, black background
|
||||||
|
back_color:
|
||||||
|
sta clear_all_color+1
|
||||||
|
|
||||||
jsr clear_all ; 6+
|
jsr clear_all ; 6+
|
||||||
; 6047
|
; 6047
|
||||||
|
no_clear:
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; draw the stars
|
; draw the stars
|
||||||
;===============
|
;===============
|
||||||
|
|
||||||
jsr draw_stars
|
jsr draw_stars
|
||||||
|
|
||||||
;================
|
;================
|
||||||
@ -94,14 +115,21 @@ starfield_loop:
|
|||||||
inc FRAME_COUNT
|
inc FRAME_COUNT
|
||||||
lda FRAME_COUNT
|
lda FRAME_COUNT
|
||||||
cmp #$ff
|
cmp #$ff
|
||||||
|
|
||||||
beq done_stars
|
beq done_stars
|
||||||
|
|
||||||
;==================
|
;==================
|
||||||
; loop
|
; loop
|
||||||
;==================
|
;==================
|
||||||
|
near_loop:
|
||||||
jmp starfield_loop ; 3
|
jmp starfield_loop ; 3
|
||||||
done_stars:
|
done_stars:
|
||||||
|
|
||||||
|
inc STATE
|
||||||
|
lda STATE
|
||||||
|
cmp #$5
|
||||||
|
bne near_loop
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@ -159,11 +187,14 @@ init_stars2:
|
|||||||
|
|
||||||
jsr init_credits
|
jsr init_credits
|
||||||
|
|
||||||
|
|
||||||
|
;===========================
|
||||||
;===========================
|
;===========================
|
||||||
;===========================
|
;===========================
|
||||||
; StarCredits Loop
|
; StarCredits Loop
|
||||||
;===========================
|
;===========================
|
||||||
;===========================
|
;===========================
|
||||||
|
;===========================
|
||||||
|
|
||||||
starcredits_loop:
|
starcredits_loop:
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ MB_ADDRH EQU $94
|
|||||||
MB_CHUNK_OFFSET EQU $95
|
MB_CHUNK_OFFSET EQU $95
|
||||||
MB_DETECTED EQU $96
|
MB_DETECTED EQU $96
|
||||||
WHICH_CHUNK EQU $97
|
WHICH_CHUNK EQU $97
|
||||||
|
STATE EQU $98
|
||||||
|
|
||||||
; More zero-page addresses
|
; More zero-page addresses
|
||||||
; we try not to conflict with anything DOS, MONITOR or BASIC related
|
; we try not to conflict with anything DOS, MONITOR or BASIC related
|
||||||
|
Loading…
Reference in New Issue
Block a user