Giter Site home page Giter Site logo

m8c's Introduction

m8c

Introduction

The Dirtywave M8 Tracker is a portable sequencer and synthesizer, featuring 8 tracks of assignable instruments such as FM, waveform synthesis, virtual analog, sample playback, and MIDI output. It is powered by a Teensy micro-controller and inspired by the Gameboy tracker Little Sound DJ.

While Dirtywave makes new batches of units available on a regular basis, M8 is sometimes sold out due to the worldwide chip shortage and high demand of the unit. To fill this gap and and to allow users to freely test this wonderful tracker, Timothy Lamb was kind enough to make the M8 Headless available to everyone.

If you like the M8 and you gel with the tracker workflow, please support Dirtywave by purchasing the actual unit. You can check its availability here. Meanwhile, you can also subscribe to Timothy Lamb's Patreon.

m8c is a client for Dirtywave M8 tracker's headless mode. The application should be cross-platform ready and can be built in Linux, Windows (with MSYS2/MINGW64) and Mac OS.

Many thanks to:

  • Trash80 for the great M8 hardware and the original font (stealth57.ttf) that was converted to a bitmap for use in the progam.
  • driedfruit for a wonderful little routine to blit inline bitmap fonts, https://github.com/driedfruit/SDL_inprint/
  • marcinbor85 for the slip handling routine, https://github.com/marcinbor85/slip
  • turbolent for the great Golang-based g0m8 application, which I used as reference on how the M8 serial protocol works.
  • Everyone who's contributed to m8c!

Disclaimer: I'm not a coder and hardly understand C, use at your own risk :)


Installation

Windows / MacOS

There are prebuilt binaries available in the releases section for Windows and recent versions of MacOS.

Linux

There are packages available for Fedora Linux and NixOS, or you can build the program from source.

Fedora

sudo dnf copr enable laamaa/m8c
sudo dnf install m8c

NixOS

nix-env -iA m8c-stable -f https://github.com/laamaa/m8c/archive/refs/heads/main.tar.gz

Building from source code

Install dependencies

You will need git, gcc, pkg-config, make and the development headers for libsdl2 and libserialport.

Linux (Ubuntu)
sudo apt update && sudo apt install -y git gcc pkg-config make libsdl2-dev libserialport-dev
MacOS

This assumes you have installed brew

brew update && brew install git gcc make sdl2 libserialport pkg-config

Download source code

mkdir code && cd code
git clone https://github.com/laamaa/m8c.git

Build the program

cd m8c
make

Start the program

Connect the M8 or Teensy (with headless firmware) to your computer and start the program. It should automatically detect your device.

./m8c

If the stars are aligned correctly, you should see the M8 screen.

Choosing a preferred device

When you have multiple M8 devices connected and you want to choose a specific one or launch m8c multiple times, you can get the list of devices by running

./m8c --list

2024-02-25 18:39:27.806 m8c[99838:4295527] INFO: Found M8 device: /dev/cu.usbmodem124709801
2024-02-25 18:39:27.807 m8c[99838:4295527] INFO: Found M8 device: /dev/cu.usbmodem121136001

And you can specify the preferred device by using

./m8c --dev /dev/cu.usbmodem124709801

Keyboard mappings

Keys for controlling the progam:

  • Up arrow = up
  • Down arrow = down
  • Left arrow = left
  • Right arrow = right
  • z / left shift = shift
  • x / space = play
  • a / left alt = opt
  • s / left ctrl = edit

Additional controls:

  • Alt + enter = toggle full screen / windowed
  • Alt + F4 = quit program
  • Delete = opt+edit (deletes a row)
  • Esc = toggle keyjazz on/off
  • r / select+start+opt+edit = reset display (if glitches appear on the screen, use this)

Keyjazz

