Pages

Saturday, 9 April 2016

Phantom keys

No updates reflect the fact that I've had very little time to work on Knight Lore, and even less time to blog about it. I can say that I've got (2-button) joystick input working, after rolling my own joystick routines.

I've been optimising the code from the cocopedia article, moving much of it into a one-off initialisation. In fact it makes supporting either the left or the right joystick at run-time trivial (as-is it's a simple .define build option). The sampling routine now only needs to select the axis, write the sound register (twice) and read back the comparator output (twice). Repeat for 2nd axis.

One issue is the button reading, and the phantom key presses that result. I've still got some research on that to do, and I think I know how to avoid the problem (in Knight Lore) whilst retaining the current key mapping. Once it's all working I'll post my joystick initialisation and sampling routines and (hopefully) explain how I negated the phantom key press issue.

2 comments:

  1. I'm interested how quick your new joystick routine is.

    The ROM routine is exceptionally slow on the first run, but subsequent runs takes 25 scanlines (in slow mode).

    ReplyDelete
  2. Once it's working 100% and tested on real hardware I'll post through code snippet here.

    ReplyDelete