aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--jumpmanjr.dasm184
-rw-r--r--jumpmanjr.html322
-rw-r--r--jumpmanjr.info54
-rw-r--r--leveldesc.info28
-rw-r--r--main.info26
-rw-r--r--mklevelinfo.pl2
7 files changed, 363 insertions, 257 deletions
diff --git a/Makefile b/Makefile
index 1e13d51..895c2fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: clean jumpmanjr.dasm
+all: clean jumpmanjr.dasm jmjtest.dasm
clean:
rm -f jumpmanjr.dasm
@@ -17,6 +17,8 @@ jumpmanjr.info: main.info leveldesc.info
leveldesc.info: mklevelinfo.pl
perl mklevelinfo.pl > leveldesc.info
+html: jumpmanjr.html
+
jumpmanjr.html: jumpmanjr.dasm
vim +TOhtml '+w!jumpmanjr.html' '+qall!' jumpmanjr.dasm
diff --git a/jumpmanjr.dasm b/jumpmanjr.dasm
index f686f93..143048e 100644
--- a/jumpmanjr.dasm
+++ b/jumpmanjr.dasm
@@ -1,5 +1,5 @@
; da65 V2.15 - Git 104f898
-; Created: 2016-08-29 22:55:55
+; Created: 2016-08-30 01:18:47
; Input file: jumpmanjr.rom
; Page: 1
@@ -73,6 +73,7 @@ L06DF := $06DF
L06E0 := $06E0
L06E3 := $06E3
L06E6 := $06E6
+jump_frame := $06EB ; 0 if not jumping, or frames since start of jump (range 1 to 21)
randomizer_mode := $06F3 ; only after beating levels 1-12 in order
number_of_players:= $06F4 ; 0 for single-player game, otherwise range 1-3 (2 to 4 players)
level := $06F6
@@ -100,7 +101,7 @@ work_level_map2 := $079A ; map data
work_level_unkn_table1:= $079C ; unknown, pointer to a ROM table or $0000
work_level_offs_30:= $079E ; always $0000
work_level_sub_bomb:= $07A0 ; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
-work_level_sub5 := $07A2 ; $06E6 for some levels, or else a ROM subroutine
+work_level_sub_start:= $07A2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
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 level07
work_level_offs_40:= $07A8 ; all zeroes
@@ -128,7 +129,7 @@ cur_level_map2 := $07DA ; map data
cur_level_unkn_table1:= $07DC ; unknown, pointer to a ROM table or $0000
cur_level_offs_30:= $07DE ; always $0000
cur_level_sub_bomb:= $07E0 ; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
-cur_level_sub5 := $07E2 ; $06E6 for some levels, or else a ROM subroutine
+cur_level_sub_start:= $07E2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
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 level07
cur_level_offs_40:= $07E8 ; all zeroes
@@ -193,7 +194,9 @@ draw_map_jv:
jmp draw_map ; 8000 4C 49 80 LI.
; ----------------------------------------------------------------------------
-L8003: jmp cue_sfx_lowprior ; 8003 4C 40 82 L@.
+; if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A
+cue_sfx_lowprior_jv:
+ jmp cue_sfx_lowprior ; 8003 4C 40 82 L@.
; ----------------------------------------------------------------------------
; setup to play sfx
@@ -517,7 +520,7 @@ sfx_next_note:
cmp #$01 ; 818F C9 01 ..
beq sfx_change_tempo ; 8191 F0 1B ..
cmp #$02 ; 8193 C9 02 ..
- beq sfx_jump ; 8195 F0 31 .1
+ beq sfx_jump_opcode ; 8195 F0 31 .1
cmp #$03 ; 8197 C9 03 ..
beq sfx_play_rest ; 8199 F0 03 ..
jmp sfx_finished ; 819B 4C 26 82 L&.
@@ -550,7 +553,7 @@ sfx_change_tempo:
; ----------------------------------------------------------------------------
; I *think* this jumps to a different sfx address...
-sfx_jump:
+sfx_jump_opcode:
iny ; 81C8 C8 .
lda (zp_temp1),y ; 81C9 B1 CB ..
sta sfx_slot_curpos,x ; 81CB 9D 4E 06 .N.
@@ -1555,7 +1558,7 @@ L8910: lda $06EE ; 8910 AD EE 06
lda #$8A ; 893B A9 8A ..
sta sfx_slot_timer ; 893D 8D 3F 06 .?.
lda #$07 ; 8940 A9 07 ..
- jsr L8003 ; 8942 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 8942 20 03 80 ..
L8945: lda $0683 ; 8945 AD 83 06 ...
cmp #$C6 ; 8948 C9 C6 ..
bcc L895D ; 894A 90 11 ..
@@ -1601,7 +1604,7 @@ play_sfx_bounce_1:
lda #$8A ; 899F A9 8A ..
sta sfx_slot_timer ; 89A1 8D 3F 06 .?.
lda #$04 ; 89A4 A9 04 ..
- jsr L8003 ; 89A6 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 89A6 20 03 80 ..
L89A9: ldx $06EA ; 89A9 AE EA 06 ...
cpx #$09 ; 89AC E0 09 ..
bne L89B8 ; 89AE D0 08 ..
@@ -1702,7 +1705,7 @@ play_sfx_bounce_2:
lda #$8A ; 8A8A A9 8A ..
sta sfx_slot_timer ; 8A8C 8D 3F 06 .?.
lda #$02 ; 8A8F A9 02 ..
- jsr L8003 ; 8A91 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 8A91 20 03 80 ..
L8A94: jmp L9925 ; 8A94 4C 25 99 L%.
; ----------------------------------------------------------------------------
@@ -2218,7 +2221,7 @@ bonus_lt_256:
lda #$8D ; 8DEF A9 8D ..
sta sfx_slot_timer ; 8DF1 8D 3F 06 .?.
lda #$07 ; 8DF4 A9 07 ..
- jsr L8003 ; 8DF6 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 8DF6 20 03 80 ..
dec_done:
rts ; 8DF9 60 `
@@ -2351,7 +2354,7 @@ L8EEF: lda L8F51,y ; 8EEF B9 51 8F
txa ; 8F05 8A .
pha ; 8F06 48 H
lda #$02 ; 8F07 A9 02 ..
- jsr L8003 ; 8F09 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 8F09 20 03 80 ..
pla ; 8F0C 68 h
tax ; 8F0D AA .
inc $0756,x ; 8F0E FE 56 07 .V.
@@ -2445,7 +2448,7 @@ mus00_len_or_tempo:
.byte $10 ; 8FC7 10 .
; ----------------------------------------------------------------------------
mus01_addr1:
- .addr sfx12 ; 8FC8 BE BF ..
+ .addr sfx_jump ; 8FC8 BE BF ..
mus01_addr2:
.addr empty_music_entry ; 8FCA FF 8F ..
; ----------------------------------------------------------------------------
@@ -3174,9 +3177,9 @@ copy_level_desc_2:
inx ; 967D E8 .
cpx #$40 ; 967E E0 40 .@
bne copy_level_desc_2 ; 9680 D0 F5 ..
- lda work_level_sub5 ; 9682 AD A2 07 ...
+ lda work_level_sub_start ; 9682 AD A2 07 ...
sta $06E1 ; 9685 8D E1 06 ...
- lda work_level_sub5+1 ; 9688 AD A3 07 ...
+ lda work_level_sub_start+1 ; 9688 AD A3 07 ...
sta $06E2 ; 968B 8D E2 06 ...
jsr L06E0 ; 968E 20 E0 06 ..
lda #$00 ; 9691 A9 00 ..
@@ -3308,7 +3311,7 @@ mj_clear_loop:
sta $0755,x ; 9782 9D 55 07 .U.
sta $069A,x ; 9785 9D 9A 06 ...
sta $06EA,x ; 9788 9D EA 06 ...
- sta $06EB,x ; 978B 9D EB 06 ...
+ sta jump_frame,x ; 978B 9D EB 06 ...
dex ; 978E CA .
bne mj_clear_loop ; 978F D0 F1 ..
sta $0697 ; 9791 8D 97 06 ...
@@ -3387,9 +3390,9 @@ L9806: lda $0623 ; 9806 AD 23 06
lda $0683 ; 980B AD 83 06 ...
cmp #$C6 ; 980E C9 C6 ..
bcs L982E ; 9810 B0 1C ..
- lda $06EB ; 9812 AD EB 06 ...
+ lda jump_frame ; 9812 AD EB 06 ...
beq check_collisions_2 ; 9815 F0 03 ..
- jmp L99A8 ; 9817 4C A8 99 L..
+ jmp mid_jump ; 9817 4C A8 99 L..
; ----------------------------------------------------------------------------
; did player 0 or 1 hit the playfield...
@@ -3406,7 +3409,7 @@ L982E: inc $0623 ; 982E EE 23 06
rts ; 9831 60 `
; ----------------------------------------------------------------------------
-; did player 0 or 1 hit the playfield...
+; movement/jumping only allowed if player's touching the playfield
check_collisions_3:
lda #$00 ; 9832 A9 00 ..
sta $06ED ; 9834 8D ED 06 ...
@@ -3493,7 +3496,7 @@ L98AD: clc ; 98AD 18
lda #$BE ; 98C6 A9 BE ..
sta sfx_slot_timer ; 98C8 8D 3F 06 .?.
lda #$01 ; 98CB A9 01 ..
- jsr L8003 ; 98CD 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; 98CD 20 03 80 ..
L98D0: lda collision_save+4 ; 98D0 AD B4 06 ...
ora collision_save+5 ; 98D3 0D B5 06 ...
and #$02 ; 98D6 29 02 ).
@@ -3593,37 +3596,47 @@ L9983: sec ; 9983 38
rts ; 9984 60 `
; ----------------------------------------------------------------------------
-; handle trigger presses (maybe start a jump)
+; handle trigger presses, maybe start a jump, if player is moving up, left, or right
trigger_handler:
ldx #$04 ; 9985 A2 04 ..
lda joystick_state ; 9987 AD 33 06 .3.
cmp #$0E ; 998A C9 0E ..
- beq L99A0 ; 998C F0 12 ..
+ beq start_jump ; 998C F0 12 ..
ldx #$10 ; 998E A2 10 ..
lda player_delta_x ; 9990 AD 30 06 .0.
cmp #$01 ; 9993 C9 01 ..
- beq L99A0 ; 9995 F0 09 ..
+ beq start_jump ; 9995 F0 09 ..
ldx #$11 ; 9997 A2 11 ..
cmp #$FF ; 9999 C9 FF ..
- beq L99A0 ; 999B F0 03 ..
+ beq start_jump ; 999B F0 03 ..
jmp check_up_down ; 999D 4C 55 98 LU.
; ----------------------------------------------------------------------------
-L99A0: stx $0688 ; 99A0 8E 88 06 ...
+; start jumping, play sfx_jump
+start_jump:
+ stx $0688 ; 99A0 8E 88 06 ...
lda #$01 ; 99A3 A9 01 ..
jsr cue_music_jv ; 99A5 20 18 80 ..
-L99A8: inc $06EB ; 99A8 EE EB 06 ...
- lda $06EB ; 99AB AD EB 06 ...
+; check & see if we're done jumping
+mid_jump:
+ inc jump_frame ; 99A8 EE EB 06 ...
+ lda jump_frame ; 99AB AD EB 06 ...
+; $15 aka 21 frames?
+is_jump_done:
cmp #$16 ; 99AE C9 16 ..
- bne L99BD ; 99B0 D0 0B ..
-L99B2: lda #$00 ; 99B2 A9 00 ..
- sta $06EB ; 99B4 8D EB 06 ...
+ bne continue_jump ; 99B0 D0 0B ..
+; we hit a girder/rope/ladder in mid-jump, or else the jump finished without hitting anything(?). this does not (?) include the bottom of the level
+end_jump:
+ lda #$00 ; 99B2 A9 00 ..
+ sta jump_frame ; 99B4 8D EB 06 ...
sta $06ED ; 99B7 8D ED 06 ...
jmp check_collisions_2 ; 99BA 4C 1A 98 L..
; ----------------------------------------------------------------------------
-L99BD: ldx $06EB ; 99BD AE EB 06 ...
- lda L9A1B,x ; 99C0 BD 1B 9A ...
+; we're in mid-jump and didn't hit anything, keep going
+continue_jump:
+ ldx jump_frame ; 99BD AE EB 06 ...
+ lda jump_delta_x_table_minus_one,x ; 99C0 BD 1B 9A ...
tay ; 99C3 A8 .
lda $0688 ; 99C4 AD 88 06 ...
cmp #$10 ; 99C7 C9 10 ..
@@ -3644,7 +3657,7 @@ L99DD: clc ; 99DD 18
tya ; 99DE 98 .
adc $067E ; 99DF 6D 7E 06 m~.
sta $067E ; 99E2 8D 7E 06 .~.
- lda L9A31,x ; 99E5 BD 31 9A .1.
+ lda jump_delta_y_table_minus_one,x ; 99E5 BD 31 9A .1.
clc ; 99E8 18 .
adc $0683 ; 99E9 6D 83 06 m..
sta $0683 ; 99EC 8D 83 06 ...
@@ -3658,33 +3671,40 @@ code_99f7:
lda collision_save+4 ; 99F7 AD B4 06 ...
ora collision_save+5 ; 99FA 0D B5 06 ...
lsr a ; 99FD 4A J
- bcs L99B2 ; 99FE B0 B2 ..
+ bcs end_jump ; 99FE B0 B2 ..
lsr a ; 9A00 4A J
bcc L9A19 ; 9A01 90 16 ..
lda $0688 ; 9A03 AD 88 06 ...
cmp #$04 ; 9A06 C9 04 ..
beq L9A19 ; 9A08 F0 0F ..
jsr L9971 ; 9A0A 20 71 99 q.
- bcs L99B2 ; 9A0D B0 A3 ..
+ bcs end_jump ; 9A0D B0 A3 ..
jsr check_up_down_2 ; 9A0F 20 3B 99 ;.
bcc L9A19 ; 9A12 90 05 ..
cmp $067E ; 9A14 CD 7E 06 .~.
- beq L99B2 ; 9A17 F0 99 ..
+ beq end_jump ; 9A17 F0 99 ..
L9A19:
-L9A1B := * + 2
+jump_delta_x_table_minus_one:= * + 2 ; 1-indexed...
jmp L9925 ; 9A19 4C 25 99 L%.
; ----------------------------------------------------------------------------
-data_9a1c:
+; used by continue_jump, the amount of X movement per frame of jumping (for either direction, left or right)
+jump_delta_x_table:
.byte $02,$00,$02,$00,$02,$02,$02,$02 ; 9A1C 02 00 02 00 02 02 02 02 ........
.byte $02,$02,$02,$00,$02,$00,$02,$00 ; 9A24 02 02 02 00 02 00 02 00 ........
.byte $00,$02,$00,$00,$00 ; 9A2C 00 02 00 00 00 .....
-L9A31: .byte $02,$FE,$FE,$FE,$FE,$FE,$FE,$00 ; 9A31 02 FE FE FE FE FE FE 00 ........
- .byte $00,$00,$02,$02,$02,$02,$02,$02 ; 9A39 00 00 02 02 02 02 02 02 ........
- .byte $02,$02,$02,$02,$02,$02,$00,$00 ; 9A41 02 02 02 02 02 02 00 00 ........
- .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 9A49 00 00 00 00 00 00 00 00 ........
- .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 9A51 00 00 00 00 00 00 00 00 ........
- .byte $00,$00,$00 ; 9A59 00 00 00 ...
+; 1-indexed...
+jump_delta_y_table_minus_one:
+ .byte $02 ; 9A31 02 .
+; used by continue_jump, amount of Y movement per frame ($FE is -2, or 2 scanlines up, $02 is 2 scanlines down)
+jump_delta_y_table:
+ .byte $FE,$FE,$FE,$FE,$FE,$FE,$00,$00 ; 9A32 FE FE FE FE FE FE 00 00 ........
+ .byte $00,$02,$02,$02,$02,$02,$02,$02 ; 9A3A 00 02 02 02 02 02 02 02 ........
+ .byte $02,$02,$02,$02,$02,$00 ; 9A42 02 02 02 02 02 00 ......
+zero_filler_9a48:
+ .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 9A48 00 00 00 00 00 00 00 00 ........
+ .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 9A50 00 00 00 00 00 00 00 00 ........
+ .byte $00,$00,$00,$00 ; 9A58 00 00 00 00 ....
; ----------------------------------------------------------------------------
init_page_7:
ldy #$00 ; 9A5C A0 00 ..
@@ -4182,8 +4202,8 @@ level00_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level00_sub_bomb:
.addr L06E6 ; A020 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level00_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level00_sub_start:
.addr L06E6 ; A022 E6 06 ..
; always $9740 aka game_main_loop
level00_sub6:
@@ -4214,16 +4234,16 @@ level01_desc:
; ----------------------------------------------------------------------------
; a subroutine
level01_sub0:
- .addr LA4DD ; A042 DD A4 ..
+ .addr electrocution_done ; A042 DD A4 ..
; a subroutine
level01_sub1:
- .addr LA509 ; A044 09 A5 ..
+ .addr electrocute ; A044 09 A5 ..
; a subroutine
level01_sub2:
.addr L0000 ; A046 00 00 ..
; a subroutine
level01_sub3:
- .addr LA53D ; A048 3D A5 =.
+ .addr level02_collisions ; A048 3D A5 =.
; ----------------------------------------------------------------------------
; number of bombs to pick up on this level
level01_num_bombs:
@@ -4275,8 +4295,8 @@ level01_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level01_sub_bomb:
.addr LA498 ; A060 98 A4 ..
-; $06E6 for some levels, or else a ROM subroutine
-level01_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level01_sub_start:
.addr L8036 ; A062 36 80 6.
; always $9740 aka game_main_loop
level01_sub6:
@@ -4368,8 +4388,8 @@ level02_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level02_sub_bomb:
.addr L06E6 ; A0A0 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level02_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level02_sub_start:
.addr LA68C ; A0A2 8C A6 ..
; always $9740 aka game_main_loop
level02_sub6:
@@ -4461,8 +4481,8 @@ level03_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level03_sub_bomb:
.addr L06E6 ; A0E0 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level03_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level03_sub_start:
.addr L8036 ; A0E2 36 80 6.
; always $9740 aka game_main_loop
level03_sub6:
@@ -4554,8 +4574,8 @@ level04_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level04_sub_bomb:
.addr L06E6 ; A120 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level04_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level04_sub_start:
.addr L06E6 ; A122 E6 06 ..
; always $9740 aka game_main_loop
level04_sub6:
@@ -4647,8 +4667,8 @@ level05_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level05_sub_bomb:
.addr LAA73 ; A160 73 AA s.
-; $06E6 for some levels, or else a ROM subroutine
-level05_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level05_sub_start:
.addr LA9C6 ; A162 C6 A9 ..
; always $9740 aka game_main_loop
level05_sub6:
@@ -4740,8 +4760,8 @@ level06_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level06_sub_bomb:
.addr L06E6 ; A1A0 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level06_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level06_sub_start:
.addr L8036 ; A1A2 36 80 6.
; always $9740 aka game_main_loop
level06_sub6:
@@ -4833,8 +4853,8 @@ level07_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level07_sub_bomb:
.addr LAF23 ; A1E0 23 AF #.
-; $06E6 for some levels, or else a ROM subroutine
-level07_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level07_sub_start:
.addr LAE9B ; A1E2 9B AE ..
; always $9740 aka game_main_loop
level07_sub6:
@@ -4926,8 +4946,8 @@ level08_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level08_sub_bomb:
.addr LB121 ; A220 21 B1 !.
-; $06E6 for some levels, or else a ROM subroutine
-level08_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level08_sub_start:
.addr LB0C4 ; A222 C4 B0 ..
; always $9740 aka game_main_loop
level08_sub6:
@@ -5019,8 +5039,8 @@ level09_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level09_sub_bomb:
.addr LB2FD ; A260 FD B2 ..
-; $06E6 for some levels, or else a ROM subroutine
-level09_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level09_sub_start:
.addr L8036 ; A262 36 80 6.
; always $9740 aka game_main_loop
level09_sub6:
@@ -5112,8 +5132,8 @@ level10_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level10_sub_bomb:
.addr LB44C ; A2A0 4C B4 L.
-; $06E6 for some levels, or else a ROM subroutine
-level10_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level10_sub_start:
.addr L8036 ; A2A2 36 80 6.
; always $9740 aka game_main_loop
level10_sub6:
@@ -5205,8 +5225,8 @@ level11_offs_30:
; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
level11_sub_bomb:
.addr L06E6 ; A2E0 E6 06 ..
-; $06E6 for some levels, or else a ROM subroutine
-level11_sub5:
+; called at start of level, $06E6 for some levels, or else a ROM subroutine
+level11_sub_start:
.addr L8036 ; A2E2 36 80 6.
; always $9740 aka game_main_loop
level11_sub6:
@@ -5319,7 +5339,9 @@ LA498: ldy $B2 ; A498 A4 B2
rts ; A4DC 60 `
; ----------------------------------------------------------------------------
-LA4DD: lda $0623 ; A4DD AD 23 06 .#.
+; turn off electrocution effect (?)
+electrocution_done:
+ lda $0623 ; A4DD AD 23 06 .#.
bne LA4FF ; A4E0 D0 1D ..
lda $0621 ; A4E2 AD 21 06 .!.
bne LA4E8 ; A4E5 D0 01 ..
@@ -5345,7 +5367,9 @@ LA505: stx $0770 ; A505 8E 70 07
rts ; A508 60 `
; ----------------------------------------------------------------------------
-LA509: ldx $0770 ; A509 AE 70 07 .p.
+; electrocution effect
+electrocute:
+ ldx $0770 ; A509 AE 70 07 .p.
bne LA50F ; A50C D0 01 ..
rts ; A50E 60 `
@@ -5360,16 +5384,17 @@ LA50F: lda RANDOM ; A50F AD 0A D2
lda #$A5 ; A522 A9 A5 ..
sta sfx_slot_timer ; A524 8D 3F 06 .?.
lda #$01 ; A527 A9 01 ..
- jsr L8003 ; A529 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; A529 20 03 80 ..
rts ; A52C 60 `
; ----------------------------------------------------------------------------
-; dunno, referenced by routine at $A50F
-sfx_a52d:
+sfx_electrocution:
.byte $01,$81,$00,$0A,$02,$01,$81,$00 ; A52D 01 81 00 0A 02 01 81 00 ........
.byte $32,$02,$01,$81,$00,$1E,$02,$00 ; A535 32 02 01 81 00 1E 02 00 2.......
; ----------------------------------------------------------------------------
-LA53D: lda #$00 ; A53D A9 00 ..
+; skip a couple of the collision regs, so we don't register a collision when Jumpman is being electrocuted
+level02_collisions:
+ lda #$00 ; A53D A9 00 ..
jmp L8F79 ; A53F 4C 79 8F Ly.
; ----------------------------------------------------------------------------
@@ -5626,7 +5651,7 @@ LA882: tya ; A882 98
lda #$A9 ; A892 A9 A9 ..
sta sfx_slot_timer ; A894 8D 3F 06 .?.
lda #$03 ; A897 A9 03 ..
- jsr L8003 ; A899 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; A899 20 03 80 ..
pla ; A89C 68 h
tax ; A89D AA .
LA89E: lda $0763,x ; A89E BD 63 07 .c.
@@ -6532,7 +6557,7 @@ cue_woop_sound:
lda #$B5 ; B4D8 A9 B5 ..
sta sfx_slot_timer ; B4DA 8D 3F 06 .?.
lda #$03 ; B4DD A9 03 ..
- jsr L8003 ; B4DF 20 03 80 ..
+ jsr cue_sfx_lowprior_jv ; B4DF 20 03 80 ..
LB4E2: ldy #$01 ; B4E2 A0 01 ..
lda $0681 ; B4E4 AD 81 06 ...
cmp $067E ; B4E7 CD 7E 06 .~.
@@ -7356,7 +7381,8 @@ sfx11: .byte $01,$A6,$02,$79,$20,$B6,$30,$99 ; BFA6 01 A6 02 79 20 B6 30 99
.byte $20,$88,$09,$99,$20,$E6,$30,$99 ; BFAE 20 88 09 99 20 E6 30 99 ... .0.
.byte $20,$88,$09,$99,$20,$B6,$3A,$00 ; BFB6 20 88 09 99 20 B6 3A 00 ... .:.
; jumping sound
-sfx12: .byte $01,$A5,$00,$79,$04,$60,$04,$51 ; BFBE 01 A5 00 79 04 60 04 51 ...y.`.Q
+sfx_jump:
+ .byte $01,$A5,$00,$79,$04,$60,$04,$51 ; BFBE 01 A5 00 79 04 60 04 51 ...y.`.Q
.byte $04,$3C,$04,$51,$04,$60,$04,$79 ; BFC6 04 3C 04 51 04 60 04 79 .<.Q.`.y
.byte $04,$00 ; BFCE 04 00 ..
; funeral march melody
diff --git a/jumpmanjr.html b/jumpmanjr.html
index 1976303..be382c8 100644
--- a/jumpmanjr.html
+++ b/jumpmanjr.html
@@ -7,7 +7,7 @@
<body bgcolor="#000000" text="#ffffff">
<pre>
<font color="#8080ff">; da65 V2.15 - Git 104f898</font>
-<font color="#8080ff">; Created: 2016-08-29 15:45:14</font>
+<font color="#8080ff">; Created: 2016-08-30 01:18:47</font>
<font color="#8080ff">; Input file: jumpmanjr.rom</font>
<font color="#8080ff">; Page: 1</font>
@@ -81,6 +81,7 @@
<font color="#00ffff">L06E0</font> :=<font color="#ff40ff"> $06E0</font>
<font color="#00ffff">L06E3</font> :=<font color="#ff40ff"> $06E3</font>
<font color="#00ffff">L06E6</font> :=<font color="#ff40ff"> $06E6</font>
+<font color="#00ffff">jump_frame</font> :=<font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 0 if not jumping, or frames since start of jump (range 1 to 21)</font>
<font color="#00ffff">randomizer_mode</font> :=<font color="#ff40ff"> $06F3 </font> <font color="#8080ff">; only after beating levels 1-12 in order</font>
<font color="#00ffff">number_of_players</font>:=<font color="#ff40ff"> $06F4 </font> <font color="#8080ff">; 0 for single-player game, otherwise range 1-3 (2 to 4 players)</font>
<font color="#00ffff">level</font> :=<font color="#ff40ff"> $06F6</font>
@@ -107,8 +108,8 @@
<font color="#00ffff">work_level_map2</font> :=<font color="#ff40ff"> $079A </font> <font color="#8080ff">; map data</font>
<font color="#00ffff">work_level_unkn_table1</font>:=<font color="#ff40ff"> $079C </font> <font color="#8080ff">; unknown, pointer to a ROM table or $0000</font>
<font color="#00ffff">work_level_offs_30</font>:=<font color="#ff40ff"> $079E </font> <font color="#8080ff">; always $0000</font>
-<font color="#00ffff">work_level_sub4</font> :=<font color="#ff40ff"> $07A0 </font> <font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">work_level_sub5</font> :=<font color="#ff40ff"> $07A2 </font> <font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">work_level_sub_bomb</font>:=<font color="#ff40ff"> $07A0 </font> <font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">work_level_sub_start</font>:=<font color="#ff40ff"> $07A2 </font> <font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
<font color="#00ffff">work_level_sub6</font> :=<font color="#ff40ff"> $07A4 </font> <font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">work_level_sub_eol</font>:=<font color="#ff40ff"> $07A6 </font> <font color="#8080ff">; called at end of level (all bombs picked up). $06E6 for all but level07</font>
<font color="#00ffff">work_level_offs_40</font>:=<font color="#ff40ff"> $07A8 </font> <font color="#8080ff">; all zeroes</font>
@@ -135,8 +136,8 @@
<font color="#00ffff">cur_level_map2</font> :=<font color="#ff40ff"> $07DA </font> <font color="#8080ff">; map data</font>
<font color="#00ffff">cur_level_unkn_table1</font>:=<font color="#ff40ff"> $07DC </font> <font color="#8080ff">; unknown, pointer to a ROM table or $0000</font>
<font color="#00ffff">cur_level_offs_30</font>:=<font color="#ff40ff"> $07DE </font> <font color="#8080ff">; always $0000</font>
-<font color="#00ffff">cur_level_sub4</font> :=<font color="#ff40ff"> $07E0 </font> <font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">cur_level_sub5</font> :=<font color="#ff40ff"> $07E2 </font> <font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">cur_level_sub_bomb</font>:=<font color="#ff40ff"> $07E0 </font> <font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">cur_level_sub_start</font>:=<font color="#ff40ff"> $07E2 </font> <font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
<font color="#00ffff">cur_level_sub6</font> :=<font color="#ff40ff"> $07E4 </font> <font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">cur_level_sub_eol</font>:=<font color="#ff40ff"> $07E6 </font> <font color="#8080ff">; called at end of level (all bombs picked up). $06E6 for all but level07</font>
<font color="#00ffff">cur_level_offs_40</font>:=<font color="#ff40ff"> $07E8 </font> <font color="#8080ff">; all zeroes</font>
@@ -201,7 +202,9 @@
<font color="#00ff00">jmp</font> <font color="#00ffff">draw_map</font> <font color="#8080ff">; 8000 4C 49 80 LI.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L8003</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">cue_sfx_lowprior</font> <font color="#8080ff">; 8003 4C 40 82 L@.</font>
+<font color="#8080ff">; if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A</font>
+<font color="#00ffff">cue_sfx_lowprior_jv</font>:
+ <font color="#00ff00">jmp</font> <font color="#00ffff">cue_sfx_lowprior</font> <font color="#8080ff">; 8003 4C 40 82 L@.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; setup to play sfx</font>
@@ -214,7 +217,9 @@
<font color="#00ff00">jmp</font> <font color="#00ffff">xxx_level_something</font> <font color="#8080ff">; 8009 4C 00 86 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L800C</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L8CBC</font> <font color="#8080ff">; 800C 4C BC 8C L..</font>
+<font color="#8080ff">; also adds extra life every 7500 points</font>
+<font color="#00ffff">update_score_display_jv</font>:
+ <font color="#00ff00">jmp</font> <font color="#00ffff">update_score_display</font> <font color="#8080ff">; 800C 4C BC 8C L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ffff">L800F</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L867E</font> <font color="#8080ff">; 800F 4C 7E 86 L~.</font>
@@ -269,7 +274,9 @@
<font color="#00ff00">jmp</font> <font color="#00ffff">crumble_gameboard</font> <font color="#8080ff">; 8030 4C 00 8D L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L8033</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L87A0</font> <font color="#8080ff">; 8033 4C A0 87 L..</font>
+<font color="#8080ff">; check whether Jumpman just touched a bomb (RTS if not)</font>
+<font color="#00ffff">check_bomb_coll_jv</font>:
+ <font color="#00ff00">jmp</font> <font color="#00ffff">check_bomb_coll</font> <font color="#8080ff">; 8033 4C A0 87 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ffff">L8036</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L8B23</font> <font color="#8080ff">; 8036 4C 23 8B L#.</font>
@@ -521,7 +528,7 @@
<font color="#00ff00">cmp</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; 818F C9 01 ..</font>
<font color="#00ff00">beq</font> <font color="#00ffff">sfx_change_tempo</font> <font color="#8080ff">; 8191 F0 1B ..</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$02</font> <font color="#8080ff">; 8193 C9 02 ..</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">sfx_jump</font> <font color="#8080ff">; 8195 F0 31 .1</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">sfx_jump_opcode</font> <font color="#8080ff">; 8195 F0 31 .1</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$03</font> <font color="#8080ff">; 8197 C9 03 ..</font>
<font color="#00ff00">beq</font> <font color="#00ffff">sfx_play_rest</font> <font color="#8080ff">; 8199 F0 03 ..</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">sfx_finished</font> <font color="#8080ff">; 819B 4C 26 82 L&amp;.</font>
@@ -554,7 +561,7 @@
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; I *think* this jumps to a different sfx address...</font>
-<font color="#00ffff">sfx_jump</font>:
+<font color="#00ffff">sfx_jump_opcode</font>:
<font color="#00ff00">iny</font> <font color="#8080ff">; 81C8 C8 .</font>
<font color="#00ff00">lda</font> (<font color="#00ffff">zp_temp1</font>),<font color="#00ffff">y</font> <font color="#8080ff">; 81C9 B1 CB ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_curpos</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 81CB 9D 4E 06 .N.</font>
@@ -1336,13 +1343,17 @@
<font color="#00ff00">jmp</font> <font color="#00ffff">L88A8</font> <font color="#8080ff">; 879D 4C A8 88 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L87A0</font>: <font color="#00ff00">lda</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">4</font> <font color="#8080ff">; 87A0 AD B4 06 ...</font>
+<font color="#8080ff">; check whether Jumpman just touched a bomb (RTS if not)</font>
+<font color="#00ffff">check_bomb_coll</font>:
+ <font color="#00ff00">lda</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">4</font> <font color="#8080ff">; 87A0 AD B4 06 ...</font>
<font color="#00ff00">and</font> <font color="#ff6060">#$04</font> <font color="#8080ff">; 87A3 29 04 ).</font>
- <font color="#00ff00">bne</font> <font color="#00ffff">L87A8</font> <font color="#8080ff">; 87A5 D0 01 ..</font>
+ <font color="#00ff00">bne</font> <font color="#00ffff">bomb_pickup</font> <font color="#8080ff">; 87A5 D0 01 ..</font>
<font color="#00ff00">rts</font> <font color="#8080ff">; 87A7 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L87A8</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; 87A8 AD 7E 06 .~.</font>
+<font color="#8080ff">; Jumpman just picked up a bomb, award points, play sfx_bomb_pickup, make the bomb disappear, do some other stuff I don't understand yet</font>
+<font color="#00ffff">bomb_pickup</font>:
+ <font color="#00ff00">lda</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; 87A8 AD 7E 06 .~.</font>
<font color="#00ff00">clc</font> <font color="#8080ff">; 87AB 18 .</font>
<font color="#00ff00">adc</font> <font color="#00ffff">work_level_offs_14</font> <font color="#8080ff">; 87AC 6D 8E 07 m..</font>
<font color="#00ff00">and</font> <font color="#ff6060">#$E0</font> <font color="#8080ff">; 87AF 29 E0 ).</font>
@@ -1434,9 +1445,9 @@
<font color="#00ff00">lda</font> <font color="#ff40ff"> ($B0),y </font> <font color="#8080ff">; 884E B1 B0 ..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06E5 </font> <font color="#8080ff">; 8850 8D E5 06 ...</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">L06E3</font> <font color="#8080ff">; 8853 20 E3 06 ..</font>
-<font color="#00ffff">L8856</font>: <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub4</font> <font color="#8080ff">; 8856 AD A0 07 ...</font>
+<font color="#00ffff">L8856</font>: <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub_bomb</font> <font color="#8080ff">; 8856 AD A0 07 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06E4 </font> <font color="#8080ff">; 8859 8D E4 06 ...</font>
- <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub4</font>+<font color="#ff6060">1</font> <font color="#8080ff">; 885C AD A1 07 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub_bomb</font>+<font color="#ff6060">1</font> <font color="#8080ff">; 885C AD A1 07 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06E5 </font> <font color="#8080ff">; 885F 8D E5 06 ...</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">L06E3</font> <font color="#8080ff">; 8862 20 E3 06 ..</font>
<font color="#00ff00">clc</font> <font color="#8080ff">; 8865 18 .</font>
@@ -1452,7 +1463,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$06</font> <font color="#8080ff">; 887D A9 06 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">dm_progctr</font>+<font color="#ff6060">1</font> <font color="#8080ff">; 887F 85 C1 ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">draw_map_jv</font> <font color="#8080ff">; 8881 20 00 80 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L800C</font> <font color="#8080ff">; 8884 20 0C 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">update_score_display_jv</font> <font color="#8080ff">; 8884 20 0C 80 ..</font>
<font color="#00ff00">dec</font> <font color="#00ffff">work_level_num_bombs</font> <font color="#8080ff">; 8887 CE 8A 07 ...</font>
<font color="#00ffff">L888A</font>: <font color="#00ff00">lda</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">4</font> <font color="#8080ff">; 888A AD B4 06 ...</font>
<font color="#00ff00">and</font> <font color="#ff6060">#$04</font> <font color="#8080ff">; 888D 29 04 ).</font>
@@ -1460,7 +1471,8 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; 8891 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">data_8892</font>:
+<font color="#8080ff">; played when a bomb is picked up</font>
+<font color="#00ffff">sfx_bomb_pickup</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$01</font>,<font color="#ff6060">$A6</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$1E</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$28</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$1E</font> <font color="#8080ff">; 8892 01 A6 00 1E 03 28 03 1E .....(..</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$03</font>,<font color="#ff6060">$28</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$1E</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$28</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$1E</font> <font color="#8080ff">; 889A 03 28 03 1E 03 28 03 1E .(...(..</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$03</font>,<font color="#ff6060">$28</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 88A2 03 28 03 00 00 00 .(....</font>
@@ -1554,7 +1566,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$8A</font> <font color="#8080ff">; 893B A9 8A ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; 893D 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$07</font> <font color="#8080ff">; 8940 A9 07 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 8942 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 8942 20 03 80 ..</font>
<font color="#00ffff">L8945</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $0683 </font> <font color="#8080ff">; 8945 AD 83 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$C6</font> <font color="#8080ff">; 8948 C9 C6 ..</font>
<font color="#00ff00">bcc</font> <font color="#00ffff">L895D</font> <font color="#8080ff">; 894A 90 11 ..</font>
@@ -1600,7 +1612,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$8A</font> <font color="#8080ff">; 899F A9 8A ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; 89A1 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$04</font> <font color="#8080ff">; 89A4 A9 04 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 89A6 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 89A6 20 03 80 ..</font>
<font color="#00ffff">L89A9</font>: <font color="#00ff00">ldx</font> <font color="#ff40ff"> $06EA </font> <font color="#8080ff">; 89A9 AE EA 06 ...</font>
<font color="#00ff00">cpx</font> <font color="#ff6060">#$09</font> <font color="#8080ff">; 89AC E0 09 ..</font>
<font color="#00ff00">bne</font> <font color="#00ffff">L89B8</font> <font color="#8080ff">; 89AE D0 08 ..</font>
@@ -1701,7 +1713,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$8A</font> <font color="#8080ff">; 8A8A A9 8A ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; 8A8C 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$02</font> <font color="#8080ff">; 8A8F A9 02 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 8A91 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 8A91 20 03 80 ..</font>
<font color="#00ffff">L8A94</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L9925</font> <font color="#8080ff">; 8A94 4C 25 99 L%.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
@@ -2033,7 +2045,9 @@
<font color="#00ff00">brk</font> <font color="#8080ff">; 8CB9 00 .</font>
<font color="#00ff00">brk</font> <font color="#8080ff">; 8CBA 00 .</font>
<font color="#00ff00">brk</font> <font color="#8080ff">; 8CBB 00 .</font>
-<font color="#00ffff">L8CBC</font>: <font color="#00ff00">ldx</font> <font color="#ff6060">#$03</font> <font color="#8080ff">; 8CBC A2 03 ..</font>
+<font color="#8080ff">; also adds extra life every 7500 points</font>
+<font color="#00ffff">update_score_display</font>:
+ <font color="#00ff00">ldx</font> <font color="#ff6060">#$03</font> <font color="#8080ff">; 8CBC A2 03 ..</font>
<font color="#00ffff">L8CBE</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $06FF,x </font> <font color="#8080ff">; 8CBE BD FF 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 8CC1 DD 02 07 ...</font>
<font color="#00ff00">bcc</font> <font color="#00ffff">L8CFA</font> <font color="#8080ff">; 8CC4 90 34 .4</font>
@@ -2069,7 +2083,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$0C</font> <font color="#8080ff">; 8CF2 A9 0C ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_jv</font> <font color="#8080ff">; 8CF4 20 06 80 ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">show_lives_icons</font> <font color="#8080ff">; 8CF7 20 BB 86 ..</font>
-<font color="#00ffff">L8CFA</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">LB7C0</font> <font color="#8080ff">; 8CFA 4C C0 B7 L..</font>
+<font color="#00ffff">L8CFA</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">score_mod_1m</font> <font color="#8080ff">; 8CFA 4C C0 B7 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; L= (for lives display)</font>
@@ -2215,7 +2229,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$8D</font> <font color="#8080ff">; 8DEF A9 8D ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; 8DF1 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$07</font> <font color="#8080ff">; 8DF4 A9 07 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 8DF6 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 8DF6 20 03 80 ..</font>
<font color="#00ffff">dec_done</font>:
<font color="#00ff00">rts</font> <font color="#8080ff">; 8DF9 60 `</font>
@@ -2247,7 +2261,7 @@
<font color="#00ff00">sta</font> <font color="#ff40ff">AUDC1</font> <font color="#8080ff">; 8E2E 8D 01 D2 ...</font>
<font color="#00ff00">sta</font> <font color="#00ffff">jiffy_timer_1</font> <font color="#8080ff">; 8E31 8D 1A 06 ...</font>
<font color="#00ff00">sta</font> <font color="#00ffff">playing_level</font> <font color="#8080ff">; 8E34 8D 27 06 .'.</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L800C</font> <font color="#8080ff">; 8E37 20 0C 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">update_score_display_jv</font> <font color="#8080ff">; 8E37 20 0C 80 ..</font>
<font color="#8080ff">; 533ms ntsc, 640ms pal</font>
<font color="#00ffff">wait_32_jiffies</font>:
<font color="#00ff00">lda</font> <font color="#00ffff">jiffy_timer_1</font> <font color="#8080ff">; 8E3A AD 1A 06 ...</font>
@@ -2348,7 +2362,7 @@
<font color="#00ff00">txa</font> <font color="#8080ff">; 8F05 8A .</font>
<font color="#00ff00">pha</font> <font color="#8080ff">; 8F06 48 H</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$02</font> <font color="#8080ff">; 8F07 A9 02 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 8F09 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 8F09 20 03 80 ..</font>
<font color="#00ff00">pla</font> <font color="#8080ff">; 8F0C 68 h</font>
<font color="#00ff00">tax</font> <font color="#8080ff">; 8F0D AA .</font>
<font color="#00ff00">inc</font> <font color="#ff40ff"> $0756,x </font> <font color="#8080ff">; 8F0E FE 56 07 .V.</font>
@@ -2442,7 +2456,7 @@
.<font color="#ffff00">byte</font> <font color="#ff40ff"> $10 </font> <font color="#8080ff">; 8FC7 10 .</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ffff">mus01_addr1</font>:
- .<font color="#00ffff">addr</font> <font color="#00ffff">sfx12</font> <font color="#8080ff">; 8FC8 BE BF ..</font>
+ .<font color="#00ffff">addr</font> <font color="#00ffff">sfx_jump</font> <font color="#8080ff">; 8FC8 BE BF ..</font>
<font color="#00ffff">mus01_addr2</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">empty_music_entry</font> <font color="#8080ff">; 8FCA FF 8F ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
@@ -3171,9 +3185,9 @@
<font color="#00ff00">inx</font> <font color="#8080ff">; 967D E8 .</font>
<font color="#00ff00">cpx</font> <font color="#ff6060">#$40</font> <font color="#8080ff">; 967E E0 40 .@</font>
<font color="#00ff00">bne</font> <font color="#00ffff">copy_level_desc_2</font> <font color="#8080ff">; 9680 D0 F5 ..</font>
- <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub5</font> <font color="#8080ff">; 9682 AD A2 07 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub_start</font> <font color="#8080ff">; 9682 AD A2 07 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06E1 </font> <font color="#8080ff">; 9685 8D E1 06 ...</font>
- <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub5</font>+<font color="#ff6060">1</font> <font color="#8080ff">; 9688 AD A3 07 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">work_level_sub_start</font>+<font color="#ff6060">1</font> <font color="#8080ff">; 9688 AD A3 07 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06E2 </font> <font color="#8080ff">; 968B 8D E2 06 ...</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">L06E0</font> <font color="#8080ff">; 968E 20 E0 06 ..</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; 9691 A9 00 ..</font>
@@ -3268,7 +3282,7 @@
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ffff">game_main_loop</font>:
<font color="#00ff00">jsr</font> <font color="#00ffff">materialize_jumpman</font> <font color="#8080ff">; 9740 20 7B 97 {.</font>
-<font color="#00ffff">L9743</font>: <font color="#00ff00">jsr</font> <font color="#00ffff">L8033</font> <font color="#8080ff">; 9743 20 33 80 3.</font>
+<font color="#00ffff">L9743</font>: <font color="#00ff00">jsr</font> <font color="#00ffff">check_bomb_coll_jv</font> <font color="#8080ff">; 9743 20 33 80 3.</font>
<font color="#00ff00">lda</font> <font color="#00ffff">work_level_num_bombs</font> <font color="#8080ff">; 9746 AD 8A 07 ...</font>
<font color="#00ff00">beq</font> <font color="#00ffff">got_all_bombs</font> <font color="#8080ff">; 9749 F0 1B ..</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0623 </font> <font color="#8080ff">; 974B AD 23 06 .#.</font>
@@ -3305,7 +3319,7 @@
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0755,x </font> <font color="#8080ff">; 9782 9D 55 07 .U.</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $069A,x </font> <font color="#8080ff">; 9785 9D 9A 06 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06EA,x </font> <font color="#8080ff">; 9788 9D EA 06 ...</font>
- <font color="#00ff00">sta</font> <font color="#ff40ff"> $06EB,x </font> <font color="#8080ff">; 978B 9D EB 06 ...</font>
+ <font color="#00ff00">sta</font> <font color="#00ffff">jump_frame</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 978B 9D EB 06 ...</font>
<font color="#00ff00">dex</font> <font color="#8080ff">; 978E CA .</font>
<font color="#00ff00">bne</font> <font color="#00ffff">mj_clear_loop</font> <font color="#8080ff">; 978F D0 F1 ..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0697 </font> <font color="#8080ff">; 9791 8D 97 06 ...</font>
@@ -3384,9 +3398,9 @@
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0683 </font> <font color="#8080ff">; 980B AD 83 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$C6</font> <font color="#8080ff">; 980E C9 C6 ..</font>
<font color="#00ff00">bcs</font> <font color="#00ffff">L982E</font> <font color="#8080ff">; 9810 B0 1C ..</font>
- <font color="#00ff00">lda</font> <font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 9812 AD EB 06 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">jump_frame</font> <font color="#8080ff">; 9812 AD EB 06 ...</font>
<font color="#00ff00">beq</font> <font color="#00ffff">check_collisions_2</font> <font color="#8080ff">; 9815 F0 03 ..</font>
- <font color="#00ff00">jmp</font> <font color="#00ffff">L99A8</font> <font color="#8080ff">; 9817 4C A8 99 L..</font>
+ <font color="#00ff00">jmp</font> <font color="#00ffff">mid_jump</font> <font color="#8080ff">; 9817 4C A8 99 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; did player 0 or 1 hit the playfield...</font>
@@ -3403,7 +3417,7 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; 9831 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; did player 0 or 1 hit the playfield...</font>
+<font color="#8080ff">; movement/jumping only allowed if player's touching the playfield</font>
<font color="#00ffff">check_collisions_3</font>:
<font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; 9832 A9 00 ..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06ED </font> <font color="#8080ff">; 9834 8D ED 06 ...</font>
@@ -3490,7 +3504,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$BE</font> <font color="#8080ff">; 98C6 A9 BE ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; 98C8 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; 98CB A9 01 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; 98CD 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; 98CD 20 03 80 ..</font>
<font color="#00ffff">L98D0</font>: <font color="#00ff00">lda</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">4</font> <font color="#8080ff">; 98D0 AD B4 06 ...</font>
<font color="#00ff00">ora</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">5</font> <font color="#8080ff">; 98D3 0D B5 06 ...</font>
<font color="#00ff00">and</font> <font color="#ff6060">#$02</font> <font color="#8080ff">; 98D6 29 02 ).</font>
@@ -3590,37 +3604,47 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; 9984 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; handle trigger presses (maybe start a jump)</font>
+<font color="#8080ff">; handle trigger presses, maybe start a jump, if player is moving up, left, or right</font>
<font color="#00ffff">trigger_handler</font>:
<font color="#00ff00">ldx</font> <font color="#ff6060">#$04</font> <font color="#8080ff">; 9985 A2 04 ..</font>
<font color="#00ff00">lda</font> <font color="#00ffff">joystick_state</font> <font color="#8080ff">; 9987 AD 33 06 .3.</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$0E</font> <font color="#8080ff">; 998A C9 0E ..</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">L99A0</font> <font color="#8080ff">; 998C F0 12 ..</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">start_jump</font> <font color="#8080ff">; 998C F0 12 ..</font>
<font color="#00ff00">ldx</font> <font color="#ff6060">#$10</font> <font color="#8080ff">; 998E A2 10 ..</font>
<font color="#00ff00">lda</font> <font color="#00ffff">player_delta_x</font> <font color="#8080ff">; 9990 AD 30 06 .0.</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; 9993 C9 01 ..</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">L99A0</font> <font color="#8080ff">; 9995 F0 09 ..</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">start_jump</font> <font color="#8080ff">; 9995 F0 09 ..</font>
<font color="#00ff00">ldx</font> <font color="#ff6060">#$11</font> <font color="#8080ff">; 9997 A2 11 ..</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$FF</font> <font color="#8080ff">; 9999 C9 FF ..</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">L99A0</font> <font color="#8080ff">; 999B F0 03 ..</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">start_jump</font> <font color="#8080ff">; 999B F0 03 ..</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">check_up_down</font> <font color="#8080ff">; 999D 4C 55 98 LU.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L99A0</font>: <font color="#00ff00">stx</font> <font color="#ff40ff"> $0688 </font> <font color="#8080ff">; 99A0 8E 88 06 ...</font>
+<font color="#8080ff">; start jumping, play sfx_jump</font>
+<font color="#00ffff">start_jump</font>:
+ <font color="#00ff00">stx</font> <font color="#ff40ff"> $0688 </font> <font color="#8080ff">; 99A0 8E 88 06 ...</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; 99A3 A9 01 ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">cue_music_jv</font> <font color="#8080ff">; 99A5 20 18 80 ..</font>
-<font color="#00ffff">L99A8</font>: <font color="#00ff00">inc</font> <font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 99A8 EE EB 06 ...</font>
- <font color="#00ff00">lda</font> <font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 99AB AD EB 06 ...</font>
+<font color="#8080ff">; check &amp; see if we're done jumping</font>
+<font color="#00ffff">mid_jump</font>:
+ <font color="#00ff00">inc</font> <font color="#00ffff">jump_frame</font> <font color="#8080ff">; 99A8 EE EB 06 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">jump_frame</font> <font color="#8080ff">; 99AB AD EB 06 ...</font>
+<font color="#8080ff">; $15 aka 21 frames?</font>
+<font color="#00ffff">is_jump_done</font>:
<font color="#00ff00">cmp</font> <font color="#ff6060">#$16</font> <font color="#8080ff">; 99AE C9 16 ..</font>
- <font color="#00ff00">bne</font> <font color="#00ffff">L99BD</font> <font color="#8080ff">; 99B0 D0 0B ..</font>
-<font color="#00ffff">L99B2</font>: <font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; 99B2 A9 00 ..</font>
- <font color="#00ff00">sta</font> <font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 99B4 8D EB 06 ...</font>
+ <font color="#00ff00">bne</font> <font color="#00ffff">continue_jump</font> <font color="#8080ff">; 99B0 D0 0B ..</font>
+<font color="#8080ff">; we hit a girder/rope/ladder in mid-jump, or else the jump finished without hitting anything(?). this does not (?) include the bottom of the level</font>
+<font color="#00ffff">end_jump</font>:
+ <font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; 99B2 A9 00 ..</font>
+ <font color="#00ff00">sta</font> <font color="#00ffff">jump_frame</font> <font color="#8080ff">; 99B4 8D EB 06 ...</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $06ED </font> <font color="#8080ff">; 99B7 8D ED 06 ...</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">check_collisions_2</font> <font color="#8080ff">; 99BA 4C 1A 98 L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">L99BD</font>: <font color="#00ff00">ldx</font> <font color="#ff40ff"> $06EB </font> <font color="#8080ff">; 99BD AE EB 06 ...</font>
- <font color="#00ff00">lda</font> <font color="#00ffff">L9A1B</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 99C0 BD 1B 9A ...</font>
+<font color="#8080ff">; we're in mid-jump and didn't hit anything, keep going</font>
+<font color="#00ffff">continue_jump</font>:
+ <font color="#00ff00">ldx</font> <font color="#00ffff">jump_frame</font> <font color="#8080ff">; 99BD AE EB 06 ...</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">jump_delta_x_table_minus_one</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 99C0 BD 1B 9A ...</font>
<font color="#00ff00">tay</font> <font color="#8080ff">; 99C3 A8 .</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0688 </font> <font color="#8080ff">; 99C4 AD 88 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$10</font> <font color="#8080ff">; 99C7 C9 10 ..</font>
@@ -3641,7 +3665,7 @@
<font color="#00ff00">tya</font> <font color="#8080ff">; 99DE 98 .</font>
<font color="#00ff00">adc</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; 99DF 6D 7E 06 m~.</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; 99E2 8D 7E 06 .~.</font>
- <font color="#00ff00">lda</font> <font color="#00ffff">L9A31</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 99E5 BD 31 9A .1.</font>
+ <font color="#00ff00">lda</font> <font color="#00ffff">jump_delta_y_table_minus_one</font>,<font color="#00ffff">x</font> <font color="#8080ff">; 99E5 BD 31 9A .1.</font>
<font color="#00ff00">clc</font> <font color="#8080ff">; 99E8 18 .</font>
<font color="#00ff00">adc</font> <font color="#ff40ff"> $0683 </font> <font color="#8080ff">; 99E9 6D 83 06 m..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0683 </font> <font color="#8080ff">; 99EC 8D 83 06 ...</font>
@@ -3655,33 +3679,40 @@
<font color="#00ff00">lda</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">4</font> <font color="#8080ff">; 99F7 AD B4 06 ...</font>
<font color="#00ff00">ora</font> <font color="#00ffff">collision_save</font>+<font color="#ff6060">5</font> <font color="#8080ff">; 99FA 0D B5 06 ...</font>
<font color="#00ff00">lsr</font> <font color="#00ffff">a</font> <font color="#8080ff">; 99FD 4A J</font>
- <font color="#00ff00">bcs</font> <font color="#00ffff">L99B2</font> <font color="#8080ff">; 99FE B0 B2 ..</font>
+ <font color="#00ff00">bcs</font> <font color="#00ffff">end_jump</font> <font color="#8080ff">; 99FE B0 B2 ..</font>
<font color="#00ff00">lsr</font> <font color="#00ffff">a</font> <font color="#8080ff">; 9A00 4A J</font>
<font color="#00ff00">bcc</font> <font color="#00ffff">L9A19</font> <font color="#8080ff">; 9A01 90 16 ..</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0688 </font> <font color="#8080ff">; 9A03 AD 88 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$04</font> <font color="#8080ff">; 9A06 C9 04 ..</font>
<font color="#00ff00">beq</font> <font color="#00ffff">L9A19</font> <font color="#8080ff">; 9A08 F0 0F ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">L9971</font> <font color="#8080ff">; 9A0A 20 71 99 q.</font>
- <font color="#00ff00">bcs</font> <font color="#00ffff">L99B2</font> <font color="#8080ff">; 9A0D B0 A3 ..</font>
+ <font color="#00ff00">bcs</font> <font color="#00ffff">end_jump</font> <font color="#8080ff">; 9A0D B0 A3 ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">check_up_down_2</font> <font color="#8080ff">; 9A0F 20 3B 99 ;.</font>
<font color="#00ff00">bcc</font> <font color="#00ffff">L9A19</font> <font color="#8080ff">; 9A12 90 05 ..</font>
<font color="#00ff00">cmp</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; 9A14 CD 7E 06 .~.</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">L99B2</font> <font color="#8080ff">; 9A17 F0 99 ..</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">end_jump</font> <font color="#8080ff">; 9A17 F0 99 ..</font>
<font color="#00ffff">L9A19</font>:
-<font color="#00ffff">L9A1B</font> := * + <font color="#ff6060">2</font>
+<font color="#00ffff">jump_delta_x_table_minus_one</font>:= * + <font color="#ff6060">2</font> <font color="#8080ff">; 1-indexed...</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">L9925</font> <font color="#8080ff">; 9A19 4C 25 99 L%.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">data_9a1c</font>:
+<font color="#8080ff">; used by continue_jump, the amount of X movement per frame of jumping (for either direction, left or right)</font>
+<font color="#00ffff">jump_delta_x_table</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font> <font color="#8080ff">; 9A1C 02 00 02 00 02 02 02 02 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A24 02 02 02 00 02 00 02 00 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A2C 00 02 00 00 00 .....</font>
-<font color="#00ffff">L9A31</font>: .<font color="#ffff00">byte</font> <font color="#ff6060">$02</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A31 02 FE FE FE FE FE FE 00 ........</font>
- .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font> <font color="#8080ff">; 9A39 00 00 02 02 02 02 02 02 ........</font>
- .<font color="#ffff00">byte</font> <font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A41 02 02 02 02 02 02 00 00 ........</font>
- .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A49 00 00 00 00 00 00 00 00 ........</font>
- .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A51 00 00 00 00 00 00 00 00 ........</font>
- .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A59 00 00 00 ...</font>
+<font color="#8080ff">; 1-indexed...</font>
+<font color="#00ffff">jump_delta_y_table_minus_one</font>:
+ .<font color="#ffff00">byte</font> <font color="#ff40ff"> $02 </font> <font color="#8080ff">; 9A31 02 .</font>
+<font color="#8080ff">; used by continue_jump, amount of Y movement per frame ($FE is -2, or 2 scanlines up, $02 is 2 scanlines down)</font>
+<font color="#00ffff">jump_delta_y_table</font>:
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$FE</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A32 FE FE FE FE FE FE 00 00 ........</font>
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font> <font color="#8080ff">; 9A3A 00 02 02 02 02 02 02 02 ........</font>
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A42 02 02 02 02 02 00 ......</font>
+<font color="#00ffff">zero_filler_9a48</font>:
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A48 00 00 00 00 00 00 00 00 ........</font>
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A50 00 00 00 00 00 00 00 00 ........</font>
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; 9A58 00 00 00 00 ....</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ffff">init_page_7</font>:
<font color="#00ff00">ldy</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; 9A5C A0 00 ..</font>
@@ -4176,11 +4207,11 @@
<font color="#00ffff">level00_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A01E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level00_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level00_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A020 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level00_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level00_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A022 E6 06 ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level00_sub6</font>:
@@ -4211,16 +4242,16 @@
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; a subroutine</font>
<font color="#00ffff">level01_sub0</font>:
- .<font color="#00ffff">addr</font> <font color="#00ffff">LA4DD</font> <font color="#8080ff">; A042 DD A4 ..</font>
+ .<font color="#00ffff">addr</font> <font color="#00ffff">electrocution_done</font> <font color="#8080ff">; A042 DD A4 ..</font>
<font color="#8080ff">; a subroutine</font>
<font color="#00ffff">level01_sub1</font>:
- .<font color="#00ffff">addr</font> <font color="#00ffff">LA509</font> <font color="#8080ff">; A044 09 A5 ..</font>
+ .<font color="#00ffff">addr</font> <font color="#00ffff">electrocute</font> <font color="#8080ff">; A044 09 A5 ..</font>
<font color="#8080ff">; a subroutine</font>
<font color="#00ffff">level01_sub2</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L0000</font> <font color="#8080ff">; A046 00 00 ..</font>
<font color="#8080ff">; a subroutine</font>
<font color="#00ffff">level01_sub3</font>:
- .<font color="#00ffff">addr</font> <font color="#00ffff">LA53D</font> <font color="#8080ff">; A048 3D A5 =.</font>
+ .<font color="#00ffff">addr</font> <font color="#00ffff">level02_collisions</font> <font color="#8080ff">; A048 3D A5 =.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; number of bombs to pick up on this level</font>
<font color="#00ffff">level01_num_bombs</font>:
@@ -4269,11 +4300,11 @@
<font color="#00ffff">level01_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A05E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level01_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level01_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LA498</font> <font color="#8080ff">; A060 98 A4 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level01_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level01_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A062 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level01_sub6</font>:
@@ -4362,11 +4393,11 @@
<font color="#00ffff">level02_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A09E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level02_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level02_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A0A0 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level02_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level02_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LA68C</font> <font color="#8080ff">; A0A2 8C A6 ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level02_sub6</font>:
@@ -4455,11 +4486,11 @@
<font color="#00ffff">level03_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A0DE 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level03_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level03_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A0E0 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level03_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level03_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A0E2 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level03_sub6</font>:
@@ -4548,11 +4579,11 @@
<font color="#00ffff">level04_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A11E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level04_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level04_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A120 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level04_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level04_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A122 E6 06 ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level04_sub6</font>:
@@ -4641,11 +4672,11 @@
<font color="#00ffff">level05_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A15E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level05_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level05_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LAA73</font> <font color="#8080ff">; A160 73 AA s.</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level05_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level05_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LA9C6</font> <font color="#8080ff">; A162 C6 A9 ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level05_sub6</font>:
@@ -4734,11 +4765,11 @@
<font color="#00ffff">level06_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A19E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level06_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level06_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A1A0 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level06_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level06_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A1A2 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level06_sub6</font>:
@@ -4827,18 +4858,18 @@
<font color="#00ffff">level07_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A1DE 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level07_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level07_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LAF23</font> <font color="#8080ff">; A1E0 23 AF #.</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level07_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level07_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LAE9B</font> <font color="#8080ff">; A1E2 9B AE ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level07_sub6</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">game_main_loop</font> <font color="#8080ff">; A1E4 40 97 @.</font>
<font color="#8080ff">; called at end of level (all bombs picked up). $06E6 for all but level07</font>
<font color="#00ffff">level07_sub_eol</font>:
- .<font color="#00ffff">addr</font> <font color="#00ffff">LAF58</font> <font color="#8080ff">; A1E6 58 AF X.</font>
+ .<font color="#00ffff">addr</font> <font color="#00ffff">level07_letters</font> <font color="#8080ff">; A1E6 58 AF X.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#8080ff">; all zeroes</font>
<font color="#00ffff">level07_offs_40</font>:
@@ -4920,11 +4951,11 @@
<font color="#00ffff">level08_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A21E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level08_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level08_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LB121</font> <font color="#8080ff">; A220 21 B1 !.</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level08_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level08_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LB0C4</font> <font color="#8080ff">; A222 C4 B0 ..</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level08_sub6</font>:
@@ -5013,11 +5044,11 @@
<font color="#00ffff">level09_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A25E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level09_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level09_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LB2FD</font> <font color="#8080ff">; A260 FD B2 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level09_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level09_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A262 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level09_sub6</font>:
@@ -5106,11 +5137,11 @@
<font color="#00ffff">level10_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A29E 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level10_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level10_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">LB44C</font> <font color="#8080ff">; A2A0 4C B4 L.</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level10_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level10_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A2A2 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level10_sub6</font>:
@@ -5199,11 +5230,11 @@
<font color="#00ffff">level11_offs_30</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A2DE 00 00 ..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; $06E6 for most levels, or else a ROM subroutine</font>
-<font color="#00ffff">level11_sub4</font>:
+<font color="#8080ff">; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine</font>
+<font color="#00ffff">level11_sub_bomb</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L06E6</font> <font color="#8080ff">; A2E0 E6 06 ..</font>
-<font color="#8080ff">; $06E6 for some levels, or else a ROM subroutine</font>
-<font color="#00ffff">level11_sub5</font>:
+<font color="#8080ff">; called at start of level, $06E6 for some levels, or else a ROM subroutine</font>
+<font color="#00ffff">level11_sub_start</font>:
.<font color="#00ffff">addr</font> <font color="#00ffff">L8036</font> <font color="#8080ff">; A2E2 36 80 6.</font>
<font color="#8080ff">; always $9740 aka game_main_loop</font>
<font color="#00ffff">level11_sub6</font>:
@@ -5316,7 +5347,9 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; A4DC 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LA4DD</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $0623 </font> <font color="#8080ff">; A4DD AD 23 06 .#.</font>
+<font color="#8080ff">; turn off electrocution effect (?)</font>
+<font color="#00ffff">electrocution_done</font>:
+ <font color="#00ff00">lda</font> <font color="#ff40ff"> $0623 </font> <font color="#8080ff">; A4DD AD 23 06 .#.</font>
<font color="#00ff00">bne</font> <font color="#00ffff">LA4FF</font> <font color="#8080ff">; A4E0 D0 1D ..</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0621 </font> <font color="#8080ff">; A4E2 AD 21 06 .!.</font>
<font color="#00ff00">bne</font> <font color="#00ffff">LA4E8</font> <font color="#8080ff">; A4E5 D0 01 ..</font>
@@ -5342,7 +5375,9 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; A508 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LA509</font>: <font color="#00ff00">ldx</font> <font color="#ff40ff"> $0770 </font> <font color="#8080ff">; A509 AE 70 07 .p.</font>
+<font color="#8080ff">; electrocution effect</font>
+<font color="#00ffff">electrocute</font>:
+ <font color="#00ff00">ldx</font> <font color="#ff40ff"> $0770 </font> <font color="#8080ff">; A509 AE 70 07 .p.</font>
<font color="#00ff00">bne</font> <font color="#00ffff">LA50F</font> <font color="#8080ff">; A50C D0 01 ..</font>
<font color="#00ff00">rts</font> <font color="#8080ff">; A50E 60 `</font>
@@ -5357,16 +5392,17 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$A5</font> <font color="#8080ff">; A522 A9 A5 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; A524 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; A527 A9 01 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; A529 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; A529 20 03 80 ..</font>
<font color="#00ff00">rts</font> <font color="#8080ff">; A52C 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; dunno, referenced by routine at $A50F</font>
-<font color="#00ffff">sfx_a52d</font>:
+<font color="#00ffff">sfx_electrocution</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$01</font>,<font color="#ff6060">$81</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$0A</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$01</font>,<font color="#ff6060">$81</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A52D 01 81 00 0A 02 01 81 00 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$32</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$01</font>,<font color="#ff6060">$81</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$1E</font>,<font color="#ff6060">$02</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; A535 32 02 01 81 00 1E 02 00 2.......</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LA53D</font>: <font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; A53D A9 00 ..</font>
+<font color="#8080ff">; skip a couple of the collision regs, so we don't register a collision when Jumpman is being electrocuted</font>
+<font color="#00ffff">level02_collisions</font>:
+ <font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; A53D A9 00 ..</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">L8F79</font> <font color="#8080ff">; A53F 4C 79 8F Ly.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
@@ -5623,7 +5659,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$A9</font> <font color="#8080ff">; A892 A9 A9 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; A894 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$03</font> <font color="#8080ff">; A897 A9 03 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; A899 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; A899 20 03 80 ..</font>
<font color="#00ff00">pla</font> <font color="#8080ff">; A89C 68 h</font>
<font color="#00ff00">tax</font> <font color="#8080ff">; A89D AA .</font>
<font color="#00ffff">LA89E</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $0763,x </font> <font color="#8080ff">; A89E BD 63 07 .c.</font>
@@ -6002,7 +6038,9 @@
.<font color="#ffff00">byte</font> <font color="#ff40ff"> $60 </font> <font color="#8080ff">; AEA3 60 `</font>
<font color="#00ffff">LAEA4</font>: .<font color="#ffff00">byte</font> <font color="#ff6060">$18</font>,<font color="#ff6060">$08</font>,<font color="#ff6060">$38</font>,<font color="#ff6060">$20</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$48</font>,<font color="#ff6060">$30</font>,<font color="#ff6060">$18</font> <font color="#8080ff">; AEA4 18 08 38 20 00 48 30 18 ..8 .H0.</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$28</font>,<font color="#ff6060">$10</font>,<font color="#ff6060">$10</font> <font color="#8080ff">; AEAC 28 10 10 (..</font>
-<font color="#00ffff">LAEAF</font>: .<font color="#ffff00">byte</font> <font color="#ff6060">$40</font>,<font color="#ff6060">$29</font>,<font color="#ff6060">$21</font>,<font color="#ff6060">$11</font>,<font color="#ff6060">$19</font>,<font color="#ff6060">$11</font>,<font color="#ff6060">$09</font>,<font color="#ff6060">$01</font> <font color="#8080ff">; AEAF 40 29 21 11 19 11 09 01 @)!.....</font>
+<font color="#8080ff">; letters for level07, spellbound (not ASCII or screencodes though)</font>
+<font color="#00ffff">epyx_jumpman</font>:
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$40</font>,<font color="#ff6060">$29</font>,<font color="#ff6060">$21</font>,<font color="#ff6060">$11</font>,<font color="#ff6060">$19</font>,<font color="#ff6060">$11</font>,<font color="#ff6060">$09</font>,<font color="#ff6060">$01</font> <font color="#8080ff">; AEAF 40 29 21 11 19 11 09 01 @)!.....</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$49</font>,<font color="#ff6060">$41</font>,<font color="#ff6060">$39</font>,<font color="#ff6060">$19</font>,<font color="#ff6060">$31</font> <font color="#8080ff">; AEB7 49 41 39 19 31 IA9.1</font>
<font color="#00ffff">LAEBC</font>: .<font color="#ffff00">byte</font> <font color="#ff6060">$03</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$03</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$7E</font> <font color="#8080ff">; AEBC 03 03 03 03 03 C3 C3 7E .......~</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$C3</font>,<font color="#ff6060">$7E</font> <font color="#8080ff">; AEC4 C3 C3 C3 C3 C3 C3 C3 7E .......~</font>
@@ -6062,12 +6100,16 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; AF57 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LAF58</font>: <font color="#00ff00">lda</font> <font color="#00ffff">work_level_num_bombs</font> <font color="#8080ff">; AF58 AD 8A 07 ...</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">LAF5E</font> <font color="#8080ff">; AF5B F0 01 ..</font>
+<font color="#8080ff">; called at end of Spellbound, adds up letter bonus</font>
+<font color="#00ffff">level07_letters</font>:
+ <font color="#00ff00">lda</font> <font color="#00ffff">work_level_num_bombs</font> <font color="#8080ff">; AF58 AD 8A 07 ...</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">l07_got_all</font> <font color="#8080ff">; AF5B F0 01 ..</font>
<font color="#00ff00">rts</font> <font color="#8080ff">; AF5D 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LAF5E</font>: <font color="#00ff00">lda</font> <font color="#ff6060">#$09</font> <font color="#8080ff">; AF5E A9 09 ..</font>
+<font color="#8080ff">; got all the bombs</font>
+<font color="#00ffff">l07_got_all</font>:
+ <font color="#00ff00">lda</font> <font color="#ff6060">#$09</font> <font color="#8080ff">; AF5E A9 09 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">player_speed</font> <font color="#8080ff">; AF60 8D 24 06 .$.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; AF63 A9 00 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">playing_level</font> <font color="#8080ff">; AF65 8D 27 06 .'.</font>
@@ -6078,8 +6120,8 @@
<font color="#00ff00">adc</font> <font color="#ff6060">#$0A</font> <font color="#8080ff">; AF71 69 0A i.</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0770 </font> <font color="#8080ff">; AF73 8D 70 07 .p.</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0772,x </font> <font color="#8080ff">; AF76 BD 72 07 .r.</font>
- <font color="#00ff00">cmp</font> <font color="#00ffff">LAEAF</font>,<font color="#00ffff">x</font> <font color="#8080ff">; AF79 DD AF AE ...</font>
- <font color="#00ff00">beq</font> <font color="#00ffff">LAF96</font> <font color="#8080ff">; AF7C F0 18 ..</font>
+ <font color="#00ff00">cmp</font> <font color="#00ffff">epyx_jumpman</font>,<font color="#00ffff">x</font> <font color="#8080ff">; AF79 DD AF AE ...</font>
+ <font color="#00ff00">beq</font> <font color="#00ffff">bonus_250_pts</font> <font color="#8080ff">; AF7C F0 18 ..</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$00</font> <font color="#8080ff">; AF7E A9 00 ..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0681 </font> <font color="#8080ff">; AF80 8D 81 06 ...</font>
<font color="#00ff00">jmp</font> <font color="#00ffff">LAF92</font> <font color="#8080ff">; AF83 4C 92 AF L..</font>
@@ -6095,7 +6137,9 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; AF95 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LAF96</font>: <font color="#00ff00">lda</font> <font color="#ff40ff"> $0770 </font> <font color="#8080ff">; AF96 AD 70 07 .p.</font>
+<font color="#8080ff">; per letter</font>
+<font color="#00ffff">bonus_250_pts</font>:
+ <font color="#00ff00">lda</font> <font color="#ff40ff"> $0770 </font> <font color="#8080ff">; AF96 AD 70 07 .p.</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0686 </font> <font color="#8080ff">; AF99 8D 86 06 ...</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$86</font> <font color="#8080ff">; AF9C A9 86 ..</font>
<font color="#00ff00">sta</font> <font color="#ff40ff"> $0681 </font> <font color="#8080ff">; AF9E 8D 81 06 ...</font>
@@ -6109,7 +6153,9 @@
<font color="#00ff00">inc</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font> <font color="#8080ff">; AFB1 EE 02 07 ...</font>
<font color="#00ffff">LAFB4</font>: <font color="#00ff00">txa</font> <font color="#8080ff">; AFB4 8A .</font>
<font color="#00ff00">pha</font> <font color="#8080ff">; AFB5 48 H</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L800C</font> <font color="#8080ff">; AFB6 20 0C 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">update_score_display_jv</font> <font color="#8080ff">; AFB6 20 0C 80 ..</font>
+<font color="#8080ff">; play sfx_letter_bonus</font>
+<font color="#00ffff">cue_letter_sfx</font>:
<font color="#00ff00">lda</font> <font color="#ff6060">#$CB</font> <font color="#8080ff">; AFB9 A9 CB ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_ptr</font> <font color="#8080ff">; AFBB 8D 3C 06 .&lt;.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$AF</font> <font color="#8080ff">; AFBE A9 AF ..</font>
@@ -6120,8 +6166,8 @@
<font color="#00ff00">jmp</font> <font color="#00ffff">LAF86</font> <font color="#8080ff">; AFC8 4C 86 AF L..</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; referenced by routine at $AF96</font>
-<font color="#00ffff">sfx_afcb</font>:
+<font color="#8080ff">; played once per correct letter at end of level07 (spellbound)</font>
+<font color="#00ffff">sfx_letter_bonus</font>:
.<font color="#ffff00">byte</font> <font color="#ff6060">$01</font>,<font color="#ff6060">$A5</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$18</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$F3</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; AFCB 01 A5 00 18 04 F3 04 00 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; AFD3 00 00 00 00 00 00 00 00 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; AFDB 00 00 00 00 00 00 00 00 ........</font>
@@ -6519,7 +6565,7 @@
<font color="#00ff00">lda</font> <font color="#ff6060">#$B5</font> <font color="#8080ff">; B4D8 A9 B5 ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">sfx_slot_timer</font> <font color="#8080ff">; B4DA 8D 3F 06 .?.</font>
<font color="#00ff00">lda</font> <font color="#ff6060">#$03</font> <font color="#8080ff">; B4DD A9 03 ..</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L8003</font> <font color="#8080ff">; B4DF 20 03 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">cue_sfx_lowprior_jv</font> <font color="#8080ff">; B4DF 20 03 80 ..</font>
<font color="#00ffff">LB4E2</font>: <font color="#00ff00">ldy</font> <font color="#ff6060">#$01</font> <font color="#8080ff">; B4E2 A0 01 ..</font>
<font color="#00ff00">lda</font> <font color="#ff40ff"> $0681 </font> <font color="#8080ff">; B4E4 AD 81 06 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff40ff"> $067E </font> <font color="#8080ff">; B4E7 CD 7E 06 .~.</font>
@@ -6723,15 +6769,17 @@
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; B7B1 00 00 00 00 00 00 00 00 ........</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; B7B9 00 00 00 00 00 00 00 .......</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#00ffff">LB7C0</font>: <font color="#00ff00">lda</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font> <font color="#8080ff">; B7C0 AD 02 07 ...</font>
+<font color="#8080ff">; roll over the score if it's &gt;= 1 million</font>
+<font color="#00ffff">score_mod_1m</font>:
+ <font color="#00ff00">lda</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font> <font color="#8080ff">; B7C0 AD 02 07 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$0F</font> <font color="#8080ff">; B7C3 C9 0F ..</font>
- <font color="#00ff00">bcc</font> <font color="#00ffff">LB7EE</font> <font color="#8080ff">; B7C5 90 27 .'</font>
+ <font color="#00ff00">bcc</font> <font color="#00ffff">score_below_1m</font> <font color="#8080ff">; B7C5 90 27 .'</font>
<font color="#00ff00">lda</font> <font color="#00ffff">score</font>+<font color="#ff6060">1</font> <font color="#8080ff">; B7C7 AD 01 07 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$42</font> <font color="#8080ff">; B7CA C9 42 .B</font>
- <font color="#00ff00">bcc</font> <font color="#00ffff">LB7EE</font> <font color="#8080ff">; B7CC 90 20 . </font>
+ <font color="#00ff00">bcc</font> <font color="#00ffff">score_below_1m</font> <font color="#8080ff">; B7CC 90 20 . </font>
<font color="#00ff00">lda</font> <font color="#00ffff">score</font> <font color="#8080ff">; B7CE AD 00 07 ...</font>
<font color="#00ff00">cmp</font> <font color="#ff6060">#$40</font> <font color="#8080ff">; B7D1 C9 40 .@</font>
- <font color="#00ff00">bcc</font> <font color="#00ffff">LB7EE</font> <font color="#8080ff">; B7D3 90 19 ..</font>
+ <font color="#00ff00">bcc</font> <font color="#00ffff">score_below_1m</font> <font color="#8080ff">; B7D3 90 19 ..</font>
<font color="#00ff00">sec</font> <font color="#8080ff">; B7D5 38 8</font>
<font color="#00ff00">lda</font> <font color="#00ffff">score</font> <font color="#8080ff">; B7D6 AD 00 07 ...</font>
<font color="#00ff00">sbc</font> <font color="#ff6060">#$40</font> <font color="#8080ff">; B7D9 E9 40 .@</font>
@@ -6742,7 +6790,8 @@
<font color="#00ff00">lda</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font> <font color="#8080ff">; B7E6 AD 02 07 ...</font>
<font color="#00ff00">sbc</font> <font color="#ff6060">#$0F</font> <font color="#8080ff">; B7E9 E9 0F ..</font>
<font color="#00ff00">sta</font> <font color="#00ffff">score</font>+<font color="#ff6060">2</font> <font color="#8080ff">; B7EB 8D 02 07 ...</font>
-<font color="#00ffff">LB7EE</font>: <font color="#00ff00">jmp</font> <font color="#00ffff">L8668</font> <font color="#8080ff">; B7EE 4C 68 86 Lh.</font>
+<font color="#00ffff">score_below_1m</font>:
+ <font color="#00ff00">jmp</font> <font color="#00ffff">L8668</font> <font color="#8080ff">; B7EE 4C 68 86 Lh.</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
<font color="#00ff00">brk</font> <font color="#8080ff">; B7F1 00 .</font>
@@ -6804,7 +6853,7 @@
<font color="#00ff00">lda</font> <font color="#00ffff">work_level_time_bonus</font>+<font color="#ff6060">1</font> <font color="#8080ff">; B85A AD 92 07 ...</font>
<font color="#00ff00">adc</font> <font color="#ff40ff"> $A5 </font> <font color="#8080ff">; B85D 65 A5 e.</font>
<font color="#00ff00">sta</font> <font color="#00ffff">work_level_time_bonus</font>+<font color="#ff6060">1</font> <font color="#8080ff">; B85F 8D 92 07 ...</font>
- <font color="#00ff00">jsr</font> <font color="#00ffff">L800C</font> <font color="#8080ff">; B862 20 0C 80 ..</font>
+ <font color="#00ff00">jsr</font> <font color="#00ffff">update_score_display_jv</font> <font color="#8080ff">; B862 20 0C 80 ..</font>
<font color="#00ff00">jsr</font> <font color="#00ffff">L800F</font> <font color="#8080ff">; B865 20 0F 80 ..</font>
<font color="#8080ff">; play once per life</font>
<font color="#00ffff">play_life_bonus_sfx</font>:
@@ -7172,7 +7221,7 @@
<font color="#00ff00">rts</font> <font color="#8080ff">; BCCC 60 `</font>
<font color="#8080ff">; ----------------------------------------------------------------------------</font>
-<font color="#8080ff">; dunno, but referenced by code at $BC6A</font>
+<font color="#8080ff">; dunno, but referenced by code at $BC6A (part of well_done_screen)</font>
<font color="#00ffff">code_bccd</font>:
<font color="#00ff00">lda</font> <font color="#ff40ff"> $062A </font> <font color="#8080ff">; BCCD AD 2A 06 .*.</font>
<font color="#00ff00">sta</font> <font color="#ff40ff">COLOR2</font> <font color="#8080ff">; BCD0 8D C6 02 ...</font>
@@ -7340,7 +7389,8 @@
.<font color="#ffff00">byte</font> <font color="#ff6060">$20</font>,<font color="#ff6060">$88</font>,<font color="#ff6060">$09</font>,<font color="#ff6060">$99</font>,<font color="#ff6060">$20</font>,<font color="#ff6060">$E6</font>,<font color="#ff6060">$30</font>,<font color="#ff6060">$99</font> <font color="#8080ff">; BFAE 20 88 09 99 20 E6 30 99 ... .0.</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$20</font>,<font color="#ff6060">$88</font>,<font color="#ff6060">$09</font>,<font color="#ff6060">$99</font>,<font color="#ff6060">$20</font>,<font color="#ff6060">$B6</font>,<font color="#ff6060">$3A</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; BFB6 20 88 09 99 20 B6 3A 00 ... .:.</font>
<font color="#8080ff">; jumping sound</font>
-<font color="#00ffff">sfx12</font>: .<font color="#ffff00">byte</font> <font color="#ff6060">$01</font>,<font color="#ff6060">$A5</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$79</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$60</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$51</font> <font color="#8080ff">; BFBE 01 A5 00 79 04 60 04 51 ...y.`.Q</font>
+<font color="#00ffff">sfx_jump</font>:
+ .<font color="#ffff00">byte</font> <font color="#ff6060">$01</font>,<font color="#ff6060">$A5</font>,<font color="#ff6060">$00</font>,<font color="#ff6060">$79</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$60</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$51</font> <font color="#8080ff">; BFBE 01 A5 00 79 04 60 04 51 ...y.`.Q</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$04</font>,<font color="#ff6060">$3C</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$51</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$60</font>,<font color="#ff6060">$04</font>,<font color="#ff6060">$79</font> <font color="#8080ff">; BFC6 04 3C 04 51 04 60 04 79 .&lt;.Q.`.y</font>
.<font color="#ffff00">byte</font> <font color="#ff6060">$04</font>,<font color="#ff6060">$00</font> <font color="#8080ff">; BFCE 04 00 ..</font>
<font color="#8080ff">; funeral march melody</font>
diff --git a/jumpmanjr.info b/jumpmanjr.info
index 7d3ea17..f5620ed 100644
--- a/jumpmanjr.info
+++ b/jumpmanjr.info
@@ -56,9 +56,15 @@ label { name "l07_got_all"; addr $AF5E; comment "got all the bombs"; };
label { name "bonus_250_pts"; addr $AF96; comment "per letter"; };
label { name "epyx_jumpman"; addr $AEAF; comment "letters for level07, spellbound (not ASCII or screencodes though)"; };
+label { name "jump_frame"; addr $06EB; comment "0 if not jumping, or frames since start of jump (range 1 to 21)"; };
range { name "code_99f7"; start $99F7; end $9A1B; type code; };
range { name "data_8406"; start $8406; end $840c; type bytetable; };
-range { name "data_9a1c"; start $9a1c; end $9A5B; type bytetable; };
+range { name "jump_delta_x_table"; start $9a1c; end $9A5B; type bytetable; comment "used by continue_jump, the amount of X movement per frame of jumping (for either direction, left or right)"; };
+label { name "jump_delta_y_table"; addr $9A32; comment "used by continue_jump, amount of Y movement per frame ($FE is -2, or 2 scanlines up, $02 is 2 scanlines down)"; };
+label { name "zero_filler_9a48"; addr $9a48; };
+label { name "jump_delta_x_table_minus_one"; addr $9A1B; comment "1-indexed..."; };
+label { name "jump_delta_y_table_minus_one"; addr $9A31; comment "1-indexed..."; };
+label { name "is_jump_done"; addr $99AE; comment "$15 aka 21 frames?"; };
range { name "gameboard_dlist_data"; start $9B62; end $9b71; type bytetable; comment "this isn't used as-is for a display list, see setup_gameboard_dlist"; };
RANGE { NAME "cartstart_left"; START $BFFA; END $BFFB ; TYPE AddrTable; comment "main entry point, note cartstart_left and cartstart_right point to the same address"; };
RANGE { NAME "cartstart_right"; START $9FFA; END $9FFB ; TYPE AddrTable; comment "main entry point, note cartstart_left and cartstart_right point to the same address"; };
@@ -101,7 +107,10 @@ label { name "save_collisions"; addr $8503; comment "save contents of GTIA colli
label { name "check_collisions_1"; addr $8F73; size 1; comment "did any missile hit a player, or did players 2 or 3 hit a player..."; };
label { name "check_collisions_2"; addr $981A; size 1; comment "did player 0 or 1 hit the playfield..."; };
-label { name "check_collisions_3"; addr $9832; size 1; comment "did player 0 or 1 hit the playfield..."; };
+label { name "check_collisions_3"; addr $9832; size 1; comment "movement/jumping only allowed if player's touching the playfield"; };
+label { name "mid_jump"; addr $99A8; size 1; comment "check & see if we're done jumping"; };
+label { name "continue_jump"; addr $99BD; size 1; comment "we're in mid-jump and didn't hit anything, keep going"; };
+label { name "end_jump"; addr $99B2; size 1; comment "we hit a girder/rope/ladder in mid-jump, or else the jump finished without hitting anything(?). this does not (?) include the bottom of the level"; };
label { name "collision_save"; addr $06B0; size 16; comment "save_collisions copies GTIA collision regs $D000-$d00f here"; };
label { name "init_next_level"; addr $9BE8; size 1; comment "..."; };
label { name "show_get_ready_prompt"; addr $9624; size 1; comment "only in multiplayer games"; };
@@ -194,7 +203,7 @@ label { name "sfx_slot_duration"; addr $0646; size 1; };
label { name "sfx_play_note"; addr $8206; size 1; comment "y==0, a>=4 on entry"; };
label { name "sfx_play_rest"; addr $819E; size 1; comment "y==0 on entry"; };
label { name "sfx_change_tempo"; addr $81AE; size 1; comment "y==0 on entry"; };
-label { name "sfx_jump"; addr $81C8; size 1; comment "I *think* this jumps to a different sfx address..."; };
+label { name "sfx_jump_opcode"; addr $81C8; size 1; comment "I *think* this jumps to a different sfx address..."; };
label { name "sfx_slot_freq"; addr $0647; size 1; };
range { name "sfx00"; start $BDF2; end $BE24; type bytetable; };
@@ -210,7 +219,7 @@ range { name "sfx08"; start $BF4A; end $BF5F; type bytetable; comment "end level
range { name "sfx09"; start $BF60; end $BF83; type bytetable; comment "end level tune #3, melody"; };
range { name "sfx10"; start $BF84; end $BFA5; type bytetable; comment "end level tune #4, melody"; };
range { name "sfx11"; start $BFA6; end $BFBD; type bytetable; comment "end level tune #4, bass"; };
-range { name "sfx12"; start $BFBE; end $BFCF; type bytetable; comment "jumping sound"; };
+range { name "sfx_jump"; start $BFBE; end $BFCF; type bytetable; comment "jumping sound"; };
range { name "sfx13"; start $BFD0; end $BFE9; type bytetable; comment "funeral march melody"; };
range { name "sfx14"; start $BFEA; end $BFF9; type bytetable; comment "funeral march bass"; };
range { name "sfx15"; start $BABC; end $BAE9; type bytetable; comment "level intro music, melody"; };
@@ -243,8 +252,12 @@ range { name "total_score_msg"; start $bdd2; end $bdf1; type bytetable; comment
range { name "zero_filler_8588"; start $B588; end $B696; type bytetable; };
range { name "wind_table_1"; start $B76B; end $b7bf; type bytetable; comment "used in level11"; };
label { name "wind_table_2"; addr $b771; };
+label { name "electrocution_done"; addr $A4DD; comment "turn off electrocution effect (?)"; };
+label { name "electrocute"; addr $A509; comment "electrocution effect"; };
+label { name "level02_collisions"; addr $A53D; comment "skip a couple of the collision regs, so we don't register a collision when Jumpman is being electrocuted"; };
+label { name "start_jump"; addr $99A0; comment "start jumping, play sfx_jump"; };
range { name "level00_map"; start $A300; end $a497; type bytetable; comment "level map data starts here"; };
-range { name "sfx_a52d"; start $A52D; end $A53C; type bytetable; comment "dunno, referenced by routine at $A50F"; };
+range { name "sfx_electrocution"; start $A52D; end $A53C; type bytetable; };
range { name "data_table_a542"; start $A542; end $A68B; type bytetable; comment "dunno, referenced by routine at $A498"; };
range { name "dumbwaiter_player"; start $a782; end $A826; type bytetable; comment "the dumbwaiters from level02. stored upside-down."; };
label { name "dw_platform_player"; addr $A685; comment "horizontally moving platforms from level02"; };
@@ -302,6 +315,7 @@ label { name "cue_music_jv"; addr $8018; comment "setup to play whichever music
label { name "cue_sfx_jv"; addr $8006; comment "setup to play sfx"; };
label { name "cue_sfx"; addr $8255; comment "setup to play sfx at *sfx_ptr, tempo (?) A"; };
label { name "cue_sfx_lowprior"; addr $8240; comment "if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A"; };
+label { name "cue_sfx_lowprior_jv"; addr $8003; comment "if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A"; };
label { name "sfx_ptr"; addr $063C; size 2; };
label { name "cue_ok"; addr $8244; size 1; };
label { name "cue_done"; addr $8278; size 1; };
@@ -387,7 +401,7 @@ label { name "check_trigger_state"; addr $984D; size 1; comment "did user press
label { name "trig_jmp"; addr $9852; size 1; comment "yes, jump to handler"; };
label { name "check_up_down"; addr $9855; size 1; comment "did user move joystick up/down?"; };
label { name "check_up_down_2"; addr $993B; size 1; comment "did user move joystick up/down?"; };
-label { name "trigger_handler"; addr $9985; size 1; comment "handle trigger presses (maybe start a jump)"; };
+label { name "trigger_handler"; addr $9985; size 1; comment "handle trigger presses, maybe start a jump, if player is moving up, left, or right"; };
label { name "cud_jmp"; addr $9860; size 1; comment "no, jump over handler"; };
label { name "player_delta_x"; addr $0630; size 1; comment "amount to move jumpman this frame (1 or $FF aka -1)"; };
label { name "player_delta_y"; addr $0631; size 1; comment "amount to move jumpman this frame (1 or $FF aka -1)"; };
@@ -533,7 +547,7 @@ label { name "work_level_map2"; addr $079a; size 2; comment "map data"; };
label { name "work_level_unkn_table1"; addr $079c; size 2; comment "unknown, pointer to a ROM table or $0000"; };
label { name "work_level_offs_30"; addr $079e; size 2; comment "always $0000"; };
label { name "work_level_sub_bomb"; addr $07a0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "work_level_sub5"; addr $07a2; size 2; comment "$06E6 for some levels, or else a ROM subroutine"; };
+label { name "work_level_sub_start"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "work_level_sub6"; addr $07a4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "work_level_sub_eol"; addr $07a6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
label { name "work_level_offs_40"; addr $07a8; size 6; comment "all zeroes"; };
@@ -562,7 +576,7 @@ label { name "cur_level_map2"; addr $07da; size 2; comment "map data"; };
label { name "cur_level_unkn_table1"; addr $07dc; size 2; comment "unknown, pointer to a ROM table or $0000"; };
label { name "cur_level_offs_30"; addr $07de; size 2; comment "always $0000"; };
label { name "cur_level_sub_bomb"; addr $07e0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "cur_level_sub5"; addr $07e2; size 2; comment "$06E6 for some levels, or else a ROM subroutine"; };
+label { name "cur_level_sub_start"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "cur_level_sub6"; addr $07e4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "cur_level_sub_eol"; addr $07e6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
label { name "cur_level_offs_40"; addr $07e8; size 6; comment "all zeroes"; };
@@ -591,7 +605,7 @@ range { name "level00_map2"; start $a01a; end $a01b; type addrtable; comment "ma
range { name "level00_unkn_table1"; start $a01c; end $a01d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level00_offs_30"; start $a01e; end $a01f; type bytetable; comment "always $0000"; };
range { name "level00_sub_bomb"; start $a020; end $a021; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level00_sub5"; start $a022; end $a023; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level00_sub_start"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level00_sub6"; start $a024; end $a025; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level00_sub_eol"; start $a026; end $a027; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level00_offs_40"; start $a028; end $a02d; type bytetable; comment "all zeroes"; };
@@ -620,7 +634,7 @@ range { name "level01_map2"; start $a05a; end $a05b; type addrtable; comment "ma
range { name "level01_unkn_table1"; start $a05c; end $a05d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level01_offs_30"; start $a05e; end $a05f; type bytetable; comment "always $0000"; };
range { name "level01_sub_bomb"; start $a060; end $a061; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level01_sub5"; start $a062; end $a063; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level01_sub_start"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level01_sub6"; start $a064; end $a065; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level01_sub_eol"; start $a066; end $a067; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level01_offs_40"; start $a068; end $a06d; type bytetable; comment "all zeroes"; };
@@ -649,7 +663,7 @@ range { name "level02_map2"; start $a09a; end $a09b; type addrtable; comment "ma
range { name "level02_unkn_table1"; start $a09c; end $a09d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level02_offs_30"; start $a09e; end $a09f; type bytetable; comment "always $0000"; };
range { name "level02_sub_bomb"; start $a0a0; end $a0a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level02_sub5"; start $a0a2; end $a0a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level02_sub_start"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level02_sub6"; start $a0a4; end $a0a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level02_sub_eol"; start $a0a6; end $a0a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level02_offs_40"; start $a0a8; end $a0ad; type bytetable; comment "all zeroes"; };
@@ -678,7 +692,7 @@ range { name "level03_map2"; start $a0da; end $a0db; type addrtable; comment "ma
range { name "level03_unkn_table1"; start $a0dc; end $a0dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level03_offs_30"; start $a0de; end $a0df; type bytetable; comment "always $0000"; };
range { name "level03_sub_bomb"; start $a0e0; end $a0e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level03_sub5"; start $a0e2; end $a0e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level03_sub_start"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level03_sub6"; start $a0e4; end $a0e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level03_sub_eol"; start $a0e6; end $a0e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level03_offs_40"; start $a0e8; end $a0ed; type bytetable; comment "all zeroes"; };
@@ -707,7 +721,7 @@ range { name "level04_map2"; start $a11a; end $a11b; type addrtable; comment "ma
range { name "level04_unkn_table1"; start $a11c; end $a11d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level04_offs_30"; start $a11e; end $a11f; type bytetable; comment "always $0000"; };
range { name "level04_sub_bomb"; start $a120; end $a121; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level04_sub5"; start $a122; end $a123; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level04_sub_start"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level04_sub6"; start $a124; end $a125; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level04_sub_eol"; start $a126; end $a127; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level04_offs_40"; start $a128; end $a12d; type bytetable; comment "all zeroes"; };
@@ -736,7 +750,7 @@ range { name "level05_map2"; start $a15a; end $a15b; type addrtable; comment "ma
range { name "level05_unkn_table1"; start $a15c; end $a15d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level05_offs_30"; start $a15e; end $a15f; type bytetable; comment "always $0000"; };
range { name "level05_sub_bomb"; start $a160; end $a161; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level05_sub5"; start $a162; end $a163; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level05_sub_start"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level05_sub6"; start $a164; end $a165; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level05_sub_eol"; start $a166; end $a167; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level05_offs_40"; start $a168; end $a16d; type bytetable; comment "all zeroes"; };
@@ -765,7 +779,7 @@ range { name "level06_map2"; start $a19a; end $a19b; type addrtable; comment "ma
range { name "level06_unkn_table1"; start $a19c; end $a19d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level06_offs_30"; start $a19e; end $a19f; type bytetable; comment "always $0000"; };
range { name "level06_sub_bomb"; start $a1a0; end $a1a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level06_sub5"; start $a1a2; end $a1a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level06_sub_start"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level06_sub6"; start $a1a4; end $a1a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level06_sub_eol"; start $a1a6; end $a1a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level06_offs_40"; start $a1a8; end $a1ad; type bytetable; comment "all zeroes"; };
@@ -794,7 +808,7 @@ range { name "level07_map2"; start $a1da; end $a1db; type addrtable; comment "ma
range { name "level07_unkn_table1"; start $a1dc; end $a1dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level07_offs_30"; start $a1de; end $a1df; type bytetable; comment "always $0000"; };
range { name "level07_sub_bomb"; start $a1e0; end $a1e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level07_sub5"; start $a1e2; end $a1e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level07_sub_start"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level07_sub6"; start $a1e4; end $a1e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level07_sub_eol"; start $a1e6; end $a1e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level07_offs_40"; start $a1e8; end $a1ed; type bytetable; comment "all zeroes"; };
@@ -823,7 +837,7 @@ range { name "level08_map2"; start $a21a; end $a21b; type addrtable; comment "ma
range { name "level08_unkn_table1"; start $a21c; end $a21d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level08_offs_30"; start $a21e; end $a21f; type bytetable; comment "always $0000"; };
range { name "level08_sub_bomb"; start $a220; end $a221; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level08_sub5"; start $a222; end $a223; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level08_sub_start"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level08_sub6"; start $a224; end $a225; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level08_sub_eol"; start $a226; end $a227; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level08_offs_40"; start $a228; end $a22d; type bytetable; comment "all zeroes"; };
@@ -852,7 +866,7 @@ range { name "level09_map2"; start $a25a; end $a25b; type addrtable; comment "ma
range { name "level09_unkn_table1"; start $a25c; end $a25d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level09_offs_30"; start $a25e; end $a25f; type bytetable; comment "always $0000"; };
range { name "level09_sub_bomb"; start $a260; end $a261; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level09_sub5"; start $a262; end $a263; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level09_sub_start"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level09_sub6"; start $a264; end $a265; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level09_sub_eol"; start $a266; end $a267; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level09_offs_40"; start $a268; end $a26d; type bytetable; comment "all zeroes"; };
@@ -881,7 +895,7 @@ range { name "level10_map2"; start $a29a; end $a29b; type addrtable; comment "ma
range { name "level10_unkn_table1"; start $a29c; end $a29d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level10_offs_30"; start $a29e; end $a29f; type bytetable; comment "always $0000"; };
range { name "level10_sub_bomb"; start $a2a0; end $a2a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level10_sub5"; start $a2a2; end $a2a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level10_sub_start"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level10_sub6"; start $a2a4; end $a2a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level10_sub_eol"; start $a2a6; end $a2a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level10_offs_40"; start $a2a8; end $a2ad; type bytetable; comment "all zeroes"; };
@@ -910,7 +924,7 @@ range { name "level11_map2"; start $a2da; end $a2db; type addrtable; comment "ma
range { name "level11_unkn_table1"; start $a2dc; end $a2dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level11_offs_30"; start $a2de; end $a2df; type bytetable; comment "always $0000"; };
range { name "level11_sub_bomb"; start $a2e0; end $a2e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level11_sub5"; start $a2e2; end $a2e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level11_sub_start"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level11_sub6"; start $a2e4; end $a2e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level11_sub_eol"; start $a2e6; end $a2e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level11_offs_40"; start $a2e8; end $a2ed; type bytetable; comment "all zeroes"; };
diff --git a/leveldesc.info b/leveldesc.info
index 35b89a0..73d32ec 100644
--- a/leveldesc.info
+++ b/leveldesc.info
@@ -18,7 +18,7 @@ label { name "work_level_map2"; addr $079a; size 2; comment "map data"; };
label { name "work_level_unkn_table1"; addr $079c; size 2; comment "unknown, pointer to a ROM table or $0000"; };
label { name "work_level_offs_30"; addr $079e; size 2; comment "always $0000"; };
label { name "work_level_sub_bomb"; addr $07a0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "work_level_sub5"; addr $07a2; size 2; comment "$06E6 for some levels, or else a ROM subroutine"; };
+label { name "work_level_sub_start"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "work_level_sub6"; addr $07a4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "work_level_sub_eol"; addr $07a6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
label { name "work_level_offs_40"; addr $07a8; size 6; comment "all zeroes"; };
@@ -47,7 +47,7 @@ label { name "cur_level_map2"; addr $07da; size 2; comment "map data"; };
label { name "cur_level_unkn_table1"; addr $07dc; size 2; comment "unknown, pointer to a ROM table or $0000"; };
label { name "cur_level_offs_30"; addr $07de; size 2; comment "always $0000"; };
label { name "cur_level_sub_bomb"; addr $07e0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "cur_level_sub5"; addr $07e2; size 2; comment "$06E6 for some levels, or else a ROM subroutine"; };
+label { name "cur_level_sub_start"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "cur_level_sub6"; addr $07e4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "cur_level_sub_eol"; addr $07e6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
label { name "cur_level_offs_40"; addr $07e8; size 6; comment "all zeroes"; };
@@ -76,7 +76,7 @@ range { name "level00_map2"; start $a01a; end $a01b; type addrtable; comment "ma
range { name "level00_unkn_table1"; start $a01c; end $a01d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level00_offs_30"; start $a01e; end $a01f; type bytetable; comment "always $0000"; };
range { name "level00_sub_bomb"; start $a020; end $a021; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level00_sub5"; start $a022; end $a023; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level00_sub_start"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level00_sub6"; start $a024; end $a025; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level00_sub_eol"; start $a026; end $a027; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level00_offs_40"; start $a028; end $a02d; type bytetable; comment "all zeroes"; };
@@ -105,7 +105,7 @@ range { name "level01_map2"; start $a05a; end $a05b; type addrtable; comment "ma
range { name "level01_unkn_table1"; start $a05c; end $a05d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level01_offs_30"; start $a05e; end $a05f; type bytetable; comment "always $0000"; };
range { name "level01_sub_bomb"; start $a060; end $a061; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level01_sub5"; start $a062; end $a063; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level01_sub_start"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level01_sub6"; start $a064; end $a065; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level01_sub_eol"; start $a066; end $a067; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level01_offs_40"; start $a068; end $a06d; type bytetable; comment "all zeroes"; };
@@ -134,7 +134,7 @@ range { name "level02_map2"; start $a09a; end $a09b; type addrtable; comment "ma
range { name "level02_unkn_table1"; start $a09c; end $a09d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level02_offs_30"; start $a09e; end $a09f; type bytetable; comment "always $0000"; };
range { name "level02_sub_bomb"; start $a0a0; end $a0a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level02_sub5"; start $a0a2; end $a0a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level02_sub_start"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level02_sub6"; start $a0a4; end $a0a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level02_sub_eol"; start $a0a6; end $a0a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level02_offs_40"; start $a0a8; end $a0ad; type bytetable; comment "all zeroes"; };
@@ -163,7 +163,7 @@ range { name "level03_map2"; start $a0da; end $a0db; type addrtable; comment "ma
range { name "level03_unkn_table1"; start $a0dc; end $a0dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level03_offs_30"; start $a0de; end $a0df; type bytetable; comment "always $0000"; };
range { name "level03_sub_bomb"; start $a0e0; end $a0e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level03_sub5"; start $a0e2; end $a0e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level03_sub_start"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level03_sub6"; start $a0e4; end $a0e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level03_sub_eol"; start $a0e6; end $a0e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level03_offs_40"; start $a0e8; end $a0ed; type bytetable; comment "all zeroes"; };
@@ -192,7 +192,7 @@ range { name "level04_map2"; start $a11a; end $a11b; type addrtable; comment "ma
range { name "level04_unkn_table1"; start $a11c; end $a11d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level04_offs_30"; start $a11e; end $a11f; type bytetable; comment "always $0000"; };
range { name "level04_sub_bomb"; start $a120; end $a121; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level04_sub5"; start $a122; end $a123; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level04_sub_start"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level04_sub6"; start $a124; end $a125; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level04_sub_eol"; start $a126; end $a127; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level04_offs_40"; start $a128; end $a12d; type bytetable; comment "all zeroes"; };
@@ -221,7 +221,7 @@ range { name "level05_map2"; start $a15a; end $a15b; type addrtable; comment "ma
range { name "level05_unkn_table1"; start $a15c; end $a15d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level05_offs_30"; start $a15e; end $a15f; type bytetable; comment "always $0000"; };
range { name "level05_sub_bomb"; start $a160; end $a161; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level05_sub5"; start $a162; end $a163; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level05_sub_start"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level05_sub6"; start $a164; end $a165; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level05_sub_eol"; start $a166; end $a167; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level05_offs_40"; start $a168; end $a16d; type bytetable; comment "all zeroes"; };
@@ -250,7 +250,7 @@ range { name "level06_map2"; start $a19a; end $a19b; type addrtable; comment "ma
range { name "level06_unkn_table1"; start $a19c; end $a19d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level06_offs_30"; start $a19e; end $a19f; type bytetable; comment "always $0000"; };
range { name "level06_sub_bomb"; start $a1a0; end $a1a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level06_sub5"; start $a1a2; end $a1a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level06_sub_start"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level06_sub6"; start $a1a4; end $a1a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level06_sub_eol"; start $a1a6; end $a1a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level06_offs_40"; start $a1a8; end $a1ad; type bytetable; comment "all zeroes"; };
@@ -279,7 +279,7 @@ range { name "level07_map2"; start $a1da; end $a1db; type addrtable; comment "ma
range { name "level07_unkn_table1"; start $a1dc; end $a1dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level07_offs_30"; start $a1de; end $a1df; type bytetable; comment "always $0000"; };
range { name "level07_sub_bomb"; start $a1e0; end $a1e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level07_sub5"; start $a1e2; end $a1e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level07_sub_start"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level07_sub6"; start $a1e4; end $a1e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level07_sub_eol"; start $a1e6; end $a1e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level07_offs_40"; start $a1e8; end $a1ed; type bytetable; comment "all zeroes"; };
@@ -308,7 +308,7 @@ range { name "level08_map2"; start $a21a; end $a21b; type addrtable; comment "ma
range { name "level08_unkn_table1"; start $a21c; end $a21d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level08_offs_30"; start $a21e; end $a21f; type bytetable; comment "always $0000"; };
range { name "level08_sub_bomb"; start $a220; end $a221; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level08_sub5"; start $a222; end $a223; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level08_sub_start"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level08_sub6"; start $a224; end $a225; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level08_sub_eol"; start $a226; end $a227; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level08_offs_40"; start $a228; end $a22d; type bytetable; comment "all zeroes"; };
@@ -337,7 +337,7 @@ range { name "level09_map2"; start $a25a; end $a25b; type addrtable; comment "ma
range { name "level09_unkn_table1"; start $a25c; end $a25d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level09_offs_30"; start $a25e; end $a25f; type bytetable; comment "always $0000"; };
range { name "level09_sub_bomb"; start $a260; end $a261; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level09_sub5"; start $a262; end $a263; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level09_sub_start"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level09_sub6"; start $a264; end $a265; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level09_sub_eol"; start $a266; end $a267; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level09_offs_40"; start $a268; end $a26d; type bytetable; comment "all zeroes"; };
@@ -366,7 +366,7 @@ range { name "level10_map2"; start $a29a; end $a29b; type addrtable; comment "ma
range { name "level10_unkn_table1"; start $a29c; end $a29d; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level10_offs_30"; start $a29e; end $a29f; type bytetable; comment "always $0000"; };
range { name "level10_sub_bomb"; start $a2a0; end $a2a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level10_sub5"; start $a2a2; end $a2a3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level10_sub_start"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level10_sub6"; start $a2a4; end $a2a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level10_sub_eol"; start $a2a6; end $a2a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level10_offs_40"; start $a2a8; end $a2ad; type bytetable; comment "all zeroes"; };
@@ -395,7 +395,7 @@ range { name "level11_map2"; start $a2da; end $a2db; type addrtable; comment "ma
range { name "level11_unkn_table1"; start $a2dc; end $a2dd; type addrtable; comment "unknown, pointer to a ROM table or $0000"; };
range { name "level11_offs_30"; start $a2de; end $a2df; type bytetable; comment "always $0000"; };
range { name "level11_sub_bomb"; start $a2e0; end $a2e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level11_sub5"; start $a2e2; end $a2e3; type addrtable; comment "$06E6 for some levels, or else a ROM subroutine"; };
+range { name "level11_sub_start"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level11_sub6"; start $a2e4; end $a2e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level11_sub_eol"; start $a2e6; end $a2e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level07"; };
range { name "level11_offs_40"; start $a2e8; end $a2ed; type bytetable; comment "all zeroes"; };
diff --git a/main.info b/main.info
index d0c5d06..24ea3c6 100644
--- a/main.info
+++ b/main.info
@@ -54,9 +54,15 @@ label { name "l07_got_all"; addr $AF5E; comment "got all the bombs"; };
label { name "bonus_250_pts"; addr $AF96; comment "per letter"; };
label { name "epyx_jumpman"; addr $AEAF; comment "letters for level07, spellbound (not ASCII or screencodes though)"; };
+label { name "jump_frame"; addr $06EB; comment "0 if not jumping, or frames since start of jump (range 1 to 21)"; };
range { name "code_99f7"; start $99F7; end $9A1B; type code; };
range { name "data_8406"; start $8406; end $840c; type bytetable; };
-range { name "data_9a1c"; start $9a1c; end $9A5B; type bytetable; };
+range { name "jump_delta_x_table"; start $9a1c; end $9A5B; type bytetable; comment "used by continue_jump, the amount of X movement per frame of jumping (for either direction, left or right)"; };
+label { name "jump_delta_y_table"; addr $9A32; comment "used by continue_jump, amount of Y movement per frame ($FE is -2, or 2 scanlines up, $02 is 2 scanlines down)"; };
+label { name "zero_filler_9a48"; addr $9a48; };
+label { name "jump_delta_x_table_minus_one"; addr $9A1B; comment "1-indexed..."; };
+label { name "jump_delta_y_table_minus_one"; addr $9A31; comment "1-indexed..."; };
+label { name "is_jump_done"; addr $99AE; comment "$15 aka 21 frames?"; };
range { name "gameboard_dlist_data"; start $9B62; end $9b71; type bytetable; comment "this isn't used as-is for a display list, see setup_gameboard_dlist"; };
RANGE { NAME "cartstart_left"; START $BFFA; END $BFFB ; TYPE AddrTable; comment "main entry point, note cartstart_left and cartstart_right point to the same address"; };
RANGE { NAME "cartstart_right"; START $9FFA; END $9FFB ; TYPE AddrTable; comment "main entry point, note cartstart_left and cartstart_right point to the same address"; };
@@ -99,7 +105,10 @@ label { name "save_collisions"; addr $8503; comment "save contents of GTIA colli
label { name "check_collisions_1"; addr $8F73; size 1; comment "did any missile hit a player, or did players 2 or 3 hit a player..."; };
label { name "check_collisions_2"; addr $981A; size 1; comment "did player 0 or 1 hit the playfield..."; };
-label { name "check_collisions_3"; addr $9832; size 1; comment "did player 0 or 1 hit the playfield..."; };
+label { name "check_collisions_3"; addr $9832; size 1; comment "movement/jumping only allowed if player's touching the playfield"; };
+label { name "mid_jump"; addr $99A8; size 1; comment "check & see if we're done jumping"; };
+label { name "continue_jump"; addr $99BD; size 1; comment "we're in mid-jump and didn't hit anything, keep going"; };
+label { name "end_jump"; addr $99B2; size 1; comment "we hit a girder/rope/ladder in mid-jump, or else the jump finished without hitting anything(?). this does not (?) include the bottom of the level"; };
label { name "collision_save"; addr $06B0; size 16; comment "save_collisions copies GTIA collision regs $D000-$d00f here"; };
label { name "init_next_level"; addr $9BE8; size 1; comment "..."; };
label { name "show_get_ready_prompt"; addr $9624; size 1; comment "only in multiplayer games"; };
@@ -192,7 +201,7 @@ label { name "sfx_slot_duration"; addr $0646; size 1; };
label { name "sfx_play_note"; addr $8206; size 1; comment "y==0, a>=4 on entry"; };
label { name "sfx_play_rest"; addr $819E; size 1; comment "y==0 on entry"; };
label { name "sfx_change_tempo"; addr $81AE; size 1; comment "y==0 on entry"; };
-label { name "sfx_jump"; addr $81C8; size 1; comment "I *think* this jumps to a different sfx address..."; };
+label { name "sfx_jump_opcode"; addr $81C8; size 1; comment "I *think* this jumps to a different sfx address..."; };
label { name "sfx_slot_freq"; addr $0647; size 1; };
range { name "sfx00"; start $BDF2; end $BE24; type bytetable; };
@@ -208,7 +217,7 @@ range { name "sfx08"; start $BF4A; end $BF5F; type bytetable; comment "end level
range { name "sfx09"; start $BF60; end $BF83; type bytetable; comment "end level tune #3, melody"; };
range { name "sfx10"; start $BF84; end $BFA5; type bytetable; comment "end level tune #4, melody"; };
range { name "sfx11"; start $BFA6; end $BFBD; type bytetable; comment "end level tune #4, bass"; };
-range { name "sfx12"; start $BFBE; end $BFCF; type bytetable; comment "jumping sound"; };
+range { name "sfx_jump"; start $BFBE; end $BFCF; type bytetable; comment "jumping sound"; };
range { name "sfx13"; start $BFD0; end $BFE9; type bytetable; comment "funeral march melody"; };
range { name "sfx14"; start $BFEA; end $BFF9; type bytetable; comment "funeral march bass"; };
range { name "sfx15"; start $BABC; end $BAE9; type bytetable; comment "level intro music, melody"; };
@@ -241,8 +250,12 @@ range { name "total_score_msg"; start $bdd2; end $bdf1; type bytetable; comment
range { name "zero_filler_8588"; start $B588; end $B696; type bytetable; };
range { name "wind_table_1"; start $B76B; end $b7bf; type bytetable; comment "used in level11"; };
label { name "wind_table_2"; addr $b771; };
+label { name "electrocution_done"; addr $A4DD; comment "turn off electrocution effect (?)"; };
+label { name "electrocute"; addr $A509; comment "electrocution effect"; };
+label { name "level02_collisions"; addr $A53D; comment "skip a couple of the collision regs, so we don't register a collision when Jumpman is being electrocuted"; };
+label { name "start_jump"; addr $99A0; comment "start jumping, play sfx_jump"; };
range { name "level00_map"; start $A300; end $a497; type bytetable; comment "level map data starts here"; };
-range { name "sfx_a52d"; start $A52D; end $A53C; type bytetable; comment "dunno, referenced by routine at $A50F"; };
+range { name "sfx_electrocution"; start $A52D; end $A53C; type bytetable; };
range { name "data_table_a542"; start $A542; end $A68B; type bytetable; comment "dunno, referenced by routine at $A498"; };
range { name "dumbwaiter_player"; start $a782; end $A826; type bytetable; comment "the dumbwaiters from level02. stored upside-down."; };
label { name "dw_platform_player"; addr $A685; comment "horizontally moving platforms from level02"; };
@@ -300,6 +313,7 @@ label { name "cue_music_jv"; addr $8018; comment "setup to play whichever music
label { name "cue_sfx_jv"; addr $8006; comment "setup to play sfx"; };
label { name "cue_sfx"; addr $8255; comment "setup to play sfx at *sfx_ptr, tempo (?) A"; };
label { name "cue_sfx_lowprior"; addr $8240; comment "if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A"; };
+label { name "cue_sfx_lowprior_jv"; addr $8003; comment "if cue_sfx not already in progress, setup to play sfx at (sfx_slot_tempo, sfx_lock) tempo (?) A"; };
label { name "sfx_ptr"; addr $063C; size 2; };
label { name "cue_ok"; addr $8244; size 1; };
label { name "cue_done"; addr $8278; size 1; };
@@ -385,7 +399,7 @@ label { name "check_trigger_state"; addr $984D; size 1; comment "did user press
label { name "trig_jmp"; addr $9852; size 1; comment "yes, jump to handler"; };
label { name "check_up_down"; addr $9855; size 1; comment "did user move joystick up/down?"; };
label { name "check_up_down_2"; addr $993B; size 1; comment "did user move joystick up/down?"; };
-label { name "trigger_handler"; addr $9985; size 1; comment "handle trigger presses (maybe start a jump)"; };
+label { name "trigger_handler"; addr $9985; size 1; comment "handle trigger presses, maybe start a jump, if player is moving up, left, or right"; };
label { name "cud_jmp"; addr $9860; size 1; comment "no, jump over handler"; };
label { name "player_delta_x"; addr $0630; size 1; comment "amount to move jumpman this frame (1 or $FF aka -1)"; };
label { name "player_delta_y"; addr $0631; size 1; comment "amount to move jumpman this frame (1 or $FF aka -1)"; };
diff --git a/mklevelinfo.pl b/mklevelinfo.pl
index e94c6fa..376651f 100644
--- a/mklevelinfo.pl
+++ b/mklevelinfo.pl
@@ -21,7 +21,7 @@
28 => [ 2, 'unkn_table1', 'unknown, pointer to a ROM table or $0000' ],
30 => [ 2, 'offs', 'always $0000' ],
32 => [ 2, 'sub_bomb', 'called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine' ],
- 34 => [ 2, 'sub5', '$06E6 for some levels, or else a ROM subroutine' ],
+ 34 => [ 2, 'sub_start', 'called at start of level, $06E6 for some levels, or else a ROM subroutine' ],
36 => [ 2, 'sub6', 'always $9740 aka game_main_loop' ],
38 => [ 2, 'sub_eol', 'called at end of level (all bombs picked up). $06E6 for all but level07' ],
40 => [ 6, 'offs', 'all zeroes' ],