You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: non_catalog_apps/gb-pokemon-trading/README.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,23 @@ This is a Pokemon exchange application from Flipper Zero to Game Boy [(Generacti
20
20
21
21
It currently trades a Pokemon based on your choice of Pokemon, Level, Stats and 4 Moves.
22
22
23
+
## Hardware Interface
24
+
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.
25
+
<palign='center'>
26
+
<ahref="https://www.tindie.com/stores/kbembedded/?ref=offsite_badges&utm_source=sellers_kbembedded&utm_medium=badges&utm_campaign=badge_large"><imgsrc="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png"alt="I sell on Tindie"width="200"height="104"></a>
27
+
</p>
28
+
29
+
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.
30
+
31
+
<palign='center'>
32
+
<ahref="https://www.tindie.com/stores/efuentealba/?ref=offsite_badges&utm_source=sellers_efuentealba&utm_medium=badges&utm_campaign=badge_large"><imgsrc="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png"alt="I sell on Tindie"width="200"height="104"></a>
33
+
</p>
34
+
35
+
Details on the hardware interface, as well as how to create your own adapter board, can be found in the [How Does It Work](#how-does-it-work) section below.
36
+
23
37
## Installation Directions
24
38
25
-
This project is intended to be overlayed on top of an existing firmware repo, in my case the **Release 0.79.1** version.
39
+
This project is intended to be overlaid on top of an existing firmware repo, in my case the **Release 0.79.1** version.
26
40
27
41
- 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.
28
42
- Copy the "pokemon" folder into the `/applications_user/pokemon` folder in your firmware.
@@ -48,6 +62,7 @@ And use [**qFlipper**](https://flipperzero.one/update) to copy the generated **p
48
62
49
63
These instructions assume that you are starting at the Flipper Zero desktop. Otherwise, press the Back button until you are at the desktop.
50
64
65
+
- 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.
51
66
- Press the `OK` button on the Flipper to open the main menu.
52
67
- Choose `Applications` from the menu.
53
68
- Choose `GPIO` from the submenu.
@@ -87,7 +102,7 @@ These instructions assume that you are starting at the Flipper Zero desktop. Oth
87
102
<br />
88
103
</p>
89
104
90
-
- 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 quickliy selected. Note that any move after the first `No Move` is ignored.
105
+
- 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.
91
106
92
107
<palign='center'>
93
108
<br />
@@ -115,7 +130,7 @@ These instructions assume that you are starting at the Flipper Zero desktop. Oth
115
130
- The Pokemon's stats can also be influenced. The current settings are:
116
131
-`Random IV, Zero EV` Mimics stats of a caught wild Pokemon.
117
132
-`Random IV, Max EV / Level` IV is randomized, but EV is set to the maximum a trained Pokemon could be for its current level.
118
-
-`Randon IV, Max EV` IV is randomized, EV is set to the abosolute max for a perfectly trained Pokemon.
133
+
-`Randon IV, Max EV` IV is randomized, EV is set to the absolute max for a perfectly trained Pokemon.
119
134
-`Max IV, Zero EV` Mimics stats of a caught wild Pokemon, but with the maximum IV possible.
120
135
-`Max IV, Max EV / Level` IV is max, EV is set to the maximum a trained Pokemon could be for its current level.
121
136
-`Max IV, Max EV` Absolutely perfect and overly powerful Pokemon.
@@ -126,7 +141,7 @@ These instructions assume that you are starting at the Flipper Zero desktop. Oth
126
141
<br />
127
142
</p>
128
143
129
-
- 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 Pokmon will still obey you without badges, but, will not get the experience boost of a traded Pokemon.
144
+
- 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.
130
145
131
146
<palign='center'>
132
147
<br />
@@ -220,6 +235,8 @@ These instructions assume that you are starting at the Flipper Zero desktop. Oth
- 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 <imgsrc="./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.
239
+
223
240
If the Flipper Zero gets stuck at the end of the exchange, you must reboot it by pressing the <imgsrc="./docs/images/left.png" /> LEFT + <imgsrc="./docs/images/back.png" /> BACK key combination.
224
241
225
242
<palign='center'>
@@ -252,7 +269,7 @@ You can learn more about it in the following video. [**Analyzing the Different V
252
269
253
270
## Board for Flipper Zero with PortData EXT Link.
254
271
255
-
For the Flipper Zero board, a [PortData EXT Link](https://es.aliexpress.com/item/1005004116983895.html) and a 2x8 [prototype board](https://es.aliexpress.com/item/32478242317.html) were used.
272
+
For the Flipper Zero board, a [PortData EXT Link](https://s.click.aliexpress.com/e/_Dm3EqlR) and a 2x8 [prototype board](https://s.click.aliexpress.com/e/_DETrjpL) were used.
256
273
257
274
<palign='center'>
258
275
<br />
@@ -322,14 +339,13 @@ For each image, the color `#aaa` was transformed to `#fff` so that Flipper Zero
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.
8
+
9
+
If a MALVEKE board is plugged in to GPIO before starting the app, the app will default to using the MALVEKE EXT1 interface.
10
+
11
+
12
+
## Connection: Flipper Zero GPIO - Game Boy
13
+
14
+
The original pinout is as follows:
15
+
16
+
| Cable Game Link (Socket) | Flipper Zero GPIO |
17
+
| ------------------------ | ----------------- |
18
+
| 6 (GND) | 8 (GND) |
19
+
| 5 (CLK) | 6 (B2) |
20
+
| 3 (SI) | 7 (C3) |
21
+
| 2 (SO) | 5 (B3) |
22
+
23
+
Using the "Select Pinout" option, the Original, MALVEKE, or any custom pin configuration can be selected.
24
+
25
+
26
+
## How does it work?
27
+
28
+
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:
29
+
30
+
- A clock signal (CLK).
31
+
- An output signal (Serial Out or SO).
32
+
- An input signal (Serial In or SI).
33
+
34
+
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.
35
+
36
+
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.
0 commit comments