Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0.0 #285

Merged
merged 65 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
890bc6a
Improve allocation in rewind
Baekalfen Mar 9, 2024
65b610b
Add descriptive exception on save/load_state when providing a text-file
Baekalfen Mar 5, 2024
b49b87e
Remove logging from docs
Baekalfen Feb 11, 2024
cd5dff3
Exclude manager.p(y,xd) from pre-commit
Baekalfen Feb 8, 2024
afff884
Update .gitignore
Baekalfen Feb 4, 2024
ee314ed
Experimenting with color_code
Baekalfen Oct 27, 2023
3e04b58
Remove disable_renderer
Baekalfen Feb 11, 2024
a529fe7
Software breakpoint backend
Baekalfen Feb 7, 2024
b954500
Fixing cycles signed int
Baekalfen Feb 7, 2024
a58a946
Remove logging prefix of _
Baekalfen Feb 7, 2024
27a824a
Implement API for hooks
Baekalfen Feb 7, 2024
471c2d3
Split Debug plugin into DebugPrompt
Baekalfen Feb 7, 2024
cf3bec0
Breakpoint, hook and DebugPrompt tests
Baekalfen Feb 7, 2024
b204674
Added Which, Whichboot, Pokemon RL (GIF) to test
Baekalfen Dec 9, 2023
051abf5
Add button, button_press and button_release functions
Baekalfen Oct 26, 2023
682e420
tick(count=*, render=*) + remove _rendering() and screen_image()
Baekalfen Oct 26, 2023
e21611c
Overhauled API: Move botsupport->api, etc.
Baekalfen Dec 9, 2023
9ceabe7
Implement pyboy.memory interface to replace get/set_memory_value
Baekalfen Nov 12, 2023
5f3660e
Removed "headless" and "dummy" windows in favor of "null"
Baekalfen Oct 27, 2023
73fb59c
Refactor tilemaps
Baekalfen Dec 9, 2023
f29e31e
pyboy.screen as instance variable instead of property
Baekalfen Dec 9, 2023
0478d80
Convert Screen API to properties instead of functions
Baekalfen Nov 16, 2023
242edaf
Convert color scheme to RGBX for Pillow, BGRA for SDL2, RGBA for OpenGL
Baekalfen Nov 14, 2023
eef31e2
Pyboy-object: readonly window title
Baekalfen Dec 9, 2023
e4fce57
Pyboy-object: readonly memory
Baekalfen Dec 9, 2023
4aa0ef6
Allow 768 tiles on CGB in API
Baekalfen Dec 9, 2023
c495084
Update pan docs links
Baekalfen Nov 22, 2023
a0a331f
Change .pxd public to readonly
Baekalfen Nov 22, 2023
995cfbe
Introduce exceptions for loading a corrupt save-state
Baekalfen Nov 23, 2023
b3c3ecf
Correct docs for api/screen.py
Baekalfen Dec 4, 2023
c2ea115
Hide pyboy.plugin_manager and make readonly
Baekalfen Dec 12, 2023
7f37371
game_wrapper as property, and auto-initialized
Baekalfen Dec 12, 2023
0e3b8cd
Remove OpenAI Gym
Baekalfen Dec 14, 2023
4606675
Add MemoryScanner
NicoleFaye Dec 17, 2023
3e7484a
Add CGB palette and bank number support for api/sprite.py
NicoleFaye Dec 17, 2023
e4db84c
Added .vscode to gitignore
NicoleFaye Dec 17, 2023
23cf042
Add MemoryScanner and bcd tests
NicoleFaye Dec 17, 2023
7a51309
Fix Kirby game wrapper score calculation
Baekalfen Jan 4, 2024
dda1363
Change pyboy.cartridge_title() to property
Baekalfen Jan 4, 2024
7306084
Refactor game_area code for v2.0.0
Baekalfen Oct 27, 2023
f822017
Remove fitness scores from game wrappers
Baekalfen Jan 18, 2024
0cdd7fd
Fix debug in DMG-CGB mode
Baekalfen Jan 19, 2024
f813e88
Fix call to logger.warn
Baekalfen Jan 19, 2024
3645653
Move screen buffer metadata to attributes buffer, output real RGBA data
Baekalfen Jan 18, 2024
01a5320
Fix API for tile
Baekalfen Feb 11, 2024
07df75c
Remove PyBoy.get_input
Baekalfen Feb 7, 2024
06c4aba
Improved documentation on PyBoy API
Baekalfen Feb 7, 2024
c2f0a2d
Add default_rom and symbols to make build
Baekalfen Feb 7, 2024
a36d2ec
Add symbols support for hook_(de)register
Baekalfen Feb 7, 2024
75ea5a6
initialize hooks for use in wrapper
NicoleFaye Feb 23, 2024
056e720
Improved slicing in tilemap
Baekalfen Feb 10, 2024
80e1262
Implement custom doctest runner
Baekalfen Feb 10, 2024
ec4250c
Move WindowEvent, bcd_to_dec and dec_to_bcd to utils
Baekalfen Feb 11, 2024
fb0d6df
Generic game wrapper enables start_game and reset_game
Baekalfen Feb 11, 2024
8294b80
Fix bug with PIL.Image.save() removing buffer reference
Baekalfen Feb 16, 2024
6e6ce7e
Add delay option to pyboy.button
Baekalfen Feb 24, 2024
356ee98
Add symbol_lookup method
Baekalfen Mar 14, 2024
6e0e105
Verify and fix PyBoy kwargs
Baekalfen Mar 16, 2024
24f0129
Remove "_file" and "_type" postfixes from PyBoy kwargs
Baekalfen Mar 16, 2024
0077ffb
Add tests for kwarg log_level
Baekalfen Mar 17, 2024
0831ff8
Add support for multiple symbols on same bank/address
Baekalfen Mar 17, 2024
a2463f2
Allow specifying bank for pyboy.memory in DMG mode when it's 0
Baekalfen Mar 17, 2024
bcf7641
Updated README for v2.0.0
Baekalfen Dec 9, 2023
1ed7460
Update docs
Baekalfen Feb 11, 2024
26d2197
Bump version to v2.0.0
Baekalfen Jan 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install --prefer-binary -r requirements.txt
pip install --prefer-binary -r requirements_tests.txt
- name: Doctest
if: ${{ !contains(matrix.os, 'windows') }}
run: |
python -m pytest pyboy/ -n auto
- name: Build PyBoy
run: |
python setup.py build_ext -j $(getconf _NPROCESSORS_ONLN) --inplace
Expand All @@ -44,9 +49,7 @@ jobs:
TEST_CI: 1
TEST_NO_UI: 1
run: |
pip install --upgrade pip
pip install --prefer-binary -r requirements_tests.txt
python -m pytest tests/ -n2 -v
python -m pytest tests/ -n auto -v
- name: Build and upload wheel
if: ${{ github.event_name == 'release' && github.event.action == 'published' && !github.event.release.prerelease && !contains(matrix.os, 'ubuntu') }}
run: |
Expand Down Expand Up @@ -98,15 +101,19 @@ jobs:
pypy3 -m ensurepip
pypy3 -m pip install --upgrade pip
pypy3 -m pip install wheel
pypy3 -m pip install --prefer-binary -r requirements.txt
pypy3 -m pip install --prefer-binary -r requirements_tests.txt
- name: Doctest
if: ${{ !contains(matrix.os, 'windows') }}
run: |
pypy3 -m pytest pyboy/ -n auto
- name: Run PyTest
env:
PYTEST_SECRETS_KEY: ${{ secrets.PYTEST_SECRETS_KEY }}
TEST_CI: 1
TEST_NO_UI: 1
run: |
pip install --upgrade pip
pypy3 -m pip install --prefer-binary -r requirements_tests.txt
pypy3 -m pytest tests/ -n2 -v
pypy3 -m pytest tests/ -n auto -v

