Skip to content

Commit

Permalink
zl cs sets time of day correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
fig02 committed Jan 1, 2019
1 parent 550b33a commit e8ed08d
Show file tree
Hide file tree
Showing 5 changed files with 977 additions and 854 deletions.
91 changes: 46 additions & 45 deletions ASM/build/asm_symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -917,51 +917,52 @@
80403178 @@return
80403190 warp_speedup
804031FC @@return
80403204 Shop_Check_Sold_Out
80403250 @@return
80403258 Shop_Set_Sold_Out
80403290 @@return
80403298 Shop_Keeper_Init_ID
804032B4 @@return
804032C4 Deku_Check_Sold_Out
804032E8 @@continue
80403318 Deku_Set_Sold_Out
8040333C @@continue
80403370 before_game_state_update_hook
80403394 item_menu_description_id_periodic
804033A8 @@item_menu_description_id_return_00000000
804033B0 item_menu_description_id_immediate_1
804033C4 @@item_menu_description_id_return_00000001
804033CC item_menu_description_id_immediate_2
804033E0 @@item_menu_description_id_return_00000002
804033E8 item_menu_description_id_immediate_3
804033FC @@item_menu_description_id_return_00000003
80403404 after_time_travel
8040343C @@return
80403444 suns_song_fix_event
80403478 @@child
80403488 @@return
80403490 suns_song_fix
804034A4 @@check_suns_status
804034C0 @@disable_suns
804034C8 @@return
804034D0 warp_song_fix
804034FC @@child
8040350C @@return
80403514 Check_Has_Epona_Song
80403560 @@return
80403568 save_scarecrow_song
804035AC @@copy_song
804035B4 empty_bomb_fix
804035F0 @@return
804035F8 qb_draw
8040361C write_initial_save
80403628 @@save_data_loop
80403658 @@overwrite_type
80403660 @@return
80403668 bgs_fix
80403678 truth_spinner_fix
8040368C .byt:09C4
80403204 zelda_tod
80403238 Shop_Check_Sold_Out
80403284 @@return
8040328C Shop_Set_Sold_Out
804032C4 @@return
804032CC Shop_Keeper_Init_ID
804032E8 @@return
804032F8 Deku_Check_Sold_Out
8040331C @@continue
8040334C Deku_Set_Sold_Out
80403370 @@continue
804033A4 before_game_state_update_hook
804033C8 item_menu_description_id_periodic
804033DC @@item_menu_description_id_return_00000000
804033E4 item_menu_description_id_immediate_1
804033F8 @@item_menu_description_id_return_00000001
80403400 item_menu_description_id_immediate_2
80403414 @@item_menu_description_id_return_00000002
8040341C item_menu_description_id_immediate_3
80403430 @@item_menu_description_id_return_00000003
80403438 after_time_travel
80403470 @@return
80403478 suns_song_fix_event
804034AC @@child
804034BC @@return
804034C4 suns_song_fix
804034D8 @@check_suns_status
804034F4 @@disable_suns
804034FC @@return
80403504 warp_song_fix
80403530 @@child
80403540 @@return
80403548 Check_Has_Epona_Song
80403594 @@return
8040359C save_scarecrow_song
804035E0 @@copy_song
804035E8 empty_bomb_fix
80403624 @@return
8040362C qb_draw
80403650 write_initial_save
8040365C @@save_data_loop
8040368C @@overwrite_type
80403694 @@return
8040369C bgs_fix
804036AC truth_spinner_fix
804036C0 .byt:0990
80405000 disp_buf_init,00000018
80405018 sprite_bytes_per_tile,00000028
80405040 sprite_bytes,00000030
Expand Down
18 changes: 18 additions & 0 deletions ASM/src/cutscenes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,21 @@ warp_speedup:
@@return:
jr ra
nop


zelda_tod:
ori t7, t6, 0x0001

addiu sp, sp, -0x20
sw t0, 0x04(sp)
sw t1, 0x08(sp)

la t0, 0x8011A5D0 ;save context
li t1, 0x8000 ;value
sh t1, 0x0C(t0) ;time1
sh t1, 0x141A(t0) ;time2

lw t1, 0x08(sp)
lw t0, 0x04(sp)
jr ra
addiu sp, sp, 0x20
10 changes: 10 additions & 0 deletions ASM/src/hacks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,13 @@
.org 0xAEB68C ; In Memory: 0x8007572C
jal qb_draw
nop

;==================================================================================================
; ZL Time of Day
;==================================================================================================
;
; Replaces: lui a3, 0x3F80
;
.org 0xEFC7B8
jal zelda_tod
lui a3, 0x3F80
43 changes: 43 additions & 0 deletions Notes/figs notes/zelda
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
zelda
enzl4

01D3 En_Zl4 00EFC410 00F00E40 80B80CF0 80B85720

function runs for a few frames when loading

801F04FC - 801F0170

overlay + 38C

target: overlay+3A8

diisplaced
lui a3, 0x3F80

li t0, 0x8000 ;set init time of day to 0x8000
sh t0, 0x0C(a1)
sh t0, 0x141A(a1)

relative from 8011A5D0


.org 0xEFC7B8
jal zl_time
lui a3, 0x3F80

zl_time:
ori t7, t6, 0x0001 ;displaced

addiu sp, sp, -0x20
sw t0, 0x04(sp)
sw t1, 0x08(sp)

la t0, 0x8011A5D0 ;save context
li t1, 0x8000 ;value
sh t0, 0x0C(a1) ;time1
sh t0, 0x141A(a1) ;time2

lw t1, 0x08(sp)
lw t0, 0x04(sp)
jr ra
addiu sp, sp, 0x20
Loading

0 comments on commit e8ed08d

Please sign in to comment.