mirror of
https://github.com/WiiDatabase/nusdownloader.git
synced 2024-11-27 12:44:13 +01:00
Boot index now changes...
This commit is contained in:
parent
e404a42999
commit
b4304c2ed5
@ -340,7 +340,7 @@ namespace NUS_Downloader
|
||||
return nbr_cont;
|
||||
}
|
||||
|
||||
private int BootIndex(byte[] tmd)
|
||||
private int GetBootIndex(byte[] tmd)
|
||||
{
|
||||
// nbr_cont (0xE0) len=0x02
|
||||
int bootidx = 0;
|
||||
@ -348,6 +348,15 @@ namespace NUS_Downloader
|
||||
return bootidx;
|
||||
}
|
||||
|
||||
private byte[] SetBootIndex(byte[] tmd, int bootindex)
|
||||
{
|
||||
// nbr_cont (0xE0) len=0x02
|
||||
byte[] bootbytes = NewIntegertoByteArray(bootindex, 2);
|
||||
tmd[0x1E0] = bootbytes[0];
|
||||
tmd[0x1E1] = bootbytes[1];
|
||||
return tmd;
|
||||
}
|
||||
|
||||
private void WriteStatus(string Update)
|
||||
{
|
||||
// Small function for writing text to the statusbox...
|
||||
@ -2553,6 +2562,11 @@ namespace NUS_Downloader
|
||||
{
|
||||
string itemstr = contentsEdit.Items[c].ToString();
|
||||
contents[c] = new TitleContent();
|
||||
// Set boot index...
|
||||
if (itemstr.Contains(" [BOOT]"))
|
||||
{
|
||||
tmd = SetBootIndex(tmd, c);
|
||||
}
|
||||
if (itemstr.Contains(".app"))
|
||||
{
|
||||
// This is already decrypted, we're going to add it to the TMD...
|
||||
@ -2725,6 +2739,7 @@ namespace NUS_Downloader
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Collect everything into a single byte[]...
|
||||
byte[] contentSection = new byte[contents.Length * 36];
|
||||
for (int h = 0; h < contents.Length; h++)
|
||||
|
Loading…
Reference in New Issue
Block a user