A real-time IV overlay for Pokemon Emerald running on mGBA. Displays IVs, nature, ability, hidden power, and catch recommendations as a floating macOS window while you play.
- Real-time IV display - See all 6 IVs with color-coded quality indicators
- Nature analysis - Shows stat modifiers (+Atk/-Def, etc.)
- Hidden Power - Displays type and power
- Catch criteria - Configurable profiles to highlight Pokemon worth catching
- Shiny detection - Special alerts and visual effects for shinies
- Floating overlay - Stays on top, transparent when not in battle
PokeScan consists of two parts:
- Lua script - Runs in mGBA, reads Pokemon data from memory, sends it over TCP
- Swift app - Receives data, calculates IVs, displays the overlay
- macOS 13.0+
- mGBA emulator
- Pokemon Emerald ROM (US or EU version)
git clone https://github.com/Veridiann/PokeScan.git
cd PokeScan
swift build -c release
./launcher/install-app.shThis builds PokeScan and installs it to /Applications/PokeScan.app.
- Open
Package.swiftin Xcode - Select the PokeScan scheme
- Build and Run (Cmd+R)
For the zero-touch loop that launches mGBA + Lua + PokeScan, wires logs/ports, and validates the connection, see AI_DEV_LOOP.md.
- Launch PokeScan from Applications
- Settings opens automatically on first run
- Configure paths:
- mGBA.app (auto-detected if in /Applications)
- Pokemon Emerald ROM (use Browse button)
- Save state slot (latest/specific/none)
- Click "Launch mGBA" button
- Enter a wild battle - overlay shows Pokemon data
Right-click the overlay to:
- Launch/Relaunch mGBA - Start mGBA with your configured settings
- Switch profiles - Change catch criteria
- Toggle sound alerts
- Open Settings - Configure paths and preferences
- Edit Criteria - Customize catch rules
- Cmd+, - Open Settings
- 1-9 - Quick switch catch profiles
- Space - Clear alert flash
If you prefer a separate launcher app:
./launcher/install.shThen edit ~/.config/pokescan/pokescan.conf and double-click PokeScan Launcher in Applications.
-
Start mGBA with Pokemon Emerald loaded
-
Load the Lua script in mGBA:
- Go to Tools → Scripting → File → Load Script
- Select
lua/pokescan_sender.lua
-
Run PokeScan:
swift run # or run the built executable .build/release/PokeScan -
Enter a wild battle - the overlay will display Pokemon data
Right-click the overlay to:
- Switch between catch profiles
- Toggle sound alerts
- Edit the criteria file
Criteria are stored at ~/Library/Application Support/PokeScan/catch_criteria.json:
{
"activeProfile": "high_ivs",
"alwaysAlertShiny": true,
"alertSoundEnabled": true,
"profiles": {
"high_ivs": {
"name": "High IVs",
"minIVPercent": 80,
"notes": "Catch any Pokemon with 80%+ IVs"
},
"ralts": {
"name": "Ralts Hunt",
"species": ["Ralts"],
"requiredNatures": ["Timid", "Modest"],
"minIVs": {"spa": 25, "spe": 20}
}
}
}PokeScan/
├── lua/
│ ├── core/ # JSON encoding, socket server
│ ├── adapters/ # Game-specific memory addresses
│ └── pokescan_sender.lua
├── PokeScan/
│ ├── App/ # App entry point, window controller
│ ├── UI/ # SwiftUI views
│ ├── Models/ # Data structures
│ ├── Services/ # Socket client, criteria engine
│ └── Resources/ # Pokemon data, sprites, sounds
└── Package.swift
Currently supports:
- Pokemon Emerald (US)
- Pokemon Emerald (EU)
Adding support for other Gen 3 games requires creating a new adapter in lua/adapters/.
- Pokemon data sourced from PokeAPI
- Sprites from the Pokemon games (Nintendo/Game Freak)
- Built with mGBA Lua scripting API
MIT License - see LICENSE for details.

