Page 5 of 8

Re: MSX Inbound!!

Posted: 07 Feb 2022 18:51
by PhilC
Great to hear you getting on well with the msx @rubber_jonnie

Re: MSX Inbound!!

Posted: 07 Feb 2022 19:20
by mrbombermillzy
rubber_jonnie wrote: 07 Feb 2022 18:48
@mrbombermillzy it turns out that it is analog, but when reading the stick, all I get are values from the 8 corners and trigger.

Wondering if there is a way of reading the analog values?
Not having ever had an MSX, or indeed knowing how MSX BASIC handles the joystick input, I would hazard a guess that the BASIC read command you are using actually reads the POTX/Y and if below or = 127, it's off if >127 it's on. (I'm also guessing that it has an 8-bit ADC in there).

Don't know if there's another way of reading the joystick from BASIC? :shrug:

Re: MSX Inbound!!

Posted: 07 Feb 2022 19:37
by rubber_jonnie
PhilC wrote: 07 Feb 2022 18:51 Great to hear you getting on well with the msx @rubber_jonnie
It really is a very nice machine :)

Re: MSX Inbound!!

Posted: 07 Feb 2022 19:40
by rubber_jonnie
mrbombermillzy wrote: 07 Feb 2022 19:20
rubber_jonnie wrote: 07 Feb 2022 18:48
@mrbombermillzy it turns out that it is analog, but when reading the stick, all I get are values from the 8 corners and trigger.

Wondering if there is a way of reading the analog values?
Not having ever had an MSX, or indeed knowing how MSX BASIC handles the joystick input, I would hazard a guess that the BASIC read command you are using actually reads the POTX/Y and if below or = 127, it's off if >127 it's on. (I'm also guessing that it has an 8-bit ADC in there).

Don't know if there's another way of reading the joystick from BASIC? :shrug:
I honestly don't know enough at present, as other than the STICK() and STRIG() commands, I am unfamiliar with the inner workings of MSX Basic. I need to dig out a manual, see what the options are.

Re: MSX Inbound!!

Posted: 07 Feb 2022 20:18
by mrbombermillzy
Had a quick look for you :)


It seems that an analog stick on an MSX is not a very commonly supported thing, so try the BASIC commands Pad(17) and Pad(18) for joystick port 1 and Pad(17) and Pad(18) for port 2 to get paddle values (offset x/y -128 to +127). This should work.

If not, you may have to get dirty in that old Z80 ASM code.

Re: MSX Inbound!!

Posted: 07 Feb 2022 20:51
by stephen_usher
:dualthumbup:

Glad it's working. :-)

Re: MSX Inbound!!

Posted: 07 Feb 2022 21:25
by rubber_jonnie
mrbombermillzy wrote: 07 Feb 2022 20:18 Had a quick look for you :)


It seems that an analog stick on an MSX is not a very commonly supported thing, so try the BASIC commands Pad(17) and Pad(18) for joystick port 1 and Pad(17) and Pad(18) for port 2 to get paddle values (offset x/y -128 to +127). This should work.

If not, you may have to get dirty in that old Z80 ASM code.
Oooh thanks, I'll try that when I get the joystick reassembled.

Re: MSX Inbound!!

Posted: 07 Feb 2022 21:26
by rubber_jonnie
stephen_usher wrote: 07 Feb 2022 20:51 :dualthumbup:

Glad it's working. :-)
Very impressed with the build quality, no wonder they were expensive.

Re: MSX Inbound!!

Posted: 09 Feb 2022 14:39
by rubber_jonnie
mrbombermillzy wrote: 07 Feb 2022 20:18 Had a quick look for you :)


It seems that an analog stick on an MSX is not a very commonly supported thing, so try the BASIC commands Pad(17) and Pad(18) for joystick port 1 and Pad(17) and Pad(18) for port 2 to get paddle values (offset x/y -128 to +127). This should work.

If not, you may have to get dirty in that old Z80 ASM code.
Hmm, didn't work, I will have another try though. Still works fin digitally, though super mushy!

Has cleaned up very nicely with one of the auto interior wipes though :) Only thing I can't do much about is the button colour, but that's ok.

Re: MSX Inbound!!

Posted: 09 Feb 2022 14:46
by mrbombermillzy
rubber_jonnie wrote: 09 Feb 2022 14:39
mrbombermillzy wrote: 07 Feb 2022 20:18 Had a quick look for you :)


It seems that an analog stick on an MSX is not a very commonly supported thing, so try the BASIC commands Pad(17) and Pad(18) for joystick port 1 and Pad(17) and Pad(18) for port 2 to get paddle values (offset x/y -128 to +127). This should work.
Hmm, didn't work
What did reading the pad values give you? (I take it you read the values into a variable, like eg: 'x=Pad(17)' or whatever and then displayed x value?)