Code Monkey home page Code Monkey logo

rundmd-utils's Introduction

Intro

This is a small collection of utilities that I created years ago to help manipulate binary images for the Run-DMD clock (https://run-dmd.com/). The utilities allow for animations to be ripped, modified, and (re)combined. There are also a few ancillary scripts for adding custom animations from other things like animated GIFs, video files, or raw files captured from the WPC emulator (https://playfield.dev/)

Utilities

Here is a short overview of the purpose and usage of each item in the repository

  • rip_image.py: This Python script is used to extract the header and all of the animations from a Run-DMD binary image to a set of JSON files -- Example: rip_image.py --image RunDMD_B134.img --output-dir b134_extracted

  • raw_to_json.py: This Python script is used to create a single JSON animation file using a RAW file created from https://playfield.dev/ -- Example: raw_to_json.py --input-raw party_zone_dmd.raw --output-json b134_extracted/PARTY_ZONE/happy_hour.json

  • gif_to_json.py: This Python script is used to create a single JSON animation file using an animated GIF -- Example: gif_to_json.py --input-gif nyan_cat.gif --output-json b134_extracted/STUPID/nyan_cat.json

  • video_to_json.py: This Python script is used to create a single JSON animation file using a video file -- Example: video_to_json.py --input rick_roll.mp4 --output-json b134_extracted/STUPID/rick_roll.json

  • create_image.py: This Python script is used to build a Run-DMD binary image from a directory of JSON files -- Example: create_image.py --input-dir b134_extracted --image custom_RunDMD_B134.img

In addition to the items above, the repository also contains an animation editor in the "animation_editor" directory. This is a simply HTML/Javascript tool that allows you to open an JSON file, edit the animation frame-by-frame, and save the file. This is primarily useful for making small corrections to a JSON file, or for adding transparency to certain frames. For larger edits, it is usually easier to simply remove the frame directly from the JSON file, or write a small helper script to edit the frames.

Dependencies

With the exception of the gif_to_json.py and video_to_json.py scripts, there are no additional dependencies. Those two scripts, however, require the PIL and imageio modules.

Known Issues

The biggest known issue is with the way that frame duration is handled. The extraction and creation both use a very simple guess as to how the frame duration is handled. This seems to work when the frame duration is fairly short (less than ~100ms), but seems to fall apart for longer frame durations. The Run-DMD firmware image is available on the web, so if somebody wants to disassemble the PIC firmware and fix the frame duration implementation, that would be useful.

Future Developments

I had planned to release this years ago, but I wanted to iron out a few lingering issues. Work, kids, and other life demands constantly got in the way, so I am just releasing this as-is. I highly doubt I will ever have time to touch any of this again, so if somebody else wants to fork and take ownership, they are welcomed (and ecouraged!) to.

License

Please consider this released under the MIT license. Hack it, fork it, own it, etc. Just do not blame me if it creates corrupt images for your Run-DMD clock :)

rundmd-utils's People

Contributors

pwedge avatar

Watchers

 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.