Explain to the user what is happening when the debugger steps over the keyboard data register. Before this only the readiness register would alert the debugger user.

git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@69 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
Daniel Loffgren 2015-12-10 05:23:16 +00:00
parent 0c661a6ebb
commit 552fb8fcc2
1 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,14 @@ uint8_t keyboardReadReadyCallback(struct _v6502_memory *memory, uint16_t offset,
}
uint8_t keyboardReadCharacterCallback(struct _v6502_memory *memory, uint16_t offset, int trap, a1pia *context) {
// This means we are in the debugger, but the CPU actually stepped over an instruction (rather than a tool peeking at memory)
if (context->suspended && trap) {
printf("Keyboard register ($D010) read.\n");
printf("Buffered character was #$%02x, now empty.\n", a1CharFromAsciiChar(context->buf));
fflush(stdout);
crmode();
}
if (context->buf) {
uint8_t a = a1CharFromAsciiChar(context->buf);
if (trap) {