starring: add deater

This commit is contained in:
Vince Weaver 2018-10-02 00:19:26 -04:00
parent bf8a21c628
commit ffc9d860b5
8 changed files with 239 additions and 125 deletions

View File

@ -27,6 +27,7 @@ megademo.o: megademo.s \
c64_opener.s c64.img.lz4 \ c64_opener.s c64.img.lz4 \
falling_apple.s apple_40_96.inc \ falling_apple.s apple_40_96.inc \
starring.s starring1.inc starring2.inc starring3.img.lz4\ starring.s starring1.inc starring2.inc starring3.img.lz4\
starring_people.s fs.inc FS_HGRC.BIN.lz4 deater.inc DEATER_HGRC.BIN.lz4\
check_email.s email_40_96.inc \ check_email.s email_40_96.inc \
bird_mountain.s \ bird_mountain.s \
fireworks.s fw_background.inc fw_state_machine.s fw.s \ fireworks.s fw_background.inc fw_state_machine.s fw.s \
@ -59,6 +60,30 @@ starring3.img.lz4: starring3.img
starring3.img: ./starring_3_hgr.png starring3.img: ./starring_3_hgr.png
../hgr-utils/png2hgr starring_3_hgr.png > starring3.img ../hgr-utils/png2hgr starring_3_hgr.png > starring3.img
####
fs.inc: ./fs.png
$(PNG_TO_RLE) asm ./fs.png fs > fs.inc
FS_HGRC.BIN.lz4: FS_HGRC.BIN
lz4 -f -16 FS_HGRC.BIN
FS_HGRC.BIN: fs_hgr.bmp
$(B2D) fs_hgr.bmp HGR -d
####
deater.inc: deater.png
$(PNG_TO_RLE) asm ./deater.png deater > deater.inc
DEATER_HGRC.BIN.lz4: DEATER_HGRC.BIN
lz4 -f -16 DEATER_HGRC.BIN
DEATER_HGRC.BIN: deater_hgr.bmp
$(B2D) deater_hgr.bmp HGR -d
#### ####
c64.img.lz4: c64.img c64.img.lz4: c64.img
@ -72,8 +97,6 @@ c64.img: c64_updated.png
D_HGRC.BIN: d_hgr.bmp D_HGRC.BIN: d_hgr.bmp
$(B2D) d_hgr.bmp HGR -d $(B2D) d_hgr.bmp HGR -d
FS_HGRC.BIN: fs_hgr.bmp
$(B2D) fs_hgr.bmp HGR -d
C64C.BIN: c64.bmp C64C.BIN: c64.bmp
$(B2D) c64.bmp HGR $(B2D) c64.bmp HGR

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

BIN
megademo/deater.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
megademo/deater_hgr.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

BIN
megademo/deater_hgr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -25,8 +25,6 @@ apple_iie:
;=================== ;===================
jsr HOME jsr HOME
jsr starring
; C64 Opening Sequence ; C64 Opening Sequence
jsr c64_opener jsr c64_opener
@ -38,6 +36,11 @@ apple_iie:
; Starring Screens ; Starring Screens
jsr starring jsr starring
jsr setup_people_fs
jsr starring_people
jsr setup_people_deater
jsr starring_people
; E-mail arriving ; E-mail arriving
jsr check_email jsr check_email
@ -75,6 +78,7 @@ loop_forever:
.include "c64_opener.s" .include "c64_opener.s"
.include "falling_apple.s" .include "falling_apple.s"
.include "starring.s" .include "starring.s"
.include "starring_people.s"
.include "check_email.s" .include "check_email.s"
.align $100 .align $100
.include "gr_offsets.s" .include "gr_offsets.s"

View File

