Перейти к содержанию

GAME BOY Pokemon Trading MALVEKE

  • GAME BOY Pokemon Trading MALVEKE logo GAME BOY Pokemon Trading MALVEKE for GPIO GPIO


    loading="lazy"

    Pokemon exchange from Flipper Zero to Game Boy for Generation I (Pokemon Red, Blue, Yellow)

  • Information about application


    • Author: Check repo
    • Version: 1.6
    • Updated at: 2024-03-05
    • Downloads: 0

    Official Web Installer

Description

GAME BOY Pokemon Trading MALVEKE

Introduction

Now supports MALVEKE board!

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.

Connection: Flipper Zero GPIO - Game Boy

The original pinout is as follows:

Cable Game Link (Socket) Flipper Zero GPIO
6 (GND) 8 (GND)
5 (CLK) 6 (B2)
3 (SI) 7 (C3)
2 (SO) 5 (B3)

Using the "Select Pinout" option, the Original, MALVEKE, or any custom pin configuration can be selected.

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:

  • 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.

Tested In

  • Game Boy Color (GBC)
  • Game Boy Advance (GBA)

Changelog

Changelog - Patch Notes

Version 1.6

  • Change Name: All the application names for GAME BOY/MALVEKE were standardized for better readability on the screen.

Version 1.5

  • Add Features: Incorporate flipper-gblink library; Add support for MALVEKE board as well as custom pin selection; If MALVEKE board is detected, default to that pinout, otherwise use the original documented pinout.
  • BUG: The current MALVEKE pinout and interrupt use breaks the OK button after entering the trade screen.

Version 1.4

  • Bug Fixes: More robust trade logic fixes issues with names, remove ability to use numbers in Pokemon/Trainer names as the game itself will not allow that, fix trade animation not always being animated, make FAP icon 1bpp.
  • Add Features: Implement trade patch list that Game Boy expects and uses, add ability to return to main menu to modify a Pokemon traded to the Flipper and re-enter trade without the Game Boy needing to power cycle and re-connect through the Link Club, add back debug logging.
  • Trade Refactor: Eliminate extraneous code, improve robustness of state tracking during trades, isolate Trade's scope to the compilation unit, add notes on exchanged bytes during a trade, improve timing of animation during trade, reduce time spent in interrupt context, follow same setup/hold times for data exchange that the Game Boy uses, reduce use of magic numbers, clean up and improve code tracking real world time

Version 1.3

  • Refactor and UI cleanup: Convert to Flipper Zero UI modules for simpler interface, reduce binary size.
  • Add Features: Add ability to set custom Pokemon nickname or default, add ability to set OT name and ID, add ability to select Pokemon type(s). Note that, an evolution as well as a couple of different attacks will cause this to be overwritten with the Pokemon's default values.
  • Bug Fixes: Fix strange issue with exp gain causing traded Pokemon to de-level and result in incorrect stats.

Version 1.2.2

  • Extended Functionality: Add support to set level, select moves, set up EV/IV to a few predefined configurations, set up stats based on level and EV/IV settings, set nickname to default Pokemon name.

Version 1.2.1

  • Add GitHub action to build

Version 1.2.0

  • Cleanup data structs: This refactors the main data blocks for defining Pokemon, the icon, their species/hex value, as well as the large trade array in to more human friendly structs. Laying some groundwork to be able to adjust Pokemon details pre-trade by @kbembedded .
  • Bug Fixes: Fix furi crash, Fixes #9 by @kbembedded .