Skip to content

Commit

Permalink
Merge pull request #3 from rkdud007/sdl2
Browse files Browse the repository at this point in the history
desktop
  • Loading branch information
rkdud007 authored Nov 11, 2024
2 parents 1270354 + f92cf23 commit afa50f0
Show file tree
Hide file tree
Showing 10 changed files with 5,471 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ out/
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
broadcast

# Docs
docs/

# Dotenv file
.env

target
203 changes: 203 additions & 0 deletions Emuabi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
[
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
{
"type": "function",
"name": "fetch",
"inputs": [],
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getDelayTimer",
"inputs": [],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getDisplay",
"inputs": [],
"outputs": [
{ "name": "", "type": "bool[2048]", "internalType": "bool[2048]" }
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getIRegister",
"inputs": [],
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPC",
"inputs": [],
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRAMValueAt",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getSP",
"inputs": [],
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getSoundTimer",
"inputs": [],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getStackValue",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint16", "internalType": "uint16" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "getVRegister",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "isDisplayCleared",
"inputs": [],
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "keypress",
"inputs": [
{ "name": "idx", "type": "uint256", "internalType": "uint256" },
{ "name": "pressed", "type": "bool", "internalType": "bool" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "load",
"inputs": [
{ "name": "data", "type": "uint8[]", "internalType": "uint8[]" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "reset",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "run",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setDelayTimer",
"inputs": [{ "name": "value", "type": "uint8", "internalType": "uint8" }],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setIRegister",
"inputs": [{ "name": "value", "type": "uint16", "internalType": "uint16" }],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRAMValueAt",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" },
{ "name": "value", "type": "uint8", "internalType": "uint8" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setSP",
"inputs": [{ "name": "value", "type": "uint16", "internalType": "uint16" }],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setScreenPixel",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" },
{ "name": "value", "type": "bool", "internalType": "bool" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setSoundTimer",
"inputs": [{ "name": "value", "type": "uint8", "internalType": "uint8" }],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setStackValue",
"inputs": [
{ "name": "index", "type": "uint256", "internalType": "uint256" },
{ "name": "value", "type": "uint16", "internalType": "uint16" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setVRegister",
"inputs": [
{ "name": "index", "type": "uint8", "internalType": "uint8" },
{ "name": "value", "type": "uint8", "internalType": "uint8" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "tick",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "tickTimers",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
}
]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Got helped alot from [An Introduction to Chip-8 Emulation using the Rust Program
- Sixteen 8-bit general purpose registers
- 4096 bytes of RAM
- Example [ROM games](./c8games/) from [Chip-8 Games Pack](https://www.zophar.net/pdroms/chip8/chip-8-games-pack.html)
- Demo [![Video Label](http://img.youtube.com/vi/4cni9DNQ0wA/0.jpg)](https://youtu.be/4cni9DNQ0wA?t=0s)

### **Supported CHIP-8 Opcodes**

Expand Down
Loading

0 comments on commit afa50f0

Please sign in to comment.