Writing Pong for CHIP-8, the 1977 virtual machine

Started by Cass_30, Today at 09:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Topic: Writing Pong for CHIP-8, the 1977 virtual machine   Views(Read 61 times)
Active members in this topic:
Cass_30(1)

Cass_30

A classic game has been rebuilt for a very old virtual machine. Hackaday covers a project that recreates Pong for CHIP-8, a virtual machine created by Joseph Weisbecker for RCA's COSMAC VIP computer, which had 2KB of RAM and a 64 by 32 pixel display

CHIP-8 draws graphics using XOR, which sets the VF register when sprites collide. That collision flag is how the game detects when the ball hits a paddle

Sixty hertz timers pace the game at about 30 frames per second. Ball angles use integer counters, such as moving one pixel up for every eleven across to make a five degree angle

The game was written in Octo, and the source code is on GitHub. It can be played in a web browser

CHIP-8 is a favourite starting point for anyone learning how emulators and low level programming work. Writing Pong with such tight limits is a great exercise in clever thinking. Being playable in a browser makes it easy for anyone to try

Have you written code for CHIP-8 or another old system? And what makes retro programming so appealing?