Mercurial > repos > simple16
diff src/cpu.c @ 26:083347ccd508
Implemented vblank interrupts and fixed a bug in exception vector address calculation
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 01 Apr 2016 21:34:38 -0700 |
parents | fb14515266f4 |
children | 5683d9ba9acc |
line wrap: on
line diff
--- a/src/cpu.c Thu Mar 31 23:25:52 2016 -0700 +++ b/src/cpu.c Fri Apr 01 21:34:38 2016 -0700 @@ -129,7 +129,7 @@ context->exception_pc = context->regs[REG_PC] - 2; context->exception_sr = context->regs[REG_SR]; context->regs[REG_SR] &= ~(STATUS_INT0_ENABLE | STATUS_INT1_ENABLE); - context->regs[REG_PC] = cpu_read_16(context, context->vector_base + context->exception); + context->regs[REG_PC] = cpu_read_16(context, context->vector_base + context->exception * 2); context->state = STATE_NEED_FETCH; }