Savetz Posted September 20, 2020 Share Posted September 20, 2020 Today I’m announcing my new project, @Atari8BitBot. It's a twitter bot: tweet it code in Atari BASIC, or Turbo-BASIC XL, or Logo, or PILOT, or assembly language. It’ll run your program in an emulator and tweet you back with it a video of it running. Documentation at https://atari8bitbot.com Have fun, Kay 20 1 Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted September 20, 2020 Share Posted September 20, 2020 This is super cool. I've seen your tests in BASIC but I am surprised you were able to add other languages as well. I'd love to know a bit more how it works behind the scenes. Well done! Paulo Quote Link to comment Share on other sites More sharing options...
Savetz Posted September 21, 2020 Author Share Posted September 21, 2020 The bot runs on a Raspberry Pi. It runs the Atari800 emulator in an X virtual frame buffer. A Python script checks Twitter every two minutes for incoming tweets directed at @Atari8BitBot, and imports them into the emulator. ffmpeg records the emulator’s output as a video, then the script uploads that video to Twitter as a reply. Support for languages other than BASIC is done by putting in your tweet a directive in brackets, e.g. {P} for PILOT. A little regular expression searching looks for those, and launches the emulator with different combinations of cartridges and ATRs depending on the language. Bill Kendrick figured out the Xvfb and ffmpeg stuff, and came up with the idea to use the program "franny" to import the user-written code into ready-made disk image templates. —Kay 1 Quote Link to comment Share on other sites More sharing options...
vitoco Posted September 21, 2020 Share Posted September 21, 2020 (edited) That's awesome! Do ASM really need line numbers in the message? Without numbers (and one of the following spaces) you can save message space for larger code, and the numbers might be sequentially included for free (like the "*=$3000" line). I guess that if the message does not include a trailing RUNAD, the bot will automagically include $3000 as the entry vector. Some other optimizations could be made to avoid errors in the message, like making the leading space optional, and inserting them with the numbers, except for the labels. How to know there is a label? It might not be a reserved word. You can even use a delimiter and send all the instructions in a single line! I haven't tested this bot, because I don't have a Twitter account... Edited September 21, 2020 by vitoco Quote Link to comment Share on other sites More sharing options...
+Allan Posted September 21, 2020 Share Posted September 21, 2020 Correct me if I am wrong but doesn't the Assembler/editor cart require line numbers? Quote Link to comment Share on other sites More sharing options...
Savetz Posted September 21, 2020 Author Share Posted September 21, 2020 41 minutes ago, Allan said: Correct me if I am wrong but doesn't the Assembler/editor cart require line numbers? It does indeed require line numbers. Quote Link to comment Share on other sites More sharing options...
vitoco Posted September 21, 2020 Share Posted September 21, 2020 7 hours ago, Allan said: Correct me if I am wrong but doesn't the Assembler/editor cart require line numbers? Numbers are required by the cart, but they are not relevant for the code as there is no GOTO or such, just labels references for branches and jumps, so the numbers can be sequentially created by the bot after it receives the code and before submiting it to the cartridge. Quote Link to comment Share on other sites More sharing options...
Mclaneinc Posted September 21, 2020 Share Posted September 21, 2020 An Atari Twitter bot, LOL...Very impressive even though I'm not a twitter / Facebook kind of person.. Well done Kay, Basic alone would have been great but other languages, very nice.. Quote Link to comment Share on other sites More sharing options...
dmsc Posted September 26, 2020 Share Posted September 26, 2020 Hi! On 9/20/2020 at 6:43 PM, Savetz said: Today I’m announcing my new project, @Atari8BitBot. It's a twitter bot: tweet it code in Atari BASIC, or Turbo-BASIC XL, or Logo, or PILOT, or assembly language. It’ll run your program in an emulator and tweet you back with it a video of it running. This is really great! You should upgrade the basicParser, I just fixed the parsing of "TIME$" as argument to PRINT: https://github.com/dmsc/tbxl-parser/commit/1c62f5073ac0fa5c6ff255ffc9a9f4f601fb47f2 Have Fun! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.