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 whether that pixel is on or off. so now I loop through that array to get that 64 bit row. Issue is I only want to xor the 8 bits corresponding to the xcordinate and after it. Not the whole 64 bit row just the xcordinate and the 7 bits after it with the sprite byte that I have.
This is my code so far for it.
for(int i = 0; i < num_bytes; i++)
{
byte byte_to_draw = memory[registers->I + i];
for(int j = 0; j < 8; j++)
{
// 64 bit number each bit representing on or off
uint64_t current_row = screen[register_value_y - i];
// I want to xor here
}
}