Sunday, 18 December 2016

Oh the joy!

I've had a few requests to add joystick support to the Coco3 port of Lode Runner. Since I've now had experience writing a joystick input routine for Knight Lore, and the fact that the Sega Gamepad Adapter brings digital joysticks to the Coco - and perhaps more importantly, 2 buttons - I thought I'd go ahead and do it.

In the spirit of the original port, rather than forge ahead and blindly add joystick code to the Coco3 version, I first need to analyse the Apple II code so that I may implement the reads in the same code paths/locations as the original. Easier said than done, considering I never commented the joystick input routines - mainly because I have no idea how the Apple II reads the joystick. Time for more research on the matter...

UPDATE: I've now commented the joystick input routines. It should be fairly trivial now to add the routines from Knight Lore... although it may affect the timing of the game slightly; if it needs tweaking it's a single direct-mode operand in a delay loop. For authenticity I will also add the controls for enabling/disabling the keyboard & joystick (^K and ^J respectively).

I also have a funny feeling that at least one of the Coco3 buttons is already (ghost) mapped to a keyboard control. That will be a PITA if it is.

And whilst I'm dealing with Lode Runner; there are several reports of it crashing on certain (Coco3) hardware configurations. Basically, it either runs, or it doesn't. And now the possibility of GIME revision and/or DRAM speed being a factor have been thrown into the ring. Fun...

No comments:

Post a Comment