Keyjazz allows to enter notes with keyboard, oldschool tracker-style. The layout is two octaves, starting from keys Z and Q. When keyjazz is active, regular a/s/z/x keys are disabled. The base octave can be adjusted with numpad star/divide keys and the velocity can be set

  • Numpad asterisk (*): increase base octave
  • Numpad divide (/): decrease base ooctave
  • Numpad plus (+): increase velocity
  • Numpad minus (-): decrease velocity

Gamepads

The program uses SDL's game controller system, which should make it work automagically with most gamepads. On startup, the program tries to load a SDL game controller database named gamecontrollerdb.txt from the same directory as the config file. If your joypad doesn't work out of the box, you might need to create custom bindings to this file, for example with SDL2 Gamepad Tool.

Audio

Experimental audio routing support can be enabled by setting the config value "audio_enabled" to "true". The audio buffer size can also be tweaked from the config file for possible lower latencies. If the right audio device is not picked up by default, you can use a specific audio device by using "audio_output_device" config parameter.

Config

Application settings and keyboard/game controller bindings can be configured via config.ini.

If not found, the file will be created in one of these locations:

  • Windows: C:\Users\<username>\AppData\Roaming\m8c\config.ini
  • Linux: /home/<username>/.local/share/m8c/config.ini
  • MacOS: /Users/<username>/Library/Application Support/m8c/config.ini

See the config.ini.sample file to see the available options.

Enjoy making some nice music!


FAQ

  • When starting the program, something like the following appears and the program does not start:
$ ./m8c
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
ERROR: Error: Failed: Permission denied

This is likely caused because the user running m8c does not have permission to use the serial port. The eaiest way to fix this is to add the current user to a group with permission to use the serial port.

On Linux systems, look at the permissions on the serial port shown on the line that says "Found M8 in":

$ ls -la /dev/ttyACM1
crw-rw---- 1 root dialout 166, 0 Jan  8 14:51 /dev/ttyACM0

In this case the serial port is owned by the user 'root' and the group 'dialout'. Both the user and the group have read/write permissions. To add a user to the group, run this command, replacing 'dialout' with the group shown on your own system:

sudo adduser $USER dialout

You may need to log out and back in or even fully reboot the system for this change to take effect, but this will hopefully fix the problem. Please see this issue for more details.

m8c's People

Contributors

bloopclick avatar daniel214 avatar ferrix avatar gunnbr avatar jasonporritt avatar jeffalyanak avatar jmolero avatar jonnekokkonen avatar laamaa avatar lownin avatar m-hayabusa avatar ryandam avatar smootalicious avatar spaceykasey avatar trash80 avatar v3rm0n avatar warrobot10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m8c's Issues

Termux and/or Android support

Thanks for creating m8c! It's an amazing experience to try it out together with a Teensy 4.1 on Linux, and a great way to check out the Dirtywave M8 and "try before you buy".

I tried packaging m8c for Termux, but apparently packaging libserialport was not straightforward: termux/termux-packages#9315

I also tried packaging m8c as an SDL2 application, for Android (as an .apk file), but including SDL2 in the various available Android build systems was more of a hassle than I had anticipated.

This is a feature request for somehow, either through Termux or as an Android application, support m8c on Android.

Can't compile on pocketchip ARM

attempting to compile on a arm device running debian Stretch this is use KainXKitsune on the discord. I get errors of undefined reference to and a lot of them are egl_window "wl_egl_window_get_attached_sized" for example.

app bundle won't run on macos 10.14

expected: double-clicking downloaded app runs m8c.

actual:

  • it displays incompatible app icon
    Screenshot 2022-11-06 at 19 46 10
  • double-clicking the app shows a "This application requires macOS 10.13 or later" prompt.
    Screenshot 2022-11-06 at 19 46 27
  • running from the console segfaults:
$ ./m8c 
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Reading config /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Writing config file to /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Looking for USB serial devices.
2022-11-06 19:52:08.039 m8c[11889:201100] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:52:08.040 m8c[11889:201100] INFO: Opening port.
Segmentation fault: 11

