Skip to content

Commit

Permalink
Merge pull request #24 from kbembedded/main
Browse files Browse the repository at this point in the history
(Victory) Road to 2.0
  • Loading branch information
kbembedded authored May 27, 2024
2 parents b9fd9dc + 16a33e8 commit 282237f
Show file tree
Hide file tree
Showing 520 changed files with 7,509 additions and 3,270 deletions.
Binary file modified .flipcorg/gallery/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .flipcorg/gallery/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .flipcorg/gallery/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .flipcorg/gallery/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .flipcorg/gallery/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
.vscode
dist/
462 changes: 284 additions & 178 deletions README.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions README_catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

## 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/EstebanFuentealba/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/EstebanFuentealba/Flipper-Zero-Game-Boy-Pokemon-Trading/blob/main/README.md) for Link Cable interface adapters available on Tindie.

The Original pinout is as follows:

| Cable Game Link (Socket) | Flipper Zero GPIO |
| ------------------------ | ----------------- |
Expand All @@ -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
22 changes: 11 additions & 11 deletions README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Estas instrucciones asumen que estás comenzando desde el escritorio de Flipper

<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-1.png" width="400" />
<img src="./docs/images/flipper-zero-pokemon-select-1.png" width="400" />
<br />
</p>
- Presiona los botones `IZQUIERDA`/`DERECHA` para paginar la selección de Pokémon de a 1.
Expand All @@ -63,7 +63,7 @@ Estas instrucciones asumen que estás comenzando desde el escritorio de Flipper

<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-2.png" width="400" /><br />
<img src="./docs/images/flipper-zero-pokemon-select-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.

Expand All @@ -73,26 +73,26 @@ Estas instrucciones asumen que estás comenzando desde el escritorio de Flipper

<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-1-1.png" width="400" />
<img src="./docs/images/flipper-zero-nickname.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" />
<img src="./docs/images/flipper-zero-flat-pokemon-level.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" />
<img src="./docs/images/flipper-zero-move-1.png" width="400" />
<br />
</p>
<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-8.png" width="400" />
<img src="./docs/images/flipper-zero-move-2.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.
Expand All @@ -105,33 +105,33 @@ Estas instrucciones asumen que estás comenzando desde el escritorio de Flipper

