Skip to content

LucasUTNFRD/chip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Technical Specifications of the Chip-8

The sources provide a detailed overview of the technical specifications of the Chip-8 system:

  • Display: A monochrome (black and white) display with a resolution of 64x32 pixels.
  • Graphics: Graphics are rendered using sprites, which are always 8 pixels wide and can be from 1 to 16 pixels tall. Sprites are drawn to the screen by specifying their (x, y) coordinates. The Chip-8 does not automatically clear the screen; instead, the screen state persists, and new sprites are drawn onto it.
  • RAM: While there's no standard amount of RAM for the Chip-8, most emulators allocate 4 KB (4096 bytes). The entire game program is loaded into RAM, starting at address 0x200 (512 decimal), leaving the first 512 bytes for system use and font sprite data.
  • Registers:
    • General Purpose: The Chip-8 has 16 8-bit general-purpose registers, labeled V0 to VF. These registers can be used to store data values and are frequently used in arithmetic and logical operations.
    • VF Register: The VF register serves a dual purpose. In addition to being a general-purpose register, it also acts as a flag register, indicating overflow or carry in arithmetic operations.
    • I Register: A 16-bit register called the I register is used as a memory pointer, often used to point to the location of sprites in RAM.
    • Program Counter (PC): A 16-bit register that holds the memory address of the next instruction to be executed. It's automatically incremented after each instruction unless a jump or subroutine call instruction modifies it.
  • Stack: A 16-level stack, typically holding 16-bit values. The stack is primarily used for subroutine calls and returns. When a subroutine is called, the current PC is pushed onto the stack, and when the subroutine returns, the PC is popped from the stack, ensuring the program resumes from the correct location.
  • Timers: The Chip-8 includes two special-purpose timers:
    • Delay Timer: An 8-bit timer that decrements at a rate of 60 Hz. It's often used for timing game events.
    • Sound Timer: Also an 8-bit timer that decrements at 60 Hz. When it reaches zero, it triggers a beep sound.
  • Input: The Chip-8 supports input from a 16-key keypad, typically arranged in a 4x4 grid.
  • Instruction Set: The Chip-8 has a simple instruction set with only 35 opcodes. Each opcode is 2 bytes long and often includes parameters within the opcode itself, specifying registers, memory addresses, or immediate values.

The sources also highlight that the Chip-8 was not originally a physical system and that some aspects, such as the exact amount of RAM, were not strictly defined. Modern emulators, however, generally adhere to the conventions outlined above.

About

yet another chip8 emu in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages