This is a series of posts in which I analyse the Chip-8 interpreter as implemented on the RCA COSMAC VIP. They are primarily intended to be of use to anyone writing a Chip-8 interpreter for another platform. However, they will also be of use to anyone wanting to know more about the COSMAC VIP in general.
I already have the existing posts indexed by article. I thought it would be useful to also have the articles indexed by Chip-8 instruction, so here is the list:
Instruction | Description | Relevant Articles |
---|---|---|
0XXX | Calls a machine code subroutine at the address 0x0XXX | Machine Code Integration |
00E0 | Clears the screen | Machine Code Integration |
00EE | Returns from a subroutine | Machine Code Integration |
1XXX | Branches to the instruction at address 0x0XXX | Branch and Call Instructions |
2XXX | Calls a subroutine at address 0x0XXX | Branch and Call Instructions |
3XNN | Skip if VX = NN | Skip Instructions |
4XNN | Skip if VX ≠ NN | Skip Instructions |
5XY0 | Skip if VX = VY | Skip Instructions |
6XNN | Load VX with NN | Loading and Saving Variables |
7XNN | Add NN to VX | Arithmetic and Logic Instructions |
8XY1 | OR VY with VX | Arithmetic and Logic Instructions |
8XY2 | AND VY with VX | Arithmetic and Logic Instructions |
8XY3 | XOR VY with VX | Arithmetic and Logic Instructions |
8XY4 | Add VY to VX, load VF with carry bit | Arithmetic and Logic Instructions |
8XY5 | Subtract VY from VX, load VF with carry bit | Arithmetic and Logic Instructions |
8XY6 | Shift VY one bit right, load VX with result, load VF with bit 0 | Arithmetic and Logic Instructions |
8XY7 | Subtract VX from VY, load VX with result | Arithmetic and Logic Instructions |
8XYE | Shift VY one bit left, load VX with result, load VF with bit 7 | Arithmetic and Logic Instructions |
9XY0 | Skip if VX ≠ VY | Skip Instructions |
AMMM | Load I with the address 0MMM | Loading and Saving Variables |
BXXX | Branch to the address calculated by adding 0x0XXX to Chip-8 variable V0 | Branch and Call Instructions |
CXNN | Load VX with a random number from 0 to 255 ANDed with NN | Interrupts |
DXYN | Draw the N byte sprite stored at the address pointed to by I on the display at location X and Y. Set VF to 0×01 if any set pixel in the sprite overwrites an existing set pixel on the display, otherwise set VF to 0×00 | Interrupts |
EX9E | Skip if VX = current key press | Skip Instructions |
EXA1 | Skip if VX ≠ current key press | Skip Instructions |
FX07 | Get the current value of the timer into VX | Interrupts |
FX0A | Wait for a keypress and store the value in VX | Interrupts |
FX15 | Set the timer with the value of VX | Interrupts |
FX18 | Set the sound timer with the value in VX | Interrupts |
FX1E | Add value in VX to I | Indexing the Memory |
FX29 | Load I with address of sprite for the character in VX | The Character Set |
FX33 | Store the BCD representation of the value in VX at I, I+1 and I+2 | Binary Coded Decimal |
FX55 | Save variables V0 through VX starting at the address in I | Loading and Saving Variables |
FX65 | Load variables V0 through VX from memory starting at the address in I | Loading and Saving Variables |
Here is a PDF with the complete CHIP-8 Interpreter Disassembly.
By Chip-8 on the COSMAC VIP: Sound | Laurence Scotford October 9, 2013 - 9:25 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Keyboard Input | Laurence Scotford October 9, 2013 - 9:25 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: The General Purpose Timer | Laurence Scotford October 9, 2013 - 9:26 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Drawing Sprites | Laurence Scotford October 9, 2013 - 9:26 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Generating Random Numbers | Laurence Scotford October 9, 2013 - 9:27 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Interrupts | Laurence Scotford October 9, 2013 - 9:27 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Arithmetic and Logic Instructions | Laurence Scotford October 9, 2013 - 9:27 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Loading and Saving Variables | Laurence Scotford October 9, 2013 - 9:28 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Skip Instructions | Laurence Scotford October 9, 2013 - 9:28 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Branch and Call Instructions | Laurence Scotford October 9, 2013 - 9:28 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Machine Code Integration | Laurence Scotford October 9, 2013 - 9:29 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: The Call Routine (Fetch and Decode) | Laurence Scotford October 9, 2013 - 9:29 pm
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Initialisation | Laurence Scotford October 9, 2013 - 9:30 pm
[…] For other posts in this series, refer to the index or instruction index. […]
By Chip 8 RAM (or memory management with Chip 8) | Laurence Scotford October 9, 2013 - 9:30 pm
[…] For other posts in this series, refer to the index or instruction index. […]
By 1802 Overture | Laurence Scotford October 9, 2013 - 9:31 pm
[…] For other posts in this series, refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Indexing the Memory | Laurence Scotford October 10, 2013 - 5:52 am
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: The Character Set | Laurence Scotford October 12, 2013 - 11:54 am
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]
By Chip-8 on the COSMAC VIP: Binary Coded Decimal | Laurence Scotford October 19, 2013 - 11:16 am
[…] This is part of a series of posts analysing the Chip-8 interpreter on the RCA COSMAC VIP computer. These posts may be useful if you are building a Chip-8 interpreter on another platform or if you have an interest in the operation of the COSMAC VIP. For other posts in the series refer to the index or instruction index. […]