Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build is passing Details

master
Dmitry Isaenko 2023-02-08 02:31:05 +03:00
commit 4d7c6f6ef1
3 changed files with 14 additions and 4 deletions

View File

@ -32,6 +32,7 @@ import nsusbloader.Utilities.patches.es.finders.HeuristicEsWizard;
import java.io.BufferedOutputStream;
import java.io.File;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
@ -118,7 +119,7 @@ public class EsPatch {
handyEsPatch.put(FOOTER);
byte[] esPatch = new byte[handyEsPatch.position()];
handyEsPatch.rewind();
((Buffer) handyEsPatch).rewind();
handyEsPatch.get(esPatch);
try (BufferedOutputStream stream = new BufferedOutputStream(

View File

@ -35,6 +35,7 @@ import nsusbloader.Utilities.patches.BinToAsmPrinter;
import nsusbloader.Utilities.patches.fs.finders.HeuristicFsWizard;
import java.io.*;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
@ -87,6 +88,13 @@ public class FsPatch {
logPrinter.print(" == Debug information ==\n"+wizard.getDebug(), EMsgType.NULL);
}
private KIP1Provider getKIP1Provider() throws Exception{
System.out.println("ncaProvider "+ncaProvider);
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(0));
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(1));
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(2));
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(3));
RomFsProvider romFsProvider = ncaProvider.getNCAContentProvider(0).getRomfs();
FileSystemEntry package2FsEntry = romFsProvider.getRootEntry().getContent()
@ -175,7 +183,7 @@ public class FsPatch {
handyFsPatch.put(FOOTER);
byte[] fsPatch = new byte[handyFsPatch.position()];
handyFsPatch.rewind();
((Buffer) handyFsPatch).rewind();
handyFsPatch.get(fsPatch);
try (BufferedOutputStream stream = new BufferedOutputStream(

View File

@ -30,6 +30,7 @@ import nsusbloader.Utilities.patches.SimplyFind;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
@ -110,7 +111,7 @@ public class LoaderPatch {
private void writeFile() throws Exception{
String patchFileLocation = saveToLocation + File.separator +
"atmosphere" + File.separator + "kip_patches" + File.separator + "fs_patches" + File.separator + patchName;
"atmosphere" + File.separator + "kip_patches" + File.separator + "loader_patches" + File.separator + patchName;
ByteBuffer handyFsPatch = ByteBuffer.allocate(0x100).order(ByteOrder.LITTLE_ENDIAN);
handyFsPatch.put(HEADER);
@ -118,7 +119,7 @@ public class LoaderPatch {
handyFsPatch.put(FOOTER);
byte[] fsPatch = new byte[handyFsPatch.position()];
handyFsPatch.rewind();
((Buffer) handyFsPatch).rewind();
handyFsPatch.get(fsPatch);
try (BufferedOutputStream stream = new BufferedOutputStream(