xattr -r -d com.apple.quarantine path/to/app.app doesn't fix it

but works from source

compiling from source, e.g. make and then ./m8c works fine:

...
2022-11-06 19:54:00.637 m8c[11915:202571] INFO: Looking for USB serial devices.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Opening port.
2022-11-06 19:54:01.098 m8c[11915:202571] INFO: Looking for game controllers
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Users/g/Library/Application Support/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Volumes/data/_music/M8/headless/m8c/src/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Found 37 game controller mappings
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Enabling and resetting M8 display
2022-11-06 19:54:01.115 m8c[11915:202571] INFO: Reset display
2022-11-06 19:55:05.653 m8c[11915:202571] INFO: Received msg_quit from input device.
2022-11-06 19:55:05.664 m8c[11915:202571] INFO: Shutting down
2022-11-06 19:55:05.667 m8c[11915:202571] INFO: Disconnecting M8

Unable to open M8C

nathan@nathan-laptop:~/code/m8c$ ./m8c
INFO: Reading config /home/nathan/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM0.
INFO: Opening port.
INFO: Enabling and resetting M8 display
INFO: Reset display
dbus[7724]: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../../dbus/dbus-message.c line 1362.
This is normally a bug in some application using the D-Bus library.

D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
nathan@nathan-laptop:~/code/m8c$

FR: Supporting non button sdl keys?

I have an 8bitdo controller, with the following mappings

Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,"

How do I map the h0.8 etc ones? It doesn't seem to support them in the ini. If I map the directions to a regular button it seems to work as intended.

[Raspberry Pi] Crash of the gui when using the fm synth

Thank you for this client!!. I have a problem when using the FM synths. As soon as I set complex waveforms, the gui disappears but the sound stays on. This happens particularly quickly when using noise. I can start the m8c again from the terminal, but after a few seconds it crashes again. Could it be because I am using an RPi4 instead of an RPi3b+?

m8c the answer is Abort

Hello,
m8c seems not working. After running m8c the response is Abort.

pi@raspberrypi:~ $ m8c /dev/ttyAMC0
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM0.
INFO: Opening port.
Abandon
pi@raspberrypi:~ $

[SHIFT]+[OPTION] on gamepad doesn't enter selection mode?

Hi! I'm just getting started with my Raspberry Pi headless setup with an 8BitDo NS30 pro controller. In qjoypad, I can see my buttons are reflected exactly as they should be, and I can press shift and option at the same time and see them both light up.

However, in m8c, this combo does not seem to do anything. Pressing and holding both at the same time, my arrows move between screens as if only shift was held. No magenta highlight as I get with the keyboard. I notice [SHIFT]+[EDIT] does paste as expected, so not all combos seem to have this issue.

Have I missed something? Any guess what might be happening? m8c seems awesome, otherwise. I really appreciate the work going into it!!

Windows 32 Bit Build?

Is it possible to compile M8C to run on Windows 32 bit systems? If so, how would I go about that?

Thanks!

Crash when selecting parameters to modulate

Hi !

First of all, thank you to the creators of this great software.

On my Zorin 16 OS, it works very well but crashes every time I go to the screen where you select which parameter will be parameter-locked (the screen with the names of all available parameters). I hope I'm clear... I know it's M8c crashing and not the M8, because the music continues to play, and when I relaunch m8c I'm still on the same page (and it crashes again after a few seconds if I don't leave this screen very fast).

Thank you !

CRITICAL: Error -2 reading serial

I quite often get the following error and m8c disconnects. I've managed to reproduce this when using samples, it'll happen after about 20 seconds of playback. Other times it appears out of nowhere with only using the FM synth.

Is there any way to get more information on what caused the error? I thought it might be the SD card isn't up to scratch but I'm using a Sandisk Ultra 32GB and used the SD card formatter to format it in Fat32 format.

CRITICAL: Error -2 reading serial

EDIT:

