Homebrew [RELEASE] BootAnim9 - Custom boot animations for your 3DS!

Status
Not open for further replies.

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
Not sure if it's been suggested, but It might be better to use png,bmp, or jpegs for each frame, similar to android boot logos. Maybe playing a WAV or OGG too?
If you go this route, I'd suggest maybe just have a config file for stuff like framerate, etc
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Not sure if it's been suggested, but It might be better to use png,bmp, or jpegs for each frame, similar to android boot logos. Maybe playing a WAV or OGG too?
If you go this route, I'd suggest maybe just have a config file for stuff like framerate, etc

JPEG decompression actually introduces an incredible (literally, I couldn't believe it) amount of processing, something the ARM9 doesn't have. A JPEG stream would only decrease file size, but not improve performance (in any case, it makes it worse)
On the other hand, we (at least I) can't access any sound features from the ARM9 chip... yet
 

froggestspirit

Aspiring Game Dev
Member
Joined
Jul 28, 2011
Messages
1,281
Trophies
1
XP
1,561
Country
United States
JPEG decompression actually introduces an incredible (literally, I couldn't believe it) amount of processing, something the ARM9 doesn't have. A JPEG stream would only decrease file size, but not improve performance (in any case, it makes it worse)
On the other hand, we (at least I) can't access any sound features from the ARM9 chip... yet
what about something like bmp? or even if we had a small converter to convert the images to a more raw format for speed?
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Heres a couple of really super simple bat files that accept input.gif and renames to anim and and bottom_anim respectively. Should work fine if you have ffmpeg in your PATH or in the directory

These *should* work perfectly, thank you! Have you tested them?
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Yeah i've run the top one thru a couple of gifs and they work fine, and the bottom one works in the same way
Maybe you could add a simple check? If the resulting file size is bigger than 50MB, just delete it and spit out an error. Not sure how to do this in batch however.
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Here's the scripts with the check, I may have gotten to byte number wrong, someone will need to check me since Windows runs by 1024 bytes/kb etc.(I can't remember the base for the life of me) but it will delete the generated file if it exceeds 52428800b/50mb.

Yeah that's the right size. Updated the OP and thanks a lot!
Gonna get some sleep now...
 

Februarysn0w

Well-Known Member
Member
Joined
Oct 31, 2014
Messages
1,206
Trophies
0
Age
36
XP
838
Country
Japan
Here's the scripts with the check, I may have gotten to byte number wrong, someone will need to check me since Windows runs by 1024 bytes/kb etc.(I can't remember the base for the life of me) but it will delete the generated file if it exceeds 52428800b/50mb.
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes 
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)

That works perfectly, but I'd rather use two scripts in orded to keep n00b mistakes away. Still, thanks a lot for your interest, and maybe I'll add something like this once the project mature more!
 
Last edited by Wolfvak,

Mr.ButtButt

The Cancer Of Gbatemp <3
Member
Joined
Sep 22, 2015
Messages
1,465
Trophies
0
XP
893
Country
United States
Heres a couple of really super simple bat files that accept input.gif and resizes, converts and renames to anim and and bottom_anim respectively. Should work fine if you have ffmpeg in your PATH or in the directory
if it uses gifs why do we need FFMPEG as well?
 

Docmudkipz

Novice
Member
Joined
Mar 16, 2016
Messages
327
Trophies
0
Location
Staring at my computer case's window
XP
307
Country
United States
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)

Aha! I streamlined it even further by allowing the user to drag and drop the gif onto the bat and choose top or bottom.
Code:
@ECHO OFF
set maxbytesize=52428800
CHOICE /M "Press A for top screen or B for bottom screen" /C:ab
IF ERRORLEVEL 2 GOTO bot
IF ERRORLEVEL 1 GOTO top

:top
set filename=anim
ffmpeg -i %1 -s 400x240 input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb anim
del input_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

:bot
set "filename=bottom_anim"
ffmpeg -i %1 -s 320x240 Botinput_resized.gif
ffmpeg -i "botinput_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" bot_output.rgb
rename bot_output.rgb bottom_anim
del Botinput_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

