DEV-SNIP #1 - Input

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: DEV-SNIP #1 - Input

Post 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?
User avatar
mrtinb
Posts: 1905
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: DEV-SNIP #1 - Input

Post by mrtinb »

I assumed joystick support on ZXpand was just sending keyboard keys thus not needing to call a specific ZXpand routine.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: DEV-SNIP #1 - Input

Post by sirmorris »

Aah I see. The joystick is separate from the keyboard.
User avatar
Paul
Posts: 1506
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post 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?
In theory, there is no difference between theory and practice. But, in practice, there is.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: DEV-SNIP #1 - Input

Post 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.
User avatar
Paul
Posts: 1506
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post by Paul »

Out of the box eo 1.8 with commander 2.0
In theory, there is no difference between theory and practice. But, in practice, there is.
Moggy
Posts: 3222
Joined: Wed Jun 18, 2008 2:00 pm

Re: DEV-SNIP #1 - Input

Post 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.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: DEV-SNIP #1 - Input

Post by sirmorris »

email sent..!
User avatar
1024MAK
Posts: 5087
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: DEV-SNIP #1 - Input

Post 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
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: 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.
User avatar
Paul
Posts: 1506
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post 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
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply