From d9527db033d7e2736f2e1afa35c9ec20628b8c4d Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Fri, 5 Jan 2018 16:15:13 -0600 Subject: [PATCH] Retrieve the 16-bit PC address. This fixes a bug where we only got an 8-bit address from $FFFC and ignored the LSB at $FFFD. --- src/apple2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apple2.c b/src/apple2.c index 55bf588..c56fc9e 100644 --- a/src/apple2.c +++ b/src/apple2.c @@ -200,7 +200,7 @@ void apple2_reset(apple2 *mach) { mach->cpu->P = MOS_INTERRUPT; - mach->cpu->PC = (vm_16bit)vm_segment_get(mach->memory, 0xFFFC); + mach->cpu->PC = vm_segment_get16(mach->memory, 0xFFFC); mach->cpu->S = 0; }