test_manylinux:
name: ManyLinux - Build, Test and Deploy
Expand Down
40 changes: 16 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# macOS
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -38,11 +41,6 @@ docs/_build/
# PyBuilder
target/

.DS_Store
Report/*.pdf
Report/*.aux
Report/*.log

# Don't want to see any ROMs being uploaded
# This project is not for pirating games!
*.gb
Expand All @@ -64,6 +62,7 @@ test_data.encrypted
tetris/
PyBoy-RL/

# Cython
/pyboy/**/*.c
/pyboy/**/*.h
/pyboy/**/*.html
Expand All @@ -80,29 +79,22 @@ PyBoy-RL/
/site-packages
/share

# LaTeX files
Projects/Projects.aux
Projects/Projects.bbl
Projects/Projects.blg
Projects/Projects.out
Projects/Projects.log

bootrom/bootrom*.map
bootrom/bootrom*.obj
bootrom/bootrom*.sym
bootrom/bootrom*.gb
bootrom/logo.asm
bootrom/pyboy.png
bootrom/PYBOY_ROM.bin
# Bootrom
extras/bootrom/bootrom*.map
extras/bootrom/bootrom*.obj
extras/bootrom/bootrom*.gb
extras/bootrom/logo.asm

default_rom/default_rom.map
default_rom/default_rom.obj
default_rom/default_rom.sym
!default_rom.gb
extras/default_rom/default_rom*.map
extras/default_rom/default_rom*.obj
!default_rom*.gb
extras/default_rom/default_rom.gb
extras/default_rom/default_rom_cgb.gb

