DEV-SNIP #1 - Input

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
sirmorris
Posts: 2664
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: DEV-SNIP #1 - Input

Post by sirmorris » Tue Nov 14, 2017 2:37 pm

mrtinb wrote:
Tue Nov 14, 2017 2:08 pm
So 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?
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
mrtinb
Posts: 505
Joined: Fri Nov 06, 2015 4:44 pm
Location: Denmark
Contact:

Re: DEV-SNIP #1 - Input

Post by mrtinb » Tue Nov 14, 2017 2:49 pm

I assumed joystick support on ZXpand was just sending keyboard keys thus not needing to call a specific ZXpand routine.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
sirmorris
Posts: 2664
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: DEV-SNIP #1 - Input

Post by sirmorris » Tue Nov 14, 2017 2:56 pm

Aah I see. The joystick is separate from the keyboard.
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
Paul
Posts: 860
Joined: Thu May 27, 2010 7:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post by Paul » Tue Nov 14, 2017 2:58 pm

sirmorris wrote:
Tue Nov 14, 2017 2: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.

User avatar
sirmorris
Posts: 2664
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: DEV-SNIP #1 - Input

Post by sirmorris » Tue Nov 14, 2017 3:39 pm

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.
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
Paul
Posts: 860
Joined: Thu May 27, 2010 7:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post by Paul » Tue Nov 14, 2017 3:47 pm

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: 1505
Joined: Wed Jun 18, 2008 1:00 pm

Re: DEV-SNIP #1 - Input

Post by Moggy » Tue Nov 14, 2017 3:56 pm

sirmorris wrote:
Tue Nov 14, 2017 12: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.

User avatar
sirmorris
Posts: 2664
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: DEV-SNIP #1 - Input

Post by sirmorris » Tue Nov 14, 2017 4:11 pm

email sent..!
--=== ZXpand+ ... A more moderner all-in-one upgrade solution for ZX81 ===--
* SD/MMC storage * 32K Hires-capable RAM * AY sound chip * Joystick port * Serial *
* BASIC enhancements - plug & play * Reset button * Auto-boot facility *

User avatar
1024MAK
Posts: 1768
Joined: Mon Sep 26, 2011 9:56 am
Location: Looking forward to summer in Somerset, UK...

Re: DEV-SNIP #1 - Input

Post by 1024MAK » Tue Nov 14, 2017 7:48 pm

Moggy wrote:
Tue Nov 14, 2017 3:56 pm
sirmorris wrote:
Tue Nov 14, 2017 12: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

User avatar
Paul
Posts: 860
Joined: Thu May 27, 2010 7:15 am
Location: Germanys west end

Re: DEV-SNIP #1 - Input

Post by Paul » Tue Nov 14, 2017 8:04 pm

1024MAK wrote:
Tue Nov 14, 2017 7: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

Who is online

Users browsing this forum: No registered users and 1 guest