mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-03-27 20:54:46 -05:00
b67210c193
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dce6864795
|
Feature/add support for other game languages (#13)
* Add support for other game localizations/languages * Increase PokeMe64 version to v0.3 * Update README.md * Slightly improve the text in docs/Why_I_Had_To_Give_Up_On_Batteryless_Repros.md * Update libpokemegb submodule to commit 3d86aa8 * Add Japanese characters to the fonts * Make validating Japanese save files work correctly Turns out these Japanese cartridges are using an MBC1 controller. There's a notable difference between it and MBC3: by default it is doing banking mode 0. But in this mode, you can't switch SRAM banks! So in order to make japanese cartridges work, we must switch to mode 1. * Update Arial font: add Japanese glyphs from Osaka Regular-Mono.ttf In order to render japanese characters, we need to have a font which has japanese characters and make sure they are added to the .font64 file with mkfont during compilation. I wrote a small program before to figure out which Japanese characters are actually used in the Japanese gameboy cartridges. I only added those unicode ranges to the fonts to keep them small. There was no easy way to have a font that has both latin and Japanese characters, especially not free. So I used FontForge to merge the japanese glyphs from Osaka Regular-Mono into Arial.ttf * Update libpokemegb to commit 0ef7a3a * Update libpokemegb submodule * Update libpokemegb submodule to commit d6f3423 * Various changes - Upgrade libpokemegb to commit c47f8b3 - [Korean gen II games]: Make the UI show Trainer and Pokémon instead of the actual trainer name and pokémon name. This is needed because our font does not include the necessary characters for the Korean games. And while I could attempt to add them, I don't sufficiently care to do so. - Attempt to randomize random values. This is needed for random IVs and shininess chances. It's not entirely clear to me whether the rand() function would actually return random values in previous versions of PokeMe64. While libdragon does gather entropy at bootup and implements a getentropy() function, I don't see this function referenced anywhere. That being said, it DOES look like libstdc++ would call a getentropy() function, so perhaps this is a way in which getentropy() from libdragon would get called. But I'm not using libstdc++'s functionality to obtain random values, I'm using libc's rand() function. And I don't see any reference from libc (for rand()) to getentropy(), so... At the very least we might need to use values from getentropy() to seed with srand(). But because I have trust issues with randomizing pseudo-random values in a system that doesn't have a system clock, I also added trainerID, trainerName and the number of elapsed cpu cycles until we are going to the main menu to the seed. I might consider adding the RTC values for gen II games to the seed as well later. * Update README.md * More README.md * Update libpokemegb to commit 17232c4 |
||
|
|
711107d453
|
Feature/backup cartridge save to flashcart sd (#7)
Merged feature/backup cartridge save to flashcart sd Summary: * Add menu options to backup/restore a save from a pokémon gen I/II cartridge to the N64 flashcarts' SD card. This is only compatible with 64Drive, Everdrive64, ED64Plus and SummerCart64! * Add menu option to wipe a save from a cartridge * Add menu option to reset the in-game clock of gen II cartridges. This will let the game prompt to update the clock on the next time you try to load the save file. Before it was quite hard to reset the game clock without starting a new save. Especially for crystal you had to calculate some kind of password to make it work. Not anymore. PokeMe64 now makes this easy! Commits: * Write a hello world of sorts for writing to SD card. This just writes a file sd://helloworld.txt to the sd card. It will form the basis for implementing save backup * Implement save file backup functionality. It works! But it needs some UI work (progress bar or something), because it takes > 5 seconds * Add ProgressBarWidget and SceneWithProgressBar * Add DataCopyScene and implement backup/restore with progress indication properly Added a new DataCopyScene which takes care of displaying a progress bar while we're backup'ing or restoring data. I also implemented cartridge Rom and Save backup to (micro)SD card and Save restore from (micro)SD card to the cartridge. And it works! I verified it with my Pokémon Blue cartridge: I can back up its save, play the game, release almost all pokémon, go to a different location and save again and then restore the previous save using PokeMe64 Rom backup also works: I can play the resulting rom in VisualBoyAdvance without any issue. I can also use the save that I backed up in VisualBoyAdvance. So right now, you can take an emulator save/pkhex save and transfer it to an actual (original) pokémon cartridge and it will work! However, it's not ready for release yet for a few reasons: - It will currently always output to sd:/gb_out.sav and sd:/rom.gb. I want it to output to sd:/<cartridgetitle>_<trainername>.sav and sd:/<cartridgetitle_<trainername>.gb instead. In fact I want PokeMe64 to add numbers to the save file in case one already exists with that name. - libdragon currently doesn't have the functionality to create directories. I wish PokeMe64 to backup to a directory called PokeMe64, even if the directory doesn't exist yet. - I want a file selector so you can select which save file to restore. This way you could have multiple saves. In theory that would also allow you to transfer a pokémon red save to a pokémon blue cartridge and so on. - I want to have a wipe save option - I need to safeguard PokeMe64 for corrupted save data. Right now, for reproduction carts PokeMe64 crashes while trying to decode the trainerName. This is because the actual save file is not accessible on a reproduction cart. If I'm going to allow people to restore random saves (even from different versions alltogether), I need PokeMe64 to be robust enough for people to be able to wipe the save file or restore a different one. (in order for them to be able to correct their mistake without having to take out the battery). In order to be robust enough, I should make sure to check the CRC checksum of the save file before going to the main menu. And if it doesn't match, I should offer a reduced menu to the user. So... no release of this feature until I resolve all the topics above. But man, it's so satisfying to see it work in the current form already! The functionality itself just works on first try! * Add FileBrowserWidget and rework TestScene to use it for testing purposes * Add SelectFileScene and connect everything together. * Generate unique save file names <gameName>_<trainerName>_<uniquenumber>.sav (the last part is optional) This allows you to backup your save multiple times without overwriting the pre-existing ones. * Add option to wipe save and validate save CRC before continuing to main menu If an invalid/corrupt save is found, the user will only be offered the backup/restore options The wipe save option exists in case the user messes up and restores a save that makes the gameboy crash on bootup. (I don't know if that can actually happen, but just in case) After all: the backup/restore options allow for restoring saves of different games than the cartridge you're restoring to. (a red save to a blue cartridge, ...) Therefore the user could also -accidentally- restore a gold save to a blue cartridge (for example). So yeah, that option is only there to fix theoretic accidents without the user having to take out the battery. * Add "Reset clock" function so you can easily reconfigure your game clock in gen 2 There's no straightforward in gen 2 to reconfigure the in-game clock. There's an arcane key combination that's the worst on Pokémon Crystal and requires you to calculate some kind of password. Now PokeMe64 makes it easy: the "Reset Clock" function sets a flag that will let the game prompt you in the main menu to reconfigure the date/time again. * Update README.md * Move Reset Clock option to the main menu * Some usability tweaks of the SelectFileScene - Add title - Add scroll arrows - Make it possible to go back to the previous scene - Increase PokeMe64 version to 0.2 * Ask confirmation before wiping the save |
||
|
|
8e556391f3
|
Feature/show cartridge icons in initial transferpak scene (#4)
We now show a cartridge icon in the initial transferpak scene, which switches to the cartridge that was detected. |
||
|
|
e51726eef9 |
Initial import of the first (extremely early) functional version.
It doesn't look like much, but it's functional ;-) It can inject distribution pokémon into gen 1 and gen 2 original cartridges and inject the GS ball in Pokémon Crystal. That's it. But that was the minimal feature set I had in mind for the project. In the Readme.md you can find the ideas I have for expanding the project. But the first priority is the UI, because it really looks bad right now. (as I was mostly focused on building blocks and transfer pak functionality. Not on making it looks good) |