Skip to content

Commit afa50f0

Browse files
authored
Merge pull request #3 from rkdud007/sdl2
desktop
2 parents 1270354 + f92cf23 commit afa50f0

10 files changed

Lines changed: 5471 additions & 15 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ out/
66
!/broadcast
77
/broadcast/*/31337/
88
/broadcast/**/dry-run/
9+
broadcast
910

1011
# Docs
1112
docs/
1213

1314
# Dotenv file
1415
.env
16+
17+
target

‎Emuabi.json‎

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
[
2+
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
3+
{
4+
"type": "function",
5+
"name": "fetch",
6+
"inputs": [],
7+
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
8+
"stateMutability": "nonpayable"
9+
},
10+
{
11+
"type": "function",
12+
"name": "getDelayTimer",
13+
"inputs": [],
14+
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
15+
"stateMutability": "view"
16+
},
17+
{
18+
"type": "function",
19+
"name": "getDisplay",
20+
"inputs": [],
21+
"outputs": [
22+
{ "name": "", "type": "bool[2048]", "internalType": "bool[2048]" }
23+
],
24+
"stateMutability": "view"
25+
},
26+
{
27+
"type": "function",
28+
"name": "getIRegister",
29+
"inputs": [],
30+
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
31+
"stateMutability": "view"
32+
},
33+
{
34+
"type": "function",
35+
"name": "getPC",
36+
"inputs": [],
37+
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
38+
"stateMutability": "view"
39+
},
40+
{
41+
"type": "function",
42+
"name": "getRAMValueAt",
43+
"inputs": [
44+
{ "name": "index", "type": "uint256", "internalType": "uint256" }
45+
],
46+
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
47+
"stateMutability": "view"
48+
},
49+
{
50+
"type": "function",
51+
"name": "getSP",
52+
"inputs": [],
53+
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
54+
"stateMutability": "view"
55+
},
56+
{
57+
"type": "function",
58+
"name": "getSoundTimer",
59+
"inputs": [],
60+
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
61+
"stateMutability": "view"
62+
},
63+
{
64+
"type": "function",
65+
"name": "getStackValue",
66+
"inputs": [
67+
{ "name": "index", "type": "uint256", "internalType": "uint256" }
68+
],
69+
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
70+
"stateMutability": "view"
71+
},
72+
{
73+
"type": "function",
74+
"name": "getVRegister",
75+
"inputs": [
76+
{ "name": "index", "type": "uint256", "internalType": "uint256" }
77+
],
78+
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
79+
"stateMutability": "view"
80+
},
81+
{
82+
"type": "function",
83+
"name": "isDisplayCleared",
84+
"inputs": [],
85+
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
86+
"stateMutability": "view"
87+
},
88+
{
89+
"type": "function",
90+
"name": "keypress",
91+
"inputs": [
92+
{ "name": "idx", "type": "uint256", "internalType": "uint256" },
93+
{ "name": "pressed", "type": "bool", "internalType": "bool" }
94+
],
95+
"outputs": [],
96+
"stateMutability": "nonpayable"
97+
},
98+
{
99+
"type": "function",
100+
"name": "load",
101+
"inputs": [
102+
{ "name": "data", "type": "uint8[]", "internalType": "uint8[]" }
103+
],
104+
"outputs": [],
105+
"stateMutability": "nonpayable"
106+
},
107+
{
108+
"type": "function",
109+
"name": "reset",
110+
"inputs": [],
111+
"outputs": [],
112+
"stateMutability": "nonpayable"
113+
},
114+
{
115+
"type": "function",
116+
"name": "run",
117+
"inputs": [],
118+
"outputs": [],
119+
"stateMutability": "nonpayable"
120+
},
121+
{
122+
"type": "function",
123+
"name": "setDelayTimer",
124+
"inputs": [{ "name": "value", "type": "uint8", "internalType": "uint8" }],
125+
"outputs": [],
126+
"stateMutability": "nonpayable"
127+
},
128+
{
129+
"type": "function",
130+
"name": "setIRegister",
131+
"inputs": [{ "name": "value", "type": "uint16", "internalType": "uint16" }],
132+
"outputs": [],
133+
"stateMutability": "nonpayable"
134+
},
135+
{
136+
"type": "function",
137+
"name": "setRAMValueAt",
138+
"inputs": [
139+
{ "name": "index", "type": "uint256", "internalType": "uint256" },
140+
{ "name": "value", "type": "uint8", "internalType": "uint8" }
141+
],
142+
"outputs": [],
143+
"stateMutability": "nonpayable"
144+
},
145+
{
146+
"type": "function",
147+
"name": "setSP",
148+
"inputs": [{ "name": "value", "type": "uint16", "internalType": "uint16" }],
149+
"outputs": [],
150+
"stateMutability": "nonpayable"
151+
},
152+
{
153+
"type": "function",
154+
"name": "setScreenPixel",
155+
"inputs": [
156+
{ "name": "index", "type": "uint256", "internalType": "uint256" },
157+
{ "name": "value", "type": "bool", "internalType": "bool" }
158+
],
159+
"outputs": [],
160+
"stateMutability": "nonpayable"
161+
},
162+
{
163+
"type": "function",
164+
"name": "setSoundTimer",
165+
"inputs": [{ "name": "value", "type": "uint8", "internalType": "uint8" }],
166+
"outputs": [],
167+
"stateMutability": "nonpayable"
168+
},
169+
{
170+
"type": "function",
171+
"name": "setStackValue",
172+
"inputs": [
173+
{ "name": "index", "type": "uint256", "internalType": "uint256" },
174+
{ "name": "value", "type": "uint16", "internalType": "uint16" }
175+
],
176+
"outputs": [],
177+
"stateMutability": "nonpayable"
178+
},
179+
{
180+
"type": "function",
181+
"name": "setVRegister",
182+
"inputs": [
183+
{ "name": "index", "type": "uint8", "internalType": "uint8" },
184+
{ "name": "value", "type": "uint8", "internalType": "uint8" }
185+
],
186+
"outputs": [],
187+
"stateMutability": "nonpayable"
188+
},
189+
{
190+
"type": "function",
191+
"name": "tick",
192+
"inputs": [],
193+
"outputs": [],
194+
"stateMutability": "nonpayable"
195+
},
196+
{
197+
"type": "function",
198+
"name": "tickTimers",
199+
"inputs": [],
200+
"outputs": [],
201+
"stateMutability": "nonpayable"
202+
}
203+
]

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Got helped alot from [An Introduction to Chip-8 Emulation using the Rust Program
1010
- Sixteen 8-bit general purpose registers
1111
- 4096 bytes of RAM
1212
- Example [ROM games](./c8games/) from [Chip-8 Games Pack](https://www.zophar.net/pdroms/chip8/chip-8-games-pack.html)
13+
- Demo [![Video Label](http://img.youtube.com/vi/4cni9DNQ0wA/0.jpg)](https://youtu.be/4cni9DNQ0wA?t=0s)
1314

1415
### **Supported CHIP-8 Opcodes**
1516

0 commit comments

Comments
 (0)