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?
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?
In theory, there is no difference between theory and practice. But, in practice, there is.
sirmorris wrote: ↑Tue Nov 14, 2017 1:08 pm
Glad to see my trap worked first time Mark
If anyone wants to donate an interface for testing purposes..!
I'll assume you missed it the first time.
@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.
sirmorris wrote: ↑Tue Nov 14, 2017 1:08 pm
Glad to see my trap worked first time Mark
If anyone wants to donate an interface for testing purposes..!
I'll assume you missed it the first time.
@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.
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
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
In theory, there is no difference between theory and practice. But, in practice, there is.