aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-09-04 04:11:55 -0400
committerB. Watson <yalhcru@gmail.com>2016-09-04 04:11:55 -0400
commit6b03cf989c7065c6700030c18e51132cf57025f1 (patch)
treece939a0853755399f03bb88c1653a4265ab62b29
parent15654445f07224e108d05369cc25ad592d752240 (diff)
downloadjumpmanjr-6b03cf989c7065c6700030c18e51132cf57025f1.tar.gz
title screen, hurricane, couple more jiffy timers
-rw-r--r--jumpmanjr.dasm233
-rw-r--r--jumpmanjr.info44
-rw-r--r--main.info44
3 files changed, 215 insertions, 106 deletions
diff --git a/jumpmanjr.dasm b/jumpmanjr.dasm
index 7f48485..b7b5d22 100644
--- a/jumpmanjr.dasm
+++ b/jumpmanjr.dasm
@@ -1,5 +1,5 @@
; da65 V2.15 - Git 104f898
-; Created: 2016-09-03 20:29:55
+; Created: 2016-09-04 04:07:57
; Input file: jumpmanjr.rom
; Page: 1
@@ -11,6 +11,7 @@ L0000 := $0000
dm_ypos := $0054 ; see draw_map and level_maps.txt
dm_xpos := $0055 ; see draw_map and level_maps.txt
SAVMSC := $0058 ; OS's idea of the start of screen memory [redundant to set here?]
+jiffy_timer_3_hi:= $00A2 ; gets incremented every time 3_lo wraps around to zero
zp_temp2 := $00AE ; used for (zp,y) addressing, also 2 temps for scores_screen
bomb_idx := $00B2 ; bomb that was just picked up (times 2, suitable for index into a table of words)
blistptr := $00B4 ; bomb_pickup: points to current level's bomblist
@@ -48,13 +49,15 @@ COLOR4 := $02C8
CHBAS := $02F4
page6_vectors_minus_one:= $05FF ; 1-indexed
page6_vectors := $0600 ; initialized with page6_initial_vectors
+jiffy_timer_3_lo:= $0619 ; gets incremented every frame
jiffy_timer_1 := $061A ; gets incremented every frame
jiffy_timer_2 := $061B ; gets incremented every frame
+odd_frame_flag := $061C ; a 1-bit frame counter (toggles every frame). possibly unused.
speed_jiffy_timer:= $061E ; counts 0..initial_speed
falling_flag := $0621 ; 1 = falling, reset to 0 when jumpman hits the ground
current_speed := $0624 ; can be modified, e.g. set to $08 when being electrocuted
initial_speed := $0625 ; current user's chosen speed, set at game start
-bonus_jiffy_timer:= $0626 ; gets incremented every frame when playing a level, bonus-=100 when this reaches 0
+bonus_jiffy_timer:= $0626 ; gets incremented every frame when playing a level, bonus-=100 when this wraps around to 0
playing_level := $0627 ; 0 = not playing, non-0 = playing
sfx_lock := $062F ; lets other code know cue_sfx is still running? not 100% sure
player_delta_x := $0630 ; amount to move jumpman this frame (1 or $FF aka -1)
@@ -949,15 +952,15 @@ update_color_regs:
sta GRAFM,x ; 8412 9D 11 D0 ...
dex ; 8415 CA .
bne update_color_regs ; 8416 D0 F7 ..
- inc $0619 ; 8418 EE 19 06 ...
- bne L841F ; 841B D0 02 ..
- inc $A2 ; 841D E6 A2 ..
-L841F: inc jiffy_timer_1 ; 841F EE 1A 06 ...
+ inc jiffy_timer_3_lo ; 8418 EE 19 06 ...
+ bne no_wrap ; 841B D0 02 ..
+ inc jiffy_timer_3_hi ; 841D E6 A2 ..
+no_wrap:inc jiffy_timer_1 ; 841F EE 1A 06 ...
inc jiffy_timer_2 ; 8422 EE 1B 06 ...
- inc $061C ; 8425 EE 1C 06 ...
- lda $061C ; 8428 AD 1C 06 ...
+ inc odd_frame_flag ; 8425 EE 1C 06 ...
+ lda odd_frame_flag ; 8428 AD 1C 06 ...
and #$01 ; 842B 29 01 ).
- sta $061C ; 842D 8D 1C 06 ...
+ sta odd_frame_flag ; 842D 8D 1C 06 ...
lda #$00 ; 8430 A9 00 ..
sta falling_flag ; 8432 8D 21 06 .!.
sta $0622 ; 8435 8D 22 06 .".
@@ -993,7 +996,7 @@ L847E: lda playing_level ; 847E AD 27 06
bne no_dec_bonus ; 8486 D0 03 ..
jsr decrement_time_bonus_jv ; 8488 20 21 80 !.
no_dec_bonus:
- lda $0619 ; 848B AD 19 06 ...
+ lda jiffy_timer_3_lo ; 848B AD 19 06 ...
and #$07 ; 848E 29 07 ).
bne check_joystick_enabled ; 8490 D0 12 ..
inc $0628 ; 8492 EE 28 06 .(.
@@ -1612,19 +1615,19 @@ check_consol:
; ----------------------------------------------------------------------------
L88DC: lda #$00 ; 88DC A9 00 ..
- sta $A2 ; 88DE 85 A2 ..
+ sta jiffy_timer_3_hi ; 88DE 85 A2 ..
L88E0: lda $A0 ; 88E0 A5 A0 ..
bne L88E7 ; 88E2 D0 03 ..
- sta $A2 ; 88E4 85 A2 ..
+ sta jiffy_timer_3_hi ; 88E4 85 A2 ..
L88E6: rts ; 88E6 60 `
; ----------------------------------------------------------------------------
-L88E7: lda $A2 ; 88E7 A5 A2 ..
+L88E7: lda jiffy_timer_3_hi ; 88E7 A5 A2 ..
cmp #$28 ; 88E9 C9 28 .(
bcc L88E6 ; 88EB 90 F9 ..
lda #$00 ; 88ED A9 00 ..
sta $A0 ; 88EF 85 A0 ..
- sta $A2 ; 88F1 85 A2 ..
+ sta jiffy_timer_3_hi ; 88F1 85 A2 ..
ldx #$FF ; 88F3 A2 FF ..
txs ; 88F5 9A .
jmp init_game ; 88F6 4C 00 90 L..
@@ -2703,7 +2706,7 @@ copy_title_screen:
sta AUDC1 ; 9057 8D 01 D2 ...
lda #$ED ; 905A A9 ED ..
sta dli_vec_shadow_lo ; 905C 8D AE 06 ...
-; set work_level_sub0 to title_screen_color_snd
+; set work_level_sub0 to fade_in_letters
ts_setup_sub0:
lda #$92 ; 905F A9 92 ..
sta dli_vec_shadow_hi ; 9061 8D AF 06 ...
@@ -2711,11 +2714,11 @@ ts_setup_sub0:
sta work_level_sub0 ; 9066 8D 82 07 ...
lda #$91 ; 9069 A9 91 ..
sta work_level_sub0+1 ; 906B 8D 83 07 ...
-; some ISR is writing to $9c...
-wait_until_9c_is_0e:
+; fade_in_letters increments $9c after every letter, $0e means they're all done (since there are 14 of them and we start counting at zero)
+wait_letters_done:
lda $9C ; 906E A5 9C ..
cmp #$0E ; 9070 C9 0E ..
- bne wait_until_9c_is_0e ; 9072 D0 FA ..
+ bne wait_letters_done ; 9072 D0 FA ..
lda #$E6 ; 9074 A9 E6 ..
sta work_level_sub0 ; 9076 8D 82 07 ...
lda #$06 ; 9079 A9 06 ..
@@ -2745,6 +2748,8 @@ wait_until_9c_is_0e:
sta $9D ; 90B6 85 9D ..
lda #$07 ; 90B8 A9 07 ..
sta $B9 ; 90BA 85 B9 ..
+; set _sub0 to title_dancing
+start_dancing:
lda #$72 ; 90BC A9 72 .r
sta work_level_sub0 ; 90BE 8D 82 07 ...
lda #$91 ; 90C1 A9 91 ..
@@ -2811,20 +2816,24 @@ replacement_block_char_minus_one:= * + 2 ; 1-indexed...
replacement_block_char:
.byte $BF,$BF,$CF,$EF,$E7,$DB,$D9,$BF ; 9134 BF BF CF EF E7 DB D9 BF ........
; ----------------------------------------------------------------------------
-; rotate colors and play the descending tone as the letters appear on the title screen
-title_screen_color_snd:
+; rotate colors and play the descending tone as each letter appears on the title screen. called once per frame, uses $9c to keep track of letter. caller stops this routine being called when $9c holds $0e (meaning the last letter is done).
+fade_in_letters:
lda $062A ; 913C AD 2A 06 .*.
sta COLOR0 ; 913F 8D C4 02 ...
ldy $9C ; 9142 A4 9C ..
+; don't 'fade-in' the space in the title (offset 7)
+skip_space:
cpy #$07 ; 9144 C0 07 ..
- beq L9164 ; 9146 F0 1C ..
+ beq turn_letter_white ; 9146 F0 1C ..
clc ; 9148 18 .
lda $9D ; 9149 A5 9D ..
adc #$04 ; 914B 69 04 i.
sta $9D ; 914D 85 9D ..
- beq L9164 ; 914F F0 13 ..
+ beq turn_letter_white ; 914F F0 13 ..
sta AUDF1 ; 9151 8D 00 D2 ...
-L9154: lsr a ; 9154 4A J
+; the luminance stays the same
+rotate_hue:
+ lsr a ; 9154 4A J
lsr a ; 9155 4A J
lsr a ; 9156 4A J
lsr a ; 9157 4A J
@@ -2837,14 +2846,18 @@ show_letter:
rts ; 9163 60 `
; ----------------------------------------------------------------------------
-L9164: lda $3045,y ; 9164 B9 45 30 .E0
+; clear the high 2 bits on the letter, in screen memory
+turn_letter_white:
+ lda $3045,y ; 9164 B9 45 30 .E0
and #$3F ; 9167 29 3F )?
sta $3045,y ; 9169 99 45 30 .E0
inc $9C ; 916C E6 9C ..
iny ; 916E C8 .
- jmp L9154 ; 916F 4C 54 91 LT.
+ jmp rotate_hue ; 916F 4C 54 91 LT.
; ----------------------------------------------------------------------------
+; make jumpmen dance on title screen, called once/frame
+title_dancing:
lda $062A ; 9172 AD 2A 06 .*.
sta COLOR0 ; 9175 8D C4 02 ...
lda $9C ; 9178 A5 9C ..
@@ -2932,6 +2945,8 @@ L92C8: .byte $08,$09,$08,$09,$0C,$0D,$0C,$0D ; 92C8 08 09 08 09 0C 0D 0C 0D
L92E8: .byte $07,$00,$00,$02,$03,$48,$A9,$94 ; 92E8 07 00 00 02 03 48 A9 94 .....H..
.byte $8D,$0A,$D4,$8D,$18,$D0,$A9,$CA ; 92F0 8D 0A D4 8D 18 D0 A9 CA ........
.byte $8D,$17,$D0,$68,$40,$00,$00,$00 ; 92F8 8D 17 D0 68 40 00 00 00 ...h@...
+; title screen music. only use of 4-part harmony in the game, this and _v1 _v2 _v3.
+sfx_title_v0:
.byte $01,$A0,$02,$0A,$80,$01,$A5,$02 ; 9300 01 A0 02 0A 80 01 A5 02 ........
.byte $3C,$20,$79,$20,$51,$20,$5B,$08 ; 9308 3C 20 79 20 51 20 5B 08 < y Q [.
.byte $60,$08,$6C,$08,$5B,$08,$60,$10 ; 9310 60 08 6C 08 5B 08 60 10 `.l.[.`.
@@ -2942,28 +2957,34 @@ L92E8: .byte $07,$00,$00,$02,$03,$48,$A9,$94 ; 92E8 07 00 00 02 03 48 A9 94
.byte $60,$08,$51,$08,$79,$20,$79,$08 ; 9338 60 08 51 08 79 20 79 08 `.Q.y y.
.byte $6C,$08,$60,$08,$5B,$08,$51,$08 ; 9340 6C 08 60 08 5B 08 51 08 l.`.[.Q.
.byte $48,$08,$40,$08,$51,$08,$3C,$40 ; 9348 48 08 40 08 51 08 3C 40 H.@.Q.<@
- .byte $00,$01,$A0,$02,$0A,$60,$01,$A3 ; 9350 00 01 A0 02 0A 60 01 A3 .....`..
- .byte $02,$51,$40,$79,$10,$A2,$10,$79 ; 9358 02 51 40 79 10 A2 10 79 .Q@y...y
- .byte $10,$6C,$10,$79,$08,$A2,$08,$F3 ; 9360 10 6C 10 79 08 A2 08 F3 .l.y....
- .byte $10,$F3,$20,$79,$08,$A2,$08,$F3 ; 9368 10 F3 20 79 08 A2 08 F3 .. y....
- .byte $10,$A2,$10,$79,$10,$A2,$20,$F3 ; 9370 10 A2 10 79 10 A2 20 F3 ...y.. .
- .byte $20,$79,$10,$A2,$10,$79,$10,$A2 ; 9378 20 79 10 A2 10 79 10 A2 y...y..
- .byte $10,$79,$10,$A2,$10,$F3,$10,$F3 ; 9380 10 79 10 A2 10 F3 10 F3 .y......
- .byte $10,$F3,$08,$D9,$08,$C1,$08,$B6 ; 9388 10 F3 08 D9 08 C1 08 B6 ........
- .byte $08,$A2,$08,$90,$08,$80,$08,$A2 ; 9390 08 A2 08 90 08 80 08 A2 ........
- .byte $08,$79,$40,$00,$01,$A0,$02,$0A ; 9398 08 79 40 00 01 A0 02 0A .y@.....
- .byte $40,$01,$A4,$02,$60,$60,$01,$A0 ; 93A0 40 01 A4 02 60 60 01 A0 @...``..
- .byte $02,$0A,$10,$01,$A3,$02,$F3,$20 ; 93A8 02 0A 10 01 A3 02 F3 20 .......
- .byte $A2,$30,$A2,$10,$C1,$10,$02,$A6 ; 93B0 A2 30 A2 10 C1 10 02 A6 .0......
- .byte $93,$01,$01,$A0,$02,$0A,$10,$01 ; 93B8 93 01 01 A0 02 0A 10 01 ........
- .byte $A3,$02,$A2,$20,$A2,$20,$F3,$30 ; 93C0 A3 02 A2 20 A2 20 F3 30 ... . .0
- .byte $01,$A0,$02,$0A,$40,$01,$A4,$02 ; 93C8 01 A0 02 0A 40 01 A4 02 ....@...
- .byte $79,$10,$A2,$10,$F3,$20,$00,$01 ; 93D0 79 10 A2 10 F3 20 00 01 y.... ..
- .byte $A0,$02,$0A,$20,$01,$A4,$02,$79 ; 93D8 A0 02 0A 20 01 A4 02 79 ... ...y
- .byte $78,$01,$A0,$02,$0A,$FF,$0A,$FF ; 93E0 78 01 A0 02 0A FF 0A FF x.......
- .byte $0A,$40,$00,$00,$00,$00,$00,$00 ; 93E8 0A 40 00 00 00 00 00 00 .@......
- .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 93F0 00 00 00 00 00 00 00 00 ........
- .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 93F8 00 00 00 00 00 00 00 00 ........
+ .byte $00 ; 9350 00 .
+sfx_title_v1:
+ .byte $01,$A0,$02,$0A,$60,$01,$A3,$02 ; 9351 01 A0 02 0A 60 01 A3 02 ....`...
+ .byte $51,$40,$79,$10,$A2,$10,$79,$10 ; 9359 51 40 79 10 A2 10 79 10 Q@y...y.
+ .byte $6C,$10,$79,$08,$A2,$08,$F3,$10 ; 9361 6C 10 79 08 A2 08 F3 10 l.y.....
+ .byte $F3,$20,$79,$08,$A2,$08,$F3,$10 ; 9369 F3 20 79 08 A2 08 F3 10 . y.....
+ .byte $A2,$10,$79,$10,$A2,$20,$F3,$20 ; 9371 A2 10 79 10 A2 20 F3 20 ..y.. .
+ .byte $79,$10,$A2,$10,$79,$10,$A2,$10 ; 9379 79 10 A2 10 79 10 A2 10 y...y...
+ .byte $79,$10,$A2,$10,$F3,$10,$F3,$10 ; 9381 79 10 A2 10 F3 10 F3 10 y.......
+ .byte $F3,$08,$D9,$08,$C1,$08,$B6,$08 ; 9389 F3 08 D9 08 C1 08 B6 08 ........
+ .byte $A2,$08,$90,$08,$80,$08,$A2,$08 ; 9391 A2 08 90 08 80 08 A2 08 ........
+ .byte $79,$40,$00 ; 9399 79 40 00 y@.
+sfx_title_v2:
+ .byte $01,$A0,$02,$0A,$40,$01,$A4,$02 ; 939C 01 A0 02 0A 40 01 A4 02 ....@...
+ .byte $60,$60,$01,$A0,$02,$0A,$10,$01 ; 93A4 60 60 01 A0 02 0A 10 01 ``......
+ .byte $A3,$02,$F3,$20,$A2,$30,$A2,$10 ; 93AC A3 02 F3 20 A2 30 A2 10 ... .0..
+ .byte $C1,$10,$02,$A6,$93,$01,$01,$A0 ; 93B4 C1 10 02 A6 93 01 01 A0 ........
+ .byte $02,$0A,$10,$01,$A3,$02,$A2,$20 ; 93BC 02 0A 10 01 A3 02 A2 20 .......
+ .byte $A2,$20,$F3,$30,$01,$A0,$02,$0A ; 93C4 A2 20 F3 30 01 A0 02 0A . .0....
+ .byte $40,$01,$A4,$02,$79,$10,$A2,$10 ; 93CC 40 01 A4 02 79 10 A2 10 @...y...
+ .byte $F3,$20,$00 ; 93D4 F3 20 00 . .
+sfx_title_v3:
+ .byte $01,$A0,$02,$0A,$20,$01,$A4,$02 ; 93D7 01 A0 02 0A 20 01 A4 02 .... ...
+ .byte $79,$78,$01,$A0,$02,$0A,$FF,$0A ; 93DF 79 78 01 A0 02 0A FF 0A yx......
+ .byte $FF,$0A,$40,$00,$00,$00,$00,$00 ; 93E7 FF 0A 40 00 00 00 00 00 ..@.....
+ .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 93EF 00 00 00 00 00 00 00 00 ........
+ .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 93F7 00 00 00 00 00 00 00 00 ........
+ .byte $00 ; 93FF 00 .
; ----------------------------------------------------------------------------
ask_num_players:
ldx #$FF ; 9400 A2 FF ..
@@ -5943,7 +5964,7 @@ l04_bombs_term:
.byte $FF ; A826 FF .
; ----------------------------------------------------------------------------
hellstones_sub3:
- lda $0619 ; A827 AD 19 06 ...
+ lda jiffy_timer_3_lo ; A827 AD 19 06 ...
asl a ; A82A 0A .
asl a ; A82B 0A .
asl a ; A82C 0A .
@@ -6834,7 +6855,7 @@ portal_y:
.byte $20,$20,$98,$C0,$B4,$80,$68,$40 ; B2D8 20 20 98 C0 B4 80 68 40 ....h@
; ----------------------------------------------------------------------------
herethere_sub3:
- lda $0619 ; B2E0 AD 19 06 ...
+ lda jiffy_timer_3_lo ; B2E0 AD 19 06 ...
and #$0F ; B2E3 29 0F ).
bne LB2F2 ; B2E5 D0 0B ..
lda $068A ; B2E7 AD 8A 06 ...
@@ -7080,12 +7101,15 @@ l12_unkn0:
; ----------------------------------------------------------------------------
hurr_sub0:
lda falling_flag ; B691 AD 21 06 .!.
- bne LB697 ; B694 D0 01 ..
+ bne falling_wind ; B694 D0 01 ..
rts ; B696 60 `
; ----------------------------------------------------------------------------
-LB697: inc player_x_pos ; B697 EE 7E 06 .~.
-LB69A: rts ; B69A 60 `
+; wind blows jumpman to the right when he's dying
+falling_wind:
+ inc player_x_pos ; B697 EE 7E 06 .~.
+hurr_done:
+ rts ; B69A 60 `
; ----------------------------------------------------------------------------
hurr_sub1:
@@ -7096,7 +7120,7 @@ hurr_sub1:
cmp #$02 ; B6A5 C9 02 ..
bne LB6BA ; B6A7 D0 11 ..
LB6A9: lda $0768 ; B6A9 AD 68 07 .h.
- bne LB69A ; B6AC D0 EC ..
+ bne hurr_done ; B6AC D0 EC ..
inc $0768 ; B6AE EE 68 07 .h.
lda #$00 ; B6B1 A9 00 ..
sta AUDC1 ; B6B3 8D 01 D2 ...
@@ -7265,9 +7289,10 @@ add_life_bonus:
lda score+1 ; B844 AD 01 07 ...
adc $A5 ; B847 65 A5 e.
sta score+1 ; B849 8D 01 07 ...
- bcc LB851 ; B84C 90 03 ..
+ bcc el_hi_ok ; B84C 90 03 ..
inc score+2 ; B84E EE 02 07 ...
-LB851: clc ; B851 18 .
+el_hi_ok:
+ clc ; B851 18 .
lda work_level_time_bonus ; B852 AD 91 07 ...
adc $A4 ; B855 65 A4 e.
sta work_level_time_bonus ; B857 8D 91 07 ...
@@ -7283,21 +7308,25 @@ play_life_bonus_sfx:
lda #$B8 ; B86D A9 B8 ..
sta sfx_ptr+1 ; B86F 8D 3D 06 .=.
jsr cue_sfx_jv ; B872 20 06 80 ..
-LB875: lda sfx_slot_duration ; B875 AD 46 06 .F.
+; wait for sfx to finish
+el_wait_sfx:
+ lda sfx_slot_duration ; B875 AD 46 06 .F.
ora $0644 ; B878 0D 44 06 .D.
- bne LB875 ; B87B D0 F8 ..
+ bne el_wait_sfx ; B87B D0 F8 ..
dec $A6 ; B87D C6 A6 ..
bne add_life_bonus ; B87F D0 BA ..
sta jiffy_timer_1 ; B881 8D 1A 06 ...
-LB884: lda jiffy_timer_1 ; B884 AD 1A 06 ...
+; wait approx 1/2 sec
+el_delay:
+ lda jiffy_timer_1 ; B884 AD 1A 06 ...
cmp #$20 ; B887 C9 20 .
- bne LB884 ; B889 D0 F9 ..
+ bne el_delay ; B889 D0 F9 ..
lda randomizer_mode ; B88B AD F3 06 ...
- bne LB893 ; B88E D0 03 ..
+ bne el_done ; B88E D0 03 ..
jmp L8DA0 ; B890 4C A0 8D L..
; ----------------------------------------------------------------------------
-LB893: jmp afterlife ; B893 4C 00 96 L..
+el_done:jmp afterlife ; B893 4C 00 96 L..
; ----------------------------------------------------------------------------
; played when adding bonus per life at end of level
@@ -7340,11 +7369,11 @@ zero_filler_b8bf:
demo_mode:
lda #$00 ; B96B A9 00 ..
sta jiffy_timer_1 ; B96D 8D 1A 06 ...
-; actually 64 jiffies, 1.067S ntsc, 1.28s pal
-wait_1_sec_2:
+; 96 jiffies, 1.6s ntsc, 1.92s pal
+demo_wait:
lda jiffy_timer_1 ; B970 AD 1A 06 ...
cmp #$60 ; B973 C9 60 .`
- bne wait_1_sec_2 ; B975 D0 F9 ..
+ bne demo_wait ; B975 D0 F9 ..
lda #$00 ; B977 A9 00 ..
sta FR1 ; B979 85 E0 ..
lda #$00 ; B97B A9 00 ..
@@ -7362,7 +7391,9 @@ wait_1_sec_2:
nop ; B99A EA .
nop ; B99B EA .
nop ; B99C EA .
-LB99D: ldy #$16 ; B99D A0 16 ..
+; initially, FR1 points to $A000 (start of level descriptions), Y is $16, or offset to _map0 within level desc.
+demo_show_map:
+ ldy #$16 ; B99D A0 16 ..
lda (FR1),y ; B99F B1 E0 ..
sta dm_progctr ; B9A1 85 C0 ..
iny ; B9A3 C8 .
@@ -7370,41 +7401,47 @@ LB99D: ldy #$16 ; B99D A0 16
sta dm_progctr+1 ; B9A6 85 C1 ..
ldy FR1+2 ; B9A8 A4 E2 ..
ldx #$00 ; B9AA A2 00 ..
-LB9AC: lda level_names,y ; B9AC B9 00 BB ...
+demo_show_name:
+ lda level_names,y ; B9AC B9 00 BB ...
sec ; B9AF 38 8
sbc #$20 ; B9B0 E9 20 .
sta $3DE8,x ; B9B2 9D E8 3D ..=
iny ; B9B5 C8 .
inx ; B9B6 E8 .
cpx #$14 ; B9B7 E0 14 ..
- bne LB9AC ; B9B9 D0 F1 ..
- jsr LB9EC ; B9BB 20 EC B9 ..
+ bne demo_show_name ; B9B9 D0 F1 ..
+ jsr demo_set_colors ; B9BB 20 EC B9 ..
lda #$00 ; B9BE A9 00 ..
sta jiffy_timer_1 ; B9C0 8D 1A 06 ...
jsr draw_map_jv ; B9C3 20 00 80 ..
-LB9C6: lda jiffy_timer_1 ; B9C6 AD 1A 06 ...
+; approx 2/3 sec
+demo_wait_1:
+ lda jiffy_timer_1 ; B9C6 AD 1A 06 ...
cmp #$40 ; B9C9 C9 40 .@
- bne LB9C6 ; B9CB D0 F9 ..
+ bne demo_wait_1 ; B9CB D0 F9 ..
jsr clear_screen_mem_jv ; B9CD 20 1E 80 ..
clc ; B9D0 18 .
lda FR1+2 ; B9D1 A5 E2 ..
adc #$14 ; B9D3 69 14 i.
sta FR1+2 ; B9D5 85 E2 ..
cmp #$F0 ; B9D7 C9 F0 ..
- bne LB9DE ; B9D9 D0 03 ..
+ bne demo_next_map ; B9D9 D0 03 ..
jmp reinit_game ; B9DB 4C 0C 90 L..
; ----------------------------------------------------------------------------
-LB9DE: clc ; B9DE 18 .
+demo_next_map:
+ clc ; B9DE 18 .
lda FR1 ; B9DF A5 E0 ..
adc #$40 ; B9E1 69 40 i@
sta FR1 ; B9E3 85 E0 ..
- bcc LB99D ; B9E5 90 B6 ..
+ bcc demo_show_map ; B9E5 90 B6 ..
inc FR1+1 ; B9E7 E6 E1 ..
- jmp LB99D ; B9E9 4C 9D B9 L..
+ jmp demo_show_map ; B9E9 4C 9D B9 L..
; ----------------------------------------------------------------------------
-LB9EC: ldy #$2F ; B9EC A0 2F ./
+; FR1 points to levelXX_desc
+demo_set_colors:
+ ldy #$2F ; B9EC A0 2F ./
lda (FR1),y ; B9EE B1 E0 ..
sta COLOR0 ; B9F0 8D C4 02 ...
iny ; B9F3 C8 .
@@ -7592,14 +7629,18 @@ setup_dli_2:
lda #$8D ; BC49 A9 8D ..
sta $0809 ; BC4B 8D 09 08 ...
sta $088A ; BC4E 8D 8A 08 ...
-LBC51: lda dli_vec_shadow_hi ; BC51 AD AF 06 ...
- bne LBC51 ; BC54 D0 FB ..
+; wait until the dli has been set up (by vblank)
+wd_wait_dli:
+ lda dli_vec_shadow_hi ; BC51 AD AF 06 ...
+ bne wd_wait_dli ; BC54 D0 FB ..
lda #$96 ; BC56 A9 96 ..
sta COLOR0 ; BC58 8D C4 02 ...
sta jiffy_timer_1 ; BC5B 8D 1A 06 ...
-LBC5E: lda jiffy_timer_1 ; BC5E AD 1A 06 ...
+; wait 32 jiffies (approx 1/2 sec)
+wd_wait_32j:
+ lda jiffy_timer_1 ; BC5E AD 1A 06 ...
cmp #$20 ; BC61 C9 20 .
- bne LBC5E ; BC63 D0 F9 ..
+ bne wd_wait_32j ; BC63 D0 F9 ..
lda #$03 ; BC65 A9 03 ..
jsr cue_music_jv ; BC67 20 18 80 ..
lda #$CD ; BC6A A9 CD ..
@@ -7627,10 +7668,12 @@ wd_wait_scores:
sta $06AB ; BC9B 8D AB 06 ...
jsr setup_gameboard_dlist_jv ; BC9E 20 15 80 ..
ldx #$0B ; BCA1 A2 0B ..
-LBCA3: lda total_score_msg_minus_one,x ; BCA3 BD D1 BD ...
+; wait 32 jiffies (approx 1/2 sec)
+print_total_score_msg:
+ lda total_score_msg_minus_one,x ; BCA3 BD D1 BD ...
sta $3DE8,x ; BCA6 9D E8 3D ..=
dex ; BCA9 CA .
- bne LBCA3 ; BCAA D0 F7 ..
+ bne print_total_score_msg ; BCAA D0 F7 ..
lda #$3D ; BCAC A9 3D .=
sta num_out+1 ; BCAE 85 D4 ..
lda #$F5 ; BCB0 A9 F5 ..
@@ -7642,15 +7685,17 @@ wd_xxx: lda number_of_users,x ; BCB6 BD FF 06
dex ; BCBB CA .
bne wd_xxx ; BCBC D0 F8 ..
jsr print_number_jv ; BCBE 20 09 80 ..
-LBCC1: lda $0663 ; BCC1 AD 63 06 .c.
- bne LBCC1 ; BCC4 D0 FB ..
+; wait until music is done playing (not 100% sure though)
+wd_wait_music:
+ lda $0663 ; BCC1 AD 63 06 .c.
+ bne wd_wait_music ; BCC4 D0 FB ..
lda level ; BCC6 AD F6 06 ...
inc randomizer_mode ; BCC9 EE F3 06 ...
rts ; BCCC 60 `
; ----------------------------------------------------------------------------
-; dunno, but referenced by code at $BC6A (part of well_done_screen)
-code_bccd:
+; used in work_level_sub0 slot during well_doneused in work_level_sub1 slot during well_done
+well_done_sub0:
lda $062A ; BCCD AD 2A 06 .*.
sta COLOR2 ; BCD0 8D C6 02 ...
lda #$02 ; BCD3 A9 02 ..
@@ -7677,14 +7722,16 @@ well_done_map:
.byte $38,$05,$6C,$30,$09,$18,$1A,$03 ; BD49 38 05 6C 30 09 18 1A 03 8.l0....
.byte $FF ; BD51 FF .
; ----------------------------------------------------------------------------
-; referenced by code at $BC83
-code_bd52:
+; used in work_level_sub1 slot during well_doneused in work_level_sub1 slot during well_done
+well_done_sub1:
lda falling_flag ; BD52 AD 21 06 .!.
- bne LBD58 ; BD55 D0 01 ..
+ bne wds1_cont ; BD55 D0 01 ..
rts ; BD57 60 `
; ----------------------------------------------------------------------------
-LBD58: ldy dlist_shadow_lo ; BD58 AC AC 06 ...
+; we seem to be setting/clearing bit 7 in the display list, moving the line(s) where DLI(s) occur.
+wds1_cont:
+ ldy dlist_shadow_lo ; BD58 AC AC 06 ...
lda #$0D ; BD5B A9 0D ..
sta $0809,y ; BD5D 99 09 08 ...
lda #$8D ; BD60 A9 8D ..
@@ -7697,13 +7744,15 @@ LBD58: ldy dlist_shadow_lo ; BD58 AC AC 06
sta $080D,y ; BD72 99 0D 08 ...
inc dlist_shadow_lo ; BD75 EE AC 06 ...
cpy #$4E ; BD78 C0 4E .N
- beq LBD81 ; BD7A F0 05 ..
+ beq wds1_finish ; BD7A F0 05 ..
cpy #$CE ; BD7C C0 CE ..
- beq LBD81 ; BD7E F0 01 ..
+ beq wds1_finish ; BD7E F0 01 ..
rts ; BD80 60 `
; ----------------------------------------------------------------------------
-LBD81: lda #$E6 ; BD81 A9 E6 ..
+; set things up for the next level?
+wds1_finish:
+ lda #$E6 ; BD81 A9 E6 ..
sta work_level_sub1 ; BD83 8D 84 07 ...
lda #$06 ; BD86 A9 06 ..
sta work_level_sub1+1 ; BD88 8D 85 07 ...
diff --git a/jumpmanjr.info b/jumpmanjr.info
index d50c63a..94cef68 100644
--- a/jumpmanjr.info
+++ b/jumpmanjr.info
@@ -298,8 +298,8 @@ range { name "code_adb5"; start $ADB5; end $adc0; type code; };
range { name "code_adc1"; start $adc1; end $adc3; type code; };
label { name "replacement_block_char_minus_one"; addr $9133; comment "1-indexed..."; };
range { name "replacement_block_char"; start $9134; end $913b; type bytetable; };
-label { name "title_screen_color_snd"; addr $913c; comment "rotate colors and play the descending tone as the letters appear on the title screen"; };
-label { name "ts_setup_sub0"; addr $905f; comment "set work_level_sub0 to title_screen_color_snd"; };
+label { name "fade_in_letters"; addr $913c; comment "rotate colors and play the descending tone as each letter appears on the title screen. called once per frame, uses $9c to keep track of letter. caller stops this routine being called when $9c holds $0e (meaning the last letter is done)."; };
+label { name "ts_setup_sub0"; addr $905f; comment "set work_level_sub0 to fade_in_letters"; };
label { name "ts_clear_sub0"; addr $9114; comment "set work_level_sub0 to $06e6 (just an RTS)"; };
label { name "demo_mode"; addr $B96B; comment "display all the levels, happens if left idle at the title screen"; };
label { name "show_letter"; addr $9160; comment "$3000 is screen memory, at this point"; };
@@ -342,11 +342,14 @@ range { name "zero_filler_88be"; start $88BE; end $88C7; type bytetable; };
range { name "zero_filler_9bff"; start $9bff; end $9bff; type bytetable; };
range { name "zero_filler_8e67"; start $8e67; end $8e68; type bytetable; };
range { name "zero_filler_8dcd"; start $8dcd; end $8dcd; type bytetable; };
-range { name "code_bccd"; start $bccd; end $bcd8; type code; comment "dunno, but referenced by code at $BC6A (part of well_done_screen)"; };
range { name "well_done_map"; start $bcd9; end $bd51; type bytetable; comment "level map used for the WELL DONE screen, when you beat level 12"; };
label { name "well_done_scores"; addr $8D52; comment "well_done_screen jumps here via work_level_sub1"; };
label { name "wd_wait_scores"; addr $BC92; comment "wait for score screen to finish (I think, anyway)"; };
label { name "wd_xxx"; addr $BCB6; comment "display current user's score, number_of_users should be score-1 here."; };
+label { name "wd_wait_dli"; addr $BC51; comment "wait until the dli has been set up (by vblank)"; };
+label { name "wd_wait_32j"; addr $BC5E; comment "wait 32 jiffies (approx 1/2 sec)"; };
+label { name "wd_wait_music"; addr $BCC1; comment "wait until music is done playing (not 100% sure though)"; };
+label { name "print_total_score_msg"; addr $BCA3; comment "wait 32 jiffies (approx 1/2 sec)"; };
range { name "well_done_shape"; start $bda0; end $bdc6; type bytetable; comment "used to draw the large WELL DONE banner"; };
label { name "total_score_msg_minus_one"; addr $bdd1; comment "1-indexed"; };
label { name "dumbwaiter_sub0"; addr $A6BD; comment "gets called every frame"; };
@@ -466,6 +469,8 @@ range { name "l11_map_changes"; start $B3DC; end $b44b; type bytetable; };
label { name "hatch_bomb_sub"; addr $B44C; };
label { name "hurr_sub0"; addr $b691; };
+label { name "falling_wind"; addr $B697; comment "wind blows jumpman to the right when he's dying"; };
+label { name "hurr_done"; addr $B69A; };
label { name "hurr_sub1"; addr $b69b; };
label { name "hurr_sub2"; addr $B709; };
range { name "l12_map"; start $b590; end $b5d1; type bytetable; };
@@ -533,7 +538,20 @@ label { name "bullet_table_minus_one"; addr $8F42; comment "1-indexed"; };
label { name "falling_flag"; addr $0621; comment "1 = falling, reset to 0 when jumpman hits the ground"; };
label { name "jiffy_timer_1"; addr $061A; comment "gets incremented every frame"; };
label { name "jiffy_timer_2"; addr $061B; comment "gets incremented every frame"; };
-label { name "bonus_jiffy_timer"; addr $0626; comment "gets incremented every frame when playing a level, bonus-=100 when this reaches 0"; };
+label { name "jiffy_timer_3_lo"; addr $0619; comment "gets incremented every frame"; };
+label { name "jiffy_timer_3_hi"; addr $A2; comment "gets incremented every time 3_lo wraps around to zero"; };
+label { name "no_wrap"; addr $841F; };
+label { name "sfx_title_v0"; addr $9300; comment "title screen music. only use of 4-part harmony in the game, this and _v1 _v2 _v3."; };
+label { name "sfx_title_v1"; addr $9351; };
+label { name "sfx_title_v2"; addr $939C; };
+label { name "sfx_title_v3"; addr $93D7; };
+label { name "skip_space"; addr $9144; comment "don't 'fade-in' the space in the title (offset 7)"; };
+label { name "rotate_hue"; addr $9154; comment "the luminance stays the same"; };
+label { name "turn_letter_white"; addr $9164; comment "clear the high 2 bits on the letter, in screen memory"; };
+label { name "title_dancing"; addr $9172; comment "make jumpmen dance on title screen, called once/frame"; };
+label { name "start_dancing"; addr $90BC; comment "set _sub0 to title_dancing"; };
+label { name "odd_frame_flag"; addr $061C; comment "a 1-bit frame counter (toggles every frame). possibly unused."; };
+label { name "bonus_jiffy_timer"; addr $0626; comment "gets incremented every frame when playing a level, bonus-=100 when this wraps around to 0"; };
label { name "speed_jiffy_timer"; addr $061E; comment "counts 0..initial_speed"; };
label { name "playing_level"; addr $0627; comment "0 = not playing, non-0 = playing"; };
label { name "no_dec_bonus"; addr $848B; };
@@ -585,7 +603,7 @@ range { name "title_screen_data"; start $91cf; end $93ff; type bytetable; commen
label { name "title_screen_data_minus_one"; addr $91ce; };
label { name "copy_title_screen"; addr $902A; };
-label { name "wait_until_9c_is_0e"; addr $906E; comment "some ISR is writing to $9c..."; };
+label { name "wait_letters_done"; addr $906E; comment "fade_in_letters increments $9c after every letter, $0e means they're all done (since there are 14 of them and we start counting at zero)"; };
label { name "funky_init_loop"; addr $90C8; comment "lot going on here, not understood yet"; };
label { name "scores_screen"; addr $8B80; comment "show scores, called at end of game, also called after beating level 12 (after WELL DONE). $40 in NMIEN = disable DLI, enable VBI"; };
label { name "ss_loop"; addr $8BA8; comment "number_of_users should be score-1 here."; };
@@ -688,7 +706,12 @@ label { name "set_y"; addr $8F9B; size 1; comment "y = a * 5; // offset into mus
label { name "show_level_name"; addr $BA5D; size 1; comment "copy level name into screen RAM"; };
label { name "sync_to_music"; addr $BA71; size 1; comment "level is already drawn with all color regs set to black. for each color reg, wait 1 sec before turning it visible. this syncs up with the music because the music was written to sync with this actually"; };
label { name "wait_1_sec"; addr $BA9E; size 1; comment "actually 64 jiffies, 1.067S ntsc, 1.28s pal"; };
-label { name "wait_1_sec_2"; addr $B970; size 1; comment "actually 64 jiffies, 1.067S ntsc, 1.28s pal"; };
+label { name "demo_wait"; addr $B970; size 1; comment "96 jiffies, 1.6s ntsc, 1.92s pal"; };
+label { name "demo_show_map"; addr $B99D; size 1; comment "initially, FR1 points to $A000 (start of level descriptions), Y is $16, or offset to _map0 within level desc."; };
+label { name "demo_show_name"; addr $B9AC; };
+label { name "demo_next_map"; addr $B9DE; };
+label { name "demo_set_colors"; addr $B9EC; comment "FR1 points to levelXX_desc"; };
+label { name "demo_wait_1"; addr $B9C6; comment "approx 2/3 sec"; };
label { name "keep_waiting"; addr $BAA3; size 1; };
label { name "enable_joystick"; addr $8775; size 1; comment "called after level-intro music is finished playing"; };
label { name "enable_joystick_jv"; addr $801B; size 1; comment "called after level-intro music is finished playing"; };
@@ -697,6 +720,10 @@ label { name "hide_player"; addr $8DB8; size 1; comment "move player selected by
label { name "play_select_key_sfx"; addr $946F; size 1; comment "play sfx_select_key at $95f1"; };
label { name "wait_sfx"; addr $947C; size 1; comment "wait for sound to finish playing"; };
label { name "play_life_bonus_sfx"; addr $B868; size 1; comment "play once per life"; };
+label { name "el_hi_ok"; addr $B851; };
+label { name "el_wait_sfx"; addr $B875; comment "wait for sfx to finish"; };
+label { name "el_delay"; addr $B884; comment "wait approx 1/2 sec"; };
+label { name "el_done"; addr $B893; };
label { name "add_life_bonus"; addr $B83B; size 1; };
label { name "sfx_option_pressed"; addr $8ab0; size 1; };
label { name "play_opt_key_sfx"; addr $94BC; size 1; };
@@ -724,7 +751,10 @@ label { name "play_sfx_climb"; addr $8A80; };
label { name "play_sfx_bounce_1"; addr $899A; };
label { name "falling_bounce"; addr $8983; comment "this looks like it hurts..."; };
label { name "afterlife"; addr $9600; comment "multiple code paths jump here. replay level, load next level, or go back to ask_num_players"; };
-label { name "code_bd52"; addr $BD52; comment "referenced by code at $BC83"; };
+range { name "well_done_sub0"; start $bccd; end $bcd8; type code; comment "used in work_level_sub0 slot during well_doneused in work_level_sub1 slot during well_done"; };
+label { name "well_done_sub1"; addr $BD52; comment "used in work_level_sub1 slot during well_doneused in work_level_sub1 slot during well_done"; };
+label { name "wds1_cont"; addr $BD58; comment "we seem to be setting/clearing bit 7 in the display list, moving the line(s) where DLI(s) occur."; };
+label { name "wds1_finish"; addr $BD81; comment "set things up for the next level?"; };
label { name "crumble_gameboard"; addr $8D00; comment "just lost your last life"; };
label { name "crumble_gameboard_jv"; addr $8030; comment "just lost your last life"; };
label { name "init_struct_users"; addr $9A5C; comment "work_user and struct_user_{1..4}, 11 * 5 (55 aka $37) bytes"; };
diff --git a/main.info b/main.info
index c1f7a77..ba30b68 100644
--- a/main.info
+++ b/main.info
@@ -296,8 +296,8 @@ range { name "code_adb5"; start $ADB5; end $adc0; type code; };
range { name "code_adc1"; start $adc1; end $adc3; type code; };
label { name "replacement_block_char_minus_one"; addr $9133; comment "1-indexed..."; };
range { name "replacement_block_char"; start $9134; end $913b; type bytetable; };
-label { name "title_screen_color_snd"; addr $913c; comment "rotate colors and play the descending tone as the letters appear on the title screen"; };
-label { name "ts_setup_sub0"; addr $905f; comment "set work_level_sub0 to title_screen_color_snd"; };
+label { name "fade_in_letters"; addr $913c; comment "rotate colors and play the descending tone as each letter appears on the title screen. called once per frame, uses $9c to keep track of letter. caller stops this routine being called when $9c holds $0e (meaning the last letter is done)."; };
+label { name "ts_setup_sub0"; addr $905f; comment "set work_level_sub0 to fade_in_letters"; };
label { name "ts_clear_sub0"; addr $9114; comment "set work_level_sub0 to $06e6 (just an RTS)"; };
label { name "demo_mode"; addr $B96B; comment "display all the levels, happens if left idle at the title screen"; };
label { name "show_letter"; addr $9160; comment "$3000 is screen memory, at this point"; };
@@ -340,11 +340,14 @@ range { name "zero_filler_88be"; start $88BE; end $88C7; type bytetable; };
range { name "zero_filler_9bff"; start $9bff; end $9bff; type bytetable; };
range { name "zero_filler_8e67"; start $8e67; end $8e68; type bytetable; };
range { name "zero_filler_8dcd"; start $8dcd; end $8dcd; type bytetable; };
-range { name "code_bccd"; start $bccd; end $bcd8; type code; comment "dunno, but referenced by code at $BC6A (part of well_done_screen)"; };
range { name "well_done_map"; start $bcd9; end $bd51; type bytetable; comment "level map used for the WELL DONE screen, when you beat level 12"; };
label { name "well_done_scores"; addr $8D52; comment "well_done_screen jumps here via work_level_sub1"; };
label { name "wd_wait_scores"; addr $BC92; comment "wait for score screen to finish (I think, anyway)"; };
label { name "wd_xxx"; addr $BCB6; comment "display current user's score, number_of_users should be score-1 here."; };
+label { name "wd_wait_dli"; addr $BC51; comment "wait until the dli has been set up (by vblank)"; };
+label { name "wd_wait_32j"; addr $BC5E; comment "wait 32 jiffies (approx 1/2 sec)"; };
+label { name "wd_wait_music"; addr $BCC1; comment "wait until music is done playing (not 100% sure though)"; };
+label { name "print_total_score_msg"; addr $BCA3; comment "wait 32 jiffies (approx 1/2 sec)"; };
range { name "well_done_shape"; start $bda0; end $bdc6; type bytetable; comment "used to draw the large WELL DONE banner"; };
label { name "total_score_msg_minus_one"; addr $bdd1; comment "1-indexed"; };
label { name "dumbwaiter_sub0"; addr $A6BD; comment "gets called every frame"; };
@@ -464,6 +467,8 @@ range { name "l11_map_changes"; start $B3DC; end $b44b; type bytetable; };
label { name "hatch_bomb_sub"; addr $B44C; };
label { name "hurr_sub0"; addr $b691; };
+label { name "falling_wind"; addr $B697; comment "wind blows jumpman to the right when he's dying"; };
+label { name "hurr_done"; addr $B69A; };
label { name "hurr_sub1"; addr $b69b; };
label { name "hurr_sub2"; addr $B709; };
range { name "l12_map"; start $b590; end $b5d1; type bytetable; };
@@ -531,7 +536,20 @@ label { name "bullet_table_minus_one"; addr $8F42; comment "1-indexed"; };
label { name "falling_flag"; addr $0621; comment "1 = falling, reset to 0 when jumpman hits the ground"; };
label { name "jiffy_timer_1"; addr $061A; comment "gets incremented every frame"; };
label { name "jiffy_timer_2"; addr $061B; comment "gets incremented every frame"; };
-label { name "bonus_jiffy_timer"; addr $0626; comment "gets incremented every frame when playing a level, bonus-=100 when this reaches 0"; };
+label { name "jiffy_timer_3_lo"; addr $0619; comment "gets incremented every frame"; };
+label { name "jiffy_timer_3_hi"; addr $A2; comment "gets incremented every time 3_lo wraps around to zero"; };
+label { name "no_wrap"; addr $841F; };
+label { name "sfx_title_v0"; addr $9300; comment "title screen music. only use of 4-part harmony in the game, this and _v1 _v2 _v3."; };
+label { name "sfx_title_v1"; addr $9351; };
+label { name "sfx_title_v2"; addr $939C; };
+label { name "sfx_title_v3"; addr $93D7; };
+label { name "skip_space"; addr $9144; comment "don't 'fade-in' the space in the title (offset 7)"; };
+label { name "rotate_hue"; addr $9154; comment "the luminance stays the same"; };
+label { name "turn_letter_white"; addr $9164; comment "clear the high 2 bits on the letter, in screen memory"; };
+label { name "title_dancing"; addr $9172; comment "make jumpmen dance on title screen, called once/frame"; };
+label { name "start_dancing"; addr $90BC; comment "set _sub0 to title_dancing"; };
+label { name "odd_frame_flag"; addr $061C; comment "a 1-bit frame counter (toggles every frame). possibly unused."; };
+label { name "bonus_jiffy_timer"; addr $0626; comment "gets incremented every frame when playing a level, bonus-=100 when this wraps around to 0"; };
label { name "speed_jiffy_timer"; addr $061E; comment "counts 0..initial_speed"; };
label { name "playing_level"; addr $0627; comment "0 = not playing, non-0 = playing"; };
label { name "no_dec_bonus"; addr $848B; };
@@ -583,7 +601,7 @@ range { name "title_screen_data"; start $91cf; end $93ff; type bytetable; commen
label { name "title_screen_data_minus_one"; addr $91ce; };
label { name "copy_title_screen"; addr $902A; };
-label { name "wait_until_9c_is_0e"; addr $906E; comment "some ISR is writing to $9c..."; };
+label { name "wait_letters_done"; addr $906E; comment "fade_in_letters increments $9c after every letter, $0e means they're all done (since there are 14 of them and we start counting at zero)"; };
label { name "funky_init_loop"; addr $90C8; comment "lot going on here, not understood yet"; };
label { name "scores_screen"; addr $8B80; comment "show scores, called at end of game, also called after beating level 12 (after WELL DONE). $40 in NMIEN = disable DLI, enable VBI"; };
label { name "ss_loop"; addr $8BA8; comment "number_of_users should be score-1 here."; };
@@ -686,7 +704,12 @@ label { name "set_y"; addr $8F9B; size 1; comment "y = a * 5; // offset into mus
label { name "show_level_name"; addr $BA5D; size 1; comment "copy level name into screen RAM"; };
label { name "sync_to_music"; addr $BA71; size 1; comment "level is already drawn with all color regs set to black. for each color reg, wait 1 sec before turning it visible. this syncs up with the music because the music was written to sync with this actually"; };
label { name "wait_1_sec"; addr $BA9E; size 1; comment "actually 64 jiffies, 1.067S ntsc, 1.28s pal"; };
-label { name "wait_1_sec_2"; addr $B970; size 1; comment "actually 64 jiffies, 1.067S ntsc, 1.28s pal"; };
+label { name "demo_wait"; addr $B970; size 1; comment "96 jiffies, 1.6s ntsc, 1.92s pal"; };
+label { name "demo_show_map"; addr $B99D; size 1; comment "initially, FR1 points to $A000 (start of level descriptions), Y is $16, or offset to _map0 within level desc."; };
+label { name "demo_show_name"; addr $B9AC; };
+label { name "demo_next_map"; addr $B9DE; };
+label { name "demo_set_colors"; addr $B9EC; comment "FR1 points to levelXX_desc"; };
+label { name "demo_wait_1"; addr $B9C6; comment "approx 2/3 sec"; };
label { name "keep_waiting"; addr $BAA3; size 1; };
label { name "enable_joystick"; addr $8775; size 1; comment "called after level-intro music is finished playing"; };
label { name "enable_joystick_jv"; addr $801B; size 1; comment "called after level-intro music is finished playing"; };
@@ -695,6 +718,10 @@ label { name "hide_player"; addr $8DB8; size 1; comment "move player selected by
label { name "play_select_key_sfx"; addr $946F; size 1; comment "play sfx_select_key at $95f1"; };
label { name "wait_sfx"; addr $947C; size 1; comment "wait for sound to finish playing"; };
label { name "play_life_bonus_sfx"; addr $B868; size 1; comment "play once per life"; };
+label { name "el_hi_ok"; addr $B851; };
+label { name "el_wait_sfx"; addr $B875; comment "wait for sfx to finish"; };
+label { name "el_delay"; addr $B884; comment "wait approx 1/2 sec"; };
+label { name "el_done"; addr $B893; };
label { name "add_life_bonus"; addr $B83B; size 1; };
label { name "sfx_option_pressed"; addr $8ab0; size 1; };
label { name "play_opt_key_sfx"; addr $94BC; size 1; };
@@ -722,7 +749,10 @@ label { name "play_sfx_climb"; addr $8A80; };
label { name "play_sfx_bounce_1"; addr $899A; };
label { name "falling_bounce"; addr $8983; comment "this looks like it hurts..."; };
label { name "afterlife"; addr $9600; comment "multiple code paths jump here. replay level, load next level, or go back to ask_num_players"; };
-label { name "code_bd52"; addr $BD52; comment "referenced by code at $BC83"; };
+range { name "well_done_sub0"; start $bccd; end $bcd8; type code; comment "used in work_level_sub0 slot during well_doneused in work_level_sub1 slot during well_done"; };
+label { name "well_done_sub1"; addr $BD52; comment "used in work_level_sub1 slot during well_doneused in work_level_sub1 slot during well_done"; };
+label { name "wds1_cont"; addr $BD58; comment "we seem to be setting/clearing bit 7 in the display list, moving the line(s) where DLI(s) occur."; };
+label { name "wds1_finish"; addr $BD81; comment "set things up for the next level?"; };
label { name "crumble_gameboard"; addr $8D00; comment "just lost your last life"; };
label { name "crumble_gameboard_jv"; addr $8030; comment "just lost your last life"; };
label { name "init_struct_users"; addr $9A5C; comment "work_user and struct_user_{1..4}, 11 * 5 (55 aka $37) bytes"; };