Page 2 of 3

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 3:37 pm
by sirmorris
mrtinb wrote: Tue Nov 14, 2017 3:08 pmSo if I use this routine in my program without ZXpand it will crash because I don't have ZXpand?
Yes, as configured it's calling a ZXpand specific ROM routine to get the joystick value. If this was to be made general purpose then a number of strategies could be used. The interface type could be detected at run-time, the joystick could be configured by the user either in code or in-game, or indeed removed completely. In fact going straight to the hardware would insulate the user from crashes and provide a useful default if no hardware was present.

As a general question to the wider community - would it seem more useful if code was plug and play or is it reasonable to assume that an end user would modify it to their needs?

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 3:49 pm
by mrtinb
I assumed joystick support on ZXpand was just sending keyboard keys thus not needing to call a specific ZXpand routine.

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 3:56 pm
by sirmorris
Aah I see. The joystick is separate from the keyboard.

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 3:58 pm
by Paul
sirmorris wrote: Tue Nov 14, 2017 3:37 pm As a general question to the wider community - would it seem more useful if code was plug and play or is it reasonable to assume that an end user would modify it to their needs?
I would guess that someone in the need of an input routine is a programmer...
So he/she/it would modify it to their needs.
For the less capable (me?) some examples would be helpful...
If you would add this to your commander, it would be helpful (in EO) if the cursor wouldn't jump several steps at once. I have to press it VERY VERY short to go up or down one line.
As far as I understand this routine could prevent this?

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 4:39 pm
by sirmorris
Hmm that's strange. In EO I get a noticeable pause before auto-repeat kicks in. Which version are you running? The latest is 2.0.

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 4:47 pm
by Paul
Out of the box eo 1.8 with commander 2.0

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 4:56 pm
by Moggy
sirmorris wrote: Tue Nov 14, 2017 1:08 pm :D Glad to see my trap worked first time Mark :lol:

If anyone wants to donate an interface for testing purposes..! ;)
I'll assume you missed it the first time. :D

@Charlie

If you genuinely need a j/stk interface I have a pukka Kempston speccy one and a no-name ZX81 interface with ZX81 edge connector, you can have with my blessings.
Never used them so have to guess they are ok.

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 5:11 pm
by sirmorris
email sent..!

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 8:48 pm
by 1024MAK
Moggy wrote: Tue Nov 14, 2017 4:56 pm
sirmorris wrote: Tue Nov 14, 2017 1:08 pm :D Glad to see my trap worked first time Mark :lol:

If anyone wants to donate an interface for testing purposes..! ;)
I'll assume you missed it the first time. :D

@Charlie

If you genuinely need a j/stk interface I have a pukka Kempston speccy one and a no-name ZX81 interface with ZX81 edge connector, you can have with my blessings.
Never used them so have to guess they are ok.
Testing a Kempston (or compatible) joystick interface using BASIC on a ZX Spectrum is easy. It's slightly more tricky on a Zeddy, as the program has to put a very short machine code routine in a line 1 REM line.

Mark

Re: DEV-SNIP #1 - Input

Posted: Tue Nov 14, 2017 9:04 pm
by Paul
1024MAK wrote: Tue Nov 14, 2017 8:48 pm Testing a Kempston (or compatible) joystick interface using BASIC on a ZX Spectrum is easy. It's slightly more tricky on a Zeddy, as the program has to put a very short machine code routine in a line 1 REM line.

Mark
Or you use PowerBasic from. Math123