ROM Hack custom-install - Install CIAs to a Nintendo 3DS SD card entirely on PC

retrospect

Well-Known Member
Member
Joined
May 17, 2008
Messages
566
Trophies
1
XP
1,172
Country
Since this is released under the MIT License (thank you author), could someone who knows how please share an .exe conversion?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,840
Country
United States
Via 3dsx, from Homebrew Launcher on Luma v10.0.1. The exact message is this:
"custom-install-finalize v1.0
Reading /cifinish.bin...
Finalizing 0004000e001b5000...
Failed to finish ticket install: d8e08019
Press START or B to exit."
Are you sure you typed the error code correctly? I don't recognize it at all.
 

SNBeast

Member
Newcomer
Joined
Jul 14, 2016
Messages
16
Trophies
0
Age
23
XP
270
Country
United States
Yo, this software works great! Thank you!


I am having a problem with it though: it does not seem to support DSi game CIAs, throwing the following error:

Code:
Writing /title/00048004/4b554e45/content/cmd/00000001.cmd
Traceback (most recent call last):
  File "custom-install.py", line 248, in <module>
    cia.contents[0].version.to_bytes(2, 'little'),
KeyError: 0

Edited due to accidental double-post.
 
Last edited by SNBeast,

NekoBit

Member
Newcomer
Joined
Nov 5, 2019
Messages
19
Trophies
0
Age
27
XP
97
Country
United States
Good news! The OOP rewrite works! (I believe)
The files were copied onto the SD card, here is an example snippet of code showing its usage

Code:
from custominstall import CustomInstall

installer = CustomInstall(boot9="boot9.bin",
                              movable="movable.sed",
                              sd="(Put path here)"
                              cias=["sample.cia", "sample2.cia"])

installer.start()
print(installer.logLines) # Full log in array

# Using log... CustomInstall.log(message, type=0, errorname=None)

As you see, I only have one more thing I will implement, events. Events will just allow us to handle info on the fly such as percentage, and importantly, log messages. And of course, how useful this would be on a GUI, right :ha:? (Also needed for the new Terminal tool rewrite that works the same as the previous one but utilizing the new class, not just the GUI).
Let me know if any design decisions stick out that bother you, I put a todo that I am not really interested in ATM (will probably come with the PR) which will move some actions to their own respective methods, as currently the start function is one giant blob of copy and paste (with some changes here and there to utilize the class arguments VS argparse)
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,840
Country
United States
Yo, this software works great! Thank you!


I am having a problem with it though: it does not seem to support DSi game CIAs, throwing the following error:

Code:
Writing /title/00048004/4b554e45/content/cmd/00000001.cmd
Traceback (most recent call last):
  File "custom-install.py", line 248, in <module>
    cia.contents[0].version.to_bytes(2, 'little'),
KeyError: 0

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

Finally! This works great!

Except that I get this error when installing a DSiWare CIA:

Code:
Writing /title/00048004/4b554e45/content/cmd/00000001.cmd
Traceback (most recent call last):
  File "custom-install.py", line 248, in <module>
    cia.contents[0].version.to_bytes(2, 'little'),
KeyError: 0
Though this error is strange and I'll have to look into it, DSiWare titles can't be installed to the SD card, so you have to do it the old-fashioned way.

Good news! The OOP rewrite works! (I believe)
The files were copied onto the SD card, here is an example snippet of code showing its usage

Code:
from custominstall import CustomInstall

installer = CustomInstall(boot9="boot9.bin",
                              movable="movable.sed",
                              sd="(Put path here)"
                              cias=["sample.cia", "sample2.cia"])

installer.start()
print(installer.logLines) # Full log in array

# Using log... CustomInstall.log(message, type=0, errorname=None)

As you see, I only have one more thing I will implement, events. Events will just allow us to handle info on the fly such as percentage, and importantly, log messages. And of course, how useful this would be on a GUI, right :ha:? (Also needed for the new Terminal tool rewrite that works the same as the previous one but utilizing the new class, not just the GUI).
Let me know if any design decisions stick out that bother you, I put a todo that I am not really interested in ATM (will probably come with the PR) which will move some actions to their own respective methods, as currently the start function is one giant blob of copy and paste (with some changes here and there to utilize the class arguments VS argparse)
Looks good to me so far. In this little example, I would probably rename logLines to log_lines to match PEP 8 and be consistent with everything else in the project.

Some of the methods should be split into their own functions, like one that starts writing a single title, one to update the title database, one to update cifinish.bin and add to it (currently it overwrites). Then start() should exist to call all of them to keep it simple for anything else that may use this.
 

NekoBit

Member
Newcomer
Joined
Nov 5, 2019
Messages
19
Trophies
0
Age
27
XP
97
Country
United States
I would probably rename logLines to log_lines to match PEP 8 and be consistent with everything else in the project.
Good eye, fixing it, this is how JS messes with my brain sometimes. :)

like one that starts writing a single title, one to update the title database, one to update cifinish.bin and add to it (currently it overwrites). Then start() should exist to call all of them to keep it simple for anything else that may use this.
As the plan follows, but thanks for the notes to keep in mind.

Edit: Gonna test on my main device, my O3DS. (my O2DS has a cracked screen and the SD card for it died)... Yolo!
 
