[Tutorial] a9lh Boot Animations

Discussion in '3DS - Tutorials' started by cots, Jun 14, 2016.

  1. cots
    OP

    cots GBAtemp Fan

    Member
    489
    316
    Dec 29, 2014
    United States
    [​IMG]

    Welcome to another kick-ass guide by cots. In this guide we're going to cover creating animating and static boot animations for the custom firmware loader that's all the rage - arm9loaderhax (a9lh). a9lh hijacks the arm9 chip during boot which allows 100% boot rate of the CFW Luma3DS, but you already knew that. Well, did you know you that you can create a custom boot animation that will load when you boot your console? It's also pretty easy to create and configure. So let's dive into it.

    Requirements

    Static Image(s) and/or Video(s)
    Arm9LoaderHax Installed on your Nintendo 3DS (screeninit version)
    BootAnim9 - https://github.com/Wolfvak/BootAnim9
    makeanim - https://github.com/Docmudkipz/makeanim
    ffmpeg - https://ffmpeg.org
    imagemagick - http://www.imagemagick.org
    Optional: ban9comp - https://github.com/d0k3/ban9comp

    In this guide we'll be using 'C:\anim9' as the main folder where we'll work our magic. So extract makeanim and ffmpeg into this directory and then install imagemagick. If you're planning on building ban9comp to compress the output animations (if you're using a small sd card you might want to do this) then also copy ban9comp.exe into the folder.

    Once this is done it's time to prepare the image/video file(s). The image/video file(s) will be automatically reduced in size (dimensions), but if you're creating them from scratch you'll want to keep the sizes listed below in mind. The color depth and number of colors are not limited in any fashion. Also note that both videos must have the same frame rate.

    Top Screen - 400x240
    Bottom Screen - 320x240

    One major problem I ran into with creating boot animations using the included batch file was that it would not handle single images without first using ffmpeg to make them a video. In theory it should ask you how many seconds you want the single image to appear for, but it fails to do so. The workaround is to use ffmpeg to create an animation/video file out of your single image. So drop to a CMD prompt and run the following;

    ffmpeg -framerate 1/5 -i image.png -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4

    This will convert 'image.png' into a video (framerate of 30 frame per second).

    Once you have your video file(s) you'll want to drag them (one at a time) onto the 'makeanim.bat' in the 'C:\anim9' folder.

    [​IMG]

    The first thing it will ask is the frame rate of the video. If you have no idea what the frame rate is you can use mediainfo (link - https://mediaarea.net/en/MediaInfo) to find out. So type in your videos frame rate and then press enter.

    The next thing it will prompt you to press 'A' for the top screen or 'B' for the bottom. The script will then ask you if this is an animation or not. In theory it should then prompt you for how many seconds to display the static image for (if you pressed N), but it fails to do so.

    The script will then process the video and then finally will ask you if you want to compress it using 'ban9comp.exe'.

    If you selected the top screen you will now have a file with no extension named 'anim' in the 'C:\anim9' folder and if you selected the bottom screen you will find a file with also no extension named 'bottom_anim ' in the 'C:\anim9' folder. There will also be a 'config' file with no extension. You can create a boot animation(s) for the top, bottom or both screens.

    The first thing you're going to need to do to use the animation(s) is to rename your 'arm9loaderhax.bin' (yes, we're working with the Nintendo 3DS sd card now) to 'arm9payload.bin' and then copy the contents of the BootAnim9 archive into the root of your card.

    You should now have a folder on the root of your card named 'anim'. Move 'arm9payload.bin' into the '\anim' folder. Inside of the '\anim' folder create a folder named '0' and place the 'anim', 'bottom_anim' and 'config' files (from 'C:\anim9') in the '0' folder (it's okay if you don't use both 'anim' and 'bottom_anim'). You can also create nine more folders named 1, 2, 3, 4, 5, 6, 7, 8 and 9 and place separate boot animations in each, but don't skip numbers (that means don't create a folder named 2 before creating a folder named 1).

    [​IMG]

    Now you can boot your Nintendo 3DS and if all went well you'll be welcomed by your boot animation(s)! Enjoy!

    [​IMG]
     
    Last edited by cots, Jul 22, 2016


  2. GamingAori

    GamingAori GBAtemp Advanced Fan

    Member
    609
    52
    Mar 16, 2014
    Gambia, The
    Can you upload your version with out the new please? This looks awesome
     
  3. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    Problems where the GOTO command to get to the static image set of commands have always appeared to be cases where it's the user's system not interpreting the command correctly. Always try using the batch file before using the command cots posted.

    Also, if you use {ffmpeg -i (file)}, ffmpeg itself will tell you the framerate of your file.
     
    cots likes this.
  4. Jay Clay

    Jay Clay GBAtemp Regular

    Member
    107
    43
    Jul 21, 2011
    good thread, but you should warning people by doing this, you will lost gba\dsiware compatibility in your a9lh luma 3ds and if I am not mistaken is the same for the people who use ctrboot loader, unless you make that path changer stuff not so many people are willing to do it.
     
  5. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    @Wolfvak has fixed all of that stuff, path changer isn't needed anymore.
     
    Wolfvak likes this.
  6. Jay Clay

    Jay Clay GBAtemp Regular

    Member
    107
    43
    Jul 21, 2011
    I am pretty sure the last anim9boot version (0.6) still has this problem I stated above.
     
  7. cots
    OP

    cots GBAtemp Fan

    Member
    489
    316
    Dec 29, 2014
    United States
    gba/snes still works for me
     
  8. Returnofganon

    Returnofganon I pretend like I know what I'm talking about

    Member
    532
    197
    Jul 1, 2015
    United States
    Does this delay the boot time? Or does it play in the black screen time from when you boot the console.
     
  9. djalmafreestyler

    djalmafreestyler GBAtemp Advanced Fan

    Member
    627
    100
    Jan 31, 2011
    Brazil
    I read somewhere that it slows the boot, I'm using splash screen at moment...
     
  10. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    It will delay your boot
     
    Returnofganon likes this.
  11. djalmafreestyler

    djalmafreestyler GBAtemp Advanced Fan

    Member
    627
    100
    Jan 31, 2011
    Brazil
    So, I'm good with Splash Screen hehe
     
  12. cots
    OP

    cots GBAtemp Fan

    Member
    489
    316
    Dec 29, 2014
    United States
    It will delay your boot time while it plays the animation. I think that is just common sense!
     
  13. Redferne

    Redferne GBAtemp Advanced Fan

    Member
    745
    251
    Oct 28, 2015
    I've been playing with it for sometime but I can't get the result I want. I mean it works fine but it's not exactly what I expected. So here is a few questions:

    How do you make it keep aspect ratio?
    How do you tell it not to loop an animation or in the contrary how many time you want it to loop?
    Is there a key to skip the animation while it's playing? In case you put a 60s anim you might not want to go through it every time ^^
     
  14. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    1. You could make some manual edits to the ffmpeg command in the script(Lookup "ffmpeg scale with aspect ratio" keeping in mind you have to output a 400x240 or 320x240 file) OR edit your video and scale it to either 400x240(top) or 320x240(bottom). I do the second one personally since I cut and edit clips for my animations.
    2. It doesn't make sense for it to be looping by default, though you can make it loop by placing "-stream_loop x" before the -y in https://github.com/docmudkipz/makeanim/blob/master/makeanim.bat#L86 x is how many times AFTER it will loop, so if x-4 it will play 5 times over.
    3. Hit select and it will skip
     
  15. Redferne

    Redferne GBAtemp Advanced Fan

    Member
    745
    251
    Oct 28, 2015
    Thanks for the reply.
    Indeed edit my video would be better I agree. Could you recommend me a soft (preferably free)?
    So if I want the anim to be played only once I just have to add "-stream_loop 0".
     
  16. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    I couldn't tell you what to get for editing, I've been using a copy of Premiere a friend gave to me. Just look for something that can change the res before rendering.
    You could better yet just omit it completely and it should play once.
     
  17. Redferne

    Redferne GBAtemp Advanced Fan

    Member
    745
    251
    Oct 28, 2015
    Ok, I guess I messed something up then for my anims to loop multiple times.
     
  18. cots
    OP

    cots GBAtemp Fan

    Member
    489
    316
    Dec 29, 2014
    United States
    Did you accidentally use the
    Code:
    ffmpeg -framerate 1/5 -i image.png -c:v libx264 -r 30 -pix_fmt yuv420p output.mp4
    command on a video? That will cause it to loop.
     
  19. Redferne

    Redferne GBAtemp Advanced Fan

    Member
    745
    251
    Oct 28, 2015
    No I only used the batch file.
    I'm trying to convert a gif but I can't get anywhere. It's like frame are missing or out of sync.
    The aspect ratio fix worked though.
     
  20. Docmudkipz

    Docmudkipz Novice

    Member
    327
    219
    Mar 16, 2016
    United States
    Staring at my computer case's window
    What's it doing?