mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-25 14:26:11 +00:00
mode7_demo: start merging the credits in
This commit is contained in:
parent
00d3ecc0d9
commit
c37cb8d140
@ -27,7 +27,7 @@ mode7_demo.o: mode7_demo.s mode7_demo_backgrounds.inc sprites.inc \
|
|||||||
../asm_routines/gr_fade.s \
|
../asm_routines/gr_fade.s \
|
||||||
../asm_routines/gr_copy.s \
|
../asm_routines/gr_copy.s \
|
||||||
../asm_routines/gr_scroll.s \
|
../asm_routines/gr_scroll.s \
|
||||||
mode7.s rasterbars.s starfield_demo.s
|
credits.s mode7.s rasterbars.s starfield_demo.s
|
||||||
ca65 -o mode7_demo.o mode7_demo.s -l mode7_demo.lst
|
ca65 -o mode7_demo.o mode7_demo.s -l mode7_demo.lst
|
||||||
|
|
||||||
|
|
||||||
|
301
mode7_demo/credits.s
Normal file
301
mode7_demo/credits.s
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
; Closing Credits
|
||||||
|
|
||||||
|
;===========
|
||||||
|
; CONSTANTS
|
||||||
|
;===========
|
||||||
|
NUM_CREDITS EQU 10
|
||||||
|
|
||||||
|
;===============
|
||||||
|
; Init screen
|
||||||
|
;===============
|
||||||
|
|
||||||
|
;===========================
|
||||||
|
;===========================
|
||||||
|
; Main Loop
|
||||||
|
;===========================
|
||||||
|
;===========================
|
||||||
|
|
||||||
|
forever_loop:
|
||||||
|
ldx #0
|
||||||
|
stx YY
|
||||||
|
|
||||||
|
lda #>credits
|
||||||
|
sta OUTH
|
||||||
|
lda #<credits
|
||||||
|
sta OUTL
|
||||||
|
|
||||||
|
outer_loop:
|
||||||
|
|
||||||
|
|
||||||
|
credit_loop:
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
lda (OUTL),Y
|
||||||
|
|
||||||
|
clc
|
||||||
|
adc #7
|
||||||
|
|
||||||
|
sta CH
|
||||||
|
|
||||||
|
lda #22
|
||||||
|
sta CV
|
||||||
|
|
||||||
|
lda #$f6 ; - 10
|
||||||
|
sta XX
|
||||||
|
inner_loop:
|
||||||
|
|
||||||
|
jsr htab_vtab
|
||||||
|
|
||||||
|
ldy #1
|
||||||
|
print_loop:
|
||||||
|
lda (OUTL),Y
|
||||||
|
beq done_print
|
||||||
|
|
||||||
|
clc
|
||||||
|
adc XX
|
||||||
|
|
||||||
|
ora #$80
|
||||||
|
sta (BASL),Y
|
||||||
|
iny
|
||||||
|
jmp print_loop
|
||||||
|
done_print:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; flip pages
|
||||||
|
;==================
|
||||||
|
|
||||||
|
jsr page_flip ; 6
|
||||||
|
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; delay?
|
||||||
|
;==================
|
||||||
|
|
||||||
|
lda #$C0
|
||||||
|
bit SPEAKER
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
ldx XX
|
||||||
|
inx
|
||||||
|
stx XX
|
||||||
|
cpx #1
|
||||||
|
bne inner_loop
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; Delay since done
|
||||||
|
;==================
|
||||||
|
|
||||||
|
lda #$F0
|
||||||
|
jsr WAIT
|
||||||
|
lda #$F0
|
||||||
|
jsr WAIT
|
||||||
|
lda #$F0
|
||||||
|
jsr WAIT
|
||||||
|
lda #$F0
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; Next credit
|
||||||
|
;==================
|
||||||
|
|
||||||
|
lda #8
|
||||||
|
sta CH
|
||||||
|
lda #22
|
||||||
|
sta CV
|
||||||
|
|
||||||
|
lda OUTH
|
||||||
|
pha
|
||||||
|
lda OUTL
|
||||||
|
pha
|
||||||
|
|
||||||
|
lda #>empty
|
||||||
|
sta OUTH
|
||||||
|
lda #<empty
|
||||||
|
sta OUTL
|
||||||
|
|
||||||
|
jsr print_both_pages
|
||||||
|
|
||||||
|
pla
|
||||||
|
sta OUTL
|
||||||
|
pla
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
skip_credit:
|
||||||
|
lda (OUTL),Y
|
||||||
|
|
||||||
|
inc OUTL
|
||||||
|
bne overflow
|
||||||
|
inc OUTH
|
||||||
|
overflow:
|
||||||
|
cmp #0
|
||||||
|
beq done_skip
|
||||||
|
jmp skip_credit
|
||||||
|
done_skip:
|
||||||
|
|
||||||
|
ldx YY
|
||||||
|
inx
|
||||||
|
stx YY
|
||||||
|
cpx #10
|
||||||
|
beq forever
|
||||||
|
jmp outer_loop
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; loop forever
|
||||||
|
;==================
|
||||||
|
forever:
|
||||||
|
jmp forever_loop ; 3
|
||||||
|
|
||||||
|
|
||||||
|
;===============================
|
||||||
|
; draw the above-credits chrome
|
||||||
|
;===============================
|
||||||
|
|
||||||
|
credits_draw_bottom:
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
; HLIN Y, V2 AT A
|
||||||
|
ldy #7
|
||||||
|
lda #32
|
||||||
|
sta V2
|
||||||
|
lda #38
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
lda #$75
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
; hlin_double(PAGE0,0,6,38);
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
lda #6
|
||||||
|
sta V2
|
||||||
|
lda #38
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(PAGE0,33,40,38);
|
||||||
|
|
||||||
|
ldy #33
|
||||||
|
lda #40
|
||||||
|
sta V2
|
||||||
|
lda #38
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(PAGE0,8,31,36);
|
||||||
|
|
||||||
|
ldy #8
|
||||||
|
lda #31
|
||||||
|
sta V2
|
||||||
|
lda #36
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
lda #$70
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
; hlin_double(PAGE0,7,7,36);
|
||||||
|
|
||||||
|
ldy #7
|
||||||
|
lda #7
|
||||||
|
sta V2
|
||||||
|
lda #36
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(PAGE0,32,32,36);
|
||||||
|
ldy #32
|
||||||
|
lda #32
|
||||||
|
sta V2
|
||||||
|
lda #36
|
||||||
|
jsr hlin_double ; make this a jump and tail-call?
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
;============================
|
||||||
|
; Draw text mode boilerplate
|
||||||
|
;============================
|
||||||
|
credits_draw_text_background:
|
||||||
|
; text wings
|
||||||
|
|
||||||
|
lda #$20
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
; hlin_double(0,7,40)
|
||||||
|
ldy #0
|
||||||
|
lda #7
|
||||||
|
sta V2
|
||||||
|
lda #40
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(32,40,40)
|
||||||
|
ldy #32
|
||||||
|
lda #40
|
||||||
|
sta V2
|
||||||
|
lda #40
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(0,7,44)
|
||||||
|
ldy #0
|
||||||
|
lda #7
|
||||||
|
sta V2
|
||||||
|
lda #44
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(0,7,44)
|
||||||
|
ldy #32
|
||||||
|
lda #40
|
||||||
|
sta V2
|
||||||
|
lda #44
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
; hlin_double(7,33,48)
|
||||||
|
ldy #7
|
||||||
|
lda #32
|
||||||
|
sta V2
|
||||||
|
lda #46
|
||||||
|
jsr hlin_double
|
||||||
|
|
||||||
|
lda #11
|
||||||
|
sta CH
|
||||||
|
lda #20
|
||||||
|
sta CV
|
||||||
|
|
||||||
|
lda #>thankz
|
||||||
|
sta OUTH
|
||||||
|
lda #<thankz
|
||||||
|
sta OUTL
|
||||||
|
|
||||||
|
jsr move_and_print
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
empty:
|
||||||
|
.asciiz " "
|
||||||
|
|
||||||
|
; offset can't be 0 or it confuses the next-credit code
|
||||||
|
credits:
|
||||||
|
.byte 7
|
||||||
|
.asciiz "FROGGYSUE"
|
||||||
|
.byte 7
|
||||||
|
.asciiz "PIANOMAN08"
|
||||||
|
.byte 7
|
||||||
|
.asciiz "UTOPIA BBS"
|
||||||
|
.byte 5
|
||||||
|
.asciiz "THE 7HORSEMEN"
|
||||||
|
.byte 2
|
||||||
|
.asciiz "WEAVE'S WORLD TALKER"
|
||||||
|
.byte 6
|
||||||
|
.asciiz "STEALTHSUSIE"
|
||||||
|
.byte 3
|
||||||
|
.asciiz "ECE GRAD BOWLING"
|
||||||
|
.byte 6
|
||||||
|
.asciiz "CORNELL GCF"
|
||||||
|
.byte 1
|
||||||
|
.asciiz "ALL MSTIES EVERYWHERE"
|
||||||
|
.byte 10
|
||||||
|
.asciiz "..."
|
||||||
|
|
||||||
|
thankz:
|
||||||
|
.asciiz "SPECIAL THANKS TO:"
|
||||||
|
|
@ -17,10 +17,10 @@
|
|||||||
;================================
|
;================================
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@ -210,6 +210,7 @@ title_routine:
|
|||||||
.include "../asm_routines/gr_scroll.s"
|
.include "../asm_routines/gr_scroll.s"
|
||||||
.include "../asm_routines/gr_offsets.s"
|
.include "../asm_routines/gr_offsets.s"
|
||||||
.include "../asm_routines/gr_plot.s"
|
.include "../asm_routines/gr_plot.s"
|
||||||
|
.include "../asm_routines/text_print.s"
|
||||||
|
|
||||||
.include "mode7.s"
|
.include "mode7.s"
|
||||||
|
|
||||||
@ -224,3 +225,4 @@ title_routine:
|
|||||||
.include "a2.scrolltext"
|
.include "a2.scrolltext"
|
||||||
.include "starfield_demo.s"
|
.include "starfield_demo.s"
|
||||||
.include "rasterbars.s"
|
.include "rasterbars.s"
|
||||||
|
.include "credits.s"
|
||||||
|
@ -16,11 +16,14 @@ NUMSTARS EQU 16
|
|||||||
; Rasterbars+credits
|
; Rasterbars+credits
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
|
;=====================
|
||||||
|
;=====================
|
||||||
;=====================
|
;=====================
|
||||||
; Starfield Demo
|
; Starfield Demo
|
||||||
;=====================
|
;=====================
|
||||||
|
;=====================
|
||||||
|
;=====================
|
||||||
|
|
||||||
starfield_demo:
|
starfield_demo:
|
||||||
|
|
||||||
;================================
|
;================================
|
||||||
@ -103,9 +106,13 @@ done_stars:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;=====================
|
||||||
|
;=====================
|
||||||
;=====================
|
;=====================
|
||||||
; Starfield Credits
|
; Starfield Credits
|
||||||
;=====================
|
;=====================
|
||||||
|
;=====================
|
||||||
|
;=====================
|
||||||
starfield_credits:
|
starfield_credits:
|
||||||
|
|
||||||
;================================
|
;================================
|
||||||
@ -115,6 +122,13 @@ starfield_credits:
|
|||||||
jsr clear_screens ; clear top/bottom of page 0/1
|
jsr clear_screens ; clear top/bottom of page 0/1
|
||||||
jsr set_gr_page0
|
jsr set_gr_page0
|
||||||
|
|
||||||
|
lda #0 ; 2
|
||||||
|
sta DRAW_PAGE
|
||||||
|
jsr credits_draw_text_background
|
||||||
|
lda #4 ; 2
|
||||||
|
sta DRAW_PAGE
|
||||||
|
jsr credits_draw_text_background
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; Init Variables
|
; Init Variables
|
||||||
;===============
|
;===============
|
||||||
@ -143,8 +157,8 @@ starcredits_loop:
|
|||||||
;===============
|
;===============
|
||||||
; clear screen
|
; clear screen
|
||||||
;===============
|
;===============
|
||||||
jsr clear_all ; 6+
|
jsr clear_top ; 6+
|
||||||
; 6047
|
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; draw the stars
|
; draw the stars
|
||||||
@ -162,6 +176,7 @@ starcredits_loop:
|
|||||||
;====================
|
;====================
|
||||||
|
|
||||||
|
|
||||||
|
jsr credits_draw_bottom
|
||||||
|
|
||||||
;==================
|
;==================
|
||||||
; flip pages
|
; flip pages
|
||||||
|
Loading…
Reference in New Issue
Block a user