Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
9 user(s) are online (5 user(s) are browsing encyclopedia)

Members: 0
Guests: 9

more...
partner

CHIP-8

CHIP-8 is an interpreter (computing) programming language that was used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 computer program are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for said computers.

Roughly twenty years after CHIP-8 was introduced, derived interpreters appeared for some models of graphing calculators (from the late 1980s onward, these handheld devices in many ways have more computing power than most mid-1970s microcomputers for hobbyists).

=CHIP-8 applications=

There are a number of classic video games ported to CHIP-8, such as Pong, Space Invaders, Tetris, and Pac-Man. There s also a random maze generator available. These programs are reportedly placed in the public domain, and can be easily found on the Internet.

=CHIP-8 today=

There is a CHIP-8 implementation for almost every platform imaginable as of 2005, as well as some development tools. Despite this, there is a small number of games for the CHIP-8. Perhaps this is because many people view the CHIP-8 as a good first emulator project, and because of that, many CHIP-8 implementations have appeared.

CHIP-8 has a descendant called SCHIP (Super Chip). In 1990, a CHIP-8 interpreter called CHIP-48 was made for HP-48 graphing calculators so that games could be programmed more easily. It s extensions to CHIP-8 are what became known as SCHIP. It features a larger resolution and several additional opcodes which make programming easier. If it were not for the development of the CHIP-48 interpreter, CHIP-8 would not be as well known today.

=Virtual machine description=

==Memory==

CHIP-8 s Memory address range from 200h to FFFh, making for 3,584 bytes. The reason for the memory starting at 200h is that on the Cosmac VIP and Telmac 1800, the first 512 bytes are reserved for the Interpreter (computing).

==Registers==

CHIP-8 has 16 8-Bit data processor register named from V0 to VF. The VF register doubles as a Status register.

The address register, which is named I, is 16 bits wide and is used with several Opcodes that involve memory operations.

==The stack==

The stack (computing) is only used to store return addresses when Subroutines are called. It is unknown how deep the stack was on the original implementations, but modern implementations normally have at least 16 levels.

==Timers==

CHIP-8 has two timers. They both count down at 60 hertz, until they reach 0.

*Delay timer: This timer is intended to be used for timing the events of games. Its value can be set and read. *Sound timer: This timer is used for sound effects. When its value is nonzero, a beeping sound is made.

==Input==

Input is done with a hexadecimal computer keyboard that has 16 keys which range from 0 to F. The 8 , 4 , 6 , and 2 keys are typically used for directional input. Three opcodes are used to detect input. One skips an instruction if a specific key is pressed, while another does the same if a specific key is not pressed. The third waits for a key press, and then stores it in one of the data registers.

==Graphics and sound==

Display resolution is 64×32 Pixels, and color is monochrome. Graphics are drawn to the screen soley by drawing sprite (computer science)s, which are 8 pixels wide and may be from 1 to 15 pixels in height. Sprite pixels that are set flip the color of the corresponding screen pixel, while unset sprite pixels do nothing. The carry flag (VF) is set to 1 if any screen pixels are flipped from set to unset when a sprite is drawn.

As previously described, a beeping sound is played when the value of the sound timer is nonzero.

==Opcode table==

CHIP-8 has 35 Opcodes, which are all two bytes long. They are listed below, in hexadecimal and with the following symbols: *NNN: address *NN: 8-bit constant *N: 4-bit constant *X and Y: registers