TIC-80
TIC-80 copied to clipboard
"Real" IO: GPIO and serial support
It would be really great to have access to the GPIO pins of for example a raspberry pi (probably through wiringpi lib). Furthermore, exposing serial devices (/dev/ttyUSB0, /dev/ttyS0, etc) would open up endless possibilities of communication and retro fun such as BBSes and simple multiplayer.
Would be great run an arcade like game with a real coin acceptor.
I think that these should require a permission screen, something like "Do you want to let this cart use this serial port?" otherwise it could cause security problems.
You're right, thank you :)
I can see 2 ways of doing it:
- Provide a function that can request or drop permissions, something like
permission(PERMISSION_NAME,true for request and false for drop) - Add it in the cart comments at the start (where you specify the language etc.), something like:
-- perms: Serial, GPIO
I'd prefer the first one since it would enable more secure usage of permissions.
I would love to see this in TIC-80 as well. PICO-8 makes this very easy. It just exposes an 128-byte array that can be poked or peeked from inside the pico cart, and the website the game is embedded in, or the Raspberry Pi it is running on can read or write to that same array. https://pico-8.fandom.com/wiki/GPIO