aboutsummaryrefslogtreecommitdiff
path: root/jumpmanjr.dasm
diff options
context:
space:
mode:
Diffstat (limited to 'jumpmanjr.dasm')
-rw-r--r--jumpmanjr.dasm188
1 files changed, 101 insertions, 87 deletions
diff --git a/jumpmanjr.dasm b/jumpmanjr.dasm
index 433cb6f..881d65d 100644
--- a/jumpmanjr.dasm
+++ b/jumpmanjr.dasm
@@ -1,5 +1,5 @@
; da65 V2.15 - Git 104f898
-; Created: 2016-09-07 15:56:49
+; Created: 2016-09-09 04:10:51
; Input file: jumpmanjr.rom
; Page: 1
@@ -32,6 +32,8 @@ sa_tmp_2 := $00C8 ; used by calc_screen_addr
dm_delta_x := $00C9 ; see draw_map and level_maps.txt
dm_delta_y := $00CA ; see draw_map and level_maps.txt
zp_temp1 := $00CB ; used for (zp,y) addressing, also for checking console keys in vblank_imm_isr
+tmp_sprite := $00CD ; ZP pointer to player/missile data (e.g. jumpman's 10-byte animation frames)
+tmp_sprite_height:= $00CF ; length of data pointed to by tmp_sprite
num_in := $00D0 ; print_number input. 3-byte number (LSB first as usual) to be printed
num_out := $00D3 ; area of (screen) memory where print_number stores its output
num_color := $00D5 ; print_number adds this to numeric screencode output. normally 0, set to $80 on the end-of-game screen.
@@ -59,7 +61,8 @@ jiffy_timer_1 := $061A ; gets incremented every frame
jiffy_timer_2 := $061B ; gets incremented every frame
odd_frame_flag := $061C ; a 1-bit frame counter (toggles every frame). possibly unused.
speed_jiffy_timer:= $061E ; counts 0..initial_speed
-falling_flag := $0621 ; 1 = falling, reset to 0 when jumpman hits the ground
+start_falling_flag:= $0621 ; reset to 0 every frame, set to 1 when starting to fall
+falling_flag := $0623 ; 0 = ok, 1 = falling, 2 = on ground.
current_speed := $0624 ; can be modified, e.g. set to $08 when being electrocuted
initial_speed := $0625 ; current user's chosen speed, set at game start
bonus_jiffy_timer:= $0626 ; gets incremented every frame when playing a level, bonus-=100 when this wraps around to 0
@@ -80,8 +83,14 @@ snd_slot_audc := $0647
snd_slot_curpos := $064E ; address we've got to so far, playing this sfx
snd_priority_tmp:= $0661 ; ??
num_tmp := $0665 ; temp used by print_number
+player_enabled := $0668 ; 1 = draw this player, 0 = no. actually $0669 thru $066e
+player_height := $0677 ; actually $0677 thru $067b
+player_new_x := $067C ; HPOSxx, 1-indexed, $067d thru $0681 are p5, p3..p0
player_x_pos := $067E ; stored in HPOSP0
player_y_pos := $0683 ; $C6 is the bottom of the level (where you end up when you die)
+player_new_y := $0686 ; $0687 thru $069b
+player_x := $068B ; HPOSxx, $068c thru $06c0
+player_y := $0695 ; vertical positions, actually $0696 thru $069a
bullet_x_pos := $069B ; 4 bytes, meaning we can never have >4 bullets on screen at once (makes sense, GTIA only has 4 missiles)
bullet_y_pos_minus_one:= $069E
bullet_y_pos := $069F ; another 4 bytes
@@ -157,7 +166,7 @@ work_level_init := $07A2 ; called at start of level, $06E
work_level_sub6 := $07A4 ; always $9740 aka game_main_loop
work_level_sub_eol:= $07A6 ; called at end of level (all bombs picked up). $06E6 for all but level08
work_level_offs_40:= $07A8 ; all zeroes
-work_level_colpf3:= $07AE ; color (not sure what gets drawn in this color yet)
+work_level_colpf3:= $07AE ; color for missiles (aka 5th player)
work_level_colpf0:= $07AF ; color for girders and up-ropes
work_level_colpf1:= $07B0 ; color for ladders and down-ropes
work_level_colpf2:= $07B1 ; color for bombs
@@ -190,7 +199,7 @@ cur_level_init := $07E2 ; called at start of level, $06E
cur_level_sub6 := $07E4 ; always $9740 aka game_main_loop
cur_level_sub_eol:= $07E6 ; called at end of level (all bombs picked up). $06E6 for all but level08
cur_level_offs_40:= $07E8 ; all zeroes
-cur_level_colpf3:= $07EE ; color (not sure what gets drawn in this color yet)
+cur_level_colpf3:= $07EE ; color for missiles (aka 5th player)
cur_level_colpf0:= $07EF ; color for girders and up-ropes
cur_level_colpf1:= $07F0 ; color for ladders and down-ropes
cur_level_colpf2:= $07F1 ; color for bombs
@@ -816,12 +825,12 @@ next_plr:
dec zp_temp1+1 ; 82F3 C6 CC ..
dex ; 82F5 CA .
beq position_done ; 82F6 F0 F0 ..
- lda $0668,x ; 82F8 BD 68 06 .h.
+ lda player_enabled,x ; 82F8 BD 68 06 .h.
beq next_plr ; 82FB F0 F6 ..
- lda $067C,x ; 82FD BD 7C 06 .|.
- cmp $068B,x ; 8300 DD 8B 06 ...
+ lda player_new_x,x ; 82FD BD 7C 06 .|.
+ cmp player_x,x ; 8300 DD 8B 06 ...
beq position_pm_vert ; 8303 F0 1D ..
- sta $068B,x ; 8305 9D 8B 06 ...
+ sta player_x,x ; 8305 9D 8B 06 ...
sta HPOSP0_minus_two,x ; 8308 9D FE CF ...
cpx #$01 ; 830B E0 01 ..
bne position_pm_vert ; 830D D0 13 ..
@@ -842,48 +851,51 @@ position_pm_vert:
lda $0690,x ; 8322 BD 90 06 ...
cmp $0681,x ; 8325 DD 81 06 ...
bne skip_vert ; 8328 D0 0E ..
- lda $0686,x ; 832A BD 86 06 ...
- cmp $0695,x ; 832D DD 95 06 ...
+ lda player_new_y,x ; 832A BD 86 06 ...
+ cmp player_y,x ; 832D DD 95 06 ...
beq next_plr ; 8330 F0 C1 ..
- sta $0695,x ; 8332 9D 95 06 ...
+ sta player_y,x ; 8332 9D 95 06 ...
lda $0690,x ; 8335 BD 90 06 ...
skip_vert:
sta zp_temp1 ; 8338 85 CB ..
- lda $0677,x ; 833A BD 77 06 .w.
- sta $CF ; 833D 85 CF ..
+ lda player_height,x ; 833A BD 77 06 .w.
+ sta tmp_sprite_height ; 833D 85 CF ..
lda #$00 ; 833F A9 00 ..
tay ; 8341 A8 .
; write zeroes to unused portion of this player/missile
clear_pm:
sta (zp_temp1),y ; 8342 91 CB ..
iny ; 8344 C8 .
- cpy $CF ; 8345 C4 CF ..
+ cpy tmp_sprite_height ; 8345 C4 CF ..
bne clear_pm ; 8347 D0 F9 ..
lda $0681,x ; 8349 BD 81 06 ...
sta $0690,x ; 834C 9D 90 06 ...
sta zp_temp1 ; 834F 85 CB ..
lda $066D,x ; 8351 BD 6D 06 .m.
- sta $CD ; 8354 85 CD ..
+ sta tmp_sprite ; 8354 85 CD ..
lda $0672,x ; 8356 BD 72 06 .r.
- sta $CE ; 8359 85 CE ..
- ldy $0686,x ; 835B BC 86 06 ...
+ sta tmp_sprite+1 ; 8359 85 CE ..
+ ldy player_new_y,x ; 835B BC 86 06 ...
clc ; 835E 18 .
-L835F: dey ; 835F 88 .
- beq L8370 ; 8360 F0 0E ..
- lda $CF ; 8362 A5 CF ..
- adc $CD ; 8364 65 CD e.
- sta $CD ; 8366 85 CD ..
- bcc L835F ; 8368 90 F5 ..
- inc $CE ; 836A E6 CE ..
+; adjust pointer if Y wraps around
+adj_ptr:dey ; 835F 88 .
+ beq copy_pm_data ; 8360 F0 0E ..
+ lda tmp_sprite_height ; 8362 A5 CF ..
+ adc tmp_sprite ; 8364 65 CD e.
+ sta tmp_sprite ; 8366 85 CD ..
+ bcc adj_ptr ; 8368 90 F5 ..
+ inc tmp_sprite+1 ; 836A E6 CE ..
clc ; 836C 18 .
- jmp L835F ; 836D 4C 5F 83 L_.
+ jmp adj_ptr ; 836D 4C 5F 83 L_.
; ----------------------------------------------------------------------------
-L8370: lda ($CD),y ; 8370 B1 CD ..
+; write to P/M memory
+copy_pm_data:
+ lda (tmp_sprite),y ; 8370 B1 CD ..
sta (zp_temp1),y ; 8372 91 CB ..
iny ; 8374 C8 .
- dec $CF ; 8375 C6 CF ..
- bne L8370 ; 8377 D0 F7 ..
+ dec tmp_sprite_height ; 8375 C6 CF ..
+ bne copy_pm_data ; 8377 D0 F7 ..
jmp next_plr ; 8379 4C F3 82 L..
; ----------------------------------------------------------------------------
@@ -989,7 +1001,7 @@ no_wrap:inc jiffy_timer_1 ; 841F EE 1A 06
and #$01 ; 842B 29 01 ).
sta odd_frame_flag ; 842D 8D 1C 06 ...
lda #$00 ; 8430 A9 00 ..
- sta falling_flag ; 8432 8D 21 06 .!.
+ sta start_falling_flag ; 8432 8D 21 06 .!.
sta $0622 ; 8435 8D 22 06 .".
sta $06FD ; 8438 8D FD 06 ...
inc $061D ; 843B EE 1D 06 ...
@@ -1002,7 +1014,7 @@ no_wrap:inc jiffy_timer_1 ; 841F EE 1A 06
bcc check_speed_timer ; 844E 90 1E ..
lda #$00 ; 8450 A9 00 ..
sta $061D ; 8452 8D 1D 06 ...
- inc falling_flag ; 8455 EE 21 06 .!.
+ inc start_falling_flag ; 8455 EE 21 06 .!.
inc $061F ; 8458 EE 1F 06 ...
inc $0620 ; 845B EE 20 06 . .
lda $061F ; 845E AD 1F 06 ...
@@ -1234,7 +1246,7 @@ zero_filler_85f6:
.byte $00,$00,$00,$00,$00,$00,$00,$00 ; 85F6 00 00 00 00 00 00 00 00 ........
.byte $00,$00 ; 85FE 00 00 ..
; ----------------------------------------------------------------------------
-; convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out
+; convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out. num_in is modified.
print_number:
ldx #$00 ; 8600 A2 00 ..
ldy #$00 ; 8602 A0 00 ..
@@ -1304,7 +1316,7 @@ print_score:
ldx #$03 ; 8670 A2 03 ..
; number_of_users should be score-1 here.
ps_loop:lda number_of_users,x ; 8672 BD FF 06 ...
- sta $CF,x ; 8675 95 CF ..
+ sta tmp_sprite_height,x ; 8675 95 CF ..
dex ; 8677 CA .
bne ps_loop ; 8678 D0 F8 ..
jsr print_number ; 867A 20 00 86 ..
@@ -1319,7 +1331,7 @@ print_bonus:
sta num_out+1 ; 8684 85 D4 ..
ldx #$03 ; 8686 A2 03 ..
pb_loop:lda work_level_points_per_bomb,x ; 8688 BD 90 07 ...
- sta $CF,x ; 868B 95 CF ..
+ sta tmp_sprite_height,x ; 868B 95 CF ..
dex ; 868D CA .
bne pb_loop ; 868E D0 F8 ..
jsr print_number ; 8690 20 00 86 ..
@@ -1403,7 +1415,7 @@ prepare_level:
lda #$00 ; 8731 A9 00 ..
sta playing_level ; 8733 8D 27 06 .'.
L8736: sta $0681,x ; 8736 9D 81 06 ...
- sta $0668,x ; 8739 9D 68 06 .h.
+ sta player_enabled,x ; 8739 9D 68 06 .h.
sta $069A,x ; 873C 9D 9A 06 ...
jsr hide_player ; 873F 20 B8 8D ..
dex ; 8742 CA .
@@ -1673,9 +1685,9 @@ zero_filler_88f9:
; ----------------------------------------------------------------------------
; called via vector in page 6
check_falling_2:
- lda falling_flag ; 8900 AD 21 06 .!.
+ lda start_falling_flag ; 8900 AD 21 06 .!.
beq L890F ; 8903 F0 0A ..
- lda $0623 ; 8905 AD 23 06 .#.
+ lda falling_flag ; 8905 AD 23 06 .#.
cmp #$01 ; 8908 C9 01 ..
beq L8910 ; 890A F0 04 ..
jmp L89F3 ; 890C 4C F3 89 L..
@@ -1712,7 +1724,7 @@ L8945: lda player_y_pos ; 8945 AD 83 06
sta AUDF1 ; 894E 8D 00 D2 ...
sta AUDC1 ; 8951 8D 01 D2 ...
sta $06EF ; 8954 8D EF 06 ...
- inc $0623 ; 8957 EE 23 06 .#.
+ inc falling_flag ; 8957 EE 23 06 .#.
jmp L89F3 ; 895A 4C F3 89 L..
; ----------------------------------------------------------------------------
@@ -1788,7 +1800,7 @@ L89D1: clc ; 89D1 18
rts ; 89F2 60 `
; ----------------------------------------------------------------------------
-L89F3: lda $0623 ; 89F3 AD 23 06 .#.
+L89F3: lda falling_flag ; 89F3 AD 23 06 .#.
cmp #$02 ; 89F6 C9 02 ..
beq L89FB ; 89F8 F0 01 ..
rts ; 89FA 60 `
@@ -1819,7 +1831,7 @@ L8A16: lda $0663 ; 8A16 AD 63 06
L8A25: lda #$09 ; 8A25 A9 09 ..
sta current_speed ; 8A27 8D 24 06 .$.
lda #$00 ; 8A2A A9 00 ..
- sta $0623 ; 8A2C 8D 23 06 .#.
+ sta falling_flag ; 8A2C 8D 23 06 .#.
sta player_x_pos ; 8A2F 8D 7E 06 .~.
dec lives ; 8A32 CE 0A 07 ...
sta $06EE ; 8A35 8D EE 06 ...
@@ -2046,7 +2058,7 @@ no_cross:
sta num_out+1 ; 8BF6 85 D4 ..
ldx #$03 ; 8BF8 A2 03 ..
L8BFA: lda struct_user_1,y ; 8BFA B9 0B 07 ...
- sta $CF,x ; 8BFD 95 CF ..
+ sta tmp_sprite_height,x ; 8BFD 95 CF ..
dey ; 8BFF 88 .
dex ; 8C00 CA .
bne L8BFA ; 8C01 D0 F7 ..
@@ -2309,7 +2321,7 @@ L8DAA: jsr well_done_screen ; 8DAA 20 00 BC
hide_player:
lda #$02 ; 8DB8 A9 02 ..
sta HPOSM3,x ; 8DBA 9D 07 D0 ...
- sta $067C,x ; 8DBD 9D 7C 06 .|.
+ sta player_new_x,x ; 8DBD 9D 7C 06 .|.
lda #$00 ; 8DC0 A9 00 ..
sta $06EA,x ; 8DC2 9D EA 06 ...
rts ; 8DC5 60 `
@@ -2411,7 +2423,7 @@ zero_filler_8e67:
bullet_logic:
lda $0622 ; 8E69 AD 22 06 .".
beq no_bullet ; 8E6C F0 07 ..
- lda $0623 ; 8E6E AD 23 06 .#.
+ lda falling_flag ; 8E6E AD 23 06 .#.
cmp #$02 ; 8E71 C9 02 ..
bne want_bullet ; 8E73 D0 01 ..
no_bullet:
@@ -2563,9 +2575,9 @@ check_pl_coll_no_pl:
ora sav_m3pl ; 8F82 0D BB 06 ...
and #$01 ; 8F85 29 01 ).
beq L8F91 ; 8F87 F0 08 ..
- lda $0623 ; 8F89 AD 23 06 .#.
+ lda falling_flag ; 8F89 AD 23 06 .#.
bne L8F91 ; 8F8C D0 03 ..
- inc $0623 ; 8F8E EE 23 06 .#.
+ inc falling_flag ; 8F8E EE 23 06 .#.
L8F91: rts ; 8F91 60 `
; ----------------------------------------------------------------------------
@@ -3465,10 +3477,10 @@ game_main_loop:
L9743: jsr check_bomb_coll_jv ; 9743 20 33 80 3.
lda work_level_num_bombs ; 9746 AD 8A 07 ...
beq got_all_bombs ; 9749 F0 1B ..
- lda $0623 ; 974B AD 23 06 .#.
+ lda falling_flag ; 974B AD 23 06 .#.
cmp #$02 ; 974E C9 02 ..
bne L9743 ; 9750 D0 F1 ..
-L9752: lda $0623 ; 9752 AD 23 06 .#.
+L9752: lda falling_flag ; 9752 AD 23 06 .#.
cmp #$02 ; 9755 C9 02 ..
beq L9752 ; 9757 F0 F9 ..
lda lives ; 9759 AD 0A 07 ...
@@ -3545,7 +3557,7 @@ mj_delay:
mj_done:lda #$00 ; 97DB A9 00 ..
sta AUDF4 ; 97DD 8D 06 D2 ...
sta AUDC4 ; 97E0 8D 07 D2 ...
- sta $0623 ; 97E3 8D 23 06 .#.
+ sta falling_flag ; 97E3 8D 23 06 .#.
lda initial_speed ; 97E6 AD 25 06 .%.
sta current_speed ; 97E9 8D 24 06 .$.
inc playing_level ; 97EC EE 27 06 .'.
@@ -3558,14 +3570,16 @@ zero_filler_97f0:
; ----------------------------------------------------------------------------
; called via vector in page 6
check_falling_1:
- lda falling_flag ; 9800 AD 21 06 .!.
+ lda start_falling_flag ; 9800 AD 21 06 .!.
bne L9806 ; 9803 D0 01 ..
-L9805: rts ; 9805 60 `
+cf_done:rts ; 9805 60 `
; ----------------------------------------------------------------------------
-L9806: lda $0623 ; 9806 AD 23 06 .#.
- bne L9805 ; 9809 D0 FA ..
+L9806: lda falling_flag ; 9806 AD 23 06 .#.
+ bne cf_done ; 9809 D0 FA ..
lda player_y_pos ; 980B AD 83 06 ...
+; we're falling, have we hit the ground yet?
+check_ground:
cmp #$C6 ; 980E C9 C6 ..
bcs L982E ; 9810 B0 1C ..
lda jump_frame ; 9812 AD EB 06 ...
@@ -3583,7 +3597,7 @@ check_collisions_2:
ora sav_p1pf ; 9827 0D B5 06 ...
and #$03 ; 982A 29 03 ).
bne check_collisions_3 ; 982C D0 04 ..
-L982E: inc $0623 ; 982E EE 23 06 .#.
+L982E: inc falling_flag ; 982E EE 23 06 .#.
rts ; 9831 60 `
; ----------------------------------------------------------------------------
@@ -4427,7 +4441,7 @@ level01_sub_eol:
; all zeroes
level01_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A028 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level01_colpf3:
.byte $CA ; A02E CA .
; color for girders and up-ropes
@@ -4534,7 +4548,7 @@ level02_sub_eol:
; all zeroes
level02_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A068 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level02_colpf3:
.byte $6A ; A06E 6A j
; color for girders and up-ropes
@@ -4641,7 +4655,7 @@ level03_sub_eol:
; all zeroes
level03_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A0A8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level03_colpf3:
.byte $1A ; A0AE 1A .
; color for girders and up-ropes
@@ -4748,7 +4762,7 @@ level04_sub_eol:
; all zeroes
level04_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A0E8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level04_colpf3:
.byte $CA ; A0EE CA .
; color for girders and up-ropes
@@ -4855,7 +4869,7 @@ level05_sub_eol:
; all zeroes
level05_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A128 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level05_colpf3:
.byte $6A ; A12E 6A j
; color for girders and up-ropes
@@ -4962,7 +4976,7 @@ level06_sub_eol:
; all zeroes
level06_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A168 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level06_colpf3:
.byte $56 ; A16E 56 V
; color for girders and up-ropes
@@ -5069,7 +5083,7 @@ level07_sub_eol:
; all zeroes
level07_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A1A8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level07_colpf3:
.byte $CA ; A1AE CA .
; color for girders and up-ropes
@@ -5176,7 +5190,7 @@ level08_sub_eol:
; all zeroes
level08_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A1E8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level08_colpf3:
.byte $6A ; A1EE 6A j
; color for girders and up-ropes
@@ -5283,7 +5297,7 @@ level09_sub_eol:
; all zeroes
level09_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A228 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level09_colpf3:
.byte $1A ; A22E 1A .
; color for girders and up-ropes
@@ -5390,7 +5404,7 @@ level10_sub_eol:
; all zeroes
level10_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A268 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level10_colpf3:
.byte $CA ; A26E CA .
; color for girders and up-ropes
@@ -5497,7 +5511,7 @@ level11_sub_eol:
; all zeroes
level11_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A2A8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level11_colpf3:
.byte $6A ; A2AE 6A j
; color for girders and up-ropes
@@ -5604,7 +5618,7 @@ level12_sub_eol:
; all zeroes
level12_offs_40:
.byte $00,$00,$00,$00,$00,$00 ; A2E8 00 00 00 00 00 00 ......
-; color (not sure what gets drawn in this color yet)
+; color for missiles (aka 5th player)
level12_colpf3:
.byte $08 ; A2EE 08 .
; color for girders and up-ropes
@@ -5733,9 +5747,9 @@ electrocution_bomb_pickup:
lda LA563,y ; A4C1 B9 63 A5 .c.
asl a ; A4C4 0A .
adc #$20 ; A4C5 69 20 i
- sta $0686 ; A4C7 8D 86 06 ...
+ sta player_new_y ; A4C7 8D 86 06 ...
lda LA5A2,y ; A4CA B9 A2 A5 ...
- sta $068B ; A4CD 8D 8B 06 ...
+ sta player_x ; A4CD 8D 8B 06 ...
lda LA5A3,y ; A4D0 B9 A3 A5 ...
sta PCOLR3 ; A4D3 8D C3 02 ...
sta $066C ; A4D6 8D 6C 06 .l.
@@ -5745,9 +5759,9 @@ electrocution_bomb_pickup:
; ----------------------------------------------------------------------------
; turn off electrocution effect (?)
electrocution_done:
- lda $0623 ; A4DD AD 23 06 .#.
+ lda falling_flag ; A4DD AD 23 06 .#.
bne LA4FF ; A4E0 D0 1D ..
- lda falling_flag ; A4E2 AD 21 06 .!.
+ lda start_falling_flag ; A4E2 AD 21 06 .!.
bne LA4E8 ; A4E5 D0 01 ..
rts ; A4E7 60 `
@@ -5900,7 +5914,7 @@ dumbwaiter_sub0:
sta $0770 ; A6D4 8D 70 07 .p.
lda #$FF ; A6D7 A9 FF ..
sta $0771 ; A6D9 8D 71 07 .q.
-LA6DC: lda $0623 ; A6DC AD 23 06 .#.
+LA6DC: lda falling_flag ; A6DC AD 23 06 .#.
cmp #$02 ; A6DF C9 02 ..
beq LA6BC ; A6E1 F0 D9 ..
lda $0622 ; A6E3 AD 22 06 .".
@@ -5938,7 +5952,7 @@ LA719: lda $2B00,x ; A719 BD 00 2B
; ----------------------------------------------------------------------------
; gets called every frame
dumbwaiter_sub3:
- lda $0623 ; A724 AD 23 06 .#.
+ lda falling_flag ; A724 AD 23 06 .#.
cmp #$02 ; A727 C9 02 ..
beq LA778 ; A729 F0 4D .M
lda $0622 ; A72B AD 22 06 .".
@@ -6024,7 +6038,7 @@ hellstones_sub3:
; ----------------------------------------------------------------------------
hellstones_sub0:
- lda $0623 ; A836 AD 23 06 .#.
+ lda falling_flag ; A836 AD 23 06 .#.
cmp #$02 ; A839 C9 02 ..
beq LA842 ; A83B F0 05 ..
lda $0622 ; A83D AD 22 06 .".
@@ -6598,7 +6612,7 @@ ltr_skip:
; per letter
bonus_250_pts:
lda $0770 ; AF96 AD 70 07 .p.
- sta $0686 ; AF99 8D 86 06 ...
+ sta player_new_y ; AF99 8D 86 06 ...
lda #$86 ; AF9C A9 86 ..
sta $0681 ; AF9E 8D 81 06 ...
clc ; AFA1 18 .
@@ -6739,7 +6753,7 @@ blackout_bomb_sub:
; ----------------------------------------------------------------------------
; copies pixels from rendered real map at $1000 to visible screen memory at $3000, centered around jumpman's location
blackout_sub0:
- lda falling_flag ; B140 AD 21 06 .!.
+ lda start_falling_flag ; B140 AD 21 06 .!.
bne LB146 ; B143 D0 01 ..
LB145: rts ; B145 60 `
@@ -6993,7 +7007,7 @@ hatch_bomb_sub:
; ----------------------------------------------------------------------------
hatch_sub0:
- lda $0623 ; B457 AD 23 06 .#.
+ lda falling_flag ; B457 AD 23 06 .#.
cmp #$02 ; B45A C9 02 ..
bne LB46A ; B45C D0 0C ..
lda #$00 ; B45E A9 00 ..
@@ -7034,22 +7048,22 @@ LB49F: lda $0771 ; B49F AD 71 07
beq LB4C1 ; B4A6 F0 19 ..
clc ; B4A8 18 .
adc #$04 ; B4A9 69 04 i.
- sta $068B ; B4AB 8D 8B 06 ...
+ sta player_x ; B4AB 8D 8B 06 ...
inc $0771 ; B4AE EE 71 07 .q.
lda $0680 ; B4B1 AD 80 06 ...
sta $0681 ; B4B4 8D 81 06 ...
lda $0685 ; B4B7 AD 85 06 ...
- sta $0686 ; B4BA 8D 86 06 ...
+ sta player_new_y ; B4BA 8D 86 06 ...
sta $066D ; B4BD 8D 6D 06 .m.
rts ; B4C0 60 `
; ----------------------------------------------------------------------------
-LB4C1: lda $068B ; B4C1 AD 8B 06 ...
+LB4C1: lda player_x ; B4C1 AD 8B 06 ...
and #$03 ; B4C4 29 03 ).
clc ; B4C6 18 .
adc #$04 ; B4C7 69 04 i.
- sta $068B ; B4C9 8D 8B 06 ...
- inc $068B ; B4CC EE 8B 06 ...
+ sta player_x ; B4C9 8D 8B 06 ...
+ inc player_x ; B4CC EE 8B 06 ...
cmp #$07 ; B4CF C9 07 ..
bne LB4E2 ; B4D1 D0 0F ..
cue_woop_sound:
@@ -7069,14 +7083,14 @@ LB4EE: sty $A0 ; B4EE 84 A0
adc $A0 ; B4F1 65 A0 e.
sta $0681 ; B4F3 8D 81 06 ...
ldy #$01 ; B4F6 A0 01 ..
- lda $0686 ; B4F8 AD 86 06 ...
+ lda player_new_y ; B4F8 AD 86 06 ...
cmp player_y_pos ; B4FB CD 83 06 ...
bcc LB502 ; B4FE 90 02 ..
ldy #$FF ; B500 A0 FF ..
LB502: sty $A0 ; B502 84 A0 ..
clc ; B504 18 .
adc $A0 ; B505 65 A0 e.
- sta $0686 ; B507 8D 86 06 ...
+ sta player_new_y ; B507 8D 86 06 ...
rts ; B50A 60 `
; ----------------------------------------------------------------------------
@@ -7155,7 +7169,7 @@ l12_unkn0:
.byte $05 ; B690 05 .
; ----------------------------------------------------------------------------
hurr_sub0:
- lda falling_flag ; B691 AD 21 06 .!.
+ lda start_falling_flag ; B691 AD 21 06 .!.
bne falling_wind ; B694 D0 01 ..
rts ; B696 60 `
@@ -7171,7 +7185,7 @@ hurr_sub1:
lda current_speed ; B69B AD 24 06 .$.
cmp #$09 ; B69E C9 09 ..
bcs LB6A9 ; B6A0 B0 07 ..
- lda $0623 ; B6A2 AD 23 06 .#.
+ lda falling_flag ; B6A2 AD 23 06 .#.
cmp #$02 ; B6A5 C9 02 ..
bne LB6BA ; B6A7 D0 11 ..
LB6A9: lda $0768 ; B6A9 AD 68 07 .h.
@@ -7707,7 +7721,7 @@ wd_wait_32j:
lda #$0D ; BC79 A9 0D ..
sta joystick_disabled ; BC7B 8D 32 06 .2.
lda #$00 ; BC7E A9 00 ..
- sta $0623 ; BC80 8D 23 06 .#.
+ sta falling_flag ; BC80 8D 23 06 .#.
lda #$52 ; BC83 A9 52 .R
sta work_level_sub1 ; BC85 8D 84 07 ...
lda #$BD ; BC88 A9 BD ..
@@ -7736,7 +7750,7 @@ print_total_score_msg:
ldx #$03 ; BCB4 A2 03 ..
; display current user's score, number_of_users should be score-1 here.
wd_xxx: lda number_of_users,x ; BCB6 BD FF 06 ...
- sta $CF,x ; BCB9 95 CF ..
+ sta tmp_sprite_height,x ; BCB9 95 CF ..
dex ; BCBB CA .
bne wd_xxx ; BCBC D0 F8 ..
jsr print_number_jv ; BCBE 20 09 80 ..
@@ -7779,7 +7793,7 @@ well_done_map:
; ----------------------------------------------------------------------------
; used in work_level_sub1 slot during well_doneused in work_level_sub1 slot during well_done
well_done_sub1:
- lda falling_flag ; BD52 AD 21 06 .!.
+ lda start_falling_flag ; BD52 AD 21 06 .!.
bne wds1_cont ; BD55 D0 01 ..
rts ; BD57 60 `
@@ -7816,7 +7830,7 @@ wds1_finish:
lda #$C6 ; BD90 A9 C6 ..
sta player_y_pos ; BD92 8D 83 06 ...
lda #$00 ; BD95 A9 00 ..
- sta falling_flag ; BD97 8D 21 06 .!.
+ sta start_falling_flag ; BD97 8D 21 06 .!.
lda #$01 ; BD9A A9 01 ..
sta $0688 ; BD9C 8D 88 06 ...
rts ; BD9F 60 `