mattcan / chipper Goto Github PK
View Code? Open in Web Editor NEWCHIP-8 interpreter
License: GNU General Public License v3.0
CHIP-8 interpreter
License: GNU General Public License v3.0
Instructions in 0x4000
are run by the CPU and affect memory
Instruction is printed to the screen
4xkk - SNE Vx, byte - Skip next instruction if Vx != kk.
Full details: CowGod
Instructions in 0xF000
are run by CPU and have some effect
Instruction is printed to screen
Fx07
LD Vx, DT - Set Vx = delay timer value.
The value of DT is placed into Vx.
Fx15
LD DT, Vx - Set delay timer = Vx.
DT is set equal to the value of Vx.
Fx18
LD ST, Vx - Set sound timer = Vx.
ST is set equal to the value of Vx.
Fx29
LD F, Vx - Set I = location of sprite for digit Vx.
The value of I is set to the location for the hexadecimal sprite corresponding to the value of Vx. See section 2.4, Display, for more information on the Chip-8 hexadecimal font.
Fx33
LD B, Vx - Store BCD representation of Vx in memory locations I, I+1, and I+2.
The interpreter takes the decimal value of Vx, and places the hundreds digit in memory at location in I, the tens digit at location I+1, and the ones digit at location I+2.
Fx65
LD Vx, [I] - Read registers V0 through Vx from memory starting at location I.
The interpreter reads values from memory starting at location I into registers V0 through Vx.
Instructions in 0xE000
are run by CPU and have some effect
Instruction is printed to screen
Instructions in 0x8000
are run by CPU and have some effect
Instruction is printed to screen
8xy1
OR Vx, Vy - Set Vx = Vx OR Vy.
Performs a bitwise OR on the values of Vx and Vy, then stores the result in Vx. A bitwise OR compares the corrseponding bits from two values, and if either bit is 1, then the same bit in the result is also 1. Otherwise, it is 0.
8xy3
XOR Vx, Vy - Set Vx = Vx XOR Vy.
Performs a bitwise exclusive OR on the values of Vx and Vy, then stores the result in Vx. An exclusive OR compares the corrseponding bits from two values, and if the bits are not both the same, then the corresponding bit in the result is set to 1. Otherwise, it is 0.
8xy6
SHR Vx {, Vy} - Set Vx = Vx SHR 1.
If the least-significant bit of Vx is 1, then VF is set to 1, otherwise 0. Then Vx is divided by 2.
8xy7
SUBN Vx, Vy - Set Vx = Vy - Vx, set VF = NOT borrow.
If Vy > Vx, then VF is set to 1, otherwise 0. Then Vx is subtracted from Vy, and the results stored in Vx.
8xyE
SHL Vx {, Vy} - Set Vx = Vx SHL 1.
If the most-significant bit of Vx is 1, then VF is set to 1, otherwise to 0. Then Vx is multiplied by 2.
Instructions in 0xC000
are run by CPU and have some effect
Instruction is printed to screen
Instructions in 0x5000
are run by CPU and affect memory
Instruction prints to the screen
5xy0 - SE Vx, Vy - Skip next instruction if Vx = Vy.
Reference: CowGod
Able to handle input as referenced in CowGod
Does not handle input
Instructions in 0x3000
are run by the CPU and affect memory
Instruction prints to the screen
3xkk - SE Vx, byte
Skip next instruction if Vx = kk.
Full description: CowGod
When running the VM in a console, a simple display should be running to show the output the program is producing
Something like node-drawille but compatible with GPL I guess
Currently can't see any output from the programs.
Instructions in 0xD000
are run by CPU and have some effect
Instruction is printed to screen
Able to fill a register with a value
Stare longingly at registers hoping they do something
6xkk - LD Vx, byte - Set Vx = kk
Reference: CowGod
Packaged application so that cross-platform is available, simpler sharing, and built in features like ROM selection and loading.
Currently no display or easy way of running ROMs
A CLI (as originally planned in #1) only application has a host of issues from various terminal emulators to simple cross platform support. Going with electron would allow simple cross platform, additional features like ROM selection and loading, simpler state saving, and prettier graphics.
Create a buffer for the screen to use when rendering
Instructions in the 0x1000
are run by the CPU and have effects on memory
Prints out the instructions to the screen
1NNN Jump to address NNN
Full description: CowGod
Should create an object that shows the counts for each instruction
Prints each instruction to the screen as it runs
Each loop renders the display accurately
Nothing at all
Not going to be easy as blessedjs uses percentages but I want to use pixels.
Instructions in 0xA000
are run by CPU and have some effect
Instruction is printed to screen
Instructions in 0xB000
are run by CPU and have some effect
Instruction is printed to screen
Instructions in 0x2000
are run by the CPU and affect memory.
Nothing, nothing! Actually instruction prints to screen
2NNN Call subroutine at nnn.
Full description: CowGod
Instructions and number of times they are called. Completed ones are crossed out.
0nnn: 1
00EE: 1
1nnn: 12
2nnn: 3
3xkk: 7
4xkk: 7
6xkk: 34
7xkk: 10
8xy0: 6
8xy2: 4
8xy4: 3
8xy5: 5
Annn: 5
Cxkk: 1
Dxyn: 11
ExA1: 4
Fx07: 1
Fx15: 1
Fx18: 2
Fx29: 2
Fx33: 1
Fx65: 1
Handle input (Issue #2)
Make display do display things
Instructions in 0x7000
are run by CPU and have some effect
Instruction is printed to screen
7xkk - ADD Vx, byte - Set Vx = Vx + kk
Reference: CowGod
Instructions in 0x9000
are run by CPU and have some effect
Instruction is printed to screen
Instructions in 0x0000
are run by CPU and have some effect
Instruction is printed to screen
00E0 - CLS - Clear the display.
Reference: CowGod
00EE - RET - Return from a subroutine.
The interpreter sets the program counter to the address at the top of the stack, then subtracts 1 from the stack pointer.
Reference: CowGod
Instructions in 0x8000
are run by CPU and have some effect
Instruction is printed to screen
8xy0
LD Vx, Vy - Set Vx = Vy.
Stores the value of register Vy in register Vx.
8xy2
AND Vx, Vy - Set Vx = Vx AND Vy.
Performs a bitwise AND on the values of Vx and Vy, then stores the result in Vx. A bitwise AND compares the corrseponding bits from two values, and if both bits are 1, then the same bit in the result is also 1. Otherwise, it is 0.
8xy4
ADD Vx, Vy - Set Vx = Vx + Vy, set VF = carry.
The values of Vx and Vy are added together. If the result is greater than 8 bits (i.e., > 255,) VF is set to 1, otherwise 0. Only the lowest 8 bits of the result are kept, and stored in Vx.
8xy5
SUB Vx, Vy - Set Vx = Vx - Vy, set VF = NOT borrow.
If Vx > Vy, then VF is set to 1, otherwise 0. Then Vy is subtracted from Vx, and the results stored in Vx.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.