Compare commits
6 Commits
de3561cb59
...
5eb3f4fa4b
Author | SHA1 | Date |
---|---|---|
Vince Weaver | 5eb3f4fa4b | |
Vince Weaver | abc06c0a9d | |
Vince Weaver | 6271105aa6 | |
Vince Weaver | 7edd5d75f3 | |
Vince Weaver | 62c01b77c4 | |
Vince Weaver | be968a1ad1 |
|
@ -1,7 +1,25 @@
|
|||
title
|
||||
~~~~~
|
||||
+ menu
|
||||
+ load/save game
|
||||
+ credits?
|
||||
|
||||
mars map
|
||||
~~~~~~~~
|
||||
+ enforce collision detection
|
||||
+ proper smooth movement
|
||||
+ transporters
|
||||
+ start at starting point
|
||||
+ show keens left at start, also when press ??
|
||||
+ mark completed levels
|
||||
|
||||
level1
|
||||
~~~~~~
|
||||
+ fix so works again
|
||||
|
||||
sound effects
|
||||
~~~~~~~~~~~~~
|
||||
+ shorten item pickup noise
|
||||
+ game over noise if you quit too?
|
||||
+ effect for transporter
|
||||
|
||||
movement:
|
||||
~~~~~~~~~
|
||||
|
@ -9,28 +27,27 @@ movement:
|
|||
|
||||
enemies
|
||||
~~~~~~~
|
||||
+ allow stepping on head
|
||||
+ disable when not on screen?
|
||||
+ enemies besides yorps
|
||||
|
||||
shooting
|
||||
~~~~~~~~
|
||||
+ collision with enemies
|
||||
+ shoot enemies
|
||||
|
||||
pogo
|
||||
~~~~
|
||||
+ implement
|
||||
|
||||
|
||||
lo-res version
|
||||
~~~~~~~~~~~~~~
|
||||
+ improve keyboard handling on Apple IIe
|
||||
+ walk behind some sprites (columns on level1)
|
||||
+ fix keybindings/help menu
|
||||
+ better start/stop level music
|
||||
+ animate death
|
||||
+ better animations
|
||||
+ game over screen if out of lives
|
||||
|
||||
hi-res version
|
||||
~~~~~~~~~~~~~~
|
||||
+
|
||||
|
||||
mars
|
||||
~~~~
|
||||
+ convert to full tilemap
|
||||
+ mark completed levels
|
||||
|
||||
title
|
||||
~~~~~
|
||||
+ actual menu?
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@ ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
|
|||
PNG2GR = ../../../utils/gr-utils/png2gr
|
||||
|
||||
|
||||
all: level1_map.zx02 png2map mars_map.gr.zx02 mars_new.zx02
|
||||
all: png2map \
|
||||
level1_map.zx02 level2_map.zx02 \
|
||||
mars_map.gr.zx02 mars_new.zx02
|
||||
|
||||
###
|
||||
|
||||
|
@ -15,6 +17,15 @@ level1_map.zx02: level1_map.inc
|
|||
level1_map.inc: level1_map.png png2map
|
||||
./png2map level1_map.png level1_map.inc
|
||||
|
||||
###
|
||||
|
||||
level2_map.zx02: level2_map.inc
|
||||
$(ZX02) level2_map.inc level2_map.zx02
|
||||
|
||||
level2_map.inc: level2_map.png png2map
|
||||
./png2map level2_map.png level2_map.inc
|
||||
|
||||
|
||||
|
||||
###
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.8 KiB |
|
@ -15,8 +15,7 @@ TILE_COLS = 20 ; define this elsewhere?
|
|||
mars_start:
|
||||
;===================
|
||||
; init screen
|
||||
; jsr TEXT
|
||||
; jsr HOME
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
bit SET_GR
|
||||
|
@ -24,12 +23,14 @@ mars_start:
|
|||
bit LORES
|
||||
bit FULLGR
|
||||
|
||||
jsr clear_all ; avoid grey stripes at load
|
||||
lda #0 ; clear screens
|
||||
sta clear_all_color+1
|
||||
jsr clear_all
|
||||
|
||||
lda KEENS
|
||||
lda KEENS ; check if out of lives
|
||||
bpl plenty_of_keens
|
||||
|
||||
jmp return_to_title
|
||||
jmp return_to_title ; if none, game over
|
||||
|
||||
plenty_of_keens:
|
||||
|
||||
|
@ -38,25 +39,27 @@ plenty_of_keens:
|
|||
;=====================
|
||||
|
||||
lda #0
|
||||
sta ANIMATE_FRAME
|
||||
sta FRAMEL
|
||||
sta FRAMEH
|
||||
|
||||
lda #4
|
||||
sta DRAW_PAGE
|
||||
|
||||
; see if returning and it game over
|
||||
; see if returning and if game over
|
||||
|
||||
lda LEVEL_OVER
|
||||
cmp #GAME_OVER
|
||||
beq return_to_title
|
||||
|
||||
bne not_game_over
|
||||
jmp return_to_title
|
||||
|
||||
not_game_over:
|
||||
|
||||
; TODO: set this in title, don't over-write
|
||||
|
||||
lda #1
|
||||
lda #10
|
||||
sta MARS_TILEX
|
||||
lda #6
|
||||
lda #34
|
||||
sta MARS_TILEY
|
||||
|
||||
lda #0
|
||||
|
@ -81,15 +84,42 @@ plenty_of_keens:
|
|||
; FIXME: start values
|
||||
; center around MARS_TILEX, MARS_TILEY
|
||||
|
||||
lda MARS_TILEX
|
||||
lda #0 ; default at 0,0
|
||||
sta TILEMAP_X
|
||||
lda MARS_TILEY
|
||||
sta TILEMAP_Y
|
||||
|
||||
lda MARS_TILEX
|
||||
cmp #10
|
||||
bcc mars_tilex_fine
|
||||
sec
|
||||
sbc #10
|
||||
sta TILEMAP_X
|
||||
|
||||
mars_tilex_fine:
|
||||
|
||||
lda MARS_TILEY
|
||||
cmp #6
|
||||
bcc mars_tiley_fine
|
||||
sec
|
||||
sbc #6
|
||||
sta TILEMAP_Y
|
||||
|
||||
mars_tiley_fine:
|
||||
|
||||
jsr copy_tilemap_subset
|
||||
|
||||
; make a copy in $c00 for fade-in purposes
|
||||
|
||||
lda DRAW_PAGE ; necssary
|
||||
pha
|
||||
|
||||
lda #8
|
||||
sta DRAW_PAGE
|
||||
|
||||
jsr draw_tilemap
|
||||
|
||||
pla
|
||||
sta DRAW_PAGE
|
||||
|
||||
lda #1
|
||||
sta INITIAL_SOUND
|
||||
|
@ -129,14 +159,17 @@ mars_loop:
|
|||
inc FRAMEH
|
||||
no_frame_oflo:
|
||||
|
||||
lda FRAMEL
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
and #$7
|
||||
tay
|
||||
lda star_colors,Y
|
||||
sta $F28 ; 0,28
|
||||
|
||||
; rotate star colors
|
||||
|
||||
; lda FRAMEL
|
||||
; lsr
|
||||
; lsr
|
||||
; lsr
|
||||
; and #$7
|
||||
; tay
|
||||
; lda star_colors,Y
|
||||
; sta $F28 ; 0,28
|
||||
|
||||
;===========================
|
||||
; check end of level
|
||||
|
@ -183,7 +216,11 @@ done_with_keen:
|
|||
|
||||
jsr fade_out
|
||||
|
||||
lda #LOAD_KEEN1
|
||||
; set up proper level to load
|
||||
|
||||
clc
|
||||
lda CURRENT_LEVEL
|
||||
adc #2 ; skip title and mars
|
||||
sta WHICH_LOAD
|
||||
|
||||
rts ; exit back
|
||||
|
@ -371,48 +408,193 @@ done_parts:
|
|||
|
||||
;====================================
|
||||
;====================================
|
||||
; Mars action
|
||||
; Mars action (enter pressed on map)
|
||||
;====================================
|
||||
;====================================
|
||||
; if enter pressed on map
|
||||
|
||||
; off by one so the levels can fit in a two byte bitmap
|
||||
;
|
||||
; location tilex,tiley size
|
||||
; 0 level1 (Border Town) 19,37 2
|
||||
; 1 level2 (First Shrine) 22,28 1
|
||||
; 2 level3 (Treasury) 9,21 2
|
||||
; 3 level4 (Capital City) 22,23 2
|
||||
; 4 level5 (Pogo Shrine) 13,16 1
|
||||
; 5 level6 (Second Shrine) 16,11 1
|
||||
; 6 level7 (Emerald City) 25,8 2
|
||||
; 7 level8 (Ice City) 38,3 2
|
||||
; 8 level9 (Third Shrine) 36,13 1
|
||||
; 9 level10 (Ice Shrine 1) 43,5 1
|
||||
; 10 level11 (Fourth Shrine) 52,16 1
|
||||
; 11 level12 (Fifth Shrine) 36,21 1
|
||||
; 12 level13 (Red Maze City) 44,24 2
|
||||
; 13 level14 (Secret City) 60,28 2
|
||||
; 14 level15 (Ice Shrine 2) 38,60 1
|
||||
; 15 level16 (Vorticon Castle) 29,59 2
|
||||
; 16 spaceship 10,37 1
|
||||
; 17 left transporter 26,4 1
|
||||
; 18 right transporter 34,3 1
|
||||
; 19 secret transporter 60,35 1
|
||||
|
||||
NUM_LOCATIONS = 20
|
||||
|
||||
do_action:
|
||||
|
||||
lda MARS_X
|
||||
cmp #15
|
||||
bcc do_nothing ; blt
|
||||
ldx #NUM_LOCATIONS
|
||||
|
||||
cmp #20
|
||||
bcc maybe_ship
|
||||
do_action_loop:
|
||||
|
||||
cmp #35
|
||||
bcs maybe_exit
|
||||
; mtx-ltx
|
||||
; -1 0 1 2
|
||||
; 1234 1234 1234 1234
|
||||
; XYY XY YX YYX
|
||||
; YY YY YY YY
|
||||
|
||||
check_location_x:
|
||||
sec
|
||||
lda MARS_TILEX
|
||||
sbc location_x,X
|
||||
bmi check_location_nomatch
|
||||
|
||||
cmp location_size,X
|
||||
bcs check_location_nomatch
|
||||
|
||||
check_location_y:
|
||||
|
||||
; mty-lty
|
||||
; -2 -1 0 1 2
|
||||
|
||||
; 0 X
|
||||
; 1 X X
|
||||
; 2 YY YX YX YY YY
|
||||
; 3 YY YY YX YX YY
|
||||
; 4 X X
|
||||
; 5 X
|
||||
|
||||
clc
|
||||
lda MARS_TILEY
|
||||
adc #1
|
||||
sec
|
||||
sbc location_y,X
|
||||
bmi check_location_nomatch
|
||||
|
||||
cmp location_size,X
|
||||
|
||||
bcc check_location_match
|
||||
|
||||
; bcs check_location_nomatch
|
||||
|
||||
|
||||
|
||||
check_location_nomatch:
|
||||
dex
|
||||
bpl do_action_loop
|
||||
|
||||
do_nothing:
|
||||
; TODO: make sound?
|
||||
rts
|
||||
|
||||
maybe_ship:
|
||||
check_location_match:
|
||||
|
||||
; jump table
|
||||
|
||||
lda location_actions_high,X
|
||||
pha
|
||||
lda location_actions_low,X
|
||||
pha
|
||||
|
||||
rts ; jump
|
||||
|
||||
|
||||
lda MARS_Y
|
||||
cmp #16
|
||||
bcc do_nothing
|
||||
cmp #24
|
||||
bcs do_nothing
|
||||
; lda MARS_X
|
||||
; cmp #15
|
||||
; bcc do_nothing ; blt
|
||||
; cmp #20
|
||||
; bcc maybe_ship
|
||||
; cmp #35
|
||||
; bcs maybe_exit
|
||||
;do_nothing:
|
||||
; ; TODO: make sound?
|
||||
; rts
|
||||
;maybe_ship:
|
||||
; lda MARS_Y
|
||||
; cmp #16
|
||||
; bcc do_nothing
|
||||
; cmp #24
|
||||
; bcs do_nothing
|
||||
; jmp do_parts ; tail call
|
||||
;maybe_exit:
|
||||
; inc LEVEL_OVER
|
||||
; rts
|
||||
|
||||
jmp do_parts ; tail call
|
||||
|
||||
maybe_exit:
|
||||
|
||||
;=====================================
|
||||
;=====================================
|
||||
; placeholder until action imlpemented
|
||||
;=====================================
|
||||
;=====================================
|
||||
dummy_action:
|
||||
rts
|
||||
|
||||
;=====================================
|
||||
;=====================================
|
||||
; enter level
|
||||
;=====================================
|
||||
;=====================================
|
||||
; level number is in X
|
||||
enter_level:
|
||||
|
||||
stx CURRENT_LEVEL
|
||||
|
||||
inc LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
|
||||
location_x:
|
||||
.byte 19,22, 9,22,13,16,25,38
|
||||
.byte 36,43,52,36,44,60,38,29
|
||||
.byte 10,26,34,60
|
||||
|
||||
star_colors:
|
||||
.byte $05,$07,$07,$0f
|
||||
.byte $0f,$07,$05,$0a
|
||||
location_y:
|
||||
.byte 37,28,21,23,16,11, 8, 3
|
||||
.byte 13, 5,16,21,24,28,60,59
|
||||
.byte 37, 4, 3,35
|
||||
|
||||
location_size:
|
||||
.byte 2,1,2,2,1,1,2,2
|
||||
.byte 1,1,1,1,2,2,1,2
|
||||
.byte 1,1,1,1
|
||||
|
||||
location_actions_low:
|
||||
.byte <(enter_level-1),<(dummy_action-1) ; level1, level2
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(dummy_action-1),<(dummy_action-1)
|
||||
.byte <(do_parts-1),<(dummy_action-1) ; ship, l transport
|
||||
.byte <(dummy_action-1),<(dummy_action-1) ; r trans, secret
|
||||
|
||||
location_actions_high:
|
||||
.byte >(enter_level-1),>(dummy_action-1) ; level1, level2
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(dummy_action-1),>(dummy_action-1)
|
||||
.byte >(do_parts-1),>(dummy_action-1) ; ship, l transport
|
||||
.byte >(dummy_action-1),>(dummy_action-1) ; r trans, secret
|
||||
|
||||
|
||||
|
||||
;star_colors:
|
||||
; .byte $05,$07,$07,$0f
|
||||
; .byte $0f,$07,$05,$0a
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@ MARS_TILEY = $A3
|
|||
INITIAL_SOUND = $A4
|
||||
PLAY_END_SOUND = $A5
|
||||
APPLEII_MODEL = $A6
|
||||
CURRENT_LEVEL = $A7
|
||||
|
||||
WHICH_SLOT = $DA
|
||||
JS_BUTTON_STATE = $DB
|
||||
|
|
Loading…
Reference in New Issue