mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-26 05:30:19 +00:00
Raise USB buffer sizes, less requests
This commit is contained in:
parent
62da4232df
commit
743343c2aa
2 changed files with 10 additions and 10 deletions
|
@ -61,7 +61,7 @@ namespace tin::install::nsp
|
|||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->nspName, args->pfs0Offset, args->ncaSize);
|
||||
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
u64 sizeRemaining = header.dataSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace tin::install::nsp
|
|||
{
|
||||
while (sizeRemaining && !stopThreadsUsbNsp)
|
||||
{
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
|
||||
if (tmpSizeRead == 0) THROW_FORMAT("USB transfer timed out or failed");
|
||||
sizeRemaining -= tmpSizeRead;
|
||||
|
||||
|
@ -96,7 +96,7 @@ namespace tin::install::nsp
|
|||
int USBThreadFuncNcz(void* in) // nczs corrupt with ranges over 8MB
|
||||
{
|
||||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
tin::util::USBCmdHeader header;
|
||||
u64 sizeRemaining = args->ncaSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
@ -110,11 +110,11 @@ namespace tin::install::nsp
|
|||
while (sizeRemaining && !stopThreadsUsbNsp)
|
||||
{
|
||||
if (!curRequestLeft) {
|
||||
reqSize = std::min(sizeRemaining, (u64)0x800000);
|
||||
reqSize = std::min(sizeRemaining, (u64)0x1000000);
|
||||
header = tin::util::USBCmdManager::SendFileRangeCmd(args->nspName, args->pfs0Offset + curOffset, reqSize);
|
||||
curRequestLeft = header.dataSize;
|
||||
}
|
||||
readSize = std::min(curRequestLeft, (u64)0x800000);
|
||||
readSize = std::min(curRequestLeft, (u64)0x1000000);
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, readSize);
|
||||
if (tmpSizeRead == 0) THROW_FORMAT("USB transfer timed out or failed");
|
||||
curOffset += tmpSizeRead;
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace tin::install::xci
|
|||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->xciName, args->hfs0Offset, args->ncaSize);
|
||||
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
u64 sizeRemaining = header.dataSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace tin::install::xci
|
|||
{
|
||||
while (sizeRemaining && !stopThreadsUsbXci)
|
||||
{
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
|
||||
if (tmpSizeRead == 0) THROW_FORMAT("USB transfer timed out or failed");
|
||||
sizeRemaining -= tmpSizeRead;
|
||||
|
||||
|
@ -95,7 +95,7 @@ namespace tin::install::xci
|
|||
int USBThreadFuncNcz(void* in) // nczs corrupt with ranges over 8MB
|
||||
{
|
||||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
tin::util::USBCmdHeader header;
|
||||
u64 sizeRemaining = args->ncaSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
@ -109,11 +109,11 @@ namespace tin::install::xci
|
|||
while (sizeRemaining && !stopThreadsUsbXci)
|
||||
{
|
||||
if (!curRequestLeft) {
|
||||
reqSize = std::min(sizeRemaining, (u64)0x800000);
|
||||
reqSize = std::min(sizeRemaining, (u64)0x1000000);
|
||||
header = tin::util::USBCmdManager::SendFileRangeCmd(args->xciName, args->hfs0Offset + curOffset, reqSize);
|
||||
curRequestLeft = header.dataSize;
|
||||
}
|
||||
readSize = std::min(curRequestLeft, (u64)0x800000);
|
||||
readSize = std::min(curRequestLeft, (u64)0x1000000);
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, readSize);
|
||||
if (tmpSizeRead == 0) THROW_FORMAT("USB transfer timed out or failed");
|
||||
curOffset += tmpSizeRead;
|
||||
|
|
Loading…
Reference in a new issue