Hacking WIP XCI2TitleConverter - Automated process for XCI to Title

MRDOCA

Well-Known Member
Member
Joined
Nov 19, 2014
Messages
264
Trophies
0
XP
1,128
Country
New Zealand

Attachments

  • error.PNG
    error.PNG
    6.6 KB · Views: 304

james12

Member
Newcomer
Joined
Jun 21, 2018
Messages
17
Trophies
0
Age
33
XP
146
Country
Philippines
Great Tool!, thank you for your work

I made some modifications on your tool, adding drag and drop features on folder selection, hope it helps

private void MainWindow_Load(object sender, EventArgs e)
{
txtXCIDir.AllowDrop = true;
txtOutput.AllowDrop = true;
AllocConsole();
ActiveControl = label1;
foreach (KeyValuePair<string, string> title in Constants.TARGET_TITLES)
{
ComboboxItem item = new ComboboxItem();
item.Text = title.Value;
item.Value = title.Key;
cmbTarget.Items.Add(item);
}
}


private void btnXCIDir_Click(object sender, EventArgs e)
{
using (var folderBrowserDialog = new FolderBrowserDialog())
{
DialogResult result = folderBrowserDialog.ShowDialog();

if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderBrowserDialog.SelectedPath))
{
txtXCIDir.Text = folderBrowserDialog.SelectedPath;
}
}
}

private void btnOutput_Click(object sender, EventArgs e)
{
using (var folderBrowserDialog = new FolderBrowserDialog())
{
DialogResult result = folderBrowserDialog.ShowDialog();

if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderBrowserDialog.SelectedPath))
{
txtOutput.Text = folderBrowserDialog.SelectedPath;
}
}
}
private void txtXCIDir_DragDrop(object sender, DragEventArgs e)
{
string[] DroppedFiles = (string[])e.Data.GetData(DataFormats.FileDrop);
try
{
foreach (string Entry in DroppedFiles)
txtXCIDir.Text = Entry;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void txtXCIDir_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void txtOutput_DragDrop(object sender, DragEventArgs e)
{
string[] DroppedFiles = (string[])e.Data.GetData(DataFormats.FileDrop);
try
{
foreach (string Entry in DroppedFiles)
txtOutput.Text = Entry;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

}

private void txtOutput_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void txtXCIDir_TextChanged(object sender, EventArgs e)
{
xciDirPath = txtXCIDir.Text;
updateFormValues();
Settings.Default["pathXCIDir"] = txtXCIDir.Text;
Settings.Default.Save();
readXCIDirectory();
}

private void txtOutput_TextChanged(object sender, EventArgs e)
{
outputPath = txtOutput.Text;
updateFormValues();
Settings.Default["pathOutput"] = txtOutput.Text;
Settings.Default.Save();
}
}
 

javilobo8

Well-Known Member
OP
Newcomer
Joined
May 10, 2018
Messages
90
Trophies
0
Age
30
Website
lobobot.com
XP
502
Country
Spain
any idea why i get this error?
mmm I deleted the main.npdm filecheck, so i think there is something wrong with your keys. Search Nintendo Switch keys at google to have all, then try it.

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

Great Tool!, thank you for your work

I made some modifications on your tool, adding drag and drop features on folder selection, hope it helps

private void MainWindow_Load(object sender, EventArgs e)
{
txtXCIDir.AllowDrop = true;
txtOutput.AllowDrop = true;
AllocConsole();
ActiveControl = label1;
foreach (KeyValuePair<string, string> title in Constants.TARGET_TITLES)
{
ComboboxItem item = new ComboboxItem();
item.Text = title.Value;
item.Value = title.Key;
cmbTarget.Items.Add(item);
}
}


private void btnXCIDir_Click(object sender, EventArgs e)
{
using (var folderBrowserDialog = new FolderBrowserDialog())
{
DialogResult result = folderBrowserDialog.ShowDialog();

if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderBrowserDialog.SelectedPath))
{
txtXCIDir.Text = folderBrowserDialog.SelectedPath;
}
}
}