@ -1,62 +1,17 @@
; Display Starring Message ; Display Starring w People
; 1st screen = triple page flip ; 2nd/3rd = split low/hires w tengwar wipe at bottom
; 2nd/3rd = split low/hires
starring: starring_people:
;=================== ;===================
; init screen ; init screen
jsr TEXT
jsr HOME
bit KEYRESET bit KEYRESET
;=================== ;===================
; init vars ; copy to page3
lda #0
sta DRAW_PAGE
;=============================
; Load graphic page0
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<starring1
sta GBASL
lda #>starring1
sta GBASH
jsr load_rle_gr
lda #4
sta DRAW_PAGE
jsr gr_copy_to_current ; copy to page1
; GR part
bit PAGE1
bit LORES ; 4
bit SET_GR ; 4
bit FULLGR ; 4
;=============================
; Load graphic page1
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<starring2
sta GBASL
lda #>starring2
sta GBASH
jsr load_rle_gr
lda #0 lda #0
sta DRAW_PAGE sta DRAW_PAGE
@ -92,18 +47,18 @@ starring:
; Try X=9 Y=6 cycles=307 ; Try X=9 Y=6 cycles=307
ldy #6 ; 2 ldy #6 ; 2
stloopA:ldx #9 ; 2 sploopA:ldx #9 ; 2
stloopB:dex ; 2 sploopB:dex ; 2
bne stloopB ; 2nt/3 bne sploopB ; 2nt/3
dey ; 2 dey ; 2
bne stloopA ; 2nt/3 bne sploopA ; 2nt/3
jmp st_begin_loop jmp sp_begin_loop
.align $100 .align $100
;================================================ ;================================================
; Starring Loop ; Starring People Loop
;================================================ ;================================================
; each scan line 65 cycles ; each scan line 65 cycles
; 1 cycle each byte (40cycles) + 25 for horizontal ; 1 cycle each byte (40cycles) + 25 for horizontal
@ -114,103 +69,235 @@ stloopB:dex ; 2
; G00000000000000000000 H0000000000000000000000 ; G00000000000000000000 H0000000000000000000000
st_begin_loop: sp_begin_loop:
st_display_loop: sp_display_loop:
ldy #24 ldy #148
st_outer_loop: sp_outer_loop:
;== line0 bit LORES ; 4
bit PAGE0 ; 4 lda #7 ; 2
lda #$54 ; 2 jsr delay_a ; 25+7 = 32
sta draw_line_p1+1 ; 4 ;===========
jsr draw_line_1 ; 6 ; 38
;== line1
bit PAGE0 ; 4
lda #$54 ; 2
sta draw_line_p1+1 ; 4
jsr draw_line_1 ; 6
;== line2
bit PAGE0 ; 4
lda #$55 ; 2
sta draw_line_p1+1 ; 4
jsr draw_line_1 ; 6
;== line3
bit PAGE1 ;IIe ; 4
; bit PAGE0 ;II/II+ ; 4
lda #$55 ; 2 bit HIRES ; 4
sta draw_line_p1+1 ; 4 nop ; 2
jsr draw_line_1 ; 6 nop ; 2
nop ; 2
;== line4 lda $0 ; 3
bit PAGE1 ; 4 lda $0 ; 3
lda #$54 ; 2 lda $0 ; 3
sta draw_line_p1+1 ; 4 lda $0 ; 3
jsr draw_line_1 ; 6 ;============
;== line5 ; 22
bit PAGE1 ; 4
lda #$54 ; 2
sta draw_line_p1+1 ; 4
jsr draw_line_1 ; 6
;== line6
bit PAGE1 ; 4
lda #$55 ; 2
sta draw_line_p1+1 ; 4
jsr draw_line_1 ; 6
;== line7
bit PAGE1 ; 4
lda #$55 ; 2
sta draw_line_p2+1 ; 4
jsr draw_line_2 ; 6
dey ; 2 dey ; 2
bne st_outer_loop ; 3 bne sp_outer_loop ; 3
; -1 ; -1
bit LORES ; 4
; want to kill 44*65 -3 = 2857
;====================================================== ;======================================================
; We have 4550 cycles in the vblank, use them wisely ; We have 4550 cycles in the vblank, use them wisely
;====================================================== ;======================================================
; do_nothing should be 4550 ; do_nothing should be 4550
; +1 fallthrough from above ; +2857 fallthrough from above
; -10 keypress ; -10 keypress
; -2 ldy at top ; -2 ldy at top
; -132 move letters
; =========== ; ===========
; 4407 ; 7395
; Try X=13 Y=62 cycles=4403 R4 ; Try X=18 Y=77 cycles=7393 R2
nop ; 2
nop nop
ldy #62 ; 2 ldy #77 ; 2
stloop1:ldx #13 ; 2 sploop1:ldx #18 ; 2
stloop2:dex ; 2 sploop2:dex ; 2
bne stloop2 ; 2nt/3 bne sploop2 ; 2nt/3
dey ; 2 dey ; 2
bne stloop1 ; 2nt/3 bne sploop1 ; 2nt/3
lda KEYPRESS ; 4 lda KEYPRESS ; 4
bpl st_no_keypress ; 3 bpl sp_no_keypress ; 3
jmp st_start_over jmp sp_start_over
st_no_keypress: sp_no_keypress:
jmp st_display_loop ; 3 jmp sp_display_loop ; 3
st_start_over: sp_start_over:
bit KEYRESET ; clear keypress ; 4 bit KEYRESET ; clear keypress ; 4
rts ; 6 rts ; 6
setup_people_fs:
.include "starring1.inc"
.include "starring2.inc" ;===================
; init vars
lda #0
sta DRAW_PAGE
;=============================
; Load graphic hgr
lda #<fs_hgr
sta LZ4_SRC
lda #>fs_hgr
sta LZ4_SRC+1
lda #<(fs_hgr_end-8) ; skip checksum at end
sta LZ4_END
lda #>(fs_hgr_end-8) ; skip checksum at end
sta LZ4_END+1
lda #<$2000
sta LZ4_DST
lda #>$2000
sta LZ4_DST+1
jsr lz4_decode
;=============================
; Load graphic page0
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<fs
sta GBASL
lda #>fs
sta GBASH
jsr load_rle_gr
lda #4
sta DRAW_PAGE
jsr gr_copy_to_current ; copy to page1
; GR part
bit PAGE1
bit LORES ; 4
bit SET_GR ; 4
bit FULLGR ; 4
;=============================
; Load graphic page1
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<fs
sta GBASL
lda #>fs
sta GBASH
jsr load_rle_gr
rts
setup_people_deater:
;===================
; init vars
lda #0
sta DRAW_PAGE
;=============================
; Load graphic hgr
lda #<deater_hgr
sta LZ4_SRC
lda #>deater_hgr
sta LZ4_SRC+1
lda #<(deater_hgr_end-8) ; skip checksum at end
sta LZ4_END
lda #>(deater_hgr_end-8) ; skip checksum at end
sta LZ4_END+1
lda #<$2000
sta LZ4_DST
lda #>$2000
sta LZ4_DST+1
jsr lz4_decode
;=============================
; Load graphic page0
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<deater
sta GBASL
lda #>deater
sta GBASH
jsr load_rle_gr
lda #4
sta DRAW_PAGE
jsr gr_copy_to_current ; copy to page1
; GR part
bit PAGE1
bit LORES ; 4
bit SET_GR ; 4
bit FULLGR ; 4
;=============================
; Load graphic page1
lda #$0c
sta BASH
lda #$00
sta BASL ; load image to $c00
lda #<deater
sta GBASL
lda #>deater
sta GBASH
jsr load_rle_gr
rts
.include "fs.inc"
.include "deater.inc"
fs_hgr:
.incbin "FS_HGRC.BIN.lz4",11
fs_hgr_end:
deater_hgr:
.incbin "DEATER_HGRC.BIN.lz4",11
deater_hgr_end: