mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-22 05:29:14 +01:00
* fix bug in nand.bin class: when creating a new nand.bin, initialize fst_pos in fst entries
* insert new entries in nand.bin at the start of the chain instead of at the end ( to closer mimic IOS FS behavior ) * oneswanzenegger: create /sys/cert.sys when creating a new nand.bin git-svn-id: http://wiiqt.googlecode.com/svn/trunk@42 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
d9a2a2e012
commit
1801f7f8cf
@ -90,6 +90,9 @@ bool NandBin::CreateNew( const QString &path, const QByteArray &keys, const QByt
|
||||
fats.clear();
|
||||
memset( &fsts, 0, sizeof( fst_t ) * 0x17ff );
|
||||
|
||||
for( quint16 i = 0; i < 0x17ff; i++ )
|
||||
fsts[ i ].fst_pos = i;
|
||||
|
||||
//reserve blocks 0 - 7
|
||||
for( quint16 i = 0; i < 0x40; i++ )
|
||||
{
|
||||
@ -1193,7 +1196,12 @@ quint16 NandBin::CreateEntry( const QString &path, quint32 uid, quint16 gid, qui
|
||||
if( !ret )
|
||||
return 0;
|
||||
|
||||
fsts[ entryNo ].sib = ret;
|
||||
//method 1: this works, and the nand is bootable. but doesnt mimic the IOS FS driver. ( my entries appear in reversed order when walking the FS )
|
||||
//fsts[ entryNo ].sib = ret;
|
||||
|
||||
//method 2: trying to mimic the IOS FS driver ( insert new entries at the start of the chain, instead of the end )
|
||||
fsts[ ret ].sib = fsts[ parIdx ].sub;
|
||||
fsts[ parIdx ].sub = ret;
|
||||
}
|
||||
QTreeWidgetItem *child = CreateItem( par, name, 0, ret, uid, gid, 0, fsts[ ret ].attr, 0 );
|
||||
if( attr == NAND_FILE )
|
||||
|
@ -110,7 +110,20 @@ void NewNandBin::on_buttonBox_accepted()
|
||||
|| !nand.CreateEntry( "/tmp", 0, 0, NAND_DIR, NAND_RW, NAND_RW, NAND_RW )
|
||||
|| !nand.WriteMetaData() )
|
||||
{
|
||||
qWarning() << "NewNandBin::on_buttonBox_accepted -> error creating the new nand";
|
||||
qWarning() << "NewNandBin::on_buttonBox_accepted -> error creating directories in the new nand";
|
||||
return;
|
||||
}
|
||||
//add cert.sys
|
||||
quint16 handle = nand.CreateEntry( "/sys/cert.sys", 0, 0, NAND_FILE, NAND_RW, NAND_RW, NAND_READ );
|
||||
if( !handle || !nand.SetData( "/sys/cert.sys", QByteArray( (const char*)&certs_dat, CERTS_DAT_SIZE ) ) )
|
||||
{
|
||||
qWarning() << "NewNandBin::on_buttonBox_accepted -> error creating cert in the new nand";
|
||||
return;
|
||||
}
|
||||
//commit changes to metadata
|
||||
if( !nand.WriteMetaData() )
|
||||
{
|
||||
qWarning() << "NewNandBin::on_buttonBox_accepted -> error writing metadata";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,11 @@
|
||||
this is a tool to list saves in an extracted nand dump
|
||||
this is a tool to list/extract/delete saves to/from an extracted nand dump. saves are extracted, packed into a data.bin, zipped up with a txt file
|
||||
that says a bit about the save, and then stored in a folder. you must designate a folder and provide the necessary keys before extracting saves
|
||||
will work. i chose to go with data.bin as it is a way to store the entire save in 1 file and also allow the save to be installed using the
|
||||
system menu. and i went with the zip format 1) to save space, and 2) to keep a save and the description all in 1 compact file.
|
||||
|
||||
saves are extracted to "<the folder you specify>/<TID upper>/<TID lower>/#.zip". the # is chosen by the lowest available number starting with 1.
|
||||
there is no need for the saves to be in numerical order, if you have 10 zips for the same game and you decide to delete "3.zip", it will cause
|
||||
no issues, and next time you extract a save for this game, it will use the filename "3.zip".
|
||||
|
||||
TODO:
|
||||
add some sort of extract/delete/install functionality
|
||||
installing saves back to sneek nand still isnt done
|
||||
|
Loading…
Reference in New Issue
Block a user