Reading — step 1 of 5
Read
~1 min readCHIP-8 Architecture
Registers & Memory
CHIP-8 state:
python
Loading a ROM:
python
Programs are positioned at 0x200 (everything below was the original interpreter).
Font set: predefined 80 bytes representing characters 0-F (4x5 pixel sprites).
python
Loaded at 0x50. Used to display hex digits via instruction FX29.
Stack:
- 16 entries deep (some implementations 12).
- Used by CALL/RETURN.
- Overflow → undefined; emulators typically ignore or wrap.
Timers:
- Decremented at 60 Hz independent of CPU cycles.
- When sound_timer > 0: beep.
- Hardware-clocked; emulator uses real-time clock.
Endianness: all multi-byte values big-endian. First byte = high.
Wrapping: registers are 8-bit. Arithmetic wraps mod 256. VF often = carry/borrow flag.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…