You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
Initial commit
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.bin binary
|
||||
37
.github/workflows/nightly.yml
vendored
Normal file
37
.github/workflows/nightly.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Build Pico Launcher
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["develop"]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
pull_request:
|
||||
branches: ["develop"]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pico_launcher:
|
||||
runs-on: ubuntu-latest
|
||||
container: skylyrac/blocksds:slim-v1.13.1
|
||||
name: Build Pico Launcher
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Run build script
|
||||
run: |
|
||||
make
|
||||
- name: Publish build to GH Actions
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: |
|
||||
_pico/
|
||||
LAUNCHER.nds
|
||||
name: Pico Launcher
|
||||
49
.gitignore
vendored
Normal file
49
.gitignore
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# Ignore build directories #
|
||||
############################
|
||||
Debug/
|
||||
Release/
|
||||
build/
|
||||
out/
|
||||
|
||||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.d
|
||||
*.map
|
||||
*.o
|
||||
*.so
|
||||
|
||||
# Packages #
|
||||
############
|
||||
# it's better to unpack these files and commit the raw source
|
||||
# git has its own built in compression methods
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
|
||||
# Logs and databases #
|
||||
######################
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
*.nds
|
||||
*.elf
|
||||
*.a
|
||||
.vscode/
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "libs/libtwl"]
|
||||
path = libs/libtwl
|
||||
url = https://github.com/Gericom/libtwl.git
|
||||
17
LICENSE.txt
Normal file
17
LICENSE.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
Copyright (c) 2025 LNH team
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
110
Makefile
Normal file
110
Makefile
Normal file
@@ -0,0 +1,110 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# SPDX-FileContributor: Antonio Niño Díaz, 2023
|
||||
|
||||
BLOCKSDS ?= /opt/blocksds/core
|
||||
BLOCKSDSEXT ?= /opt/blocksds/external
|
||||
|
||||
export LIBTWL ?= $(shell pwd)/libs/libtwl
|
||||
|
||||
# User config
|
||||
# ===========
|
||||
|
||||
NAME := LAUNCHER
|
||||
|
||||
GAME_TITLE := Pico Launcher
|
||||
GAME_AUTHOR := LNH team
|
||||
GAME_ICON := icon.bmp
|
||||
|
||||
# DLDI and internal SD slot of DSi
|
||||
# --------------------------------
|
||||
|
||||
# Root folder of the SD image
|
||||
SDROOT := sdroot
|
||||
# Name of the generated image it "DSi-1.sd" for no$gba in DSi mode
|
||||
SDIMAGE := image.bin
|
||||
|
||||
# Source code paths
|
||||
# -----------------
|
||||
|
||||
# A single directory that is the root of NitroFS:
|
||||
NITROFSDIR :=
|
||||
|
||||
# Tools
|
||||
# -----
|
||||
|
||||
MAKE := make
|
||||
RM := rm -rf
|
||||
|
||||
# Verbose flag
|
||||
# ------------
|
||||
|
||||
ifeq ($(VERBOSE),1)
|
||||
V :=
|
||||
else
|
||||
V := @
|
||||
endif
|
||||
|
||||
# Directories
|
||||
# -----------
|
||||
|
||||
ARM9DIR := arm9
|
||||
ARM7DIR := arm7
|
||||
|
||||
# Build artfacts
|
||||
# --------------
|
||||
|
||||
ROM := $(NAME).nds
|
||||
|
||||
# Targets
|
||||
# -------
|
||||
|
||||
.PHONY: all clean arm9 arm7 dldipatch sdimage checklibtwl
|
||||
|
||||
all: $(ROM)
|
||||
|
||||
clean:
|
||||
@echo " CLEAN"
|
||||
$(V)$(MAKE) -f Makefile.arm9 clean --no-print-directory
|
||||
$(V)$(MAKE) -f Makefile.arm7 clean --no-print-directory
|
||||
$(V)$(RM) $(ROM) build $(SDIMAGE)
|
||||
|
||||
arm9: checklibtwl
|
||||
$(V)+$(MAKE) -f Makefile.arm9 --no-print-directory
|
||||
|
||||
arm7: checklibtwl
|
||||
$(V)+$(MAKE) -f Makefile.arm7 --no-print-directory
|
||||
|
||||
checklibtwl:
|
||||
$(MAKE) -C $(LIBTWL)
|
||||
|
||||
ifneq ($(strip $(NITROFSDIR)),)
|
||||
# Additional arguments for ndstool
|
||||
NDSTOOL_ARGS := -d $(NITROFSDIR)
|
||||
|
||||
# Make the NDS ROM depend on the filesystem only if it is needed
|
||||
$(ROM): $(NITROFSDIR)
|
||||
endif
|
||||
|
||||
# Combine the title strings
|
||||
ifeq ($(strip $(GAME_SUBTITLE)),)
|
||||
GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_AUTHOR)
|
||||
else
|
||||
GAME_FULL_TITLE := $(GAME_TITLE);$(GAME_SUBTITLE);$(GAME_AUTHOR)
|
||||
endif
|
||||
|
||||
$(ROM): arm9 arm7
|
||||
@echo " NDSTOOL $@"
|
||||
$(V)$(BLOCKSDS)/tools/ndstool/ndstool -c $@ \
|
||||
-7 build/arm7.elf -9 build/arm9.elf \
|
||||
-b $(GAME_ICON) "$(GAME_FULL_TITLE)" \
|
||||
$(NDSTOOL_ARGS)
|
||||
|
||||
sdimage:
|
||||
@echo " MKFATIMG $(SDIMAGE) $(SDROOT)"
|
||||
$(V)$(BLOCKSDS)/tools/mkfatimg/mkfatimg -t $(SDROOT) $(SDIMAGE)
|
||||
|
||||
dldipatch: $(ROM)
|
||||
@echo " DLDIPATCH $(ROM)"
|
||||
$(V)$(BLOCKSDS)/tools/dldipatch/dldipatch patch \
|
||||
$(BLOCKSDS)/sys/dldi_r4/r4tf.dldi $(ROM)
|
||||
189
Makefile.arm7
Normal file
189
Makefile.arm7
Normal file
@@ -0,0 +1,189 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# SPDX-FileContributor: Antonio Niño Díaz, 2023
|
||||
|
||||
export BLOCKSDS ?= /opt/blocksds/core
|
||||
export BLOCKSDSEXT ?= /opt/blocksds/external
|
||||
|
||||
export LIBTWL ?= $(shell pwd)/libs/libtwl
|
||||
|
||||
export WONDERFUL_TOOLCHAIN ?= /opt/wonderful
|
||||
ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/
|
||||
|
||||
# Source code paths
|
||||
# -----------------
|
||||
|
||||
SOURCEDIRS := arm7/source common
|
||||
INCLUDEDIRS := arm7/source common
|
||||
BINDIRS :=
|
||||
|
||||
# Defines passed to all files
|
||||
# ---------------------------
|
||||
|
||||
DEFINES := -DLIBTWL_ARM7
|
||||
|
||||
# Libraries
|
||||
# ---------
|
||||
|
||||
LIBS := -ltwl7 -lnds7
|
||||
LIBDIRS := $(BLOCKSDS)/libs/libnds \
|
||||
$(LIBTWL)/libtwl7 $(LIBTWL)/common $(LIBTWL)
|
||||
|
||||
# Build artifacts
|
||||
# -----------------
|
||||
|
||||
NAME := arm7
|
||||
BUILDDIR := build/$(NAME)
|
||||
ELF := build/$(NAME).elf
|
||||
DUMP := build/$(NAME).dump
|
||||
MAP := build/$(NAME).map
|
||||
|
||||
# Tools
|
||||
# -----
|
||||
|
||||
PREFIX := $(ARM_NONE_EABI_PATH)arm-none-eabi-
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
LD := $(PREFIX)gcc
|
||||
OBJDUMP := $(PREFIX)objdump
|
||||
MKDIR := mkdir
|
||||
RM := rm -rf
|
||||
|
||||
# Verbose flag
|
||||
# ------------
|
||||
|
||||
ifeq ($(VERBOSE),1)
|
||||
V :=
|
||||
else
|
||||
V := @
|
||||
endif
|
||||
|
||||
# Source files
|
||||
# ------------
|
||||
|
||||
ifneq ($(BINDIRS),)
|
||||
SOURCES_BIN := $(shell find -L $(BINDIRS) -name "*.bin")
|
||||
INCLUDEDIRS += $(addprefix $(BUILDDIR)/,$(BINDIRS))
|
||||
endif
|
||||
|
||||
SOURCES_S := $(shell find -L $(SOURCEDIRS) -name "*.s")
|
||||
SOURCES_C := $(shell find -L $(SOURCEDIRS) -name "*.c")
|
||||
SOURCES_CPP := $(shell find -L $(SOURCEDIRS) -name "*.cpp")
|
||||
|
||||
# Compiler and linker flags
|
||||
# -------------------------
|
||||
|
||||
ARCH := -marm -mthumb-interwork -mcpu=arm7tdmi
|
||||
|
||||
SPECS := arm7/dldi_ds_arm7.specs
|
||||
|
||||
WARNFLAGS := -Wall
|
||||
|
||||
ifeq ($(SOURCES_CPP),)
|
||||
LIBS += -lc
|
||||
else
|
||||
LIBS += -lstdc++ -lc
|
||||
endif
|
||||
|
||||
INCLUDEFLAGS := $(foreach path,$(INCLUDEDIRS),-I$(path)) \
|
||||
$(foreach path,$(LIBDIRS),-I$(path)/include)
|
||||
|
||||
LIBDIRSFLAGS := $(foreach path,$(LIBDIRS),-L$(path)/lib)
|
||||
|
||||
ASFLAGS += -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -ffunction-sections -fdata-sections \
|
||||
-specs=$(SPECS)
|
||||
|
||||
CFLAGS += -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -O2 -ffunction-sections -fdata-sections \
|
||||
-specs=$(SPECS)
|
||||
|
||||
CXXFLAGS += -std=gnu++23 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -O2 -ffunction-sections -fdata-sections \
|
||||
-fno-exceptions -fno-rtti \
|
||||
-fno-threadsafe-statics \
|
||||
-Wsuggest-override -Werror=suggest-override \
|
||||
-specs=$(SPECS)
|
||||
|
||||
LDFLAGS := $(ARCH) $(LIBDIRSFLAGS) -Wl,-Map,$(MAP),--gc-sections $(DEFINES) \
|
||||
-Wl,--start-group $(LIBS) -Wl,--end-group -specs=$(SPECS)
|
||||
|
||||
# Intermediate build files
|
||||
# ------------------------
|
||||
|
||||
OBJS_ASSETS := $(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_BIN)))
|
||||
|
||||
HEADERS_ASSETS := $(patsubst %.bin,%_bin.h,$(addprefix $(BUILDDIR)/,$(SOURCES_BIN)))
|
||||
|
||||
OBJS_SOURCES := $(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_S))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_C))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_CPP)))
|
||||
|
||||
OBJS := $(OBJS_ASSETS) $(OBJS_SOURCES)
|
||||
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
|
||||
# Targets
|
||||
# -------
|
||||
|
||||
.PHONY: all clean dump
|
||||
|
||||
all: $(ELF)
|
||||
|
||||
$(ELF): $(OBJS)
|
||||
@echo " LD.7 $@"
|
||||
$(V)$(LD) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
$(DUMP): $(ELF)
|
||||
@echo " OBJDUMP.7 $@"
|
||||
$(V)$(OBJDUMP) -h -C -S $< > $@
|
||||
|
||||
dump: $(DUMP)
|
||||
|
||||
clean:
|
||||
@echo " CLEAN.7"
|
||||
$(V)$(RM) $(ELF) $(DUMP) $(MAP) $(BUILDDIR)
|
||||
|
||||
# Rules
|
||||
# -----
|
||||
|
||||
$(BUILDDIR)/%.s.o : %.s
|
||||
@echo " AS.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(ASFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.c.o : %.c
|
||||
@echo " CC.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.arm.c.o : %.arm.c
|
||||
@echo " CC.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -marm -mlong-calls -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.cpp.o : %.cpp
|
||||
@echo " CXX.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CXX) $(CXXFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.arm.cpp.o : %.arm.cpp
|
||||
@echo " CXX.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CXX) $(CXXFLAGS) -MMD -MP -marm -mlong-calls -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.bin.o $(BUILDDIR)/%_bin.h : %.bin
|
||||
@echo " BIN2C.7 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(BLOCKSDS)/tools/bin2c/bin2c $< $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $(BUILDDIR)/$*.bin.o $(BUILDDIR)/$*_bin.c
|
||||
|
||||
# All assets must be built before the source code
|
||||
# -----------------------------------------------
|
||||
|
||||
$(SOURCES_S) $(SOURCES_C) $(SOURCES_CPP): $(HEADERS_ASSETS)
|
||||
|
||||
# Include dependency files if they exist
|
||||
# --------------------------------------
|
||||
|
||||
-include $(DEPS)
|
||||
243
Makefile.arm9
Normal file
243
Makefile.arm9
Normal file
@@ -0,0 +1,243 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# SPDX-FileContributor: Antonio Niño Díaz, 2023
|
||||
|
||||
export BLOCKSDS ?= /opt/blocksds/core
|
||||
export BLOCKSDSEXT ?= /opt/blocksds/external
|
||||
|
||||
export LIBTWL ?= $(shell pwd)/libs/libtwl
|
||||
|
||||
export WONDERFUL_TOOLCHAIN ?= /opt/wonderful
|
||||
ARM_NONE_EABI_PATH ?= $(WONDERFUL_TOOLCHAIN)/toolchain/gcc-arm-none-eabi/bin/
|
||||
|
||||
# Source code paths
|
||||
# -----------------
|
||||
|
||||
SOURCEDIRS := arm9/source common
|
||||
INCLUDEDIRS := arm9/source common
|
||||
GFXDIRS := arm9/gfx
|
||||
BINDIRS := arm9/data
|
||||
AUDIODIRS :=
|
||||
|
||||
# Defines passed to all files
|
||||
# ---------------------------
|
||||
|
||||
DEFINES := -DLIBTWL_ARM9
|
||||
|
||||
# Libraries
|
||||
# ---------
|
||||
|
||||
LIBS := -ltwl9 -lnds9
|
||||
LIBDIRS := $(BLOCKSDS)/libs/libnds \
|
||||
$(LIBTWL)/libtwl9 $(LIBTWL)/common $(LIBTWL)
|
||||
|
||||
# Build artifacts
|
||||
# ---------------
|
||||
|
||||
NAME := arm9
|
||||
BUILDDIR := build/$(NAME)
|
||||
ELF := build/$(NAME).elf
|
||||
DUMP := build/$(NAME).dump
|
||||
MAP := build/$(NAME).map
|
||||
SOUNDBANKDIR := $(BUILDDIR)/maxmod
|
||||
|
||||
# Tools
|
||||
# -----
|
||||
|
||||
PREFIX := $(ARM_NONE_EABI_PATH)arm-none-eabi-
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
LD := $(PREFIX)gcc
|
||||
OBJDUMP := $(PREFIX)objdump
|
||||
MKDIR := mkdir
|
||||
RM := rm -rf
|
||||
|
||||
# Verbose flag
|
||||
# ------------
|
||||
|
||||
ifeq ($(VERBOSE),1)
|
||||
V :=
|
||||
else
|
||||
V := @
|
||||
endif
|
||||
|
||||
# Source files
|
||||
# ------------
|
||||
|
||||
ifneq ($(BINDIRS),)
|
||||
SOURCES_BIN := $(shell find -L $(BINDIRS) -name "*.bin")
|
||||
SOURCES_NFT2 := $(shell find -L $(BINDIRS) -name "*.nft2")
|
||||
INCLUDEDIRS += $(addprefix $(BUILDDIR)/,$(BINDIRS))
|
||||
endif
|
||||
ifneq ($(GFXDIRS),)
|
||||
SOURCES_PNG := $(shell find -L $(GFXDIRS) -name "*.png")
|
||||
INCLUDEDIRS += $(addprefix $(BUILDDIR)/,$(GFXDIRS))
|
||||
endif
|
||||
ifneq ($(AUDIODIRS),)
|
||||
SOURCES_AUDIO := $(shell find -L $(AUDIODIRS) -regex '.*\.\(it\|mod\|s3m\|wav\|xm\)')
|
||||
ifneq ($(SOURCES_AUDIO),)
|
||||
INCLUDEDIRS += $(SOUNDBANKDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
SOURCES_S := $(shell find -L $(SOURCEDIRS) -name "*.s")
|
||||
SOURCES_C := $(shell find -L $(SOURCEDIRS) -name "*.c")
|
||||
SOURCES_CPP := $(shell find -L $(SOURCEDIRS) -name "*.cpp")
|
||||
|
||||
# Compiler and linker flags
|
||||
# -------------------------
|
||||
|
||||
ARCH := -marm -mthumb-interwork -mcpu=arm946e-s+nofp
|
||||
|
||||
SPECS := $(BLOCKSDS)/sys/crts/ds_arm9.specs
|
||||
|
||||
WARNFLAGS := -Wall
|
||||
|
||||
ifeq ($(SOURCES_CPP),)
|
||||
LIBS += -lc
|
||||
else
|
||||
LIBS += -lstdc++ -lc
|
||||
endif
|
||||
|
||||
INCLUDEFLAGS := $(foreach path,$(INCLUDEDIRS),-I$(path)) \
|
||||
$(foreach path,$(LIBDIRS),-I$(path)/include)
|
||||
|
||||
LIBDIRSFLAGS := $(foreach path,$(LIBDIRS),-L$(path)/lib)
|
||||
|
||||
ASFLAGS += -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -ffunction-sections -fdata-sections \
|
||||
-specs=$(SPECS)
|
||||
|
||||
CFLAGS += -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -O2 -ffunction-sections -fdata-sections \
|
||||
-fno-devirtualize-speculatively \
|
||||
-Werror=return-type \
|
||||
-specs=$(SPECS)
|
||||
|
||||
CXXFLAGS += -std=gnu++23 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
|
||||
$(ARCH) -O2 -ffunction-sections -fdata-sections \
|
||||
-fno-exceptions -fno-rtti \
|
||||
-fno-devirtualize-speculatively \
|
||||
-Werror=return-type \
|
||||
-fno-threadsafe-statics \
|
||||
-Wno-volatile -Wsuggest-override -Werror=suggest-override \
|
||||
-specs=$(SPECS)
|
||||
|
||||
LDFLAGS := $(ARCH) $(LIBDIRSFLAGS) -Wl,-Map,$(MAP),--gc-sections,--use-blx $(DEFINES) \
|
||||
-Wl,--start-group $(LIBS) -Wl,--end-group -specs=$(SPECS)
|
||||
|
||||
# Intermediate build files
|
||||
# ------------------------
|
||||
|
||||
OBJS_ASSETS := $(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_BIN))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_NFT2))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_PNG)))
|
||||
|
||||
HEADERS_ASSETS := $(patsubst %.bin,%_bin.h,$(addprefix $(BUILDDIR)/,$(SOURCES_BIN))) \
|
||||
$(patsubst %.nft2,%_nft2.h,$(addprefix $(BUILDDIR)/,$(SOURCES_NFT2))) \
|
||||
$(patsubst %.png,%.h,$(addprefix $(BUILDDIR)/,$(SOURCES_PNG)))
|
||||
|
||||
ifneq ($(SOURCES_AUDIO),)
|
||||
OBJS_ASSETS += $(SOUNDBANKDIR)/soundbank.c.o
|
||||
HEADERS_ASSETS += $(SOUNDBANKDIR)/soundbank.h
|
||||
endif
|
||||
|
||||
OBJS_SOURCES := $(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_S))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_C))) \
|
||||
$(addsuffix .o,$(addprefix $(BUILDDIR)/,$(SOURCES_CPP)))
|
||||
|
||||
OBJS := $(OBJS_ASSETS) $(OBJS_SOURCES)
|
||||
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
|
||||
# Targets
|
||||
# -------
|
||||
|
||||
.PHONY: all clean dump
|
||||
|
||||
all: $(ELF)
|
||||
|
||||
$(ELF): $(OBJS)
|
||||
@echo " LD.9 $@"
|
||||
$(V)$(LD) -o $@ $(OBJS) $(LDFLAGS)
|
||||
|
||||
$(DUMP): $(ELF)
|
||||
@echo " OBJDUMP.9 $@"
|
||||
$(V)$(OBJDUMP) -h -C -S $< > $@
|
||||
|
||||
dump: $(DUMP)
|
||||
|
||||
clean:
|
||||
@echo " CLEAN.9"
|
||||
$(V)$(RM) $(ELF) $(DUMP) $(MAP) $(BUILDDIR)
|
||||
|
||||
# Rules
|
||||
# -----
|
||||
|
||||
$(BUILDDIR)/%.s.o : %.s
|
||||
@echo " AS.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(ASFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.c.o : %.c
|
||||
@echo " CC.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.arm.c.o : %.arm.c
|
||||
@echo " CC.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -marm -mlong-calls -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.cpp.o : %.cpp
|
||||
@echo " CXX.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CXX) $(CXXFLAGS) -MMD -MP -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.arm.cpp.o : %.arm.cpp
|
||||
@echo " CXX.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(CXX) $(CXXFLAGS) -MMD -MP -marm -mlong-calls -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/%.bin.o $(BUILDDIR)/%_bin.h : %.bin
|
||||
@echo " BIN2C.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(BLOCKSDS)/tools/bin2c/bin2c $< $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $(BUILDDIR)/$*.bin.o $(BUILDDIR)/$*_bin.c
|
||||
|
||||
$(BUILDDIR)/%.nft2.o $(BUILDDIR)/%_nft2.h : %.nft2
|
||||
@echo " BIN2C.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(BLOCKSDS)/tools/bin2c/bin2c $< $(@D)
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $(BUILDDIR)/$*.nft2.o $(BUILDDIR)/$*_nft2.c
|
||||
|
||||
$(BUILDDIR)/%.png.o $(BUILDDIR)/%.h : %.png %.grit
|
||||
@echo " GRIT.9 $<"
|
||||
@$(MKDIR) -p $(@D)
|
||||
$(V)$(BLOCKSDS)/tools/grit/grit $< -ftc -W1 -o$(BUILDDIR)/$*
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $(BUILDDIR)/$*.png.o $(BUILDDIR)/$*.c
|
||||
$(V)touch $(BUILDDIR)/$*.png.o $(BUILDDIR)/$*.h
|
||||
|
||||
$(SOUNDBANKDIR)/soundbank.h: $(SOURCES_AUDIO)
|
||||
@echo " MMUTIL $^"
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(BLOCKSDS)/tools/mmutil/mmutil $^ -d \
|
||||
-o$(SOUNDBANKDIR)/soundbank.bin -h$(SOUNDBANKDIR)/soundbank.h
|
||||
|
||||
$(SOUNDBANKDIR)/soundbank.c.o: $(SOUNDBANKDIR)/soundbank.h
|
||||
@echo " BIN2C soundbank.bin"
|
||||
$(V)$(BLOCKSDS)/tools/bin2c/bin2c $(SOUNDBANKDIR)/soundbank.bin \
|
||||
$(SOUNDBANKDIR)
|
||||
@echo " CC.9 soundbank_bin.c"
|
||||
$(V)$(CC) $(CFLAGS) -MMD -MP -c -o $(SOUNDBANKDIR)/soundbank.c.o \
|
||||
$(SOUNDBANKDIR)/soundbank_bin.c
|
||||
|
||||
# All assets must be built before the source code
|
||||
# -----------------------------------------------
|
||||
|
||||
$(SOURCES_S) $(SOURCES_C) $(SOURCES_CPP): $(HEADERS_ASSETS)
|
||||
|
||||
# Include dependency files if they exist
|
||||
# --------------------------------------
|
||||
|
||||
-include $(DEPS)
|
||||
81
README.md
Normal file
81
README.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Pico Launcher
|
||||
This repository contains Pico Launcher, which is a front-end for [Pico Loader](https://github.com/LNH-team/pico-loader).
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features
|
||||
- Can load homebrew and retail games using [Pico Loader](https://github.com/LNH-team/pico-loader).
|
||||
- Various display modes
|
||||
- Horizontal and vertical icon grid
|
||||
- Banner list
|
||||
- Coverflow
|
||||
- [File associations](docs/FileAssociations.md)
|
||||
- [Covers](docs/Covers.md)
|
||||
- [Material Design 3 and custom themes](docs/Themes.md)
|
||||
- Support for background music (see [Themes](docs/Themes.md))
|
||||
|
||||
General usage documentation can be found here: [Usage](docs/Usage.md).
|
||||
|
||||
## Setup & Configuration
|
||||
We recommend using WSL (Windows Subsystem for Linux), or MSYS2 to compile this repository.
|
||||
The steps provided will assume you already have one of those environments set up.
|
||||
|
||||
1. Install [BlocksDS](https://blocksds.skylyrac.net/docs/setup/options/)
|
||||
|
||||
## Compiling
|
||||
|
||||
1. Run `make`
|
||||
|
||||
The launcher can be found in the root directory under the name `LAUNCHER.nds`.
|
||||
|
||||
2. Copy `LAUNCHER.nds` to your SD card.
|
||||
- If you are using DSpico, rename to `_picoboot.nds` and place it in the root of your SD card.
|
||||
3. Copy the `_pico` pico folder to the root of your SD card.
|
||||
|
||||
> [!NOTE]
|
||||
> To use Pico Launcher, the Pico Loader files (`aplist.bin`, `savelist.bin`, `picoLoader7.bin` and `picoLoader9.bin`) must also be present in the `/_pico` folder on your SD card.
|
||||
|
||||
For DSpico the final directory structure will look like this:
|
||||
```
|
||||
.
|
||||
├── _pico
|
||||
│ ├── themes
|
||||
│ │ ├── material
|
||||
│ │ │ └── theme.json
|
||||
│ │ └── raspberry
|
||||
│ │ ├── bannerListCell.bin
|
||||
│ │ ├── bannerListCellPltt.bin
|
||||
│ │ ├── bannerListCellSelected.bin
|
||||
│ │ ├── bannerListCellSelectedPltt.bin
|
||||
│ │ ├── bottombg.bin
|
||||
│ │ ├── gridcell.bin
|
||||
│ │ ├── gridcellPltt.bin
|
||||
│ │ ├── gridcellSelected.bin
|
||||
│ │ ├── gridcellSelectedPltt.bin
|
||||
│ │ ├── scrim.bin
|
||||
│ │ ├── scrimPltt.bin
|
||||
│ │ ├── theme.json
|
||||
│ │ └── topbg.bin
|
||||
│ ├── aplist.bin
|
||||
│ ├── savelist.bin
|
||||
│ ├── picoLoader7.bin
|
||||
│ └── picoLoader9.bin
|
||||
└── _picoboot.nds
|
||||
```
|
||||
Note: If you want to play DSiWare on the DSpico, additional files are required. See the [Pico Loader](https://github.com/LNH-team/pico-loader) readme for more information.
|
||||
|
||||
## License
|
||||
|
||||
Icons by [icons8](https://icons8.com/)
|
||||
|
||||
This project is licensed under the Zlib license. For details, see `LICENSE.txt`.
|
||||
|
||||
Additional licenses may apply to the project. For details, see the `license` directory.
|
||||
|
||||
## Contributors
|
||||
- [@Gericom](https://github.com/Gericom)
|
||||
- [@XLuma](https://github.com/XLuma)
|
||||
- [@Dartz150](https://github.com/Dartz150)
|
||||
- [@lifehackerhansol](https://github.com/lifehackerhansol)
|
||||
12
_pico/themes/material/theme.json
Normal file
12
_pico/themes/material/theme.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "material",
|
||||
"name": "Material Design 3",
|
||||
"description": "Theme based on Google's Material Design 3.",
|
||||
"author": "Gericom",
|
||||
"primaryColor": {
|
||||
"r": 138,
|
||||
"g": 217,
|
||||
"b": 255
|
||||
},
|
||||
"darkTheme": false
|
||||
}
|
||||
BIN
_pico/themes/raspberry/bannerListCell.bin
Normal file
BIN
_pico/themes/raspberry/bannerListCell.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/bannerListCellPltt.bin
Normal file
BIN
_pico/themes/raspberry/bannerListCellPltt.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/bannerListCellSelected.bin
Normal file
BIN
_pico/themes/raspberry/bannerListCellSelected.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/bannerListCellSelectedPltt.bin
Normal file
BIN
_pico/themes/raspberry/bannerListCellSelectedPltt.bin
Normal file
Binary file not shown.
641
_pico/themes/raspberry/bottombg.bin
Normal file
641
_pico/themes/raspberry/bottombg.bin
Normal file
File diff suppressed because one or more lines are too long
BIN
_pico/themes/raspberry/gridcell.bin
Normal file
BIN
_pico/themes/raspberry/gridcell.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/gridcellPltt.bin
Normal file
BIN
_pico/themes/raspberry/gridcellPltt.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/gridcellSelected.bin
Normal file
BIN
_pico/themes/raspberry/gridcellSelected.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/gridcellSelectedPltt.bin
Normal file
BIN
_pico/themes/raspberry/gridcellSelectedPltt.bin
Normal file
Binary file not shown.
BIN
_pico/themes/raspberry/scrim.bin
Normal file
BIN
_pico/themes/raspberry/scrim.bin
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user