219 lines
3.4 KiB
ArmAsm
Raw Normal View History

2021-04-05 17:32:24 -04:00
;======================
; scroll credits
;======================
end_credits:
2021-04-18 00:01:38 -04:00
lda KEYRESET
bit SET_TEXT ; switch to text mode
; clear to space
lda #$a0
sta clear_all_color+1
; X is starting YPOS to print at
2021-04-18 14:48:26 -04:00
ldx #48
stx YPOS
2021-04-05 17:32:24 -04:00
scroll_loop:
2021-04-18 00:01:38 -04:00
jsr clear_all ; trashes A,Y
2021-04-05 17:32:24 -04:00
2021-04-18 14:48:26 -04:00
ldy #0 ; credit offset
ldx YPOS
2021-04-05 17:32:24 -04:00
print_loop:
2021-04-18 14:48:26 -04:00
cpx #48
bcs after_print
2021-04-05 17:32:24 -04:00
2021-04-18 14:48:26 -04:00
cpy #48
bcs after_print
; write next line
2021-04-05 17:32:24 -04:00
2021-04-18 00:01:38 -04:00
;============================
; set BASL/BASH to offset w Y
2021-04-05 17:32:24 -04:00
2021-04-18 14:48:26 -04:00
lda gr_offsets,X
2021-04-18 00:01:38 -04:00
sta BASL
2021-04-18 14:48:26 -04:00
lda gr_offsets+1,X
2021-04-18 00:01:38 -04:00
clc
adc DRAW_PAGE
sta BASH
2021-04-18 14:48:26 -04:00
; get credit line
lda credit_list,Y
sta OUTL
lda credit_list+1,Y
sta OUTH
tya
pha
2021-04-18 00:01:38 -04:00
;============================
; print the string
2021-04-18 14:48:26 -04:00
jsr print_string ; trashes Y
2021-04-05 17:32:24 -04:00
pla
tay
2021-04-18 14:48:26 -04:00
after_print:
2021-04-05 17:32:24 -04:00
2021-04-18 14:48:26 -04:00
inx
inx
2021-04-18 00:01:38 -04:00
2021-04-18 14:48:26 -04:00
iny
iny
cpx #48 ; if off screen, don't print
2021-04-05 17:32:24 -04:00
bne print_loop
2021-04-18 00:01:38 -04:00
;====================
; done printing
2021-04-18 14:48:26 -04:00
jsr page_flip ; flip page
2021-04-18 00:01:38 -04:00
;====================
; delay a bit
2021-04-18 14:48:26 -04:00
;====================
; 400ms normally
; if credits on screen, wait much longer
2021-04-18 00:01:38 -04:00
2021-04-18 14:48:26 -04:00
ldx YPOS
cpx #0
beq credits_long_pause
credits_short_pause:
2021-04-18 00:01:38 -04:00
ldx #40 ; time to sleep (X*10ms)
jsr long_wait ; trashes A,X
2021-04-18 14:48:26 -04:00
jmp credits_done_pause
2021-04-05 17:32:24 -04:00
2021-04-18 14:48:26 -04:00
credits_long_pause:
2021-04-18 00:01:38 -04:00
; actual games pauses 10s, then scrolls again
; delay 6s?
ldx #200
jsr long_wait
ldx #200
jsr long_wait
2021-04-05 17:32:24 -04:00
ldx #200
jsr long_wait
2021-04-18 14:48:26 -04:00
credits_done_pause:
bit KEYRESET
;===================
; scroll
dec YPOS
dec YPOS
lda YPOS
cmp #256-48 ; scroll until all off screen
bne scroll_loop
;============================================
; actual games pauses 10s, then scrolls again
;============================================
; delay 6s?
; ldx #200
; jsr long_wait
; ldx #200
; jsr long_wait
; ldx #200
; jsr long_wait
; jsr HOME
2021-04-05 17:32:24 -04:00
bit KEYRESET
;======================
2021-04-18 14:48:26 -04:00
; print final message
2021-04-05 17:32:24 -04:00
;======================
2021-04-18 14:48:26 -04:00
jsr clear_all
2021-04-05 17:32:24 -04:00
lda #<end_message
sta OUTL
lda #>end_message
sta OUTH
jsr move_and_print
2021-04-18 14:48:26 -04:00
jsr page_flip
2021-04-05 17:32:24 -04:00
rts
; 0123456789012345678901234567890123456789
; DESIGNED BY ..... ERIC CHAHI
;
; ARTWORK ......... ERIC CHAHI
;
; MUSIC BY ........ JEAN-FRANCOIS FREITAS
;
; SOUND EFFECTS
; JEAN-FRANCOIS FREITAS
; ERIC CHAHI
;
; APPLE II PORT
; VINCE WEAVER
;
; APPLE ][ FOREVER
credits0:.byte "",0
credits1:.byte " DESIGNED BY ..... ERIC CHAHI",0
2021-04-18 14:48:26 -04:00
;credits2:.byte "",0
2021-04-05 17:32:24 -04:00
credits3:.byte " ARTWORK ......... ERIC CHAHI",0
2021-04-18 14:48:26 -04:00
;credits4:.byte "",0
2021-04-05 17:32:24 -04:00
credits5:.byte " MUSIC BY ........ JEAN-FRANCOIS FREITAS",0
2021-04-18 14:48:26 -04:00
;credits6:.byte "",0
2021-04-05 17:32:24 -04:00
credits7:.byte " SOUND EFFECTS",0
credits8:.byte " JEAN-FRANCOIS FREITAS",0
credits9:.byte " ERIC CHAHI",0
2021-04-18 14:48:26 -04:00
;credits10:.byte "",0
2021-04-05 17:32:24 -04:00
credits11:.byte " APPLE II+ PORT",0
2021-04-18 14:48:26 -04:00
credits12:.byte " VINCE 'DEATER' WEAVER",0
;credits13:.byte "",0
2021-04-05 17:32:24 -04:00
credits14:.byte " APPLE ][ FOREVER",0
credit_list:
.word credits0 ; 0
.word credits0 ; 1
.word credits0 ; 2
.word credits1 ; 3
2021-04-18 14:48:26 -04:00
.word credits0 ; 4
2021-04-05 17:32:24 -04:00
.word credits3 ; 5
2021-04-18 14:48:26 -04:00
.word credits0 ; 6
2021-04-05 17:32:24 -04:00
.word credits5 ; 7
2021-04-18 14:48:26 -04:00
.word credits0 ; 8
2021-04-05 17:32:24 -04:00
.word credits0 ; 9
.word credits7 ; 10
.word credits8 ; 11
.word credits9 ; 12
2021-04-18 14:48:26 -04:00
.word credits0 ; 13
2021-04-05 17:32:24 -04:00
.word credits11 ; 14
.word credits12 ; 16
.word credits0 ; 15
.word credits0 ; 18
2021-04-18 14:48:26 -04:00
.word credits0 ; 17
2021-04-05 17:32:24 -04:00
.word credits14 ; 19
.word credits0 ; 20
.word credits0 ; 21
.word credits0 ; 22
2021-04-18 14:48:26 -04:00
.word credits0 ; 23
2021-04-05 17:32:24 -04:00
end_message:
.byte 6,10,"NOW GO BACK TO ANOTHER EARTH",0