Always make sure the keyboard buffer is also cleared, to prevent garbage being captured on start

git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@68 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
Daniel Loffgren 2015-12-10 05:08:13 +00:00
parent 39b525ae71
commit 0c661a6ebb
1 changed files with 2 additions and 1 deletions

View File

@ -129,7 +129,8 @@ a1pia *pia_create(v6502_memory *mem) {
a1pia *pia = malloc(sizeof(a1pia));
pia->memory = mem;
pia->screen = NULL;
pia->buf = '\0';
assert(v6502_map(mem, A1PIA_KEYBOARD_INPUT_REGISTER, 1, (v6502_readFunction *)keyboardReadCharacterCallback, NULL, pia));
assert(v6502_map(mem, A1PIA_KEYBOARD_READY_REGISTER, 1, (v6502_readFunction *)keyboardReadReadyCallback, NULL, pia));
assert(v6502_map(mem, A1PIA_VIDEO_OUTPUT_REGISTER, 1, FIXME_I_SHOULDNT_BE_NULL, (v6502_writeFunction *)videoWriteCharCallback, pia));