From 40eef69b01bdc63985f31373c54be43fd64045f7 Mon Sep 17 00:00:00 2001 From: Daniel Loffgren Date: Sat, 26 Sep 2015 20:09:27 +0000 Subject: [PATCH] Don't reset the keyboard register if set to not trap git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@61 64f78de7-aa59-e511-a0e8-0002a5492df0 --- apple1/pia.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apple1/pia.c b/apple1/pia.c index ce98cc3..4d3559f 100644 --- a/apple1/pia.c +++ b/apple1/pia.c @@ -116,7 +116,9 @@ uint8_t keyboardReadReadyCallback(struct _v6502_memory *memory, uint16_t offset, uint8_t keyboardReadCharacterCallback(struct _v6502_memory *memory, uint16_t offset, int trap, a1pia *context) { if (context->buf) { uint8_t a = a1CharFromAsciiChar(context->buf); - context->buf = '\0'; + if (trap) { + context->buf = '\0'; + } return a; }