Giter VIP home page Giter VIP logo

flipper-zero-game-boy-pokemon-trading's People

Contributors

estebanfuentealba avatar kbembedded avatar proteanreverie avatar r4g3d avatar willy-jl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipper-zero-game-boy-pokemon-trading's Issues

Feat: Add ability to reset trade state in Flipper

Describe the process.

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.

Game boy

No response

[Pokémon Yellow EU/FR] Trading always gives a glitched Rhydon - Solved, not yet merged.

Describe the bug.

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.

Reproduction

Video of the issue (Rhynoferos = Rhydon and Bulbizarre = Bulbasaur, the Pokémon I chose in the app): https://youtu.be/sYfjd7b4AdA

  1. Choose a Pokémon to trade on the flipper
  2. Start a trading session
  3. On the game's trade screen, the flipper has 2 visible Pokémons: a (glitched) Rhydon first and, below it, the Pokémon I've chosen
  4. Flipper always select this Rhydon to trade so you will receive a glitched Rhydon no matter what.

Target Framework

No response

Logs

No response

Anything else?

No response

Feat: Save / Select the default pinout used for trades

Describe the process.

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.

Game boy

No response

Feat: Create sprites for each Unown form

Describe the process.

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.

Game boy

No response

Feat: Add G/S time changing password generator

Describe the process.

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.

Game boy

No response

Traded Pokémon don't have names

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

feat: Emulator trading

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 ¯\_(ツ)_/¯

Remove gb_step* images and use canvas drawing funcs

Describe the bug.

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.

Reproduction

N/A

Target Framework

No response

Logs

No response

Anything else?

No response

Funding Link

Describe the bug.

You don't have one, can you add one?

Reproduction

See here for instructions

Target Framework

No response

Logs

No response

Anything else?

No response

Feat: Trade MissingNo. / invalid Pokemon numbers

Describe the process.

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.

Game boy

No response

Feat: Add long-term Pokemon storage / save Pokemon to disk

Describe the process.

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.

Game boy

color

Update the Pokemon Trading app for the SDK version 0.100 f7

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.

View logs

Flipper Team

Furi crash when selecting pokemon

Describe the bug.

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.

Reproduction

  1. Open app
  2. Select Pokemon

Target Framework

latest official firmware

Logs

No response

Anything else?

No response

EXT interface board detection can falsly detect MALVEKE boards when a non-MALVEKE board is plugged in

Describe the bug.

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.

Reproduction

N/A

Target Framework

No response

Logs

No response

Anything else?

No response

resistor?

What resistor are you using on the board or did you just not have enough cables?

Implement trade patch list

Describe the bug.

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:

  • After the trade struct is sent, an additional 200 bytes is sent in two parts. I do not believe they are equally sized parts but I could be wrong.
  • The first part should be able to fixup party_data+0x00 to party_data+0xFC
  • The second part should be able to fixup party_data+0xFD to party_data+party_data_len
  • The patch list is simply an index of bytes to patch in order.
    • Any values in the party_data struct that equal 0xFE are instead set to 0xFF and the address is to the patch list.
    • A value of 0x00 means don't patch anything.
    • A value of 0x01 Means byte 0 of this part needs to be modified to be 0xFE in the party_data struct received
    • A value of 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.

Reproduction

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.

Target Framework

No response

Logs

No response

Anything else?

No response

Adjust Pokémon level before trade?

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?

Require hold Back to exit

Describe the bug.

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.

Reproduction

NA

Target Framework

No response

Logs

No response

Anything else?

No response

Question about connection problems

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:
IMG_2624

This is how it looks when it's attached to the Flipper:
IMG_2623

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?

Feat: Gen II IR Mystery Gift

Describe the process.

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.

Game boy

Color

GPIO Pins Moved in RogueMaster Repo

Connection Moved to:
SO (B3) -> A7
SI (B2) -> A6
CLK (C3) -> A4

unfortunately Ground stays GND

Sorry for the nasty Glue, coloring from left to right is:
orange, Red, Green, Blue

558474A6-72FA-47A1-AC70-8106E52627D4

Modify Pokemon traded to the flipper

Describe the process.

End goal is to be able to:

  • Trade a pokemon from gameboy, back out of the trade screen on the flipper, modify it, go back in to trade screen, and trade it back without ever having to leave the trade center on the gameboy. The way communications work in the trade center, this should be fully possible.
    - Create pokemon on flipper/have traded pokemon from gameboy to Flipper, save to a file on the Flipper to send to a friend, trade to another game, etc.

This will require #18 to be resolved first, however.

Game boy

No response

EDIT: Save/load from file is scope creep. Stick with being able to modify a Pokemon at any time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.