1
0
mirror of https://github.com/jborza/emu6502.git synced 2024-07-05 18:29:12 +00:00
emu6502/cpu.c

18 lines
343 B
C
Raw Normal View History

2019-04-13 20:00:37 +00:00
#include "state.h"
#include "cpu.h"
void* unimplemented_instruction(State6502* state) {
printf("Error: unimplemented instruction\n");
exit(1);
}
int emulate_6502_op(State6502* state) {
byte* opcode = &state->memory[state->pc];
switch (*opcode) {
//...
default:unimplemented_instruction(state); break;
}
state->pc += 1;
return 0;
}