mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-01 05:31:52 +00:00
riven: disk39: can flip maglev back the other way now
This commit is contained in:
parent
8e5c2d9ff8
commit
1d6e90d63f
@ -98,14 +98,18 @@ really_exit:
|
||||
|
||||
|
||||
;=====================================
|
||||
; handle1 clicked
|
||||
; handle clicked facing west
|
||||
;=====================================
|
||||
; all we can do here is flip
|
||||
; flip us to the east
|
||||
; go lores and play the movie
|
||||
handle1_clicked:
|
||||
|
||||
bit SPEAKER
|
||||
|
||||
lda #0
|
||||
sta MAGLEV_FLIP_DIRECTION
|
||||
|
||||
lda #LOAD_MOVIE1
|
||||
sta WHICH_LOAD
|
||||
|
||||
@ -118,15 +122,29 @@ handle1_clicked:
|
||||
|
||||
|
||||
;=====================================
|
||||
; handle2 clicked
|
||||
; handle clicked facing east
|
||||
;=====================================
|
||||
; go for maglev ride
|
||||
|
||||
; if x<27, go for maglev ride
|
||||
; else, flip back west
|
||||
handle2_clicked:
|
||||
|
||||
bit SPEAKER
|
||||
|
||||
lda CURSOR_X
|
||||
cmp #27
|
||||
bcc go_for_maglev
|
||||
|
||||
lda #1
|
||||
sta MAGLEV_FLIP_DIRECTION
|
||||
|
||||
lda #LOAD_MOVIE1
|
||||
jmp common_handle2
|
||||
|
||||
|
||||
go_for_maglev:
|
||||
lda #LOAD_MOVIE2
|
||||
|
||||
common_handle2:
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #1
|
||||
|
@ -62,7 +62,7 @@ location2:
|
||||
.word $0000 ; west bg
|
||||
.byte BG_EAST
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 17,23 ; special x
|
||||
.byte 155,168 ; special y
|
||||
.byte 17,29 ; special x
|
||||
.byte 127,168 ; special y
|
||||
.word handle2_clicked-1 ; special function
|
||||
|
||||
|
@ -21,14 +21,6 @@ overlays = $2000
|
||||
; space?
|
||||
; 188*8=overlays (1.5k)
|
||||
; 35 rotations * 188 = (7k) not so bad?
|
||||
;===================
|
||||
; notes for movie2
|
||||
; 103..109 = overlay animation
|
||||
; 110..112 = sit there
|
||||
; 113..270 = fun animation 157! = 30k???
|
||||
; 271..285 = handle rotate
|
||||
; 286..306 = sit there
|
||||
|
||||
|
||||
; timing, want whole thing to finish in 200ms or so
|
||||
;
|
||||
@ -90,35 +82,144 @@ movie_maglev_flip_start:
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
.if 0
|
||||
lda #0
|
||||
sta WHICH_OVERLAY
|
||||
|
||||
load_overlay_loop:
|
||||
ldx WHICH_OVERLAY
|
||||
lda overlays_l,X
|
||||
sta ZX0_src
|
||||
lda overlays_h,X
|
||||
sta ZX0_src+1
|
||||
lda MAGLEV_FLIP_DIRECTION
|
||||
beq maglev_forward_flip
|
||||
|
||||
lda WHICH_OVERLAY
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc #>overlays
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
inc WHICH_OVERLAY
|
||||
lda WHICH_OVERLAY
|
||||
cmp #8
|
||||
bne load_overlay_loop
|
||||
.endif
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; Backward flip (face west)
|
||||
;===============================
|
||||
;===============================
|
||||
maglev_backward_flip:
|
||||
|
||||
;===============================
|
||||
; initial screen
|
||||
;===============================
|
||||
|
||||
lda #30
|
||||
sta SCENE_COUNT
|
||||
|
||||
lda #7 ; start at end
|
||||
sta WHICH_OVERLAY
|
||||
|
||||
jsr draw_scene
|
||||
|
||||
jsr flip_pages
|
||||
|
||||
;===============================
|
||||
; wait 4 frames (800ms)
|
||||
|
||||
ldx #16
|
||||
jsr wait_50xms
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; move the handle
|
||||
;===============================
|
||||
;===============================
|
||||
|
||||
lda #7
|
||||
sta WHICH_OVERLAY
|
||||
|
||||
move_handle_backward_loop:
|
||||
|
||||
jsr draw_scene
|
||||
|
||||
jsr flip_pages
|
||||
|
||||
dec WHICH_OVERLAY
|
||||
bmi done_move_handle_backward
|
||||
|
||||
backward_overlay_good:
|
||||
|
||||
ldx #2
|
||||
jsr wait_50xms
|
||||
|
||||
jmp move_handle_backward_loop
|
||||
|
||||
|
||||
done_move_handle_backward:
|
||||
lda #0 ; point to first one
|
||||
sta WHICH_OVERLAY
|
||||
|
||||
;===============================
|
||||
; wait 16 frames (3.2s?)
|
||||
|
||||
ldx #64
|
||||
jsr wait_50xms
|
||||
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; play the movie
|
||||
;===============================
|
||||
;===============================
|
||||
|
||||
lda #30
|
||||
sta SCENE_COUNT
|
||||
|
||||
movie1_backward_loop:
|
||||
|
||||
jsr draw_scene
|
||||
|
||||
jsr flip_pages
|
||||
|
||||
dec SCENE_COUNT
|
||||
lda SCENE_COUNT
|
||||
; cmp #0
|
||||
bmi done_play_movie1_backward
|
||||
|
||||
ldx #2
|
||||
jsr wait_50xms
|
||||
|
||||
jmp movie1_backward_loop
|
||||
|
||||
|
||||
done_play_movie1_backward:
|
||||
|
||||
;===============================
|
||||
; wait 9 frames (1.8s?)
|
||||
|
||||
ldx #36
|
||||
jsr wait_50xms
|
||||
|
||||
|
||||
done_movie1_bacward:
|
||||
bit KEYRESET
|
||||
|
||||
|
||||
;=============================
|
||||
; return back to game
|
||||
|
||||
lda #LOAD_MAGLEV
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #DIRECTION_W
|
||||
sta DIRECTION
|
||||
|
||||
lda #RIVEN_INSEAT
|
||||
sta LOCATION
|
||||
|
||||
; needed?
|
||||
|
||||
lda #1
|
||||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; Forward flip (face east)
|
||||
;===============================
|
||||
;===============================
|
||||
maglev_forward_flip:
|
||||
|
||||
;===============================
|
||||
; initial screen
|
||||
;===============================
|
||||
|
||||
lda #0
|
||||
@ -353,12 +454,8 @@ done_pageflip:
|
||||
|
||||
;===================================
|
||||
|
||||
|
||||
; .include "zx02_optim.s"
|
||||
|
||||
.include "movie_maglev_flip/movie_maglev_flip.inc"
|
||||
|
||||
; .include "wait.s"
|
||||
|
||||
frames_l:
|
||||
.byte <img025_bg_zx02
|
||||
|
@ -85,18 +85,6 @@ DRAW_PAGE = $8D
|
||||
|
||||
WHICH_OVERLAY = $8E
|
||||
|
||||
;HOLDING_PAGE = $90
|
||||
; HOLDING_RED_PAGE = $80
|
||||
; HOLDING_BLUE_PAGE = $40
|
||||
; HOLDING_WHITE_PAGE = $C0
|
||||
;HOLDING_ITEM = $91
|
||||
; HOLDING_KEY = $04
|
||||
; HOLDING_LIT_MATCH = $02
|
||||
; HOLDING_MATCH = $01
|
||||
|
||||
|
||||
|
||||
|
||||
; Riven zero page addresses
|
||||
|
||||
FRAMEL = $90
|
||||
@ -117,6 +105,8 @@ APPLEII_MODEL = $9D
|
||||
HGR_PAGE = $9E
|
||||
WHICH_SLOT = $9F
|
||||
|
||||
MAGLEV_FLIP_DIRECTION = $A0
|
||||
BEACH_ANIMALS_SEEN = $A1
|
||||
|
||||
TEMP = $F9
|
||||
MASKL = $FA
|
||||
@ -126,28 +116,3 @@ INH = $FD
|
||||
OUTL = $FE
|
||||
OUTH = $FF
|
||||
|
||||
; read any file slot 6 version
|
||||
; based on FASTLD6 and RTS copyright (c) Peter Ferrie 2011-2013,2018
|
||||
|
||||
; modified to assemble with ca65 -- vmw
|
||||
; added code to patch it to run from current disk slot -- vmw
|
||||
|
||||
.if 0
|
||||
|
||||
adrlo = $26 ; constant from boot prom
|
||||
adrhi = $27 ; constant from boot prom
|
||||
tmpsec = $3c ; constant from boot prom
|
||||
reqsec = $3d ; constant from boot prom
|
||||
sizelo = $44
|
||||
sizehi = $45
|
||||
secsize = $46
|
||||
|
||||
ldsizel = $70
|
||||
ldsizeh = $71
|
||||
namlo = $7b
|
||||
namhi = $7c
|
||||
step = $7d ; state for stepper motor
|
||||
tmptrk = $7e ; temporary copy of current track
|
||||
phase = $7f ; current phase for /seek
|
||||
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user