Last edited by NekoBit,

iron_man99

Well-Known Member
Newcomer
Joined
Mar 19, 2010
Messages
74
Trophies
1
XP
395
Country
United States
@NekoBit
What about for the files that are needed you write a string/variable the looks for those files "probably in a folder". Then put a string in the main gui saying something like "movable.sed/boot9/blah" not detected if those files don't exist or are not in the folder.

Just my two cents. Not an expert at gui's.

Note: now that i thought about it might be weird coding that for different systems
 
Last edited by iron_man99,

NekoBit

Member
Newcomer
Joined
Nov 5, 2019
Messages
19
Trophies
0
Age
27
XP
97
Country
United States
@NekoBit
What about for the files that are needed you write a string/variable the looks for those files "probably in a folder". Then put a string in the main gui saying something like "movable.sed/boot9/blah" not detected if those files don't exist or are not in the folder.

Just my two cents. Not an expert at gui's.

Note: now that i thought about it might be weird coding that for different systems

Edit: Just came to conclusion that magically selecting files would be a bad idea... BUT, automatically figuring out what the sd card is (say, one sd card in the system that contains a Nintendo 3DS folder) and selecting it would be neat.

Well, I don't fully understand what you mean, but I think I understand what you mean. If you mean to automagically search for the files on the application startup? Will probably implement that, similar to how it says in the Readme, that it should search for common folders like ~/3DS, %APPDATA%/3ds, etc. If you mean to automatically search the directory the script is ran in for CIA's to pick the first one, I don't think someone would put the files in a directory. Might also lead to confusion if they have multiple movable.sed or boot9.bin files, each with different names.
 
Last edited by NekoBit,

iron_man99

Well-Known Member
Newcomer
Joined
Mar 19, 2010
Messages
74
Trophies
1
XP
395
Country
United States
@NekoBit yeah now that i thought about it, that may lead to some confusion since i think ihaveamac's script already searches for them. A better solution would just to search for the files in the root directory and then have a little highlight box/image or even a text string saying something like X file found/not found. Maybe that would be simpler.
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,840
Country
United States
Edit: Just came to conclusion that magically selecting files would be a bad idea... BUT, automatically figuring out what the sd card is (say, one sd card in the system that contains a Nintendo 3DS folder) and selecting it would be neat.

Well, I don't fully understand what you mean, but I think I understand what you mean. If you mean to automagically search for the files on the application startup? Will probably implement that, similar to how it says in the Readme, that it should search for common folders like ~/3DS, %APPDATA%/3ds, etc. If you mean to automatically search the directory the script is ran in for CIA's to pick the first one, I don't think someone would put the files in a directory. Might also lead to confusion if they have multiple movable.sed or boot9.bin files, each with different names.
It uses pyctr which is included in the repo (not yet separated to its own) to search for these files. It's an older one that doesn't yet store the location where it found boot9/seeddb. When it's updated you can use it to get those paths if it was automatically found. The original and updated version is in ninfs's repo right now.
 
Last edited by ihaveahax,

NekoBit

Member
Newcomer
Joined
Nov 5, 2019
Messages
19
Trophies
0
Age
27
XP
97
Country
United States
@ihaveamac
https://github.com/nek0bit/custom-install/tree/module-rewrite

Events are complete, percentage event should be alright but make sure to review it if possible. The module is complete, It's just not ready to be merged (even though it works) because I want to get the GUI done tomorrow, but you can pull and try it out if you want to (but only the code is really interesting). Should seem similar for the client, but underneath a ton has changed. The file custominstall.py is both a importable module and a terminal script now, alongside with a class CustomInstall that is being used for the terminal client and (soon) GUI

One todo needs to be sorted out but I will sort it after the GUI is written tomorrow. Have a nice night.

Edit: Note: the old custom install is removed as it isn't really needed now, obviously.

Final Note: You NEED the "event" package installed for it to work, I will add that to the readme, see here
 
Last edited by NekoBit,
  • Like
Reactions: ihaveahax

QuazaRayy

Member
Joined
Feb 3, 2019
Messages
110
Trophies
0
Location
your mind.
XP
611
Country
United Kingdom
I can vouch! It takes a bit to dump the boot9.bin and movable.sed and download seeddb.bin but once you installed everything it works! I installed Rytmik Ultimate and it works perfectly! If you can get CIAs that aren't corrupted then stop using FBI and use custom-install!
 

AkikoKumagara

The Coolest Bear Around
Member
Joined
Jan 4, 2017
Messages
1,538
Trophies
1
Website
thebearsden.web.fc2.com
XP
3,945
Country
United States
Strange, I will need to investigate this error more, since I've never seen the code before.
I'm running into it again with some other .cia files.
Could them being created with the wrong version number maybe cause this somehow? A couple I have are like that and coincidentally when I start installing a batch with them is when I start running into the problem again.
 

iron_man99

Well-Known Member
Newcomer
Joined
Mar 19, 2010
Messages
74
Trophies
1
XP
395
Country
United States
@Sophie-bear maybe try dumping them again. Some games i have the header file broke from converting them to cxi and then back to cia. Thats just me but i think that may cause it to fail too.
Just a wild guess
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @AncientBoi, https://www.youtube.com/watch?v=7jUWpmU-X8k