Skip to content

Commit eda4219

Browse files
authored
Merge pull request #52 from BrianPugh/disable-triple-boot
Hide RIGHT+GAME triple boot behind option --triple-boot
2 parents a18b29b + 57a635d commit eda4219

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

Core/Src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ gamepad_t read_buttons() {
9393
gamepad = stock_read_buttons();
9494

9595

96+
#if TRIPLE_BOOT
9697
if((gamepad & GAMEPAD_RIGHT) && (gamepad & GAMEPAD_GAME)){
9798
set_bootloader(BANK_1_STACK_2_ADDRESS);
9899
NVIC_SystemReset();
99100
}
101+
#endif
100102
#if CLOCK_ONLY
101103
if(gamepad & GAMEPAD_GAME){
102104
#else

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ ifneq (,$(findstring --debug, $(PATCH_PARAMS)))
8181
C_DEFS += -DDEBUG
8282
endif
8383

84+
ifneq (,$(findstring --triple-boot, $(PATCH_PARAMS)))
85+
C_DEFS += -DTRIPLE_BOOT
86+
endif
87+
8488
ADAPTER ?= stlink
8589

8690
LARGE_FLASH ?= 0

docs/zelda.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Run the following in this repo:
4040

4141
```bash
4242
make clean
43-
make PATCH_PARAMS="--device=zelda --no-la --no-sleep-images" flash
43+
make PATCH_PARAMS="--device=zelda --no-la --no-sleep-images --triple-boot" flash
4444
```
4545

4646
This will setup storage in the following way:
@@ -62,10 +62,5 @@ make -j8 INTFLASH_ADDRESS=0x08020000 EXTFLASH_SIZE=794624 EXTFLASH_OFFSET=330137
6262
In the Zelda3 repo, after copying `zelda3.sfc` to `zelda3/tables/zelda3.sfc`, run the following commands:
6363

6464
```bash
65-
cd zelda3
66-
make tables/zelda3_assets.dat
67-
cd ..
68-
python3 ./scripts/bundle_all_assets.py
69-
python3 ./scripts/update_all_assets.py
7065
make -j8 INTFLASH_BANK=2 EXTFLASH_SIZE=1703936 EXTFLASH_OFFSET=868352 ADAPTER=stlink GNW_TARGET=zelda flash
7166
```

patch.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def main():
7373
action="store_true",
7474
help="Enable OTFDEC for the main extflash binary.",
7575
)
76+
parser.add_argument(
77+
"--triple-boot",
78+
action="store_true",
79+
help="Enable RIGHT+GAME to launch 0x08020000.",
80+
)
7681
parser.add_argument(
7782
"--compression-ratio",
7883
type=float,

0 commit comments

Comments
 (0)