(Request) Could someone make a A9LH usable payload that turns off the 3ds when booted into?

Discussion in '3DS - Flashcards & Custom Firmwares' started by SirBeethoven, Apr 26, 2016.

  1. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    Wolfvac made a couple different shutdown.bins for A9LH. Would anyone be willing to help me test them out? I haven't gotten them to run properly yet. The payloads are on the first and second page.

    Could someone make a A9LH usable payload that turns off the 3ds when booted into?
     
    Last edited by SirBeethoven, Apr 26, 2016
  2. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    1,512
    815
    Feb 2, 2014
    United States
    I don't see the purpose of this, though maybe i'm missing something??
     
  3. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    I'm using a boot manager that works with combos. I'd like to shutdown my 3DS if I try L+R+UP+A (Recovery Mode) because it'll brick. I'm aware that Luma blocks that but I use a different A9LH fork
     
  4. Link.

    Link. Newbie

    Newcomer
    5
    10
    Jan 23, 2016
    United States
    Perhaps this?


    But honestly, if you want to have the 3DS shut down on boot (for prank or other reasons), why don't you just remove the SD card? Arm9LoaderHax will shut the 3DS down upon boot if you do that.

    Edited for formatting, but I see that the above suggestion won't work for you.
     
    Last edited by Link., Apr 26, 2016
    hobbledehoy899 and SirBeethoven like this.
  5. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    I'm using a N3DS. I'm just trying to make it as safe as possible in case my sister comes around to destroy it
     
  6. Zan'

    Zan' 2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F

    Member
    386
    159
    Oct 8, 2015
    She could just drop it.
    But I guess I get the point of this. I guess you could just use a faulty payload for the time being. Should just crash.
     
  7. zhdarkstar

    zhdarkstar GBAtemp Advanced Fan

    Member
    571
    225
    Jan 30, 2008
    United States
    Actually, integrating Quick Shutdown into an A9LH boot manager as a way to prevent booting into 3DS Recovery Mode would be a useful feature for childproofing. I would like to see it added, as I plan on modding my cousins' 3DSes the next time I go over there.
     
    SirBeethoven likes this.
  8. Wolfvak

    Wolfvak *yawn*

    Member
    808
    1,062
    Oct 25, 2015
    Uruguay
    You can't do that, because FIRM doesn't exist yet when using A9LH.
    If you give me a second I'll be able to upload a little payload that powers off the 3DS, but the gist of it is

    Code:
    i2cWriteRegister(DEVICE_MCU, 0x20, 1);
    — Posts automatically merged - Please don't double post! —

    SaltFW does this by default now
     
    SirBeethoven and daxtsu like this.
  9. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    Since the 3DS OS services aren't running during A9LH, it's not possible to adapt my shutdown homebrew. However, it's one line of code to turn the 3DS off (not counting the code that actually implements i2cWriteRegister):

    Code:
    i2cWriteRegister(I2C_DEV_MCU, 0x20, 1);
    
    A bare-bones A9LH payload could easily be written to do it.

    Edit: Ninja'd.
     
    VinsCool and SirBeethoven like this.
  10. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    Thank you!
     
  11. Wolfvak

    Wolfvak *yawn*

    Member
    808
    1,062
    Oct 25, 2015
    Uruguay
    Done.
    shutdown.bin is the main payload (precompiled), includes source.
     

    Attached Files:

    Swiftloke and SirBeethoven like this.
  12. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    I applaud you kind Wolfvak! May I link this in OP? And THANK YOU!

    — Posts automatically merged - Please don't double post! —

    hmm... wasn't able to get it working. I loaded into it but it just froze

    — Posts automatically merged - Please don't double post! —

    i2cWriteRegister(DEVICE_MCU, MCU_POWER, 1); // Shutdown

    I noticed in main.c you left out
    0x20 and put in MCU_POWER. Intentional?
     
    Last edited by SirBeethoven, Apr 26, 2016
  13. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    He defined it in the i2c header.

    Code:
    typedef enum {
        MCU_VOLUME = 0x09,
        MCU_BATTERY = 0x0B,
        MCU_POWER = 0x20
    } I2CRegister;
    
     
    SirBeethoven likes this.
  14. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    A-ha, I see. Could you try to see if you can use his payload please?
     
  15. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,546
    3,956
    Jun 9, 2007
    Antarctica
    I don't have a 3DS right now. :P
     
  16. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    Oh 0.0 :P Well that's a problem...
     
  17. Wolfvak

    Wolfvak *yawn*

    Member
    808
    1,062
    Oct 25, 2015
    Uruguay
    Worked fine for me. Try using this start.s and recompile.
     

    Attached Files:

  18. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    :( Wasn't able to compile, can you please? Sorry. Does it depend on the type of 3ds you have?
     
  19. Wolfvak

    Wolfvak *yawn*

    Member
    808
    1,062
    Oct 25, 2015
    Uruguay
    There you go, hopefully it works. By the way, what's your a9lh version? As in, initial no screen-init, dark-samus with screen-init, delebile's latest, etc.
     

    Attached Files:

  20. SirBeethoven
    OP

    SirBeethoven Happy holidays!

    Member
    1,809
    556
    Nov 26, 2015
    United States
    Aurora Wright's screen init. I changed the define BRIGHTNESS from 0x39 to 0x0. https://github.com/AuroraWright/arm9loaderhax/blob/master/arm11/source/arm11.c I'm using Arm9LoaderHay to boot into it (kind of like Arm9Slelect but with the ability to use several buttons at once)

    P.S. didn't work again. What A9LH do you have?