I'm using MacOS Monteray on a decent spec recent i7 with far too much ram. I'm not sure the machine is the issue though.

I'm running M8_V2_5_3B_HEADLESS

Fullscreen flag in config.ini not working

I'm getting my headless M8 up and running on a raspberry pi, with the intent of having a fully standalone unit. In pursuit of this, I have set up the m8c application to run at startup, and I'm trying to find a way to get it to start automatically in fullscreen mode, as the display I'm using is a Hyper Pixel 4 inch display that hangs off the GPIO on the host Pi, and screen real estate is limited. I have tried changing the fullscreen flag to true in m8c's config.ini, which didn't work. Also tried changing the c.init_fullscreen variable in config.c to "1", with no luck, either. Additionally, I have tried executing m8c with flags from the command line (-fs, -maximize, -fullscreen; all with both one and two dashes preceeding), which had no effect.

Any thoughts on how I can get m8c to start up in fullscreen when starting the application from a linux autostart .desktop entry? Thanks so much for making this project available! Loving my headless m8, so far :-D

can't run m8c on Ubuntu 20.04.4 LTS

so as a Side effect of trying to get m8c to run on the pocketchip, I gave it a go on my laptop and it compiles fine and everything it finds the m8 then I get

ERROR: Error: Failed: Inappropriate ioctl for device

not really sure what causes this. This doesn't happen on debian 11. I may try my other machine running lubuntu

Audio routing startup script

I have Jackd routing the audio, I added the commands from the readme in a script and it works when I run the script manually. However when I try to add this script to be executed at boot by rc.local it just doesn't want to run. Is there some trick to this? It's pretty annoying to have to initiate the script manually in order to get some sound after every restart. Any tips?

Idea/Help - text/console only mode

I am using m8c with great success. Thank you!

I have installed it on a norns and it functions with a forwarded X display, however it is very laggy and the keyboard controls are often doubled. I'm not asking for a fix.

I wondered if a Text mode could be done - possibly with ncurses. I can try myself, but I can't figure out how to interpret the display stream to convert over to a text display. I may be completely mistaken in taking this approach, but I wondered if you thought it may be possible and point me in the right direction.

Steam Deck compatibility?

I know it probably won't and I doubt it has been tested yet but does anyone have and Idea if it will work on the Steam Deck from Valve? I should have mine in the coming months and I feel like it would be the perfect device to run the M8 headless.

Pop!_OS serial ioctl

I've seen a couple people have this issue with Pop_OS, which must be doing something a bit differently than Debian in its serial setup.

I can confirm that the device is readable and writeable by the user, since screen and minicom work fine.

Debug is as follows:

INFO: Opening port.
sp: sp_open(0x55bf311d1b30, 0x3) called.
sp: Opening port /dev/ttyACM0.
sp: get_config(0x55bf311d1b30, 0x7fff7e9c83e0, 0x7fff7e9c83b0) called.
sp: Getting configuration for port /dev/ttyACM0.
sp: get_flow(3, 0x7fff7e9c83e0) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed: Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0x55bf311d1b30) called.
sp: Closing port /dev/ttyACM0.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
Aborted (core dumped)

I'll investigate and look towards implementing a fix.

using the dirty flag in render causes poor framerate on Ondroid Go devices

Per https://discord.com/channels/709264126240620591/879940212690669578/982689334090158120
(@aquarat on discord) discovered that using the dirtyflag in https://github.com/laamaa/m8c/blob/main/render.c#L221 seems to cause very low framerate on Odroid Go (Advance,Super) devices running Ubuntu 18.04 distro from the vendor (Hardkernel).

I'm not sure why this would be the case, but for the time being, @laamaa would you be open to having a config flag to allow disabling the use of that if, maybe even a C preprocessor macro for now? defaulted to off but so anyone building for these devices could set it rather than maintaining a fork.

default keymap reflexion

hello,

After a while using m8c I've found it was easier to deal with this alternative keymap:

image

