Last updated on 2021-05-31
So the next thing could be an Chip-8 emulator runinng on a medium sized Atmega.
CHIP-8 is an interpreted programming language, developed by the late Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for said computers.
CHIP-8’s memory addresses 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. On those machines, the uppermost 256 bytes (F00h-FFFh on a 4K machine) were reserved for display refresh, and the 96 bytes below that (EA0h-EFFh) were reserved for the call stack, internal use, and the variables.
CHIP-8 has 16 8-bit data registers named from V0 to VF. The VF register doubles as a carry flag.
The address register, which is named I, is 16 bits wide and is used with several opcodes that involve memory operations.
The stack is only used to store return addresses when subroutines are called. The original 1802 version allocated 48 bytes for up to 12 levels of nesting; modern implementations normally have at least 16 levels.
CHIP-8 has two timers. They both count down at 60 hertz, until they reach 0.
There are two version of the platform, the Chip-8 and schip (Super Chip). The biggest difference is the display size.
Super Chip 128×64
But most import it has some decent games:
I found some ugly c code code here, cleaned it up and made an SDL version on OS X.
Comments are closed, but trackbacks and pingbacks are open.