Feature Request: Two user ports

Discussion of developmental aspects of the MiSTer Project.
MikePinball
Posts: 3
Joined: Mon Aug 23, 2021 2:21 am

Feature Request: Two user ports

Unread post by MikePinball »

I am fairly new to MiSTer but not to electronics or software. I have also written a bit of Verilog.

In comparing the analog and digital i/O boards some detailed differences and similarities come to light such as the use of the I2C MCP23009 I/O expander and the 7 I/O on the 10pin Arduino connector for the user port.

I would like to add a MT32-PI which utilizes the user port and so it cannot be used for anything else. If more I/Os could be freed up then a second user port or other functionality could be added. I would like to keep the functionality of the analog I/O board.

One approach to adding a second user port is to merge some of the ideas from both the analog and digital I/O boards into a new i/O board. Using the MCP23009 and additional "Arduino" [D5..D7] outputs for the second SDCARD immediately frees up 12 pins on the second GPIO connector. Four of those pins could be kept for DAT0..DAT3 to keep 4-bit mode performance.

A user switch is needed to recognize this new I/O board. The code to pull in the MCP23009 and other pins is very straightforward. What is harder is adding the definition for the second user port and having a way for all the cores to select one user port or the other. The easiest would be to have the second user port always used by MT32-PI, if enabled.
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Feature Request: Two user ports

Unread post by aberu »

What feature are you requesting specifically? A new IO board design?
birdybro~
MikePinball
Posts: 3
Joined: Mon Aug 23, 2021 2:21 am

Re: Feature Request: Two user ports

Unread post by MikePinball »

The request is to add a second user port to the function already provided by the analog I/O board.

The original append had one suggested approach by using the MCP23009 port expander and thereby freeing up some of the I/O pins on the GPIO 40 pin header. This would necessitate creating a new I/O board.

I did think about using other available I/O pins such as Arduino D0..D7. This would be enough providing D3 and D4 are no longer reserved for a I2C bus. A new PCB could be added for just this functionality but plugging into the 8 way Arduino socket is harder because the Analog IO board covers 5 of the I/O pins.
antoniovillena
Posts: 137
Joined: Sun May 24, 2020 8:11 pm
Has thanked: 2 times
Been thanked: 48 times

Re: Feature Request: Two user ports

Unread post by antoniovillena »

I am using this 2nd USER IO port
photo_2021-08-15_11-35-03.jpg
photo_2021-08-15_11-35-03.jpg (280.83 KiB) Viewed 6184 times
There are 8 lines available. But If we want to continue supporting old SDRAM modules, only 5 of these 8 lines are available
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 199 times

Re: Feature Request: Two user ports

Unread post by lamarax »

That would be a welcome feature indeed (I grew tired of swapping between SNAC and blisSTer), but as far as it would require a whole new board (meaning a new enclosure as well), you can count me out... unless it could be done with an external splitter.
MikePinball
Posts: 3
Joined: Mon Aug 23, 2021 2:21 am

Re: Feature Request: Two user ports

Unread post by MikePinball »

Thank you for your reply Antonio.In fact I almost bought your MiSTer Slim package but in the end decided to go with the standard boards (for now).

It looks like your board uses the Arduino D0..D7 for the second user port as I suggested above. And your io2db9 board also does it but provides a DB9 connector. Adding this like to the existing analog I/O board is a little harder.

My feature request really has 3 parts:
  1. Modifications to the hardware for add another user port (with at least 7 I/Os). I suggest an update to the v6.1 I/O board.
  2. Modifications to sys_top.v and sys.tcl to add the second user port with support code and a definition something like this:

    Code: Select all

    inout   [6:0] USER2_IO
  3. Modifications to other code (and perhaps the INI file) so people can choose how USER_IO and USER2_IO are connected to different functions such as MT32_PI or I/O controllers.
antoniovillena
Posts: 137
Joined: Sun May 24, 2020 8:11 pm
Has thanked: 2 times
Been thanked: 48 times

Re: Feature Request: Two user ports

Unread post by antoniovillena »

MikePinball wrote: Thu Aug 26, 2021 6:16 am Thank you for your reply Antonio.In fact I almost bought your MiSTer Slim package but in the end decided to go with the standard boards (for now).

It looks like your board uses the Arduino D0..D7 for the second user port as I suggested above. And your io2db9 board also does it but provides a DB9 connector. Adding this like to the existing analog I/O board is a little harder.

My feature request really has 3 parts:
  1. Modifications to the hardware for add another user port (with at least 7 I/Os). I suggest an update to the v6.1 I/O board.
  2. Modifications to sys_top.v and sys.tcl to add the second user port with support code and a definition something like this:

    Code: Select all

    inout   [6:0] USER2_IO
  3. Modifications to other code (and perhaps the INI file) so people can choose how USER_IO and USER2_IO are connected to different functions such as MT32_PI or I/O controllers.
It's a good idea. I propose a double USB3 connector for both USER_IO ports. And in the OSD of the framework add one function to swap ports.
ygdx1986
Posts: 2
Joined: Fri Dec 31, 2021 9:10 am
Has thanked: 2 times

Re: Feature Request: Two user ports

Unread post by ygdx1986 »

antoniovillena wrote: Wed Aug 25, 2021 5:27 pm I am using this 2nd USER IO port

There are 8 lines available. But If we want to continue supporting old SDRAM modules, only 5 of these 8 lines are available
Hi!Could we use the second USER IO port for player 3 and player 4?
Post Reply