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

Compatibility Update #22

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 14 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
name: Build Test Coverage
on: [push, pull_request]
on: [pull_request]
jobs:
run:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
OS: ubuntu-20.04
PYTHON: '3.8.10'
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
- name: Setup Python 3.8.12
uses: actions/setup-python@v4
with:
python-version: 3.8.10
python-version: '3.8.12'
- name: Update PIP
run: python -m pip install --upgrade pip
- name: Install OS Dependencies
run: sudo apt-get install xvfb
- name: Install Requirements
run: pip install -r requirements.txt
- name: Generate Report
run: |
pip install -r requirements.txt
sudo apt-get install xvfb
xvfb-run --auto-servernum coverage run --source=chip8 -m unittest
run: xvfb-run --auto-servernum coverage run --source=chip8 -m unittest
- name: Codecov
uses: codecov/codecov-action@v3.1.0
uses: codecov/codecov-action@v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
267 changes: 200 additions & 67 deletions README.md

Large diffs are not rendered by default.

37 changes: 17 additions & 20 deletions chip8/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (C) 2012-2019 Craig Thomas
Copyright (C) 2024 Craig Thomas
This project uses an MIT style license - see LICENSE for details.

A simple Chip 8 emulator - see the README file for more information.
Expand All @@ -10,9 +10,6 @@

# C U S T O M I Z A T I O N V A R I A B L E S###############################

# The total amount of memory to allocate for the emulator
MAX_MEMORY = 4096

# Where the stack pointer should originally point
STACK_POINTER_START = 0x52

Expand All @@ -21,22 +18,22 @@

# Sets which keys on the keyboard map to the Chip 8 keys
KEY_MAPPINGS = {
0x0: pygame.K_g,
0x1: pygame.K_4,
0x2: pygame.K_5,
0x3: pygame.K_6,
0x4: pygame.K_7,
0x5: pygame.K_r,
0x6: pygame.K_t,
0x7: pygame.K_y,
0x8: pygame.K_u,
0x9: pygame.K_f,
0xA: pygame.K_h,
0xB: pygame.K_j,
0xC: pygame.K_v,
0xD: pygame.K_b,
0xE: pygame.K_n,
0xF: pygame.K_m,
0x0: pygame.K_x,
0x1: pygame.K_1,
0x2: pygame.K_2,
0x3: pygame.K_3,
0x4: pygame.K_q,
0x5: pygame.K_w,
0x6: pygame.K_e,
0x7: pygame.K_a,
0x8: pygame.K_s,
0x9: pygame.K_d,
0xA: pygame.K_z,
0xB: pygame.K_c,
0xC: pygame.K_4,
0xD: pygame.K_r,
0xE: pygame.K_f,
0xF: pygame.K_v,
}

# The font file to use
Expand Down
Loading
Loading