Difference between revisions of "Guides:MAME - bitbanger"

From Wah!ki
Jump to navigation Jump to search
(Created page with " While I am getting more familiar with this feature in MAME this will just be a bunch of references These references are applicable to bitbanger and general serial/modem com...")
 
Line 1: Line 1:
 +
= bitbanger =
 +
I'd not heard of this term before it appeared in MAME but 'bit banging' is slang for 'any method of data transmission that employs software as a substitute for dedicated hardware'. This aligns with this MAME device bitbanger device well as it seemed like a general purpose device which sort of caught me out, so we'll run with that.
  
While I am getting more familiar with this feature in MAME this will just be a bunch of references
+
The device itself is a general purpose device that can attached to a driver(tbc?) as required, in most cases (so far, 2021 APR) i have only used it with a null_modem device, using it to create a unix socket that is then used for further transmissions.
  
 +
Tools like tcpser, netcat or socat can be used to provide further functionality in combination with the socket.
  
 +
 +
== Pass through your Bash Shell ==
 +
Connecting a bitbanger device to your local bash shell is possible by leaning on socat, this allows you to experience dumb terminals in all their glory like the tv955 driver. This method was documented by the [https://glasstty.com/?p=684 glasstty] blog so i've played with it and captured it here.
 +
 +
'''NB:''' make sure you understand the '''security''' implications of this process and take appropriate measures
 +
 +
* Using socat provide access over tcp to your bash shell, ''this will provide unauthenticated tcp access to the local session on <port>''.
 +
'''
 +
<nowiki>
 +
$ socat tcp-l:<port>,reuseaddr,fork exec:/bin/bash,pty,setsid,setpgid,stderr,ctty</nowiki>
 +
'''
 +
 +
The rest of the process is to configure your selected driver to have a null_modem attached and add a bit banger device, some example will be provided in the following table
 +
{| class="wikitable" width="100%"
 +
|-
 +
! width="33%" | driver
 +
! width="33%" | null_modem
 +
! width="33%" | bitbanger
 +
|-
 +
| ct486
 +
| -board2:comat:serport1 null_modem
 +
| -bitb socket.<ipaddress>:<port>
 +
|-
 +
| tv955
 +
| -mainboard null_modem
 +
| -bitb socket.<ipaddress>:<port>
 +
|}
 +
 +
== Other use cases ==
 +
* [[Guides:MAME_-_Software_-_DOOM#Play_DOOM_over_Null_Modem|Playing DOOM over a Null Modem]] for another use of the bitbanger
 +
* [[Guides:MAME_-_Terminate_-_Terminal_Software|BBS'ing with era appropriate terminal software]]
 +
 +
 +
= References =
 
These references are applicable to bitbanger and general serial/modem comms while I was setting up a BBS in MAME
 
These references are applicable to bitbanger and general serial/modem comms while I was setting up a BBS in MAME
 
+
* https://en.wikipedia.org/wiki/Bit_banging
 
* https://medium.com/@copyconstruct/socat-29453e9fc8a6
 
* https://medium.com/@copyconstruct/socat-29453e9fc8a6
 
* https://technostuff.blogspot.com/2008/10/some-useful-socat-commands.html
 
* https://technostuff.blogspot.com/2008/10/some-useful-socat-commands.html

Revision as of 23:38, 8 April 2021

bitbanger

I'd not heard of this term before it appeared in MAME but 'bit banging' is slang for 'any method of data transmission that employs software as a substitute for dedicated hardware'. This aligns with this MAME device bitbanger device well as it seemed like a general purpose device which sort of caught me out, so we'll run with that.

The device itself is a general purpose device that can attached to a driver(tbc?) as required, in most cases (so far, 2021 APR) i have only used it with a null_modem device, using it to create a unix socket that is then used for further transmissions.

Tools like tcpser, netcat or socat can be used to provide further functionality in combination with the socket.


Pass through your Bash Shell

Connecting a bitbanger device to your local bash shell is possible by leaning on socat, this allows you to experience dumb terminals in all their glory like the tv955 driver. This method was documented by the glasstty blog so i've played with it and captured it here.

NB: make sure you understand the security implications of this process and take appropriate measures

  • Using socat provide access over tcp to your bash shell, this will provide unauthenticated tcp access to the local session on <port>.

$ socat tcp-l:<port>,reuseaddr,fork exec:/bin/bash,pty,setsid,setpgid,stderr,ctty

The rest of the process is to configure your selected driver to have a null_modem attached and add a bit banger device, some example will be provided in the following table

driver null_modem bitbanger
ct486 -board2:comat:serport1 null_modem -bitb socket.<ipaddress>:<port>
tv955 -mainboard null_modem -bitb socket.<ipaddress>:<port>

Other use cases


References

These references are applicable to bitbanger and general serial/modem comms while I was setting up a BBS in MAME