shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Thu Mar 21, 2019 1:28 pm View unanswered posts
View active topics



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Mon Feb 25, 2019 5:51 pm 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
TL;DR

I've made a professional monitor and switch controller that runs on a touchscreen equipped Raspberry Pi: PiAvSwitchController

To stay up-to-date on new released, follow me on Twitter.

Introduction

So, I've been getting more and more intro retro-gaming these years and have purchased some really good hardware for it. The issue with using professional hardware like Sony BVMs and Extron switches is the additional complexity of setting up the ties and getting the channel for the console I want to play. Adding a single audio output to that complicates things even more. None of this equipment was design for such single person use cases.

Now... a positive aspect about this equipment is it being designed for remote and/or computer controllability.

Example Setup

Now, using my setup as an example. I have the following:
  • Sony BVM-D24E1WU, the monitor
  • Extron Crosspoint Plus 128 /w DSVP, the switch with 12 inputs and 8 outputs
  • NES using composite on the Extron
  • SNES and PS2 using RGBS on the Extron
  • N64 and Dreamcast using S-video on the Extron
  • Wii, XBOX360, PS3 using component on the Extron
  • Nintendo Switch "directly" on the monitors HD-SDI.
  • Cheap BlackWeb speakers connect to the first output of the Extron.

Solution

To make life easier using professional equipment, I decided to buy a Raspberry Pi, it's official touchscreen and compatible case, along with a USB-to-RS232 and USB-to-RS485 adapters. The RS-232 is for the Extron and the RS-485 is for the Sony BVM.

After a week of deciphering the BVM's remote protocol; the Extron protocol is in the manual, I've now created a very usable piece of software to control the BVM and Extron to make the process of selecting which console I want to output on screen very easy. It's just one tap of my finger.

The PiAvSwitchController.


Last edited by 6XGate on Mon Mar 11, 2019 4:08 am, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Release of 0.5.0
PostPosted: Sat Mar 02, 2019 9:28 pm 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
I just released 0.5.0 of this project that greatly improves the installation process for the software. Now the software will handle the basics aspects of its installation after it has been "downloaded".


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Sun Mar 03, 2019 12:40 am 



Joined: 03 Mar 2005
Posts: 337
I don't have your particular equipment, but I just wanted to say: this is really cool of you, both to make and to share.

If I had your skills at reverse engineering, I'd be tempted to pick up this Mitsubishi 16x16 matrix switch. It looks like it needs to be controlled remotely, yet the remote unit is not included and the main unit is extremely obscure.


Last edited by SamIAm on Sun Mar 03, 2019 1:30 pm, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Sun Mar 03, 2019 7:00 am 



Joined: 02 Mar 2017
Posts: 818
Cool project! Do you have a video of it working? I'm assuming you're turning into different saved channels on the BVM, as well as loading a certain preset on the Extron Crosspoint when you touch a certain button/icon on the Raspberry Pi's touchscreen? So for example if you wanted to play N64 over S-Video on your BVM, and the S-Video card is input card #1 on the BVM using inputs 1 and 2 for S-Video, and that information is saved on the Channel #1 Preset on the BVM; and then on the Crosspoint the N64 is Preset #1 as well; you then have the RP3 load that saved Channel #1 on the BVM, as well as loading Preset #1 on the Crosspoint as well, and you're in business playing N64 on your BVM with the press of a single button.

On a related note, if you want to do the switching wirelessly on your Extron Crosspoint Ultra (don't know if you have the ultra model or what), over wifi, from a touchscreen phone, tablet, or any device with web access, check out this project I did: viewtopic.php?f=6&t=63212

What I'm most interested in with your project is if you are indeed, in essence, having the Raspberry Pi simply enter the code/command for a certain button (that's normally entered from the BKM-10R Controller's panel), which in the case of these Channel Presets would simply be hitting the #1 button, #2 button, etc. (which is how you load Channel Preset #1, or Channel Preset #2). If so, it should be little trouble to have it enter commands like menu, enter, up, and down as well, right? If so, I see great potential in this project fixing one of the biggest annoyances in all of retro gaming (well, for us perfectionists at least - which there's many of ;) – which is how geometry from one system to another can be different, sometimes even drastically so. If you want everything perfect for every system you would have to go into the alignment/geometry menu on the monitor every time and do some tweaks whenever you switched from one console to another, even if they are both 240p consoles for example. With this Raspberry Pi setup you could pretty easily have it enter the commands for you to size and center each console perfectly. It would only have to input commands (in order) like: menu, down, down, down, enter (here you should be in the "Alignment" menu), then up and down to set the H Phase, H Size, V Size, and V Center values and it would automatically adjust the geometry to be perfect for that exact console. This might seem like being a little anal about geometry, but the systems really are different, and unless it's adjusted every time you will ALWAYS get some funky things showing up on screen (like some very annoying flashing dots, objects appearing and disappearing, contrasting color bars on the edges, etc.), or a vital menu on the top or bottom of a game cut off, etc.

