Add Emerald support and PyGBA raw-state save/load#2
Open
OrekiDawson wants to merge 3 commits into
Open
Conversation
Author
|
Small note on the second commit: the full Gen 1-3 species name table is used by the Emerald memory reader so decoded party/species output is readable across the Emerald Pokédex range. It does not expand the PR scope beyond Emerald/GBA support. |
Author
|
Follow-up hygiene check against pokeemerald internal constants found one mismatch: Emerald HM item ids are 339-346, not the earlier 259-266 values. Added a small commit fixing those item ids and a regression test; pytest is now 6 passed and ruff remains clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds Pokémon Emerald/GBA support to pokemon-agent by introducing an Emerald memory reader, wiring Emerald detection/selection through the CLI and server paths, and fixing
PyGBAEmulatorstate persistence to use mGBA raw-state APIs.The save/load behavior now supports raw states generated by pokemon-agent's PyGBA/mGBA backend.
Validation
uv run pytest test_emerald.py test_imports.py6 passeduv run ruff check pokemon_agent/memory/emerald.py pokemon_agent/emulator.py test_emerald.pystate_size: 397312 bytessame_after_reload: true/healthOK/saveOK/action wait_60OK/loadOK/loadreturnedPokemon Emerald (USA)Known Limitations
External mGBA
.sssavestates are intentionally out of scope. Existing.ssfiles may depend on a different frontend, BIOS, game version, or state serialization format and are not expected to load through this backend.