mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 02:31:00 +00:00
megademo: initial takeoff code
This commit is contained in:
parent
83dee24889
commit
36cf2fdc0a
@ -30,6 +30,7 @@ megademo.o: megademo.s \
|
|||||||
starring_people.s fs.inc FS_HGRC.BIN.lz4 deater.inc DEATER_HGRC.BIN.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 \
|
||||||
|
takeoff.s takeoff.inc takeoff.img.lz4 \
|
||||||
mode7.s \
|
mode7.s \
|
||||||
fireworks.s fw_background.inc fw_state_machine.s fw.s \
|
fireworks.s fw_background.inc fw_state_machine.s fw.s \
|
||||||
hgr.s random16.s move_letters.s
|
hgr.s random16.s move_letters.s
|
||||||
@ -62,6 +63,16 @@ starring3.img: ./starring_3_hgr.png
|
|||||||
../hgr-utils/png2hgr starring_3_hgr.png > starring3.img
|
../hgr-utils/png2hgr starring_3_hgr.png > starring3.img
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
takeoff.inc: ./takeoff.png
|
||||||
|
$(PNG_TO_RLE) asm ./takeoff.png takeoff > takeoff.inc
|
||||||
|
|
||||||
|
takeoff.img.lz4: takeoff.img
|
||||||
|
lz4 -f -16 takeoff.img
|
||||||
|
|
||||||
|
takeoff.img: takeoff_hgr.png
|
||||||
|
../hgr-utils/png2hgr takeoff_hgr.png > takeoff.img
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
fs.inc: ./fs.png
|
fs.inc: ./fs.png
|
||||||
|
@ -1,65 +1,70 @@
|
|||||||
Overall:
|
Overall:
|
||||||
fix off-by-one line vaporlock
|
fix off-by-one line vaporlock
|
||||||
disk loader?
|
disk loader?
|
||||||
|
Load with HGR C64 at offset 0x2000 and then straight to 0x4000
|
||||||
|
Trim the last 8 bytes off of all the lz4 files
|
||||||
|
|
||||||
Music:
|
Music:
|
||||||
compose music
|
compose music
|
||||||
fit in RAM
|
fit in RAM
|
||||||
|
|
||||||
c64_opener:
|
Timing:
|
||||||
|
Except for fireworks, 15s for each? 150s = 2min 30s
|
||||||
|
|
||||||
|
0: c64_opener:
|
||||||
get curtain-opening effect working
|
get curtain-opening effect working
|
||||||
add text to background
|
add text to background
|
||||||
|
|
||||||
falling_apple:
|
1: falling_apple:
|
||||||
make it fall?
|
make it fall?
|
||||||
some sort of wipe?
|
some sort of wipe?
|
||||||
|
|
||||||
starring:
|
2: starring:
|
||||||
complete graphics
|
complete graphics
|
||||||
figure out png2hgr off-by-one error?
|
figure out png2hgr off-by-one error?
|
||||||
add wipe effect with tengwar: just draw 4 bytes yellow, 4 bytes
|
add wipe effect with tengwar: just draw 4 bytes yellow, 4 bytes
|
||||||
from scroll buffer
|
from scroll buffer
|
||||||
Add Susie starring role?
|
Add Susie starring role?
|
||||||
|
|
||||||
e-mail:
|
3: e-mail:
|
||||||
Update to proper text
|
Update to proper text
|
||||||
Add susie?
|
Add susie?
|
||||||
|
|
||||||
leave house:
|
4: leave house:
|
||||||
Green, a house on left? fence, bird?
|
Green, a house on left? fence, bird?
|
||||||
have mountain in background?
|
have mountain in background?
|
||||||
|
|
||||||
|
|
||||||
running bird:
|
5: running bird:
|
||||||
run to middle of screen, then have everything start moving?
|
run to middle of screen, then have everything start moving?
|
||||||
update text
|
update text
|
||||||
|
|
||||||
waterfall:
|
6: waterfall:
|
||||||
finish packing down a bit
|
finish packing down a bit
|
||||||
|
|
||||||
arrival at ship
|
7: arrival at ship
|
||||||
top HGR, bottom gr
|
top HGR, bottom gr
|
||||||
close door
|
close door
|
||||||
flames going
|
flames going
|
||||||
tree goes from big to small, horizon drops?
|
tree goes from big to small, horizon drops?
|
||||||
|
|
||||||
mode7:
|
8: mode7:
|
||||||
change path
|
change path
|
||||||
change ground to night-time darkness. grey water
|
change ground to night-time darkness. grey water
|
||||||
|
|
||||||
spacegame:
|
9: spacegame:
|
||||||
saturn-like planet? raster bars?
|
saturn-like planet? raster bars?
|
||||||
score at top?
|
score at top?
|
||||||
when done, blue horiz line?
|
when done, blue horiz line?
|
||||||
|
|
||||||
arrive at frogysue:
|
10: arrive at frogysue:
|
||||||
park ship on left
|
park ship on left
|
||||||
amethys crystals?
|
amethys crystals?
|
||||||
sky text/ground lgr?
|
sky text/ground lgr?
|
||||||
susie follow?
|
susie follow?
|
||||||
haert when meet at center?
|
haert when meet at center?
|
||||||
|
|
||||||
fireworks:
|
11: fireworks:
|
||||||
update text
|
update text
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
; HGR plus 40x48d page1/page2 every-1-scanline pageflip mode
|
; HGR plus 40x48d page1/page2 every-1-scanline pageflip mode
|
||||||
|
|
||||||
; Zero Page
|
; Zero Page
|
||||||
FRAMEBUFFER = $00 ; $00 - $0F
|
;FRAMEBUFFER = $00 ; $00 - $0F
|
||||||
;YPOS = $10
|
;YPOS = $10
|
||||||
;FRAME = $60
|
;FRAME = $60
|
||||||
;WAITING = $62
|
;WAITING = $62
|
||||||
@ -13,12 +13,12 @@ FRAMEBUFFER = $00 ; $00 - $0F
|
|||||||
;LETTERY = $66
|
;LETTERY = $66
|
||||||
;LETTERD = $67
|
;LETTERD = $67
|
||||||
;LETTER = $68
|
;LETTER = $68
|
||||||
BLARGH = $69
|
;BLARGH = $69
|
||||||
HGR_COLOR = $E4
|
;HGR_COLOR = $E4
|
||||||
STATE = $ED
|
;STATE = $ED
|
||||||
;DRAW_PAGE = $EE
|
;DRAW_PAGE = $EE
|
||||||
LASTKEY = $F1
|
;LASTKEY = $F1
|
||||||
PADDLE_STATUS = $F2
|
;PADDLE_STATUS = $F2
|
||||||
|
|
||||||
|
|
||||||
;==================================
|
;==================================
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
@ -25,7 +25,7 @@ apple_iie:
|
|||||||
;===================
|
;===================
|
||||||
jsr HOME
|
jsr HOME
|
||||||
|
|
||||||
jsr mode7_flying
|
jsr rocket_takeoff
|
||||||
|
|
||||||
; C64 Opening Sequence
|
; C64 Opening Sequence
|
||||||
|
|
||||||
@ -54,9 +54,10 @@ apple_iie:
|
|||||||
; Waterfall
|
; Waterfall
|
||||||
|
|
||||||
; Enter ship
|
; Enter ship
|
||||||
|
jsr rocket_takeoff
|
||||||
|
|
||||||
; mode7 (???)
|
; mode7 (???)
|
||||||
jsr mode7_flying
|
; jsr mode7_flying
|
||||||
|
|
||||||
; Fly in space
|
; Fly in space
|
||||||
|
|
||||||
@ -91,10 +92,11 @@ loop_forever:
|
|||||||
.include "wait_keypress.s"
|
.include "wait_keypress.s"
|
||||||
.include "random16.s"
|
.include "random16.s"
|
||||||
.align $100
|
.align $100
|
||||||
; .include "fireworks.s"
|
.include "fireworks.s"
|
||||||
.include "hgr.s"
|
.include "hgr.s"
|
||||||
.include "bird_mountain.s"
|
.include "bird_mountain.s"
|
||||||
.include "move_letters.s"
|
.include "move_letters.s"
|
||||||
.align $100
|
.align $100
|
||||||
.include "gr_putsprite.s"
|
.include "gr_putsprite.s"
|
||||||
.include "mode7.s"
|
; .include "mode7.s"
|
||||||
|
.include "takeoff.s"
|
||||||
|
BIN
megademo/takeoff.png
Normal file
BIN
megademo/takeoff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
200
megademo/takeoff.s
Normal file
200
megademo/takeoff.s
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
; Rocket Takeoff
|
||||||
|
|
||||||
|
; Simple HGR/GR split
|
||||||
|
|
||||||
|
|
||||||
|
; STATE1 = RIDE IN ON BIRD
|
||||||
|
; STATE2 = OFF BIRD
|
||||||
|
; STATE3 = BIRD RUNS AWAY
|
||||||
|
; STATE4 = WALK INTO SHIP
|
||||||
|
; STATE5 = PAUSE
|
||||||
|
; STATE6 = SMOKE OUT BACK
|
||||||
|
; STATE7 = ROTATING FLAME SPRITES + TREES MOVING/SPEED UP
|
||||||
|
; also horizon drop away?
|
||||||
|
|
||||||
|
|
||||||
|
; 5 4 3 2 1 blastoff, another rocketship run
|
||||||
|
; o/~ Take me to the moon o/~
|
||||||
|
rocket_takeoff:
|
||||||
|
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; init screen
|
||||||
|
bit KEYRESET
|
||||||
|
|
||||||
|
setup_rocket:
|
||||||
|
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; init vars
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta DRAW_PAGE
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
; Load graphic hgr
|
||||||
|
|
||||||
|
lda #<takeoff_hgr
|
||||||
|
sta LZ4_SRC
|
||||||
|
lda #>takeoff_hgr
|
||||||
|
sta LZ4_SRC+1
|
||||||
|
|
||||||
|
lda #<(takeoff_hgr_end-8) ; skip checksum at end
|
||||||
|
sta LZ4_END
|
||||||
|
lda #>(takeoff_hgr_end-8) ; skip checksum at end
|
||||||
|
sta LZ4_END+1
|
||||||
|
|
||||||
|
lda #<$2000
|
||||||
|
sta LZ4_DST
|
||||||
|
lda #>$2000
|
||||||
|
sta LZ4_DST+1
|
||||||
|
sta HGR_PAGE
|
||||||
|
|
||||||
|
jsr lz4_decode
|
||||||
|
|
||||||
|
jsr draw_stars
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
; Load graphic page0
|
||||||
|
|
||||||
|
lda #$0c
|
||||||
|
sta BASH
|
||||||
|
lda #$00
|
||||||
|
sta BASL ; load image to $c00
|
||||||
|
|
||||||
|
|
||||||
|
lda #<takeoff
|
||||||
|
sta GBASL
|
||||||
|
lda #>takeoff
|
||||||
|
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
|
||||||
|
|
||||||
|
bit PAGE0
|
||||||
|
|
||||||
|
;==============================
|
||||||
|
; setup graphics for vapor lock
|
||||||
|
;==============================
|
||||||
|
|
||||||
|
jsr vapor_lock ; 6
|
||||||
|
|
||||||
|
; vapor lock returns with us at beginning of hsync in line
|
||||||
|
; 114 (7410 cycles), so with 5070 lines to go
|
||||||
|
|
||||||
|
jsr gr_copy_to_current ; 6+ 9292
|
||||||
|
|
||||||
|
; now we have 322 left
|
||||||
|
|
||||||
|
; GR part
|
||||||
|
bit LORES ; 4
|
||||||
|
bit SET_GR ; 4
|
||||||
|
bit FULLGR ; 4
|
||||||
|
|
||||||
|
; 322 - 12 = 310
|
||||||
|
; - 3 for jmp
|
||||||
|
; 307
|
||||||
|
|
||||||
|
; Try X=9 Y=6 cycles=307
|
||||||
|
|
||||||
|
ldy #6 ; 2
|
||||||
|
toloopA:ldx #9 ; 2
|
||||||
|
toloopB:dex ; 2
|
||||||
|
bne toloopB ; 2nt/3
|
||||||
|
dey ; 2
|
||||||
|
bne toloopA ; 2nt/3
|
||||||
|
|
||||||
|
jmp to_begin_loop
|
||||||
|
.align $100
|
||||||
|
|
||||||
|
|
||||||
|
;================================================
|
||||||
|
; Starring People Loop
|
||||||
|
;================================================
|
||||||
|
; each scan line 65 cycles
|
||||||
|
; 1 cycle each byte (40cycles) + 25 for horizontal
|
||||||
|
; Total of 12480 cycles to draw screen
|
||||||
|
; Vertical blank = 4550 cycles (70 scan lines)
|
||||||
|
; Total of 17030 cycles to get back to where was
|
||||||
|
|
||||||
|
; want 12*4 = 48 lines of HIRES = 3120-4=3116
|
||||||
|
; want 192-48=144 lines of LORES = 9360-4=9356
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
to_begin_loop:
|
||||||
|
|
||||||
|
bit HIRES ; 4
|
||||||
|
|
||||||
|
; Try X=11 Y=51 cycles=3112 R4
|
||||||
|
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
ldy #51 ; 2
|
||||||
|
toloop8:ldx #11 ; 2
|
||||||
|
toloop9:dex ; 2
|
||||||
|
bne toloop9 ; 2nt/3
|
||||||
|
dey ; 2
|
||||||
|
bne toloop8 ; 2nt/3
|
||||||
|
|
||||||
|
bit LORES ; 4
|
||||||
|
|
||||||
|
; Try X=10 Y=167 cycles=9353 R3
|
||||||
|
|
||||||
|
lda $0
|
||||||
|
|
||||||
|
ldy #167 ; 2
|
||||||
|
toloop6:ldx #10 ; 2
|
||||||
|
toloop7:dex ; 2
|
||||||
|
bne toloop7 ; 2nt/3
|
||||||
|
dey ; 2
|
||||||
|
bne toloop6 ; 2nt/3
|
||||||
|
|
||||||
|
|
||||||
|
;======================================================
|
||||||
|
; We have 4550 cycles in the vblank, use them wisely
|
||||||
|
;======================================================
|
||||||
|
|
||||||
|
; do_nothing should be 4550
|
||||||
|
; -10 keypress
|
||||||
|
; ===========
|
||||||
|
; 4540
|
||||||
|
|
||||||
|
; Try X=9 Y=89 cycles=4540
|
||||||
|
|
||||||
|
ldy #89 ; 2
|
||||||
|
toloop1:ldx #9 ; 2
|
||||||
|
toloop2:dex ; 2
|
||||||
|
bne toloop2 ; 2nt/3
|
||||||
|
dey ; 2
|
||||||
|
bne toloop1 ; 2nt/3
|
||||||
|
|
||||||
|
lda KEYPRESS ; 4
|
||||||
|
bpl to_no_keypress ; 3
|
||||||
|
jmp to_start_over
|
||||||
|
to_no_keypress:
|
||||||
|
|
||||||
|
jmp to_begin_loop ; 3
|
||||||
|
|
||||||
|
to_start_over:
|
||||||
|
bit KEYRESET ; clear keypress ; 4
|
||||||
|
rts ; 6
|
||||||
|
|
||||||
|
|
||||||
|
.include "takeoff.inc"
|
||||||
|
takeoff_hgr:
|
||||||
|
.incbin "takeoff.img.lz4",11
|
||||||
|
takeoff_hgr_end:
|
||||||
|
|
||||||
|
|
BIN
megademo/takeoff_hgr.png
Normal file
BIN
megademo/takeoff_hgr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue
Block a user