diff --git a/main/Cargo.toml b/main/Cargo.toml new file mode 100644 index 0000000..8a082f2 --- /dev/null +++ b/main/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pokevault" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/main/main.iml b/main/main.iml new file mode 100644 index 0000000..2fecef3 --- /dev/null +++ b/main/main.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/main/src/main.rs b/main/src/main.rs new file mode 100644 index 0000000..49a87c7 --- /dev/null +++ b/main/src/main.rs @@ -0,0 +1,28 @@ +use std::fs::File; +use std::io::{BufReader, Read}; +use std::path::Path; + +use crate::saves::{convert_trainer_name, Save}; + +mod test; +mod saves; + +fn main() { + +} + +fn read_save(save_path: &Path) -> Result{ + let f = File::open(save_path).unwrap(); + let mut reader = BufReader::new(f); + let mut buffer = Vec::new(); + reader.read_to_end(&mut buffer).unwrap(); + let mut temp:Vec = Vec::new(); + for &var in &buffer[0x2598.. 0x2598 + 0xb] { + + } + let save = Save { + trainer_name: convert_trainer_name(buffer[0x2598 .. 0x2598 + 0xb]), + playtime_hours: *&buffer[0x2CED] + }; + return Ok(save); //learned something new today +} \ No newline at end of file diff --git a/main/src/saves.rs b/main/src/saves.rs index fd2fe77..01fe33c 100644 --- a/main/src/saves.rs +++ b/main/src/saves.rs @@ -1,4 +1,13 @@ pub struct Save { pub(crate) trainer_name: String, pub(crate) playtime_hours: u8 //in seconds, biggest number should be like 4.3 mill, biggest available time (999:95) is like... 3.6 mill, maybe a little more. 3.7 max +} + +// Bytes from the save are not utf8... or i think so. The numbers need to be lower at least. +// The save's name should be RED, so have to finish this function +pub fn convert_trainer_name(bytes: [u8]) -> String { + for mut x in bytes { + x -= 40; + } + return String::from_utf8(bytes).unwrap(); } \ No newline at end of file diff --git a/saves/Pokémon Stadium (100%)/POKEMON STADIUM.bak b/saves/Pokémon Stadium (100%)/POKEMON STADIUM.bak new file mode 100644 index 0000000..0310558 Binary files /dev/null and b/saves/Pokémon Stadium (100%)/POKEMON STADIUM.bak differ diff --git a/saves/Pokémon Stadium (100%)/POKEMON STADIUM.fla b/saves/Pokémon Stadium (100%)/POKEMON STADIUM.fla new file mode 100644 index 0000000..2c11d59 Binary files /dev/null and b/saves/Pokémon Stadium (100%)/POKEMON STADIUM.fla differ diff --git a/saves/Pokémon Stadium (100%)/readme.txt b/saves/Pokémon Stadium (100%)/readme.txt new file mode 100644 index 0000000..c6fc28c --- /dev/null +++ b/saves/Pokémon Stadium (100%)/readme.txt @@ -0,0 +1,23 @@ +-compatible with Project64 v2.3.2 (tested) + +1. Have Pkmn Stadium ROM +2. Install and Open PJ64 [put POKEMON STADIUM.fla and POKEMON STADIUM.bak in C:\(WHEREVER YOU INSTALLED IT)\Project64 2.3\Save] +3. Go to Options -> "Configure Controller Plugin" -> "Controller 1" -> "Controller Pak" +4. Toggle "RawData" (make sure it has a checkmark) +5. Select "Transfer Pak" in the drop-down menu +6. Select the ROM (.gbc) file [the game itself] +7. Select the save file (.sav or .sv) +8. Open Pkmn Stadium ROM and go to the Pokemon Stadium (has floating Mewtwo shadow above) +9. Go to Prof. Oak's research Lab +10. Select the game cartridge +11. Use the sophisticated PC. +12. Select Items +13. Select "Choose left/right BOX" +14. Select "N64 Game Pak". +15. Enjoy! Transfer to your heart's content + +Optional: If you want to play the game use GlideN64 for best results (https://github.com/gonetz/GLideN64/releases) + +-use a GameBoy emulator to save in a Pkmn Center (like VisualBoyAdvance or mGBA) +-DO NOT USE THE GB TOWER + diff --git a/saves/Pokémon Yellow (100%)/Diploma/Pokemon - Yellow Version (UE) [C][!]-print01.png b/saves/Pokémon Yellow (100%)/Diploma/Pokemon - Yellow Version (UE) [C][!]-print01.png new file mode 100644 index 0000000..39592f0 Binary files /dev/null and b/saves/Pokémon Yellow (100%)/Diploma/Pokemon - Yellow Version (UE) [C][!]-print01.png differ diff --git a/saves/Pokémon Yellow (100%)/Surfing Pikachu/Pokémon - Yellow Version (UE) [C][!].sav b/saves/Pokémon Yellow (100%)/Surfing Pikachu/Pokémon - Yellow Version (UE) [C][!].sav new file mode 100644 index 0000000..cad2c11 Binary files /dev/null and b/saves/Pokémon Yellow (100%)/Surfing Pikachu/Pokémon - Yellow Version (UE) [C][!].sav differ diff --git a/saves/Pokémon Yellow (100%)/readme.txt b/saves/Pokémon Yellow (100%)/readme.txt new file mode 100644 index 0000000..4b203bf --- /dev/null +++ b/saves/Pokémon Yellow (100%)/readme.txt @@ -0,0 +1,20 @@ +Instructions + +1. Pick the save file which you want. +2. Put it in the directory (folder) which the emulator reads it from, which could be... + - the directory of the ROM + - subsidiary of the emulator (one of the folders where the emulator executable is located) + - a custom location ( check the directory settings of the emulator (usually called native or battery saves) ) + +3. Make sure the (.sav) file matches the name of the ROM! (rename it if you have to) +4. Enjoy! + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +Contents + +1. All Pokemon are seen and caught. (all in the PC at level 100 each) +2. All items collected around the map. (even the hidden ones) +3. All trainers battled at least once. (Elite Four can be rebattled infinitely) +4. Party consists of Pikachu at max friendship (w/ or w/o Surf) & a Mew with all HMs. (w/ or w/o Surf) - Pikachu has the HM that Mew doesn't. +5. A diploma proving the ownership of a complete Pokédex. \ No newline at end of file diff --git a/saves/yellow_surfing/test_surfing.sav b/saves/yellow_surfing/test_surfing.sav new file mode 100644 index 0000000..cad2c11 Binary files /dev/null and b/saves/yellow_surfing/test_surfing.sav differ