SuperVingo

2. CPU Specification 본문

Emulator[에뮬레이터]/CHIP-8

2. CPU Specification

SuperVingo 2024. 6. 4. 09:49
728x90

CHIP-8

 

Memory - 4KB

0x000 ~ 0x1FF -> Interpreter, Reserved, Hex Font 
0x200 ~ 0xFFF -> Programs, PC will start in 0x200

 

Hex Font는 0부터 F까지 3x5 크기의 문자를 저장해둔 것이다.

 

CPU 

 

General Purpose Register V0 - V16

// General Purpose Registers
unsigned char V[16];

 

Index Register I

// Index Register
unsigned short I;

Program Counter

// Program Counter
unsigned short pc;
unsigned short opcode;

 

Stack

// Stack and Stack Pointer
unsigned short stack[16];
unsigned short sp;

 

Timer Register - Sound / Delay

// Timer Registers
unsigned char delay_timer;
unsigned char sound_timer;

 

그래픽 관련

// Graphics
unsigned char gfx[64 * 32];
bool drawFlag;

 

CHIP-8은 가로 64픽셀, 세로 32 픽셀의 스크린을 사용한다.

 

KeyPad

//KeyPad
unsigned char key[16];

 

Instructions 

http://devernay.free.fr/hacks/chip8/C8TECH10.HTM

728x90

'Emulator[에뮬레이터] > CHIP-8' 카테고리의 다른 글

4. Graphic 관련 - GLUT  (0) 2024.06.06
3. CPU Implementation Code  (0) 2024.06.05
1. 에뮬레이터 코드 흐름  (0) 2024.06.03
0. CHIP-8 에뮬레이터 제작  (0) 2024.06.02