ROM Hack help with source code to decrypt .sav from bw

marcos91

Member
OP
Newcomer
Joined
Nov 13, 2011
Messages
15
Trophies
0
XP
28
Country
I want to make a "team checker" fifth generation physical tournament but there is a part that does not work well. The part of the block itself, but to decrypt the .sav file doesn't work.

First I want to try a pkm extracted directly from the .sav and then adapt it to the file

I followed this guide but for some reason I'm god at the result, for example bit 8 = c8 (encrypted) would have to get out 83 (decryption) but does not give me that number.

Link of source code and reshiram (encrypted and decrypted with pokegen):
http://www.mediafire.com/?8oti8m294z0sjr5

Anyone know what is wrong? I want to learn how it works

-----------

public class PokemonTeamCheck5Gen {
public static void main(String[] args)throws Exception{

//block a-b-c-d (0-24)
Long pid = 3621399865L;
int a = Math.round(((pid & 0x3E000) >> 0xD) % 24);
System.out.println(a);

//Read encrypted pkm extracted from .sav (0x18E08 - 0x18E0B = pid poke 1)
JFileChooser fileopen = new JFileChooser();
fileopen.setDialogTitle("Team Checker (Written by marcos91)");
if (fileopen.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){
File file = fileopen.getSelectedFile();
FileInputStream fis = new FileInputStream(file);
DataInputStream input = new DataInputStream(fis);

int[] pkm = new int[136];
for (int i=0; i<136; i++){
pkm = input.read();
}

//checksum = 0x27dd (dd27 in little endian)

//Decrypt data
//x[i+1] = x ^ Math.round((0x41C64E6D * 0xdd27 + 0x6073));
int[] x = new int[136];

for (int j=8; j<136; j++){
x[j] = x[j] ^ Math.round((0x41C64E6D * 0x27dd + 0x6073));
System.out.println(x[j]);
}

}
}
}
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
    +1
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
  • BakerMan @ BakerMan:
    Also, no, that was his first time having a seizure, and hopefully the last
    +1
  • K3Nv2 @ K3Nv2:
    Ea play raised priced to $6 a month lol
  • BigOnYa @ BigOnYa:
    Same with uremum, she's now $2 a month
  • K3Nv2 @ K3Nv2:
    Also seizures come and and go they don't have an off switch like that it all depends
    K3Nv2 @ K3Nv2: Also seizures come and and go they don't have an off switch like that it all depends