<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-8-1.png" width="400" />
<img src="./docs/images/flipper-zero-type.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.
- `Random 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" />
<img src="./docs/images/flipper-zero-stats.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 />
<img src="./docs/images/flipper-zero-ot-id.png" width="400" /><br />
</p>
<p align='center'>
<br />
<img src="./docs/images/flipper-zero-flat-6-1.png" width="400" /><br />
<img src="./docs/images/flipper-zero-ot-name.png" width="400" /><br />
</p>
- Finalmente, selecciona Intercambiar PKMN para iniciar el proceso de intercambio.

Expand Down
8 changes: 4 additions & 4 deletions application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ App(
entry_point="pokemon_app",
requires=["gui"],
stack_size=2 * 1024,
fap_version=[1,6],
fap_version=[2,0],
fap_category="GPIO",
fap_icon="pokemon_10px.png",
fap_icon_assets="assets",
fap_author="Esteban Fuentealba, Kris Bahnsen, Darryn Cull",
fap_file_assets="files",
fap_author="Esteban Fuentealba, Kris Bahnsen, Darryn Cull, ProteanReverie",
fap_weburl="https://github.com/EstebanFuentealba",
fap_description="Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)",
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"],
),
],
)
Binary file removed assets/Background.png
Binary file not shown.
Binary file removed assets/Button_18x18.png
Binary file not shown.
Binary file removed assets/Connect_me_62x31.png
Binary file not shown.
Binary file removed assets/Connected_62x31.png
Binary file not shown.
Binary file removed assets/Space_100x18.png
Binary file not shown.
Binary file removed assets/Space_95x18.png
Binary file not shown.
Binary file removed assets/abra.png
Binary file not shown.
Binary file removed assets/aerodactyl.png
Binary file not shown.
Binary file removed assets/alakazam.png
Binary file not shown.
Binary file removed assets/arbok.png
Binary file not shown.
Binary file removed assets/arcanine.png
Binary file not shown.
Binary file removed assets/articuno.png
Binary file not shown.
Binary file removed assets/beedrill.png
Binary file not shown.
Binary file removed assets/bellsprout.png
Binary file not shown.
Binary file removed assets/blastoise.png
Binary file not shown.
Binary file removed assets/bulbasaur.png
Binary file not shown.
Binary file removed assets/butterfree.png
Binary file not shown.
Binary file removed assets/caterpie.png
Binary file not shown.
Binary file removed assets/chansey.png
Binary file not shown.
Binary file removed assets/charizard.png
Binary file not shown.
Binary file removed assets/charmander.png
Diff not rendered.
Binary file removed assets/charmeleon.png
Diff not rendered.
Binary file removed assets/clefable.png
Diff not rendered.
Binary file removed assets/clefairy.png
Diff not rendered.
Binary file removed assets/cloyster.png
Diff not rendered.
Binary file removed assets/cubone.png
Diff not rendered.
Binary file removed assets/dewgong.png
Diff not rendered.
Binary file removed assets/diglett.png
Diff not rendered.
Binary file removed assets/ditto.png
Diff not rendered.
Binary file removed assets/dodrio.png
Diff not rendered.
Binary file removed assets/doduo.png
Diff not rendered.
Binary file added assets/dolphin.png
Binary file removed assets/dragonair.png
Diff not rendered.
Binary file removed assets/dragonite.png
Diff not rendered.
Binary file removed assets/dratini.png
Diff not rendered.
Binary file removed assets/drowzee.png
Diff not rendered.
Binary file removed assets/dugtrio.png
Diff not rendered.
Binary file removed assets/eevee.png
Diff not rendered.
Binary file removed assets/ekans.png
Diff not rendered.
Binary file removed assets/electabuzz.png
Diff not rendered.
Binary file removed assets/electrode.png
Diff not rendered.
Binary file removed assets/exeggcute.png
Diff not rendered.
Binary file removed assets/exeggutor.png
Diff not rendered.
Binary file removed assets/farfetchd.png
Diff not rendered.
Binary file removed assets/fearow.png
Diff not rendered.
Binary file removed assets/flareon.png
Diff not rendered.
Binary file removed assets/fossilaerodactyl.png
Diff not rendered.
Binary file removed assets/fossilkabutops.png
Diff not rendered.
Binary file removed assets/gastly.png
Diff not rendered.
Binary file removed assets/gengar.png
Diff not rendered.
Binary file removed assets/geodude.png
Diff not rendered.
Binary file removed assets/gloom.png
Diff not rendered.
Binary file removed assets/golbat.png
Diff not rendered.
Binary file removed assets/goldeen.png
Diff not rendered.
Binary file removed assets/golduck.png
Diff not rendered.
Binary file removed assets/golem.png
Diff not rendered.
Binary file removed assets/graveler.png
Diff not rendered.
Binary file removed assets/grimer.png
Diff not rendered.
Binary file removed assets/growlithe.png
Diff not rendered.
Binary file removed assets/gyarados.png
Diff not rendered.
Binary file added assets/hand_cable.png
Binary file added assets/hand_thumbsup.png
Binary file removed assets/haunter.png
Diff not rendered.
Binary file removed assets/hitmonchan.png
Diff not rendered.
Binary file removed assets/hitmonlee.png
Diff not rendered.
Binary file removed assets/horsea.png
Diff not rendered.
Binary file removed assets/hypno.png
Diff not rendered.
Binary file removed assets/ivysaur.png
Diff not rendered.
Binary file removed assets/jigglypuff.png
Diff not rendered.
Binary file removed assets/jolteon.png
Diff not rendered.
Binary file removed assets/jynx.png
Diff not rendered.
Binary file removed assets/kabuto.png
Diff not rendered.
Binary file removed assets/kabutops.png
Diff not rendered.
Binary file removed assets/kadabra.png
Diff not rendered.
Binary file removed assets/kakuna.png
Diff not rendered.
Binary file removed assets/kangaskhan.png
Diff not rendered.
Binary file removed assets/kingler.png
Diff not rendered.
Binary file removed assets/koffing.png
Diff not rendered.
Binary file removed assets/krabby.png
Diff not rendered.
Binary file removed assets/lapras.png
Diff not rendered.
Binary file removed assets/lickitung.png
Diff not rendered.
Binary file removed assets/machamp.png
Diff not rendered.
Binary file removed assets/machoke.png
Diff not rendered.
Binary file removed assets/machop.png
Diff not rendered.
Binary file removed assets/magikarp.png
Diff not rendered.
Binary file removed assets/magmar.png
Diff not rendered.
Binary file removed assets/magnemite.png
Diff not rendered.
Binary file removed assets/magneton.png
Diff not rendered.
Binary file removed assets/mankey.png
Diff not rendered.
Binary file removed assets/marowak.png
Diff not rendered.
Binary file removed assets/meowth.png
Diff not rendered.
Binary file removed assets/metapod.png
Diff not rendered.
Binary file removed assets/mew.png
Diff not rendered.
Binary file removed assets/mewtwo.png
Diff not rendered.
Binary file removed assets/moltres.png
Diff not rendered.
Binary file removed assets/mr.mime.png
Diff not rendered.
Binary file removed assets/muk.png
Diff not rendered.
Binary file removed assets/nidoking.png
Diff not rendered.
Binary file removed assets/nidoqueen.png
Diff not rendered.
Binary file removed assets/nidoranf.png
Diff not rendered.
Binary file removed assets/nidoranm.png
Diff not rendered.
Binary file removed assets/nidorina.png
Diff not rendered.
Binary file removed assets/nidorino.png
Diff not rendered.
Binary file removed assets/ninetales.png
Diff not rendered.
Binary file removed assets/oddish.png
Diff not rendered.
Binary file removed assets/omanyte.png
Diff not rendered.
Binary file removed assets/omastar.png
Diff not rendered.
Binary file removed assets/onix.png
Diff not rendered.
Binary file removed assets/paras.png
Diff not rendered.
Binary file removed assets/parasect.png
Diff not rendered.
Binary file removed assets/persian.png
Diff not rendered.
Binary file removed assets/pidgeot.png
Diff not rendered.
Binary file removed assets/pidgeotto.png
Diff not rendered.
Binary file removed assets/pidgey.png
Diff not rendered.
Binary file removed assets/pikachu.png
Diff not rendered.
Binary file removed assets/pinsir.png
Diff not rendered.
Binary file removed assets/poliwag.png
Diff not rendered.
Binary file removed assets/poliwhirl.png
Diff not rendered.
Binary file removed assets/poliwrath.png
Diff not rendered.
Binary file removed assets/ponyta.png
Diff not rendered.
Binary file removed assets/porygon.png
Diff not rendered.
Binary file removed assets/primeape.png
Diff not rendered.
Binary file removed assets/psyduck.png
Diff not rendered.
Binary file removed assets/raichu.png
Diff not rendered.
Binary file removed assets/rapidash.png
Diff not rendered.
Binary file removed assets/raticate.png
Diff not rendered.
Binary file removed assets/rattata.png
Diff not rendered.
Binary file removed assets/red.png
Diff not rendered.
Binary file removed assets/rhydon.png
Diff not rendered.
Binary file removed assets/rhyhorn.png
Diff not rendered.
Binary file removed assets/sandshrew.png
Diff not rendered.
Binary file removed assets/sandslash.png
Diff not rendered.
Binary file removed assets/scyther.png
Diff not rendered.
Binary file removed assets/seadra.png
Diff not rendered.
Binary file removed assets/seaking.png
Diff not rendered.
Binary file removed assets/seel.png
Diff not rendered.
Binary file removed assets/shellder.png
Diff not rendered.
Binary file removed assets/slowbro.png
Diff not rendered.
Binary file removed assets/slowpoke.png
Diff not rendered.
Binary file removed assets/snorlax.png
Diff not rendered.
Binary file removed assets/spearow.png
Diff not rendered.
Binary file removed assets/squirtle.png
Diff not rendered.
Binary file removed assets/starmie.png
Diff not rendered.
Binary file removed assets/staryu.png
Diff not rendered.
Binary file added assets/surprised_pika.png
Binary file removed assets/tangela.png
Diff not rendered.
Binary file removed assets/tauros.png
Diff not rendered.
Binary file removed assets/tentacool.png
Diff not rendered.
Binary file removed assets/tentacruel.png
Diff not rendered.
Binary file removed assets/vaporeon.png
Diff not rendered.
Binary file removed assets/venomoth.png
Diff not rendered.
Binary file removed assets/venonat.png
Diff not rendered.
Binary file removed assets/venusaur.png
Diff not rendered.
Binary file removed assets/victreebel.png
Diff not rendered.
Binary file removed assets/vileplume.png
Diff not rendered.
Binary file removed assets/voltorb.png
Diff not rendered.
Binary file removed assets/vulpix.png
Diff not rendered.
Binary file removed assets/wartortle.png
Diff not rendered.
Binary file removed assets/weedle.png
Diff not rendered.
Binary file removed assets/weepinbell.png
Diff not rendered.
Binary file removed assets/weezing.png
Diff not rendered.
Binary file removed assets/wigglytuff.png
Diff not rendered.
Binary file removed assets/zapdos.png
Diff not rendered.
Binary file removed assets/zubat.png
Diff not rendered.
17 changes: 17 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog - Patch Notes

## Version 2.0
**Bug Fixes**
- Older MALVEKE style pinout no longer breaks OK button, MALVEKE users now able to modify traded Pokemon

**New Features**
- Generation II support (Gold, Silver, Crystal)
- Ability to configure name, level, held item, moveset, EV/IV, shininess, gender, pokerus, Unown form, OT ID/name
- Custom Sprite Art for all Pokemon, all sprites are the full 56x56 px size
- Better state synchronization during trades, able to request canceling a trade
- Exit confirmation to prevent accidentally losing configuration
- Add main menu to select generation and pinout
- Adjust Trade and Select views to show full sprite, with proper transparency

**Refactor**
- Sprites moved to file on SD card
- Create accessors for generically modifying Pokemon struct data

## Version 1.6
- **Change Name:** All the application names for GAME BOY/MALVEKE were standardized for better readability on the screen.

Expand Down
Binary file removed docs/images/flipper-zero-flat-01.png
Diff not rendered.
Binary file removed docs/images/flipper-zero-flat-1-1.png
Diff not rendered.
Binary file removed docs/images/flipper-zero-flat-1.png
Diff not rendered.
Binary file removed docs/images/flipper-zero-flat-2.png
Diff not rendered.
Binary file modified docs/images/flipper-zero-flat.xcf
Binary file not shown.
Binary file added docs/images/flipper-zero-gender.png
Binary file added docs/images/flipper-zero-held-item.png
File renamed without changes
Binary file added docs/images/flipper-zero-main-menu.png
File renamed without changes
File renamed without changes
Binary file added docs/images/flipper-zero-nickname.png
File renamed without changes
File renamed without changes
Binary file added docs/images/flipper-zero-pinout-malveke.png
File renamed without changes
File renamed without changes
Binary file added docs/images/flipper-zero-pokemon-select-1.png
Binary file added docs/images/flipper-zero-pokemon-select-2.png
Binary file added docs/images/flipper-zero-pokerus-infected.png
Binary file added docs/images/flipper-zero-pokerus-setup.png
Binary file added docs/images/flipper-zero-shiny.png
File renamed without changes
File renamed without changes
Binary file added docs/images/flipper-zero-unown-form.png
Binary file added docs/images/yt-vid-preview-frame.png
Binary file added files/all_sprites.fxbm
Binary file not shown.
Loading

0 comments on commit 282237f

Please sign in to comment.