Re: MSX Inbound!!
Posted: 07 Feb 2022 18:51
Great to hear you getting on well with the msx @rubber_jonnie
We welcome retro users & hardware gurus alike! Come and join the party :)
https://www.exxosforum.co.uk/forum/
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).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?
It really is a very nice machine :)
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.mrbombermillzy wrote: 07 Feb 2022 19:20Not 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).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?
Don't know if there's another way of reading the joystick from BASIC? :shrug:
Oooh thanks, I'll try that when I get the joystick reassembled.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.
Very impressed with the build quality, no wonder they were expensive.
Hmm, didn't work, I will have another try though. Still works fin digitally, though super mushy!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.
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?)rubber_jonnie wrote: 09 Feb 2022 14:39Hmm, didn't workmrbombermillzy 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.