Page 1 of 1

ZXpand+ and Joystick...

Posted: Sat Apr 10, 2021 11:55 pm
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.. 🤔

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 9:44 am
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.

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 1:33 pm
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:

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 1:49 pm
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.

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 3:07 pm
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. 😊

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 3:32 pm
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

Re: ZXpand+ and Joystick...

Posted: Sun Apr 11, 2021 4:01 pm
by bola_dor
Thanks Mark !!