ROM Hack [Tutorial] Edit the HomeMenu

Ordim3n

Well-Known Member
Member
Joined
Dec 14, 2015
Messages
413
Trophies
0
Location
Planet earth
XP
257
Country
Canada
Easy to do. Take the code @TheDeKay wrote and start with the compression then put
Code:
Echo Do your edits now. Press any key to recompress.
Pause>nul
Followed by the compression code.
And instead of
for %%F in (%*) do
use
for %%F in (*.bin) do

And remove the
If [%1]==[] goto error
At the beginning.

This will decompress all files in the folder of the batch and then pause and recompress.
Could you make these small edits please? I'm extracting the homemenu CIA for testing
 

Zan'

2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F
Member
Joined
Oct 8, 2015
Messages
387
Trophies
0
Age
32
XP
271
Country
Could you make these small edits please? I'm extracting the homemenu CIA for testing
Code:
@echo off
title LZ11 (De)Compressor
cd /d %~dp0
echo LZ Compressionlog [%date:~0%] > LZ.log
echo ============================== >> LZ.log
:DECOMPRESS
Title LZ11 Decompressor
for %%F in (*.bin) do (
   Title LZ11 Decompressor [%%~nxF]
   LZ -d %%F %%~nF.lz
   cls
   if exist "%%~nF.lz" (
   del %%F
   move %%~nF.lz %%F
   echo [%time:~0,8%] %%~nxF decompressed! >> LZ.log
   ) else (
   echo [%time:~0,8%] %%~nxF couldn't be decompressed >> LZ.log
   )
   cls
)
echo [%time:~0,8%] Finished >> LZ.log
echo ============================== >> LZ.log

:EDITSECTION
echo Do your edits now!
echo Press any key to recompress your files.
PAUSE>NUL

:COMPRESS
Title LZ11 Compressor
for %%F in (*.bin) do (
   Title LZ11 Compressor [%%~nxF]
   LZ -c lz11 %%F %%~nF.lz
   cls
   if exist "%%~nF.lz" (
   del %%F
   move %%~nF.lz %%F
   echo [%time:~0,8%] %%~nxF compressed! >> LZ.log
   ) else (
   echo [%time:~0,8%] %%~nxF couldn't be compressed >> LZ.log
   )
   cls
)

:end
echo [%time:~0,8%] Finished >> LZ.log
echo ============================== >> LZ.log

This little Script is Part1, Part2 and Clean combined.
It also features a copy to SD Card.
To make it work simply change the SDDrive in Uservariables to your Letter.
if you want to use a different name for the cia you can also change it in the uservariables.
Or you can just drag a cia onto the batchfile and it will decrypt this cia instead and rebuild to that name.

Code:
@echo off
::USER VARIABLES
set ciaName=HomeMenu
set SDDrive=J
if NOT [%1]==[] set ciaName=%~n1
::==============
:START
cls
title Homemenu Builder
echo [1] Extract CIA
echo [2] Build CIA
echo [3] Clean Folder
echo [4] Copy to SD
echo [Q] Exit program
echo.
set /p usrchoice="Enter your choice [Number]: "
cls
if "%usrchoice%"=="1" goto EXTRACT
if "%usrchoice%"=="2" goto BUILD
if "%usrchoice%"=="3" goto CLEAN
if "%usrchoice%"=="4" goto COPYSD
if "%usrchoice%"=="Q" goto EOF
if "%usrchoice%"=="q" goto EOF
if "%usrchoice%"=="" goto EOF

goto START
:EXTRACT
title Homemenu Builder [Extracting]
ctrtool.exe --content=SystemApp "%ciaName%.cia"
ren SystemApp.0000.* SystemApp.0.cxi
3dstool.exe -xvtf cxi SystemApp.0.cxi --header NCCH.Header --exh DecryptedExHeader.bin --exefs DecryptedExeFS.bin --romfs DecryptedRomFS.bin --logo Logo.bcma.LZ --plain PlainRGN.bin
3dstool.exe -xvtf exefs DecryptedExeFS.bin --exefs-dir ExtractedExeFS --header ExeFS.Header
3dstool.exe -xvtf romfs DecryptedRomFS.bin --romfs-dir ExtractedRomFS
goto START

