GithubHelp home page GithubHelp logo

aoberoi / c64-slack-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeff-1amstudios/c64-slack-client

0.0 2.0 0.0 497 KB

A Slack client for the Commodore 64

Home Page: http://1amstudios.com/2016/11/27/c64-slack-client/

Assembly 63.49% JavaScript 36.51%

c64-slack-client's Introduction

Slack client for Commodore 64

_Where a Raspberry Pi and a Commodore64 collaborate with Slack._

Commodore 64 program

The c64 program code is written in 6502 assembly and somewhat(?!) well documented.

Compiling

Grab dependency: ACME assembler

cd c64
acme main.asm

This will create build/slack-client.prg.

Running the program on real hardware

If you are reading this, have a C64, and plan to run this program on it, you likely don't need step-by-step instructions ;). Obviously it will need to copied onto a floppy disk, disk emulator etc.

LOAD "SLACK-CLIENT.PRG",<device_nbr>
RUN

Running with the Vice64 emulator

First, we need to configure the emulated serial port.

Open 'Settings' > 'Resource Inspector' window

Peripherals > Cartridges > Userport RS232 > 
  Baud Rate: 1200, 
  Enabled: true, 
  Device: device4
RS232 > Device4 > 
  Device: |../raspberry_pi/app.js, 
  Baud Rate: 1200

Hit 'Save current settings', then Quit.

/path/to/x64 build/x64 c64/build/slack-client.prg

Raspberry Pi Slack API proxy

This is a NodeJS app which connects to the Slack RTM api on one side, and a serial port connection to the C64 on the other side and translates data back and forth.

It can be configured to communicate via a real serial port, or via stdout/stdin (for Vice64 emulator)

Configuration

First, you need to create a Slack OAuth token here https://api.slack.com/docs/oauth-test-tokens

export SLACK_API_TOKEN=token

If C64_SLACK_SERIALPORT_DEVICE is not defined, it will use stdout/stdin for communication. To communicate via a real serial port:

export C64_SLACK_SERIALPORT_DEVICE=/dev/ttyUSB0 (or /dev/cu.usbserial etc)

Run the API proxy:

cd raspberry_pi
npm install
npm test
node app.js

On startup, it will authenticate with Slack RTM api, then send a HELLO RPC message to the C64, which we expect to already be running.

Helpful links

ISC License

Copyright (c) 2016, Jeffrey Harris

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

c64-slack-client's People

Contributors

jeff-1amstudios avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.