Skip to content

Commit

Permalink
Standardize wait time in dump/ntrboot context
Browse files Browse the repository at this point in the history
  • Loading branch information
SciresM committed Jun 4, 2017
1 parent 2069848 commit 10deb2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build_boot9strap_firm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def main(argc, argv):
b9s.write(struct.pack('<III', 0x00000000, 0x1FF80200, 0x08001000))
b9s.write(b'\x00' * 0x2C)
# Write version value
b9s.write(b'\x01')
b9s.write(b'\x02')
# Write boot9strap magic value
b9s.write(b'B9S')
ofs = 0x200
Expand Down
8 changes: 4 additions & 4 deletions stage2/arm9/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ void main(void)
{
setupKeyslots();



if(mountSd())
{
/* I believe this is the canonical secret key combination. */
Expand All @@ -86,6 +84,7 @@ void main(void)

/* Wait until buttons are not held, for compatibility. */
while(HID_PAD & NTRBOOT_BUTTONS);
wait(1000ULL);
}

loadFirm(false);
Expand All @@ -94,10 +93,11 @@ void main(void)

if(mountCtrNand())
{
if(HID_PAD == NTRBOOT_BUTTONS && !(i2cReadRegister(I2C_DEV_MCU, 0xF) & 2))
/* Wait until buttons are not held, for compatibility. */
if(HID_PAD == NTRBOOT_BUTTONS)
{
while(HID_PAD & NTRBOOT_BUTTONS);
wait(2000ULL);
wait(1000ULL);
}
loadFirm(true);
}
Expand Down

0 comments on commit 10deb2a

Please sign in to comment.