Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:14 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMB4W Controller interface

     Page 3 of 3    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:15am 19 Dec 2023
Copy link to clipboard 
Print this post

The ideal solution for MMB4W is to give it a driver for the Microsoft game controller system. Then it can handle most USB game controllers and joysticks natively.

A simple serial port interface has a lot of attractions though, not least being able to keep it cheap & cheerful. I2C needs the same number of wires but is far more elegant IMHO. In either case you need to know where the virtual COM port is on a PC.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 10:19pm 26 Dec 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  The ideal solution for MMB4W is to give it a driver for the Microsoft game controller system

And that's what happened! Much better than any serial port interface and it works well, thanks again Peter.

I may still look at implementing a games console type of thing with the USB Keyboard Chip IC Module thingy.

Bill
Keep safe. Live long and prosper.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 05:45am 28 Dec 2023
Copy link to clipboard 
Print this post

When I found this and found out the price I was looking at was in USD and would take a couple of weeks to get here I decided to pull apart a $2.99 second hand keyboard I found at an op shop and found this:



While it is not quite the same module, I think it's the same under the blob. The columns number from C1 to C17 instead of 0 to 16 on the other one. A short test with a small jumper confirms that C1 on the one I have corresponds to the C0 on the other one (and so on I guess). With the jumper I can type characters into Notepad etc.

I may get a chance to connect a joystick and some buttons on the weekend.

Bill
Keep safe. Live long and prosper.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:56am 06 Feb 2024
Copy link to clipboard 
Print this post

If anyone cares, I gave up on this keyboard blob thing, it's faulty. I probably damaged it with my fumble fingers.  

I found the little board difficult to work with and I'm not going to buy more to struggle with. It is quite possible to do and you can easily find youtube videos where some have done so.

So it's back to plan A for me. An Atari style joystick and 'mite with USB connection to the PC to give a single 8 bit word.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:59am 06 Feb 2024
Copy link to clipboard 
Print this post

You may not need to struggle before long. If the USB handling makes it into MMB4W you'll just be able to plug in a USB SNES controller.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 01:41pm 06 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  You may not need to struggle before long. If the USB handling makes it into MMB4W you'll just be able to plug in a USB SNES controller.


Not to guess at any plans Tom may have, but I wouldn't hold my breath. Aside from the deprecated sysfs method, pin I/O on Linux remains problematic and implementation-dependent. This was supposed to be fixed by the proposed libgpiod. Whether or not this is implemented by default on any particular Linux system depends. As of the last time I checked, Raspbian did not include it or have it available with apt-get (maybe 6 months ago). You can download source and build it--but then it's still not trivial to implement in MMB4L.

Whether the work Peter has done with USB on the PicoMite could help solve this problem for USB controllers, I don't know (as I also don't know what Tom's schedule might be for implementing this if it seems feasible).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4039
Posted: 02:00pm 06 Feb 2024
Copy link to clipboard 
Print this post

We seem to have "jumped the shark" in this thread, you are the first to bring up Linux I believe @lizby.

Regarding MMBasic for Windows (MMB4W):

I believe Peter added support for at least one USB game controller (PS/3 ?) to MMB4W at some point in the last 6 months, presumably using an extension to the OneLoneCoder library, in which case other USB controllers may just work, or subject to Peter's time and patience not be too difficult to add support for. There appear to be Atari joysticks out there with USB plugs, whether these would work or not is anyone's guess.

Regarding MMBasic for Linux (MMB4L):

Don't hold your breath. If/when I add high-res graphics I will also add USB controller support, both via SDL2, no GPIO involved. However I don't see me looking at this in the next 12 months, or 24 ... or maybe 36; I still have bills to pay and children to raise and this development requires an investment of time that is difficult to make with a few hours grabbed here and there. Plus to be honest the Game*Mite has attracted more interest than MMB4L ever did.

Best wishes,

Tom
Edited 2024-02-07 00:01 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 02:11pm 06 Feb 2024
Copy link to clipboard 
Print this post

  thwill said  "jumped the shark"


Oops, sorry--I mixed up my "MMB4"s.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4039
Posted: 02:14pm 06 Feb 2024
Copy link to clipboard 
Print this post

  thwill said  I believe Peter added support for at least one USB game controller (PS/3 ?) to MMB4W at some point in the last 6 months


Actually much more recent than that, as Bill mentioned at the top of this page ... I'm too young to be going this senile .

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 02:43pm 06 Feb 2024
Copy link to clipboard 
Print this post

  Turbo46 said  If anyone cares, I gave up on this keyboard blob thing, it's faulty. I probably damaged it with my fumble fingers.  

I found the little board difficult to work with and I'm not going to buy more to struggle with. It is quite possible to do and you can easily find youtube videos where some have done so.

So it's back to plan A for me. An Atari style joystick and 'mite with USB connection to the PC to give a single 8 bit word.

Bill


Too bad Bill,

I think your project was the smoothest way into hobby gaming on MMB4W. Almost all operating systems support multiple keyboards and mice. And you could even use the NUMLOCK LED output for some haptics.

Regards,

Volhout
Edited 2024-02-07 01:02 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 03:04pm 06 Feb 2024
Copy link to clipboard 
Print this post

  Turbo46 said  
And that's what happened! Much better than any serial port interface and it works well, thanks again Peter.

Bill


Where can I find this MMB4W version ? Is this V50703b23 ?
Any documentation on how to use the game controller interface ?

VOlhout
PicomiteVGA PETSCII ROBOTS
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 01:49am 07 Feb 2024
Copy link to clipboard 
Print this post

  Volhout said  I think your project was the smoothest way into hobby gaming on MMB4W

Thank you Volhout, I believe so too. Many games written for Tom's CMM2 contest were keyboard only and I do have difficulty with the keyboard when games get intense. This could replace the keyboard for those games. I have been trying LeoNicolas' Knightmare game and I can not come near to the dexterity he shows on the video while demonstrating the game. This project would be the ideal way to add joystick control without modifying the code.

Leo is using wine and has trouble with Peter's controller so cannot add it for MMB4W (I believe). While I could add the controller support for my own purposes it is not feasible to do it each tine he produces a new version.

My problems with that keyboard chip PCB are that it is small, the column and row markings are on one side of the board while the 'edge connector' is on the other and my fingers do not work as well as they used to. The data for the board is incomplete.



I want to use the arrow keys for the up/down/right/left of the joystick and the space key for the fire button. The arrow keys are not shown but I suspect that they are R3C7, R5C7, R5,C9 and R5C10.

Maybe I should try again, it's not rocket science. Next time I would use a hub rather than plug it into a USB port of my laptop, that was not a good idea.

If there was something available commercially to do this I would buy one but I cannot find one.

Peter's controller support for MMB4W is here and to the best of my knowledge it is not in Doug's manual yet.

Bill
Keep safe. Live long and prosper.
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 07:35am 07 Feb 2024
Copy link to clipboard 
Print this post

  thwill said  
There is probably a PowerShell command/commands that can perhaps be issued using MMB4W's SYSTEM command that will provide this information.

Best wishes,

Tom



Love Poweshell - if you can wrangle the syntax:

From a PS prompt:  
Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description


Will list the attached COM ports (tested on Win10 x64bit)

Get-WMIObject
 will give all the details.

It does take a second or two to poll the ports though.
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024