This is the port of the m8c project for rg35xx
.
Graphics interaction has been rewritten to use SDL1.2
calls, SDL_gfx
(stock
, Garlic OS
does not support SDL2
).
The code for joystick interaction has been removed, j2k.so
is used for input translation.
The code for interacting with libserialport
has been removed (stock
, Garlic OS
does not include the snd_usb_audio
kernel module).
All interaction occurs through libusb
, M8 command reception has been rewritten to be asynchronous because synchronous calls caused audio glitches.
# Clone toolchain
git clone git@github.com:edemirkan/rg35xx-toolchain.git toolchain
cd toolchain
# Clone project with deps
mkdir workspace
git clone git@github.com:thirdegg/m8c-rg35xx workspace/m8c-rg35xx
git clone git@github.com:ferzkopp/SDL_gfx.git workspace/m8c-rg35xx/deps/SDL_gfx
git clone git@github.com:libusb/libusb.git workspace/m8c-rg35xx/deps/libusb
# Run container with toolchain
make shell
# Build SDL_gfx
cd m8c-rg35xx/deps/SDL_gfx
./configure --host=arm-linux --enable-mmx=no --enable-shared=no
make
cd -
# Build libusb
cd m8c-rg35xx/deps/libusb
apt install -y libtool
./autogen.sh --host arm-linux --enable-udev=no --enable-shared=no
make
cd -
# Build project
make
exit
- Create a folder named
m8c/
on the flash drive inRoms/APPS/
. - Copy the executable file
m8c
from thetoolchain/workspace/m8c-rg35xx
folder into it. - Create a file
m8c.sh
in theRoms/APPS/
folder with the following contents:
#!/bin/sh
PROG_DIR=$(dirname "$0")/m8c
cd ${PROG_DIR}
HOME=${PROG_DIR}
LD_PRELOAD=./j2k.so ./m8c &>log.txt
sync
- Somewhere, find a
j2k.so
file compatible with the system and move it toAPPS/m8c/
. I used one from the compiled LittleGP Tracker project (I couldn't find links to the project for building j2k.so). - Insert the flash drive into the console, connect it via an
OTG
controller with M8. - Enjoy!
THE CODE MAY HAVE MEMORY LEAKS! Most of the code was written in haste, and debugging takes an unreasonably long time. Use at your own risk and I will be glad to receive your merge requests with fixes.