More game controller code.

Fill in more of the blanks.

Signed-off-by: Paul Brook <paul@nowt.org>
Merge branch 'gamecontroller'