test.replay

/mooneye/
/blargg/
/GB Tests/
/SameSuite/
/SameSuite/
.vscode/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: opcodes.py
exclude: (opcodes.py|manager.py|manager.pxd)
repos:
- repo: https://github.com/myint/unify
rev: v0.5
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Any contribution is appreciated. The currently known errors are registered in th
For the more major features, there are the following that you can give a try. They are also described in more detail in the [project list](https://github.com/Baekalfen/PyBoy/raw/master/extras/Projects/Projects.pdf):
* Color
* Link Cable
* _(Experimental)_ AI - use the `botsupport` or game wrappers to train a neural network
* _(Experimental)_ AI - use the API or game wrappers to train a neural network
* _(Experimental)_ Game Wrappers - make wrappers for popular games

If you want to implement something which is not on the list, feel free to do so anyway. If you want to merge it into our repo, then just send a pull request and we will have a look at it.
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ codecov: clean

build:
@echo "Building..."
cd ${ROOT_DIR}/extras/default_rom && $(MAKE)
cd ${ROOT_DIR}/extras/bootrom && $(MAKE)
CFLAGS=$(CFLAGS) ${PY} setup.py build_ext -j $(shell getconf _NPROCESSORS_ONLN) --inplace

clean:
@echo "Cleaning..."
cd ${ROOT_DIR}/extras/default_rom && $(MAKE) clean
cd ${ROOT_DIR}/extras/bootrom && $(MAKE) clean
rm -rf PyBoy.egg-info
rm -rf build
rm -rf dist
Expand Down Expand Up @@ -60,13 +64,16 @@ uninstall:
${PY} -m pip uninstall pyboy

test: export DEBUG=1
test: clean build test_cython test_pypy
test: clean test_pypy test_cpython_doctest build test_cython

test_cpython_doctest:
${PY} -m pytest pyboy/ -n auto -v

test_cython:
${PY} -m pytest tests/ -n4 -v
${PY} -m pytest tests/ -n auto -v

test_pypy:
${PYPY} -m pytest tests/ -n4 -v
${PYPY} -m pytest tests/ pyboy/ -n auto -v

test_all: test

Expand Down
Loading
Loading