Jump to content

greentea

Member
  • Posts

    69
  • Joined

  • Last visited

Everything posted by greentea

  1. I don't do my homework most of the time anyways, I'm considerably lazy, and yet I'm still doing fairly well. I've got a long weekend that I'm going to use to study Chemistry, read English and do some Calculus. I prefer to program in the morning shortly after I get up. Even before I eat or anything, don't know why, but that's when I always programmed when I was loafing during summer. However I rarely have time when I wake up, I still wake up early enough to do minor things but I wish I had weekends (I hate work and I honestly don't need to work). Typically I'd work after dinner or something like that, it depends where it fits into my schedule. And as always, I'll have a dozen questions and this topic will be 10 pages by the time I'm done
  2. Ya OK, I have to check the save count. I remember reading it at like 11 or something when I was really tired and supposed to be reading for English.
  3. Oh, I get what you mean now. I should check the date on both to see which one was the last saved one. Makes sense. I guess I'm going to display that general block info first then, might as well if I'm grabbing the date anyways.
  4. So two separate parts, one is a backup of the other. I guess it shouldn't always be an exact copy since it's an archival backup in-case of a save fail, but I'm only going to access one so it works the same if I think of it that way. OK, so 136 bytes for the entire pkm file with the first 8 being the unencrypted values of the pv and checksum. And I guess I understood the rest of it, so hopefully I'll get a chance to crack this tomorrow and see how it goes.
  5. OK, let's see if I've got this correct. There are two pairs of blocks and each block has three parts, the general, storage and hall of fame. For my purposes though, I will only concern myself with the storage block. I may display a few things in a potential program from the general block such as trainer OT, ID and SID, but I won't concern myself with that for now. The first storage block starts at C100 and the second is at 4C100, but one is just a copy of the other, the backup. I think each 128 values is a new pkm file in the save? The PKM info of the .sav is encrypted so I have to decrypt it: using X[n+1] = (0x41C64E6D * X[n] + 0x6073) 1) sub X[n] as the checksum value where the checksum value is: the sum of the encrypted hex from 0x08 to 0x87 truncated to 16 digits. 2) Y xor rand() where: Y is the is the 2-bit word (hex value) from 0x08 to 0x87 and rand() is X[n+1] This value becomes the unencrypted byte (of what?). 3) Unshuffle the blocks using the algorithm and equation: ((pv >> 0xD) & 0x1F) % 24 where pv is 0x00 to 0x03 and the rest is straight forward enough, it's just math stuff (Is the pv there the encrypted pv of the pkm file in the .sav file?) then I rearrange the values of the pkm file in the .sav file according to the decimal value. I essentially assign A as the first 32 hex values of the file and continue through to D as the last 32 hex values. (how does it work if it's 128 hex values when I use values over a decimal of 128 from the pkm file?) As you can see I'm a little confused, but I think I get a majority of it. Hopefully I can get some understanding of it soon so I can actually begin to program something later this week. Now I should have the information for the pkm file as if it were a pkm file right?
  6. I hope this book has that, because I do want to learn. I think it has a section on databases so I'll look that up soon. For now, using records of arrays works for me. It's obviously not the best method, but at the end of the day, if it can do what I want, then I have no complaints really. It does what I need it to do, and works fast enough not to care. I try to use whatever knowledge I can first before having to search new stuff. I use text files to store the information and read them in as variables into the arrays, I think it's better than hard coding, especially when there's a large upper bound, but obviously not as good as your method. But again, it works fine right, program doesn't take forever to load so it's OK.
  7. I plan on doing something like that, but filtering for all pokemon on the save that meet the criteria. Other thing is I have limited programming knowledge. I've got a book I'm working through but I still don't know too much. I have one crappy course worth, and the last project made me google/ask experts for help with. My idea of a database of information right now is a record of arrays.
  8. It first started that I was only interested in programming certain parts of the pkm file, but it eventually grew into programming everything. I've got what's essentially a pokesav edit screen that I've made entirely myself (less the stuff you helped me out with). I'll take a look at what you posted and see what I get. Right now, I'm only concerned with the Pokemon in the sav file and particularly only the PC Storage ones. What I plan to do is some sort of program that can save pkm files out of the sav file like Pokesav. But what I also plan to do is have the user be able to define some sort of search parameters and then display the pokemon that meet requirements and display them. So if you say bred 50 pokemon and had the eggs, you could search which ones had good IVs or if you wanted to find all the EV trained Pokemon in Attack, or even all the, say 10 ANIV events.
  9. I've done extensive programming with the pkm file, I've got almost all the details from the pkm file completed. Now I'm considering making a project with the sav file. A suggestion was a search function to search through your pkm files in the save to sort out files. But I looked through and it doesn't seem as linear as pkm files. Is it hard to do? I would only plan on displaying a couple of basic things like the OT and stuff which are simple, and then the PC Pokemon stuff. I just know that it's not as simple cause I looked at it. Looks like it's encrypted or something. If it's not too hard, would someone mind telling me how to do the box stuff? Thanks.
  10. X-Act always says, given the seed _____, but in my case, I want to determine the original seed, you know, work backwards.
  11. Well, I'll take a whirl at it when I get back from work. I'm sure I'll end up contacting him eventually, but lets see how far I get first. Thanks.
  12. Cool. I'm hoping to ultimately achieve something like in Legal.exe, where it determines the algorithm used to generate the Pokemon. Cool thing to do that doesn't seem too difficult if you know all the stuff to do (which someone knows). Just a matter of knowing what to do.
  13. I've been looking over the guides and talking with some people. I'm concerned about how they can tell which formula the Pokemon was generated with. From what I know, certain formulae (Wild NDS, Common GBA etc), toss out results from the PRNG. If it tosses out two or three, how do you know? The value isn't stored anywhere, it's just a garbage value. Could someone help explain this to me? I understand the coding behind it, just not how I'm supposed to apply the PRNG to get results. Like how Pokemon X is from formula Z.
  14. Ah, so you are right. Seems I wasn't thinking straight, I had forgotten this was a Platinum only event. Thanks for helping me sort that out.
  15. But I shouldn't have to do that. It should be legitimate to be obtained on a D/P game cart. It's not the pokemon I'm concerned about, I hear these things aren't too rare or hard to get, my friend probably has a dozen, but the fact that legal is disputing the results. If that changed the results, then I would suggest that the current version of Legal is flawed.
  16. PS. Sorry it's so big, I forgot to resize, so I put a spoiler. Both versions are capable of checking WCS Milotics, as it was distributed in 2008 and both versions are from well into 2009.
  17. Checking a WCS Milotic I got from a friend in the legality checker program. My friend has an old version and it says it's legit but this newer version I downloaded said it was hacked. What to do?!?!?! Which one is right?!?!?! Halp me.
  18. Can you please help me figure out what is wrong with this code? My head is spinning because it SHOULD be working. I've done error testing and what I found is that during the if statement whether it checks if the SelectedItem is found in the array, it doesn't find it. However, from checking the assignment earlier on, it DOES INDEED assign it. 'If its checked, it will open the selected item from the list box instead. If CheckBox1.Checked = True Then 'for all the indexies of the saved location record of array, if the selected item is found, then open that file For counter = 0 To SavedLocations.GetUpperBound(0) 'does not seem to find the variable at this point If lstFiles.SelectedItem = SavedLocations(counter).Name Then Filename2 = SavedLocations(counter).Full Else 'this displays the same as txtTest displayed earlier txtTest.text = lstFiles.SelectedItem End If Next Clipboard.SetText(Filename2) ReadFileBytes(Filename2) Else With FileOpenDialog1 'makes the default directory the last directory used 'goes to My Documents if the directory does not exist .InitialDirectory = LastDirectory If .ShowDialog = DialogResult.OK Then FileName = .FileName() 'stores in a public variable for use later on in program FileLocation = FileName LastDirectory = My.Computer.FileSystem.GetFileInfo(FileName).Directory.FullName Clipboard.SetText(FileName) ReadFileBytes(FileName) For Each FileName In .FileNames 'adds the File's name to the list box for easy open later lstFiles.Items.Add(My.Computer.FileSystem.GetFileInfo(FileName).Name) 'lstFiles.Items.Add(FileName) 'stores in a public variable for use later on in program NameFileName = My.Computer.FileSystem.GetFileInfo(FileName).Name 'stores the current file information in an array of records so we can access the specific data later SavedLocations(counter2).Name = My.Computer.FileSystem.GetFileInfo(FileName).Name SavedLocations(counter2).Location = My.Computer.FileSystem.GetFileInfo(FileName).Directory.FullName SavedLocations(counter2).Full = FileName 'displays the correct Name txtTest.text = SavedLocations(counter2).Name counter2 += 1 Next End If End With End If
  19. damio suggested that you send the source code to his trash byte program. He has offered to help me with my trash byte concerns, but feels it is best that I see the code first. Please tell me how you wish to send the source code. I'll check it out once I have it and go from there, who knows, maybe I'll understand better from seeing some coding of it.
  20. I tried it but it still didn't work. For some strange reason, .InitialDirectory seems to stay the first assigned one instead of the last one. Destructive read-in doesn't seem to work. However, I just removed the initial assignment of initial directory. It seems to store the value in long-term memory as well.
  21. If counter > 0 Then .InitialDirectory = My.Computer.FileSystem.GetFileInfo(FileName).Directory Else .InitialDirectory = "D:\Documents and Settings\owner\Desktop\Pokemon" counter += 1 End If Basically, the initial directory is set to my Pokemon folder and the next times through, it will use what should be the current FileName directory. However the error message is "Value of the type 'System.IO.DirectoryInfo' cannot be converted to 'string'". This method worked when I added the value in the list box. I realize I may need to change the place I assign it now that I think about it, but lets worry about the error code first, I can just copy and paste and store to a variable (gives me same error on the variable assignment too though). And I'm not a VB wiz, I've only been using it for a year, but I saw some code on storing stuff when searching up this. I may consider it.
  22. Thanks codemonkey, you're always here when I need you, and on the ball. I'm going out soon and a few things to do today, but I will definitely be checking out what you've posted when I go to program. A thing or two within the program I want to do first, like set the .initial directory to use the last used directory instead of the default. Do you by any chance know how to do the directory thing? I tried storing the directory in a variable but it wouldn't work, I'm not allowed to store it as a string.
  23. Thanks but that guide did not help me. I already have some knowledge in the hidden hex values for Platinum migration. I specifically need information regarding trash bytes. I may look into launching the program from within my program. I started to program launching it from within. I got as far as to load the .pkm file with Legal and display the information, but then I got to a rut. I posted for help on the VB forums that helped me in the past, so hopefully I can get the help I need there.
  24. Haha, funny guy. Sabresite understands the .pkm file checksum, or at least his program checks it. http://projectpokemon.org/wiki/Trash_Bytes I understand all of the introduction. I get the terminators, I get that there's two trash byte sections and where, and I know that there's three types and what trash bytes represent. Then I go and look at when they start to explain them. Migrated to English DP 18 20 0D 02 42 00 00 00 00 00 00 00 48 A1 0C 02 E0 FF 05 00 00 00 <random> <8E - 96> 27 02 <random> <D1 or D2> 26 02 E9 9A 06 02 00 00 All I understand from that is that it's talking about trash bytes when parked to English DP. I don't get the rest of it. Is it supposed to be proper values or specific values or what? Also, a buddy of mine who programs suggested that I include code in my program that basically runs Legal.exe within the program. I actually think it might not be a bad idea, I could output the data to a text file according to him, so I would be able to manipulate it. Oh, and I presume you don't know algorithm stuff since you didn't talk about it.
  25. Been a while since I posted eh? Glad to let you know it's going well so far, it's displaying all the info I want and exporting data to a text file. Also some other nice features such as a web browser. Anyways, the reason I'm back is because I thought, this program isn't all that useful right now. It doesn't do enough things. I thought about what else I could offer and I decided that some checking would be great. I saw the legality checker and I thought, if I could program that, or some of what it does, it would be awesome. I tried looking for stuff on trash bytes, but I couldn't really understand it. I then tried to look at the stuff about the algorithm, wild or normal NDS/GBA, uncommon GBA and all of that stuff, but I couldn't find any information regarding programming it in any way. And I have no idea in respect to checksum checking. Any more help for little old me? lol =P.
×
×
  • Create New...