1
0
mirror of https://github.com/jborza/emu6502.git synced 2024-07-10 21:28:56 +00:00
emu6502/cpu.c
2019-04-13 22:00:37 +02:00

18 lines
343 B
C

#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;
}