Update readme
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dmitry Isaenko 2022-12-23 21:53:34 +03:00
parent 338bb699d1
commit a60d929dcd
7 changed files with 13 additions and 38 deletions

View file

@ -22,9 +22,9 @@ With GUI and cookies. Works on Windows, macOS and Linux.
Sometimes I add new posts about this project [on my blog page](https://developersu.blogspot.com/search/label/NS-USBloader). Sometimes I add new posts about this project [on my blog page](https://developersu.blogspot.com/search/label/NS-USBloader).
![Application screenshot](screenshots/1.png) <img src="screenshots/1.png" alt="screenshot" width="250"/> <img src="screenshots/2.png" alt="screenshot" width="250"/>
<img src="screenshots/2.png" alt="screenshot" width="250"/> <img src="screenshots/3.png" alt="screenshot" width="250"/> <img src="screenshots/3.png" alt="screenshot" width="250"/> <img src="screenshots/4.png" alt="screenshot" width="250"/>
<img src="screenshots/4.png" alt="screenshot" width="250"/> <img src="screenshots/5.png" alt="screenshot" width="250"/> <img src="screenshots/5.png" alt="screenshot" width="250"/>
#### License #### License

View file

@ -102,21 +102,21 @@ public class BinToAsmPrinter {
} }
if ((instructionExpression >> 21 & 0x7FF) == 0x1C2) if ((instructionExpression >> 21 & 0x7FF) == 0x1C2)
return printLDURBSimplified(instructionExpression, offset); return printImTooLazy("LDURB", instructionExpression, offset);
// same to (afterJumpExpression >> 23 & 0x1F9) != 0xA1 // same to (afterJumpExpression >> 23 & 0x1F9) != 0xA1
switch (instructionExpression >> 22 & 0x1FF){ switch (instructionExpression >> 22 & 0x1FF){
case 0xA3: // 0b10100011 case 0xA3: // 0b10100011
case 0xA7: // 0b10100111 case 0xA7: // 0b10100111
case 0xA5: // 0b10100101 case 0xA5: // 0b10100101
return printLDPSimplified(instructionExpression, offset); return printImTooLazy("LDP", instructionExpression, offset);
} }
switch ((instructionExpression >> 23 & 0xff)){ switch ((instructionExpression >> 23 & 0xff)){
case 0xA5: case 0xA5:
return printMOVSimplified(instructionExpression, offset); return printMOVSimplified(instructionExpression, offset);
case 0x22: case 0x22:
return printADDSimplified(instructionExpression, offset); return printImTooLazy("ADD", instructionExpression, offset);
case 0x62: case 0x62:
if (((instructionExpression & 0x1f) == 0x1f)){ if (((instructionExpression & 0x1f) == 0x1f)){
return printCMNSimplified(instructionExpression, offset); return printCMNSimplified(instructionExpression, offset);
@ -416,22 +416,12 @@ public class BinToAsmPrinter {
getBConditionalMarker(instructionExpression & 0xf), getBConditionalMarker(instructionExpression & 0xf),
conditionalJumpLocation, (conditionalJumpLocation + 0x100)); conditionalJumpLocation, (conditionalJumpLocation + 0x100));
} }
private static String printImTooLazy(String name, int instructionExpression, int offset){
return String.format(
"%05x "+ANSI_CYAN+"%08x (%08x)"+ANSI_YELLOW + " "+name+" . . . \n"+ ANSI_RESET,
offset, Integer.reverseBytes(instructionExpression), instructionExpression);
}
private static String printADDSimplified(int instructionExpression, int offset){ //ADD (immediate)
return String.format(
"%05x "+ANSI_CYAN+"%08x (%08x)"+ANSI_YELLOW + " ADD . . . \n"+ ANSI_RESET,
offset, Integer.reverseBytes(instructionExpression), instructionExpression);
}
private static String printLDPSimplified(int instructionExpression, int offset){
return String.format(
"%05x "+ANSI_CYAN+"%08x (%08x)"+ANSI_YELLOW + " LDP . . . \n"+ ANSI_RESET,
offset, Integer.reverseBytes(instructionExpression), instructionExpression);
}
private static String printLDURBSimplified(int instructionExpression, int offset){
return String.format(
"%05x "+ANSI_CYAN+"%08x (%08x)"+ANSI_YELLOW + " LDURB . . . \n"+ ANSI_RESET,
offset, Integer.reverseBytes(instructionExpression), instructionExpression);
}
private static String printSUBSimplified(int instructionExpression, int offset){ private static String printSUBSimplified(int instructionExpression, int offset){
String wx = (instructionExpression >> 31 == 0) ? "W" : "X"; String wx = (instructionExpression >> 31 == 0) ? "W" : "X";
int Rt = instructionExpression & 0x1f; int Rt = instructionExpression & 0x1f;

View file

@ -67,6 +67,8 @@ public class EsPatch {
fwVersion = Long.parseLong(""+ncaProvider.getSdkVersion()[3]+ncaProvider.getSdkVersion()[2] fwVersion = Long.parseLong(""+ncaProvider.getSdkVersion()[3]+ncaProvider.getSdkVersion()[2]
+ncaProvider.getSdkVersion()[1] +ncaProvider.getSdkVersion()[0]); +ncaProvider.getSdkVersion()[1] +ncaProvider.getSdkVersion()[0]);
logPrinter.print("Internal firmware version: "+ncaProvider.getSdkVersion()[3] +"."+ncaProvider.getSdkVersion()[2] +"."+ncaProvider.getSdkVersion()[1] +"."+ncaProvider.getSdkVersion()[0], EMsgType.INFO); logPrinter.print("Internal firmware version: "+ncaProvider.getSdkVersion()[3] +"."+ncaProvider.getSdkVersion()[2] +"."+ncaProvider.getSdkVersion()[1] +"."+ncaProvider.getSdkVersion()[0], EMsgType.INFO);
if (fwVersion < 9300)
logPrinter.print("WARNING! FIRMWARES VERSIONS BEFORE 9.0.0 ARE NOT SUPPORTED! USING PRODUCED ES PATCHES (IF ANY) COULD BREAK SOMETHING! IT'S NEVER BEEN TESTED!", EMsgType.WARNING);
} }
private void getBuildId(NSO0Provider nso0Provider) throws Exception{ private void getBuildId(NSO0Provider nso0Provider) throws Exception{
NSO0Header nso0DecompressedHeader = nso0Provider.getAsDecompressedNSO0().getHeader(); NSO0Header nso0DecompressedHeader = nso0Provider.getAsDecompressedNSO0().getHeader();

View file

@ -101,9 +101,4 @@ class HeuristicEs1 implements IHeuristicEs {
return builder.toString(); return builder.toString();
} }
@Override
public int getId(){
return 1;
}
} }

View file

@ -160,9 +160,4 @@ class HeuristicEs2 implements IHeuristicEs {
return builder.toString(); return builder.toString();
} }
@Override
public int getId(){
return 2;
}
} }

View file

@ -143,9 +143,4 @@ class HeuristicEs3 implements IHeuristicEs {
} }
return builder.toString(); return builder.toString();
} }
@Override
public int getId(){
return 3;
}
} }

View file

@ -42,6 +42,4 @@ interface IHeuristicEs {
* @return isFound(); * @return isFound();
* */ * */
boolean setOffsetsNearby(int offsetNearby); boolean setOffsetsNearby(int offsetNearby);
int getId();
} }