ds: further action with ship

This commit is contained in:
Vince Weaver 2019-11-04 17:00:16 -05:00
parent 61e7bc86fb
commit 1f0da85445
4 changed files with 161 additions and 170 deletions

View File

@ -12,32 +12,27 @@ PACKAGE:
+ Implement + Implement
STARBASE: STARBASE:
+ Fix sprites
+ Keyboard emulation + Keyboard emulation
+ change colors of shield? laser? blast? + change colors of shield? laser? blast?
+ room0 + room0 -- done
- open with wall blasting open
- run down steps
- blast open door + room1 - run in
- run through
+ room1
- columns
- run in
- duck, start shield - duck, start shield
- blash shield, alien - blash shield, alien
- run through doors - run through doors
+ room2 (planet) + room2 - shoot another alien?
- shoot another alien?
- foreground animation (robot?) - foreground animation (robot?)
+ room3 (ship) + room3 (ship)
- blast control / free ship/ - blast control / free ship/. Light toggles when blasted
- run to ship - run to ship
- engines start - engines start
- some sort of fade-to-white transition - some sort of fade-to-white transition
or Star Wipe?
ESCAPE: ESCAPE:
+ Get working + Get working

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -112,32 +112,29 @@ window_rle: .byte $28 ; ysize=48
.byte $A1 .byte $A1
ship_rle: .byte $28 ; ysize=48 ship_rle: .byte $28 ; ysize=48
.byte $A5,$CC, $4C,$4C, $A0,$10,$44, $A6,$FF, $AB,$44, $A3,$CC, $4C .byte $A5,$CC, $4C,$4C, $A0,$10,$44, $A6,$FF, $AB,$44, $A3,$CC, $4C
.byte $A0,$13,$44, $A7,$FF, $AA,$44, $CC,$CC, $4C, $A0,$14,$44, $1F .byte $A0,$13,$44, $A7,$FF, $AA,$44, $CC,$CC, $4C, $A0,$14,$44, $A8,$FF
.byte $9F, $A6,$FF, $A9,$44, $CC,$CC, $AB,$44, $AC,$00, $A7,$FF .byte $A9,$44, $CC,$CC, $AB,$44, $A9,$00, $44, $A9,$FF, $A8,$44
.byte $A8,$44, $CC, $AC,$44, $00, $A9,$44, $F9, $F1 .byte $CC, $AC,$44, $00, $A9,$44, $AA,$FF, $A0,$14,$44, $00
.byte $A8,$FF, $A0,$14,$44, $00, $A9,$44, $AB,$FF, $A0,$13,$44, $00 .byte $A9,$44, $AB,$FF, $A0,$13,$44, $00, $A9,$44, $AC,$FF, $A9,$44
.byte $A9,$44, $AC,$FF, $A9,$44, $A7,$55, $44,$44, $00, $A9,$44 .byte $A7,$55, $44,$44, $00, $A9,$44, $AD,$FF, $A8,$44, $55
.byte $AD,$FF, $A8,$44, $55, $99, $55, $99, $55 .byte $99, $55, $99, $55, $52, $55, $44,$44
.byte $52, $55, $44,$44, $00, $A5,$44, $64, $A3,$44 .byte $00, $A5,$44, $64, $A3,$44, $AE,$F7, $A3,$F4, $A4,$44
.byte $AE,$F7, $A3,$F4, $A4,$44, $55, $59, $55, $59 .byte $55, $59, $55, $59, $55, $51, $55
.byte $55, $51, $55, $44,$44, $00, $04, $A4,$44 .byte $44,$44, $00, $04, $A4,$44, $22, $26, $64
.byte $22, $26, $64, $44, $A0,$11,$FF, $A4,$44, $A7,$45 .byte $44, $A0,$11,$FF, $A4,$44, $A7,$45, $44, $04, $00,$00
.byte $44, $04, $00,$00, $A4,$44, $62, $22,$22, $26 .byte $A4,$44, $62, $22,$22, $26, $FF,$FF, $A5,$1F, $4F
.byte $FF,$FF, $A5,$1F, $4F, $A5,$2F, $4F, $A3,$2F, $AC,$44 .byte $A5,$2F, $4F, $A3,$2F, $AC,$44, $00, $44, $00
.byte $00, $44, $00, $A4,$44, $22, $26,$26, $62 .byte $A4,$44, $22, $26,$26, $62, $FF,$FF, $A5,$11, $44
.byte $FF,$FF, $A5,$11, $44, $A5,$22, $44, $A3,$22, $AC,$44 .byte $A5,$22, $44, $A3,$22, $AC,$44, $00, $44, $00
.byte $00, $44, $00, $A4,$44, $62, $A3,$22, $A3,$FF .byte $A4,$44, $62, $A3,$22, $A3,$FF, $A3,$11, $A3,$44, $A3,$22
.byte $A3,$11, $A3,$44, $A3,$22, $A3,$44, $22,$22, $AC,$44, $00 .byte $A3,$44, $22,$22, $AC,$44, $40, $44, $00, $A4,$44
.byte $44, $00, $A4,$44, $22, $A3,$26, $A3,$FF, $F1 .byte $22, $A3,$26, $A3,$FF, $F1, $11, $41, $A3,$44
.byte $11, $41, $A3,$44, $42, $22, $42, $A3,$44 .byte $42, $22, $42, $A3,$44, $42, $22, $AE,$44
.byte $42, $22, $AC,$44, $00, $44, $00, $A4,$44 .byte $00, $A4,$44, $A4,$62, $A4,$FF, $11, $A5,$44, $22
.byte $A4,$62, $A4,$FF, $11, $A5,$44, $22, $A5,$44, $22 .byte $A5,$44, $22, $AE,$44, $00, $A4,$44, $A4,$22, $A0,$11,$FF
.byte $AC,$44, $00, $44, $00, $A4,$44, $A4,$22, $A0,$11,$FF .byte $AE,$94, $00, $A4,$94, $62, $A3,$26, $A0,$11,$FF, $AE,$99
.byte $AC,$94, $00, $94, $00, $A4,$94, $62, $A3,$26 .byte $90, $A4,$99, $A3,$22, $62, $A0,$11,$FF, $A0,$13,$99, $62
.byte $A0,$11,$FF, $AC,$99, $00, $99, $90, $A4,$99, $A3,$22 .byte $26,$26, $22, $A0,$11,$F7, $A0,$13,$99, $22,$22, $62, $96
.byte $62, $A0,$11,$FF, $AC,$99, $00, $A6,$99, $62, $26,$26 .byte $A0,$11,$FF, $A0,$13,$99, $62, $96, $99,$99, $A0,$11,$FF, $A0,$28,$99
.byte $22, $A0,$11,$F7, $AC,$99, $00, $A6,$99, $22,$22, $62 .byte $A0,$28,$89, $A0,$28,$88
.byte $96, $A0,$11,$FF, $AC,$99, $00, $A6,$99, $62, $96
.byte $99,$99, $A0,$11,$FF, $AC,$99, $00, $A0,$1B,$99, $AC,$89, $80
.byte $A0,$1B,$89, $A0,$28,$88
.byte $A1 .byte $A1

