File tree Expand file tree Collapse file tree 9 files changed +1118
-819
lines changed
Expand file tree Collapse file tree 9 files changed +1118
-819
lines changed Original file line number Diff line number Diff line change 11name : Build Test Coverage
2- on : [push, pull_request]
2+ on : [pull_request]
33jobs :
44 run :
5- runs-on : ubuntu-20.04
5+ runs-on : ubuntu-latest
66 env :
7- OS : ubuntu-20.04
8- PYTHON : ' 3.8.10'
97 DISPLAY : :0
108 steps :
119 - name : Checkout
1210 uses : actions/checkout@v3
13- - name : Setup Python
11+ - name : Setup Python 3.8.12
1412 uses : actions/setup-python@v4
1513 with :
16- python-version : 3.8.10
14+ python-version : ' 3.8.12'
15+ - name : Update PIP
16+ run : python -m pip install --upgrade pip
17+ - name : Install OS Dependencies
18+ run : sudo apt-get install xvfb
19+ - name : Install Requirements
20+ run : pip install -r requirements.txt
1721 - name : Generate Report
18- run : |
19- pip install -r requirements.txt
20- sudo apt-get install xvfb
21- xvfb-run --auto-servernum coverage run --source=chip8 -m unittest
22+ run : xvfb-run --auto-servernum coverage run --source=chip8 -m unittest
2223 - name : Codecov
23- uses : codecov/codecov-action@v3.1.0
24+ uses : codecov/codecov-action@v4.2.0
25+ env :
26+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11"""
2- Copyright (C) 2012-2019 Craig Thomas
2+ Copyright (C) 2024 Craig Thomas
33This project uses an MIT style license - see LICENSE for details.
44
55A simple Chip 8 emulator - see the README file for more information.
1010
1111# C U S T O M I Z A T I O N V A R I A B L E S###############################
1212
13- # The total amount of memory to allocate for the emulator
14- MAX_MEMORY = 4096
15-
1613# Where the stack pointer should originally point
1714STACK_POINTER_START = 0x52
1815
2118
2219# Sets which keys on the keyboard map to the Chip 8 keys
2320KEY_MAPPINGS = {
24- 0x0 : pygame .K_g ,
25- 0x1 : pygame .K_4 ,
26- 0x2 : pygame .K_5 ,
27- 0x3 : pygame .K_6 ,
28- 0x4 : pygame .K_7 ,
29- 0x5 : pygame .K_r ,
30- 0x6 : pygame .K_t ,
31- 0x7 : pygame .K_y ,
32- 0x8 : pygame .K_u ,
33- 0x9 : pygame .K_f ,
34- 0xA : pygame .K_h ,
35- 0xB : pygame .K_j ,
36- 0xC : pygame .K_v ,
37- 0xD : pygame .K_b ,
38- 0xE : pygame .K_n ,
39- 0xF : pygame .K_m ,
21+ 0x0 : pygame .K_x ,
22+ 0x1 : pygame .K_1 ,
23+ 0x2 : pygame .K_2 ,
24+ 0x3 : pygame .K_3 ,
25+ 0x4 : pygame .K_q ,
26+ 0x5 : pygame .K_w ,
27+ 0x6 : pygame .K_e ,
28+ 0x7 : pygame .K_a ,
29+ 0x8 : pygame .K_s ,
30+ 0x9 : pygame .K_d ,
31+ 0xA : pygame .K_z ,
32+ 0xB : pygame .K_c ,
33+ 0xC : pygame .K_4 ,
34+ 0xD : pygame .K_r ,
35+ 0xE : pygame .K_f ,
36+ 0xF : pygame .K_v ,
4037}
4138
4239# The font file to use
You can’t perform that action at this time.
0 commit comments