Compare commits

..

2 commits

Author SHA1 Message Date
Dmitry Isaenko
4d7c6f6ef1 Merge remote-tracking branch 'origin/master'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-08 02:31:05 +03:00
Dmitry Isaenko
c39a5f4c5b Correct Java 8 related things
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-07 00:05:13 +03:00
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.BufferedOutputStream;
import java.io.File; import java.io.File;
import java.nio.Buffer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -118,7 +119,7 @@ public class EsPatch {
handyEsPatch.put(FOOTER); handyEsPatch.put(FOOTER);
byte[] esPatch = new byte[handyEsPatch.position()]; byte[] esPatch = new byte[handyEsPatch.position()];
handyEsPatch.rewind(); ((Buffer) handyEsPatch).rewind();
handyEsPatch.get(esPatch); handyEsPatch.get(esPatch);
try (BufferedOutputStream stream = new BufferedOutputStream( try (BufferedOutputStream stream = new BufferedOutputStream(

View file

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

View file

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