View File

@ -149,6 +149,17 @@ room1:
cmp #1 cmp #1
bne room2 bne room2
; set up doors
lda #3
sta NUM_DOORS
lda #<door_c4_r1
sta setup_door_table_loop_smc+1
lda #>door_c4_r1
sta setup_door_table_loop_smc+2
jsr setup_door_table
lda #(-4+128) lda #(-4+128)
sta LEFT_LIMIT sta LEFT_LIMIT
lda #(39+128) lda #(39+128)
@ -162,7 +173,7 @@ room1:
lda #0 lda #0
sta cel_smc+1 sta cel_smc+1
lda #8 lda #30
sta ASTRONAUT_Y sta ASTRONAUT_Y
; load background ; load background
@ -172,8 +183,8 @@ room1:
jmp room_setup_done jmp room_setup_done
;=================== ;=====================
; causeway part 1 ; room with big window
room2: room2:
cmp #2 cmp #2
bne room3 bne room3
@ -191,7 +202,7 @@ room2:
lda #1 lda #1
sta cel_smc+1 sta cel_smc+1
lda #18 lda #30
sta ASTRONAUT_Y sta ASTRONAUT_Y
; load background ; load background
@ -202,17 +213,19 @@ room2:
jmp room_setup_done jmp room_setup_done
;======================= ;=======================
; causeway part 2 / pit ;room with ship
room3: room3:
cmp #3 cmp #3
bne room4 bne room_setup_done
; set falling floors lda #1
lda #48 sta NUM_DOORS
sta fall_down_destination_smc+1
lda #48 lda #<door_c4_r3
sta fall_sideways_destination_smc+1 sta setup_door_table_loop_smc+1
lda #>door_c4_r3
sta setup_door_table_loop_smc+2
jsr setup_door_table
lda #(-4+128) lda #(-4+128)
sta LEFT_LIMIT sta LEFT_LIMIT
@ -227,75 +240,15 @@ room3:
lda #2 lda #2
sta cel_smc+1 sta cel_smc+1
lda #18 lda #30
sta ASTRONAUT_Y sta ASTRONAUT_Y
; load top high
lda #>(ship_rle)
sta GBASH
lda #<(ship_rle)
sta GBASL
lda #$10 ; load to page $1000
jsr load_rle_gr
; load pit background even higher
lda #>(ship_rle)
sta GBASH
lda #<(ship_rle)
sta GBASL
lda #$BC ; load to page $BC00
jsr load_rle_gr
; load background ; load background
lda #>(ship_rle) lda #>(ship_rle)
sta GBASH sta GBASH
lda #<(ship_rle) lda #<(ship_rle)
jmp room_setup_done ; fall through
;======================
; down at the bottom
room4:
; set up doors
lda #1
sta NUM_DOORS
lda #<door_c4_r4
sta setup_door_table_loop_smc+1
lda #>door_c4_r4
sta setup_door_table_loop_smc+2
jsr setup_door_table
lda #(16+128)
sta LEFT_LIMIT
lda #(39+128)
sta RIGHT_LIMIT
; set right exit
lda #5
sta cer_smc+1
lda ASTRONAUT_STATE
cmp #P_IMPALED
beq r4_impaled
cmp #P_FALLING_DOWN
beq r4_impaled
lda #8
sta ASTRONAUT_Y
lda #P_CROUCHING
sta ASTRONAUT_STATE
r4_impaled:
; load background
lda #>(ship_rle)
sta GBASH
lda #<(ship_rle)
jmp room_setup_done
room_setup_done: room_setup_done:
@ -346,13 +299,15 @@ starbase_loop:
;================================== ;==================================
lda WHICH_JAIL lda WHICH_JAIL
beq bg_room0
cmp #3
beq bg_room3
bne c4_no_bg_action
bg_room0: bg_room0:
; Room #0, draw pulsing recharger ; Room #0, draw pulsing recharger
cmp #0
bne c4_no_bg_action
lda FRAMEL lda FRAMEL
and #$c and #$c
lsr lsr
@ -377,7 +332,45 @@ bg_room0:
lsr lsr
tay tay
jmp c4_no_bg_action
bg_room3:
; Room #3, draw clamp if applicable
lda c4_r3_door0_status ; door status
cmp #DOOR_STATUS_EXPLODED
beq bg3_blink
; draw clamp at 22,5
lda #22
sta XPOS
lda #4
sta YPOS
lda #<clamp_sprite
sta INL
lda #>clamp_sprite
sta INH
jsr put_sprite
jmp c4_no_bg_action
bg3_blink:
lda FRAMEL
and #$08
beq bg3_blink_off
; 9x16
bg3_blink_on:
lda #$56
bne bg3_blink_done
bg3_blink_off:
lda #$52
bg3_blink_done:
sta $c28+9
c4_no_bg_action: c4_no_bg_action:
@ -483,8 +476,8 @@ no_draw_alien:
lda WHICH_ROOM lda WHICH_ROOM
beq c4_room0_cover beq c4_room0_cover
cmp #4 ; cmp #4
beq c4_room4_cover ; beq c4_room4_cover
jmp c4_no_fg_cover jmp c4_no_fg_cover
@ -502,21 +495,7 @@ c4_room0_cover:
jsr put_sprite jsr put_sprite
; jmp c4_no_fg_cover
jmp c4_no_fg_cover
c4_room4_cover:
lda #30
sta XPOS
lda #8
sta YPOS
lda #<pit_door_cover
sta INL
lda #>pit_door_cover
sta INH
jsr put_sprite
c4_no_fg_cover: c4_no_fg_cover:
@ -704,31 +683,16 @@ causeway_door_cover:
.byte $00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00
; 30x8 ; 3x3
pit_door_cover:
.byte 8,8 clamp_sprite:
.byte $02,$22,$00,$00,$00,$00,$00,$00 .byte 3,3
.byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $AA,$1A,$9A
.byte $20,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00
.byte $22,$02,$00,$00,$00,$00,$00,$00 .byte $AA,$A9,$A1
.byte $22,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
; Room 0 doors
;clear_c00:
; lda #$94
; ldy #0
;clear1:
; sta $c00,Y
; sta $d00,Y
; sta $e00,Y
; sta $f00,Y
; iny
; bne clear1
; rts
door_c4_r0: door_c4_r0:
.word door_c4_r0_status .word door_c4_r0_status
@ -758,24 +722,59 @@ door_c4_r0_xmax:
c4_r0_door0_xmax: .byte 4 ; ?? c4_r0_door0_xmax: .byte 4 ; ??
c4_r0_door1_xmax: .byte 39 ; ?? c4_r0_door1_xmax: .byte 39 ; ??
; Room 1 doors
door_c4_r1:
.word door_c4_r1_status
.word door_c4_r1_x
.word door_c4_r1_y
.word door_c4_r1_xmin
.word door_c4_r1_xmax
door_c4_r1_status:
c4_r1_door0_status: .byte DOOR_STATUS_CLOSED
c4_r1_door1_status: .byte DOOR_STATUS_CLOSED
c4_r1_door2_status: .byte DOOR_STATUS_CLOSED
door_c4_r1_x:
c4_r1_door0_x: .byte 31
c4_r1_door1_x: .byte 34
c4_r1_door2_x: .byte 37
door_c4_r1_y:
c4_r1_door0_y: .byte 26
c4_r1_door1_y: .byte 26
c4_r1_door2_y: .byte 26
door_c4_r1_xmin:
c4_r1_door0_xmin: .byte 22 ; 31-4-5
c4_r1_door1_xmin: .byte 25 ; 34-4-5
c4_r1_door2_xmin: .byte 28 ; 37-4-5
door_c4_r1_xmax:
c4_r1_door0_xmax: .byte 39 ; ??
c4_r1_door1_xmax: .byte 39 ; ??
c4_r1_door2_xmax: .byte 39 ; ??
door_c4_r4:
.word door_c4_r4_status
.word door_c4_r4_x
.word door_c4_r4_y
.word door_c4_r4_xmin
.word door_c4_r4_xmax
door_c4_r4_status:
c4_r4_door0_status: .byte DOOR_STATUS_LOCKED
door_c4_r4_x: door_c4_r3:
c4_r4_door0_x: .byte 27 .word door_c4_r3_status
.word door_c4_r3_x
.word door_c4_r3_y
.word door_c4_r3_xmin
.word door_c4_r3_xmax
door_c4_r4_xmin: ; don't care (door does not open) door_c4_r3_status:
door_c4_r4_xmax: ; don't care (door does not open) c4_r3_door0_status: .byte DOOR_STATUS_CLOSED
door_c4_r4_y:
c4_r4_door0_y: .byte 4 door_c4_r3_x:
c4_r3_door0_x: .byte 12
door_c4_r3_xmin: .byte 39
door_c4_r3_xmax: .byte 39
door_c4_r3_y:
c4_r3_door0_y: .byte 26