From f8c58266609faf0bcf1cf1d8e85af3c01bc2de52 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 7 Sep 2016 16:39:51 -0400 Subject: spellbound letters, s/sfx_/snd_/ for code labels, now all sfx_ labels are actual sfx data. --- jumpmanjr.dasm | 379 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 194 insertions(+), 185 deletions(-) (limited to 'jumpmanjr.dasm') diff --git a/jumpmanjr.dasm b/jumpmanjr.dasm index b23694f..433cb6f 100644 --- a/jumpmanjr.dasm +++ b/jumpmanjr.dasm @@ -1,5 +1,5 @@ ; da65 V2.15 - Git 104f898 -; Created: 2016-09-06 17:48:30 +; Created: 2016-09-07 15:56:49 ; Input file: jumpmanjr.rom ; Page: 1 @@ -16,6 +16,10 @@ zp_temp2 := $00AE ; used for (zp,y) addressing, al 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 bombloc := $00B6 ; bomb_pickup: position of the bomb Jumpman just touched, on 8x8 coarse grid +zp_temp3 := $00B7 +zp_temp4 := $00B8 ; number of players, used by ask_num_players and option_key_handler. used as a temp elsewhere. +zp_temp5 := $00B9 ; among other things, used for jumpman's dance on title screen +zp_temp6 := $00BA ; used for audio freq counter in materialize_jumpman. also used when setting number of players and player speeds. sa_tmp_1 := $00BD ; used by calc_screen_addr dm_count := $00BE ; graphics object definition is this long dm_length := $00BF ; see draw_map and level_maps.txt @@ -60,20 +64,21 @@ current_speed := $0624 ; can be modified, e.g. set to $ initial_speed := $0625 ; current user's chosen speed, set at game start bonus_jiffy_timer:= $0626 ; gets incremented every frame when playing a level, bonus-=100 when this wraps around to 0 playing_level := $0627 ; 0 = not playing, non-0 = playing -sfx_lock := $062F ; lets other code know cue_sfx is still running? not 100% sure +rot_color := $062A ; see comment at rotating_colors +snd_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) player_delta_y := $0631 ; amount to move jumpman this frame (1 or $FF aka -1) joystick_disabled:= $0632 ; nonzero = jumpman can't move (title screen or materialization, etc) joystick_state := $0633 ; last PORTA read (bottom 4 bits), or 0 if joystick_disabled trigger_disabled:= $0634 ; nonzero = jumpman can't jump (he's already jumping, or title screen or materialization, etc) trigger_state := $0635 ; last TRIG0 read (0 = pressed) -sfx_ptr := $063C -sfx_slot_priority:= $063E ; priority of this sfx -sfx_slot_timer := $063F -sfx_slot_duration:= $0646 -sfx_slot_audc := $0647 -sfx_slot_curpos := $064E ; address we've got to so far, playing this sfx -sfx_priority_tmp:= $0661 ; ?? +snd_ptr := $063C +snd_slot_priority:= $063E ; priority of this sfx +snd_slot_timer := $063F +snd_slot_duration:= $0646 +snd_slot_audc := $0647 +snd_slot_curpos := $064E ; address we've got to so far, playing this sfx +snd_priority_tmp:= $0661 ; ?? num_tmp := $0665 ; temp used by print_number player_x_pos := $067E ; stored in HPOSP0 player_y_pos := $0683 ; $C6 is the bottom of the level (where you end up when you die) @@ -554,94 +559,94 @@ gr7_and_masks: .byte $3F,$CF,$F3,$FC ; 8153 3F CF F3 FC ?... ; ---------------------------------------------------------------------------- ; we have 4 slots (because POKEY has 4 voices), X counts down by 2 from 10 to 2 (at 0, the loop exits) -sfx_player_entry: +snd_player_entry: ldx #$0A ; 8157 A2 0A .. - lda sfx_lock ; 8159 AD 2F 06 ./. - beq next_sfx_slot ; 815C F0 01 .. -sfx_exit: + lda snd_lock ; 8159 AD 2F 06 ./. + beq next_snd_slot ; 815C F0 01 .. +snd_exit: rts ; 815E 60 ` ; ---------------------------------------------------------------------------- -next_sfx_slot: +next_snd_slot: dex ; 815F CA . dex ; 8160 CA . - beq sfx_exit ; 8161 F0 FB .. - lda sfx_slot_priority,x ; 8163 BD 3E 06 .>. - beq next_sfx_slot ; 8166 F0 F7 .. + beq snd_exit ; 8161 F0 FB .. + lda snd_slot_priority,x ; 8163 BD 3E 06 .>. + beq next_snd_slot ; 8166 F0 F7 .. ; skip it, if slot is inactive is_slot_active: - lda sfx_slot_timer,x ; 8168 BD 3F 06 .?. - beq sfx_next_note ; 816B F0 10 .. - dec sfx_slot_timer,x ; 816D DE 3F 06 .?. - cmp sfx_slot_duration,x ; 8170 DD 46 06 .F. - bne next_sfx_slot ; 8173 D0 EA .. + lda snd_slot_timer,x ; 8168 BD 3F 06 .?. + beq snd_next_note ; 816B F0 10 .. + dec snd_slot_timer,x ; 816D DE 3F 06 .?. + cmp snd_slot_duration,x ; 8170 DD 46 06 .F. + bne next_snd_slot ; 8173 D0 EA .. lda #$00 ; 8175 A9 00 .. sta AUDC1_minus_two,x ; 8177 9D FF D1 ... - jmp next_sfx_slot ; 817A 4C 5F 81 L_. + jmp next_snd_slot ; 817A 4C 5F 81 L_. ; ---------------------------------------------------------------------------- -sfx_next_note: - lda sfx_slot_curpos,x ; 817D BD 4E 06 .N. +snd_next_note: + lda snd_slot_curpos,x ; 817D BD 4E 06 .N. sta zp_temp1 ; 8180 85 CB .. - lda sfx_slot_curpos+1,x ; 8182 BD 4F 06 .O. + lda snd_slot_curpos+1,x ; 8182 BD 4F 06 .O. sta zp_temp1+1 ; 8185 85 CC .. ldy #$00 ; 8187 A0 00 .. lda (zp_temp1),y ; 8189 B1 CB .. cmp #$04 ; 818B C9 04 .. - bcs sfx_play_note ; 818D B0 77 .w + bcs snd_play_note ; 818D B0 77 .w cmp #$01 ; 818F C9 01 .. - beq sfx_set_audc ; 8191 F0 1B .. + beq snd_set_audc ; 8191 F0 1B .. cmp #$02 ; 8193 C9 02 .. - beq sfx_jump_opcode ; 8195 F0 31 .1 + beq snd_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&. + beq snd_play_rest ; 8199 F0 03 .. + jmp snd_finished ; 819B 4C 26 82 L&. ; ---------------------------------------------------------------------------- ; y==0 on entry -sfx_play_rest: +snd_play_rest: tya ; 819E 98 . sta AUDC1_minus_two,x ; 819F 9D FF D1 ... iny ; 81A2 C8 . lda (zp_temp1),y ; 81A3 B1 CB .. - sta sfx_slot_timer,x ; 81A5 9D 3F 06 .?. - jsr inc_sfx_pos ; 81A8 20 31 82 1. + sta snd_slot_timer,x ; 81A5 9D 3F 06 .?. + jsr inc_snd_pos ; 81A8 20 31 82 1. jmp is_slot_active ; 81AB 4C 68 81 Lh. ; ---------------------------------------------------------------------------- ; y==0 on entry -sfx_set_audc: +snd_set_audc: iny ; 81AE C8 . lda (zp_temp1),y ; 81AF B1 CB .. - sta sfx_slot_audc,x ; 81B1 9D 47 06 .G. + sta snd_slot_audc,x ; 81B1 9D 47 06 .G. iny ; 81B4 C8 . lda (zp_temp1),y ; 81B5 B1 CB .. - sta sfx_slot_duration,x ; 81B7 9D 46 06 .F. - jsr inc_sfx_pos ; 81BA 20 31 82 1. - inc sfx_slot_curpos,x ; 81BD FE 4E 06 .N. + sta snd_slot_duration,x ; 81B7 9D 46 06 .F. + jsr inc_snd_pos ; 81BA 20 31 82 1. + inc snd_slot_curpos,x ; 81BD FE 4E 06 .N. bne is_slot_active ; 81C0 D0 A6 .. - inc sfx_slot_curpos+1,x ; 81C2 FE 4F 06 .O. + inc snd_slot_curpos+1,x ; 81C2 FE 4F 06 .O. jmp is_slot_active ; 81C5 4C 68 81 Lh. ; ---------------------------------------------------------------------------- ; I *think* this jumps to a different sfx address... -sfx_jump_opcode: +snd_jump_opcode: iny ; 81C8 C8 . lda (zp_temp1),y ; 81C9 B1 CB .. - sta sfx_slot_curpos,x ; 81CB 9D 4E 06 .N. + sta snd_slot_curpos,x ; 81CB 9D 4E 06 .N. iny ; 81CE C8 . lda (zp_temp1),y ; 81CF B1 CB .. - sta sfx_slot_curpos+1,x ; 81D1 9D 4F 06 .O. + sta snd_slot_curpos+1,x ; 81D1 9D 4F 06 .O. iny ; 81D4 C8 . lda $065E,x ; 81D5 BD 5E 06 .^. beq L81EE ; 81D8 F0 14 .. dec $065E,x ; 81DA DE 5E 06 .^. - bne sfx_next_note ; 81DD D0 9E .. + bne snd_next_note ; 81DD D0 9E .. lda $0656,x ; 81DF BD 56 06 .V. - sta sfx_slot_curpos,x ; 81E2 9D 4E 06 .N. + sta snd_slot_curpos,x ; 81E2 9D 4E 06 .N. lda $0657,x ; 81E5 BD 57 06 .W. - sta sfx_slot_curpos+1,x ; 81E8 9D 4F 06 .O. - jmp sfx_next_note ; 81EB 4C 7D 81 L}. + sta snd_slot_curpos+1,x ; 81E8 9D 4F 06 .O. + jmp snd_next_note ; 81EB 4C 7D 81 L}. ; ---------------------------------------------------------------------------- L81EE: nop ; 81EE EA . @@ -654,43 +659,43 @@ L81EE: nop ; 81EE EA lda zp_temp1+1 ; 81FC A5 CC .. adc #$00 ; 81FE 69 00 i. sta $0657,x ; 8200 9D 57 06 .W. - jmp sfx_next_note ; 8203 4C 7D 81 L}. + jmp snd_next_note ; 8203 4C 7D 81 L}. ; ---------------------------------------------------------------------------- ; y==0, a>=4 on entry -sfx_play_note: +snd_play_note: sta AUDF1_minus_two,x ; 8206 9D FE D1 ... iny ; 8209 C8 . lda (zp_temp1),y ; 820A B1 CB .. - sta sfx_slot_timer,x ; 820C 9D 3F 06 .?. - lda sfx_slot_audc,x ; 820F BD 47 06 .G. + sta snd_slot_timer,x ; 820C 9D 3F 06 .?. + lda snd_slot_audc,x ; 820F BD 47 06 .G. sta AUDC1_minus_two,x ; 8212 9D FF D1 ... clc ; 8215 18 . - lda sfx_slot_curpos,x ; 8216 BD 4E 06 .N. + lda snd_slot_curpos,x ; 8216 BD 4E 06 .N. adc #$02 ; 8219 69 02 i. - sta sfx_slot_curpos,x ; 821B 9D 4E 06 .N. + sta snd_slot_curpos,x ; 821B 9D 4E 06 .N. bcc cpos_hi_ok ; 821E 90 03 .. - inc sfx_slot_curpos+1,x ; 8220 FE 4F 06 .O. + inc snd_slot_curpos+1,x ; 8220 FE 4F 06 .O. cpos_hi_ok: jmp is_slot_active ; 8223 4C 68 81 Lh. ; ---------------------------------------------------------------------------- ; done playing this sfx, free up the slot, X-indexed -sfx_finished: +snd_finished: lda #$00 ; 8226 A9 00 .. - sta sfx_slot_priority,x ; 8228 9D 3E 06 .>. + sta snd_slot_priority,x ; 8228 9D 3E 06 .>. sta AUDC1_minus_two,x ; 822B 9D FF D1 ... - jmp next_sfx_slot ; 822E 4C 5F 81 L_. + jmp next_snd_slot ; 822E 4C 5F 81 L_. ; ---------------------------------------------------------------------------- ; point to next byte in current sfx slot indexed by X -inc_sfx_pos: +inc_snd_pos: clc ; 8231 18 . - lda sfx_slot_curpos,x ; 8232 BD 4E 06 .N. + lda snd_slot_curpos,x ; 8232 BD 4E 06 .N. adc #$02 ; 8235 69 02 i. - sta sfx_slot_curpos,x ; 8237 9D 4E 06 .N. + sta snd_slot_curpos,x ; 8237 9D 4E 06 .N. bcc inc_done ; 823A 90 03 .. - inc sfx_slot_curpos+1,x ; 823C FE 4F 06 .O. + inc snd_slot_curpos+1,x ; 823C FE 4F 06 .O. inc_done: rts ; 823F 60 ` @@ -698,40 +703,40 @@ inc_done: ; if cue_sfx not already in progress, setup to play sfx at (sfx_slot_priority, sfx_lock), priority A cue_sfx_lowprior: pha ; 8240 48 H - lda sfx_ptr+1 ; 8241 AD 3D 06 .=. + lda snd_ptr+1 ; 8241 AD 3D 06 .=. cue_ok: beq lp_ok ; 8244 F0 02 .. pla ; 8246 68 h rts ; 8247 60 ` ; ---------------------------------------------------------------------------- ; copy to sfx_ptr, fall thru to cue_sfx -lp_ok: lda sfx_slot_priority ; 8248 AD 3E 06 .>. - sta sfx_ptr ; 824B 8D 3C 06 .<. - lda sfx_slot_timer ; 824E AD 3F 06 .?. - sta sfx_ptr+1 ; 8251 8D 3D 06 .=. +lp_ok: lda snd_slot_priority ; 8248 AD 3E 06 .>. + sta snd_ptr ; 824B 8D 3C 06 .<. + lda snd_slot_timer ; 824E AD 3F 06 .?. + sta snd_ptr+1 ; 8251 8D 3D 06 .=. pla ; 8254 68 h ; setup to play sfx at *sfx_ptr, priority in A -cue_sfx:sta sfx_priority_tmp ; 8255 8D 61 06 .a. - inc sfx_lock ; 8258 EE 2F 06 ./. +cue_sfx:sta snd_priority_tmp ; 8255 8D 61 06 .a. + inc snd_lock ; 8258 EE 2F 06 ./. ldx #$0A ; 825B A2 0A .. next_slot: dex ; 825D CA . dex ; 825E CA . beq bump_slot ; 825F F0 20 . - lda sfx_slot_priority,x ; 8261 BD 3E 06 .>. + lda snd_slot_priority,x ; 8261 BD 3E 06 .>. bne next_slot ; 8264 D0 F7 .. ; found a free slot, use it load_slot: - lda sfx_ptr ; 8266 AD 3C 06 .<. - sta sfx_slot_curpos,x ; 8269 9D 4E 06 .N. - lda sfx_ptr+1 ; 826C AD 3D 06 .=. - sta sfx_slot_curpos+1,x ; 826F 9D 4F 06 .O. - lda sfx_priority_tmp ; 8272 AD 61 06 .a. - sta sfx_slot_priority,x ; 8275 9D 3E 06 .>. + lda snd_ptr ; 8266 AD 3C 06 .<. + sta snd_slot_curpos,x ; 8269 9D 4E 06 .N. + lda snd_ptr+1 ; 826C AD 3D 06 .=. + sta snd_slot_curpos+1,x ; 826F 9D 4F 06 .O. + lda snd_priority_tmp ; 8272 AD 61 06 .a. + sta snd_slot_priority,x ; 8275 9D 3E 06 .>. cue_done: lda #$00 ; 8278 A9 00 .. - sta sfx_ptr+1 ; 827A 8D 3D 06 .=. - dec sfx_lock ; 827D CE 2F 06 ./. + sta snd_ptr+1 ; 827A 8D 3D 06 .=. + dec snd_lock ; 827D CE 2F 06 ./. rts ; 8280 60 ` ; ---------------------------------------------------------------------------- @@ -745,8 +750,8 @@ bump_try_next: ; branch to cue_done (give up) if all slots are in use with higher priority than this sfx (which means it won't be heard) bump_fail: beq cue_done ; 8285 F0 F1 .. - lda sfx_slot_priority,x ; 8287 BD 3E 06 .>. - cmp sfx_priority_tmp ; 828A CD 61 06 .a. + lda snd_slot_priority,x ; 8287 BD 3E 06 .>. + cmp snd_priority_tmp ; 828A CD 61 06 .a. bcc load_slot ; 828D 90 D7 .. jmp bump_try_next ; 828F 4C 83 82 L.. @@ -1028,8 +1033,8 @@ no_dec_bonus: and #$07 ; 8498 29 07 ). sta $0628 ; 849A 8D 28 06 .(. tax ; 849D AA . - lda data_table_85b6,x ; 849E BD B6 85 ... - sta $062A ; 84A1 8D 2A 06 .*. + lda rotating_colors,x ; 849E BD B6 85 ... + sta rot_color ; 84A1 8D 2A 06 .*. ; read the joystick if not disabled check_joystick_enabled: lda joystick_disabled ; 84A4 AD 32 06 .2. @@ -1083,7 +1088,7 @@ skip_vec: lda $0640 ; 84F2 AD 40 06 .@. ora $0642 ; 84F5 0D 42 06 .B. ora $0644 ; 84F8 0D 44 06 .D. - ora sfx_slot_duration ; 84FB 0D 46 06 .F. + ora snd_slot_duration ; 84FB 0D 46 06 .F. sta $0663 ; 84FE 8D 63 06 .c. ldx #$10 ; 8501 A2 10 .. ; save contents of GTIA collision regs (X ranges 1 to $10, dli_vec_shadow_hi should read collision_save-1) @@ -1196,8 +1201,8 @@ L859C: inc $0618 ; 859C EE 18 06 jmp no_consol_pressed ; 85B3 4C 8D 85 L.. ; ---------------------------------------------------------------------------- -; used in vblank_imm_isr, not sure for what yet -data_table_85b6: +; used for color-shifting objects like electrocution, walls, and the bonus counter. every frame, the next one of these is stored in rot_color. +rotating_colors: .byte $1A,$96,$28,$66,$C6,$56,$0E,$F6 ; 85B6 1A 96 28 66 C6 56 0E F6 ..(f.V.. ; ---------------------------------------------------------------------------- ; X/Y movement, indexed by joystick_state << 1, each entry is XXYY, $FF is -1 @@ -1223,7 +1228,7 @@ page6_initial_vectors: .addr position_missiles ; 85EE 93 82 .. .addr bullet_logic ; 85F0 69 8E i. .addr check_falling_2 ; 85F2 00 89 .. - .addr sfx_player_entry ; 85F4 57 81 W. + .addr snd_player_entry ; 85F4 57 81 W. ; ---------------------------------------------------------------------------- zero_filler_85f6: .byte $00,$00,$00,$00,$00,$00,$00,$00 ; 85F6 00 00 00 00 00 00 00 00 ........ @@ -1404,15 +1409,15 @@ L8736: sta $0681,x ; 8736 9D 81 06 dex ; 8742 CA . bne L8736 ; 8743 D0 F1 .. lda #$2B ; 8745 A9 2B .+ - sta $B8 ; 8747 85 B8 .. + sta zp_temp4 ; 8747 85 B8 .. lda #$00 ; 8749 A9 00 .. - sta $B7 ; 874B 85 B7 .. + sta zp_temp3 ; 874B 85 B7 .. tay ; 874D A8 . ldx #$05 ; 874E A2 05 .. -L8750: sta ($B7),y ; 8750 91 B7 .. +L8750: sta (zp_temp3),y ; 8750 91 B7 .. iny ; 8752 C8 . bne L8750 ; 8753 D0 FB .. - inc $B8 ; 8755 E6 B8 .. + inc zp_temp4 ; 8755 E6 B8 .. dex ; 8757 CA . bne L8750 ; 8758 D0 F6 .. rts ; 875A 60 ` @@ -1445,7 +1450,7 @@ ej_loop:lda #$E6 ; 8777 A9 E6 dex ; 8782 CA . bne ej_loop ; 8783 D0 F2 .. stx joystick_disabled ; 8785 8E 32 06 .2. - stx sfx_lock ; 8788 8E 2F 06 ./. + stx snd_lock ; 8788 8E 2F 06 ./. stx work_level_bullet_max ; 878B 8E 8B 07 ... jsr prepare_level ; 878E 20 2A 87 *. jsr silence_audio ; 8791 20 5B 87 [. @@ -1525,9 +1530,9 @@ store_bomb_coords: lda ($B0),y ; 87F8 B1 B0 .. sta $06DD ; 87FA 8D DD 06 ... lda #$92 ; 87FD A9 92 .. - sta sfx_ptr ; 87FF 8D 3C 06 .<. + sta snd_ptr ; 87FF 8D 3C 06 .<. lda #$88 ; 8802 A9 88 .. - sta sfx_ptr+1 ; 8804 8D 3D 06 .=. + sta snd_ptr+1 ; 8804 8D 3D 06 .=. lda #$08 ; 8807 A9 08 .. jsr cue_sfx_jv ; 8809 20 06 80 .. ldy bomb_idx ; 880C A4 B2 .. @@ -1695,9 +1700,9 @@ L8910: lda $06EE ; 8910 AD EE 06 inc $0688 ; 8933 EE 88 06 ... play_sfx_death: lda #$60 ; 8936 A9 60 .` - sta sfx_slot_priority ; 8938 8D 3E 06 .>. + sta snd_slot_priority ; 8938 8D 3E 06 .>. lda #$8A ; 893B A9 8A .. - sta sfx_slot_timer ; 893D 8D 3F 06 .?. + sta snd_slot_timer ; 893D 8D 3F 06 .?. lda #$07 ; 8940 A9 07 .. jsr cue_sfx_lowprior_jv ; 8942 20 03 80 .. L8945: lda player_y_pos ; 8945 AD 83 06 ... @@ -1741,9 +1746,9 @@ falling_bounce: sta game_display_list ; 8997 8D 81 08 ... play_sfx_bounce_1: lda #$4B ; 899A A9 4B .K - sta sfx_slot_priority ; 899C 8D 3E 06 .>. + sta snd_slot_priority ; 899C 8D 3E 06 .>. lda #$8A ; 899F A9 8A .. - sta sfx_slot_timer ; 89A1 8D 3F 06 .?. + sta snd_slot_timer ; 89A1 8D 3F 06 .?. lda #$04 ; 89A4 A9 04 .. jsr cue_sfx_lowprior_jv ; 89A6 20 03 80 .. L89A9: ldx $06EA ; 89A9 AE EA 06 ... @@ -1843,9 +1848,9 @@ play_sfx_climb: lda $061F ; 8A80 AD 1F 06 ... bne L8A94 ; 8A83 D0 0F .. lda #$97 ; 8A85 A9 97 .. - sta sfx_slot_priority ; 8A87 8D 3E 06 .>. + sta snd_slot_priority ; 8A87 8D 3E 06 .>. lda #$8A ; 8A8A A9 8A .. - sta sfx_slot_timer ; 8A8C 8D 3F 06 .?. + sta snd_slot_timer ; 8A8C 8D 3F 06 .?. lda #$02 ; 8A8F A9 02 .. jsr cue_sfx_lowprior_jv ; 8A91 20 03 80 .. L8A94: jmp L9925 ; 8A94 4C 25 99 L%. @@ -2077,7 +2082,7 @@ what_are_we_waiting_for: lda $0640 ; 8C39 AD 40 06 .@. ora $0642 ; 8C3C 0D 42 06 .B. ora $0644 ; 8C3F 0D 44 06 .D. - ora sfx_slot_duration ; 8C42 0D 46 06 .F. + ora snd_slot_duration ; 8C42 0D 46 06 .F. bne what_are_we_waiting_for ; 8C45 D0 F2 .. sta jiffy_timer_1 ; 8C47 8D 1A 06 ... ; wait 192 jiffies: 3.2 sec (ntsc), 3.84 sec (pal) @@ -2125,7 +2130,7 @@ score_screen_dli_sr: sta WSYNC ; 8C94 8D 0A D4 ... cmp $AB ; 8C97 C5 AB .. bne L8CA4 ; 8C99 D0 09 .. - lda $062A ; 8C9B AD 2A 06 .*. + lda rot_color ; 8C9B AD 2A 06 .*. sta COLPF0 ; 8C9E 8D 16 D0 ... jmp L8CAA ; 8CA1 4C AA 8C L.. @@ -2182,9 +2187,9 @@ inc_lives: plp ; 8CE4 28 ( inc lives ; 8CE5 EE 0A 07 ... lda #$79 ; 8CE8 A9 79 .y - sta sfx_ptr ; 8CEA 8D 3C 06 .<. + sta snd_ptr ; 8CEA 8D 3C 06 .<. lda #$BE ; 8CED A9 BE .. - sta sfx_ptr+1 ; 8CEF 8D 3D 06 .=. + sta snd_ptr+1 ; 8CEF 8D 3D 06 .=. lda #$0C ; 8CF2 A9 0C .. jsr cue_sfx_jv ; 8CF4 20 06 80 .. jsr show_lives_icons ; 8CF7 20 BB 86 .. @@ -2337,9 +2342,9 @@ check_bonus_0: bonus_lt_256: jsr print_bonus_jv ; 8DE7 20 0F 80 .. lda #$FA ; 8DEA A9 FA .. - sta sfx_slot_priority ; 8DEC 8D 3E 06 .>. + sta snd_slot_priority ; 8DEC 8D 3E 06 .>. lda #$8D ; 8DEF A9 8D .. - sta sfx_slot_timer ; 8DF1 8D 3F 06 .?. + sta snd_slot_timer ; 8DF1 8D 3F 06 .?. lda #$07 ; 8DF4 A9 07 .. jsr cue_sfx_lowprior_jv ; 8DF6 20 03 80 .. dec_done: @@ -2390,7 +2395,7 @@ pick_random_music: L8E4C: lda $0640 ; 8E4C AD 40 06 .@. ora $0642 ; 8E4F 0D 42 06 .B. ora $0644 ; 8E52 0D 44 06 .D. - ora sfx_slot_duration ; 8E55 0D 46 06 .F. + ora snd_slot_duration ; 8E55 0D 46 06 .F. bne L8E4C ; 8E58 D0 F2 .. sta jiffy_timer_1 ; 8E5A 8D 1A 06 ... L8E5D: lda jiffy_timer_1 ; 8E5D AD 1A 06 ... @@ -2491,9 +2496,9 @@ fire_bullet: ; let player hear report play_sfx_bullet: lda #$59 ; 8EFB A9 59 .Y - sta sfx_slot_priority ; 8EFD 8D 3E 06 .>. + sta snd_slot_priority ; 8EFD 8D 3E 06 .>. lda #$8F ; 8F00 A9 8F .. - sta sfx_slot_timer ; 8F02 8D 3F 06 .?. + sta snd_slot_timer ; 8F02 8D 3F 06 .?. txa ; 8F05 8A . pha ; 8F06 48 H lda #$02 ; 8F07 A9 02 .. @@ -2575,16 +2580,16 @@ cue_music: ; y = a * 5; // offset into mus_struct_table set_y: tay ; 8F9B A8 . lda mus00_addr1,y ; 8F9C B9 C3 8F ... - sta sfx_ptr ; 8F9F 8D 3C 06 .<. + sta snd_ptr ; 8F9F 8D 3C 06 .<. lda mus00_addr1+1,y ; 8FA2 B9 C4 8F ... - sta sfx_ptr+1 ; 8FA5 8D 3D 06 .=. + sta snd_ptr+1 ; 8FA5 8D 3D 06 .=. lda mus00_priority,y ; 8FA8 B9 C7 8F ... jsr cue_sfx_jv ; 8FAB 20 06 80 .. ldy $D6 ; 8FAE A4 D6 .. lda mus00_addr2,y ; 8FB0 B9 C5 8F ... - sta sfx_ptr ; 8FB3 8D 3C 06 .<. + sta snd_ptr ; 8FB3 8D 3C 06 .<. lda mus00_addr2+1,y ; 8FB6 B9 C6 8F ... - sta sfx_ptr+1 ; 8FB9 8D 3D 06 .=. + sta snd_ptr+1 ; 8FB9 8D 3D 06 .=. lda mus00_priority,y ; 8FBC B9 C7 8F ... jsr cue_sfx_jv ; 8FBF 20 06 80 .. rts ; 8FC2 60 ` @@ -2761,30 +2766,30 @@ wait_letters_done: lda #$06 ; 9079 A9 06 .. sta work_level_sub0+1 ; 907B 8D 83 07 ... lda #$00 ; 907E A9 00 .. - sta sfx_ptr ; 9080 8D 3C 06 .<. + sta snd_ptr ; 9080 8D 3C 06 .<. lda #$93 ; 9083 A9 93 .. - sta sfx_ptr+1 ; 9085 8D 3D 06 .=. + sta snd_ptr+1 ; 9085 8D 3D 06 .=. jsr cue_sfx_jv ; 9088 20 06 80 .. lda #$51 ; 908B A9 51 .Q - sta sfx_ptr ; 908D 8D 3C 06 .<. + sta snd_ptr ; 908D 8D 3C 06 .<. lda #$93 ; 9090 A9 93 .. - sta sfx_ptr+1 ; 9092 8D 3D 06 .=. + sta snd_ptr+1 ; 9092 8D 3D 06 .=. jsr cue_sfx_jv ; 9095 20 06 80 .. lda #$9C ; 9098 A9 9C .. - sta sfx_ptr ; 909A 8D 3C 06 .<. + sta snd_ptr ; 909A 8D 3C 06 .<. lda #$93 ; 909D A9 93 .. - sta sfx_ptr+1 ; 909F 8D 3D 06 .=. + sta snd_ptr+1 ; 909F 8D 3D 06 .=. jsr cue_sfx_jv ; 90A2 20 06 80 .. lda #$D7 ; 90A5 A9 D7 .. - sta sfx_ptr ; 90A7 8D 3C 06 .<. + sta snd_ptr ; 90A7 8D 3C 06 .<. lda #$93 ; 90AA A9 93 .. - sta sfx_ptr+1 ; 90AC 8D 3D 06 .=. + sta snd_ptr+1 ; 90AC 8D 3D 06 .=. jsr cue_sfx_jv ; 90AF 20 06 80 .. lda #$00 ; 90B2 A9 00 .. sta $9C ; 90B4 85 9C .. sta $9D ; 90B6 85 9D .. lda #$07 ; 90B8 A9 07 .. - sta $B9 ; 90BA 85 B9 .. + sta zp_temp5 ; 90BA 85 B9 .. ; set _sub0 to title_dancing start_dancing: lda #$72 ; 90BC A9 72 .r @@ -2855,7 +2860,7 @@ replacement_block_char: ; ---------------------------------------------------------------------------- ; 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 .*. + lda rot_color ; 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) @@ -2895,7 +2900,7 @@ turn_letter_white: ; ---------------------------------------------------------------------------- ; make jumpmen dance on title screen, called once/frame title_dancing: - lda $062A ; 9172 AD 2A 06 .*. + lda rot_color ; 9172 AD 2A 06 .*. sta COLOR0 ; 9175 8D C4 02 ... lda $9C ; 9178 A5 9C .. cmp #$04 ; 917A C9 04 .. @@ -2906,10 +2911,10 @@ L917E: rts ; 917E 60 L917F: lda $0649 ; 917F AD 49 06 .I. and #$0F ; 9182 29 0F ). bne L917E ; 9184 D0 F8 .. - inc $B9 ; 9186 E6 B9 .. - lda $B9 ; 9188 A5 B9 .. + inc zp_temp5 ; 9186 E6 B9 .. + lda zp_temp5 ; 9188 A5 B9 .. and #$0F ; 918A 29 0F ). - sta $B9 ; 918C 85 B9 .. + sta zp_temp5 ; 918C 85 B9 .. bne L917E ; 918E D0 EE .. ldx $9D ; 9190 A6 9D .. ldy #$FF ; 9192 A0 FF .. @@ -3044,8 +3049,8 @@ anp_copy_loop: bne anp_copy_loop ; 941F D0 F7 .. ; X is now 0 anp_loop_done: - stx $B7 ; 9421 86 B7 .. - stx $B8 ; 9423 86 B8 .. + stx zp_temp3 ; 9421 86 B7 .. + stx zp_temp4 ; 9423 86 B8 .. stx randomizer_mode ; 9425 8E F3 06 ... stx COLOR4 ; 9428 8E C8 02 ... lda #$04 ; 942B A9 04 .. @@ -3086,13 +3091,13 @@ setup_start_key_vec: ; play sfx_select_key at $95f1 play_select_key_sfx: lda #$F1 ; 946F A9 F1 .. - sta sfx_ptr ; 9471 8D 3C 06 .<. + sta snd_ptr ; 9471 8D 3C 06 .<. lda #$95 ; 9474 A9 95 .. - sta sfx_ptr+1 ; 9476 8D 3D 06 .=. + sta snd_ptr+1 ; 9476 8D 3D 06 .=. jsr cue_sfx_jv ; 9479 20 06 80 .. ; wait for sound to finish playing wait_sfx: - lda sfx_slot_duration ; 947C AD 46 06 .F. + lda snd_slot_duration ; 947C AD 46 06 .F. bne wait_sfx ; 947F D0 FB .. lda #$01 ; 9481 A9 01 .. sta start_key_enabled ; 9483 8D C8 06 ... @@ -3105,11 +3110,11 @@ hang_main_thread: option_key_handler: lda #$00 ; 9489 A9 00 .. sta option_key_enabled ; 948B 8D C6 06 ... - lda $B8 ; 948E A5 B8 .. + lda zp_temp4 ; 948E A5 B8 .. clc ; 9490 18 . adc #$01 ; 9491 69 01 i. and #$03 ; 9493 29 03 ). - sta $B8 ; 9495 85 B8 .. + sta zp_temp4 ; 9495 85 B8 .. tay ; 9497 A8 . lda number_names_0,y ; 9498 B9 DD 95 ... sta $381D ; 949B 8D 1D 38 ..8 @@ -3125,9 +3130,9 @@ option_key_handler: sta HSCROL ; 94B9 8D 04 D4 ... play_opt_key_sfx: lda #$B0 ; 94BC A9 B0 .. - sta sfx_ptr ; 94BE 8D 3C 06 .<. + sta snd_ptr ; 94BE 8D 3C 06 .<. lda #$8A ; 94C1 A9 8A .. - sta sfx_ptr+1 ; 94C3 8D 3D 06 .=. + sta snd_ptr+1 ; 94C3 8D 3D 06 .=. jsr cue_sfx_jv ; 94C6 20 06 80 .. lda #$00 ; 94C9 A9 00 .. sta jiffy_timer_1 ; 94CB 8D 1A 06 ... @@ -3143,19 +3148,19 @@ wait_opt_key_sfx: ; ---------------------------------------------------------------------------- ; loop up to 4 times, ask PLAYER #n SPEED? and wait for number key press get_player_speeds: - lda $B8 ; 94DE A5 B8 .. - sta $B9 ; 94E0 85 B9 .. + lda zp_temp4 ; 94DE A5 B8 .. + sta zp_temp5 ; 94E0 85 B9 .. sta number_of_users ; 94E2 8D FF 06 ... sta users_still_alive ; 94E5 8D F4 06 ... lda #$00 ; 94E8 A9 00 .. - sta $B8 ; 94EA 85 B8 .. + sta zp_temp4 ; 94EA 85 B8 .. ; disable start and option keys disable_start_opt: sta option_key_enabled ; 94EC 8D C6 06 ... sta start_key_enabled ; 94EF 8D C8 06 ... - sta $BA ; 94F2 85 BA .. - inc $B9 ; 94F4 E6 B9 .. - inc $BA ; 94F6 E6 BA .. + sta zp_temp6 ; 94F2 85 BA .. + inc zp_temp5 ; 94F4 E6 B9 .. + inc zp_temp6 ; 94F6 E6 BA .. tay ; 94F8 A8 . ; copy PLAYER #n SPEED? to screen RAM show_player_speed_prompt: @@ -3167,12 +3172,12 @@ psprompt_loop: iny ; 9502 C8 . cpx #$14 ; 9503 E0 14 .. bne psprompt_loop ; 9505 D0 F4 .. - lda $BA ; 9507 A5 BA .. + lda zp_temp6 ; 9507 A5 BA .. sta current_user ; 9509 8D FE 06 ... ora #$90 ; 950C 09 90 .. - inc $BA ; 950E E6 BA .. + inc zp_temp6 ; 950E E6 BA .. sta $3821,y ; 9510 99 21 38 .!8 - dec $B9 ; 9513 C6 B9 .. + dec zp_temp5 ; 9513 C6 B9 .. bne show_player_speed_prompt ; 9515 D0 E2 .. ; set select key vector to ask_num_players at $9400, enable select key setup_select_key_vec_again: @@ -3181,7 +3186,7 @@ setup_select_key_vec_again: lda #$94 ; 951C A9 94 .. sta select_key_vec+1 ; 951E 8D C3 06 ... sta select_key_enabled ; 9521 8D C7 06 ... - dec $BA ; 9524 C6 BA .. + dec zp_temp6 ; 9524 C6 BA .. ldy #$12 ; 9526 A0 12 .. ldx #$00 ; 9528 A2 00 .. ; initialize speed to -1 @@ -3212,8 +3217,8 @@ display_speed: clc ; 9546 18 . adc #$14 ; 9547 69 14 i. tay ; 9549 A8 . - inc $B8 ; 954A E6 B8 .. - dec $BA ; 954C C6 BA .. + inc zp_temp4 ; 954A E6 B8 .. + dec zp_temp6 ; 954C C6 BA .. bne init_speed ; 954E D0 DA .. inc number_of_users ; 9550 EE FF 06 ... lda number_of_users ; 9553 AD FF 06 ... @@ -3232,16 +3237,16 @@ numplayer_display_list: ; DLI service routine, changes COLPF2, address gets stored in $6ae/$6af by code at $944e num_players_dli_service: pha ; 9578 48 H - lda $B7 ; 9579 A5 B7 .. - cmp $B8 ; 957B C5 B8 .. + lda zp_temp3 ; 9579 A5 B7 .. + cmp zp_temp4 ; 957B C5 B8 .. sta WSYNC ; 957D 8D 0A D4 ... bne L9592 ; 9580 D0 10 .. - lda $062A ; 9582 AD 2A 06 .*. + lda rot_color ; 9582 AD 2A 06 .*. sta COLPF2 ; 9585 8D 18 D0 ... -L9588: inc $B7 ; 9588 E6 B7 .. - lda $B7 ; 958A A5 B7 .. +L9588: inc zp_temp3 ; 9588 E6 B7 .. + lda zp_temp3 ; 958A A5 B7 .. and #$03 ; 958C 29 03 ). - sta $B7 ; 958E 85 B7 .. + sta zp_temp3 ; 958E 85 B7 .. pla ; 9590 68 h rti ; 9591 40 @ @@ -3286,7 +3291,10 @@ number_names_4: ; played when select key pressed, 4 notes, descending sfx_select_key: .byte $01,$A4,$00,$1D,$08,$3C,$08,$79 ; 95F1 01 A4 00 1D 08 3C 08 79 .....<.y - .byte $08,$F3,$08,$00,$3C,$02,$00 ; 95F9 08 F3 08 00 3C 02 00 ....<.. + .byte $08,$F3,$08,$00 ; 95F9 08 F3 08 00 .... +; not sure what (if anything) reads this, it might be filler. it isn't valid 6502 code. +unknown_95fd: + .byte $3C,$02,$00 ; 95FD 3C 02 00 <.. ; ---------------------------------------------------------------------------- ; multiple code paths jump here. replay level, load next level, or go back to ask_num_players afterlife: @@ -3322,7 +3330,7 @@ L9632: lda L9713,y ; 9632 B9 13 97 ora #$10 ; 963E 09 10 .. sta $074A ; 9640 8D 4A 07 .J. lda #$00 ; 9643 A9 00 .. - sta $B9 ; 9645 85 B9 .. + sta zp_temp5 ; 9645 85 B9 .. sta jiffy_timer_2 ; 9647 8D 1B 06 ... ; 06ac/06ad gets address of get_ready_dlist (why not SDLSTL/H?) setup_get_ready_dl: @@ -3497,7 +3505,7 @@ mj_clear_loop: sta $0697 ; 9791 8D 97 06 ... sta $0698 ; 9794 8D 98 06 ... sta PCOLR0 ; 9797 8D C0 02 ... - sta $BA ; 979A 85 BA .. + sta zp_temp6 ; 979A 85 BA .. sta AUDF4 ; 979C 8D 06 D2 ... lda work_level_y_start ; 979F AD 8C 07 ... sta player_y_pos ; 97A2 8D 83 06 ... @@ -3510,9 +3518,9 @@ mj_clear_loop: inc $066A ; 97B5 EE 6A 06 .j. inc $066B ; 97B8 EE 6B 06 .k. mj_set_freq_and_color: - inc $BA ; 97BB E6 BA .. + inc zp_temp6 ; 97BB E6 BA .. beq mj_done ; 97BD F0 1C .. - lda $BA ; 97BF A5 BA .. + lda zp_temp6 ; 97BF A5 BA .. sta AUDF4 ; 97C1 8D 06 D2 ... lsr a ; 97C4 4A J lsr a ; 97C5 4A J @@ -3664,9 +3672,9 @@ L98AD: clc ; 98AD 18 ; horizontal movement play_sfx_walk: lda #$73 ; 98C1 A9 73 .s - sta sfx_slot_priority ; 98C3 8D 3E 06 .>. + sta snd_slot_priority ; 98C3 8D 3E 06 .>. lda #$BE ; 98C6 A9 BE .. - sta sfx_slot_timer ; 98C8 8D 3F 06 .?. + sta snd_slot_timer ; 98C8 8D 3F 06 .?. lda #$01 ; 98CB A9 01 .. jsr cue_sfx_lowprior_jv ; 98CD 20 03 80 .. L98D0: lda sav_p0pf ; 98D0 AD B4 06 ... @@ -4072,7 +4080,7 @@ dli_chained_2: lda #$00 ; 9B88 A9 00 .. sta WSYNC ; 9B8A 8D 0A D4 ... sta COLBK ; 9B8D 8D 1A D0 ... - lda $062A ; 9B90 AD 2A 06 .*. + lda rot_color ; 9B90 AD 2A 06 .*. sta COLPF0 ; 9B93 8D 16 D0 ... lda #$28 ; 9B96 A9 28 .( sta COLPF1 ; 9B98 8D 17 D0 ... @@ -5776,9 +5784,9 @@ LA50F: lda RANDOM ; A50F AD 0A D2 lda #$08 ; A518 A9 08 .. sta current_speed ; A51A 8D 24 06 .$. lda #$2D ; A51D A9 2D .- - sta sfx_slot_priority ; A51F 8D 3E 06 .>. + sta snd_slot_priority ; A51F 8D 3E 06 .>. lda #$A5 ; A522 A9 A5 .. - sta sfx_slot_timer ; A524 8D 3F 06 .?. + sta snd_slot_timer ; A524 8D 3F 06 .?. lda #$01 ; A527 A9 01 .. jsr cue_sfx_lowprior_jv ; A529 20 03 80 .. rts ; A52C 60 ` @@ -6061,9 +6069,9 @@ LA882: tya ; A882 98 pha ; A88C 48 H play_hellstone_sfx: lda #$0D ; A88D A9 0D .. - sta sfx_slot_priority ; A88F 8D 3E 06 .>. + sta snd_slot_priority ; A88F 8D 3E 06 .>. lda #$A9 ; A892 A9 A9 .. - sta sfx_slot_timer ; A894 8D 3F 06 .?. + sta snd_slot_timer ; A894 8D 3F 06 .?. lda #$03 ; A897 A9 03 .. jsr cue_sfx_lowprior_jv ; A899 20 03 80 .. pla ; A89C 68 h @@ -6279,7 +6287,7 @@ walls_up_rope: .byte $C9,$9C,$50,$08,$0A,$FF ; AAB6 C9 9C 50 08 0A FF ..P... ; ---------------------------------------------------------------------------- walls_sub3: - lda $062A ; AABC AD 2A 06 .*. + lda rot_color ; AABC AD 2A 06 .*. sta COLOR3 ; AABF 8D C7 02 ... rts ; AAC2 60 ` @@ -6495,7 +6503,9 @@ spellbound_table: epyx_jumpman: .byte $40,$29,$21,$11,$19,$11,$09,$01 ; AEAF 40 29 21 11 19 11 09 01 @)!..... .byte $49,$41,$39,$19,$31 ; AEB7 49 41 39 19 31 IA9.1 -LAEBC: .byte $03,$03,$03,$03,$03,$C3,$C3,$7E ; AEBC 03 03 03 03 03 C3 C3 7E .......~ +; player graphics for letters. each letter is 8x8 (8 bytes, 8px/byte), takes up the whole 8x8 cell (no blanks at edges like a normal font would have). no duplicate letters, so this spells 'JUMPANEYX ' (space at the end) +letter_bitmap: + .byte $03,$03,$03,$03,$03,$C3,$C3,$7E ; AEBC 03 03 03 03 03 C3 C3 7E .......~ .byte $C3,$C3,$C3,$C3,$C3,$C3,$C3,$7E ; AEC4 C3 C3 C3 C3 C3 C3 C3 7E .......~ .byte $C3,$C3,$E7,$FF,$DB,$C3,$C3,$C3 ; AECC C3 C3 E7 FF DB C3 C3 C3 ........ .byte $FE,$C3,$C3,$C3,$FE,$C0,$C0,$C0 ; AED4 FE C3 C3 C3 FE C0 C0 C0 ........ @@ -6505,13 +6515,12 @@ LAEBC: .byte $03,$03,$03,$03,$03,$C3,$C3,$7E ; AEBC 03 03 03 03 03 C3 C3 7E .byte $C3,$66,$3C,$18,$18,$18,$18,$18 ; AEF4 C3 66 3C 18 18 18 18 18 .f<..... .byte $C3,$C3,$66,$3C,$3C,$66,$C3,$C3 ; AEFC C3 C3 66 3C 3C 66 C3 C3 ..f<. + sta snd_slot_priority ; B4D5 8D 3E 06 .>. lda #$B5 ; B4D8 A9 B5 .. - sta sfx_slot_timer ; B4DA 8D 3F 06 .?. + sta snd_slot_timer ; B4DA 8D 3F 06 .?. lda #$03 ; B4DD A9 03 .. jsr cue_sfx_lowprior_jv ; B4DF 20 03 80 .. LB4E2: ldy #$01 ; B4E2 A0 01 .. @@ -7096,7 +7105,7 @@ hatch_sub3: ; ---------------------------------------------------------------------------- hatch_sub1: - lda $062A ; B581 AD 2A 06 .*. + lda rot_color ; B581 AD 2A 06 .*. sta PCOLR3 ; B584 8D C3 02 ... rts ; B587 60 ` @@ -7350,13 +7359,13 @@ el_hi_ok: ; play once per life play_life_bonus_sfx: lda #$96 ; B868 A9 96 .. - sta sfx_ptr ; B86A 8D 3C 06 .<. + sta snd_ptr ; B86A 8D 3C 06 .<. lda #$B8 ; B86D A9 B8 .. - sta sfx_ptr+1 ; B86F 8D 3D 06 .=. + sta snd_ptr+1 ; B86F 8D 3D 06 .=. jsr cue_sfx_jv ; B872 20 06 80 .. ; wait for sfx to finish el_wait_sfx: - lda sfx_slot_duration ; B875 AD 46 06 .F. + lda snd_slot_duration ; B875 AD 46 06 .F. ora $0644 ; B878 0D 44 06 .D. bne el_wait_sfx ; B87B D0 F8 .. dec $A6 ; B87D C6 A6 .. @@ -7742,7 +7751,7 @@ wd_wait_music: ; ---------------------------------------------------------------------------- ; 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 .*. + lda rot_color ; BCCD AD 2A 06 .*. sta COLOR2 ; BCD0 8D C6 02 ... lda #$02 ; BCD3 A9 02 .. sta sav_p0pf ; BCD5 8D B4 06 ... -- cgit v1.2.3