MSX Inbound!!

Blogs & guides and tales of woo by forum members.
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 2:46 pm
rubber_jonnie wrote: Wed Feb 09, 2022 2:39 pm
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?)
Those commands give an illegal function call error so don't work at all.

if I use pad(0) I get a value of -1 for up, but nothing else. If I use pdl(1) I get a constant value of 255, changing for 0 when I push up. I get no read in any other direction. Need to read up on those commands, there is some info here: https://www.msx.org/wiki/PDL(), it looks like you need to read 2 channels, one for X and one for Y.

I'd expect values between 0 and 255 based on what I'm seeing, but it is just doing it digitally it seems.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: MSX Inbound!!

Post by mrbombermillzy »

I've been using that site for figuring the commands. As I'm not MSX savvy, maybe I'm missing something.

However, I don't think you should get an error from the pad commands, just possibly useless read data..... :coffee:
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 3:12 pm I've been using that site for figuring the commands. As I'm not MSX savvy, maybe I'm missing something.

However, I don't think you should get an error from the pad commands, just possibly useless read data..... :coffee:
Me either, my first MSX :)

I'm sure it'll get figured out in the end!!
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: MSX Inbound!!

Post by mrbombermillzy »

mrbombermillzy wrote: Mon Feb 07, 2022 8:18 pm 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.
Damn. the first set of values SHOULD have been Pad(13) and Pad(14) for port 1. (Silly typo :roll: )
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 3:26 pm
mrbombermillzy wrote: Mon Feb 07, 2022 8:18 pm 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.
Damn. the first set of values SHOULD have been Pad(13) and Pad(14) for port 1. (Silly typo :roll: )
Ok, will try that in a bit and report back.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 3:26 pm
mrbombermillzy wrote: Mon Feb 07, 2022 8:18 pm 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.
Damn. the first set of values SHOULD have been Pad(13) and Pad(14) for port 1. (Silly typo :roll: )
Ok, so PAD only goes up to 7 for MSX1, goes up to 19 for MSX2 and beyond. Let's see what happens now!
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 3:12 pm I've been using that site for figuring the commands. As I'm not MSX savvy, maybe I'm missing something.

However, I don't think you should get an error from the pad commands, just possibly useless read data..... :coffee:
Ok, so the pad() commands don't really seem to work so well on MSX1, at least for this joystick, but pdl() is working as expected, and apparently only returns 0 & 255 if I read this correctly https://www.msx.org/wiki/MSX_Paddle_Controller

So how to make an analog joystick digital only!!!
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: MSX Inbound!!

Post by mrbombermillzy »

@rubber_jonnie Oh dear.

Ok. From what I can fathom from that site (and what I put originally), I guess analog joysticks on the MSX1 SEEM to be a bit of an anomaly.

Therefore we will have to probably go with plan B; kit up and get dirty with assembly (or at least POKE statements will do it hopefully) and start looking at the Memory map for the analog inputs.

Is there a decent programmers ref guide or at least a memory map for one of these?

Just had a quick look at that site again, but it's a bit of a pain to navigate. :lol:
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 10616
Joined: Thu Aug 17, 2017 7:40 pm
Location: Essex
Contact:

Re: MSX Inbound!!

Post by rubber_jonnie »

mrbombermillzy wrote: Wed Feb 09, 2022 7:05 pm @rubber_jonnie Oh dear.

Ok. From what I can fathom from that site (and what I put originally), I guess analog joysticks on the MSX1 SEEM to be a bit of an anomaly.

Therefore we will have to probably go with plan B; kit up and get dirty with assembly (or at least POKE statements will do it hopefully) and start looking at the Memory map for the analog inputs.

Is there a decent programmers ref guide or at least a memory map for one of these?

Just had a quick look at that site again, but it's a bit of a pain to navigate. :lol:
Hmm, getting dirty with ASM isn't going to happen any time soon I think :(

I don't have the time or any way of saving my data at the moment, so I'll have to cross that bridge first before I can do anything else.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
mrbombermillzy
Posts: 1468
Joined: Sun Jun 03, 2018 7:37 pm

Re: MSX Inbound!!

Post by mrbombermillzy »

Ok, well, I did a very similar project for my GCSE Technology project.

I built a Start Wars style controller for my C64; (remember the original vector arcade version controller?) Had 2 pots and a fire button; had to code a program to move a crosshair reading the analog inputs.

However, that's for a 6510 CPU. This has a Z80.

If you don't get any 'joy' :lol: I can maybe look at learning enough Zilog assembler syntax to test the bloody thing.

(@exxos can tell you how much time I have for hobby coding, so it may take some time, considering the above as well.).

EDIT: Or it may be easier/quicker just to POKE from BASIC if I can find a memory map, like I said.
Post Reply

Return to “MEMBER BLOGS”