Forráskód Böngészése

upd pokemon trading

MX 11 hónapja
szülő
commit
23c984744f
100 módosított fájl, 346 hozzáadás és 523 törlés
  1. 1 0
      LICENSE
  2. 319 171
      README.md
  3. 14 14
      README_catalog.md
  4. 0 328
      README_es.md
  5. 4 4
      TODO.md
  6. 8 6
      application.fam
  7. BIN
      assets/Background.png
  8. BIN
      assets/Button_18x18.png
  9. BIN
      assets/Connect_me_62x31.png
  10. BIN
      assets/Connected_62x31.png
  11. BIN
      assets/Space_100x18.png
  12. BIN
      assets/Space_95x18.png
  13. BIN
      assets/abra.png
  14. BIN
      assets/aerodactyl.png
  15. BIN
      assets/alakazam.png
  16. BIN
      assets/arbok.png
  17. BIN
      assets/arcanine.png
  18. BIN
      assets/articuno.png
  19. BIN
      assets/beedrill.png
  20. BIN
      assets/bellsprout.png
  21. BIN
      assets/blastoise.png
  22. BIN
      assets/bulbasaur.png
  23. BIN
      assets/butterfree.png
  24. BIN
      assets/caterpie.png
  25. BIN
      assets/chansey.png
  26. BIN
      assets/charizard.png
  27. BIN
      assets/charmander.png
  28. BIN
      assets/charmeleon.png
  29. BIN
      assets/clefable.png
  30. BIN
      assets/clefairy.png
  31. BIN
      assets/cloyster.png
  32. BIN
      assets/cubone.png
  33. BIN
      assets/dewgong.png
  34. BIN
      assets/diglett.png
  35. BIN
      assets/ditto.png
  36. BIN
      assets/dodrio.png
  37. BIN
      assets/doduo.png
  38. BIN
      assets/dolphin.png
  39. BIN
      assets/dragonair.png
  40. BIN
      assets/dragonite.png
  41. BIN
      assets/dratini.png
  42. BIN
      assets/drowzee.png
  43. BIN
      assets/dugtrio.png
  44. BIN
      assets/eevee.png
  45. BIN
      assets/ekans.png
  46. BIN
      assets/electabuzz.png
  47. BIN
      assets/electrode.png
  48. BIN
      assets/exeggcute.png
  49. BIN
      assets/exeggutor.png
  50. BIN
      assets/farfetchd.png
  51. BIN
      assets/fearow.png
  52. BIN
      assets/flareon.png
  53. BIN
      assets/fossilaerodactyl.png
  54. BIN
      assets/fossilkabutops.png
  55. BIN
      assets/gastly.png
  56. BIN
      assets/gengar.png
  57. BIN
      assets/geodude.png
  58. BIN
      assets/gloom.png
  59. BIN
      assets/golbat.png
  60. BIN
      assets/goldeen.png
  61. BIN
      assets/golduck.png
  62. BIN
      assets/golem.png
  63. BIN
      assets/graveler.png
  64. BIN
      assets/grimer.png
  65. BIN
      assets/growlithe.png
  66. BIN
      assets/gyarados.png
  67. BIN
      assets/hand_cable.png
  68. BIN
      assets/hand_thumbsup.png
  69. BIN
      assets/haunter.png
  70. BIN
      assets/hitmonchan.png
  71. BIN
      assets/hitmonlee.png
  72. BIN
      assets/horsea.png
  73. BIN
      assets/hypno.png
  74. BIN
      assets/ivysaur.png
  75. BIN
      assets/jigglypuff.png
  76. BIN
      assets/jolteon.png
  77. BIN
      assets/jynx.png
  78. BIN
      assets/kabuto.png
  79. BIN
      assets/kabutops.png
  80. BIN
      assets/kadabra.png
  81. BIN
      assets/kakuna.png
  82. BIN
      assets/kangaskhan.png
  83. BIN
      assets/kingler.png
  84. BIN
      assets/koffing.png
  85. BIN
      assets/krabby.png
  86. BIN
      assets/lapras.png
  87. BIN
      assets/lickitung.png
  88. BIN
      assets/machamp.png
  89. BIN
      assets/machoke.png
  90. BIN
      assets/machop.png
  91. BIN
      assets/magikarp.png
  92. BIN
      assets/magmar.png
  93. BIN
      assets/magnemite.png
  94. BIN
      assets/magneton.png
  95. BIN
      assets/mankey.png
  96. BIN
      assets/marowak.png
  97. BIN
      assets/meowth.png
  98. BIN
      assets/metapod.png
  99. BIN
      assets/mew.png
  100. BIN
      assets/mewtwo.png

+ 1 - 0
LICENSE

@@ -1,6 +1,7 @@
 MIT License
 
 Copyright (c) 2023 Esteban Fuentealba
+Copyright (c) 2023-2024 KBEmbedded
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 319 - 171
README.md

@@ -1,33 +1,82 @@
-# 🐬 Flipper Zero - Pokemon Trading in Game Boy
+# Pokemon Trade Tool for Flipper
 