:BUILD
title Homemenu Builder [Building]
3dstool.exe -cvtf romfs CustomRomFS.bin --romfs-dir ExtractedRomFS
3dstool.exe -cvtf exefs CustomExeFS.bin --exefs-dir ExtractedExeFS --header ExeFS.Header
3dstool.exe -cvtf cxi SystemApp.0.cxi --header NCCH.Header --exh DecryptedExHeader.bin --exefs CustomExeFS.bin --romfs CustomRomFS.bin --logo Logo.bcma.LZ --plain PlainRGN.bin
MakeRom.exe -f cia -content SystemApp.0.cxi:0:0x00 -o "%ciaName%_Edited.cia"
goto START

:CLEAN
title Homemenu Builder [Cleaning]
del *.bin
del *.Header
del *.cxi
rmdir ExtractedExeFS /s /q
rmdir ExtractedRomFS /s /q
goto START

:COPYSD
title Homemenu Builder [Copy to SD]
copy "%ciaName%_edited.cia" "%SDDrive%:\D9GAME\%ciaName%_edited.cia"
echo Done!
goto START
:EOF
 
Last edited by Zan',

DSoryu

GBA/NDS Maniac
Member
Joined
May 5, 2010
Messages
2,375
Trophies
2
Location
In my house
XP
4,832
Country
Mexico
For everyone trying to change the color of the internet bar, maybe is stored somwhere else, since Home Menu doesn't exclusively use it, it is used on another apps as well (Download Play, Friend List, System Settings)
 

Zan'

2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F
Member
Joined
Oct 8, 2015
Messages
387
Trophies
0
Age
32
XP
271
Country
For everyone trying to change the color of the internet bar, maybe is stored somwhere else, since Home Menu doesn't exclusively use it, it is used on another apps as well (Download Play, Friend List, System Settings)
Everything that shows in the Homemenu has to be in the Homemenu cia.
The Battery and the Connection Strength are not exclusive to Homemenu either, but we can change it's color.
If I enter eShop they will show blue in the eShop, but the color I changed it to in the Homemenu.
 

DSoryu

GBA/NDS Maniac
Member
Joined
May 5, 2010
Messages
2,375
Trophies
2
Location
In my house
XP
4,832
Country
Mexico
Everything that shows in the Homemenu has to be in the Homemenu cia.
The Battery and the Connection Strength are not exclusive to Homemenu either, but we can change it's color.
If I enter eShop they will show blue in the eShop, but the color I changed it to in the Homemenu.

I see. Then I have no idea, can't find it either.
 

Ordim3n

Well-Known Member
Member
Joined
Dec 14, 2015
Messages
413
Trophies
0
Location
Planet earth
XP
257
Country
Canada
Code:
@echo off
title LZ11 (De)Compressor
cd /d %~dp0
echo LZ Compressionlog [%date:~0%] > LZ.log
echo ============================== >> LZ.log
:DECOMPRESS
Title LZ11 Decompressor
for %%F in (*.bin) do (
   Title LZ11 Compressor [%%~nxF]
   LZ -d %%F %%~nF.lz
   cls
   if exist "%%~nF.lz" (
   del %%F
   move %%~nF.lz %%F
   echo [%time:~0,8%] %%~nxF decompressed! >> LZ.log
   ) else (
   echo [%time:~0,8%] %%~nxF couldn't be decompressed >> LZ.log
   )
   cls
)
echo [%time:~0,8%] Finished >> LZ.log
echo ============================== >> LZ.log

:EDITSECTION
echo Do your edits now!
echo Press any key to recompress your files.
PAUSE>NUL

:COMPRESS
Title LZ11 Compressor
for %%F in (*.bin) do (
   Title LZ11 Compressor [%%~nxF]
   LZ -c lz11 %%F %%~nF.lz
   cls
   if exist "%%~nF.lz" (
   del %%F
   move %%~nF.lz %%F
   echo [%time:~0,8%] %%~nxF compressed! >> LZ.log
   ) else (
   echo [%time:~0,8%] %%~nxF couldn't be compressed >> LZ.log
   )
   cls
)

:end
echo [%time:~0,8%] Finished >> LZ.log
echo ============================== >> LZ.log

This little Script is Part1, Part2 and Clean combined.
It also features a copy to SD Card.
To make it work simply change the SDDrive in Uservariables to your Letter.
if you want to use a different name for the cia you can also change it in the uservariables.

Code:
@echo off
::USER VARIABLES
set ciaName=HomeMenu
set SDDrive=J
if NOT [%1]==[] set ciaName=%~n1
::==============
:START
cls
title Homemenu Builder
echo [1] Extract CIA
echo [2] Build CIA
echo [3] Clean Folder
echo [4] Copy to SD
echo [Q] Exit program
echo.
set /p usrchoice="Enter your choice [Number]: "
cls
if "%usrchoice%"=="1" goto EXTRACT
if "%usrchoice%"=="2" goto BUILD
if "%usrchoice%"=="3" goto CLEAN
if "%usrchoice%"=="4" goto COPYSD
if "%usrchoice%"=="Q" goto EOF
if "%usrchoice%"=="q" goto EOF
if "%usrchoice%"=="" goto EOF

goto START
:EXTRACT
title Homemenu Builder [Extracting]
ctrtool.exe --content=SystemApp "%ciaName%.cia"
ren SystemApp.0000.* SystemApp.0.cxi
3dstool.exe -xvtf cxi SystemApp.0.cxi --header NCCH.Header --exh DecryptedExHeader.bin --exefs DecryptedExeFS.bin --romfs DecryptedRomFS.bin --logo Logo.bcma.LZ --plain PlainRGN.bin
3dstool.exe -xvtf exefs DecryptedExeFS.bin --exefs-dir ExtractedExeFS --header ExeFS.Header
3dstool.exe -xvtf romfs DecryptedRomFS.bin --romfs-dir ExtractedRomFS
goto START

:BUILD
title Homemenu Builder [Building]
3dstool.exe -cvtf romfs CustomRomFS.bin --romfs-dir ExtractedRomFS
3dstool.exe -cvtf exefs CustomExeFS.bin --exefs-dir ExtractedExeFS --header ExeFS.Header
3dstool.exe -cvtf cxi SystemApp.0.cxi --header NCCH.Header --exh DecryptedExHeader.bin --exefs CustomExeFS.bin --romfs CustomRomFS.bin --logo Logo.bcma.LZ --plain PlainRGN.bin
MakeRom.exe -f cia -content SystemApp.0.cxi:0:0x00 -o "%ciaName%_Edited.cia"
goto START

:CLEAN
title Homemenu Builder [Cleaning]
del *.bin
del *.Header
del *.cxi
rmdir ExtractedExeFS /s /q
rmdir ExtractedRomFS /s /q
goto START

:COPYSD
title Homemenu Builder [Copy to SD]
copy "%ciaName%_edited.cia" "%SDDrive%:\D9GAME\%ciaName%_edited.cia"
echo Done!
goto START
:EOF
The LZ11 (de)compressor doesn't work
LZ Compressionlog [2016-04-30]
==============================
[18:56:23] menu_msbt_LZ.bin couldn't be decompressed
[18:56:23] RI_mstl_LZ.bin couldn't be decompressed
[18:56:23] Finished
==============================
 

Ordim3n

Well-Known Member
Member
Joined
Dec 14, 2015
Messages
413
Trophies
0
Location
Planet earth
XP
257
Country
Canada
Is it me or it's dumb
MGZES8N.png
 
  • Like
Reactions: PaiiNSteven

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=0UeJincEpEM