From 43d202a0523aeb1a68485e166c80058bb414ff69 Mon Sep 17 00:00:00 2001 From: "giantpune@gmail.com" Date: Thu, 9 Dec 2010 05:45:12 +0000 Subject: [PATCH] * add a menu in the NUS tool to access setting.txt from the nand dump --- nand_dump/mainwindow.cpp | 52 +++++++++++++++---------------------- nand_dump/mainwindow.h | 2 ++ nand_dump/mainwindow.ui | 18 +++++++++++++ nand_dump/nanddump.h | 1 + nand_dump/nusdownloader.cpp | 3 +++ nand_dump/nusdownloader.h | 1 + 6 files changed, 46 insertions(+), 31 deletions(-) diff --git a/nand_dump/mainwindow.cpp b/nand_dump/mainwindow.cpp index 6949b7e..062ec67 100644 --- a/nand_dump/mainwindow.cpp +++ b/nand_dump/mainwindow.cpp @@ -222,7 +222,7 @@ void MainWindow::on_pushButton_GetTitle_clicked() } else if( ui->radioButton_nand->isChecked() ) { - if( !nand.SetPath( ui->lineEdit_nandPath->text() ) ) + if( nand.GetPath() != ui->lineEdit_nandPath->text() && !nand.SetPath( ui->lineEdit_nandPath->text() ) ) { ShowMessage( tr( "Error setting the basepath of the nand to %1" ) .arg( QFileInfo( ui->lineEdit_nandPath->text() ).absoluteFilePath() ) ); @@ -322,34 +322,24 @@ void MainWindow::on_pushButton_wad_clicked() ui->lineEdit_wad->setText( f ); } +//nand-dump -> setting.txt +void MainWindow::on_actionSetting_txt_triggered() +{ + if( nand.GetPath() != ui->lineEdit_nandPath->text() && !nand.SetPath( ui->lineEdit_nandPath->text() ) ) + { + ShowMessage( tr( "Error setting the basepath of the nand to %1" ) + .arg( QFileInfo( ui->lineEdit_nandPath->text() ).absoluteFilePath() ) ); + return; + } + QByteArray ba = nand.GetSettingTxt(); //read the current setting.txt + ba = SettingTxtDialog::Edit( this, ba ); //call a dialog to edit that existing file and store the result in teh same bytearray + if( !ba.isEmpty() ) //if the dialog returned anything ( cancel wasnt pressed ) write that new setting.txt to the nand dump + nand.SetSettingTxt( ba ); +} -/* - 3.4j- -Error getting title from NUS: Error downloading part of the title. -NusJob( 0001000248414b4a, 2, decrypted, 0 items: ) - -Error getting title from NUS: Error downloading part of the title. -NusJob( 0001000248414c4a, 2, decrypted, 0 items: ) - -Received a completed download from NUS -Installed 0001000248415941v2 title to nand - -Received a completed download from NUS -Error 000100084843434av0 title to nand - -4.0j -Error getting title from NUS: Error downloading part of the title. -NusJob( 0001000248414b4a, 2, decrypted, 0 items: ) - -Error getting title from NUS: Error downloading part of the title. -NusJob( 0001000248414c4a, 2, decrypted, 0 items: ) - -Received a completed download from NUS -Installed 0001000248415941v3 title to nand - -Error getting title from NUS: Error downloading part of the title. -NusJob( 000100024843434a, 1, decrypted, 0 items: ) - -Received a completed download from NUS -Error 000100084843434av0 title to nand -*/ +//nand-dump -> flush +void MainWindow::on_actionFlush_triggered() +{ + if( !nand.GetPath().isEmpty() ) + nand.Flush(); +} diff --git a/nand_dump/mainwindow.h b/nand_dump/mainwindow.h index e05e34e..529f19d 100644 --- a/nand_dump/mainwindow.h +++ b/nand_dump/mainwindow.h @@ -35,6 +35,8 @@ public slots: private slots: + void on_actionFlush_triggered(); + void on_actionSetting_txt_triggered(); void on_pushButton_wad_clicked(); void on_pushButton_decFolder_clicked(); void on_pushButton_nandPath_clicked(); diff --git a/nand_dump/mainwindow.ui b/nand_dump/mainwindow.ui index e29a1d6..8fbe134 100644 --- a/nand_dump/mainwindow.ui +++ b/nand_dump/mainwindow.ui @@ -212,6 +212,14 @@ 27 + + + Nand Dump + + + + + @@ -222,6 +230,16 @@ + + + Setting.txt... + + + + + Flush + + diff --git a/nand_dump/nanddump.h b/nand_dump/nanddump.h index 47d3ee4..70141a9 100644 --- a/nand_dump/nanddump.h +++ b/nand_dump/nanddump.h @@ -16,6 +16,7 @@ public: //if it doesnt exist, the function will try to create it //also creates the normal folders in the nand bool SetPath( const QString &path ); + const QString GetPath(){ return basePath; } //installs a title to the nand dump from an already existing NusJob //returns false if something went wrong diff --git a/nand_dump/nusdownloader.cpp b/nand_dump/nusdownloader.cpp index 6e2c992..e3140fe 100644 --- a/nand_dump/nusdownloader.cpp +++ b/nand_dump/nusdownloader.cpp @@ -589,6 +589,7 @@ QMap< quint64, quint16 > NusDownloader::List20j() titles.insert( 0x10000000dull, 10 );//13v10 titles.insert( 0x10000000full, 257 );//15v257 titles.insert( 0x100000011ull, 512 );//17v512 + titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek titles.insert( 0x100000100ull, 0x2 );//bcv2 titles.insert( 0x100000101ull, 0x4 );//miosv4 titles.insert( 0x1000848414B45ull, 0 );//EULA - HAKE @@ -806,6 +807,7 @@ QMap< quint64, quint16 > NusDownloader::List21e() titles.insert( 0x100000015ull, 514 );//21v514 titles.insert( 0x100000016ull, 777 );//22v772 //should be getting v772 but it isnt available on NUS, get 777 instead titles.insert( 0x10000001cull, 1292 );//28v1228 //should be getting v1288 but it isnt on NUS + titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek titles.insert( 0x100000100ull, 0x2 );//bcv2 titles.insert( 0x100000101ull, 0x4 );//miosv4 titles.insert( 0x1000848414B50ull, 0 );//EULA - HAKP @@ -1038,6 +1040,7 @@ QMap< quint64, quint16 > NusDownloader::List20u() titles.insert( 0x10000000dull, 10 );//13v10 titles.insert( 0x10000000full, 257 );//15v257 titles.insert( 0x100000011ull, 512 );//17v512 + titles.insert( 0x100000023ull, 0xc10 ); // IOS35 - not really part of this update, but needed for sneek titles.insert( 0x100000100ull, 0x2 );//bcv2 titles.insert( 0x100000101ull, 0x4 );//miosv4 titles.insert( 0x1000848414B45ull, 0 );//EULA - HAKE diff --git a/nand_dump/nusdownloader.h b/nand_dump/nusdownloader.h index e42fcbb..f58cad2 100644 --- a/nand_dump/nusdownloader.h +++ b/nand_dump/nusdownloader.h @@ -63,6 +63,7 @@ public: //to keep people from bulk DLing and installing and messing something up, any boot2 upudate will not be included //in the list, ask for it specifically //lists are created from wiimpersonator logs when available. otherwise they come from examining game update partitions + //for the 2.x updates, IOS35 is added for use in sneek static QMap< quint64, quint16 > List20u(); static QMap< quint64, quint16 > List30u(); static QMap< quint64, quint16 > List31u();