Skip to content

armgit / PS5LM

Public Imported from GitHub
0

llama.cpp on a jailbroken PS5: run any GGUF model natively on the console, starting with Qwen 3.8

App: PS5LM, title PPSA99575, with its own artwork

Mert Cobanov0bb713f6aa21
diff --git a/docs/CONSOLE.md b/docs/CONSOLE.md
index fc564bf..d453341 100644
--- a/docs/CONSOLE.md
+++ b/docs/CONSOLE.md
@@ -78,7 +78,7 @@ At exit, Sony's libc prints `[SceLibc] A heap error is detected` (SceLibcInterna
## The native app on the GPU
-PS5LM's app (`ps5/app`, PPSA99581) is a title, not a payload: it gets the console's direct memory and the GPU, through ggml-vulkan on PS5_Vulkan's RADV.
+PS5LM's app (`ps5/app`, PPSA99575) is a title, not a payload: it gets the console's direct memory and the GPU, through ggml-vulkan on PS5_Vulkan's RADV.
| What | Value |
|---|---|
diff --git a/ps5/app/dashboard.cpp b/ps5/app/dashboard.cpp
index 9fbcd67..365a715 100644
--- a/ps5/app/dashboard.cpp
+++ b/ps5/app/dashboard.cpp
@@ -30,11 +30,11 @@ namespace {
// ---- the design language (Pulse Dashboard's) --------------------------------
-const Color kInk = Color::rgb(0xe9eefc);
+const Color kInk = Color::rgb(0xf2f2f7);
const Color kClear = Color::rgb(0x000000, 0.0f);
const Color kBlack = Color::rgb(0x000000);
-const Color kPanelTop = Color::rgb(0x171f33);
-const Color kPanelBottom = Color::rgb(0x0e1424);
+const Color kPanelTop = Color::rgb(0x17171f);
+const Color kPanelBottom = Color::rgb(0x0e0e14);
const Color kCyan = Color::rgb(0x4fe0ff); // speed and the GPU
const Color kLime = Color::rgb(0xb8f26b); // the CPU and the model
const Color kAmber = Color::rgb(0xffc24a); // memory
@@ -1149,8 +1149,8 @@ void Dashboard::draw_header(gfx::DrawList & list) const {
const float in = tween::stagger(age_, 0, 0.05f, 0.5f);
list.push_opacity(in);
const float y = 124 - 10.0f * (1.0f - in);
- float w = ui::text(list, fonts_.display, "PS5LM", kGridX - 3, y, 56, kInk);
- w += ui::text(list, fonts_.display, " Plus", kGridX - 3 + w, y, 56, kBrand);
+ float w = ui::text(list, fonts_.display, "PS5", kGridX - 3, y, 56, kInk);
+ w += ui::text(list, fonts_.display, "LM", kGridX - 3 + w, y, 56, kBrand);
std::string sub = "v" PS5LM_VERSION " \xC2\xB7 " + live_.address;
ui::text(list, fonts_.regular, sub, kGridX + w + 24, y, 24, kInk.with_alpha(kMuted));
@@ -1382,7 +1382,7 @@ void Dashboard::draw_usage_details(gfx::DrawList & list, const Rect & panel) con
const bool serving = L.state == ServerState::ready || L.state == ServerState::generating;
char text[96];
caps(list, f, "USAGE", panel.x + 56, panel.y + 60, 20, kCyan);
- ui::text(list, f.regular, "What the console is doing for PS5LM Plus, over the last two minutes.", panel.x + 56,
+ ui::text(list, f.regular, "What the console is doing for PS5LM, over the last two minutes.", panel.x + 56,
panel.y + 96, 20, kInk.with_alpha(kMuted));
const float x0 = panel.x + 56, colw = (panel.w - 112 - 48) * 0.5f, x1 = x0 + colw + 48;
diff --git a/ps5/app/main.cpp b/ps5/app/main.cpp
index fc04733..693b130 100644
--- a/ps5/app/main.cpp
+++ b/ps5/app/main.cpp
@@ -509,7 +509,7 @@ struct Models {
pthread_attr_setstacksize(&attr, 16u << 20); // the console's default stack is small
pthread_create(&server, &attr, run_server, nullptr);
server_started = true;
- notify("PS5LM Plus: loading the model onto the GPU");
+ notify("PS5LM: loading the model onto the GPU");
}
void stop() {
@@ -649,7 +649,7 @@ int main(int, char **) {
} else {
stats.set_state(ServerState::no_model);
if (models.rows.empty()) {
- notify("PS5LM Plus: no models; copy a .gguf to /data/PS5LM/models or PS5LM/models on a USB drive");
+ notify("PS5LM: no models; copy a .gguf to /data/PS5LM/models or PS5LM/models on a USB drive");
}
}
@@ -702,17 +702,17 @@ int main(int, char **) {
if (live.state == ServerState::loading && projector && restart_at == 0) {
std::ofstream(kChoice) << models.running << "\n";
std::ofstream(kTextOnly) << models.running << "\n";
- notify("PS5LM Plus: the image projector did not load; loading the model text only");
+ notify("PS5LM: the image projector did not load; loading the model text only");
dash.set_busy("Loading " + base_name(models.running) + " text only",
"Its image projector did not load, see /data/PS5LM/llama.log");
restart_at = n + 3;
} else {
- notify("PS5LM Plus: the server stopped, see /data/PS5LM/llama.log");
+ notify("PS5LM: the server stopped, see /data/PS5LM/llama.log");
}
}
const bool serving = live.state == ServerState::ready || live.state == ServerState::generating;
if (serving && !was_serving) {
- notify("PS5LM Plus: ready, chat in a browser on this network");
+ notify("PS5LM: ready, chat in a browser on this network");
}
was_serving = serving;
if (n % 30 == 0) {
@@ -777,7 +777,7 @@ int main(int, char **) {
const bool over = gib > models.settings.scratch_limit_gib;
if (over && !scratch_warned) {
char text[128];
- std::snprintf(text, sizeof(text), "PS5LM Plus: the chat's scratch folder holds %.1f GiB; clear it in Settings", gib);
+ std::snprintf(text, sizeof(text), "PS5LM: the chat's scratch folder holds %.1f GiB; clear it in Settings", gib);
notify(text);
std::printf("ps5lm-app: %s\n", text + 7);
}
@@ -789,7 +789,7 @@ int main(int, char **) {
if (mv.saved != saved_seen) {
saved_seen = mv.saved;
models.rescan(stats, false);
- notify(("PS5LM Plus: " + mv.note).c_str());
+ notify(("PS5LM: " + mv.note).c_str());
}
dash.set_market(std::move(mv));
}
@@ -864,7 +864,7 @@ int main(int, char **) {
std::filesystem::remove_all(e.path(), ec);
}
stats.set_scratch(folder_bytes(kScratch) / 1073741824.0);
- notify("PS5LM Plus: scratch folder cleared");
+ notify("PS5LM: scratch folder cleared");
std::printf("ps5lm-app: scratch folder cleared\n");
}
// The same requests from the PC (scripts/ps5lm-app.sh load|unload).
diff --git a/ps5/app/sce_sys/icon0.png b/ps5/app/sce_sys/icon0.png
index 9ff369b..b4299a5 100644
Binary files a/ps5/app/sce_sys/icon0.png and b/ps5/app/sce_sys/icon0.png differ
diff --git a/ps5/app/sce_sys/param.json b/ps5/app/sce_sys/param.json
index d8692e2..17a183d 100644
--- a/ps5/app/sce_sys/param.json
+++ b/ps5/app/sce_sys/param.json
@@ -12,9 +12,9 @@
"attribute": 0,
"attribute2": 0,
"attribute3": 0,
- "conceptId": "99581",
+ "conceptId": "99575",
"contentBadgeType": 1,
- "contentId": "UP9000-PPSA99581_00-PS5LMVULKAN00001",
+ "contentId": "UP9000-PPSA99575_00-PS5LMVULKAN00001",
"contentVersion": "01.008.003",
"downloadDataSize": 256,
"gameIntent": {
@@ -31,7 +31,7 @@
"localizedParameters": {
"defaultLanguage": "en-US",
"en-US": {
- "titleName": "PS5LM Plus"
+ "titleName": "PS5LM"
}
},
"masterVersion": "01.00",
@@ -42,6 +42,6 @@
},
"requiredSystemSoftwareVersion": "0x0000000000000000",
"sdkVersion": "0x0000000000000000",
- "titleId": "PPSA99581",
+ "titleId": "PPSA99575",
"versionFileUri": ""
}
\ No newline at end of file
diff --git a/ps5/app/sce_sys/source/background.png b/ps5/app/sce_sys/source/background.png
new file mode 100644
index 0000000..b4dbf58
Binary files /dev/null and b/ps5/app/sce_sys/source/background.png differ
diff --git a/ps5/app/sce_sys/source/background.svg b/ps5/app/sce_sys/source/background.svg
index 299e9e5..ba087c5 100644
--- a/ps5/app/sce_sys/source/background.svg
+++ b/ps5/app/sce_sys/source/background.svg
@@ -1,175 +1,25 @@
<svg xmlns="http://www.w3.org/2000/svg" width="3840" height="2160" viewBox="0 0 3840 2160">
-<!-- PS5LM home screen background, generated by background.py from icon.svg. -->
-<defs>
- <radialGradient id="glow" cx="50%" cy="46%" r="62%">
- <stop offset="0" stop-color="#2a2b52"/>
- <stop offset="0.55" stop-color="#15151f"/>
- <stop offset="1" stop-color="#0b0b10"/>
+ <!-- PS5LM's home screen background (pic0/pic1), in the site's palette and type.
+ scripts/build-app.sh turns it into the BC7 DDS files the console reads. -->
+ <defs>
+ <radialGradient id="glow" cx="78%" cy="70%" r="60%">
+ <stop offset="0" stop-color="#8288f0" stop-opacity="0.22"/>
+ <stop offset="0.55" stop-color="#8288f0" stop-opacity="0.04"/>
+ <stop offset="1" stop-color="#8288f0" stop-opacity="0"/>
</radialGradient>
- <linearGradient id="bubble" x1="0" y1="0" x2="1" y2="1">
- <stop offset="0" stop-color="#a9adff"/>
- <stop offset="1" stop-color="#6b71e6"/>
- </linearGradient>
- <linearGradient id="die" x1="0" y1="0" x2="0" y2="1">
- <stop offset="0" stop-color="#1d1e2c"/>
- <stop offset="1" stop-color="#14141d"/>
+ <pattern id="grid" width="120" height="120" patternUnits="userSpaceOnUse">
+ <path d="M120 0H0V120" fill="none" stroke="#ebebf5" stroke-opacity="0.035" stroke-width="2"/>
+ </pattern>
+ <linearGradient id="fade" x1="0" y1="0" x2="1" y2="0">
+ <stop offset="0" stop-color="#0e0e14" stop-opacity="1"/>
+ <stop offset="0.45" stop-color="#0e0e14" stop-opacity="0"/>
</linearGradient>
</defs>
-<radialGradient id="bgglow" cx="0.703" cy="0.5" r="0.75">
- <stop offset="0" stop-color="#25264a"/><stop offset="0.45" stop-color="#121219"/><stop offset="1" stop-color="#0b0b10"/>
-</radialGradient>
-<rect width="3840" height="2160" fill="url(#bgglow)"/>
-<g stroke="#8288f0" stroke-opacity="0.16" stroke-width="7" fill="none" stroke-linecap="round"><path d="M2922 690 V558 H3439 V427"/>
-<path d="M2362 1374 H1858 V1895 H1353"/>
-<path d="M3038 853 H3303 V431 H3568"/>
-<path d="M2617 1470 V1704 H2424 V1939"/>
-<path d="M2362 1183 H1636 V1265 H910"/>
-<path d="M2638 1470 V1603 H2492 V1736"/>
-<path d="M2564 1470 V1546 H2246 V1623"/>
-<path d="M3038 1215 H3340 V1465 H3643"/>
-<path d="M3038 866 H3114 V470 H3189"/>
-<path d="M2362 922 H2173 V544 H1984"/>
-<path d="M3038 979 H3274 V792 H3509"/>
-<path d="M3038 1158 H3218 V1304 H3397"/>
-<path d="M3038 1267 H3214 V1614 H3389"/>
-<path d="M2649 1470 V1521 H2531 V1572"/>
-<path d="M2721 690 V460 H2769 V229"/>
-<path d="M3038 961 H3146 V740 H3254"/>
-<path d="M2651 690 V376 H2537 V63"/>
-<path d="M2506 690 V534 H2055 V377"/>
-<path d="M2654 690 V621 H2546 V552"/>
-<path d="M2579 690 V621 H2298 V552"/>
-<path d="M2899 1470 V1600 H3363 V1730"/>
-<path d="M2362 955 H1404 V930 H446"/>
-<path d="M2362 1165 H2188 V1511 H2013"/>
-<path d="M2821 1470 V1514 H3104 V1559"/>
-<path d="M2494 1470 V1602 H2015 V1735"/>
-<path d="M3038 857 H3238 V443 H3439"/>
-<path d="M2678 1470 V1772 H2625 V2074"/>
-<path d="M2788 690 V503 H2994 V316"/>
-<path d="M2532 1470 V1698 H2141 V1926"/>
-<path d="M2488 690 V596 H1995 V503"/>
-<path d="M2362 921 H1730 V701 H1097"/>
-<path d="M2635 690 V422 H2484 V154"/>
-<path d="M2887 690 V537 H3324 V384"/>
-<path d="M2575 690 V415 H2283 V140"/>
-<path d="M3038 1289 H3271 V1676 H3504"/>
-<path d="M2565 1470 V1534 H2250 V1599"/>
-<path d="M2362 1202 H1927 V1446 H1492"/>
-<path d="M3038 1303 H3417 V1716 H3796"/>
-<path d="M2620 690 V608 H2432 V526"/>
-<path d="M2555 1470 V1538 H2218 V1607"/>
-<path d="M2362 1346 H1886 V1947 H1410"/>
-<path d="M3038 1296 H3402 V1698 H3765"/>
-<path d="M3038 1224 H3324 V1491 H3611"/>
-<path d="M2362 893 H1826 V621 H1289"/>
-<path d="M2362 1378 H1812 V2002 H1261"/>
-<path d="M2847 1470 V1596 H3190 V1723"/>
-<path d="M2766 1470 V1672 H2919 V1875"/>
-<path d="M2634 1470 V1659 H2481 V1848"/>
-<path d="M2714 1470 V1585 H2746 V1700"/>
-<path d="M2362 1042 H2222 V717 H2083"/>
-<path d="M2576 690 V420 H2288 V151"/>
-<path d="M2633 1470 V1774 H2477 V2077"/>
-<path d="M2505 690 V557 H2049 V424"/>
-<path d="M2362 1316 H1694 V1898 H1026"/>
-<path d="M2629 1470 V1660 H2462 V1850"/>
-<path d="M2865 690 V466 H3250 V242"/>
-<path d="M2362 1112 H1941 V1337 H1520"/>
-<path d="M2750 690 V522 H2868 V355"/>
-<path d="M2680 690 V515 H2632 V340"/>
-<path d="M2919 690 V584 H3431 V478"/>
-<path d="M2572 690 V605 H2273 V520"/>
-<path d="M2671 690 V640 H2604 V590"/>
-<path d="M3038 1151 H3198 V1284 H3358"/>
-<path d="M3038 1372 H3298 V1913 H3558"/>
-<path d="M2640 1470 V1550 H2499 V1630"/>
-<path d="M2571 1470 V1774 H2271 V2078"/>
-<path d="M2652 1470 V1648 H2539 V1827"/>
-<path d="M2362 912 H1544 V692 H727"/>
-<path d="M3038 1316 H3205 V1754 H3372"/>
-<path d="M2362 1110 H1612 V1138 H863"/></g>
-<g fill="#8288f0" fill-opacity="0.30"><circle cx="3439" cy="427" r="11"/>
-<circle cx="1353" cy="1895" r="11"/>
-<circle cx="3568" cy="431" r="11"/>
-<circle cx="2424" cy="1939" r="11"/>
-<circle cx="910" cy="1265" r="11"/>
-<circle cx="2492" cy="1736" r="11"/>
-<circle cx="2246" cy="1623" r="11"/>
-<circle cx="3643" cy="1465" r="11"/>
-<circle cx="3189" cy="470" r="11"/>
-<circle cx="1984" cy="544" r="11"/>
-<circle cx="3509" cy="792" r="11"/>
-<circle cx="3397" cy="1304" r="11"/>
-<circle cx="3389" cy="1614" r="11"/>
-<circle cx="2531" cy="1572" r="11"/>
-<circle cx="2769" cy="229" r="11"/>
-<circle cx="3254" cy="740" r="11"/>
-<circle cx="2537" cy="63" r="11"/>
-<circle cx="2055" cy="377" r="11"/>
-<circle cx="2546" cy="552" r="11"/>
-<circle cx="2298" cy="552" r="11"/>
-<circle cx="3363" cy="1730" r="11"/>
-<circle cx="446" cy="930" r="11"/>
-<circle cx="2013" cy="1511" r="11"/>
-<circle cx="3104" cy="1559" r="11"/>
-<circle cx="2015" cy="1735" r="11"/>
-<circle cx="3439" cy="443" r="11"/>
-<circle cx="2625" cy="2074" r="11"/>
-<circle cx="2994" cy="316" r="11"/>
-<circle cx="2141" cy="1926" r="11"/>
-<circle cx="1995" cy="503" r="11"/>
-<circle cx="1097" cy="701" r="11"/>
-<circle cx="2484" cy="154" r="11"/>
-<circle cx="3324" cy="384" r="11"/>
-<circle cx="2283" cy="140" r="11"/>
-<circle cx="3504" cy="1676" r="11"/>
-<circle cx="2250" cy="1599" r="11"/>
-<circle cx="1492" cy="1446" r="11"/>
-<circle cx="3796" cy="1716" r="11"/>
-<circle cx="2432" cy="526" r="11"/>
-<circle cx="2218" cy="1607" r="11"/>
-<circle cx="1410" cy="1947" r="11"/>
-<circle cx="3765" cy="1698" r="11"/>
-<circle cx="3611" cy="1491" r="11"/>
-<circle cx="1289" cy="621" r="11"/>
-<circle cx="1261" cy="2002" r="11"/>
-<circle cx="3190" cy="1723" r="11"/>
-<circle cx="2919" cy="1875" r="11"/>
-<circle cx="2481" cy="1848" r="11"/>
-<circle cx="2746" cy="1700" r="11"/>
-<circle cx="2083" cy="717" r="11"/>
-<circle cx="2288" cy="151" r="11"/>
-<circle cx="2477" cy="2077" r="11"/>
-<circle cx="2049" cy="424" r="11"/>
-<circle cx="1026" cy="1898" r="11"/>
-<circle cx="2462" cy="1850" r="11"/>
-<circle cx="3250" cy="242" r="11"/>
-<circle cx="1520" cy="1337" r="11"/>
-<circle cx="2868" cy="355" r="11"/>
-<circle cx="2632" cy="340" r="11"/>
-<circle cx="3431" cy="478" r="11"/>
-<circle cx="2273" cy="520" r="11"/>
-<circle cx="2604" cy="590" r="11"/>
-<circle cx="3358" cy="1284" r="11"/>
-<circle cx="3558" cy="1913" r="11"/>
-<circle cx="2499" cy="1630" r="11"/>
-<circle cx="2271" cy="2078" r="11"/>
-<circle cx="2539" cy="1827" r="11"/>
-<circle cx="727" cy="692" r="11"/>
-<circle cx="3372" cy="1754" r="11"/>
-<circle cx="863" cy="1138" r="11"/></g>
-<g transform="translate(2034 414) scale(2.6)"><!-- the die -->
- <rect x="136" y="116" width="240" height="280" rx="30" fill="url(#die)" stroke="#8288f0" stroke-opacity="0.55" stroke-width="4"/>
- <!-- the chat bubble -->
- <path d="M182 168 h148 a34 34 0 0 1 34 34 v84 a34 34 0 0 1 -34 34 h-72 l-46 40 v-40 h-30 a34 34 0 0 1 -34 -34 v-84 a34 34 0 0 1 34 -34 z"
- fill="url(#bubble)"/>
- <!-- tokens being generated -->
- <g fill="#0e0e14">
- <rect x="190" y="208" width="132" height="16" rx="8"/>
- <rect x="190" y="240" width="96" height="16" rx="8"/>
- <rect x="190" y="272" width="56" height="16" rx="8"/>
- <rect x="254" y="270" width="7" height="20" rx="2" fill="#f2f2f7"/>
- </g>
-</g>
-</svg>
\ No newline at end of file
+ <rect width="3840" height="2160" fill="#0e0e14"/>
+ <rect width="3840" height="2160" fill="url(#grid)"/>
+ <rect width="3840" height="2160" fill="url(#fade)"/>
+ <rect width="3840" height="2160" fill="url(#glow)"/>
+ <text x="2160" y="1640" font-family="PS5LM Mono" font-weight="800" font-size="420" letter-spacing="-10"><tspan fill="#f2f2f7">PS5</tspan><tspan fill="#8288f0">LM</tspan></text>
+ <rect x="3434" y="1336" width="160" height="304" fill="#f2f2f7" fill-opacity="0.9"/>
+ <text x="2172" y="1800" font-family="PS5LM Mono" font-weight="400" font-size="76" fill="#ebebf5" fill-opacity="0.55">llama.cpp on PlayStation 5</text>
+</svg>
diff --git a/ps5/app/sce_sys/source/icon.svg b/ps5/app/sce_sys/source/icon.svg
index 95fc99f..6fce9db 100644
--- a/ps5/app/sce_sys/source/icon.svg
+++ b/ps5/app/sce_sys/source/icon.svg
@@ -1,48 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
- <!-- PS5LM launcher icon: a chat bubble on a GPU die, in the project site's
- colours (bg #0e0e14, accent #8288f0). Rendered by scripts/build-assets.sh. -->
+ <!-- PS5LM's icon: the name as a terminal line, in the site's palette and type
+ (ps5lm.cobanov.dev: bg #0e0e14, ink #f2f2f7, accent #8288f0, Recursive Mono).
+ Fonts: "PS5LM Mono" is site/assets/fonts/recursive-mono-v1 at weight 800. -->
<defs>
- <radialGradient id="glow" cx="50%" cy="46%" r="62%">
- <stop offset="0" stop-color="#2a2b52"/>
- <stop offset="0.55" stop-color="#15151f"/>
- <stop offset="1" stop-color="#0b0b10"/>
+ <radialGradient id="glow" cx="88%" cy="96%" r="80%">
+ <stop offset="0" stop-color="#8288f0" stop-opacity="0.34"/>
+ <stop offset="0.6" stop-color="#8288f0" stop-opacity="0.05"/>
+ <stop offset="1" stop-color="#8288f0" stop-opacity="0"/>
</radialGradient>
- <linearGradient id="bubble" x1="0" y1="0" x2="1" y2="1">
- <stop offset="0" stop-color="#a9adff"/>
- <stop offset="1" stop-color="#6b71e6"/>
- </linearGradient>
- <linearGradient id="die" x1="0" y1="0" x2="0" y2="1">
- <stop offset="0" stop-color="#1d1e2c"/>
- <stop offset="1" stop-color="#14141d"/>
- </linearGradient>
</defs>
+ <rect width="512" height="512" fill="#0e0e14"/>
<rect width="512" height="512" fill="url(#glow)"/>
- <!-- traces leaving the die -->
- <g stroke="#8288f0" stroke-opacity="0.28" stroke-width="5" fill="none" stroke-linecap="round">
- <path d="M136 176 H70 V120"/> <path d="M136 226 H40"/>
- <path d="M136 286 H60 V350"/> <path d="M136 336 H96 V420"/>
- <path d="M376 176 H446 V96"/> <path d="M376 236 H472"/>
- <path d="M376 296 H430 V372"/> <path d="M376 346 H410 V440"/>
- <path d="M196 116 V48 H150"/> <path d="M256 116 V36"/> <path d="M316 116 V60 H372"/>
- <path d="M216 396 V470"/> <path d="M296 396 V452 H350"/>
- </g>
- <g fill="#8288f0" fill-opacity="0.45">
- <circle cx="70" cy="120" r="8"/> <circle cx="40" cy="226" r="8"/> <circle cx="60" cy="350" r="8"/>
- <circle cx="96" cy="420" r="8"/> <circle cx="446" cy="96" r="8"/> <circle cx="472" cy="236" r="8"/>
- <circle cx="430" cy="372" r="8"/> <circle cx="410" cy="440" r="8"/> <circle cx="150" cy="48" r="8"/>
- <circle cx="256" cy="36" r="8"/> <circle cx="372" cy="60" r="8"/> <circle cx="216" cy="470" r="8"/>
- <circle cx="350" cy="452" r="8"/>
- </g>
- <!-- the die -->
- <rect x="136" y="116" width="240" height="280" rx="30" fill="url(#die)" stroke="#8288f0" stroke-opacity="0.55" stroke-width="4"/>
- <!-- the chat bubble -->
- <path d="M182 168 h148 a34 34 0 0 1 34 34 v84 a34 34 0 0 1 -34 34 h-72 l-46 40 v-40 h-30 a34 34 0 0 1 -34 -34 v-84 a34 34 0 0 1 34 -34 z"
- fill="url(#bubble)"/>
- <!-- tokens being generated -->
- <g fill="#0e0e14">
- <rect x="190" y="208" width="132" height="16" rx="8"/>
- <rect x="190" y="240" width="96" height="16" rx="8"/>
- <rect x="190" y="272" width="56" height="16" rx="8"/>
- <rect x="254" y="270" width="7" height="20" rx="2" fill="#f2f2f7"/>
- </g>
+ <text x="58" y="104" font-family="PS5LM Mono" font-weight="400" font-size="34" fill="#ebebf5" fill-opacity="0.55">llama.cpp</text>
+ <text x="50" y="300" font-family="PS5LM Mono" font-weight="800" font-size="172" fill="#f2f2f7" letter-spacing="-4">PS5</text>
+ <text x="50" y="452" font-family="PS5LM Mono" font-weight="800" font-size="172" fill="#8288f0" letter-spacing="-4">LM</text>
+ <rect x="268" y="330" width="64" height="122" fill="#f2f2f7" fill-opacity="0.9"/>
</svg>
diff --git a/scripts/artwork-fonts.py b/scripts/artwork-fonts.py
new file mode 100644
index 0000000..0c0725f
--- /dev/null
+++ b/scripts/artwork-fonts.py
@@ -0,0 +1,31 @@
+# The site's Recursive webfonts as static TTFs with their own family names
+# ("PS5LM Mono", "PS5LM Sans"), for rendering the app's SVG artwork.
+import os, sys
+from fontTools.ttLib import TTFont
+from fontTools.varLib.instancer import instantiateVariableFont
+
+src, dst = sys.argv[1], sys.argv[2]
+os.makedirs(dst, exist_ok=True)
+for name, family in (("recursive-mono-v1", "PS5LM Mono"), ("recursive-sans-v1", "PS5LM Sans")):
+ for weight, style in ((400, "Regular"), (800, "Bold")):
+ f = TTFont(f"{src}/{name}.woff2")
+ f.flavor = None
+ axes = {"wght": weight}
+ if "CASL" in [a.axisTag for a in f["fvar"].axes]:
+ axes["CASL"] = 0
+ f = instantiateVariableFont(f, axes)
+ for rec in f["name"].names:
+ if rec.nameID in (1, 16):
+ rec.string = family
+ elif rec.nameID in (2, 17):
+ rec.string = style
+ elif rec.nameID == 4:
+ rec.string = f"{family} {style}"
+ elif rec.nameID == 6:
+ rec.string = f"{family.replace(' ', '')}-{style}"
+ f["OS/2"].usWeightClass = weight
+ f["OS/2"].fsSelection = (f["OS/2"].fsSelection & ~0b1100001) | (0b100000 if style == "Bold" else 0b1000000)
+ f["head"].macStyle = 1 if style == "Bold" else 0
+ out = f"{dst}/{family.replace(' ', '')}-{style}.ttf"
+ f.save(out)
+ print(out)
diff --git a/scripts/build-app.sh b/scripts/build-app.sh
index 52cb310..a0ad59d 100755
--- a/scripts/build-app.sh
+++ b/scripts/build-app.sh
@@ -197,13 +197,13 @@ rm -rf -- "$app"
mkdir -p "$app/sce_sys" "$app/sce_module"
"$tool" self --sign --in "$out/eboot.elf" --out "$app/eboot.bin" --magic 0x1D3D154F
cp "$param" "$app/sce_sys/param.json"
-# The home screen backgrounds (3840x2160 BC7 DDS) are made from the SVG in
-# ps5/app/sce_sys/source by PS5_Vulkan's asset tools, and only when it changes.
-if [ ! -f "$sce_sys/pic0.dds" ] || [ "$sce_sys/source/background.svg" -nt "$sce_sys/pic0.dds" ]; then
+# The home screen backgrounds (3840x2160 BC7 DDS) are made from source/background.png
+# (scripts/render-artwork.sh renders it from the SVG) by PS5_Vulkan's asset tools,
+# and only when it changes.
+if [ ! -f "$sce_sys/pic0.dds" ] || [ "$sce_sys/source/background.png" -nt "$sce_sys/pic0.dds" ]; then
mkdir -p "$out/assets"
- magick "$sce_sys/source/background.svg" "$out/assets/background.png"
(cd "$vk" && bash tools/setup-asset-dependencies.sh > /dev/null &&
- bash tools/prepare-assets.sh --icon "$sce_sys/icon0.png" --background "$out/assets/background.png" \
+ bash tools/prepare-assets.sh --icon "$sce_sys/icon0.png" --background "$sce_sys/source/background.png" \
--output-directory "$out/assets" > /dev/null)
cp "$out/assets/pic0.dds" "$out/assets/pic1.dds" "$sce_sys/"
fi
diff --git a/scripts/release-app.sh b/scripts/release-app.sh
index 568003f..a92979a 100755
--- a/scripts/release-app.sh
+++ b/scripts/release-app.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Packages the built app for a release: build/release/ps5lm-app-v<version>.zip
-# holding the PPSA99581 title folder, plus its sha256. The version comes from
+# holding the app's title folder (PPSA99575), plus its sha256. The version comes from
# ps5/app/version.hpp; the git tag is v<version>.
#
# scripts/build-app.sh && scripts/release-app.sh
diff --git a/scripts/render-artwork.sh b/scripts/render-artwork.sh
new file mode 100755
index 0000000..1296042
--- /dev/null
+++ b/scripts/render-artwork.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+# Renders the app's artwork from its SVG sources in ps5/app/sce_sys/source:
+# icon0.png (512x512) and background.png (3840x2160), which scripts/build-app.sh
+# turns into the home screen's DDS backgrounds. The text is set in the site's
+# Recursive fonts (site/assets/fonts), installed for fontconfig as "PS5LM Mono"
+# and "PS5LM Sans" by scripts/artwork-fonts.py. Needs rsvg-convert and fontTools.
+set -euo pipefail
+
+root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
+src="$root/ps5/app/sce_sys/source"
+fonts="${XDG_DATA_HOME:-$HOME/.local/share}/fonts"
+python3 "$root/scripts/artwork-fonts.py" "$root/site/assets/fonts" "$fonts" > /dev/null
+fc-cache -f "$fonts"
+rsvg-convert -w 512 -h 512 "$src/icon.svg" -o "$root/ps5/app/sce_sys/icon0.png"
+rsvg-convert -w 3840 -h 2160 "$src/background.svg" -o "$src/background.png"
+echo "render-artwork: icon0.png and source/background.png"