* 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
* Feature/automatically reset rtc in backed up save file for gen2 (#14)
* 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
* Set the flag to reconfigure RTC in the backed up save file when backing up the save of a cartridge.
* Update libpokemegb submodule to commit 5037690
* Update libpokemegb submodule to commit 8ff128c
* Add support for Pokémon Green (JPN)
* Update libpokemegb submodule to commit 1897845
* Update README.md -> japanese pokemon fallback OT name change -> PokeMe64 -> PM64
* Add gen I move delete feature. (Idea by /u/ImranFZakhaev on Reddit)
* Add check to make sure the player is in a pokémon center before allowing him/her to delete a pokémon move.
The reason behind this check is to avoid getting the player stuck on a map after deleting an HM.
* Forgot to add the actual check in the last commit
* Feature/implement gen1 move deleter (#15)
* Add gen I move delete feature. (Idea by /u/ImranFZakhaev on Reddit)
* Add check to make sure the player is in a pokémon center before allowing him/her to delete a pokémon move.
The reason behind this check is to avoid getting the player stuck on a map after deleting an HM.
* Update screenshots
* Update CREDITS and add some people as Testing/Validation credits in the AboutScene
These people have been a great help in getting PokeMe64 to work correctly.
Thank you, everyone!
* Fix whitespace issues
* Update libpokemegb to commit aedb588
Because of a hardware limitation (we can only do 32-byte block writes), I'm forced to give up on batteryless reproduction
cartridges. So the only thing I can do is document why.
* Create PokemonPartyIconWidget for displaying the party menu icon in the distribution event pokemon menu (untested)
* Integrate PokemonPartyIconWidget into the DistributionPokemonListScene
* Do some visual changes to the DistributionPokemonListScene
* Revert "Undo README.md changes because they were already shown in github after merging the feature branch"
This reverts commit dc8d9bb00d.
* Update docs
* Add file and folder icon to SelectFileScene
* Create PokemonPartyIconWidget for displaying the party menu icon in the distribution event pokemon menu (untested)
* Integrate PokemonPartyIconWidget into the DistributionPokemonListScene
* Do some visual changes to the DistributionPokemonListScene
* Revert "Undo README.md changes because they were already shown in github after merging the feature branch"
This reverts commit dc8d9bb00d.
* Update docs
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
Add scroll arrows when there are more items in the list than the list can show at a time.
These arrows can be shown in the main menu (although there aren't enough items in there to have them shown) or in the various DistributionEventPokemonListScene menus.
I also did provisions to support the same for the ScrollWidget in the about screen. Although I haven't implemented that (yet?)
- Add "Pikachu Bed" and "Tentacool Doll" decoration unlock options for
gen 2
- bugfix for unsafe behaviour
- attempt to make the RESET button work for cartridge switching. It
failed though. (not reliable). Therefore I just added a warning
message instead.
- Work on new ScrollWidget for Credits/About screen (Work In Progress)
With these changes, libpokemegb will remove an existing GS Ball from the
players' inventory and reset all GS ball related event flags before
activating the event.
This basically fixes up saves which used earlier versions of PokeMe64
that only gave you the item without triggering the event. (By removing
the existing GS Ball item, it prevents the
need to create a new save in order to unlock the gs ball event
for the users who were so nice to test these earlier builds)
As an added bonus, this makes the GS Ball event entirely repeatable
(which is actually great). You just need to use PokeMe64 everytime to make the
event repeat from the start..
It was reported by /u/ImranFZakhaev on reddit that receiving the GS Ball
doesn't actually unlock the event. So I implemented it in a different
way.
By writing 0xB to 0x3E3C, we can start the GS Ball event semi-legit.
After triggering the GS Ball event from PokeMe64, you need to go to and
leave the Golden Rod Pokemon Center and an attendant will appear to hand
you the GS Ball.
Bug was reported by /u/imranFZakhaev on reddit:
When adding a pokémon to a save with a full party, the behaviour is
completely broken.
Not only did we add a pokémon to every box, but it also would be a
completely different one or even crash the game when trying to access
the box.
Fixes:
- Stop after adding a pokemon to a box. Don't add it to all.
- In commit 77d5d15 I added a ::setPokemon function and reworked the
Gen1Box::add() function to use it. That's where it went wrong:
in the add() function, we would modify the number_of_pokemon counter
of the box, but not manipulate the species list and write it.
Then in the setPokemon() function, we would read the box metadata and
correct it because the number did not match the species list. This is
what went wrong.
To fix it, I just had to modify the species list in the add() function
as well again.
This implements functionality to teach Pikachu Surf and/or Fly and
extends existing widgets to help provide this functionality.
When a gen1 game is inserted, the user gets the choice to teach Pikachu
these moves.
This commit also restructures some of the Data and Style structs.
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)