Skip to content
Open
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
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,40 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.extract_tag.outputs.tag_name }}
files: projects/*.zip

build-vita:
runs-on: ubuntu-latest
container: vitasdk/vitasdk:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7

- name: Install required libraries
run: |
apk add git zip unzip grep py3-pillow

- name: Build VITA
working-directory: projects
run: make PLATFORM=VITA

- name: Package build
working-directory: projects
run: |
curl -L -o lgpt-resources.zip https://github.com/djdiskmachine/lgpt-resources/archive/refs/tags/1.1.zip
unzip lgpt-resources.zip
mv lgpt-resources-1.1/*/ ./resources/packaging
rm -rf lgpt-resources*
./resources/packaging/lgpt_package.sh

- name: Extract Git tag name
id: extract_tag
run: echo "::set-output name=tag_name::${GITHUB_REF#refs/tags/}"
env:
GITHUB_REF: ${{ github.ref }}

- name: Upload build release
uses: softprops/action-gh-release@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.extract_tag.outputs.tag_name }}
files: ./projects/*.zip
31 changes: 31 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,34 @@ jobs:
name: LGPT-${{ github.job }}-${{ github.sha }}.zip
path: projects/*.zip
if-no-files-found: error

vita:
runs-on: ubuntu-latest
container: vitasdk/vitasdk:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7

- name: Install required libraries
run: |
apk add git zip unzip grep py3-pillow

- name: Build VITA
working-directory: projects
run: make PLATFORM=VITA

- name: Package build
working-directory: projects
run: |
curl -L -o lgpt-resources.zip https://github.com/djdiskmachine/lgpt-resources/archive/refs/tags/1.1.zip
unzip lgpt-resources.zip
mv lgpt-resources-1.1/*/ ./resources/packaging
rm -rf lgpt-resources*
./resources/packaging/lgpt_package.sh

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: LGPT-${{ github.job }}-${{ github.sha }}.zip
path: projects/*.zip
if-no-files-found: error
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Recommended reading to get you started:
| GARLICPLUS | MAYBE | NO | YES | Port by [Simotek](http://simotek.net)|
| RG35XXPLUS | MAYBE | NO | YES | Port by [Simotek](http://simotek.net)|
| MACOS | YES | YES | NO | Port by [clsource](https://genserver.social/clsource) |
| VITA | NO | NO | YES | |


* **Soundfont library is currently not ported for 64bit OS**
Expand Down
26 changes: 26 additions & 0 deletions projects/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ PSPDIRS := \
../sources/Adapters/SDL/GUI \
../sources/Adapters/SDL/Timer

VITADIRS := \
. \
../sources/Adapters/VITA/Main \
../sources/Adapters/VITA/FileSystem \
../sources/System/Process \
../sources/Adapters/VITA/System \
../sources/Adapters/Dummy/Midi \
../sources/Adapters/SDL2/Process \
../sources/Adapters/SDL2/Audio \
../sources/Adapters/SDL2/GUI \
../sources/Adapters/SDL2/Timer

GP32DIRS := .\
../sources/Adapters/GP32FileSystem \
../sources/Adapters/GP32Midi \
Expand Down Expand Up @@ -439,6 +451,20 @@ PSPFILES := \
SDLTimer.o \
PSPSystem.o

VITAFILES := \
VITAmain.o \
VITAFileSystem.o \
Process.o \
DummyMidi.o \
GUIFactory.o \
SDLGUIWindowImp.o \
SDLEventManager.o \
SDLAudioDriver.o \
SDLAudio.o \
SDLProcess.o \
SDLTimer.o \
VITASystem.o

#---------------------------------------------------------------------------------
# Windows
#---------------------------------------------------------------------------------
Expand Down
62 changes: 62 additions & 0 deletions projects/Makefile.VITA
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
-include $(PWD)/rules_base

DEFINES := \
-DPLATFORM_$(PLATFORM) \
-DBUFFERED \
-DCPP_MEMORY \
-DHAVE_STDINT_H \
-DSDL2 \
-DNDEBUG


DEVKIT = /usr/local/vitasdk/
CROSS_COMPILE=$(DEVKIT)bin/arm-vita-eabi-

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

INCLUDES = -Iinclude $(SDL_CFLAGS) -I$(PWD)/../sources
OPT_FLAGS = -O3 -g -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard -ftree-vectorize -ffast-math -fsigned-char -fno-optimize-sibling-calls -fno-rtti

TOOLPATH=$(DEVKIT)/bin
PREFIX := arm-bita-eabi-

CFLAGS := $(DEFINES) $(INCLUDES) $(SDL_CFLAGS) $(OPT_FLAGS)
CXXFLAGS:= $(CFLAGS) -std=gnu++03
LIBS := -lSDL_mixer $(SDL_LIBS)
LDFLAGS := $(LDFLAGS) -Wl,-q -Wl,-z,nocopyreloc
LIBDIRS := $(DEKVIT)/lib
LIBDIRS += $(DEKVIT)/arm-vita-eabi/lib
OUTPUT = ../lgpt-vita
EXTENSION:= vpk

#---------------------------------------------------------------------------------
%.vpk: %.bin %.sfo
vita-make-fself $< $@
vita-pack-vpk -s ../lgpt-vita.sfo -b $< \
--add ../resources/VITA/sce_sys=sce_sys \
$@
@echo built ... $(notdir $@)

#---------------------------------------------------------------------------------
%.sfo:
vita-mksfoex -s TITLE_ID="LGPT00001" "Piggy Tracker" $@

#---------------------------------------------------------------------------------
%.bin: %.velf
vita-make-fself $< $@
@echo built ... $(notdir $@)

#---------------------------------------------------------------------------------
%.velf: %.elf
vita-elf-create -s $< $@
@echo built ... $(notdir $@)

#---------------------------------------------------------------------------------

%.elf: $(OFILES)
$(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
6 changes: 6 additions & 0 deletions projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@ From repo root: cp pre-commit ./git/hooks
tar -xf rg35xx-plus-aarch64-SDL2-SDK-0.1.0.tar.xz
Build with:
make PLATFORM=RG35XXPLUS

##### VITA: Compile under linux/WSL2
Install vitasdk:
https://vitasdk.org/
Build with:
make PLATFORM=VITA
5 changes: 5 additions & 0 deletions projects/resources/VITA/INSTALL_HOW_TO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Install bin/lgpt-vita.vpk via vitashell

Copy samplelib, and optionally demo track (lgpt_BETA) and bin/*.xml configs to ux0:/data/lgpt/

Enjoy!
21 changes: 21 additions & 0 deletions projects/resources/VITA/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<CONFIG>
<DUMPEVENT value="YES"/><!--debug logging-->>
<SCREENMULT value="2"/> <!-- Does nothing on VITA -->

<!-- Default colors below -->
<BACKGROUND value = "1D0A1F" /> <!--Background color-->
<FOREGROUND value = "F5EBFF" /> <!--Text color-->
<BORDER value = "FF00DD" /> <!--Dialog border color-->
<HICOLOR1 value = "B750D1" /> <!--Highlight color 1-->
<HICOLOR2 value = "DB33DB" /> <!--Highlight color 2-->
<CURSORCOLOR value = "FF00DD" /> <!--Cursor color-->
<PLAYCOLOR value = "FF00DD" /> <!--Play indicator color-->
<MUTECOLOR value = "F5EBFF" /> <!--Mute indicator color-->
<SONGVIEW_FE value = "A55B8F" /> <!--Alt chain color1-->
<SONGVIEW_00 value = "853B6F" /> <!--Alt chain color2-->
<ROWCOLOR1 value = "BA28F9" /> <!--Row count color 1 -->
<ROWCOLOR2 value = "FF00FF" /> <!--Row count color 2-->
<ALTROWNUMBER value = "4"/> <!--How many rows before alternating-->
<FONTTYPE value = '0' /> <!-- '0':original '1':digital '2':monster 'CUSTOM': load custom_font.xml-->

</CONFIG>
32 changes: 32 additions & 0 deletions projects/resources/VITA/mapping.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
MAPPING FOR VITA
place in ux0:/data/lgpt/
rename to "mapping.xml" to use this
-->
<MAPPINGS>
<MAP src="but:0:8" dst="/event/up" />
<MAP src="but:0:6" dst="/event/down" />
<MAP src="but:0:7" dst="/event/left" />
<MAP src="but:0:9" dst="/event/right" />
<MAP src="but:0:2" dst="/event/a" />
<MAP src="but:0:1" dst="/event/b" />
<MAP src="but:0:5" dst="/event/rshoulder" />
<MAP src="but:0:4" dst="/event/lshoulder" />
<MAP src="but:0:11" dst="/event/start" />
<!-- Map select to rshoulder (LSDJ/M8 style
<MAP src="but:0:10" dst="/event/rshoulder" />
-->
<!--
Macro 1 "Square" button
Queue Phrases (Current row Phrases cue play)
<MAP src="but:0:3" dst="/event/lshoulder" />
<MAP src="but:0:3" dst="/event/start" />
-->
<!--
Macro 2 "Select" button
Solo phrase (hold to solo, release to unsolo)
Warning: will do weirdness if combined with other buttons! Use with caution ;)
<MAP src="but:0:10" dst="/event/a" />
<MAP src="but:0:10" dst="/event/rshoulder" />
-->
</MAPPINGS>
Binary file added projects/resources/VITA/sce_sys/icon0.png
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-use existing lgpt.png

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there bigger resolution version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm. updated. also updated startup screen artwork to match psp version

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions projects/resources/VITA/sce_sys/livearea/contents/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>

<livearea style="a1" format-ver="01.00" content-rev="1">
<livearea-background>
<image>bg.png</image>
</livearea-background>

<gate>
<startup-image>startup.png</startup-image>
</gate>
</livearea>
1 change: 1 addition & 0 deletions projects/resources/packaging/lgpt_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ collect_resources RG35XXPLUS lgpt-rg35xxplus.elf
collect_resources MACOS LittleGPTracker.app
# collect_resources RS97 lgpt.dge
# collect_resources STEAM lgpt.steam-exe
collect_resources VITA lgpt-vita.vpk
9 changes: 8 additions & 1 deletion sources/Adapters/SDL2/GUI/SDLGUIWindowImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ SDLGUIWindowImp::SDLGUIWindowImp(GUICreateWindowParams &p)
int screenWidth = 480;
int screenHeight = 272;
windowed_ = false;
#elif defined(PLATFORM_VITA)
int screenWidth = 960;
int screenHeight = 544;
windowed_ = false;
mult_ = 2;
#elif defined(RS97)
int screenWidth = 320;
int screenHeight = 240;
Expand Down Expand Up @@ -78,8 +83,10 @@ SDLGUIWindowImp::SDLGUIWindowImp(GUICreateWindowParams &p)
windowed_ = false;
}

#ifdef PLATFORM_PSP
#if defined(PLATFORM_PSP)
mult_ = 1;
#elif defined(PLATFORM_VITA)
mult_ = 2;
#else
int multFromSize=MIN(screenHeight/appHeight,screenWidth/appWidth);
const char *mult=Config::GetInstance()->GetValue("SCREENMULT") ;
Expand Down
2 changes: 1 addition & 1 deletion sources/Adapters/SDL2/Process/SDLProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int _SDLStartThread(void *argp) {
}

bool SDLProcessFactory::BeginThread(SysThread& thread) {
SDL_CreateThread(_SDLStartThread,&thread);
SDL_CreateThread(_SDLStartThread,"lgtp",&thread);
return true ;
}

Expand Down
Loading
Loading