2.5 KiB
keytari
NOTE:
Due to systemd failure the instructions below won't work out of the box.
Appologies. For now you need to do sudo setfacl -m g:input:rw /dev/uinput at
each boot to get this to work. I'd love to point to documentation about this,
but the systemd team has left TAGS+="uaccess" undocumented since
2016. I'll have a better
solution in a day or two.
Atari 8-bit keyboard bridge
WARNING
In certian contexts this code is very insecure. The Atari 8-bit, even with a rapidus CPU upgrade, is not fast enough to participate in meaningful encryption. For that reason, keystrokes are sent in the clear. This is mitigated by the fact that the transport is WiFi with WPA2 security and should be about as secure as a bluetooth keyboard, but you have been warned.
Installation on a Linux PC
Linux side
Step 1: Create a user
We dont want to run keytari as root, so lets create a user.
sudo useradd -rM -G input keytari
Step 2: Allow access to /dev/uinput
/dev/uinput is the way we access the linux input subsystem. By default it is
only accessable by root. We need to allow keytari to access it. We do this with
a udev rule supplied in this repository.
sudo cp 99-keytari-input.rules /etc/udev/rules.d/
Once its added you need to get udev to see it.
sudo systemctl restart systemd-udevd
sudo udevadm trigger
Step 3: Install the systemd unit
Now we need to add the systemdd unit so that the service starts with our
computer.
sudo cp keytari.service /etc/systemd/system/keytari.service
sudo systemctl daemon-reload
sudo systemctl enable keyatari
Step 4: Copy keymap config
We need to install a keymap that keytari will use to map the Atari keys to their
Linux equivilents.
sudo mkdir /etc/keytari
sudo cp keymap.json /etc/keytari
Step 5: Start keytari
sudo systemctl start keytari
At this point keytari should be running on the PC. You can check the system log
with journalctl -fe to verify this.
Atari side
Step 1: Edit the KEYTARI.BAS file to set your hostname
I've found that supplying an IP here does not work and a DNS name does. This might just be unique to my setup. I got around this by setting a DNS name for my PC in my router. Change "HOSTNAME-HERE" to the DNS name of your PC.
Step 2: Compile KEYTARI.BAS
This assumes you have FastBasic available. Run FBC and supply KEYTARI.BAS as
the filename
Step 3: Run
Type in KEYTARI and you should get a message that says Connected. If so,
keystrokes from your Atari should now appear on your PC.