gameboy superoptimizer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Forest Belton 97b70e2ef0 Minor improvements 2 years ago
docs Add reference paper and update README 2 years ago
gbso Minor improvements 2 years ago
tests Implement operand mutation 2 years ago
.gitignore Initial commit 2 years ago
README.md Add TODO list to README 2 years ago
conftest.py Write CPU tests for 8-bit loads 2 years ago
ex.py Add example testcase that includes carry set 2 years ago
poetry.lock Initial commit 2 years ago
pyproject.toml Initial commit 2 years ago

README.md

gbso

An implementation of the stochastic superoptimization algorithm STOKE for the Sharp LR35902 (also known as GB-Z80).

Setup

Make sure you have Poetry and Python 3.9+ installed. Then run:

$ poetry install

Usage

Input programs are specified as a list of CPU instructions. For a list of instructions available to the processor, take a look at insn.py or a standard reference.

Once you have the program specified, call gbso.optimize.optimize on the program. A superoptimized, behaviorally equivalent program will be returned. Additional parameters are available to the optimization function to control search.

For a comprehensive example, see ex.py.

TODO