-<p align="center">
-<a target="_blank" href="https://www.reddit.com/r/flipperzero/comments/121ncot/flipper_zero_game_boy_pokemon_trading/">
-  <img align="center" alt="Flipper Zero - Pokemon Trading Game Boy" src="./docs/images/youtube.png" />
-  </a>
-  <br />
-</p>
+## Watch it in Action
+The video below trades a Bulbasaur from the Flipper to a Game Boy Color with Pokemon Silver. The Game Boy trades its Cyndaquil. The Flipper is then used to modify the Cyndaquil to infect it with Pokerus, modify its EVs and IVs, and have the Cyndaquil hold an Antidote before it is traded back to the Game Boy.
+
+[![Watch a Trade in Action](docs/images/yt-vid-preview-frame.png)](http://www.youtube.com/watch?v=zONctHIPgEo "Trade in action")
 
-<div align="center">
+## Contents
+- [Introduction](#introduction)
+- [Hardware Interface](#hardware-interface)
+- [Installation Directions](#installation-directions)
+- [Instructions for Use](#instructions-for-use)
+  - [Main Menu](#main-menu)
+    - [Pinout](#pinout)
+    - [Customizing Pokemon](#customizing-pokemon)
+  - [Trade](#trade-pkmn)
+    - [Modifying Traded Pokemon](#modifying-traded-pokemon)
+    - [Reset Trade Connection State](#reset-trade-connection-state)
+- [How it Works / Build your own Interface](#how-does-it-work)
 
-**FW Official** | **FW Unleashed** | **FW RogueMaster** | **FW Xtreme**
-:- | :- | :- | :- 
-[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main)|[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main&firmware=unleashed)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main&firmware=unleashed)|[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main&firmware=roguemaster)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main&firmware=roguemaster)|[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main&firmware=xtreme)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main&firmware=xtreme)
-</div>
 
 ## Introduction
 
-This is a Pokemon exchange application from Flipper Zero to Game Boy [(Generaction I)](https://bulbapedia.bulbagarden.net/wiki/Generation_I). Flipper Zero emulates a "Slave" Game Boy connected to a Game Link Cable to be able to exchange any Pokemon from the First Generation (Red, Blue, Yellow) to a real Game Boy.
+This is a Pokemon exchange application from Flipper Zero to Game Boy supporting Generation I and II games; Red, Blue, Yellow, Gold, Silver, and Crystal (all non-Japanese regions[^JPN]). It allows trading Pokemon to and from a Game Boy; allowing for customization and/or modification of Pokemon.
+
+[^JPN]: Japanese releases of all Generation I and II games use a different data layout, this application implements the data layout used in all other global regions. Attempting to trade between a Japanese cartridge and the Flipper [risks corrupting or erasing save data](https://web.archive.org/web/20221009111851/http://www.nintendo.com/consumer/systems/gameboy/trouble_specificgame.jsp#erasing)
+
+Generation I customization options:
 
-It currently trades a Pokemon based on your choice of Pokemon, Level, Stats and 4 Moves.
+- Pokemon
+- Nickname
+- Level
+- Move set
+- Types[^TYPES]
+- EV/IV[^EVIV]
+- OT ID Number[^OT]
+- OT Name[^OT]
+
+Generation II customization options:
+
+- Pokemon
+- Nickname
+- Level
+- Held item
+- Move set
+- EV/IV[^EVIV]
+- Shininess[^IV]
+- Gender[^IV]
+- Pokerus
+- Unown form[^IV]
+- OT ID Number[^OT]
+- OT Name[^OT]
+
+Once a Pokemon is traded between the Flipper and a Game Boy the Pokemon is kept in memory on the Flipper. This allows a user to back out of the trade screen on the Flipper, modify the Pokemon, and trade it back. Any of the above customization can be modified and the Pokemon traded back to the Game Boy for updated game play. Want a Pokemon to learn a move before it should? Make a Pokemon Shiny? Change its OT ID/Name to get an exp boost? This is how you do it!
+
+[^TYPES]: Types are overwritten with the defaults when a Pokemon evolves or at the end of a battle where a Pokemon used a move that would temporarily change its types
+[^EVIV]: EV/IV can be configured in combinations of the following: Random IV, Max IV, Max EV, Max EV for the current level, Zero EV
+[^OT]: Setting this to match the trainer details of the Pokemon game will cause the game to treat the Pokemon as if it were caught by the player rather than traded
+[^IV]: Changing this option will modify the Pokemon's IVs and may affect other attributes that are calculated from IVs
 
 ## Hardware Interface
 The Game Boy is connected to the Flipper Zero's GPIO pins via a GBC style Game Link Cable. The [Flipper GB Link module](https://www.tindie.com/products/kbembedded/game-link-gpio-module-for-flipper-zero-game-boy/) is an easy way to connect a Game Boy via a Game Link Cable to the Flipper Zero.
+
+<p align='center'>
+  <a href="https://www.tindie.com/stores/kbembedded/?ref=offsite_badges&utm_source=sellers_kbembedded&utm_medium=badges&utm_campaign=badge_large">
+<img src="https://i.imgur.com/WQIJK8G.png" alt="Flipper GB Link module" width="480">
+  </a>
+</p>
 <p align='center'>
 <a href="https://www.tindie.com/stores/kbembedded/?ref=offsite_badges&utm_source=sellers_kbembedded&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>
 </p>
 
-Additionally, the [MALVEKE - GAME BOY Tools for Flipper Zero](https://www.tindie.com/products/efuentealba/malveke-game-boy-tools-for-flipper-zero/) is supported by this tool.
+Additionally, the [MALVEKE - GAME BOY Tools for Flipper Zero](https://www.tindie.com/products/efuentealba/malveke-game-boy-tools-for-flipper-zero/) is supported by this tool. As of version 2.0 of the Pokemon Trading tool, older style MALVEKE pinouts can be used without affecting the OK button after a trade -- this allows users to customize and modify traded Pokemon and there is no need to hard reset the flipper after a trade!
 
+<p align='center'>
+<a href="https://www.tindie.com/stores/efuentealba/?ref=offsite_badges&utm_source=sellers_efuentealba&utm_medium=badges&utm_campaign=badge_large">
+<img src="https://i.imgur.com/xdbLXBP.png" alt="MALVEKE" width="480">
+</a>
+</p>
 <p align='center'>
 <a href="https://www.tindie.com/stores/efuentealba/?ref=offsite_badges&utm_source=sellers_efuentealba&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>
 </p>
@@ -36,215 +85,312 @@ Details on the hardware interface, as well as how to create your own adapter boa
 
 ## Installation Directions
 
-This project is intended to be overlaid on top of an existing firmware repo,  in my case the **Release 0.79.1** version.
+This application can be installed through the [Flipper Application Catalog](https://lab.flipper.net/apps/pokemon), the [Flipper Mobile Application](https://docs.flipper.net/mobile-app), or a pre-compiled application binary can be found on the [Releases](https://github.com/KBEmbedded/Flipper-Zero-Game-Boy-Pokemon-Trading/releases) page of this repo.
 
-- Clone the [Flipper Zero firmware repository](https://github.com/flipperdevices/flipperzero-firmware). Refer to [this tutorial](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/firmware/updating/README.md) for updating the firmware.
-- Copy the "pokemon" folder into the `/applications_user/pokemon` folder in your firmware.
-- Run the command `fbt launch` to run it on your Flipper Zero.
+The application can also be built from source using [ufbt](https://github.com/flipperdevices/flipperzero-ufbt) or compiling the application against a firmware of choice using [fbt](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppsOnSDCard.md). This will install the application to the `apps/GPIO/` folder on the Flipper's SD card.
 
-```bash
-./fbt launch APPSRC=pokemon
-```
+Manually built application can be copied to the SD card using [qFlipper](https://docs.flipper.net/qflipper).
 
-- NOTE: If you only want to generate the fap file, you must run the following command.
-
-```bash
-./fbt fap_pokemon
-```
+<p align='center'>
+<img src="./docs/images/qFlipper.png" width="400" /><br />
+</p>
 
-And use [**qFlipper**](https://flipperzero.one/update) to copy the generated **pokemon.fap** file to the `SD Card/apps/Game Boy` folder.
+## Instructions for Use
+### Main Menu
+From the main menu, select the generation of Pokemon game to trade with, first changing the `Pinout` if needed. Note that Gen I can trade with Gen I games as well as to Gen II games using Time Capsule trade. Gen II can only trade with Gen II games.
 
 <p align='center'>
-<img src="./docs/images/qFlipper.png" width="400" /><br />
+    <br />
+    <img src="./docs/images/flipper-zero-main-menu.png" width="400" />
+    <br />
 </p>
 
-## Instructions for use.
+### Pinout
 
-These instructions assume that you are starting at the Flipper Zero desktop. Otherwise, press the Back button until you are at the desktop.
+If you're using a MALVEKE PCB that is Rev. 2.5.1 or newer, a Flipper-GB-Link PCB, or a custom wired interface based on the [wiring diagram listed here](#how-does-it-work), then there is no need to worry about setting the pinout; the application default is for these devices. If you're using a MALVEKE PCB Rev. 2.5 or older, select the `MLVK2.5` pinout. For custom wired interfaces that don't follow either standard, select the `Custom` pinout and set each pin individually.
 
-- If using a MALVEKE board, plug it in to the GPIO header now. The app will auto-detect and select the correct pinout to support the MALVEKE EXT1 interface. If using the Flipper GB Link board, or any other pinout, they can be connected to the Flipper Zero now, or at any point in the future.
-- Press the `OK` button on the Flipper to open the main menu.
-- Choose `Applications` from the menu.
-- Choose `GPIO` from the submenu.
-- Choose `Pokemon Trading`
-- The Flipper Zero will show the main menu of the application. The first option is to select the Pokemon to trade.
+- If you're using a MALVEKE PCB version, verify the **Pinout** configuration:
 
     <p align='center'>
         <br />
-        <img src="./docs/images/flipper-zero-flat-1.png" width="400" />
+        <img src="./docs/images/flipper-zero-pinout-select.png" width="400" />
         <br />
     </p>
 
-- Press the `LEFT`/`RIGHT` buttons to paginate the selection of Pokemon by 1.
-- Press the `UP`/`DOWN` buttons to paginate the selection of Pokemon by 10.
-- Press the `OK` button to select the Pokemon to trade and return to the main menu
+    - MALVEKE **2.5** PCB Version: If you're using this version, select the `MLVK2.5` configuration.
+        <p align='center'>
+            <br />
+            <img src="./docs/images/flipper-zero-pinout-malveke.png" width="400" />
+            <br />
+        </p>
+
+    - MALVEKE **2.5.1** PCB Version: If you're using this version, select the `ORIGINAL`
+        <p align='center'>
+            <br />
+            <img src="./docs/images/flipper-zero-pinout-original.png" width="400" />
+            <br />
+        </p>
+
+### Customizing Pokemon
+- [Select Pokemon](#select-pokemon-gen-i--gen-ii) (Gen I & II)
+- [Nickname](#nickname-gen-i--gen-ii) (Gen I & II)
+- [Level](#level-gen-i--gen-ii) (Gen I & II)
+- [Held Item](#held-item-gen-ii-only) (Gen II only)
+- [Select Moves](#select-moves-gen-i--gen-ii) (Gen I & II)
+- [Select Types](#select-types-gen-i-only) (Gen I only)
+- [Stats](#stats-gen-i--gen-ii) (Gen I & II)
+- [Shiny](#shiny-gen-ii-only) (Gen II only)
+- [Gender](#gender-gen-ii-only) (Gen II only)
+- [Pokerus](#pokerus-gen-ii-only) (Gen II only)
+- [Unown Form](#unown-form-gen-ii-only) (Gen II only)
+- [OT ID# / Name](#ot-id--name-gen-i--gen-ii) (Gen I & II)
+
+#### Select Pokemon (Gen I / Gen II)
+To select a Pokemon, use `LEFT` and `RIGHT` buttons to select the Pokemon; `UP` and `DOWN` are used to page up/down by 10 Pokemon. Press `OK` to confirm selection, or `BACK` to cancel selection. If a different Pokemon is selected, the remaining customization options are set to the default for that Pokemon.
 
-    <p align='center'>
-         <br />
-        <img src="./docs/images/flipper-zero-flat-2.png" width="400" /><br />
-    </p>
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-pokemon-select-1.png" width="400" />
+    <br />
+</p>
 
-- The traded Pokemon's nickname can be set. When a Pokemon is selected, the nickname defaults to the species name in all caps. This mimics a Pokemon without a customized nickname. In order to reset this nickname to its default, clear the text entry field, press `OK` on the `Save` button. This will fill the text box with the default name. Press `Save` again to set this name.
-  - **Note:** The Nidoran♀ and Nidoran♂ names will not properly render. This is because the Flipper currently cannot print unicode characters to screen. Following the above instructions will fill the text entry field with `NIDORAN ` with a space after it. This space is the unrenderable ♀/♂ symbol. Once traded, it will be correctly named.
-  - **Note:** Only alphanumeric characters are supported in the Pokemon's nickname at this time.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-pokemon-select-2.png" width="400" /><br />
+</p>
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-1-1.png" width="400" />
-        <br />
-    </p>
+---
 
-- The Pokemon's level can be adjusted as well by hitting `OK` on the level option. The minimum level is `2` and the maximum is `100`. The level is input via a text box. (Levels below 2 cause an underflow glitch in Gen I games that would cause the level to jump to 100, so if you want this just set the Pokemon's level to 100)
-    
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-3.png" width="400" />
-        <br />
-    </p>
+#### Nickname (Gen I / Gen II)
+The selected Pokemon's nickname can be set. When a Pokemon is selected, the nickname defaults to the species name in all caps. This mimics a Pokemon without a customized nickname. In order to reset this nickname to its default, clear the text entry field, press `OK` on the `Save` button. This will fill the text box with the default name. Press `Save` again to set this name.
 
-- The `Select Moves` menu is used to pick the set the traded Pokemon's moves. They are pre-populated with the moveset that the Pokemon would know at level 1. Selecting a move slot will bring up an alphabetical index of moves. Additionally, `No Move` and `Default` can be quickly selected. Note that any move after the first `No Move` is ignored. 
+> [!IMPORTANT]
+> Nidoran♀ and Nidoran♂ names will not properly render. This is because the Flipper currently cannot print Unicode characters to screen. Following the above instructions will fill the text entry field with `NIDORAN ` with a space after it. This space is the unrenderable ♀/♂ symbol. Once traded, it will be correctly named.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-7.png" width="400" />
-        <br />
-    </p>
+> [!NOTE]
+> (Gen II only) The hyphen in `HO-OH` cannot be selected on the Flipper's keyboard input; however resetting the name as noted above will restore the default name.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-8.png" width="400" />
-        <br />
-    </p>
+> [!NOTE]
+> Only English alphabetical characters are supported in the Pokemon's nickname at this time.
 
-- The `Select Types` menu can change the traded Pokemon's types. The type(s) are pre-set to what the selected Pokemon normally is.
-  - Pokemon with a single type will have the same type set for both types.
-  - **Note:** Unlike other menus, changing either type immediately saves it. Pressing `Back` will keep any changes. This will be addressed in a later version. If you need to revert to the default types, a different Pokemon can be selected and the desired Pokemon re-selected.
-  - **Note:** When changing the type(s), the Pokemon's in-game stats will _NOT_ reflect the chosen type(s). Additionally, these may be overwritten back to default in-game if the Pokemon uses a move that affects types (e.g. `Transform`) or the Pokemon evolves.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-nickname.png" width="400" />
+    <br />
+</p>
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-8-1.png" width="400" />
-        <br />
-    </p>
+---
+
+#### Level (Gen I / Gen II)
+Set the Pokemon's level from `2` to `100`. This will recalculate the Pokemon's stats based on the new level and the current EV/IV settings.
+
+> [!TIP]
+> Levels below 2 cause an underflow glitch in Gen I and II games that would cause the level to jump to 100, so if you want this just set the Pokemon's level to 100.
+
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-level.png" width="400" />
+    <br />
+</p>
+
+---
+
+#### Held Item (Gen II only)
+The traded Pokemon can be given an item to hold. All of the valid items (including items a Pokemon can normally not be given to hold) are listed in alphabetical order.
+
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-held-item.png" width="400" />
+    <br />
+</p>
+
+---
+
+#### Select Moves (Gen I / Gen II)
+The `Select Moves` menu is used to modify the traded Pokemon's moves. They are pre-populated with the moveset that the Pokemon would know at level 1. Selecting a move slot will bring up an alphabetical index of moves. Additionally, `No Move` and `Default` can be quickly selected.
 
-- The Pokemon's stats can also be influenced. The current settings are:
-  - `Random IV, Zero EV` Mimics stats of a caught wild Pokemon.
-  - `Random IV, Max EV / Level` IV is randomized, but EV is set to the maximum a trained Pokemon could be for its current level.
-  - `Randon IV, Max EV` IV is randomized, EV is set to the absolute max for a perfectly trained Pokemon.
-  - `Max IV, Zero EV` Mimics stats of a caught wild Pokemon, but with the maximum IV possible.
-  - `Max IV, Max EV / Level` IV is max, EV is set to the maximum a trained Pokemon could be for its current level.
-  - `Max IV, Max EV` Absolutely perfect and overly powerful Pokemon.
+> [!NOTE]
+> Any move in the moveset after the first `No Move` is ignored and is treated as `No Move` by the game.
+
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-move-1.png" width="400" />
+    <br />
+</p>
+
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-move-2.png" width="400" />
+    <br />
+</p>
+
+---
+
+#### Select Types (Gen I only)
+The `Select Types` menu can change the traded Pokemon's types. The type(s) are pre-set to what the selected Pokemon normally is. Gen II games do not store temporary types alongside the Pokemon, therefore they are not kept during trades.
+
+> [!NOTE]
+> Unlike other menus, changing either type immediately saves it. Pressing `Back` will keep any changes. This will be addressed in a later version. If you need to revert to the default types, a different Pokemon can be selected and the desired Pokemon re-selected.
+
+> [!NOTE]
+> When changing the type(s), the Pokemon's in-game stats will _NOT_ reflect the chosen type(s). Additionally, these will be overwritten back to default in-game if the Pokemon uses a move that affects types (e.g. `Transform`) or the Pokemon evolves.
+
+> [!TIP]
+> Pokemon with a single type will have the same type set for both types.
+
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-type.png" width="400" />
+    <br />
+</p>
+
+---
+
+#### Stats (Gen I / Gen II)
+
+The Pokemon's stats can also be influenced. The current settings are:
+- `Random IV, Zero EV` Mimics stats of a caught wild Pokemon.
+- `Random IV, Max EV / Level` IV is randomized, but EV is set to the maximum a trained Pokemon could be for its current level.
+- `Random IV, Max EV` IV is randomized, EV is set to the absolute max for a perfectly trained Pokemon.
+- `Max IV, Zero EV` Mimics stats of a caught wild Pokemon, but with the maximum IV possible.
+- `Max IV, Max EV / Level` IV is max, EV is set to the maximum a trained Pokemon could be for its current level.
+- `Max IV, Max EV` Absolutely perfect and overly powerful Pokemon.
  
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-5.png" width="400" />
-        <br />
-    </p>
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-stats.png" width="400" />
+    <br />
+</p>
 
-- The `OT ID#` and `OT Name` of the Pokemon can also be set. The `OT ID#` must be between `0` and `65535`. Setting the `OT ID#` and `OT Name` to the same as your current trainer's causes the game to believe it was a wild caught Pokemon and not one that was traded. This means high level Pokemon will still obey you without badges, but, will not get the experience boost of a traded Pokemon.
+---
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-6.png" width="400" /><br />
-    </p>
+#### Shiny (Gen II only)
+The Pokemon can be modified to be shiny or not. 
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-6-1.png" width="400" /><br />
-    </p>
+> [!NOTE]
+> Modifying this option will affect the IV, but this will not be visible anywhere in the current application. For example, if any of the `Max IV` settings are selected, this will never result in a shiny Pokemon; but modifying the Pokemon to be shiny will adjust the IVs until the Pokemon is shiny. The Stats will still list `Max IV` however.
 
-- Finally, select `Trade PKMN` to start the trade process.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-shiny.png" width="400" />
+    <br />
+</p>
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-6-2.png" width="400" /><br />
-    </p>
+---
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-9.png" width="400" /><br />
-    </p>
-    
-- On your Game Boy, you should connect the  **Game Link Cable** to the Game Boy and in the game, go to the nearest  **Pokemon Center**.
+#### Gender (Gen II only)
+The Pokemon's gender can be selected.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_pokemon_center.png" width="400" /><br />
-    </p>
+> [!NOTE]
+> Modifying this option will affect the IV, but this will not be visible anywhere in the current application. For example, if any of the `Max IV` settings are selected and the Pokemon's gender is modified, the IVs will be adjusted so the Pokemon is the desired gender. The Stats will still list `Max IV` however.
 
-- Talk to the girl at the counter on the right. The girl will tell us that we have to save the game before playing, we will answer **YES** by pressing the **A** button.
+> [!TIP]
+> Some Pokemon are always a specific gender, `Miltank` for example is always female. Other Pokemon are gender-less (officially stated in-game as `Unknown`) and this is reflected if such a Pokemon is selected. In both of these cases, it is not possible to modify the Pokemon's gender.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_save.png" width="400" /><br />
-    </p>
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-gender.png" width="400" />
+    <br />
+</p>
 
-- The Flipper Zero will show that we are connected.
+---
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-10.png" width="400" /><br />
-    </p>
+#### Pokerus (Gen II only)
 
-- On the Game Boy, we will be asked which option we want, and we select **TRADE CENTER**.
+The traded Pokemon can have its [Pokerus](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9ru) status modified. There are 4 in-game strains, the only effect is their default infection days remaining. However, it is possible to select an arbitrary strain, or none, as well as the number of days remaining. The days remaining can be set all the way up to `15`, which is not naturally occurring. In-game, strain `D` randomly infecting a Pokemon has the highest number of days remaining, `4`. If a strain is set and the number of days remaining is `0`, the Pokemon is cured and will no longer infect other Pokemon.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_save_trade.png" width="400" /><br />
-    </p>
+The three states listed in the trade menu are `Clean` (having never been infected), `Infected` (any strain with a non-zero number of days remaining and is infectious), and `Cured` (any strain with 0 days remaining and is no longer infectious).
 
-- You will enter the Trade Center where you must press the A button on the Game Boy on your side of the table.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-pokerus-setup.png" width="400" />
+    <br />
+</p>
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_trade_room_2.png" width="400" /><br />
-    </p>
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-pokerus-infected.png" width="400" />
+    <br />
+</p>
 
-- Flipper Zero will remain on a waiting screen with the Pokemon you selected.
+---
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-10.png" width="400" /><br />
-    </p>
+#### Unown Form (Gen II only)
+When the Pokemon `Unown` is selected, this option appears. The Pokemon can be set to any single letter of the English alphabet.
 
-- You will see your Pokemon and the Pokemon you selected on the Flipper Zero, in this case, `Mew`. You must select the Pokemon you want to trade and press **TRADE**.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_trade_list_select_trade.png" width="400" /><br />
-    </p>
+> [!NOTE]
+> Modifying this option will affect the IV, but this will not be visible anywhere in the current application. For example, if any of the `Max IV` settings are selected and Unown's form is modified, the IVs will be adjusted so the Pokemon is the desired form. The Stats will still list `Max IV` however.
 
-- You must confirm the selected trade by selecting **TRADE**.
+> [!TIP]
+> In Gen II games, only two Unown forms, `I` and `V` are able to be shiny due to how both the form and shininess are based on the Pokemon's IVs.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/game_boy_trade_list_select_trade_confirm.png" width="400" /><br />
-    </p>
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-unown-form.png" width="400" />
+    <br />
+</p>
 
-- Flipper Zero will remain on a waiting screen with the Pokemon you selected.
+---
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-11.png" width="400" /><br />
-    </p>
+#### OT ID# / Name (Gen I / Gen II)
 
-- Finally, the Pokemon exchange will start from **Flipper Zero** to the **Game Boy**.
+The `OT ID#` and `OT Name` of the Pokemon can also be set. The `OT ID#` must be between `0` and `65535`. Setting the `OT ID#` and `OT Name` to the same as your current trainer's causes the game to believe it was a wild caught Pokemon and not one that was traded. This means high level Pokemon will still obey you without badges, but, will not get the experience boost of a traded Pokemon.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-12.png" width="400" /><br />
-    </p>
+> [!NOTE]
+> Only English alphabetical characters are supported in the OT Name at this time.
 
-- Once the trade is complete, both the **Game Boy** and the **Flipper Zero** will return to the `WAITING` state. If the **Game Boy** selects `CANCEL`, the **Flipper Zero** will return to the `READY` state. The <img src="./docs/images/back.png" /> BACK button can be pressed to return to the main menu. The traded Pokemon can be modified, or completely changed, if desired. Once the **Flipper Zero** Re-enters the Trade screen, and the **Game Boy** re-selects the trade table in-game, another trade can be completed. This allows for trading multiple Pokemon without having to reset the **Game Boy** each time.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-ot-id.png" width="400" /><br />
+</p>
 
-    If the Flipper Zero gets stuck at the end of the exchange, you must reboot it by pressing the <img src="./docs/images/left.png" /> LEFT + <img src="./docs/images/back.png" /> BACK key combination.
+<p align='center'>
+    <br />
+    <img src="./docs/images/flipper-zero-ot-name.png" width="400" /><br />
+</p>
+
+---
+
+### Trade PKMN
+The last option in both generations is to start the trade. The first time this is entered the Flipper will prompt to connect a Link Cable to the Game Boy. On the Game Boy, enter a **Pokemon Center** and speak with the NPC at the **Cable Club** to start a trade. Once the Game Boy goes through the prompts to enter a trade, the Flipper will say `READY` and the Game Boy will enter the trade room.
+
+> [!NOTE]
+> At any point the Flipper says `READY`, the back button on the Flipper can be pressed to go back to the customization menu. Re-entering the trade screen from there will remain connected to the Game Boy.
+
+On the Game Boy, approaching the trade table and pressing `A` will start a trade. The Flipper will display `WAITING` while the Game Boy is on the screen showing both parties.
+
+> [!NOTE]
+> At any point the Flipper says `WAITING`, the `BACK` button on the Flipper can be pressed to request to cancel the trade. The Flipper will display `CANCEL` and will remain there until the Game Boy selects `CANCEL` as well (attempts to trade from the Game Boy will just be aborted) and the Flipper will revert to the `READY` state. If the Flipper displays `WAITING` and the Game Boy selects `CANCEL`, the Flipper will return to the `READY` state.
+
+On the Game Boy, select a Pokemon to trade with the Flipper. Confirming the trade will begin the trade animation on both the Flipper and Game Boy. Once the trade is complete, both the Game Boy and the Flipper will return to the `WAITING` state. If the Game Boy selects `CANCEL` at this point, the Flipper will return to the `READY` state. The `BACK` button can be pressed to return to the main menu.
+
+> [!WARNING]
+> At any point while on the trade screen on the Flipper, it is possible to return to the customization menu by holding the `BACK` button. However doing this risks desyncing the trade state between the Flipper and Game Boy.
+
+---
+
+#### Modifying Traded Pokemon
+Once a trade is complete, the Pokemon traded from the Game Boy to the Flipper is kept in the Flipper's memory. It is possible to go back from the trade screen to the Gen I/II customization menu. There, the Pokemon can be modified; e.g. adjust the EV/IV, levels, move set, nickname, OT ID#/Name, etc. and traded back by re-entering the `Trade PKMN` option.
+
+The Game Boy should remain on and in the trade room. When the Flipper re-enters the `Trade PKMN` option, the Game Boy can re-select the trade table by pressing `A` at it and the whole trade process can be restarted. If the Game Boy is turned off, then the Flipper currently must back all the way out to reset the trade status so the Game Boy can re-establish the initial connection.
+
+---
+
+#### Reset Trade Connection State
+It is possible to reset the Flipper's connection state to having never been connected to a Game Boy. This allows the Flipper to restart communication with a Game Boy if it was accidentally turned off, for example, and the Game Boy needs to re-enter the Trade Center. Doing this keeps the current Pokemon the Flipper has in memory intact.
+
+This can also be used to leverage the Flipper to trade a pokemon between two Pokemon games with only a single Game Boy. For example, trade from Pokemon Blue to the Flipper (and then modifying the Pokemon on the Flipper if desired), resetting the trade state on the Flipper, swap the Game Boy game to Pokemon Silver, and on both the Game Boy and Flipper, start the trade process (using Time Capsule trade mode on the Pokemon Silver game).
+
+Once a connection has been established between the Flipper and a Pokemon game, the option `Reset Connection` will appear in the configuration screen under `Trade PKMN`. The Flipper will then ask for confirmation of the operation.
+
+---
+
+#### Special Note on MALVEKE PCB Rev. <= 2.5
+Version 2.0 of the Pokemon Trade tool fixes a bug on MALVEKE boards that are Rev. 2.5 or lower where after a trade is completed the `OK` button no longer functions. However, while on the trade screen the `OK` button will continue to not function. For example, if you try to press the `OK` button to turn the backlight on, the Flipper will not respond. The `OK` button functionality will be restored once the Flipper leaves the Trade screen.
 
-    <p align='center'>
-        <br />
-        <img src="./docs/images/reboot.png" width="400" /><br />
-    </p>
 
-## How does it work?
+## How Does it Work?
 
 The method used to communicate 2 Game Boys is based on the SPI protocol, which is a very simple serial communication protocol in which a master device communicates with one or more slave devices. The protocol is bidirectional and synchronous, and uses three basic signals:
 
@@ -330,16 +476,18 @@ It's possible to cut a cable directly without using a socket, but it's important
 
 ## GUI
 
-To generate the graphical interface, the [**FUI-Editor**](https://ilin.pt/stuff/fui-editor/) tool was used. Additionally, the original sprites from the game Pokemon Yellow, which are found in the [**Disassembly of Pokemon Yellow**](https://github.com/pret/pokeyellow/tree/master/gfx/pokemon/front) repository, were used.
+To generate the graphical interface, the [**FUI-Editor**](https://ilin.pt/stuff/fui-editor/) tool was used.
 
-For each image, the color `#aaa` was transformed to `#fff` so that Flipper Zero would render it correctly. To do this, a batch process was used in [Photopea](https://www.photopea.com/), the online image editor.
+The sprites for each Pokemon were hand-made for the monochrome screen of the Flipper. The source models are based on sprites from a selection of all Gen I and Gen II games; the ones used we're our favorites. Huge thanks to [ProteanReverie](https://github.com/ProteanReverie) for all of the help and support!
 
 ##  Tested In
 - Game Boy Color (GBC)
 - Game Boy Advance (GBA)
+- Game Boy Advance SP (GBA SP)
+- Analogue Pocket
 
 ## Contributors
-[![Contributors](https://contrib.rocks/image?repo=EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading)](https://github.com/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/graphs/contributors)
+[![Contributors](https://contrib.rocks/image?repo=KBEmbedded/Flipper-Zero-Game-Boy-Pokemon-Trading)](https://github.com/KBEmbedded/Flipper-Zero-Game-Boy-Pokemon-Trading/graphs/contributors)
 
 
 ## Links

+ 14 - 14
README_catalog.md

@@ -1,17 +1,18 @@
-# 🐬 Flipper Zero - Pokemon Trading in Game Boy
+# GAME BOY Pokemon Trading MALVEKE
 
 ## Introduction
 
-Now supports MALVEKE board!
+Tool for trading Pokemon from the Flipper Zero to Generation I and II Game Boy games (Red, Blue, Yellow, Gold, Silver, and Crystal). In addition to creating and trading Pokemon to a Game Boy game, the Flipper can be used to modify an existing Pokemon traded to the Flipper and trading it back to the Game Boy!
 
-This is a Pokemon exchange application from Flipper Zero to Game Boy (Generación I). Flipper Zero emulates a "Slave" Game Boy connected to a Game Link Cable to be able to exchange any Pokemon from the First Generation (Red, Blue, Yellow) to a real Game Boy.
-
-If a MALVEKE board is plugged in to GPIO before starting the app, the app will default to using the MALVEKE EXT1 interface.
+No longer causes the OK button to break when using the pinout for older MALVEKE (MLVK2.5) PCBs! Users of MALVEKE PCBs Rev. <= 2.5 no longer need to reset the Flipper after a trade and are able to modify the traded Pokemon!
 
+See the project's README on GitHub https://github.com/KBEmbedded/Flipper-Zero-Game-Boy-Pokemon-Trading/blob/main/README.md for more detailed instructions on the application and all of the customization options for Pokemon.
 
 ## Connection: Flipper Zero GPIO - Game Boy
 
-The original pinout is as follows:
+See the project's README on GitHub https://github.com/kbembedded/Flipper-Zero-Game-Boy-Pokemon-Trading/blob/main/README.md#hardware-interface for Link Cable interface adapters available on Tindie.
+
+The Original pinout is as follows:
 
 | Cable Game Link (Socket) | Flipper Zero GPIO |
 | ------------------------ | ----------------- |
@@ -20,22 +21,21 @@ The original pinout is as follows:
 | 3 (SI)                   | 7 (C3)            |
 | 2 (SO)                   | 5 (B3)            |
 
-Using the "Select Pinout" option, the Original, MALVEKE, or any custom pin configuration can be selected.
+Using the "Select Pinout" option, the Original, MALVEKE (MLVK2.5), or any custom pin configuration can be selected as well.
 
 
-## How does it work?
+## How Does it Work?
 
-The method used to communicate 2 Game Boys is based on the SPI protocol, which is a very simple serial communication protocol in which a master device communicates with one or more slave devices. The protocol is bidirectional and synchronous, and uses three basic signals:
+Game Boy and Game Boy color games communicate using a synchronous serial protocol; similar to SPI without a chip select line. The Pokemon games themselves arbitrate which unit is driving the clock; this application lets the Game Boy drive the clock every time. Like SPI, data is full-duplex bidirectional, and uses 3 signals:
 
 - A clock signal (CLK).
 - An output signal (Serial Out or SO).
 - An input signal (Serial In or SI).
 
-In the Game Boy, games store data in an internal shift register that is used to send and receive information. The SPI protocol used by the Game Boy uses the clock signal to indicate when data is being transferred.
-
-The Game Boy link protocol is synchronous and requires the slave device to respond at the same rate as the master device. The master device supplies an 8KHz clock (data transfer rate of 1KB/s). The time window for responding is only **~120μs**. However, the slave device has no restrictions and can respond when it receives data. The clock can vary and there is no lower limit.
-
+The Game Boy itself uses a shift register to clock data in and out.
 
-##  Tested In
+## Tested to Support Game Boy models
 - Game Boy Color (GBC)
 - Game Boy Advance (GBA)
+- Game Boy Advance SP (GBA SP)
+- Analogue Pocket

+ 0 - 328
README_es.md

@@ -1,328 +0,0 @@
-# 🐬 Flipper Zero - Pokemon Trading in Game Boy
-
-<p align="center">
-<a target="_blank" href="https://www.reddit.com/r/flipperzero/comments/121ncot/flipper_zero_game_boy_pokemon_trading/">
-  <img align="center" alt="Flipper Zero - Pokemon Trading Game Boy" src="./docs/images/youtube.png" />
-  <br />
-</p>
-<div align="center">
-
-**FW Official** | **FW Unleashed** | **FW RogueMaster**
-:- | :- | :- 
-[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main)|[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main&firmware=unleashed)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main&firmware=unleashed)|[![FlipC.org](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/badge?branch=main&firmware=roguemaster)](https://flipc.org/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading?branch=main&firmware=roguemaster)
-</div>
-
-## Introducción
-
-Esta es una aplicación de intercambio de Pokemon's desde de Flipper Zero a Game Boy [(Generación I)](https://bulbapedia.bulbagarden.net/wiki/Generation_I). Flipper Zero emula un Game Boy "Esclavo" conectado a **Cable Game Link** para poder intercambiar cualquier Pokemon de la Primera Generación (Red, Blue, Yellow) a un Game Boy Real.
-
-Es una Prueba de concepto (POC) para utilizar vistas, GPIO y FURI (Flipper Universal Registry Implementation).
-
-## Instrucciones de instalación
-
-Este proyecto está destinado a ser superpuesto encima de un repositorio de firmware existente, en mi caso la versión **Release 0.79.1**.
-
-- Clona el [Repositorio del firmware de Flipper Zero](https://github.com/flipperdevices/flipperzero-firmware). Consulta este [tutorial](https://github.com/jamisonderek/flipper-zero-tutorials/tree/main/firmware/updating/README.md) para actualizar el firmware.
-- Copia la [carpeta "pokemon"](..) en la carpeta `/applications_user/pokemon` del firmware que clonaste.
-- Corre el comando `fbt launch` para correr en tu Flipper Zero.
-
-```bash
-./fbt launch APPSRC=pokemon
-```
-
-- NOTA: Si sólo quieres generar el archivo `fap` debes correr el siguiente comando.
-
-```bash
-./fbt fap_pokemon
-```
-
-y usa [**qFlipper**](https://flipperzero.one/update) para copiar el archivo **pokemon.fap** generado a la carpeta `SD Card/apps/Game Boy`.
-
-<p align='center'>
-<img src="./docs/images/qFlipper.png" width="400" /><br />
-</p>
-
-## Instrucciones de Uso
-
-Estas instrucciones asumen que estás comenzando desde el escritorio de Flipper Zero. De lo contrario, presiona el botón Atrás hasta que estés en el escritorio.
-
-- Presiona el botón `OK` en Flipper para abrir el menú principal.
-- Elige `Applications` en el menú.
-- Selecciona `GPIO` en el submenú.
-- Selecciona `Pokemon Trading`.
-- Flipper Zero mostrará el menú principal de la aplicación. La primera opción es seleccionar el Pokémon a intercambiar.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-1.png" width="400" />
-      <br />
-  </p>
-- Presiona los botones `IZQUIERDA`/`DERECHA` para paginar la selección de Pokémon de a 1.
-- Presiona los botones `ARRIBA`/`ABAJO` para paginar la selección de Pokémon de a 10.
-- Presiona el botón `OK` para seleccionar el Pokémon a intercambiar y volver al menú principal.
-
-  <p align='center'>
-       <br />
-      <img src="./docs/images/flipper-zero-flat-2.png" width="400" /><br />
-  </p>
-- El nombre del Pokémon intercambiado se puede establecer. Cuando se selecciona un Pokémon, el nombre por defecto es el nombre de la especie en mayúsculas. Esto imita a un Pokémon sin un nombre personalizado. Para restablecer este nombre a su valor predeterminado, borra el campo de entrada de texto, presiona `OK` en el botón `Save`. Esto llenará el cuadro de texto con el nombre predeterminado. Presiona `Save` nuevamente para establecer este nombre.
-
-    - **Nota**: Los nombres de Nidoran♀ y Nidoran♂ no se renderizan correctamente. Esto se debe a que Flipper actualmente no puede imprimir caracteres Unicode en la pantalla. Siguiendo las instrucciones anteriores, se llenará el campo de entrada de texto con `NIDORAN ` con un espacio después. Este espacio es el símbolo no renderizable ♀/♂. Una vez intercambiado, se mostrará correctamente.
-
-    - **Nota**: Solo se admiten caracteres alfanuméricos en el nombre del Pokémon en este momento.
-
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-1-1.png" width="400" />
-        <br />
-    </p>
-- También se puede ajustar el nivel del Pokémon presionando `OK` en la opción de nivel. El nivel mínimo es `2` y el máximo es `100`. El nivel se ingresa a través de un cuadro de texto. (Los niveles por debajo de 2 causan una falla de desbordamiento en los juegos de Gen I que haría que el nivel saltara a 100, así que si deseas esto, simplemente establece el nivel del Pokémon en 100).
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-3.png" width="400" />
-      <br />
-  </p>
-- El menú `Select Moves` se utiliza para elegir los movimientos del Pokémon intercambiado. Están predefinidos con el conjunto de movimientos que el Pokémon conocería al nivel 1. Seleccionar una ranura de movimiento mostrará un índice alfabético de movimientos. Además, se pueden seleccionar rápidamente `No Move` y `Default`. Ten en cuenta que cualquier movimiento después del primer `No Move` se ignora.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-7.png" width="400" />
-      <br />
-  </p>
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-8.png" width="400" />
-      <br />
-  </p>
-- El menú `Select Types` puede cambiar los tipos del Pokémon intercambiado. Los tipos están predefinidos según lo que normalmente es el Pokémon seleccionado.
-
-  - Los Pokémon con un solo tipo tendrán el mismo tipo establecido para ambos tipos.
-
-  - **Nota**: A diferencia de otros menús, cambiar cualquiera de los tipos lo guarda inmediatamente. Presionar `Back` mantendrá los cambios. Esto se abordará en una versión posterior. Si necesitas volver a los tipos predeterminados, puedes seleccionar un Pokémon diferente y luego volver a seleccionar el Pokémon deseado.
-
-  - **Nota**: Al cambiar los tipos, las estadísticas del Pokémon en el juego NO reflejarán los tipos elegidos. Además, estos pueden sobrescribirse de nuevo en el juego si el Pokémon usa un movimiento que afecta a los tipos (por ejemplo, `Transform`) o el Pokémon evoluciona.
-
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-8-1.png" width="400" />
-        <br />
-    </p>
-- Las estadísticas del Pokémon también se pueden influir. Las configuraciones actuales son:
-
-  - `Random IV, Zero EV`  Imita las estadísticas de un Pokémon salvaje atrapado.
-  - `Random IV, Max EV / Level` IV es aleatorio, pero EV se establece en el máximo que un Pokémon entrenado podría tener para su nivel actual.
-  - `Randon IV, Max EV` IV es aleatorio, EV se establece en el máximo absoluto para un Pokémon perfectamente entrenado.
-  - `Max IV, Zero EV` Imita las estadísticas de un Pokémon salvaje atrapado, pero con el IV máximo posible.
-  - `Max IV, Max EV / Level` IV es máximo, EV se establece en el máximo que un Pokémon entrenado podría tener para su nivel actual.
-  - `Max IV, Max EV` Máximo Pokémon absolutamente perfectos y poderosos.
-
-    <p align='center'>
-        <br />
-        <img src="./docs/images/flipper-zero-flat-5.png" width="400" />
-        <br />
-    </p>
-
-- También se puede configurar el `OT ID#` y el `OT Name` del Pokémon. El `OT ID#` debe estar entre `0` y `65535`. Establecer el `OT ID#` y el `OT Name` igual que tu entrenador actual hace que el juego crea que fue un Pokémon capturado en estado salvaje y no uno que se intercambió. Esto significa que los Pokémon de alto nivel seguirán obedeciéndote sin medallas, pero no obtendrán el aumento de experiencia de un Pokémon intercambiado.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-6.png" width="400" /><br />
-  </p>
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-6-1.png" width="400" /><br />
-  </p>
-- Finalmente, selecciona Intercambiar PKMN para iniciar el proceso de intercambio.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-6-2.png" width="400" /><br />
-  </p>
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-9.png" width="400" /><br />
-  </p>
-- En tu Game Boy, debes conectar el **Game Link Cable** a la Game Boy y, en el juego, ve al **Pokemon Center** más cercano.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_pokemon_center.png" width="400" /><br />
-  </p>
-- Habla con la chica en el mostrador de la derecha. La chica nos dirá que tenemos que guardar el juego antes de jugar, responderemos **YES** presionando el botón **A**.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_save.png" width="400" /><br />
-  </p>
-- Flipper Zero mostrará que estamos conectados.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-10.png" width="400" /><br />
-  </p>
-- En la Game Boy, se nos preguntará qué opción queremos, y seleccionamos **TRADE CENTER**.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_save_trade.png" width="400" /><br />
-  </p>
-- Ingresarás al Centro de Intercambio donde debes presionar el botón A en la Game Boy en tu lado de la mesa.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_trade_room_2.png" width="400" /><br />
-  </p>
-- Flipper Zero permanecerá en una pantalla de espera con el Pokémon que seleccionaste.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-10.png" width="400" /><br />
-  </p>
-- Verás tu Pokémon y el Pokémon que seleccionaste en Flipper Zero, en este caso, `Mew`. Debes seleccionar el Pokémon que deseas intercambiar y presionar **TRADE**.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_trade_list_select_trade.png" width="400" /><br />
-  </p>
-- Debes confirmar el intercambio seleccionando **TRADE**.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/game_boy_trade_list_select_trade_confirm.png" width="400" /><br />
-  </p>
-- Flipper Zero permanecerá en una pantalla de espera con el Pokémon que seleccionaste.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-11.png" width="400" /><br />
-  </p>
-- Finalmente, el intercambio de Pokémon comenzará desde **Flipper Zero** hacia la **Game Boy**.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/flipper-zero-flat-12.png" width="400" /><br />
-  </p>
-- Si Flipper Zero se queda atascado al final del intercambio, debes reiniciarlo presionando la combinación de teclas <img src="./docs/images/left.png" /> `IZQUIERDA` + <img src="./docs/images/back.png" /> `ATRÁS`.
-
-  <p align='center'>
-      <br />
-      <img src="./docs/images/reboot.png" width="400" /><br />
-  </p>
-
-## ¿Cómo trabaja?
-
-El método utilizado para comunicar 2 Game Boy se basa en el protocolo SPI, que es un protocolo de comunicación serial muy simple en el que un dispositivo maestro se comunica con uno o más dispositivos esclavos. El protocolo es bidireccional y sincrónico, y utiliza tres señales básicas:
-
-- Una señal de reloj (CLK).
-- Una señal de salida (Serial Out o SO).
-- Una señal de entrada (Serial In o SI).
-
-En el Game Boy, los juegos almacenan los datos en un registro de cambio interno que se utiliza para enviar y recibir información. El protocolo SPI utilizado por el Game Boy utiliza la señal de reloj para indicar cuándo se transfieren los datos.
-
-El protocolo de enlace de Game Boy es síncrono y requiere que el dispositivo esclavo responda al mismo ritmo que el dispositivo maestro. El dispositivo maestro suministra un reloj de 8KHz (velocidad de transferencia de datos de 1KB/s). La ventana de tiempo para responder es de solo **~120μs**. Sin embargo, el dispositivo esclavo no tiene restricciones y puede responder cuando recibe los datos. El reloj puede variar y no hay un límite inferior.
-
-<p align='center'>
-<br />
-<img src="./docs/images/gb_spi.png" width="400" /><br />
-</p>
-
-_Una transferencia de ejemplo de GB SPI. Aquí, el maestro envía 0xD9 (217) y el esclavo envía 0x45 (69)._
-
-<br />
-
-Se puede conocer mas al respecto en el siguiente Video [**Analyzing the Different Versions of the Link Cable**](https://youtu.be/h1KKkCfzOws?t=151).
-
-## Placa para Flipper Zero con Socket PortData EXT Link
-
-Para la placa del Fipper Zero se utilizó un [PortData EXT Link](https://es.aliexpress.com/item/1005004116983895.html) y una [place de prototipo](https://es.aliexpress.com/item/32478242317.html) de 2x8.
-
-<p align='center'>
-<br />
-<img src="./docs/images/EXT-Link.png" width="400" /><br />
-</p>
-
-_PortData EXT Link para Game Boy Color, Game Boy Pocket, GBC, GBP, GBL._
-
-<p align='center'>
-<br />
-<img src="./docs/images/pcb.png" width="400" /><br />
-</p>
-<p align='center'>
-<br />
-<img src="./docs/images/flipper-zero-pcb.png" width="400" /><br />
-</p>
-Usé una resistencia de 33kΩ en CLK, pero es opcional, se puede conectar directamente.
-
-## Conexión: Flipper Zero GPIO - Game Boy
-
-Se deben conectar los Pines de la siguiente manera
-
-<p align='center'>
-<br />
-<img src="./docs/images/wgbl-0.png" width="400" /><br />
-</p>
-
-<picture>
-    <source media="(prefers-color-scheme: dark)" srcset="./docs/images/GPIO-GBPIN_light-v2.png">
-    <source media="(prefers-color-scheme: light)" srcset="./docs/images/GPIO-GBPIN-v2.png">
-    <img
-        alt="Connect Flipper Zero GPIO to Game Boy Pins"
-        src="./docs/images/GPIO-GBPIN-v2.png">
-</picture>
-
-| Cable Game Link (Socket) | Flipper Zero GPIO |
-| ------------------------ | ----------------- |
-| 6 (GND)                  | 8 (GND)           |
-| 5 (CLK)                  | 6 (B2)            |
-| 3 (SI)                   | 7 (C3)            |
-| 2 (SO)                   | 5 (B3)            |
-
-
-## Conectar a Flipper Zero sin Socket PortData EXT Link
-
-Pudes cortar un cable directamente sin usar el socket pero debes tener en cuenta que el es un cable cruzado SI-SO.
-
-<p align='center'>
-<br />
-<img src="./docs/images/cut-cable-v3.png" width="400" /><br />
-</p>
-
-*"Cable Game Link" cortado y conectado directamente a los pines de Flipper Zero.*
-
-
-**NOTA**: No guiarse por los colores porque dependiendo del fabricante estos pueden cambiar, con un multímetro medir continuidad e identificar que cable es de que pin
-
-
-## GUI
-
-Para generar la Interfaz gráfica se utilizó la herramienta [**FUI-Editor**](https://ilin.pt/stuff/fui-editor/).
-Además se utilizaron los sprites originales del juego _Pokemon Yellow_ que se encuentran en el repositorio [**Disassembly of Pokemon Yellow**](https://github.com/pret/pokeyellow/tree/master/gfx/pokemon/front).
-
-De cada imagen se transformó el color `#aaa` a `#fff` para que Flipper Zero la renderizara bien. Para eso se utilizó un **Batch** para [Photopea](https://www.photopea.com/), el editor de imagenes online.
-
-##  Implementado en
-- Game Boy Color (GBC)
-- Game Boy Advance (GBA)
-
-## Contribuidores
-<a href="https://github.com/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/">EstebanFuentealba</a><br />
-<a href="https://github.com/R4g3D/Flipper-Zero-Game-Boy-Pokemon-Trading/">R4g3D</a><br />
-<a href="https://github.com/kbembedded/Flipper-Zero-Game-Boy-Pokemon-Trading/">kbembedded</a>
-
-## Links
-
-- [Flipper Zero firmware source code](https://github.com/flipperdevices/flipperzero-firmware)
-- Adan Scotney's pokemon [trade protocol specification](http://www.adanscotney.com/2014/01/spoofing-pokemon-trades-with-stellaris.html) and implementation
-- Derek Jamison - [Youtube Channel](https://www.youtube.com/@MrDerekJamison)
-- Matt Penny - [GBPlay Blog](https://blog.gbplay.io/)
-- [Pokémon data structure (Generation I)](<https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_(Generation_I)>)
-- [Disassembly of Pokemon Yellow](https://github.com/pret/pokeyellow)
-- [Arduino-Spoofing-Gameboy-Pokemon-Trades](https://github.com/EstebanFuentealba/Arduino-Spoofing-Gameboy-Pokemon-Trades)
-- [🎮 Gameboy link cable breakout PCB](https://github.com/Palmr/gb-link-cable)
-
-<p align='center'>
-<br />
-<br />
-Desde Talcahuano 🇨🇱 con ❤ 
-</p>

+ 4 - 4
TODO.md

@@ -33,13 +33,13 @@
   - [x] Add images for the level selection screen, stats selection screen, and move selection screens as per the original README  
 - Codebase  
   - [x] Reimplement Logging calls  
-  - [ ] Clean up the codebase as it is now, there are a lot of optimizations in speed and code complexity that can be made, especially in added code in pokemon_app and maybe some code reduction/reuse in scenes  
-  - [ ] Consider using a single View in main app struct and only allocate a view as needed to reduce memory footprint  
+  - [x] Clean up the codebase as it is now, there are a lot of optimizations in speed and code complexity that can be made, especially in added code in pokemon_app and maybe some code reduction/reuse in scenes  
+  - [x] Consider using a single View in main app struct and only allocate a view as needed to reduce memory footprint  
 
 - Future Wants  
-  - [ ] Trading to Gen II games with both Gen I and Gen II Pokemon  
+  - [x] Trading to Gen II games with both Gen I and Gen II Pokemon  
   - [ ] Enable IR mystery gift usage in Gen II using Flipper  
-  - [ ] Be able to set up multiple Pokemon to be able to trade more than one per trip to trade center  
+  - [x] Be able to set up multiple Pokemon to be able to trade more than one per trip to trade center  
   - [x] Be able to trade back and forth for e.g. trading a Pokemon that evolves only when traded  
   - [x] Would Separating out link cable states result in a cleaner API?  
   - [ ] Implement some simple logic to be able to "battle" the Flipper?  

+ 8 - 6
application.fam

@@ -1,21 +1,23 @@
 App(
     appid="pokemon",
-    name="Pokemon Trading",
+    name="[GB] Pokemon Trading",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="pokemon_app",
     requires=["gui"],
     stack_size=2 * 1024,
-    fap_version=[1,5],
+    fap_version=[2, 3],
     fap_category="GPIO",
     fap_icon="pokemon_10px.png",
     fap_icon_assets="assets",
-    fap_author="Esteban Fuentealba, Kris Bahnsen, Darryn Cull",
-    fap_weburl="https://github.com/EstebanFuentealba",
-    fap_description="Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)",
+    fap_file_assets="files",
+    fap_author="Kris Bahnsen, Esteban Fuentealba, ProteanReverie, Darryn Cull",
+    fap_weburl="https://github.com/kbembedded/Flipper-Zero-Game-Boy-Pokemon-Trading",
+    fap_description="Pokemon exchange from Flipper Zero to Game Boy, supports Generation I & II non-Japanese games",
     fap_private_libs=[
         Lib(
             name="flipper-gblink",
-            sources=["gblink.c"],
+            fap_include_paths=["gblink/include", "./"],
+            sources=["gblink/*.c"],
         ),
     ],
 )

BIN
assets/Background.png


BIN
assets/Button_18x18.png


BIN
assets/Connect_me_62x31.png


BIN
assets/Connected_62x31.png


BIN
assets/Space_100x18.png


BIN
assets/Space_95x18.png


BIN
assets/abra.png


BIN
assets/aerodactyl.png


BIN
assets/alakazam.png


BIN
assets/arbok.png


BIN
assets/arcanine.png


BIN
assets/articuno.png


BIN
assets/beedrill.png


BIN
assets/bellsprout.png


BIN
assets/blastoise.png


BIN
assets/bulbasaur.png


BIN
assets/butterfree.png


BIN
assets/caterpie.png


BIN
assets/chansey.png


BIN
assets/charizard.png


BIN
assets/charmander.png


BIN
assets/charmeleon.png


BIN
assets/clefable.png


BIN
assets/clefairy.png


BIN
assets/cloyster.png


BIN
assets/cubone.png


BIN
assets/dewgong.png


BIN
assets/diglett.png


BIN
assets/ditto.png


BIN
assets/dodrio.png


BIN
assets/doduo.png


BIN
assets/dolphin.png


BIN
assets/dragonair.png


BIN
assets/dragonite.png


BIN
assets/dratini.png


BIN
assets/drowzee.png


BIN
assets/dugtrio.png


BIN
assets/eevee.png


BIN
assets/ekans.png


BIN
assets/electabuzz.png


BIN
assets/electrode.png


BIN
assets/exeggcute.png


BIN
assets/exeggutor.png


BIN
assets/farfetchd.png


BIN
assets/fearow.png


BIN
assets/flareon.png


BIN
assets/fossilaerodactyl.png


BIN
assets/fossilkabutops.png


BIN
assets/gastly.png


BIN
assets/gengar.png


BIN
assets/geodude.png


BIN
assets/gloom.png


BIN
assets/golbat.png


BIN
assets/goldeen.png


BIN
assets/golduck.png


BIN
assets/golem.png


BIN
assets/graveler.png


BIN
assets/grimer.png


BIN
assets/growlithe.png


BIN
assets/gyarados.png


BIN
assets/hand_cable.png


BIN
assets/hand_thumbsup.png


BIN
assets/haunter.png


BIN
assets/hitmonchan.png


BIN
assets/hitmonlee.png


BIN
assets/horsea.png


BIN
assets/hypno.png


BIN
assets/ivysaur.png


BIN
assets/jigglypuff.png


BIN
assets/jolteon.png


BIN
assets/jynx.png


BIN
assets/kabuto.png


BIN
assets/kabutops.png


BIN
assets/kadabra.png


BIN
assets/kakuna.png


BIN
assets/kangaskhan.png


BIN
assets/kingler.png


BIN
assets/koffing.png


BIN
assets/krabby.png


BIN
assets/lapras.png


BIN
assets/lickitung.png


BIN
assets/machamp.png


BIN
assets/machoke.png


BIN
assets/machop.png


BIN
assets/magikarp.png


BIN
assets/magmar.png


BIN
assets/magnemite.png


BIN
assets/magneton.png


BIN
assets/mankey.png


BIN
assets/marowak.png


BIN
assets/meowth.png


BIN
assets/metapod.png


BIN
assets/mew.png


BIN
assets/mewtwo.png


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott