mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-22 13:29:14 +01:00
* nandBin - change the way gathering clusters for new data works. this seems to better emulate the way IOS does it
git-svn-id: http://wiiqt.googlecode.com/svn/trunk@54 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
2769d3a891
commit
e8bd408ba6
@ -1540,7 +1540,9 @@ bool NandBin::SetData( quint16 idx, const QByteArray &data )
|
|||||||
|
|
||||||
fts << cl; //add this one to the clusters that will be used to hold the data
|
fts << cl; //add this one to the clusters that will be used to hold the data
|
||||||
quint16 block = cl / 8; //try to find other clusters in the same block
|
quint16 block = cl / 8; //try to find other clusters in the same block
|
||||||
for( quint16 i = block * 8; i < ( ( block + 1 ) * 8 ) && fts.size() < clCnt; i++ )
|
//for( quint16 i = block * 8; i < ( ( block + 1 ) * 8 ) && fts.size() < clCnt; i++ )
|
||||||
|
quint16 max = freeClusters.at( freeClusters.size() - 1 );
|
||||||
|
for( quint16 i = block * 8; i < max && fts.size() < clCnt; i++ )
|
||||||
{
|
{
|
||||||
if( cl == i ) //this one is already added to the list
|
if( cl == i ) //this one is already added to the list
|
||||||
continue;
|
continue;
|
||||||
@ -1568,6 +1570,7 @@ bool NandBin::SetData( quint16 idx, const QByteArray &data )
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
qSort( fts.begin(), fts.end() );
|
||||||
//qDebug() << "about to writing shit" << clCnt << fts.size();
|
//qDebug() << "about to writing shit" << clCnt << fts.size();
|
||||||
//qDebug() << "file will be on clusters\n" << hex << fts;
|
//qDebug() << "file will be on clusters\n" << hex << fts;
|
||||||
for( quint32 i = 0; i < clCnt; i++ )
|
for( quint32 i = 0; i < clCnt; i++ )
|
||||||
@ -1674,6 +1677,7 @@ bool NandBin::WriteMetaData()
|
|||||||
//qDebug() << "done adding shit" << hex << (quint32)b.pos();
|
//qDebug() << "done adding shit" << hex << (quint32)b.pos();
|
||||||
b.close();
|
b.close();
|
||||||
QByteArray hmR = spare.Get_hmac_meta( scl, nextSuperCluster );
|
QByteArray hmR = spare.Get_hmac_meta( scl, nextSuperCluster );
|
||||||
|
|
||||||
qDebug() << "about to write the meta block" << hex << nextSuperCluster << nextClusterVersion << "to page" << (quint32)( nextSuperCluster * 8 );
|
qDebug() << "about to write the meta block" << hex << nextSuperCluster << nextClusterVersion << "to page" << (quint32)( nextSuperCluster * 8 );
|
||||||
|
|
||||||
for( quint8 i = 0; i < 0x10; i++ )
|
for( quint8 i = 0; i < 0x10; i++ )
|
||||||
|
@ -378,6 +378,7 @@ bool CheckTitleIntegrity( quint64 tid )
|
|||||||
if( verbose )
|
if( verbose )
|
||||||
{
|
{
|
||||||
qDebug() << "\tversion:" << t.Version() << hex << t.Version();
|
qDebug() << "\tversion:" << t.Version() << hex << t.Version();
|
||||||
|
if( t.AccessFlags() )
|
||||||
qDebug() << "\taccess :" << hex << t.AccessFlags();
|
qDebug() << "\taccess :" << hex << t.AccessFlags();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,6 +165,7 @@ void NgDialog::on_pushButton_keys_clicked()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
//WriteFile( QFileInfo( fn ).absoluteDir().absoluteFilePath( "keys.bin" ), ba );
|
||||||
|
|
||||||
if( ba.size() != 0x400 )
|
if( ba.size() != 0x400 )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user