Skip to content
Draft
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
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Package
run: task build extract package-next package-muos package-knulli package-spruce
run: task build extract package-next package-muos package-knulli package-spruce package-crossmix

- name: Create NextUI distribution
run: |
Expand All @@ -97,6 +97,12 @@ jobs:
zip -r Grout.spruce.zip Grout
mv Grout.spruce.zip ../Grout.spruce.zip

- name: Create crossmix distribution
run: |
cd build/CrossMix
zip -r Grout.crossmix.zip Grout
mv Grout.crossmix.zip ../Grout.crossmix.zip

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
Expand All @@ -112,6 +118,7 @@ jobs:
build/Grout.pak.zip
build/Grout.muxapp
build/Grout.spruce.zip
build/Grout.crossmix.zip
build/Grout-Knulli.zip
build/grout
draft: false
Expand Down
34 changes: 27 additions & 7 deletions cfw/cfw.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import (
type CFW string

const (
NextUI CFW = "NEXTUI"
MuOS CFW = "MUOS"
Knulli CFW = "KNULLI"
Spruce CFW = "SPRUCE"
NextUI CFW = "NEXTUI"
MuOS CFW = "MUOS"
Knulli CFW = "KNULLI"
Spruce CFW = "SPRUCE"
CrossMix CFW = "CROSSMIX"
)

var (
Expand All @@ -29,6 +30,9 @@ var (
SprucePlatforms = mustLoadJSONMap[string, []string]("spruce/platforms.json")
SpruceSaveDirectories = mustLoadJSONMap[string, []string]("spruce/save_directories.json")

CrossMixPlatforms = mustLoadJSONMap[string, []string]("crossmix/platforms.json")
CrossMixSaveDirectories = mustLoadJSONMap[string, []string]("crossmix/save_directories.json")

KnulliPlatforms = mustLoadJSONMap[string, []string]("knulli/platforms.json")
)

Expand All @@ -41,11 +45,11 @@ func GetCFW() CFW {
cfw := CFW(cfwEnv)

switch cfw {
case MuOS, NextUI, Knulli, Spruce:
case MuOS, NextUI, Knulli, Spruce, CrossMix:
return cfw
default:
log.SetOutput(os.Stderr)
log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce", cfwEnv)
log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce, CrossMix", cfwEnv)
return ""
}
}
Expand All @@ -66,6 +70,8 @@ func GetRomDirectory() string {
return filepath.Join(getBasePath(Knulli), "roms")
case Spruce:
return filepath.Join(getBasePath(Spruce), "Roms")
case CrossMix:
return filepath.Join(getBasePath(CrossMix), "Roms")
}

return ""
Expand All @@ -83,6 +89,8 @@ func GetBIOSDirectory() string {
return filepath.Join(getBasePath(Knulli), "bios")
case Spruce:
return filepath.Join(getBasePath(Spruce), "BIOS")
case CrossMix:
return filepath.Join(getBasePath(CrossMix), "BIOS")
}

return ""
Expand Down Expand Up @@ -117,6 +125,8 @@ func GetPlatformMap(c CFW) map[string][]string {
return KnulliPlatforms
case Spruce:
return SprucePlatforms
case CrossMix:
return CrossMixPlatforms
default:
return nil
}
Expand All @@ -132,6 +142,8 @@ func EmulatorFolderMap(c CFW) map[string][]string {
return KnulliPlatforms
case Spruce:
return SpruceSaveDirectories
case CrossMix:
return CrossMixSaveDirectories
default:
return nil
}
Expand Down Expand Up @@ -192,6 +204,9 @@ func getBasePath(cfw CFW) string {

case Spruce:
return "/mnt/SDCARD"

case CrossMix:
return "/mnt/SDCARD"
default:
return ""
}
Expand All @@ -212,6 +227,8 @@ func BaseSavePath() string {
return filepath.Join(getBasePath(cfw), "saves")
case Spruce:
return filepath.Join(getBasePath(cfw), "Saves", "saves")
case CrossMix:
return filepath.Join(getBasePath(cfw), "RetroArch", ".retroarch", "saves")
}

return ""
Expand All @@ -230,13 +247,16 @@ func GetPlatformRomDirectory(relativePath, platformSlug string) string {

// GetArtDirectory returns the artwork directory for a platform.
func GetArtDirectory(romDir string, platformSlug, platformName string) string {
switch GetCFW() {
cfw := GetCFW()
switch cfw {
case NextUI:
return filepath.Join(romDir, ".media")
case Knulli:
return filepath.Join(romDir, "images")
case Spruce:
return filepath.Join(romDir, "Imgs")
case CrossMix:
return filepath.Join(getBasePath(cfw), "Imgs", platformSlug)
case MuOS:
systemName, exists := MuOSArtDirectory[platformSlug]
if !exists {
Expand Down
252 changes: 252 additions & 0 deletions cfw/crossmix/platforms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"3do": [
"PANASONIC"
],
"3ds": [],
"acpc": [
"CPC"
],
"amiga": [
"AMIGA"
],
"arcade": [
"MAME",
"MAME2003PLUS",
"MAME2010",
"DAPHNE"
],
"arduboy": [
"ARDUBOY"
],
"atari-st": [
"ATARIST"
],
"atari2600": [
"ATARI2600"
],
"atari5200": [
"ATARI5200"
],
"atari7800": [
"ATARI7800"
],
"c128": [
"AMIGA",
"AMIGACD"
],
"c64": [
"C64"
],
"cave-story": [
"CAVESTORY"
],
"cbm-ii": [
"VIC20"
],
"chailove": [
"CHAILOVE"
],
"chip-8": [],
"colecovision": [
"COLECO",
"COLSGM"
],
"cpet": [
"CPET"
],
"dc": [
"DC"
],
"doom": [
"DOOM"
],
"dos": [
"DOS"
],
"fairchild-channel-f": [
"FAIRCHILD"
],
"famicom": [
"FC"
],
"fds": [
"FDS"
],
"g-and-w": [
"GW"
],
"galaksija": [],
"gamegear": [
"GG"
],
"gb": [
"GB"
],
"gba": [
"GBA"
],
"gbc": [
"GBC"
],
"genesis": [
"MD"
],
"intellivision": [
"INTELLIVISION"
],
"j2me": [],
"jaguar": [],
"karaoke": [],
"lowres": [
"LOWRESNX"
],
"lua": [
"LUTRO"
],
"lynx": [
"LYNX"
],
"media-player": [],
"mega-duck-slash-cougar-boy": [
"MEGADUCK"
],
"msx": [
"MSX"
],
"n64": [
"N64"
],
"naomi": [
"NAOMI"
],
"nds": [
"NDS"
],
"neo-geo-cd": [
"NEOCD"
],
"neo-geo-pocket": [
"NEOGEO"
],
"neo-geo-pocket-color": [
"NEOGEO"
],
"neogeoaes": [
"NEOGEO"
],
"neogeomvs": [
"NEOGEO"
],
"nes": [
"FC"
],
"odyssey": [
"ODYSSEY"
],
"onscripter": [],
"openbor": [
"OPENBOR"
],
"pc-8000": [
"PC88"
],
"pc-9800-series": [],
"pc-fx": [],
"philips-cd-i": [],
"pico": [],
"pico-8": [
"PICO"
],
"pokemon-mini": [
"POKEMINI"
],
"ports": [],
"ps2": [],
"psp": [
"PSP"
],
"psx": [
"PS"
],
"quake": [
"TYRQUAKE"
],
"rpg-maker": [],
"saturn": [
"SATURN"
],
"scummvm": [
"SCUMMVM"
],
"sega32": [
"SEGA32X"
],
"segacd": [
"SEGACD"
],
"sfam": [
"SFC"
],
"sg1000": [
"SG1000"
],
"sharp-x68000": [
"X68000"
],
"sms": [
"MS"
],
"snes": [
"SFC"
],
"supergrafx": [
"SFX"
],
"supervision": [
"SUPERVISION"
],
"tg16": [
"PCE"
],
"ti-83": [
"TI83"
],
"tic-80": [
"TIC"
],
"turbografx-cd": [
"PCECD"
],
"uzebox": [
"UZEBOX"
],
"vectrex": [
"VECTREX"
],
"vemulator": [
"VMU"
],
"vic-20": [
"VIC20"
],
"vircon-32": [],
"virtualboy": [
"VB"
],
"wasm-4": [],
"wolfenstein-3d": [],
"wonderswan": [
"WS"
],
"wonderswan-color": [
"WS",
"WSC"
],
"x1": [
"X1"
],
"zx81": [],
"zxs": [
"ZXS"
]
}
Loading