.DEFINE reg_joypad ($00) .DEFINE reg_interrupt_flags ($0f) .DEFINE reg_lcd_controller ($40) .DEFINE reg_lcd_status ($41) .DEFINE reg_lyc ($45) .DEFINE reg_viewport_y ($42) .DEFINE reg_viewport_x ($43) .DEFINE reg_bg_palette ($47) .DEFINE reg_obj0_palette ($48) .DEFINE reg_obj1_palette ($49) .DEFINE reg_interrupt_enable ($ff) .DEFINE VRAM_start $8000 .DEFINE OAM_start $FE00 .DEFINE dungeon_generation_step $20 .DEFINE intial_duplication_probablity $01 .DEFINE mem_button_direction ($c002) .DEFINE mem_button_action ($c003) .DEFINE mem_moving_animation_step ($c004) ; frame 0 (or 1 ?): movement can be initiated when with button actions ; frame 2: applying bunny attack damages ; frame 3: checking entities health and death if 0 ; frame 4: new entity spawn ; frame 5: entity collision map is being updated ; frame 15: movement is ended and coordinates are updated .DEFINE mem_bunny_sprite ($cb00) .DEFINE mem_bunny_x ($cb01) .DEFINE mem_bunny_y ($cb02) .DEFINE mem_bunny_direction ($cb03) ; aaaamddd: a = animation, m = is_moving, d = direction ; animations: ; nothing = 0 ; action = 1 ; death = 2 ; superjump = 3 ; shaking = 4 ; blinking = 5 (Blink with both loading steps and animation step) .DEFINE mem_bunny_health ($cb06) .DEFINE mem_bunny_flags ($cb07) .DEFINE mem_bunny_status ($cb08) .DEFINE mem_viewport_x ($c008) .DEFINE mem_viewport_y ($c009) .DEFINE mem_rng_state_1 ($c00a) ; 2 bytes .DEFINE mem_rng_state_2 ($c00b) ; 2 bytes .DEFINE mem_map_loading_flags ($c00c) ; bit 0: if the object should be reloaded (scroll or first load) ; bit 1: has a movement ended (objects interaction should be checked, entities should update their positions) ; bit 2: if the prepared block should be updated at the next frame ; bit 3: animation step is going up (?) .DEFINE mem_prepared_block_tile ($c00d) .DEFINE mem_prepared_block_position_1 ($c00e) .DEFINE mem_prepared_block_position_2 ($c00f) .DEFINE mem_object_load_counter ($c010) .DEFINE mem_prepared_viewport_x ($c011) .DEFINE mem_prepared_viewport_y ($c012) .DEFINE mem_display_flag ($c013) ; bit 0: if dialogue box is displayed ; bit 1: dialogue box first line should be bold ; bit 2: if dialogue box text should be refreshed .DEFINE mem_current_mode ($c014) .DEFINE mem_requested_mode ($c015) .DEFINE enum_dungeon_mode $00 .DEFINE enum_dungeon_menu_mode $01 .DEFINE enum_dungeon_dialogue_mode $02 .DEFINE enum_loading_mode $03 .DEFINE enum_dead_mode $0 .DEFINE mem_menu_cursor_position ($c016) .DEFINE mem_last_button_direction ($c017) .DEFINE dialogue_menu_choice1_routine $c018 ; Takes also $c019 .DEFINE dialogue_menu_choice2_routine $c01a ; Takes also $c01b .DEFINE dialogue_menu_choice3_routine $c01c ; Takes also $c01d .DEFINE dialogue_menu_choice3_routine $c01e ; Takes also $c01f .DEFINE mem_last_button_action ($c020) .DEFINE mem_loading_step ($c021) .DEFINE mem_prepared_loading_block_tile ($c022) .DEFINE mem_prepared_loading_block_position_1 ($c023) .DEFINE mem_prepared_loading_block_position_2 ($c024) .DEFINE mem_loading_mode_vblank_func_pointer_high ($c025) .DEFINE mem_loading_mode_vblank_func_pointer_low ($c026) .DEFINE mem_loading_mode_regular_func_pointer_high ($c027) .DEFINE mem_loading_mode_regular_func_pointer_low ($c028) .DEFINE mem_prepared_color_palette ($c029) .DEFINE mem_bunny_current_room_idx ($c02a) .DEFINE mem_enemies_alive_count ($c02b) .DEFINE mem_next_free_head_lower_bytes ($c6ff) .DEFINE mem_dungeon_generation_heads $c700 ; Takes the memory from c700 to c717 ; struct head { ; direction: u8 (really u3 but padding), ; x: u8, ; y: u8, ; } ; a bit of 1 is equivalent to an entity being on the tile .DEFINE mem_entities_collisions $c780 ; Takes the memory from c780 to c7ff ; a bit of 1 is equivalent to the tile being free .DEFINE mem_dungeon_map $c800 ; Takes the memory from c800 to c87f .DEFINE mem_room_list $c880 ; Takes the memory from c880 to c89f ; struct room { ; x: u8, ; sizex: u8, ; y: u8, ; sizey: u8, ; } .DEFINE mem_number_of_rooms ($c8a0) .DEFINE mem_loaded_entities_indices $c8a8 ; Takes the memory from $c8a8 to $c8ae .DEFINE mem_loaded_enemies_indices $c8ab ; Takes the memory from $c8ab to $c8ae .DEFINE mem_loaded_entities_indices_end $c8af ; Takes the memory from $c8a8 to $c8ae .DEFINE mem_object_list $c900 ; Takes the memory from c900 to c97f ; struct objects { ; sprite: u8, ; x: u8, ; y: u8, ; interaction_jump_table_index: u8 ; _padding: u32 ; } .DEFINE mem_oam_buffer $ca00 ; Until $ca9f .DEFINE mem_oam_buffer_low ($c980) .DEFINE dialogue_buffer $caa0 ; Until $cad6 .DEFINE dialogue_first_line $caa0 .DEFINE dialogue_second_line $cab2 .DEFINE dialogue_third_line $cac4 .DEFINE dialogue_menu_choice1 $caa1 .DEFINE dialogue_menu_choice2 $caaa .DEFINE dialogue_menu_choice3 $cac5 .DEFINE dialogue_menu_choice4 $cace .DEFINE dialogue_menu_choice1_cursor ($9dc1) .DEFINE dialogue_menu_choice2_cursor ($9dca) .DEFINE dialogue_menu_choice3_cursor ($9e01) .DEFINE dialogue_menu_choice4_cursor ($9e0a) .DEFINE mem_last_animation_low_pointer ($cadf) .DEFINE mem_animation_list $cae0; Until $caef ; struct animation { ; jump_table_index: u8, ; x: u8, ; y: u8, ; step: u8, ; } .DEFINE mem_entities_list $cb00 ; Until cbff ; struct entity { ; sprite: u8, ; x: u8, ; y: u8, ; direction: u8 (animation = bit 7-4, bit 3 = is_moving, bit 2-0: direction), ; turn_function_jump_table_index: u8 ; action_function_jump_table_index: u8 ; health: u8 (DAA decimal !!) ; flags: u8 ; bit 0: speed 2x ; bit 1: shadow mode ; status: u8 ; ; bit 0: whether or not turns should be skipped ; _padding: u56 ; ; # SANTA CHRISTMAS LIST PLEASE # ; health, max health, list of possible attacks, maybe remaining attacks ? AI status (blind, scared, slow, etc..) ; } .DEFINE dbg_VBLANK_STATE ($dfff) .DEFINE enum_direction_left $01 .DEFINE enum_direction_right $02 .DEFINE enum_direction_up $03 .DEFINE enum_direction_down $04 .DEFINE palette_normal $e4 .DEFINE palette_black $ff .DEFINE palette_white $94 .DEFINE palette_bold_font $f4 .DEFINE palette_thin_font $c4 .DEFINE obj_palette_normal $d3 .DEFINE obj_palette_frozen $ab .DEFINE lcdc_window_enabled $8d .DEFINE lcdc_window_disabled $87 ; HIGH_RAM: ; ; 80-85 ; Free to use as temporary variables .DEFINE tmp_var_1 ($80) .DEFINE tmp_var_2 ($81) .DEFINE tmp_var_3 ($82) .DEFINE tmp_var_4 ($83) .DEFINE tmp_var_5 ($84) .DEFINE tmp_var_6 ($85) ; 86-90 ; OAM_DMA_Transfer_routine .DEFINE OAM_DMA_Transfer_routine $ff86 ; 90-fe ; Stack