private void btnOutput_Click(object sender, EventArgs e)
{
using (var folderBrowserDialog = new FolderBrowserDialog())
{
DialogResult result = folderBrowserDialog.ShowDialog();

if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(folderBrowserDialog.SelectedPath))
{
txtOutput.Text = folderBrowserDialog.SelectedPath;
}
}
}
private void txtXCIDir_DragDrop(object sender, DragEventArgs e)
{
string[] DroppedFiles = (string[])e.Data.GetData(DataFormats.FileDrop);
try
{
foreach (string Entry in DroppedFiles)
txtXCIDir.Text = Entry;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void txtXCIDir_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void txtOutput_DragDrop(object sender, DragEventArgs e)
{
string[] DroppedFiles = (string[])e.Data.GetData(DataFormats.FileDrop);
try
{
foreach (string Entry in DroppedFiles)
txtOutput.Text = Entry;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

}

private void txtOutput_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void txtXCIDir_TextChanged(object sender, EventArgs e)
{
xciDirPath = txtXCIDir.Text;
updateFormValues();
Settings.Default["pathXCIDir"] = txtXCIDir.Text;
Settings.Default.Save();
readXCIDirectory();
}

private void txtOutput_TextChanged(object sender, EventArgs e)
{
outputPath = txtOutput.Text;
updateFormValues();
Settings.Default["pathOutput"] = txtOutput.Text;
Settings.Default.Save();
}
}
Thank you! If you can do a PR better, if you cannot, I will implement later.

When dragging on something at xcipath or output path we have to verify that is a dir before save it.
 

MRDOCA

Well-Known Member
Member
Joined
Nov 19, 2014
Messages
264
Trophies
0
XP
1,128
Country
New Zealand
thanks yea for some reason my keys werent working. i had copied pasted all the keys into my keys.txt but when i removed them all except the master keys it was allgood! thanks
 
  • Like
Reactions: javilobo8

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
@javilobo8 Pragma's LFSKit was updated with some TitleID Patching, does yours handle the same thing?
(not sure what 1.4.0 "Fix npdm bug" meant, so just confirming)

https://github.com/imPRAGMA/LFSKit/releases

"This gets the offset for the titleid in the .npdm files a lot smoother.
It was hardcoded to 0x440 but realized some titles have it at 0x430.
This should fix some titles from error-screens unless they just arent supported by LFS.
Chances are though, this will fix stuff for some."
 
  • Like
Reactions: javilobo8

javilobo8

Well-Known Member
OP
Newcomer
Joined
May 10, 2018
Messages
90
Trophies
0
Age
30
Website
lobobot.com
XP
502
Country
Spain
@javilobo8 Pragma's LFSKit was updated with some TitleID Patching, does yours handle the same thing?
(not sure what 1.4.0 "Fix npdm bug" meant, so just confirming)

https://github.com/imPRAGMA/LFSKit/releases

"This gets the offset for the titleid in the .npdm files a lot smoother.
It was hardcoded to 0x440 but realized some titles have it at 0x430.
This should fix some titles from error-screens unless they just arent supported by LFS.
Chances are though, this will fix stuff for some."
I will implement that :)
 
  • Like
Reactions: HoTsHoTz79

fanapathy

Member
Newcomer
Joined
May 18, 2018
Messages
9
Trophies
0
Age
41
XP
76
Country
Sweden
Hey,

Getting same error due to lacking keys probably.
Gotten my keys and wonder how I should c/p the missing ones (from other site), sometimes in my (own) keys.txt it has no line break or break whatsoever, for example xxxxxxxxxxxx7265C6BA7A1key_area_key_ocean_00 = B33813E4Cxxxxxxxxxxxxxx and so on.
Is this okay? Should the ones I copypaste be like this too if so?
 

javilobo8

Well-Known Member
OP
Newcomer
Joined
May 10, 2018
Messages
90
Trophies
0
Age
30
Website
lobobot.com
XP
502
Country
Spain
Hey,

Getting same error due to lacking keys probably.
Gotten my keys and wonder how I should c/p the missing ones (from other site), sometimes in my (own) keys.txt it has no line break or break whatsoever, for example xxxxxxxxxxxx7265C6BA7A1key_area_key_ocean_00 = B33813E4Cxxxxxxxxxxxxxx and so on.
Is this okay? Should the ones I copypaste be like this too if so?
Search them on google, copy and paste them into a keys.txt file, with windows line breaks
 

Kazalber

Well-Known Member
Member
Joined
Sep 25, 2017
Messages
132
Trophies
0
Age
30
XP
797
Country
Guatemala
they are common keys, just google for them and make sure you have masterkey 00 - 04 in your keys.txt file
May I ask how exactly did you add them to the file? Any specific order? Any specific format?
So far, I've got Master keys 00 to 04, but when I tried adding keys 1-3, I didn't know where to put them so I put them at the end of it all.
"Master_key_01 = xxxxx"
But that didn't work.
 

djp-AKA-bionic

Well-Known Member
Member
Joined
Jan 3, 2018
Messages
102
Trophies
0
Age
41
XP
313
Country
United States
May I ask how exactly did you add them to the file? Any specific order? Any specific format?
So far, I've got Master keys 00 to 04, but when I tried adding keys 1-3, I didn't know where to put them so I put them at the end of it all.
"Master_key_01 = xxxxx"
But that didn't work.

master_key_00 = xxxx
master_key_01 = xxxx
master_key_02 = xxxx
master_key_03 = xxxx
master_key_04 = xxxx
 
  • Like
Reactions: javilobo8

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1