^^ Just food for thought and the first thing I thought of after I read your post. Let me know if you have any interest and I would be happy to help out if I can.


Top
 Online Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Sun Mar 03, 2019 1:27 pm 



Joined: 06 Nov 2017
Posts: 7
Which USB RS-485 adapter did you use? In theory this could enable a bridge from BVM to say, a logitech harmony or similar control system over Wifi.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Sun Mar 03, 2019 2:04 pm 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
@SamIAm, I'm not sure if there is any manual, in English, for that switch; but the Extron's using RS-232 actually had the command set documented in their manual. The BVM is where the fun is. It did at least use the same pin-out as the Sony 9Pin Protocol of their video recording equipment. So the part that required a bit of work was decoding the command protocol of the BVM's serial REMOTE lines. If you can find a manual, I, or anyone, can write a driver for that switch.

@Dochartaigh, I'm not using preset on the switch, but it does require channels to be defined on the BVM. The may reason I didn't use presets is I didn't have any setup and didn't want to require that be done. It seemed simpler for a user to just plug stuff up and give the program the tie (in to out) channels. That being said, it might be possible later to set it up to treat ties as single input channel like I do the BVM with more options on the Extron driver. You can check the source if you want more details on how this is abstracted; but, it simply tells the BVM a channel to go to and tells the switch which input should be tied to which video output and audio output. It even signals to BVM to power down when I push a power off button. Though I know how to send those command, I don't simulate any button presses, I actually send SetChannel (as I call them) commands which support the full range of channels.