key_select_alt=29
key_start_alt=27
key_opt_alt=4
key_edit_alt=22

Similarly, with a controller like those cheap USB SNES like:

image

gamepad_select=0
gamepad_start=1
gamepad_opt=2
gamepad_edit=3

why?

because the original DirtyWave M8 is using this key setting:

image

This way, with this keymap, you'll get a closer experience. On the original PC keymap the row with option+edit and the row with shitf+play are inverted, which is a bit confusing when reading the documentation with the shortcuts for example...

just my 2 cents

btw many thanks for m8c, it's an awesome frontend to my teensy!

Reduce coupling on libserialport

I'm building m8c for Android downstream, with a hope of upstreaming it at some point if there is interest. Unrooted Androids do not seem to have direct access to serial ports, instead you get the USB device you want to use in Java side (dealing with permissions etc.),open a connection, claim the CDC/ACM interfaces and pass the file descriptor to the native code where you can communicate with the device.
Since libserialport doesn't deal with file descriptors, something like libusb needs to be used instead.

So my proposal is to:

  • Move dependencies to libserialport.h to one file
  • Create more abstract functions to deal with serial init, read and write. Something that doesn't have dependencies on libserialport.h
  • Use something like #ifdef LIBSERIALPORT in the .c files to turn libserialport dependency on and off.

I'm not a C developer in any capacity so ideas are welcome.

This is something I'm going to do anyway so it's not a request for somebody else to do it, more like a check to see if I should attempt to upstream it as well.

fullscreen=true doesn't work on raspberry bullseye

Setting fullscreen = true in /home/<username>/.local/share/m8c/config.ini doesn't trigger the program to start in fullscreen mode and disables the alt + enter control.

Model: Raspberry Pi 4 Model B Rev 1.2
OS: Debian GNU/Linux 11 (bullseye)

Can't get Quit to work when mapped to gamecontroller button

I've mapped gamepad_quit to one of the buttons on my gamepad (GPI Case 2 which appears as an xbox controller), but it doesn't do anything. If I pair a different control, like edit, to the same button, that works, so the button is correct.

m8c failed to running

Hallo,
Here is the error.

cpi@fei20th:~/app/m8c$ ./m8c
INFO: Reading config /home/cpi/.local/share/m8c/config.ini
INFO: Writing config file to /home/cpi/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
ERROR: Error: Failed: Inappropriate ioctl for device

