Guides:MAME - bitbanger
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 well as it seems like a general purpose device which sort of caught me out on the usage front, so we'll run with that.
The device itself is a general purpose device that can be 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.
Support
To work out if bitbanger is supported by the device you are attaching review the mame code (as of 0.230) for an entry similar to this in null_modem.cpp
void null_modem_device::device_add_mconfig(machine_config &config) { BITBANGER(config, m_stream, 0); }
External Connection
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
- Playing DOOM over a Null Modem for another use of the bitbanger
- 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
- https://en.wikipedia.org/wiki/Bit_banging
- https://medium.com/@copyconstruct/socat-29453e9fc8a6
- https://technostuff.blogspot.com/2008/10/some-useful-socat-commands.html
- https://github.com/craSH/socat/blob/master/EXAMPLES
- https://www.ninerpedia.org/wiki/MESS_Serial_connection
- https://www.ninerpedia.org/wiki/MAME_TI_emulation_usage#Using_serial_connections
- https://roxburysoftware.com/explaining-tcpser-for-vice/
- https://www.reddit.com/r/bbs/comments/64mrjv/trying_to_setup_a_bbs_via_emulator/
- https://changelog.complete.org/archives/9836-an-old-dos-bbs-in-a-docker-container
- https://www.reddit.com/r/bbs/comments/7cp8aa/best_way_to_emulate_for_a_dos_bbs/
- https://github.com/FozzTexx/tcpser
- https://github.com/geneb/tcpser/blob/master/README
- http://renegadebbs.info/files/RENDOCS.PDF
- http://www.bbsdocumentary.com/software/IBM/DOS/RENEGADE/
- https://en.wikipedia.org/wiki/List_of_BBS_software
- http://www.digsys.se/Obsolete/ADF.aspx