Questions tagged [chip-8]

Use this tag to refer about the interpreted programming language CHIP-8 designed to make video-game programming easier and developed originally for 8-bit microcomputers by Joseph Weisbecker in the mid-1970s.

31 questions
1
vote
1 answer

FX0A opcode in chip 8 (Waiting for a keypress). if a key is already pressed, do I need to consider it a keypress?

The description of the opcode FX0A is: Wait for a keypress and store the result in register VX My question is if a key is already pressed while the opcode is called, is it considered a keypress? Or will it not be considered a keypress until the key…
Tom
  • 129
  • 2
  • 8
1
vote
1 answer

Chip-8 Emulator: slow down clock speed

I'm planning to write a nes emulator. But first, to understand how emulation works, I'll write a Chip-8 emulator. The emulator is nearly finished. I've some bugs in games, but this will be fixed soon. My problem number 1 is to synchronize the…
user3149497
  • 67
  • 1
  • 8
0
votes
1 answer

Pyglet not registering key presses unless I import keyboard module in my Python Chip-8 emulator even though it's not being used

Background I'm working on a Python chip-8 emulator Chipy. And I'm using Pyglet to display sprites and handle keypresses. The way I implemented the screen and keyboard functions are in separate files but in the same module, as follow. screen.py from…
K450
  • 691
  • 5
  • 17
0
votes
1 answer

Passing custom color to FPSDisplay in pyglet

Context I am working on a chip 8 emulator using Python and for the display/screen, I am using the pyglet library. However, I have the pyglet window implemented in a class. Here is the basic code structure of the class I implemented for the screen of…
K450
  • 691
  • 5
  • 17
0
votes
0 answers

Having trouble implementing draw instruction in chip8 emulator

Hello everyone so basically im creating a chip8 emulator and im having a bit of trouble implementing the draw instruction. the chip 8 has a screen of 64x32 i have a array of size 32 of uint64_t. chip 8 uses a monochrome display where each bit is…
lizardcoder
  • 336
  • 3
  • 6
0
votes
0 answers

Chip 8 Emulator 16 bit memory but only 12 bit memory acces?

I am making a Chip 8 emulator and i ran into a problem. Chip 8 has 4kb of ram (you normally acces the ram with 16 bit adresses). the jump operation defines where to jump with 12 bits. How are you supposed to set the Instruction Pointer to for…
user16333894
0
votes
2 answers

C++ write to stringstream not working properly

I've been making an assembler for the CHIP-8 these days, and today I tried implementing arguments for the opcodes to work properly. However, when I have to write 2 arguments to complete the opcode, I have this code: // Chip8Instruction is a struct…
0
votes
1 answer

How to wait an input without stop the program in Xlib

The problem is this, I, am writing a chip 8 emulator in C, and i am using a library that use Xlib, for writing sprites attending input etc, the method that the library have for wait an input is this: char gfx_wait(){ XEvent…
user11953792
0
votes
0 answers

CHIP-8 emulator fails to render graphics as expected

I've been trying to write a CHIP-8 emulator as a personal project, and I've got stuck on implementing it's graphics. As of now I'm trying to implement the framebuffer as an array of 8 bit elements, where the value of each element should be either 1…
0
votes
0 answers

Chip8 Emulator Bug

I am creating a Chip8 emulator using JavaScript, and I've got it pretty much done. The problem is, it works for the first few seconds, and then gets stuck in an infinite loop of opcodes, and never breaks out. Check it out:…
Kento Nishi
  • 578
  • 1
  • 9
  • 24
0
votes
1 answer

CHIP-8 SDL rendering problems

I have coded a chip-8 emulator.Whatever I do, it seems that I cannot show any pixels on the screen.The weird thing is that I have checked the code, top-bottom for 2 days already, and there does not seem to be any problem.It reads the .rom file into…
J.Doe
  • 21
  • 2
  • 6
0
votes
1 answer

What does 'return from subroutine' mean?

I'm trying to build my first ever CHIP-8 emulator from scratch using C. While writing necessary code for the instructions, I came across this opcode: 00EE - RET Return from a subroutine. The interpreter sets the program counter to the address at…
Joshua Jang
  • 107
  • 2
  • 10
0
votes
1 answer

Flickering 2D Texture using GLUT and C

I'm trying my hand at making a chip8 emulator using just plain C. I got most of the opcodes set so I just need to work on the display. I decided on using GLUT for the display since it appeared quick setup. The main idea is to display the chip8…
Nike Adeyemi
  • 51
  • 1
  • 5
0
votes
1 answer

GDB does not display full backtrace

I am writing a CHIP-8 interpreter in C++ with SDL2. The source code is at https://github.com/robbie0630/Chip8Emu. There is a problem where it gets a segmentation fault with this ROM. I tried to debug the problem with GDB, but when I type bt, it…
robbie
  • 1,219
  • 1
  • 11
  • 25
0
votes
1 answer

Collision detection on chip8 emulator

I made a chip8 emulator, but ran into some problems with detecting collision when drawing. Chip8 draws onto the screen by XOR'ing individual pixels onto the screen, and setting a flag if a pixel is turned off. My code is as follows: _DXYN:…
Ivan Chub
  • 442
  • 3
  • 13