{"id":13546599,"url":"https://github.com/asynkayo/rm8","last_synced_at":"2025-04-02T18:31:07.711Z","repository":{"id":37211237,"uuid":"441479050","full_name":"asynkayo/rm8","owner":"asynkayo","description":"M8 headless display - Rust","archived":false,"fork":false,"pushed_at":"2023-05-24T20:10:15.000Z","size":2253,"stargazers_count":55,"open_issues_count":8,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-18T22:02:03.035Z","etag":null,"topics":["headless","m8","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asynkayo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-24T13:57:08.000Z","updated_at":"2024-11-29T01:45:24.000Z","dependencies_parsed_at":"2024-01-14T02:39:34.165Z","dependency_job_id":"aeb727e7-f202-4cd3-a8d0-59b292ce5ec7","html_url":"https://github.com/asynkayo/rm8","commit_stats":null,"previous_names":["asynkayo/rm8","booss/rm8"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asynkayo%2Frm8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asynkayo%2Frm8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asynkayo%2Frm8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asynkayo%2Frm8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asynkayo","download_url":"https://codeload.github.com/asynkayo/rm8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246869750,"owners_count":20847185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["headless","m8","rust"],"created_at":"2024-08-01T12:00:40.770Z","updated_at":"2025-04-02T18:31:07.440Z","avatar_url":"https://github.com/asynkayo.png","language":"Rust","funding_links":[],"categories":["Headless clients"],"sub_categories":[],"readme":"# RM8\n\nRemote display for the [Dirtywave M8](https://dirtywave.com/)\n\nI first tried M8WebDisplay then discovered m8c and decided to use it as a starting point for my own version in rust..\n\n# Config\n\n[SDL scancodes](https://github.com/libsdl-org/SDL/blob/main/include/SDL_scancode.h)\n\n[SDL keycodes](https://github.com/libsdl-org/SDL/blob/main/include/SDL_keycode.h)\n\n`Alt + Enter` will toggle fullscreen.\n\n`Alt + R key` will reset the display\n\n`Alt + Shift + R key` will do a full reset of the display (disconnect + enable and reset display)\n\n`Alt + C` will enter config mode.\n\n`Escape` will either quit the application or fullscreen mode or config mode or key remapping mode.\n\n## Default key mapping\n\n    UP        = UP           # M8's `UP` key\n    DOWN      = DOWN         # M8's `DOWN` key\n    LEFT      = LEFT         # M8's `LEFT` key\n    RIGHT     = RIGHT        # M8's `RIGHT` key\n\n    SHIFT     = LSHIFT       # M8's `SHIFT` key\n    PLAY      = SPACE        # M8's `PLAY` key\n\n    EDIT      = LCTRL        # M8's `EDIT` key\n    OPTION    = LALT         # M8's `OPTION` key\n\n    KEYJAZZ   = RETURN       # Enter keyjazz mode\n    OCTAVE+   = RIGHTBRACKET # Increment octave\n    OCTAVE-   = LEFTBRACKET  # Decrement octave\n    VELOCITY+ = MINUS        # Increment velocity (use the keyboard's `Shift` key to go faster)\n    VELOCITY- = EQUALS       # Decrement velocity (use the keyboard's `Shift` key to go faster)\n\n## Keyjazz keymapping\n\nThe following keys are used in `keyjazz` mode to send notes to the M8:\n\n- Higher octave:  Q 2 W 3 E R 5 T 6 Y 7 U I 9 O 0 P\n- Current octave: Z S X D C V G B H N J M , L . ;\n\nIf you are using an `azerty` or `dvorak` keyboard layout, you may want to change the keys.\n\nFor that, open or generate the config file and look for the `\"keyjazz\"` section.\n\nThe numbers on the right are the index of the note.\n\nNOTE: If the keys do not overlap with `keyjazz` keys, then `keyjazz` can be left ON.\n\n## Usage\n\nRun `rm8 -help` \tto display the help screen.\n\nRun `rm8 -list` \tto list available M8 devices.\n\nRun `rm8 -dev DEVICE` \tto connect to the specified M8 device.\n\nRun `rm8 -cap \"M8 Analog Stereo (2)\"` \tto connect the given capture device to the default playback device.\n\nRun `rm8 -wc` \t\tto print the default config to the standard output.\n\nRun `rm8 -wc \u003cFILE\u003e` \tto write the config to the given file.\n\nRun `rm8 -rc \u003cFILE\u003e` \tto load the config from `FILE`.\n\nNOTE: The default config file name is `rm8.json`.\n\n# Audio\n\n`rm8` can now directly output the audio from your M8 !\nYou can either run `rm8` and let it open the first M8 capture device it found or you can use the `-cap` command line argument to specify which M8 you want to use.\nFor now there is no support for this feature in the in-app config system.\n\n# Config Mode\n\nBy pressing `Alt + C` you will enter config mode.\n\nIn this mode, you can redefine most params of the application.\n\nThe parameters are split in 8 pages.\n\nPressing `Edit` and `Option` on a control will reset it to its default value.\n\nNavigate using `Shift` and `ARROWs` just like on the M8.\n\nPress `Escape` at any time to exit config mode. (Press twice if your were in remapping mode).\n\n## Application config\n\nOn this page you will be able to configure:\n\n- Fullscreen (effective after a restart but you can use `Alt + Enter` to toggle fullscreen).\n- Zoom level\n- Font options (see Alternate Fonts)\n- Key sensibility\n- Show FPS\n- FPS (select desired number of FPS)\n- Reconnect (when using only one M8 device, try to reconnect in case the connection is lost, the default behavior is to quit)\n- Device (when using multiple M8 devices, switch between them with this setting)\n\nPress `RESET` to restore the application settings to their last saved state.\n\nPress `SAVE` to save the application settings to the config file.\n\n## Theme config\n\nOn this page you will be able to configure the colors of the application:\n\n- Text:Default\n- Text:Value\n- Text:Title\n- Text:Info\n- Cursor\n- Screen Background\n- Velocity indicator (Background and Foreground)\n- Octave indicator (Background and Foreground)\n\nPress `RESET` to restore the theme settings to their last saved state.\n\nPress `SAVE` to save the theme settings to the config file.\n\n## M8 Keys\n\nOn this page you will be able to map the keys to control your M8:\n\n- UP\n- DOWN\n- LEFT\n- RIGHT\n- EDIT\n- OPTION\n- SHIFT\n- PLAY\n\nPress `REMAP` button to enter remap mode and redefine the keys.\n\nPress `Escape` to exit remapping mode.\n\nPress `RESET` to restore the M8 key settings to their last saved state.\n\nPress `SAVE` to save the M8 key settings to the config file.\n\n## RM8 Keys\n\nOn this page you will be able to map the keys to control the application:\n\n- KEYJAZZ (toggle keyjazz mode)\n- VELOCITY-\n- VELOCITY+\n- OCTAVE-\n- OCTAVE+\n\nPress `REMAP` button to enter remap mode and redefine the keys.\n\nPress `Escape` to exit remapping mode.\n\nPress `RESET` to restore the RM8 key settings to their last saved state.\n\nPress `SAVE` to save the RM8 key settings to the config file.\n\n## Joysticks\n\nOn the main config page you will be able to select your joystick.\n\nIf no joysticks are connected, you will only see this information:\n\n- N.JOYSTICKS 0\n\nIf you have at least one joystick connected, you will see this information:\n\n- N.JOYSTICKS N (for as many joysticks you have connected)\n- SEL.ID      0 (use this control to select your joystick)\n- NAME          (the name of the selected joystick)\n- GUID -----    (this is the unique identifier of your joystick, it will be used in the config file).\n- N.AXES      A (number of axes)\n- N.BUTTONS   B (number of buttons)\n- N.HATS      H (number of hats)\n\nPress `RESET` to restore ALL the settings of your joystick to their last saved state.\n\nPress `SAVE` to save the ALL the settings of your joystic to the config file.\n\n### Axes\n\nOn this page you will be able to configure the `axes` of your joystick.\n\nCurrently, only 6 axes are supported.\n\nFor each axis, you will be able to associate 2 commands (for negative and positive).\n\nYou will also be able to configure the axis sensibility in order to avoid spurious triggers.\n\nPress `RESET` to restore the Axes settings to their last saved state.\n\nPress `SAVE` to save the Axes settings to the config file.\n\n### Buttons\n\nOn this page you will be able to configure the `buttons` of your joystick.\n\nCurrently, only 20 buttons are supported.\nFor each button, you will be able to associate 1 command.\n\nPress `RESET` to restore the Buttons settings to their last saved state.\n\nPress `SAVE` to save the Buttons settings to the config file.\n\n### Hats\n\nOn this page you will be able to configure the `hats` of your joystick.\n\nCurrently, only one hat is supported.\n\nFor each state of the hat, you will be able to associate 1 command.\n\nThe states are:\n\n- UP\n- DOWN\n- LEFT\n- RIGHT\n- UP LEFT\n- UP RIGHT\n- DOWN LEFT\n- DOWN RIGHT\n\nPress `RESET` to restore the Hat settings to their last saved state.\n\nPress `SAVE` to save the Hat settings to the config file.\n\n### NOTE\n\nThe code for handling joysticks may be a bit buggy as I do not have enough experience in dealing with these devices.\n\n# Build\n\nThis project uses [rust](https://rust-lang.org)\n\nYou need to install rust and then issue: `cargo build --release` in the project's directory.\n\nThe program can then be found in the directory `target/release`.\n\nYou can strip symbols from this binary using `strip rm8`.\n\nYou can also compress the binary to gain some extra bytes using `upx --best --lzma rm8`.\n\n## Dependencies\n\nThis project uses:\n\n- [SDL2](https://www.libsdl.org)\n- [serialport](https://gitlab.com/susurrus/serialport-rs)\n- [serde](https://serde.rs/)\n- [ctrlc](https://github.com/Detegr/rust-ctrlc)\n\n# Similar projects\n\n[g0m8](https://github.com/turbolent/g0m8)\n\n[m8c](https://github.com/laamaa/m8c)\n\n[M8WebDisplay](https://github.com/derkyjadex/M8WebDisplay)\n\n# Font\n\nThis project uses a bitmap render of the font stealth57.ttf by Trash80.\n\nOriginal font available at https://fontstruct.com/fontstructions/show/413734/stealth57\n\nOriginally licensed under a Creative Commons Attribution Share Alike license, https://creativecommons.org/licenses/by-sa/3.0/\n\n## Alternate fonts\n\nI modified the bitmap rendered font to support both alternate zeros from the newer firmwares.\n\nHowever, as I do not yet have a real M8, I don't know if there are differences with the font on newer firmwares.\n\n# Info from discord\n\n[discord](https://discord.com/channels/709264126240620591/709264126664507393)\n\n\tM8 SLIP Serial Receive command list\n\t'S' - Theme Color command: 4 bytes. First byte is index (0 to 12), following 3 bytes is R, G, and B\n\t'C' - Joypad/Controller command: 1 byte. Represents all 8 keys in hardware pin order: LEFT|UP|DOWN|SELECT|START|RIGHT|OPT|EDIT\n\t'K' - Keyjazz note command: 1 or 2 bytes.\n\t       First byte is note, second is velocity, if note is zero stops note and does not expect a second byte.\n\t'D' - Disable command. Send this command when disconnecting from M8. No extra bytes following\n\t'E' - Enable display command: No extra bytes following\n\t'R' - Reset display command: No extra bytes following\n\n\tM8 SLIP Serial Send command list\n\t251 - Joypad key pressed state (hardware M8 only) - sends the keypress state as a single byte in hardware pin order:\n\t      LEFT|UP|DOWN|SELECT|START|RIGHT|OPT|EDIT\n\t252 - Draw oscilloscope waveform command:\n\t      zero bytes if off - uint8 r, uint8 g, uint8 b, followed by 320 byte value array containing the waveform\n\t253 - Draw character command: 12 bytes. char c, int16 x position, int16 y position,\n\t      uint8 r, uint8 g, uint8 b, uint8 r_background, uint8 g_background, uint8 b_background\n\t254 - Draw rectangle command: 12 bytes. int16 x position, int16 y position,\n\t      int16 width, int16 height, uint8 r, uint8 g, uint8 b\n\n\tso when connecting via serial, first send a E, then a R to get all the data back from M8\n\tits also important to end with a D\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynkayo%2Frm8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasynkayo%2Frm8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynkayo%2Frm8/lists"}