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 1
1
name : Build Test Coverage
2
- on : [push, pull_request]
2
+ on : [pull_request]
3
3
jobs :
4
4
run :
5
- runs-on : ubuntu-20.04
5
+ runs-on : ubuntu-latest
6
6
env :
7
- OS : ubuntu-20.04
8
- PYTHON : ' 3.8.10'
9
7
DISPLAY : :0
10
8
steps :
11
9
- name : Checkout
12
10
uses : actions/checkout@v3
13
- - name : Setup Python
11
+ - name : Setup Python 3.8.12
14
12
uses : actions/setup-python@v4
15
13
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
17
21
- 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
22
23
- 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 1
1
"""
2
- Copyright (C) 2012-2019 Craig Thomas
2
+ Copyright (C) 2024 Craig Thomas
3
3
This project uses an MIT style license - see LICENSE for details.
4
4
5
5
A simple Chip 8 emulator - see the README file for more information.
10
10
11
11
# C U S T O M I Z A T I O N V A R I A B L E S###############################
12
12
13
- # The total amount of memory to allocate for the emulator
14
- MAX_MEMORY = 4096
15
-
16
13
# Where the stack pointer should originally point
17
14
STACK_POINTER_START = 0x52
18
15
21
18
22
19
# Sets which keys on the keyboard map to the Chip 8 keys
23
20
KEY_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 ,
40
37
}
41
38
42
39
# The font file to use
You can’t perform that action at this time.
0 commit comments