Guides:MAME - bitbanger

From Wah!ki
Revision as of 23:38, 8 April 2021 by Sairuk (talk | contribs)
Jump to navigation Jump to search

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