Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c4d6b1a
FEAT: Added ability to backup to 10+1 (-1 is main slot for reset) slo…
ali-mosavian Dec 16, 2022
6658e21
CHG: Changed to std::array
ali-mosavian Dec 16, 2022
a640ce6
CHG: Renamed state to core which emulator inherits from, makes copyin…
ali-mosavian Dec 16, 2022
fc90f45
CHG: Added explicit snapshot/restore to py env and fixed newer gym co…
ali-mosavian Dec 16, 2022
cb9c7ab
FIX: Syntax errors.
ali-mosavian Dec 16, 2022
76419ad
FIX: Call did reset after a restore.
ali-mosavian Dec 26, 2022
d0cd94a
CHG: Refactor, using pybind11 instead of ctypes.cdll
ali-mosavian Dec 28, 2024
4960d91
FEAT: Fixed tests and added build script for python 3.8-3.13, upgrade…
ali-mosavian Dec 29, 2024
b43d857
FIX: video.frames_per_second -> render_fps (gymnasium)
ali-mosavian Dec 29, 2024
1166a70
CHG: Using super reset instead
ali-mosavian Dec 29, 2024
d3f5315
CHG: Ditched SCons and pivoted to Make for building emulator. Lots of…
ali-mosavian Dec 29, 2024
b2b3281
FIX: Removed debug stuff
ali-mosavian Dec 29, 2024
edba092
FIX: More debug stuff removal
ali-mosavian Dec 29, 2024
66b9600
CHG: Some clean up
ali-mosavian Dec 29, 2024
c2c5406
FIX: Build for ARM64 on MacOS
ali-mosavian Dec 29, 2024
80fa089
FIX: More small fixes
ali-mosavian Dec 29, 2024
4f80c9f
CHG: Updated numpy version
ali-mosavian Dec 29, 2024
f0ed5fa
CHG: Minor change in setup.py
ali-mosavian Dec 30, 2024
b856b3e
CHG: Updated setup.py
ali-mosavian Dec 30, 2024
d454d67
FIX: Reset wasn't fetching info
ali-mosavian Dec 30, 2024
6397ed3
FEAT: Snapshots are returned as np.ndarray, required some refactoring…
ali-mosavian Jan 1, 2025
1764a09
FIX: Minor fix
ali-mosavian Jan 1, 2025
6c27423
FEAT: Added _will_restore and _did_restore callbacks. Improved build …
ali-mosavian Jan 2, 2025
3e8ce36
FIX: Missing C++ headers
ali-mosavian Jan 3, 2025
1f43bca
FIX: Fixed JoypadSpace incompability with gymnasium
ali-mosavian Jan 3, 2025
0ea00ac
FEAT: Switched to nearest neighbour filtering when rendering to windo…
ali-mosavian Jan 11, 2025
9d89ad8
FIX: Fixed pyglet import, bumped to version 9.1.4
ali-mosavian Jan 11, 2025
90bfb35
feat(emulator): add VectorEmulator for parallel NES emulation
ali-mosavian Jan 27, 2026
b0340d9
fix(emulator): prevent dangling pointers when restoring snapshots
ali-mosavian Jan 27, 2026
ba31ab6
perf(emulator): add CPU core pinning for better NUMA locality
ali-mosavian Jan 27, 2026
eb94354
perf(emulator): replace mutex-based sync with lock-free busy-wait
ali-mosavian Jan 27, 2026
2b171fd
feat(emulator): add batch RAM reading for info collection
ali-mosavian Jan 28, 2026
83e998c
fix: use C++14 compatible tuple access and fix array constructor
ali-mosavian Jan 28, 2026
96d32f3
feat: add timing instrumentation to VectorEmulator::step
ali-mosavian Jan 28, 2026
d6e4ac0
feat: add per-worker timing instrumentation
ali-mosavian Jan 28, 2026
4007282
perf: NUMA-aware thread pinning - spread workers across sockets
ali-mosavian Jan 28, 2026
49582b9
fix: correct NUMA pinning to use physical cores across sockets
ali-mosavian Jan 28, 2026
e21cb43
fix: remove opcode warning spam and add ROM validation
ali-mosavian Jan 28, 2026
392f65a
chore: bump version to 9.3.0
ali-mosavian Jan 28, 2026
860f145
fix: simplify CPU affinity to round-robin pinning
ali-mosavian Jan 28, 2026
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
1 change: 1 addition & 0 deletions .clang_complete
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-Ines_py/nes/include
-Ines_py/nes/src
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
UV ?= $(shell which uv)
PYTHON ?= $(shell which python3)

# build everything
all: test deployment

# build the SimpleNES C++ code
lib_emu:
$(MAKE) -C nes_py/nes $(MAKEFLAGS)
mv nes_py/nes/libemulator.so nes_py/emulator.so

install:
$(UV) pip install .

# run the Python test suite
test: install
(cd nes_py/tests && $(PYTHON) -m unittest discover .)


# clean the build directory
clean:
$(MAKE) -C nes_py/nes clean
rm -rf build/ .eggs/ *.egg-info/ || true
find . -name "*.pyc" -delete
find . -name "__pycache__" -delete
find . -name ".sconsign.dblite" -delete
find . -name "build" | rm -rf
find . -name "emulator.so" -delete

# build the deployment package
deployment: clean test
$(UV) build --sdist --wheel

# ship the deployment package to PyPi
ship: test deployment
twine upload dist/*

# Show configuration
show-config:
@echo "Python path: $(PYTHON)"
@echo "UV command: $(UV)"
19 changes: 19 additions & 0 deletions build_all_py_ver
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e

export UV_PYTHON_PREFERENCE=only-managed

if command -v uv &> /dev/null
then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

for py_ver in 3.{8,9,10,11,12,13}
do
env_name=".pyenvs/${py_ver//.}"
uv venv -p $py_ver $env_name
source $env_name/bin/activate
uv pip install pip -r requirements.txt
make deployment
deactivate
done
28 changes: 0 additions & 28 deletions makefile

This file was deleted.

7 changes: 3 additions & 4 deletions nes_py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""The nes-py NES emulator for Python 2 & 3."""
from .nes_env import NESEnv

"""The nes-py NES emulator for Python 3."""
from nes_py.nes_env import NESEnv

# explicitly define the outward facing API of this package
__all__ = [NESEnv.__name__]
__all__ = [NESEnv.__name__]
File renamed without changes.
Loading