@Splozion Here is a list of all the extra parts I needed (beyond the Raspberry Pi, it's screen and case)
  • USB to RS-232: Amazon Link.
  • USB to RS-485: Amazon Link.
  • DE-9 Breakout ends for RS-485 cable: Amazon Link.
  • I just used plain old CAT6 cable with the RS-485 breakout ends to convert from the adapter pin-out to the BVM pin-out.

I plan to make a complete write up with video soon.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Wed Mar 06, 2019 5:23 pm 



Joined: 17 Apr 2017
Posts: 1
This is almost exactly what I've been trying to figure out a way to do. Awesome!

Question: Do you have any resources on writing the driver files for other devices? I have a 16 port HDMI switch in addition to an extron crosspoint. If I could get both going my entire setup could be controlled this way.

the manufacturer is Tesla Smart (http://www.testla-smart.com). I found the following protocol information on their website.https://drive.google.com/open?id=1bQXbhs0QmGNiKLMKyevQpQmekAeCMg2K


Top
 Offline Profile  
 
 Post subject: 0.6.1 Released
PostPosted: Mon Mar 11, 2019 4:07 am 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
I just released a new version, this one has only minor changes for new users, but existing users will want to update to this version now before I release 0.7.0. Since the next version is going to be packaging the program into a single file (called zipapp in Python), I will need to move where the configuration file is located. By updating to and running this version, you will not need to move the file manually on the next update.

Also, if you want to keep up-to-date on new released, you can follow me on Twitter

Also, I found a bug in 0.6.0 and patched it real quick.


Top
 Offline Profile  
 
 Post subject: Release of 0.6.2: Recommended Update
PostPosted: Fri Mar 15, 2019 4:15 am 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
Fixed some issues that affected the start-up performance, added logging, and ensured that the shutdown button gave the program a chance to write it's persistent state information, such as the current configuration file path.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Fri Mar 15, 2019 4:17 am 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
PAvandal wrote:
This is almost exactly what I've been trying to figure out a way to do. Awesome!

Question: Do you have any resources on writing the driver files for other devices? I have a 16 port HDMI switch in addition to an extron crosspoint. If I could get both going my entire setup could be controlled this way.

the manufacturer is Tesla Smart (http://www.testla-smart.com). I found the following protocol information on their website.https://drive.google.com/open?id=1bQXbhs0QmGNiKLMKyevQpQmekAeCMg2K


I've not written anything up yet. It's not too hard though if you know how to open a stream to the device for communication and know the protocol to set ties or channels. The documentation is still a work in progress to the same extend as the program. I'll see what I can do with what you've found, but I've no way to test anything other than what I have. I would need the communities help with that.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Fri Mar 15, 2019 1:29 pm 



Joined: 02 Mar 2017
Posts: 818
6XGate wrote:
You can check the source if you want more details on how this is abstracted; but, it simply tells the BVM a channel to go to and tells the switch which input should be tied to which video output and audio output. It even signals to BVM to power down when I push a power off button. Though I know how to send those command, I don't simulate any button presses, I actually send SetChannel (as I call them) commands which support the full range of channels.


Sadly I know absolutely nothing of coding besides simple web type stuff like HTML and CSS - I wouldn't be able to re-write your code to make this do what I want it to do (i.e. adjust the geometry of the BVM automatically on a per-console basis).


Top
 Online Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Fri Mar 15, 2019 7:23 pm 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
Dochartaigh wrote:
6XGate wrote:
You can check the source if you want more details on how this is abstracted; but, it simply tells the BVM a channel to go to and tells the switch which input should be tied to which video output and audio output. It even signals to BVM to power down when I push a power off button. Though I know how to send those command, I don't simulate any button presses, I actually send SetChannel (as I call them) commands which support the full range of channels.


Sadly I know absolutely nothing of coding besides simple web type stuff like HTML and CSS - I wouldn't be able to re-write your code to make this do what I want it to do (i.e. adjust the geometry of the BVM automatically on a per-console basis).


That's not an issue, I'll give coding a driver for it a try. It looks like a simple protocol.


Top
 Offline Profile  
 
 Post subject: Released 0.7.0
PostPosted: Sat Mar 16, 2019 5:17 pm 


User avatar

Joined: 21 Feb 2019
Posts: 8
Location: Ocean Springs, Mississippi
Okay, so I’m going to make the zipapp version 1.0.0. This version adds support for using LAN/network connection to control and Extron switch using SIS. Also, by request, I’ve added experimental Telsa-Smart HDMI (and maybe SDI) switch support through RS-232 and LAN/network connection.

The use of network support requires replacing the tty part of the switch's configuration with host containing the switch's IP address.

The new Tesla-Smart driver is called tesla-smart.

You can checkout the wiki page for Switches and Monitor for more information.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Wed Mar 20, 2019 8:37 pm 



Joined: 20 Feb 2018
Posts: 7
Wow this is awesome. I currently have a 32x16 and a 12x8 chained together (I have a lot of devices connected along with extron VGA->RGBS, kramer S-Video/Composite->RGBS, and Behar Bros Component ->RGBS converters/transcoders in a loop back setup) outputting to a PVM-20L5, OSSC, and a datapath capture card. Wondering if the BVM and PVM use the same remote protocol, any clue? Also would the software be able to handle two daisy chained switches?

Like for PS1 set the 12x8 to input 3 output 1 and the 32x16 to input 32 output 1? Gets even more complicated for the loopback setups - for PC-FX the 12x8 needs input 4 to output 3 and input 12 to output 1 and on the 32x16 input 32 to output 1-3 (or one of the 3 depending on if I want PVM, OSSC, and/or datapath capture). This is because output 3 of the 12x8 is the input of the Kramer fc-4044 s-video/composite to RGBS decoder, input 12 is the output of the Kramer fc-4044, input 4 is the pc-fx s-video output, and output 1 goes to the 32x16’s input 32 which then has the PVM, OSSC, and Datapath capture on outputs 1-3. I have similar setups with the other converters/transcoders and the Xbox, Xbox 360, psp, PS3 (since no 480P over rgbs like ps2 can do ☹️), fm Towns marty, virtual boy, game gear, lynx, and 3DO (which will get RGB soon).

It would be even cooler if when clicking on a system a pop up menu would ask if I wanted to output to the PVM, OSSC, Datapath, or all/combinations of the three based on my defined outputs.


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Wed Mar 20, 2019 9:29 pm 



Joined: 07 Apr 2016
Posts: 1262
Great job, 6XGate!


Top
 Offline Profile  
 
 Post subject: Re: Raspberry Pi Software for Controlling BVMs and Switches
PostPosted: Thu Mar 21, 2019 1:27 pm 



Joined: 02 Mar 2017
Posts: 818
6XGate wrote:
That's not an issue, I'll give coding a driver for it a try. It looks like a simple protocol.


Sounds great, thanks! All I would need to know is how to add strings of commands (like the code for "Up", "Down", "Enter", etc.), and how to link them to a button on the control panel I should have no problem editing the code to make it resize the screen on a per-console basis.




Aquamentus wrote:
outputting to a PVM-20L5, OSSC, and a datapath capture card. Wondering if the BVM and PVM use the same remote protocol, any clue? Also would the software be able to handle two daisy chained switches?


Your PVM-20L5 (along with the 14L5) are the only monitors which can also be controlled by a BVM's BKM-10R controller. The functionality is a bit limited though and I could never get it to work 100% like the cryptic manual says I should be able to (it's on page 20 of the 20L5's manual if you want to give it a look). That being said, to answer your question, yes, the BVM and PVM share some of the same remote protocols (if those are the ones this program is setup to use or not I can't answer).


Top
 Online Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC


Who is online

Users browsing this forum: bytestorm, Dochartaigh and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group