kbembedded / flipper-zero-game-boy-pokemon-trading Goto Github PK
View Code? Open in Web Editor NEWPokemon trade from Flipper Zero to Game Boy for Generation I & II games (Pokemon Red, Blue, Yellow, Gold, Silver, and Crystal)
License: MIT License
Pokemon trade from Flipper Zero to Game Boy for Generation I & II games (Pokemon Red, Blue, Yellow, Gold, Silver, and Crystal)
License: MIT License
Could also mean support for IR gifts, which would mean it could act as an IR demo
Currently, the way the Flipper system works is that once initial link is established with a Game Boy via the Trade PKMN
option, backing out of the trade window is equivalent to the Game Boy side leaving the trade selection screen but remaining in the trade room.
If the Game Boy were to be turned off, the Flipper would still be "in the trade room" and link cannot be re-established unless the Flipper were to completely back out and start over. This would lose the current Pokemon configuration.
Add an option to the configuration menu that appears after initial trade is established, to completely reset the trade status without reverting the currently configured Pokemon.
No response
Trading App version: 1.3
Flipper Firmware: 0.94.1
Game: Pokémon Yellow, French version
I can't trade: it forces me to receive a glitched Rhydon, instead of the Pokémon I want.
This Rhydon is glitched: on the first trade I made, I couldn't open my Pokémon list anymore (white screen and couldn't quit) after the broken trade.
The video below shows the second trade where I am forced to exchange this Rhydon which breaks my save for a Rhydon which doesn't break my save but is still glitched (no name, strange stats, broken icons)
Note: I tried with and without resistors on CLK, the issue is the same.
Video of the issue (Rhynoferos = Rhydon and Bulbizarre = Bulbasaur, the Pokémon I chose in the app): https://youtu.be/sYfjd7b4AdA
No response
No response
No response
Split from #24
Be able to select a pinout, be it the Original, older MALVEKE, or custom, and have that be the default on application load. This is going to need some work on the pokemon_pins layout as that was pretty hacky to begin with.
No response
Small touch, but, would like to be able to display the correct Unown form on select and trade screens.
This needs more than just sprite work, it also needs some work to be able to put these sprites in the sprite sheet in a way that they can be correctly pulled out and not disrupt other pokemon.
I have an idea for how to go about this using a lookup table prepended to the spritesheet that points at the base offset for the selected Pokemon number (rather than just assuming that all sprites are the same size and in the exact national Pokedex order). This could then use a base + letter offset, putting the 202nd Pokemon after the Unown sprite cluster.
No response
While it does not apply to Crystal, Gold/Silver can allow arbitrary time change of the RTC with a password. Having this in this app could be really handy.
Examples:
http://www.psypokes.com/gsc/timechange.php
https://legendarypkmn.net/pass/
The downside is that right now, there is no way to input some of the special chars that could be used in a name. However, this would work with little effort for all alpha characters in a name.
No response
I am using Unleashed and a Game Boy Color with Pokémon Yellow. I traded a Mew and it was successful but when I check my Pokémon the Mew has no name. It is just left blank
It would be cool to use this technique with pokemon emulators, like in retropie, in addition to real gameboys. Think this might be possible either with a physical cord, or also with emulation? 🤔 I'd help if I can ¯\_(ツ)_/¯
(This was proposed to me in Discord, I don't have much knowledge of the subject, but, could be a neat tool to have in place)
An implementation of this: https://pokemonexperte.de/smaragd/geheimwort.php?language=en
No response
The GB icon already exists and can be put on the canvas in the right place, line drawing func can be used to draw the animation. This would save on two separate images needed for the animation and gain back some additional application space.
N/A
No response
No response
No response
You don't have one, can you add one?
See here for instructions
No response
No response
No response
Definitely needs to be locked behind an option and not something one is able to do by default.
However, there might be some merit in giving the app the ability to trade arbitrarily numbered Pokemon in supported generations just for fun and crashing.
No response
Using GPIO with the GpioModeInterruptRise mode causes the OK
button to freeze when exiting the application.
The mandatory solution is to reboot the Flipper Zero.
Since we are able to trade with the flipper already, would it be possible to trade and have the pokemon stored instead of them just getting deleted? This way we can have a Bank that can store pokemon that you want to be stored/ have traded. Also with this feature i think we should be able to use the time capsule from Gold/Silver/Crystal to transfer pokemon up a generation.
color
Hello!
Your Pokemon Trading app version 1.2
fails to build with the SDK version 0.100.1-rc f7
. Please update the app in your repository and create a new pull request to the catalog repository with the updated manifest file.
IMPORTANT: Don’t forget to update the app version and commit version in the manifest file.
Flipper Team
Flipper crashes on a furi_check failed after selecting a pokemon. When building from source, looked to be an issue when opening up the serial / gpio ports.
latest official firmware
No response
No response
When implementing and testing the check everything seemed to work; however, I've recently found that when a non-MALVEKE board is plugged in at the start of the trade tool application, it is incorrectly detected as being present. I missed adding a delay between setting the pin states and reading them back. This has already been fixed and will be included in the 2.0 release.
WORKAROUND:
If using a non-MALVEKE board to connect to a Game Boy to trade, be sure to select the pinout before entering the trade window, using the Original
pinout will work for most non-MALVEKE boards.
N/A
No response
No response
No response
What resistor are you using on the board or did you just not have enough cables?
As documented in the pokered et al. projects there is more data being sent around than the Flipper app (or any existing open-source trade tool that I can find) takes in to account. This is referred to in disassembled code as the PatchList.
As far as I know, this applies to at least Gen I and Gen II.
Its 200 bytes and as far as I can tell is meant to be an index in to each half of the ~418 byte trade struct that is transmitted. The issue is that the byte value 0xFE
is considered a SERIAL_DATA_NO_BYTE value. Likely an indicator that data was not ready in time so the byte is invalid.
I only have a really basic understanding of the concept at this point and will be doing more testing and debugging work in the near future. But my understanding at the moment is:
party_data+0x00
to party_data+0xFC
party_data+0xFD
to party_data+party_data_len
party_data
struct that equal 0xFE
are instead set to 0xFF
and the address is to the patch list.0x00
means don't patch anything.0x01
Means byte 0 of this part needs to be modified to be 0xFE in the party_data struct received
0xnn
Means byte nn-1 of this part needs to be modified to be 0xFE in the party_data struct received
I have seen a few oddities in some trades, i.e. weirdly long HP bar that wasn't full after trade, that was resolved after a trip to the poke center.
My goal is to instrument some testing to force 0xFE
values in the traded struct from the Flipper in safe locations and see how they are interpreted on the actual gameboy. I suspect I will see the whole trade struct shifted by 1 for each 0xFE
that the Flipper transmitted.
Once I complete that, I should be able to instrument both building and sending as well as receiving and parsing patch lists.
I don't quite have a good grasp of the effects. However, a shift can be seen with the following patch:
diff --git a/views/trade.c b/views/trade.c
index fa17ce367e8d..b0a5e3f93655 100644
--- a/views/trade.c
+++ b/views/trade.c
@@ -455,6 +455,24 @@ void trade_enter_callback(void* context) {
},
true);
+ /* Test to expose issue #18 */
+ /* Set the pokmeon's level to 0xFE. Levels above 100 are possible but will
+ * roll back down to 100 on the next level obtained (or if you give a rare
+ * candy to a level 255 it will roll to level 0.
+ * https://bulbapedia.bulbagarden.net/wiki/List_of_glitches_(Generation_I)#Leveling_past_100
+ */
+ pokemon_fap->trade_block->party[0].level = 0xfe;
+
+ /* With that byte as 0xFE and no patch list implementation, the next data in
+ * the stsruct is the Pokemon's status condition. Lets set this to level 42.
+ */
+ pokemon_fap->trade_block->party[0].status_condition = 42;
+
+ /* At this point, the traded pokemon will end up being level 42, and its
+ * other stats are going to be all out of whack as well.
+ */
+
+
// B3 (Pin6) / SO (2)
furi_hal_gpio_write(&GAME_BOY_SO, false);
furi_hal_gpio_init(&GAME_BOY_SO, GpioModeOutputPushPull, GpioPullNo, GpioSpeedVeryHigh);
Apply, build, run, and changing no options, trade the Bulbasaur. The level isn't 42 as predicted, its 0 somehow, but the Nickname, OT name, and OT ID are all correctly visibly shifted by 1. Levels in-game can go above 100 with tricks like this, the level glitching out isn't a result of setting level above 100. But, 0xFE being a NOP byte of sorts is true, I just don't fully know how to control it. But, this test can help show correct patch list implementation.
No response
No response
No response
I noticed all the traded Pokémon have maxed out levels. This is awesome but unfortunately makes them unusable if you are starting the game over again. Pokémon won't listen to you if their level is too high and you don't have enough badges. Is there a way to edit their level before trading them?
On more than one occasion, when attempting to modify a traded Pokemon, I've just completely exited the app on accident thereby losing that specific Pokemon to the Ether.
From the main menu, require a hold of the Back button, or maybe a prompt (or both?) to close the app completely.
NA
No response
No response
No response
Neither the gameboy nor the Flipper recognise the connection. I've connected seemingly everything accordingly. If I'm wrong please correct me by the following pictures:
This is how it looks when it's attached to the Flipper:
Just to clear things up, I've used a multimeter to check if everything is connected correctly and judging by the multimeter it is. None of the channels of the cable are connected to multiple GPIO ports. I've tried out an older version of the Flipper App and the newest release, neither worked. Also, using the 5V doesn't make any difference. Any ideas?
Add support to link between the Flipper and a Gen II Pokemon game over IR for Mystery Gift (Split from #24).
I've only briefly looked over the IR system, but, it doesn't look straightforward to implement. The API is currently only set up for TX xor RX and not easily able to do bidirectional (note: this is not IrDA, this is generic 38 khz IR that sends data back and forth). It might be possible to hack together something at the application level, however I think this would greatly benefit from in-firmware support, alongside a runtime "custom" protocol decoder implementation that can pack and unpack data directly.
Color
End goal is to be able to:
This will require #18 to be resolved first, however.
No response
EDIT: Save/load from file is scope creep. Stick with being able to modify a Pokemon at any time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.