cpi@fei20th:~/app/m8c$ sudo LIBSERIALPORT_DEBUG=1 m8c
INFO: Reading config /root/.local/share/m8c/config.ini
INFO: Writing config file to /root/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
sp: sp_list_ports(0xffffdc5b6650) called.
sp: Enumerating ports.
sp: Enumerating tty devices.
sp: Iterating over results.
sp: Found device /dev/ttyS6.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS4.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS2.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyACM0.
sp: Found port /dev/ttyACM0.
sp: sp_get_port_by_name(/dev/ttyACM0, 0xaaaac42fb300) called.
sp: Building structure for port /dev/ttyACM0.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: Found device /dev/ttyS7.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS5.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS3.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyS1.
sp: serial8250 device, attempting to open.
sp: Port type is unknown, skipping.
sp: Found device /dev/ttyACM1.
sp: Found port /dev/ttyACM1.
sp: sp_get_port_by_name(/dev/ttyACM1, 0xaaaac42fb308) called.
sp: Building structure for port /dev/ttyACM1.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_list_ports returning SP_OK.
sp: sp_get_port_transport(0xaaaac42fb6d0) called.
sp: sp_get_port_transport returning 1.
sp: sp_get_port_usb_vid_pid(0xaaaac42fb6d0) called.
sp: sp_get_port_usb_vid_pid returning SP_OK.
sp: sp_get_port_transport(0xaaaac42fb7d0) called.
sp: sp_get_port_transport returning 1.
sp: sp_get_port_usb_vid_pid(0xaaaac42fb7d0) called.
sp: sp_get_port_usb_vid_pid returning SP_OK.
sp: sp_get_port_name(0xaaaac42fb7d0) called.
sp: sp_get_port_name returning /dev/ttyACM1.
INFO: Found M8 in /dev/ttyACM1.
sp: sp_copy_port(0xaaaac42fb7d0, 0xffffdc5b6648) called.
sp: Copying port structure.
sp: sp_get_port_by_name(/dev/ttyACM1, 0xffffdc5b6648) called.
sp: Building structure for port /dev/ttyACM1.
sp: get_port_details returning SP_OK.
sp: sp_get_port_by_name returning SP_OK.
sp: sp_copy_port returning 0.
sp: sp_free_port_list(0xaaaac42fb300) called.
sp: Freeing port list.
sp: sp_free_port(0xaaaac42fb6d0) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port(0xaaaac42fb7d0) called.
sp: Freeing port structure.
sp: sp_free_port returning.
sp: sp_free_port_list returning.
INFO: Opening port.
sp: sp_open(0xaaaac42fb8d0, 0x3) called.
sp: Opening port /dev/ttyACM1.
sp: get_config(0xaaaac42fb8d0, 0xffffdc5b6590, 0xffffdc5b6568) called.
sp: Getting configuration for port /dev/ttyACM1.
sp: get_flow(3, 0xffffdc5b6590) called.
sp: Getting advanced flow control.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
sp: get_flow returning SP_ERR_FAIL: Getting termiox failed: Inappropriate ioctl for device.
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.
sp: get_config returning SP_ERR_FAIL.
sp: sp_close(0xaaaac42fb8d0) called.
sp: Closing port /dev/ttyACM1.
sp: sp_close returning SP_OK.
sp: sp_open returning SP_ERR_FAIL.
sp: sp_last_error_message() called.
sp: sp_last_error_message returning Inappropriate ioctl for device.
ERROR: Error: Failed: Inappropriate ioctl for device
sp: sp_free_error_message(Inappropriate ioctl for device) called.
sp: sp_free_error_message returning.

Performance issues on raspberry pi 2, 3, etc

Hey! I wanted to mention I had heard this wasn't working great on anything older than a RPI4. I had a spare RP2 that I wanted to attempt to run this on because I just didn't think it should be particularly resource intensive and found that it was maxing the CPU and barely functional. It looks like the Accelerated SDL2 render is the cause.
I switched the SDL renderer const in renderer.c to SDL_RENDERER_SOFTWARE and now it runs perfect on a PI2 using only like 10% CPU.
Thanks!
Kasey

License questions

Hi.

I like your project and wanted to create an AUR (Arch Linux user repository) package for it. But that requires me to put the package license in the metadata but I could not find information on which license this project uses.

m8c autorun for RPI

sudo /home/pi/code/m8c/m8c - not working

maybe I'm doing something wrong?

Linux / m8c fails to start at "INFO: Reset display" / invalid ioctl

Some users have reported problems with starting m8c:

pi@retropie:~/code/m8c $ ./m8c
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
INFO: Enabling and resetting M8 display
INFO: Reset display

and after that, the program returns into terminal.

Sometimes the error might look something like:

INFO: Reading config /home/jonne/.local/share/m8c/config.ini
INFO: Writing config file to /home/jonne/.local/share/m8c/config.ini
INFO: Looking for USB serial devices.
INFO: Found M8 in /dev/ttyACM1.
INFO: Opening port.
ERROR: Error: Failed: Inappropriate ioctl for device

This seems to be a conflict with some Linux kernel versions and libserialport (sigrokproject/libserialport@6f9b03e) and the error can be mitigated by building libserialport from sources:

  1. Remove existing libserialport packages
    for example, on Debian based systems apt-get remove libserialport0 libserialport-dev
  2. Build libserialport from source code according to instructions in https://github.com/sigrokproject/libserialport
  3. Rebuild m8c

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.