That works perfectly, but I'd rather use two scripts in orded to keep n00b mistakes away. Still, thanks a lot for your interest, and maybe I'll add something like this once the projects matures more!

Should be nearly foolproof now

if it uses gifs why do we need FFMPEG as well?
From what I understand is that the payload is made to read a simple animation format at 10 fps and we're using ffmpeg to resize a gif animation and convert it to a payload readable format at the target framerate
 

Attachments

  • makeanim.zip
    1.6 KB · Views: 419
Last edited by Docmudkipz,
  • Like
Reactions: Februarysn0w

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Aha! I streamlined it even further by allowing the user to drag and drop the gif onto the bat and choose top or bottom.
Code:
@ECHO OFF
set maxbytesize=52428800
CHOICE /M "Press A for top screen or B for bottom screen" /C:ab
IF ERRORLEVEL 2 GOTO bot
IF ERRORLEVEL 1 GOTO top

:top
set filename=anim
ffmpeg -i %1 -s 400x240 input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb anim
del input_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

:bot
set "filename=bottom_anim"
ffmpeg -i %1 -s 320x240 Botinput_resized.gif
ffmpeg -i "botinput_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" bot_output.rgb
rename bot_output.rgb bottom_anim
del Botinput_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)



Should be nearly foolproof now


From what I understand is that the payload is made to read a simple animation format at 10 fps and we're using ffmpeg to resize a gif animation and convert it to a payload readable format at the current maximum framerate
MUCH better, gonna update the OP *again*

--------------------- MERGED ---------------------------

if it uses gifs why do we need FFMPEG as well?
It uses ffmpeg to convert to the necessary format. Input can be a GIF as well as any format ffmpeg uses, like MP4. Just keep in mind that you can't just convert a 30 minute video to one of these animations XD
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    So don't be mean and keep it clean!
    +1
  • DinohScene @ DinohScene:
    murdering teal and purple in HOMM3
    +2
  • K3Nv2 @ K3Nv2:
    Nah Dinoh psi wants you to destroy his booty
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Ken stop projecting lol
    +2
  • K3Nv2 @ K3Nv2:
    Start rubbing
  • K3Nv2 @ K3Nv2:
    I wonder how many people end up falling in love from customer service
  • Xdqwerty @ Xdqwerty:
    Don't f#ck in front of everyone, geez
  • BigOnYa @ BigOnYa:
    Uremum has the best customer service
    +2
  • K3Nv2 @ K3Nv2:
    Ow 100hp hit out a billion
  • BigOnYa @ BigOnYa:
    That's ironic, last time I went to uremum, I had to take a number, and it was 100
    +1
  • K3Nv2 @ K3Nv2:
    Yes just shows how important you are to her unlike urewife where I can even get ahold her by pager
    +1
  • BigOnYa @ BigOnYa:
    Freaking 97 degrees here now, even my dog went out and turned right back around, like nope!
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's a bit warm outside
    +1
  • K3Nv2 @ K3Nv2:
    Florida already misses the hurricanes
  • Psionic Roshambo @ Psionic Roshambo:
    One is supposedly forming in the gulf lol
  • K3Nv2 @ K3Nv2:
    Tell Florida citizens meth is a ac unit in the mouth
  • BigOnYa @ BigOnYa:
    Psi, Did you get any Flooding near you, or is it all south?
    +2
  • K3Nv2 @ K3Nv2:
    Why do we need back yard pools it's Florida
  • Psionic Roshambo @ Psionic Roshambo:
    I'm like an hour north of Tampa it's rained a bit here but no flooding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    45 minutes until my next date hehehe
  • K3Nv2 @ K3Nv2:
    The gators need a new home
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, you are dad of how many kids now?
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Hmmm I don't know lol
  • Psionic Roshambo @ Psionic Roshambo:
    The family reunion might have to book a stadium :P
    +1
  • AcuteBulbasaurappears @ AcuteBulbasaurappears:
    hey, is there some expert for wiiu hacking out there
    ? :)
    AcuteBulbasaurappears @ AcuteBulbasaurappears: hey, is there some expert for wiiu hacking out there ? :)