Skip to content

Commit

Permalink
Fix useless selection to deploy Merlinus before chapter begin caused …
Browse files Browse the repository at this point in the history
…by isStorageAvailableInPrepScreen().
  • Loading branch information
laqieer committed Aug 20, 2022
1 parent 7325dea commit 896baca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions linkerscript/storage.lds
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. = 0x808f834;
.text.isStorageAvailableInPrepScreen : {*(.text.isStorageAvailableInPrepScreen)}
. = 0x808f863;
.rodata.unlockStorageInPrepScreen : {*(.rodata.unlockStorageInPrepScreen)}
. = 0x8023198;
.text.isStorageAvailableInActionMenu : {*(.text.isStorageAvailableInActionMenu)}
. = 0x802ece4;
Expand Down
9 changes: 5 additions & 4 deletions source/storage.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include <tonc.h>

// Always allow storage to be accessed in prep screen
int isStorageAvailableInPrepScreen()
{
return TRUE;
}
// 00 29: cmp r1, #0
// 03 D1: bne ...
// -> 03 E0: beq ...
cu8 unlockStorageInPrepScreen = 0xE0;

// Always allow storage to be accessed in action menu
int isStorageAvailableInActionMenu()
{
Expand Down

0 comments on commit 896baca

Please sign in to comment.