ZXpand+ and Joystick...

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

ZXpand+ and Joystick...

Post by bola_dor »

Hi I tried to configure the ZXpand+ joystick with no success...
I've used the CONFIG "J=UDLRF" command and then load the games but it doesn't seem to work as I spect to..
It actually works if I test in BASIC for inkey$ but if I configure it to the keys spected by some game .. it just doesn't work..
Perhaps it is not supposed to work that way.. 🤔
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXpand+ and Joystick...

Post by mrtinb »

I think if the game uses the ROM routines for keyboard read, then it'll work. If the game has it's own keyboard routine, then it won't work.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

Re: ZXpand+ and Joystick...

Post by bola_dor »

mrtinb wrote: Sun Apr 11, 2021 9:44 am I think if the game uses the ROM routines for keyboard read, then it'll work. If the game has it's own keyboard routine, then it won't work.
:?
Do you mean BASIC games? Perhaps compiled BASIC ones?
What about z88dk?

Tried Omega Phenix and didn't work.. :cry:
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXpand+ and Joystick...

Post by mrtinb »

The ZXpand replaces the ROM with it's own ROM.

So the LOAD and SAVE commands are replaced with versions, where files are LOADed and SAVEd to the ZXpand's SD card. The COPY command to print a screenshot to the printer is totally removed, and replaced with CAT to display the content of SD card.

And the INKEY$ function is replaced with a version that also reads the joystick I/O port.

Now when someone creates a program in BASIC, it will always use the BASIC keywords which is replaced with other versions, when the ZXpand is active. So every program created in BASIC will work with ZXpand LOAD, SAVE, INKEY$ etc.

When someone creates a program in machine language, there are two options. They can call the LOAD, SAVE and INKEY$ in the ROM (which has been replaced with ZXpand versions). Or the machine language program can create their own code to read/write tape, and then the software won't work with the SD card, even though ZXpand is plugged in, and active. The same goes for reading the keyboard. The program can read the keyboard via the ROM, or by it's own code. If the keyboard is read via it's own code, the joystick functionality won't work, because it is bypassed by the program.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

Re: ZXpand+ and Joystick...

Post by bola_dor »

mrtinb wrote: Sun Apr 11, 2021 1:49 pm The ZXpand replaces the ROM with it's own ROM.

So the LOAD and SAVE commands are replaced with versions, where files are LOADed and SAVEd to the ZXpand's SD card. The COPY command to print a screenshot to the printer is totally removed, and replaced with CAT to display the content of SD card.

And the INKEY$ function is replaced with a version that also reads the joystick I/O port.

...
I see.
Very clear 👌
So any developer that wants to make it ZXpand Joystick compatible has to be aware of that... I guess this is well documented somewhere..

Thank you Martin. 😊
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ZXpand+ and Joystick...

Post by 1024MAK »

The ZXpand+ manual is here ;)

The relevant topic on here about the manual and questions/comments is here.

The manual for the earlier ZXpand (in PDF format) is here.
ZXpand manual wrote:Atari-style joystick adapter for specially written or modified games.
I think there is also a topic on here where use of the joystick functionality is discussed. But you will have to search for it.

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.
bola_dor
Posts: 398
Joined: Wed Oct 02, 2019 5:32 am

Re: ZXpand+ and Joystick...

Post by bola_dor »

Thanks Mark !!
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come :D
Post Reply