ghidra-tlcs900h
MO-Gymnasium
ghidra-tlcs900h | MO-Gymnasium | |
---|---|---|
1 | 3 | |
9 | 242 | |
- | 5.4% | |
7.3 | 7.7 | |
4 months ago | 28 days ago | |
Java | Python | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ghidra-tlcs900h
-
Show HN: Ghidra Plays Mario
I've been exploring new ways of testing Ghidra processor modules. In this repo, I was able to emulate NES ROMs in Ghidra to test its 6502 specification, which resulted in finding and fixing some bugs.
Context: Ghidra is used for reverse engineering binary executables, complementing the usual disassembly view with function decompilation. Each supported architecture has a SLEIGH specification, which provides semantics for parsing and emulating instructions, not unlike the dispatch handlers you would find in interpreters written for console emulators.
Emulator devs have long had extensive test ROMs for popular consoles, but Ghidra only provides CPU emulation, so it can't run them without additional setup. What I did here is bridge the gap: by modifying a console emulator to instead delegate CPU execution to Ghidra, we can now use these same ROMs to validate Ghidra processor modules.
Previously [1], I went with a trace log diffing approach, where any hardware specific behaviour that affected CPU execution was also encoded in trace logs. However, it required writing hardware specific logic, and is still not complete. With the delegation approach, most of this effort is avoided, since it's easier to hook and delegate memory accesses.
I plan on continuing research in this space and generalizing my approaches, since it shows potencial for complementing existing test coverage provided by pcodetest. If a simple architecture like 6502 had a few bugs, who knows how many are in more complex architectures! I wasn't able to find similar attempts (outside of diffing and coverage analysis from trace logs), please let me know if I missed something, and any suggestions for improvements.
[1]: https://github.com/nevesnunes/ghidra-tlcs900h#emulation
MO-Gymnasium
-
The Worlds First FPGA N64
"Show HN: Ghidra Plays Mario" (2023) https://news.ycombinator.com/item?id=37475761 :
[RL, ..., MuZero unplugged w/ PyTorch ]
> Farama-Foundation/Gymnasium is a fork of OpenAI/gym and it has support for additional Environments like MuJoCo: https://github.com/Farama-Foundation/Gymnasium#environments
> Farama-Foundation/MO-Gymnasiun: "Multi-objective Gymnasium environments for reinforcement learning": https://github.com/Farama-Foundation/MO-Gymnasium
Ghidra may or may not be useful for e.g. gadgets with mario64
-
Show HN: Ghidra Plays Mario
"Multi-objective Gymnasium environments for reinforcement learning": https://github.com/Farama-Foundation/MO-Gymnasium
-
MO-Gymnasium (a standard API and benchmark set for multi-objective RL) has reached mature status within the Farama Foundation.
The package is available to be installed with the typical `pip install mo-gymnasium` command. More information on the documentation page: https://mo-gymnasium.farama.org/ or the release notes: https://github.com/Farama-Foundation/MO-Gymnasium/releases/tag/v1.0.0
What are some alternatives?
ghidra - Ghidra is a software reverse engineering (SRE) framework
gym-anytrading - The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
retro - Retro Games in Gym
gymprecice - A framework to design and develop reinforcement learning environments for single- and multi-physics active flow control.
Muzero-unplugged - Pytorch Implementation of MuZero Unplugged for gym environment. This algorithm is capable of supporting a wide range of action and observation spaces, including both discrete and continuous variations.
nand2tetris - An implementation of the nand2tetris project. A full-stack computer: ISA, Assembler, Virtual Machine, Interpreter, Compiler, Operating System, and a Graphical Sudoku game. All from scratch.
Gymnasium - An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
switcher - Gnome Shell extension to switch windows quickly by typing
6502_65C02_functional_tests - Tests for all valid opcodes of the 6502 and 65C02 processor
ghidra-plays-mario - Playing NES ROMs with Ghidra's PCode Emulator