Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RG35XX+ support #96

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions projects/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ RG35XXDIRS := . \
# ../sources/Adapters/RTMidi \ # Disabled for now
# ../sources/Externals/RtMidi

RG35XXPLUSDIRS := . \
../sources/Adapters/DINGOO/Main \
../sources/Adapters/Unix/FileSystem \
../sources/System/Process \
../sources/Adapters/Unix/Process \
../sources/Adapters/DINGOO/System \
../sources/Adapters/Dummy/Midi \
../sources/Adapters/SDL/Audio \
../sources/Adapters/SDL/Process \
../sources/Adapters/SDL/GUI \
../sources/Adapters/SDL/Timer

PSPDIRS := . \
../sources/Adapters/PSP/Main \
../sources/Adapters/PSP/FileSystem \
Expand Down Expand Up @@ -334,6 +346,21 @@ RG35XXFILES := GPSDLMain.o \
# RTMidiOutDevice.o \
# RTMidiInDevice.o \

RG35XXPLUSFILES := GPSDLMain.o \
UnixFileSystem.o \
SDLAudio.o \
Process.o \
UnixProcess.o \
SDLAudioDriver.o \
MIYOOSystem.o \
DINGOOEventQueue.o \
SDLProcess.o \
SDLTimer.o \
GUIFactory.o \
SDLEventManager.o \
DummyMidi.o \
SDLGUIWindowImp.o

PSPFILES := PSPmain.o \
PSPFileSystem.o \
Process.o \
Expand Down
36 changes: 36 additions & 0 deletions projects/Makefile.RG35XXPLUS
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-include $(PWD)/rules_base
STRIP = $(CROSS_COMPILE)strip

%.elf: $(OFILES)
$(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
@$(STRIP) $@

# compiled using the https://github.com/shauninman/union-rg35xxplus-toolchain
# Docker image

DEVKIT = /opt/rg35xxplus-toolchain/usr/
CROSS_COMPILE=$(DEVKIT)bin/arm-buildroot-linux-gnueabihf-

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
SYSROOT := $(shell $(CROSS_COMPILE)gcc --print-sysroot)
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs)

DEFINES = -DHAVE_STDINT_H -D_NDEBUG -D_NO_JACK_ -I$(PWD)/../sources -DCPP_MEMORY $(SDL_CFLAGS) $(SDL_LIBS) -DBUFFERED
INCLUDES = -Iinclude $(SDL_CFLAGS)
OPT_FLAGS = -O3 -Ofast -fdata-sections -fdata-sections -fno-common -fno-PIC -flto -marm -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv8-a

OUTPUT = ../lgpt-rg35xxplus

TOOLPATH=$(DEVKIT)/usr/bin
PREFIX := arm-linux-gnueabihf-

CFLAGS := $(DEFINES) $(INCLUDES) $(OPT_FLAGS) -Wall
CXXFLAGS:= $(CFLAGS) -std=gnu++03

EXTENSION:= elf

LIBS := -lSDL -lpthread
LIBDIRS := $(DEKVIT)/usr/lib
LIBDIRS += $(DEKVIT)/usr/include
9 changes: 8 additions & 1 deletion projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using nano ~/.bashrc, add
export PSPDEV=~/pspdev
export PATH=$PATH:$PSPDEV/bin
at the end, then
at the end, then
source ~/.bashrc
Build with:
make PLATFORM=PSP
Expand Down Expand Up @@ -70,3 +70,10 @@
apt install -y python3 python3-pillow
make PLATFORM=RG35XX

##### RG35XXPLUS: Compile in shauninman toolchain docker
clone:
https://github.com/shauninman/union-rg35xxplus-toolchain
enter docker:
make shell
Build with:
make PLATFORM=RG35XXPLUS
22 changes: 22 additions & 0 deletions projects/resources/RG35XXPLUS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Garlic OS

## Installation

1. Copy lgpt-rg35xxplus.elf, config.xml, samplelib, lgpt_BETA to /SdCard/Roms/APPS/lgpt/
2. Copy LittleGPTracker.png to /SdCard/Roms/Imgs/
3. Copy garlicos/LittleGPTracker.sh to /SdCard/Roms/

## Usage

Open "Consoles -> Apps -> LittleGPTracker".

# muOS

## Installation

1. Copy lgpt-rg35xxplus.elf, config.xml, samplelib, lgpt_BETA to /mnt/mmc/MUOS/application/.lgpt/
3. Copy muos/LittleGPTracker.sh to /mnt/mmc/MUOS/application/

## Usage

Open "Applications -> LittleGPTracker".
6 changes: 6 additions & 0 deletions projects/resources/RG35XXPLUS/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "LittleGPTracker",
"icon": "lgpt.png",
"launch": "launch.sh",
"description": "16bit sample-based tracker"
}
17 changes: 17 additions & 0 deletions projects/resources/RG35XXPLUS/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<CONFIG>
<ROOTFOLDER value="/mnt/mmc/MUOS/application/.lgpt/"/>
<SAMPLELIB value="/mnt/mmc/MUOS/application/.lgpt/samplelib/"/>
<SCREENMULT value='2'/>
<KEY_A value="key:0:a" />
<KEY_B value="key:0:b" />
<KEY_LEFT value="key:0:q" />
<KEY_RIGHT value="key:0:d" />
<KEY_DOWN value="key:0:s" />
<KEY_UP value="key:0:w" />
<KEY_LSHOULDER value="key:0:h" />
<KEY_RSHOULDER value="key:0:l" />
<KEY_START value="key:0:m" />
<KEYDELAY value="200"/>
<KEYREPEAT value="100" />
<DUMPEVENT value="NO" />
</CONFIG>
6 changes: 6 additions & 0 deletions projects/resources/RG35XXPLUS/garlicos/LittleGPTracker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
progdir=$(dirname "$0")/lgpt
cd $progdir
HOME=$progdir
LD_LIBRARY_PATH=$PROGDIR:$LD_LIBRARY_PATH ./lgpt-rg35xxplus.elf > ./lgpt.log
sync
Binary file added projects/resources/RG35XXPLUS/lgpt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions projects/resources/RG35XXPLUS/mapping.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<MAPPINGS>
<MAP src="hat:0:0:0" dst="/event/up" />
<MAP src="hat:0:0:2" dst="/event/down" />
<MAP src="hat:0:0:3" dst="/event/left" />
<MAP src="hat:0:0:1" dst="/event/right" />
<MAP src="but:0:3" dst="/event/a" />
<MAP src="but:0:4" dst="/event/b" />
<MAP src="but:0:8" dst="/event/rshoulder" />
<MAP src="but:0:7" dst="/event/lshoulder" />
<MAP src="but:0:10" dst="/event/start" />
</MAPPINGS>

15 changes: 15 additions & 0 deletions projects/resources/RG35XXPLUS/muos/LittleGPTracker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
echo app >/tmp/act_go

. /opt/muos/script/var/device/storage.sh

export LD_LIBRARY_PATH=/usr/lib32

PROGDIR="$DC_STO_ROM_MOUNT/MUOS/application/.lgpt"
cd $PROGDIR
HOME=$PROGDIR

echo "lgpt" >/tmp/fg_proc

LD_LIBRARY_PATH=$PROGDIR:$LD_LIBRARY_PATH ./lgpt-rg35xxplus.elf &> lgpt.log
sync
Loading