Skip to content
Open
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
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Chip-8 VM</title>
<title>Chip-8 Virtual Machine</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<style>
Expand Down
9 changes: 8 additions & 1 deletion vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,17 @@ VM.prototype.step = function() {
// 6xkk - Set Vx = kk.
this.V[x] = kk
break
case 0x7000:
case 0x7000:
// 7xkk - Set Vx = Vx + kk.
this.V[x] = this.V[x] + kk
break
case 0x8000:
if (n == 0)
{
// 8xy0 - Set Vx = Vy
this.V[x] = this.V[y];
}
break
case 0xA000:
// Annn - Set I = nnn.
this.I = nnn
Expand Down