Jump to content
Savetz

Atari 8-bit Twitter bot

Recommended Posts

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

 

 

 

  • Like 20
  • Thanks 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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 by vitoco

Share this post


Link to post
Share on other sites

Correct me if I am wrong but doesn't the Assembler/editor cart require line numbers?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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!

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...