From 3539d9a91e5252054806193ca812eb230df5d440 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 3 Sep 2016 20:50:05 -0400 Subject: check_extra_life --- main.info | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) (limited to 'main.info') diff --git a/main.info b/main.info index ff22455..c1f7a77 100644 --- a/main.info +++ b/main.info @@ -46,8 +46,9 @@ label { name "dli_chained_1"; addr $9B72; comment "changes DLI vector to point t label { name "dli_chained_2"; addr $9B87; comment "changes DLI vector to point to dli_chained_3"; }; label { name "dli_chained_3"; addr $9BB1; comment "changes DLI vector to point to dli_chained_1"; }; label { name "update_color_regs"; addr $840F; comment "update color regs from shadow regs (X ranges 1 to 9, GRAFM+1 is COLPM0, $2bf+1 is PCOLR0)"; }; -label { name "update_score_display"; addr $8CBC; comment "also adds extra life every 7500 points"; }; -label { name "update_score_display_jv"; addr $800C; comment "also adds extra life every 7500 points"; }; +label { name "save_flags"; addr $8CDB; comment "we have to preserve the carry flag!"; }; +label { name "check_extra_life"; addr $8CBC; comment "should be called every time the score is updated, adds extra life every 7500 points. notice the score and threshold are both 3 bytes, and we compare from high byte to low."; }; +label { name "check_extra_life_jv"; addr $800C; comment "should be called every time the score is updated, adds extra life every 7500 points"; }; label { name "score_mod_1m"; addr $B7C0; comment "roll over the score if it's >= 1 million"; }; label { name "score_below_1m"; addr $B7EE; }; label { name "spellbound_letters"; addr $AF58; comment "called at end of Spellbound, adds up letter bonus"; }; @@ -121,6 +122,8 @@ label { name "check_collisions_3"; addr $9832; size 1; comment "movement/jumping label { name "special_init"; addr $8B23; comment "various levels use this as their init, or use an init that calls this"; }; label { name "special_init_jv"; addr $8036; comment "various levels use this as their init, or use an init that calls this"; }; label { name "si_clear"; addr $8B27; comment "clear memory from $0760 to $077f"; }; +label { name "si_done"; addr $8B7A; }; +label { name "si_loop"; addr $8B39; }; label { name "special_init_2"; addr $8B2D; comment "special_init that doesn't clear memory. does anything use this entry point?"; }; label { name "special_init_2_jv"; addr $8039; comment "special_init that doesn't clear memory. unused vector?"; }; label { name "next_player"; addr $9AAA; comment "used in multiplayer games, also called in single player (?)"; }; @@ -320,7 +323,7 @@ range { name "mul_25_table"; start $b8a7; end $b8be; type wordtable; comment "mu range { name "falling_table_1"; start $8a39; end $8a7f; type bytetable; }; label { name "falling_table_2"; addr $8A42; }; label { name "play_sfx_death"; addr $8936; }; -range { name "data_table_86da"; start $86da; end $8713; type bytetable; }; +range { name "status_window_contents"; start $86da; end $8713; type bytetable; comment "40 bytes, or 2 GR.1 lines of screen codes"; }; label { name "pnum_subtractors"; addr $8702; size 18; comment "3 bytes per table entry"; }; range { name "level_name_hscrol_table"; start $BBF0; end $BBff; type bytetable; comment "used for centering level name on gameboard"; }; range { name "zero_filler_b8bf"; start $b8bf; end $b96a; type bytetable; }; @@ -341,6 +344,7 @@ range { name "code_bccd"; start $bccd; end $bcd8; type code; comment "dunno, but 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."; }; 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"; }; @@ -581,7 +585,9 @@ 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 "funky_init_loop"; addr $90C8; comment "lot going on here, not understood yet"; }; -label { name "end_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 "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."; }; +label { name "smsg_loop"; addr $8B91; }; label { name "read_joystick"; addr $84AC; comment "always joystick #1 (all players use the same joystick and pass it around)"; }; label { name "check_joystick_enabled"; addr $84A4; comment "read the joystick if not disabled"; }; label { name "fake_read_trigger"; addr $84CD; comment "??"; }; @@ -601,19 +607,23 @@ label { name "init_hardware"; addr $837c; }; label { name "init_page6_loop"; addr $837e; }; # these are so far only for player 1 -label { name "number_of_players"; addr $06f4; size 1; comment "0 for single-player game, otherwise range 1-3 (2 to 4 players)"; }; -label { name "score_minus_one"; addr $06ff; size 1; }; -label { name "score"; addr $0700; size 3; comment "aka work_user, 11 bytes"; }; +label { name "users_still_alive"; addr $06f4; size 1; comment "I *think* that's what this is for."; }; +label { name "number_of_users"; addr $06ff; size 1; comment "number of players selected at start of game. also this is score-1, if you see it being 1-indexed with X reg"; }; label { name "level"; addr $06f6; size 1; }; + +# this stuff is also going to be called work_user (an 11-byte struct) +label { name "score"; addr $0700; size 3; comment "aka work_user, 11 bytes"; }; +label { name "next_extra_life"; addr $0703; size 3; comment "initialized to $4c,$1d (aka 7500), 7500 is added whenever an extra life is given"; }; label { name "lives"; addr $070a; size 1; }; + label { name "struct_user_1"; addr $070b; comment "11 bytes"; }; label { name "struct_user_2"; addr $0716; comment "11 bytes"; }; label { name "struct_user_3"; addr $0721; comment "11 bytes"; }; label { name "struct_user_4"; addr $072c; comment "11 bytes"; }; -label { name "current_player"; addr $06fe; size 1; comment "*think* this ranges 1-4, not 0-3"; }; -label { name "player_speed"; addr $0624; size 1; }; -label { name "initial_speed"; addr $0625; size 1; }; +label { name "current_user"; addr $06fe; size 1; comment "this ranges 1-4, not 0-3"; }; +label { name "current_speed"; addr $0624; size 1; comment "can be modified, e.g. set to $08 when being electrocuted"; }; +label { name "initial_speed"; addr $0625; size 1; comment "current user's chosen speed, set at game start"; }; label { name "setup_dli_2"; addr $bc3f; size 1; comment "load dli_service_2 address into dli shadow"; }; label { name "silence_audio"; addr $875B; size 1; comment "set all AUDFx to 0"; }; label { name "sa_loop"; addr $875F; size 1; }; @@ -658,6 +668,7 @@ label { name "start_key_enabled"; addr $06C8; size 1; comment "non-zero = jump t label { name "select_key_enabled"; addr $06C7; size 1; comment "non-zero = jump through start_key_vec if start key pressed (checked by vblank_imm_isr)"; }; label { name "option_key_enabled"; addr $06C6; size 1; comment "non-zero = jump through start_key_vec if start key pressed (checked by vblank_imm_isr)"; }; label { name "zp_temp1"; addr $cb; size 2; comment "used for (zp,y) addressing, also for checking console keys in vblank_imm_isr"; }; +label { name "zp_temp2"; addr $ae; size 2; comment "used for (zp,y) addressing, also 2 temps for scores_screen"; }; label { name "hang_main_thread"; addr $9486; size 1; comment "initialization done, everything's done in interrupts from here on out"; }; label { name "option_key_handler"; addr $9489; size 1; comment "called via option_key_vec when someone presses option"; }; @@ -720,9 +731,13 @@ label { name "isu_next_su"; addr $9A5E; }; label { name "isu_next_byte"; addr $9A60; }; range { name "struct_users_init_contents"; start $9A71; end $9a7b; type bytetable; comment "work_user and struct_user_1 to _4 are initialized to this"; }; range { name "data_af10"; start $AF10; end $AF1B; type bytetable; comment "looks almost like code but it's bogus"; }; -range { name "l_equals"; start $8CFD; end $8CFF; type bytetable; comment "L= (for lives display)"; }; -label { name "add_extra_life"; addr $8CE4; comment "plays sfx_extra_life"; }; -label { name "show_l_equals"; addr $8CCE; comment "L= (for lives display)"; }; +range { name "extra_life_points"; start $8CFD; end $8CFF; type bytetable; comment "3 bytes, value 7500 decimal, give an extra life after this many points. not copied to RAM, meaning no level can change this."; }; +label { name "chk_next_byte"; addr $8CBE; comment "number_of_users should be score-1 here. score+2 should be next_extra_life-1 also."; }; +label { name "chk_done"; addr $8CFA; }; +label { name "add_extra_life"; addr $8CCE; comment "first, calculate & store the next 7500-point target"; }; +label { name "add_next_byte"; addr $8CD1; }; +label { name "score_byte_ge"; addr $8CCB; comment "if it's greater or equal and X!=0, keep looping"; }; +label { name "inc_lives"; addr $8CE4; comment "add 1 life, play sfx_extra_life"; }; label { name "show_lives_icons"; addr $86BB; comment "up to 6 jumpmen, and a + if lives > 6. char $C1 = jumpman icon, $CB = plus sign"; }; label { name "show_current_player"; addr $86A7; comment "1 to 4"; }; label { name "update_status_window"; addr $8694; comment "bottom 2 GR.1 lines on the game board"; }; @@ -741,7 +756,7 @@ label { name "print_bonus_jv"; addr $800F; comment "print remaining bonus time"; label { name "pnum_done"; addr $8667; }; label { name "next_digit"; addr $8607; comment "starts at 0, gets added to"; }; label { name "print_score"; addr $8668; }; -label { name "ps_loop"; addr $8672; }; +label { name "ps_loop"; addr $8672; comment "number_of_users should be score-1 here."; }; label { name "pb_loop"; addr $8688; }; label { name "draw_map"; addr $8049; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt. caller must set $C0/$C1 to the address of the map data. modders beware: bogus map data can & will cause infinite loops."; }; label { name "draw_map_jv"; addr $8000; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt."; }; -- cgit v1.2.3