From 32de0ce795dced9a22080853ff6d5d3d0faa7f1a Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Mon, 21 Sep 2026 22:26:43 +0800 Subject: [PATCH 1/5] fix(bsp): set button press timing explicitly (180 ms / 500 ms) - bsp_pins.h gains BSP_BTN_SHORT_PRESS_MS (180) and BSP_BTN_LONG_PRESS_MS (500); bsp_button.c passes both to button_config_t instead of { 0 }, so the press timing no longer depends on the button component's Kconfig defaults. - User-visible change: LONG now triggers at 500 ms instead of 1500 ms, which is what the demo's OK-long-press-returns interaction uses. The component's BUTTON_LONG_PRESS_TIME_MS Kconfig lower bound is also 500 ms, so a shorter long press can only be passed in code. - The init log reports both thresholds, and tests/test_bsp_button.c asserts the values handed to iot_button_create(). - docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.{md,zh_CN.md} document the explicit timings and why they are pinned. --- components/bsp/include/bsp_pins.h | 7 +++++++ components/bsp/src/bsp_button.c | 9 +++++++-- docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md | 2 +- .../AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md | 1 + tests/test_bsp_button.c | 4 +++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/components/bsp/include/bsp_pins.h b/components/bsp/include/bsp_pins.h index 8ef7a15..8b0af0d 100644 --- a/components/bsp/include/bsp_pins.h +++ b/components/bsp/include/bsp_pins.h @@ -54,6 +54,13 @@ #define BSP_BTN_ADC_CHANNEL ADC_CHANNEL_0 // GPIO0 #define BSP_BTN_COUNT 3 +// 按键判定时序(ms):由 BSP 显式下发给 button 组件,不依赖它的 Kconfig 默认值。 +// 短按判定窗口 180ms 与组件默认一致,写在这里是为了和应用手感放在一起调; +// 长按组件默认 1500ms,要按住 1.5s 才触发,在这台三键小设备上明显偏迟钝,收敛到 500ms。 +// (组件对 BUTTON_LONG_PRESS_TIME_MS 的 Kconfig 下限同样是 500ms,想再短只能在代码里下发。) +#define BSP_BTN_SHORT_PRESS_MS 180 // 短按(单击)判定窗口 +#define BSP_BTN_LONG_PRESS_MS 500 // 长按触发时间 + // 每键的电压窗口 {min_mV, max_mV};边界取相邻档中点。 // 确定键上界留宽到 1900,是为了和松开态的 3300mV 拉开距离。 #define BSP_BTN_MV_TABLE { {0, 150}, {150, 447}, {447, 1900} } diff --git a/components/bsp/src/bsp_button.c b/components/bsp/src/bsp_button.c index 6bb9e92..11a269f 100644 --- a/components/bsp/src/bsp_button.c +++ b/components/bsp/src/bsp_button.c @@ -176,7 +176,11 @@ esp_err_t bsp_button_init(bsp_btn_cb_t cb, void *user) { .base = { .get_key_level = button_level, .del = button_driver_delete }, .index = (unsigned)i, }; - const button_config_t bc = { 0 }; + // 判定门限由 BSP 显式下发(见 bsp_pins.h):组件 Kconfig 默认的长按 1500ms 偏迟钝。 + const button_config_t bc = { + .short_press_time = BSP_BTN_SHORT_PRESS_MS, + .long_press_time = BSP_BTN_LONG_PRESS_MS, + }; esp_err_t e = iot_button_create(&bc, &s_drivers[i].base, &s_btn[i]); if (e != ESP_OK || !s_btn[i]) { ESP_LOGE(TAG, "按键 %d 创建失败 (%s) —— 检查 GPIO%d 的 ADC 配置与分压电阻", @@ -196,7 +200,8 @@ esp_err_t bsp_button_init(bsp_btn_cb_t cb, void *user) { s_sample_valid = false; s_ready = true; - ESP_LOGI(TAG, "按键就绪:ADC1_CH%d 三键分压", BSP_BTN_ADC_CHANNEL); + ESP_LOGI(TAG, "按键就绪:ADC1_CH%d 三键分压,短按 %dms 长按 %dms", + BSP_BTN_ADC_CHANNEL, BSP_BTN_SHORT_PRESS_MS, BSP_BTN_LONG_PRESS_MS); return ESP_OK; } diff --git a/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md b/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md index a21ac24..6056ca5 100644 --- a/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md +++ b/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md @@ -142,7 +142,7 @@ GPIO0 has an external 10 kΩ pull-up to 3.3 V. UP, DOWN, and OK connect it to gr | OK | about 595 mV | `[447, 1900)` mV | | Released | about 3300 mV | outside all windows | -Do not replace the external resistor with the inaccurate internal pull-up. The BSP owns one ADC1 oneshot unit and calibration handle, shared by its static drivers through the public `iot_button` driver interface and by voltage reads. Attenuation is `ADC_ATTEN_DB_12`; one averaged sample is reused across the three keys in each polling cycle. Half-open windows prevent overlapping keys at a boundary. Calibration failure aborts initialization and rolls back; read/conversion failures are inactive readings, never a zero-voltage UP press. The BSP avoids the dependency's ADC index registry so partial allocation failure cannot strand an occupied index on retry. Callbacks originate in the button component's shared `esp_timer` task and must only enqueue work or perform similarly bounded operations. +Do not replace the external resistor with the inaccurate internal pull-up. The BSP owns one ADC1 oneshot unit and calibration handle, shared by its static drivers through the public `iot_button` driver interface and by voltage reads. Attenuation is `ADC_ATTEN_DB_12`; one averaged sample is reused across the three keys in each polling cycle. Half-open windows prevent overlapping keys at a boundary. Calibration failure aborts initialization and rolls back; read/conversion failures are inactive readings, never a zero-voltage UP press. The BSP avoids the dependency's ADC index registry so partial allocation failure cannot strand an occupied index on retry. The BSP also passes the press timing explicitly (`BSP_BTN_SHORT_PRESS_MS` = 180 ms, `BSP_BTN_LONG_PRESS_MS` = 500 ms, in `bsp_pins.h`) instead of relying on the component's Kconfig defaults of 180 / 1500 ms: holding a key for 1.5 s before a long press registers is slow on this three-key device. The component's `BUTTON_LONG_PRESS_TIME_MS` Kconfig lower bound is also 500 ms, so a shorter long press can only be passed in code. Callbacks originate in the button component's shared `esp_timer` task and must only enqueue work or perform similarly bounded operations. Calibrate thresholds using multiple boards, charge levels, and reasonable temperatures; leave margin between measured distributions rather than relying only on divider theory. diff --git a/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md b/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md index 2a43df6..1427f26 100644 --- a/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md +++ b/docs/hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md @@ -179,6 +179,7 @@ LVGL 非线程安全: - 校准创建失败会中止初始化并回滚;读取或换算失败视为未按下,而不是把无效电压作为 0 mV 触发 UP。BSP 不使用依赖的 ADC 索引注册表,避免部分分配失败后遗留占用索引、阻止重试。 - 回调来自 button 组件使用的共享 `esp_timer` 任务,只能入队或执行同等级的有界操作,不能阻塞、录音、播放或访问 UI。 - 事件包括 PRESS、CLICK、DOUBLE、LONG。应用菜单主要消费 CLICK;页面中的 OK LONG 被全局拦截用于返回。 +- 按键判定时序由 BSP 显式下发(`BSP_BTN_SHORT_PRESS_MS` = 180 ms、`BSP_BTN_LONG_PRESS_MS` = 500 ms,见 `bsp_pins.h`),不依赖组件 Kconfig 默认的 180 / 1500 ms:三个小按键上按住 1.5 s 才触发长按偏迟钝。组件对 `BUTTON_LONG_PRESS_TIME_MS` 的 Kconfig 下限同样是 500 ms,更短的长按只能在代码里下发。 重标阈值时,在 Button 页逐个长按按键记录稳定电压,采集多块板、不同电量和合理温度范围的数据,再把相邻分布之间留裕量设置为边界。不要只用理论分压值。 diff --git a/tests/test_bsp_button.c b/tests/test_bsp_button.c index cf97a3a..24c4039 100644 --- a/tests/test_bsp_button.c +++ b/tests/test_bsp_button.c @@ -47,7 +47,9 @@ esp_err_t adc_cali_raw_to_voltage(adc_cali_handle_t h, int raw, int *mv) { } int64_t esp_timer_get_time(void) { return clock_us; } esp_err_t iot_button_create(const button_config_t *cfg, const button_driver_t *driver, button_handle_t *h) { - (void)cfg; + // 判定门限必须由 BSP 显式下发(bsp_pins.h),不能退回组件默认的 180 / 1500ms。 + assert(cfg->short_press_time == BSP_BTN_SHORT_PRESS_MS); + assert(cfg->long_press_time == BSP_BTN_LONG_PRESS_MS); if (++create_calls == fail_create) return ESP_ERR_NO_MEM; for (int i = 0; i < BSP_BTN_COUNT; ++i) { if (buttons[i].live) continue; From 87657c63be7ca72fda70ab4bdbe873dacdeae75d Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Sun, 27 Sep 2026 05:47:21 +0800 Subject: [PATCH 2/5] docs(reference): archive four published applications Add the application playbooks for the four applications published from the fork on 2026-09-26 and register them in both language versions of the reference index: - Asunabi (v0.1.0-asunabi) - Saya no Uta (v0.1.1-saya-no-uta) - ATRI Reader (v1.0.2-atri-reader) - Starry Sky Railroad and Shiro's Journey (v0.1.0-starry-sky-railroad) Text only: covers and merged firmware images are recorded by name, format and size, never committed. Consolidates the archive halves of upstream PRs #73, #75, #76 and #78 into a single documentation change. Repository checks: PASS (255 text files scanned). --- docs/reference/README.md | 4 + docs/reference/README.zh_CN.md | 4 + docs/reference/shinku-chen/asunabi/README.md | 90 ++++++++++++ .../shinku-chen/asunabi/README.zh_CN.md | 74 ++++++++++ .../shinku-chen/atri-reader/README.md | 134 ++++++++++++++++++ .../shinku-chen/atri-reader/README.zh_CN.md | 93 ++++++++++++ .../shinku-chen/saya-no-uta/README.md | 104 ++++++++++++++ .../shinku-chen/saya-no-uta/README.zh_CN.md | 85 +++++++++++ .../shinku-chen/starry-sky-railroad/README.md | 110 ++++++++++++++ .../starry-sky-railroad/README.zh_CN.md | 90 ++++++++++++ 10 files changed, 788 insertions(+) create mode 100644 docs/reference/shinku-chen/asunabi/README.md create mode 100644 docs/reference/shinku-chen/asunabi/README.zh_CN.md create mode 100644 docs/reference/shinku-chen/atri-reader/README.md create mode 100644 docs/reference/shinku-chen/atri-reader/README.zh_CN.md create mode 100644 docs/reference/shinku-chen/saya-no-uta/README.md create mode 100644 docs/reference/shinku-chen/saya-no-uta/README.zh_CN.md create mode 100644 docs/reference/shinku-chen/starry-sky-railroad/README.md create mode 100644 docs/reference/shinku-chen/starry-sky-railroad/README.zh_CN.md diff --git a/docs/reference/README.md b/docs/reference/README.md index c34ae8c..9933ef4 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -35,6 +35,10 @@ The engineering rules themselves live under - [Voice Keychain](shinku-chen/voice-keychain/README.md) — a sound-effects keychain that turns the AI Passport into a pocket audio player. - [What to Eat Today](shinku-chen/eat-what/README.md) — a button-driven food roulette that turns the AI Passport into a "what should I eat?" spinner. - [Connect Four](shinku-chen/connect-four/README.md) — a landscape 10 × 7 four-in-a-row game with three computer difficulty levels, a two-player mode, synthesized sound, and an idle deep sleep. +- [Asunabi](shinku-chen/asunabi/README.md) — a portrait visual-novel reader that carries a complete 30-chapter story, originally a Xiaomi Band quick app, with six save slots, chapter select, and auto-play. +- [Saya no Uta](shinku-chen/saya-no-uta/README.md) — a landscape visual-novel reader with 44 chapters, 3,828 dialogue lines and three endings, read fully offline with three keys. +- [ATRI Reader](shinku-chen/atri-reader/README.md) — a portrait visual-novel reader that plays the complete *ATRI -My Dear Moments-* story offline: 34 chapters, 1,069 scenes, 12,188 dialogue lines, speaker-driven full-body sprites and three endings. +- [Starry Sky Railroad and Shiro's Journey](shinku-chen/starry-sky-railroad/README.md) — a portrait visual-novel reader carrying a 39-chapter fan port offline, with per-speaker sprites and an automatic save on every scene. ### PhoenixZHC diff --git a/docs/reference/README.zh_CN.md b/docs/reference/README.zh_CN.md index 58cac0f..643f203 100644 --- a/docs/reference/README.zh_CN.md +++ b/docs/reference/README.zh_CN.md @@ -28,6 +28,10 @@ - [音效钥匙扣](shinku-chen/voice-keychain/README.zh_CN.md) — 把 AI Passport 变成口袋音频播放器的音效钥匙扣。 - [今天吃啥](shinku-chen/eat-what/README.zh_CN.md) — 按键驱动的食物轮盘,把 AI Passport 变成「今天吃什么」小转盘。 - [四子棋](shinku-chen/connect-four/README.zh_CN.md) — 横屏 10 列 × 7 行的四子连珠游戏,带三档电脑难度、双人模式、合成音效与空闲自动深睡。 +- [飞鸟会长不肯认输](shinku-chen/asunabi/README.zh_CN.md) — 竖屏视觉小说阅读器,承载完整的 30 章故事(原作是小米手环快应用),带六个存档位、选章与自动阅读。 +- [沙耶之歌](shinku-chen/saya-no-uta/README.zh_CN.md) — 横屏视觉小说阅读器:44 章、3,828 段对白、3 个结局,全程离线,三个按键读完。 +- [亚托莉阅读器](shinku-chen/atri-reader/README.zh_CN.md) — 把完整《亚托莉 -My Dear Moments-》剧情装进 AI Passport 的竖屏视觉小说阅读器:34 章、1,069 幕、12,188 句对白、立绘跟说话人、三个结局,全程离线。 +- [星空列车与白的旅行](shinku-chen/starry-sky-railroad/README.zh_CN.md) — 把 39 章的同人移植剧本离线装进机身的竖屏视觉小说阅读器,立绘跟随说话人、每次换场景自动存档。 ### PhoenixZHC diff --git a/docs/reference/shinku-chen/asunabi/README.md b/docs/reference/shinku-chen/asunabi/README.md new file mode 100644 index 0000000..0ab4411 --- /dev/null +++ b/docs/reference/shinku-chen/asunabi/README.md @@ -0,0 +1,90 @@ +

+ 简体中文 · English +

+ +# Asunabi + +A portrait visual-novel reader for the AI Passport. It carries a complete story that +was originally a Xiaomi Band quick app — 30 chapters, 4,649 dialogue lines and about +94,000 characters, from the first line to a single ending. The firmware replaces the +demo menu and boots straight into the title screen. + +## The story + +The student council president is Asuka Shishidou, known as the Ice Princess: in the +after-school corridor a teacher's call catches someone else's name, her blush gives +her away, and a notebook the protagonist happens to pick up is what puts him on her +radar. Thirty chapters carry the two from that first meeting to a single ending, +with chapter select for readers who want to jump straight to a favourite scene. + +## Publish information + +- **Title**: Asunabi +- **Description**: submitted to the AI Passport community market (under review), + where the listing describes it as: + + > A portrait reader for a 30-chapter visual novel ported from a Xiaomi Band quick + > app: start, continue, chapter select and settings; six save slots; text speed and + > size; auto-play; one ending. + +- **Category**: games +- **Cover**: `comm_cover.png` (PNG, 1152 × 1536, 3:4) — publish metadata only; the + image is not committed here. It is the upstream key art, fitted to 3:4. +- **Source**: , branch `feature/asunabi-galgame` +- **Story and artwork**: + +## What it does + +- **Boots straight into the story**: no test menu, no network, and no audio — nothing + in this application plays sound, so the codec is left uninitialised. +- **Reading**: confirm advances a line; a line still being typed is revealed in full + first; a line too long for the panel is paginated rather than clipped. +- **Auto-play**: long-pressing DOWN toggles it, a line advances 0.9 s after it + finishes revealing, and any key press ends the mode. +- **Fast-forward**: holding UP advances while held and stops the moment it is + released. +- **Saves**: six manual slots plus an automatic resume point, both in NVS; a slot is + deleted by long-pressing confirm on it. Save positions include the page within a + line. +- **Settings**: text speed (slow / medium / fast / instant), text size (16 px or + 20 px, with a live typing preview), and auto-play. +- **Chapter select**: jump to any of the 30 chapters from the title screen. +- **Drawn over the artwork**: a 30% tint over the title backdrop, a 50% plate behind + the option list, and a 70% dialogue panel — the scene stays visible while near-white + text stays readable, and the firmware never blanks the panel, so auto-play can run + unattended. +- **Long press registers at 300 ms**: the BSP passes the press timing explicitly + instead of using the button component's 1,500 ms default. + +## Interaction + +Three keys. The battery percentage is at the top right and degrades to `--%` when the +gauge cannot be read. + +| Key | Reading | In a menu | +| --- | --- | --- | +| UP (short) | next line, or reveal the rest of the current one | move the selection up | +| UP (hold) | fast-forward while held | — | +| OK (short) | open the menu | activate the selected row | +| OK (hold) | — | leave the menu | +| DOWN (short) | scroll a line that runs past the panel | move the selection down | +| DOWN (hold) | toggle auto-play (0.9 s per line; any key cancels) | — | + +## Assets + +The story text and artwork are third-party content from the upstream Xiaomi Band +project, which declares no license. On this fork they are committed under +`assets/gal-source/`, so a clone builds the complete game; the pipeline in the +branch's `tools/gal/` packs them into a read-only 4 MiB `assets` data partition +(3.55 MiB used) and derives the CJK font subsets from the packed scripts. A build +without that tree still boots, with a placeholder pack instead of the story. + +## Source + +- **Branch**: [`feature/asunabi-galgame`](https://github.com/Shinku-Chen/ai-passport/tree/feature/asunabi-galgame) +- **Release**: tag `v0.1.0-asunabi` on the fork; merged image + `FoloToy-AI-Passport-full.bin`, 7,917,142 bytes (application at `0x10000`, assets at + `0x400000`) +- **Asset pipeline**: [branch `tools/gal/`](https://github.com/Shinku-Chen/ai-passport/tree/feature/asunabi-galgame/tools/gal) +- **Build**: `./tools/validate.sh --firmware`, after installing Pillow into the Python + environment the ESP-IDF build uses; flash the merged image from `0x0` diff --git a/docs/reference/shinku-chen/asunabi/README.zh_CN.md b/docs/reference/shinku-chen/asunabi/README.zh_CN.md new file mode 100644 index 0000000..ef6a055 --- /dev/null +++ b/docs/reference/shinku-chen/asunabi/README.zh_CN.md @@ -0,0 +1,74 @@ +

+ 简体中文 · English +

+ +# 飞鸟会长不肯认输(Asunabi) + +AI Passport 上的竖屏视觉小说阅读器。它承载一个完整的故事 —— 原作是小米手环上的快应用: +30 章、4,649 句对白、约 9.4 万字,从第一句读到唯一结局。固件替换掉 demo 菜单,开机直接进入 +标题画面。 + +## 故事 + +学生会长是狮子堂飞鸟,人称「冰之公主」:放学后的走廊上,她误以为老师叫的是自己而瞬间脸红; +而作为普通学生的主角,因为捡到的一本笔记本,从此被她盯上了。30 章把这个误会一路写到唯一的结局, +想直接重温某个场景也可以用选章跳过去。 + +## 发布信息 + +- **标题**:飞鸟会长不肯认输(Asunabi) +- **描述**:已投稿到 AI Passport 社区市场(审核中),投稿时的描述是: + + > 从小米手环快应用移植的 30 章竖屏视觉小说阅读器:开始、继续、选章、设置;六个存档位; + > 文字速度与字号;自动阅读;单一结局。 + +- **分类**:游戏 +- **封面**:`comm_cover.png`(PNG,1152 × 1536,3:4)—— 仅为发布元数据,封面图**不入库**。 + 用的是上游官方主视觉,按 3:4 裁切。 +- **来源**:,分支 `feature/asunabi-galgame` +- **故事与美术**: + +## 它做什么 + +- **开机直接进故事**:没有测试菜单、不联网、也没有音频 —— 这个应用不出声,所以干脆不初始化 + codec。 +- **阅读**:确定键推进一句;正在逐字显示的句子先立即全显;超出面板的长句分页显示而不是裁掉。 +- **自动阅读**:长按下键开关,句子显示完毕后 0.9 秒自动推进,按任意键解除。 +- **快进**:按住上键持续推进,松手立即停止。 +- **存档**:六个手动存档位加一个自动续读点,都存在 NVS;在存档位上长按确定键即删除。存档位置 + 包含"该句的第几页"。 +- **设置**:文字速度(慢 / 中 / 快 / 瞬间)、文字大小(16 px 或 20 px,带实时打字预览)、 + 自动阅读。 +- **选章**:从标题画面直接跳到 30 章中的任意一章。 +- **画面之上作画**:标题背景上一层 30% 底纹、选项列表下 50% 半透明底板、对白面板 70% 半透明 + —— 画面保持可见,近白色文字也压得住;固件不会熄灭屏幕,自动阅读可以无人值守地一直读下去。 +- **长按判定 300 ms**:由 BSP 显式下发判定时序,而不是用 button 组件默认的 1,500 ms。 + +## 交互 + +三个按键。电量百分比在右上角,读不到电量计时降级显示 `--%`。 + +| 按键 | 阅读中 | 菜单中 | +| --- | --- | --- | +| UP 短按 | 下一句,或立即全显当前句 | 选中项上移 | +| UP 长按 | 按住快进,松手即停 | — | +| OK 短按 | 呼出菜单 | 执行选中项 | +| OK 长按 | — | 退出菜单 | +| DOWN 短按 | 滚动超出面板的文字 | 选中项下移 | +| DOWN 长按 | 切换自动阅读(每句 0.9 秒,任意键解除) | — | + +## 素材 + +故事文本与美术来自上游的小米手环项目,属于第三方内容,且该仓库未声明任何许可。在这个 fork 上 +它们提交在 `assets/gal-source/`,因此 clone 就能构建出完整作品;分支里的 `tools/gal/` 流水线把 +它们打包进一个只读的 4 MiB `assets` 数据分区(实际用 3.55 MiB),并从打包后的剧本推导出 CJK +字体子集。没有该目录的构建依然能启动,只是换成占位包而不是故事。 + +## 来源 + +- **分支**:[`feature/asunabi-galgame`](https://github.com/Shinku-Chen/ai-passport/tree/feature/asunabi-galgame) +- **发布**:fork 上的 tag `v0.1.0-asunabi`;合并镜像 + `FoloToy-AI-Passport-full.bin`,7,917,142 字节(应用在 `0x10000`,素材分区在 `0x400000`) +- **素材工具链**:[分支里的 `tools/gal/`](https://github.com/Shinku-Chen/ai-passport/tree/feature/asunabi-galgame/tools/gal) +- **构建**:先给 ESP-IDF 使用的 Python 环境装 Pillow,再跑 `./tools/validate.sh --firmware`; + 从 `0x0` 烧录合并镜像 diff --git a/docs/reference/shinku-chen/atri-reader/README.md b/docs/reference/shinku-chen/atri-reader/README.md new file mode 100644 index 0000000..fbe2bb7 --- /dev/null +++ b/docs/reference/shinku-chen/atri-reader/README.md @@ -0,0 +1,134 @@ +

+ 简体中文 · English +

+ +# ATRI Reader + +A portrait visual-novel reader for the AI Passport: the complete *ATRI -My Dear +Moments-* story in 34 chapters, 1,069 scenes, 12,188 dialogue lines and three +endings, read entirely offline with the device's three buttons. The script, +backgrounds, full-body character sprites and the Chinese font subset are all built +into one merged firmware image. + +## Publish information + +- **Title**: submitted as *ATRI -My Dear Moments- Visual Novel* in English, with the + localized Chinese game title in the Chinese fields. +- **Description**: submitted as: + + > Natsuki, a boy who lost a leg in an accident as a child, is tired of city life + > and moves to a small seaside town. All his grandmother, once a marine geologist, + > leaves him is a boat, a submarine and her debts. To take back the future he lost, + > Natsuki dives with Catherine, a mysterious debt collector, to an undersea warehouse + > said to hold his grandmother's legacy. There he finds a mysterious girl, Atri, + > asleep inside a coffin-like device - a robot built so precisely that she is + > indistinguishable from a human, and full of feeling. "I want to finish the last + > order my master left me," she says, salvaged from the sea. "Until then, I will be + > Natsuki's leg." In a peaceful town slowly sinking into the sea, an unforgettable + > summer begins for the boy and the robot girl. + > + > This is an offline visual novel for a pocket-sized screen: 34 chapters, 12,188 + > lines of dialogue and three endings. Every script line, background and full-body + > character sprite travels inside the firmware, so the whole story is readable + > without a network. + > + > - Three-key reading: UP / DOWN step through lines, holding UP fast-forwards, + > holding DOWN starts auto-read (each line advances by itself, and the screen + > stays on while it runs), OK opens the menu (save, load, skip chapter, back to + > title). + > - Sprites follow the speaker: one appears only while a named character is + > talking, the viewpoint character never shows himself, and event CGs are not + > double-drawn. + > - Five manual save slots plus an automatic save on every scene change; reach the + > happy and the bad ending to unlock the true-ending chapter on the title screen. + > - Idle dims, blanks and sleeps the screen on its own; any key wakes it and + > reading continues. + +- **Category**: `games`. +- **Cover**: `atri-reader-cover.png` (PNG, 1152 × 1536, 3:4) — publish metadata + only; the cover image is not committed here. +- **Source**: + +## What it does + +- **Boots straight into the reader**: the firmware opens the visual novel's own + first-run notice and title screen, with no test menu and no network use. +- **Full offline story**: a 3.8 MB resource pack carries 12,188 dialogue lines, + 73 full-screen backgrounds, 14 effect overlays and 5 full-body character sprites; + a 16 px Chinese font subset of about 2,770 code points (about 0.39 MB of flash) + covers every UI string and every script character. Both are generated by tools in + this repository and committed, so a plain checkout builds. +- **Speaker-driven sprites**: a sprite appears only on a line that carries a speaker + name and hides as soon as that character stops talking. Event CGs (`ev*`), black + screens (`none*`) and the masked variants (`mask*`, `hurt*`) never show one, the + viewpoint character never appears, and the alternate spellings the script uses for + the same character (robot girl, the girl, three spellings of Ririka, the voice + lines) all resolve to the same sprite. Sprites stand 6 px from the right edge of + the art area. +- **Portrait layout**: a 240 × 320 art area with the source's translucent blue text + band alpha-blended into the canvas, a speaker name plate, the chapter number in + the top-left corner, the page counter in the bottom-right corner, and a light scrim + over the text rows so a sprite is never hidden behind the dialogue box. Backgrounds + stay JPEG; sprites and overlays use lossless RGB565 colour plus a 4 bpp alpha mask, + which keeps a full-screen composite affordable on a part without PSRAM. +- **Reading modes**: typewriter text at four speeds (instant / slow / medium / fast), + fast-forward that renders whole lines until the key is released, and auto-read + where a line advances 700 ms after it finishes typing. +- **Saves**: five manual slots plus one automatic slot written on every scene + change, offered as "continue" from the title screen. The v2 save format keeps the + current sprite and still reads v1 saves. +- **Endings**: the script's three decisions lead to the happy or the bad ending; + seeing both unlocks the true-ending chapter on the title screen, which is how the + source Mi Band port gates its extra episode. +- **Idle behaviour**: 45 s dims the backlight, 2.5 minutes turns the screen off and + 7 minutes enters deep sleep, with any key waking the device back to the title + screen. Auto-read is not idle time, so an unattended run keeps the screen awake; + waiting on a choice or an ending is not activity and still turns the screen off. +- **Verification aids for later iterations**: the USB serial console accepts + `ATRIJUMP [scene]` (moves the live reading position) and + `ATRISHOT ` (renders that scene into the canvas and streams the + raw 240 × 320 frame back), and `idf.py -DATRI_BOOT_CHAPTER= build` boots + straight into a chapter. + +## Interaction + +Three keys drive the whole app; the battery readout sits in the corner of the art +area. + +The screens are: first-run notice, title, reading, menu, save/load list, settings, +about, and the ending card. + +Title screen and lists: + +- **UP / DOWN**: move the cursor. +- **OK**: enter the selected item (start, continue, unlockable true ending, load, + settings). +- **OK (hold)**: go back one level. + +While reading: + +- **UP / DOWN (short)**: advance one line. +- **UP (hold)**: fast-forward through whole lines until released. +- **DOWN (hold)**: start or stop auto-read; a marker appears in the bottom-right + corner while it runs and any real key press hands control back. +- **OK (short)**: open the menu - continue, save, load, skip chapter, back to title. + Skipping a chapter runs to the next chapter and stops at any choice or ending. +- At a choice: **UP / DOWN** selects and **OK** confirms. + +Save screens: **OK** overwrites the selected manual slot or loads it, and +**OK (hold)** deletes a manual slot. + +Press timing: a press shorter than 120 ms is ignored, and holding a key for 300 ms +triggers the long-press action. + +## Source + +- Repository `Shinku-Chen/ai-passport`, branch `feature/atri-reader` + (), release + `v1.0.2-atri-reader` (merged image `FoloToy-AI-Passport-full.bin`). +- Submitted to the AI Passport community as project `my-dear-moments-2` (project id + 670; under review when this entry was written). +- Rights: the script, images and translation come from the fan ports + `fywmjj/better-mb9p-ATRI` and `liuyuze61/ATRI-miband`, and from + *ATRI -My Dear Moments-* (ANIPLEX.EXE / Frontwing / Makura). This firmware is a + personal, non-commercial port; support the original release. diff --git a/docs/reference/shinku-chen/atri-reader/README.zh_CN.md b/docs/reference/shinku-chen/atri-reader/README.zh_CN.md new file mode 100644 index 0000000..cf2f66b --- /dev/null +++ b/docs/reference/shinku-chen/atri-reader/README.zh_CN.md @@ -0,0 +1,93 @@ +

+ English · 简体中文 +

+ +# 亚托莉阅读器 + +AI Passport 上的竖屏视觉小说阅读器:完整《亚托莉 -My Dear Moments-》剧情,34 章、 +1,069 幕、12,188 句对白、3 个结局,只用设备上的三个按键就能全程离线读完。剧本、背景、 +全身立绘与中文字体子集都编进同一份合并镜像。 + +## 发布信息 + +- **标题**:英文提交为 *ATRI -My Dear Moments- Visual Novel*,中文字段使用官方译名 + 《亚托莉 -My Dear Moments- 视觉小说》。 +- **简介**:提交内容为: + + > 小时候因为事故而失去一条腿的少年・斑鸠夏生,厌倦了都市的生活,移居到了海边的乡村小镇。曾经身为海洋地质学家的祖母留给他的、就只有船、潜水艇还有债务。 + > 夏生为了取回“失去的未来”,与迷之讨债人凯瑟琳一起,潜海前往据说保存着祖母遗产的海底仓库。 + > 在那里,他遇到了一位沉睡在如同棺材一般装置中不可思议的少女“亚托莉”。她是一位构造精密到与人类别无二致,而又丰富感情的机器人。 + > 从海底被打捞起来的亚托莉如是说到。 + > “我想完成主人留给我的最后的命令。在此之前,我会成为夏生先生的腿!” + > 在一个逐渐沉入海中的平和小镇,少年和机器人少女的难忘夏日就这么开始了。 + > + > 这是一部可以装进口袋的离线视觉小说:34 章、12,188 句对白、三个结局,剧本、背景与人物立绘全部随固件一起带走,不联网也能从头读到尾。 + > + > - 三键阅读:上 / 下翻句,长按上快进,长按下开启自动阅读(每句自动停留后翻页,自动阅读期间不会熄屏),确定打开菜单(保存 / 读取 / 跳过章节 / 返回标题)。 + > - 立绘按说话人切换,只有带人物名称的台词才出现;男主的视角不出镜,事件 CG 不重复叠立绘。 + > - 5 个手动存档位 + 每次换幕自动存档;达成圆满与悲剧结局后,标题页解锁「真正的结局」。 + > - 空闲自动调暗、熄屏、休眠,按任意键唤醒接着读。 + +- **分类**:`games`。 +- **封面**:`atri-reader-cover.png`(PNG,1152 × 1536,3:4)—— 仅作为发布元数据记录, + 封面图片本身不随本档案提交。 +- **来源**: + +## 它能做什么 + +- **开机即进阅读器**:固件直接打开阅读器自己的首次提示与标题页,没有测试菜单,也不使用网络。 +- **完整离线剧情**:3.8 MB 资源包内含 12,188 句对白、73 张全屏背景、14 张特效叠加与 5 张 + 全身立绘;16px 中文字体子集约 2,770 个码位(约 0.39 MB Flash),覆盖全部界面文案与剧本用字。 + 两者都由本仓库内的工具生成并提交,普通 checkout 即可构建。 +- **立绘跟说话人**:只有带人物名称的台词才出现立绘,该角色一说完就收起。事件 CG(`ev*`)、 + 黑屏(`none*`)以及带遮罩的变体(`mask*`、`hurt*`)整幕都不叠立绘;男主的视角不出镜; + 剧本里同一角色的多种写法(机器人少女、少女、凛凛花的三种写法、声音台词等)都映射到同一张立绘。 + 立绘站在画面区右侧、距屏幕边缘 6px。 +- **竖屏版面**:240 × 320 画面区,源素材的蓝色半透明文字带以 alpha 混进画布,另有说话人名牌、 + 左上角章节号、右下角页码,以及文字区上方的浅暗帘,保证立绘不会被对白框挡住。背景保持 JPEG; + 立绘与叠加使用无损 RGB565 颜色 + 4bpp alpha 遮罩,使无 PSRAM 的板子也能承受整屏合成。 +- **阅读模式**:打字机文字四档速度(瞬间 / 慢 / 中 / 快)、按住上键整句快进直到松手、 + 以及打字结束后停 700ms 自动翻页的自动阅读。 +- **存档**:5 个手动槽 + 1 个自动槽(每次换幕自动写入,标题页的「继续阅读」读它)。 + v2 存档格式保留当前立绘,同时仍能读取 v1 存档。 +- **结局**:剧本里的三次选择通向圆满或悲剧结局;两者都看到后,标题页解锁「真正的结局」章节, + 与源移植项目解锁追加章节的门槛一致。 +- **空闲行为**:45 秒调暗背光、2.5 分钟熄屏、7 分钟进入深睡,任意键唤醒并回到标题页。 + 自动阅读不计入空闲,无人值守时屏幕保持点亮;停在选项或结局上属于等待玩家,照常按时限熄灭。 +- **便于后续迭代的验证手段**:USB 串口控制台支持 `ATRIJUMP <章> [幕]`(移动实际阅读位置)与 + `ATRISHOT <章> <幕>`(把该幕渲染进画布并回传原始 240 × 320 帧), + `idf.py -DATRI_BOOT_CHAPTER=<序号> build` 可直接开机进入指定章节。 + +## 交互方式 + +三个按键贯穿全部界面;电量读数位于画面区角落。界面共有:首次提示、标题页、正文、菜单、 +存档 / 读档列表、设置、关于、结局卡。 + +标题页与列表页: + +- **上 / 下**:移动光标。 +- **确定**:进入所选项(开始阅读 / 继续阅读 / 解锁后的「真正的结局」/ 读取存档 / 设置)。 +- **长按确定**:返回上一层。 + +阅读正文时: + +- **上 / 下(短按)**:下一句。 +- **上(长按)**:整句快进,松手即停。 +- **下(长按)**:开关自动阅读;开启时右下角显示标记,任何真实按键立刻交回控制权。 +- **确定(短按)**:打开菜单 —— 继续阅读 / 保存进度 / 读取存档 / 跳过章节 / 返回标题。 + 跳过章节会一直推进到下一章,路上遇到选项或结局就停下。 +- 遇到选项:**上 / 下**选择,**确定**确认。 + +存档页:**确定**覆盖所选手动槽或读取它,**长按确定**删除手动槽。 + +按键时序:短于 120ms 的按下会被忽略,按住 300ms 触发长按动作。 + +## 来源 + +- 仓库 `Shinku-Chen/ai-passport`,分支 `feature/atri-reader` + (), + release `v1.0.2-atri-reader`(合并镜像 `FoloToy-AI-Passport-full.bin`)。 +- 已提交到 AI Passport 社区,作品 `my-dear-moments-2`(项目 id 670;撰写本条目时正在审核中)。 +- 版权:剧本、图像与翻译来自同人移植 `fywmjj/better-mb9p-ATRI` 与 `liuyuze61/ATRI-miband`, + 以及原作《ATRI -My Dear Moments-》(ANIPLEX.EXE / Frontwing / Makura)。本固件为个人非商业移植, + 请支持原作。 diff --git a/docs/reference/shinku-chen/saya-no-uta/README.md b/docs/reference/shinku-chen/saya-no-uta/README.md new file mode 100644 index 0000000..120db14 --- /dev/null +++ b/docs/reference/shinku-chen/saya-no-uta/README.md @@ -0,0 +1,104 @@ +

+ 简体中文 · English +

+ +# Saya no Uta (Community) + +A landscape visual-novel reader for the AI Passport. It ports the Mi Band 10 fan +port of *Saya no Uta* to the device: 44 chapters, 3,828 dialogue lines and three +endings, fully offline, read with three keys. + +## Story + +Medical student Fuminori Sakisaka survives a traffic accident that kills his parents, but the +brain surgery that saves him leaves the world around him changed: he sees organs and rotting +flesh everywhere, people as moving lumps of meat, speech as animal noise, and even ordinary +food as revolting. + +In his despair the only normal thing left is a mysterious girl, Saya, who came to the hospital +looking for her father. After meeting her again and again, Fuminori falls for her, decides she +is the reason he can bear living in this diseased world, and invites her to live with him. + +That is only the door to the madness still to come. The story is a pure, if very different, +love story between Fuminori and Saya. + +## Publish information + +- **Title**: Saya no Uta (Community) +- **Description** (submitted copy): + + > Story: + > Medical student Fuminori Sakisaka survives a traffic accident that kills his parents, but the brain surgery that saves him leaves the world around him changed: he sees organs and rotting flesh everywhere, people as moving lumps of meat, speech as animal noise, and even ordinary food as revolting. + > + > In his despair the only normal thing left is a mysterious girl, Saya, who came to the hospital looking for her father. After meeting her again and again, Fuminori falls for her, decides she is the reason he can bear living in this diseased world, and invites her to live with him. + > + > That is only the door to the madness still to come. The story is a pure, if very different, love story between Fuminori and Saya. + > + > What it turns your device into: + > Turn the AI Passport into a pocket visual-novel reader and revisit Saya no Uta: 44 chapters, 3,828 dialogue lines and three endings, fully offline and ready out of the box. + > + > Three keys carry the whole story: UP advances, holding UP fast-forwards until you let go, DOWN steps back a page, and OK opens the menu. Jump straight to any chapter to re-read a favourite scene, or switch on auto-play and let the story read itself. The art fills the whole screen and the translucent dialogue panel shows the scene behind it, so you can finish the whole route without reaching for your phone. + > + > This build contains the community-safe base assets only; no adult content is included. The story is graphic in places, so please read with care. It is a personal study port built from a public Mi Band port and is meant for personal devices; please support the official release if you can. + +- **Instructions** (submitted separately; Chinese is required): + + > First run: no network and no pairing needed. Power on and follow these steps to read the whole story. + > + > 1. The content warning screen comes up first. Scroll it with UP / DOWN; once you reach the end the hint turns into "press OK to continue" and OK enters the game. Before that, OK only pages the text down. + > 2. On the title screen pick with UP / DOWN and press OK: Continue (only shown when an automatic save exists - it resumes the scene you stopped at), Start from chapter 1, Load save, Settings. + > 3. While reading: UP advances a segment, holding UP fast-forwards until you release it, DOWN steps back a page, and OK opens the menu. Long lines are split into pages, so DOWN also lets you re-read the previous page. + > 4. Auto-play: hold DOWN for about a second on the reading screen (a notice appears). Once the current segment has finished typing, a new segment is read every 0.9 seconds. Any key stops it, and choices or endings stop it automatically. The screen will not dim or sleep while auto-play runs. + > 5. Choices and endings: when choices appear, pick one with UP / DOWN and confirm with OK; the story branches and has three endings in total. + > 6. Menu (tap OK while reading): Save writes to a manual slot or the automatic slot, Load reads a save, Skip chapter jumps to the next chapter (it stops first at a choice the chapter has not reached yet), Back to title returns to the title screen, and Close menu resumes reading. + > 7. Saves: five manual slots plus one automatic slot written on every scene change. Holding OK on a slot in the save screen deletes that save. + > 8. Settings (entered from the title screen): Text speed switches between slow / medium / fast / instant (instant shows the whole page at once), Font size switches 16 px and 20 px, About is a scrollable page, and Back returns to the title screen. + > 9. Battery and power: the battery percentage sits in the top-right corner. After a long idle period the screen dims (about 60 s), turns off (about 180 s) and the device sleeps (about 420 s); any key wakes it and resumes from the automatic save. + +- **Submission record**: project 672, revision 1413, slug `community-10803507`, status + `pending` (submitted for review). Two earlier submissions of the same build disappeared from + the creator centre shortly after submitting, so this is the third attempt. +- **Category**: games +- **Cover**: `saya-no-uta-cover.png` (PNG, 1152 × 1536, 3:4) — this archive stays text-only and + records the cover by file name and format only; it is not committed here. The release notes and + the community listing use the copy kept at `assets/images/saya-no-uta-cover.png` in the + author's fork. +- **Source**: + +## Cover + +`saya-no-uta-cover.png` (PNG, 1152 × 1536) uses the original key visual: Saya with +the title lettering. The cover is recorded here as publish metadata only and is not +committed to the repository. + +## Features + +- **Three keys, 44 chapters**: OK opens the menu, UP advances (hold to fast-forward, + release to stop) and DOWN steps back a page; list cursors stop at the ends instead + of wrapping around. +- **Paginated body text**: 19 full-width characters per line and four lines per + screen at 16 px (15 characters and three lines at 20 px), with a typewriter effect + that can also print a whole page instantly. +- **Choices and branches**: one choice in chapter 10 and one in chapter 20, three + endings in total (End / BadEnd / MadEnd); a choice always stops and waits. +- **Skip chapter**: the menu entry skips the current chapter, but stops at a choice + the chapter has not reached yet instead of deciding for the player. +- **Auto-play**: hold DOWN on the reading screen to start; it advances one segment + every 900 ms once the current segment has finished typing. Any key stops it, choices and endings + stop it automatically, and the idle screen-off policy is suspended while it runs. +- **Saves**: five manual slots plus one automatic slot written on every scene change; + "Continue" restores the automatic one. Holding OK on a slot in save mode deletes it. +- **Settings**: text speed, font size, and a scrollable about page. +- **Content warning screen**: the first screen after boot; it must be scrolled to the + end before OK continues. +- **Offline resource pack**: script, backgrounds and sprites are read straight out of + Flash with no runtime decompression; decoding happens only when the background or + sprite actually changes, and sprites are composited through a 1bpp mask. +- **Full-frame art behind the panel**: each background is stored as two 1:1 JPEGs + (rows 0–149 and 150–239 of one 320 × 240 frame) drawn on two stacked canvases, so the + whole scene stays visible and the translucent dialogue box (50 % opacity, flush with + the bottom edge) shows real art instead of a stretched or synthesized fallback. +- **Chinese font subset**: a Noto Sans SC subset (4 bpp, uncompressed) built into the + firmware, covering both the UI strings and every character in the script. +- **Battery and power**: battery percentage in the top-right corner; idle 60 s dims, + 180 s turns the screen off and 420 s enters deep sleep, with any key waking it. diff --git a/docs/reference/shinku-chen/saya-no-uta/README.zh_CN.md b/docs/reference/shinku-chen/saya-no-uta/README.zh_CN.md new file mode 100644 index 0000000..42e7159 --- /dev/null +++ b/docs/reference/shinku-chen/saya-no-uta/README.zh_CN.md @@ -0,0 +1,85 @@ +

+ 简体中文 · English +

+ +# 沙耶之歌(社区版) + +AI Passport 上的横屏视觉小说阅读器。把小米手环 10 上的《沙耶之歌》同人移植搬到设备上: +44 章、3,828 段对白、3 个结局,全程离线,用三个按键阅读。 + +## 故事简介 + +医科大学生匂坂郁纪遭遇了一起严重的交通事故,双亲身亡,幸运的是他活了下来。经过脑外科手术后,郁纪苏醒了过来,但他却发现原本熟悉的世界变成了另一幅模样。他眼中的世界变成了到处都是内脏和腐肉的恐怖世界,人们看上去就是会移动的肉块状怪物,大家的话语则变成了怪兽一般的声音,连平常的食物在他眼中也变得令人作呕。 + +然而,在郁纪绝望之时,他却遇到了他的世界中唯一正常的存在——谜一样的少女“沙耶”。她是为了寻找父亲而来到这家医院。经过多次的见面和交流后,郁纪对沙耶产生了爱意,觉得她是可以让他忍受活在这个病态世界中的理由,从而邀请她到自己的家里,开始在一起生活。 + +然而,这仅仅只是刚踏入通向真正到来的疯狂的门扉而已。故事主要讲述了郁纪和沙耶之间的纯粹却又另类的爱情故事。 + +## 发布信息 + +- **标题**:沙耶之歌(社区版) +- **简介**(提交原文): + + > 【故事 / Story】 + > 医科大学生匂坂郁纪遭遇了一起严重的交通事故,双亲身亡,幸运的是他活了下来。经过脑外科手术后,郁纪苏醒了过来,但他却发现原本熟悉的世界变成了另一幅模样。他眼中的世界变成了到处都是内脏和腐肉的恐怖世界,人们看上去就是会移动的肉块状怪物,大家的话语则变成了怪兽一般的声音,连平常的食物在他眼中也变得令人作呕。 + > + > 然而,在郁纪绝望之时,他却遇到了他的世界中唯一正常的存在——谜一样的少女“沙耶”。她是为了寻找父亲而来到这家医院。经过多次的见面和交流后,郁纪对沙耶产生了爱意,觉得她是可以让他忍受活在这个病态世界中的理由,从而邀请她到自己的家里,开始在一起生活。 + > + > 然而,这仅仅只是刚踏入通向真正到来的疯狂的门扉而已。故事主要讲述了郁纪和沙耶之间的纯粹却又另类的爱情故事。 + > + > 【这台设备上能做什么】 + > 把 AI Passport 变成一台掌上视觉小说阅读器,随时重读《沙耶之歌》:44 章、3,828 段对白、3 条结局分支,全程离线、开箱即玩。 + > + > 三个按键就能推完全程:上键推进下一段,按住上键快进、松手即停,下键回看上一页,确定键打开菜单。想重温哪一段可以直接跳章,也可以开启自动播放,让它自己一句句往下读。画面铺满整块屏幕,半透明文本框直接透出场景,躺着把这一趟读完也不用碰手机。 + > + > 本版本只包含社区可分发的基础素材,不含成人向内容;剧情涉及血腥描写,请谨慎阅读。本固件是个人移植的学习产物,素材来自公开的小米手环移植项目,仅供个人设备试玩,有能力请支持正版。 + +- **使用说明**(随提交单独提交,中文必填): + + > 首次使用:不需要联网、也不需要配对,开机后按下面的步骤就能读完整个故事。 + > + > 1. 开机先看到内容警告页。用上/下键滚动,读到最后一行的提示会变成「按确定继续阅读」,这时按确定进入游戏;在此之前按确定只会往下翻一屏。 + > 2. 标题页用上/下选择,按确定进入:「继续」(有自动存档时才出现,接着上次读到的场景继续)/「从第 1 章开始」/「读取存档」/「设置」。 + > 3. 阅读中:上键短按推进下一段;按住上键快进,松手即停;下键短按回看上一页;确定键短按打开菜单。长句子会自动分页,用下键可以翻回上一页重看。 + > 4. 自动播放:在阅读画面长按下键约 1 秒进入自动模式(屏幕会有提示),当前这段文字显示完之后每隔约 0.9 秒自动读下一段;按任意键退出,遇到选项或结局会自动停下。自动播放期间不会调暗屏幕、也不会休眠。 + > 5. 选项与结局:画面出现选项时,用上/下选择、按确定决定,剧情会走向不同分支,共有 3 个结局。 + > 6. 菜单(阅读中短按确定打开):「保存」写入手动存档位或自动位;「读取」读取存档;「跳过章节」跳到下一章(本章后面还有没遇到的选项时会先停在该选项上);「返回标题」回到标题页;「关闭菜单」继续阅读。 + > 7. 存档:5 个手动位 + 1 个自动位,自动位在每次换场景时写入;在存档界面把光标停在某个槽位上长按确定可以删除该存档。 + > 8. 设置(标题页进入):「文字速度」在慢/中/快/「瞬间」之间切换(「瞬间」整页直接显示);「字号」切换 16px 与 20px;「关于」是可上下滚动阅读的说明页;「返回」回到标题页。 + > 9. 电量与省电:画面右上角显示电量百分比。长时间没有操作会依次调暗(约 60 秒)、熄屏(约 180 秒)、进入深睡(约 420 秒),按任意键即可唤醒并从自动存档继续阅读。 + +- **提交记录**:项目 672、修订 1413、slug `community-10803507`,状态 pending(已提交审核)。 + 同一份固件的前两次提交(669、671)在提交后几分钟内从创作中心消失,这是第三次。 +- **分类**:games +- **封面**:`saya-no-uta-cover.png`(PNG,1152 × 1536,3:4)—— 档案区保持纯文本,只记录文件名与格式, + 不在此提交图片本体;Release 说明与社区列表引用的是作者 fork 里 `assets/images/saya-no-uta-cover.png` 那份。 +- **源码**: + +## 封面 + +`saya-no-uta-cover.png`(PNG,1152 × 1536)使用原作的封面主视觉:沙耶与标题字样。 +本档案保持纯文本,只按文件名与格式记录;图片本体存放在作者 fork 的 `assets/images/` 下, +用于 Release 说明与社区市场列表。 + +## 功能 + +- **三个按键读完 44 章**:确定打开菜单,上短按推进、长按快进、松手停,下短按回看上一页; + 列表到顶/到底停住,不绕圈。 +- **正文分页**:按 16px 字号一行 19 个全角字、一屏 4 行分页(20px 字号为 15 字、3 行), + 打字机效果可选中速或「瞬间」整页直出。 +- **选项与分支**:第 10 章、第 20 章各有一处选项,共 3 个结局(End / BadEnd / MadEnd); + 遇到选项会停下来等你选。 +- **跳过章节**:菜单里的「跳过章节」整章跳过;本章后面还有未遇到的选项时停在该选项上。 +- **自动播放**:正文页长按下键进入,当前段打完字后每 900 ms 自动推进一段;任意键退出, + 选项与结局处自动停下;自动播放期间不调息屏策略(不调暗、不息屏、不深睡)。 +- **存档**:5 个手动存档位 + 1 个自动位(每次换场景写入);标题页「继续」从自动位恢复; + 保存模式下在槽位长按确定可删除该存档。 +- **设置**:文字速度、字号、关于(正文可滚动)。 +- **内容警告页**:开机首屏,滚动读到最后才能按确定继续。 +- **离线资源包**:脚本 + 背景 + 立绘直接读 Flash,无运行时解压;解码只发生在(背景, 立绘) + 真正变化时,立绘按 1bpp 遮罩合成到画面区。 +- **整幅画面铺满全屏**:每张背景在打包时存成两张 1:1 的 JPEG(整幅 320 × 240 的第 0–149 行 + 与第 150–239 行),分别画在上下两块画布上 —— 整幅画面完整可见,半透明文本框(50% 不透明 + 度、贴屏幕底边)背后是真实画面,而不是被拉伸或替代色填充。 +- **中文字体子集**:Noto Sans SC 子集(4bpp、未压缩)随固件内置,覆盖界面文案与全部剧本字符。 +- **电量与省电**:画面右上角电量;空闲 60s 调暗、180s 熄屏、420s deep sleep,按键唤醒。 diff --git a/docs/reference/shinku-chen/starry-sky-railroad/README.md b/docs/reference/shinku-chen/starry-sky-railroad/README.md new file mode 100644 index 0000000..f7355e6 --- /dev/null +++ b/docs/reference/shinku-chen/starry-sky-railroad/README.md @@ -0,0 +1,110 @@ +

+ 简体中文 · English +

+ +# Starry Sky Railroad and Shiro's Journey + +A portrait visual-novel reader that ports the Mi Band 9 Pro fan port of the +commercial Japanese novel *Hoshizora Tetsudou to Shiro no Tabi* — together with its +Chinese fan translation — to the AI Passport. The whole story runs offline from +Flash: **39 chapters, 1,260 scenes, 13,787 lines of dialogue, one choice and one +ending**, with nothing to copy onto the device. + +## Publish information + +- **Title**: Starry Sky Railroad and Shiro's Journey (the community listing uses the + Chinese title; see this archive's Chinese peer) +- **Description**: Turn the AI Passport into a pocket visual novel: it opens on the + title screen and you read from the first line to the single ending. All 39 + chapters and 13,787 lines of dialogue live on the device — no network, and + nothing to copy over. A train cuts through the night sky, racing under the + stars; a carefree solo journey in the cool night breeze, and along the way a + laid-back passenger, an endearing conductor… and a girl with cat ears? One + choice in the middle of the story decides how the journey ends. Only the + character who is speaking appears on screen — narration and event illustrations + stay clean — and every scene is saved automatically, so you can close it + whenever you like and pick up right where you stopped. +- **Category**: games +- **Source submitted at publish time**: + +- **Cover**: `starry-sky-railroad-cover.png`, PNG, 1152 × 1536 (exact 3:4). The + archive is text-only; the image itself is not stored here. +- **Community project**: `community-0d8223f7` (submitted 2026-09-27). +- **Release**: tag `v0.1.0-starry-sky-railroad` on + `feature/starry-sky-railroad`, shipping the merged image + `FoloToy-AI-Passport-full.bin`. + +## What it does + +- **Boots straight into the reader**: the title screen offers start, continue (the + automatic save), manual save slots and settings. No demo menu, no network. +- **The ATRI reader's LVGL page system** drives every page: title, body text with a + typewriter effect, choices, the in-game menu, settings, five manual save slots + plus one automatic slot, the chapter-transition card, the ending card and about. +- **A sprite appears only while its own character is speaking.** The packer derives + the owner from which named speaker references a sprite; narration and other + speakers hide it, and event illustrations or solid-colour scenes never get a face + pasted on top. In the shipped script 3,444 of 11,777 dialogue steps draw a sprite. +- **Fast-forward stops when the key is released**, and auto-reading advances about + 0.9 s after each page has finished typing (any other key stops it). +- **Always resumable**: progress is written automatically on every scene change. + Left alone the device dims after 60 s, turns the screen off after 3 min and + sleeps after 7 min; any key wakes it back into the story. + +## Layout + +```text +┌────────────────────────────┐ 240 x 320, held upright (portrait) +│ [chapter 8] [battery] │ plain chapter text top-left, battery text top-right +│ art area │ one full-screen 240 x 320 background JPEG with the +│ 240 x 320 │ character sprite on it and a speaker name plate over +│ [speaker] │ the art, left of the text band +├────────────────────────────┤ +│ body text │ translucent blue text band over the art, 110 px tall +│ │ 16 px font: 13 full-width chars/line, 5 lines +└────────────────────────────┘ +``` + +The bottom 110 px carry the translucent blue text band, and the sprite is drawn +*under* that band — like the source port, so the character's lower body sits inside +the text box while everything above the band stays untouched. Only the text rows +get a light scrim, which keeps white text readable over any art. + +## Interaction + +| Key | While reading | In lists | +| --- | --- | --- | +| UP / DOWN (short) | next line (finishes the typewriter first) | move the cursor | +| UP (hold) | fast-forward while held; stops on release | — | +| DOWN (hold) | auto-reading on/off (~0.9 s per page) | — | +| OK (short) | menu: continue, save, load, skip chapter, back to title | select | +| OK (hold) | — | go back | + +The menu's *skip chapter* jumps to the start of the next chapter and plays the +chapter-transition card; on the last chapter it reports that the story is already +at the end. In save mode, holding OK on a slot deletes it. + +## Source + +- Repository and branch: `Shinku-Chen/ai-passport`, `feature/starry-sky-railroad` + (). +- Script, artwork and the Chinese translation come from the public Mi Band fan port + [`liuyuze61/Starry_Sky_Railroad_and_Shiro-s_Journey_miband9P`](https://github.com/liuyuze61/Starry_Sky_Railroad_and_Shiro-s_Journey_miband9P) + (Mi Band 9 Pro quick app), converted into a reader pack. The original title is a + commercial release: this is a personal fan port, so please support the original. + +## Known gaps + +- Chapter 7 is absent in the source data (the chapter files jump from 6 to 8), and + the source's branch flags are never set, so the story runs 1 → 40 to the single + `FIN` ending. The port reproduces the data as published. +- Because there is only one ending and no per-ending unlock flags, the title menu + has no "true ending" entry. +- Latin runs use the source font's proportional advances while the line model + budgets half-width cells, so a line mixing a longer English word with CJK can + overflow the text area by up to one full-width glyph (2 of 19,986 lines in the + shipped script); the LVGL label wraps within its box. +- No audio: the source port ships none, and this port adds none. +- The whole story line has not been played end to end on hardware; individual + chapters, page turns, sprite/band order, the chapter-skip flow and the on-device + screenshot hook were verified on a real device. diff --git a/docs/reference/shinku-chen/starry-sky-railroad/README.zh_CN.md b/docs/reference/shinku-chen/starry-sky-railroad/README.zh_CN.md new file mode 100644 index 0000000..e2f574f --- /dev/null +++ b/docs/reference/shinku-chen/starry-sky-railroad/README.zh_CN.md @@ -0,0 +1,90 @@ +

+ English · 简体中文 +

+ +# 星空列车与白的旅行 + +把商业作品《星空鉄道とシロの旅》的手环同人移植版(小米手环 9 Pro 快应用)连同其中文译文 +移植到 AI Passport 的竖屏视觉小说阅读器。整条剧情离线跑在 Flash 里:**39 章、1,260 个 +场景、13,787 句对白、一处选项、一个结局**,不需要往设备里拷任何文件。 + +## 发布信息 + +- **标题**:星空列车与白的旅行 / Starry Sky Railroad and Shiro's Journey +- **简介**:把 AI Passport 变成一台口袋视觉小说机:开机就是标题页,从第一句一直读到唯一的 + 结局。39 章、13,787 句对白的正文全部存放在机身上 —— 不需要联网,也不需要往设备里拷任何 + 文件。乘坐的列车划破夜空,飞驰在星空之下;舒爽夜风吹拂下的随心独旅中,我邂逅了随性的 + 乘客、惹人怜爱的乘务员,以及……猫耳少女?剧情推进到中途会出现一处选择,最终走向唯一的 + 结局。只有正在说话的角色才会出现在画面上,旁白与事件插画上不会贴一张脸;每次换场景都会 + 自动存档,随时合上、随时接着读。 +- **分类**:games +- **投稿时填写的来源**: + +- **封面**:`starry-sky-railroad-cover.png`,PNG,1152 × 1536(精确 3:4)。档案馆只存文本, + 图片本身不在这里。 +- **社区项目**:`community-0d8223f7`(2026-09-27 投稿)。 +- **Release**:分支 `feature/starry-sky-railroad` 上的 tag `v0.1.0-starry-sky-railroad`, + 产物为合并镜像 `FoloToy-AI-Passport-full.bin`。 + +## 它做什么 + +- **开机直接进阅读器**:标题页提供开始阅读、继续阅读(自动存档)、手动存档位与系统设置。 + 没有 demo 菜单,也不依赖网络。 +- **界面沿用 ATRI 阅读器的 LVGL 页面系统**:标题页、带打字机效果的正文、选项、游戏内菜单、 + 设置、5 个手动存档位 + 1 个自动存档位、章节过场卡、结局卡与关于页。 +- **立绘只在该角色本人说话时出现**:归属关系由打包器按"哪个有名字的说话人引用了这张立绘" + 统计得出;旁白与他人说话时收起,事件插画与纯色幕上永远不会贴一张脸。全剧本 11,777 个 + 对白步里有 3,444 步会画出立绘。 +- **松手即停的快进**;自动阅读在每句显示完整后约 0.9 秒翻页(按其它键停止)。 +- **随时接着读**:每次换场景自动存档。放着不管 60 秒调暗、3 分钟熄屏、7 分钟休眠, + 任意键唤醒后继续读。 + +## 布局 + +```text +┌────────────────────────────┐ 240 x 320,竖屏握持 +│ 第8章 [电量] │ 左上角章节纯文字,右上角电量纯文字 +│ 画面区 │ 一张整屏 240 x 320 背景 JPEG,角色立绘压在上面, +│ 240 x 320 │ 角色名带半透明底板(名牌在正文带左侧,不遮正文) +│ 诺瓦 │ +├────────────────────────────┤ +│ 正文 │ 半透明蓝色正文带压住画面下沿,高 110px +│ │ 16px 字号:每行 13 个全角字,5 行 +└────────────────────────────┘ +``` + +底部 110px 是半透明蓝色正文带,立绘压在**带子下面** —— 与源移植版一致,人物下半身落进 +正文带里,带子以上的部分不受影响;文字那几行再盖一层淡暗帘,白字在任何画面上都能读。 + +## 交互 + +| 按键 | 阅读正文时 | 列表页 | +| --- | --- | --- | +| 上 / 下(短按) | 下一句(打字中按一下先显示全文) | 移动光标 | +| 上(长按) | 按住期间快进,松手立刻停 | — | +| 下(长按) | 自动阅读开关(每页约 0.9 秒) | — | +| 确定(短按) | 菜单:继续 / 保存 / 读取 / 跳过章节 / 返回标题 | 选中 | +| 确定(长按) | — | 返回 | + +菜单里的「跳过章节」跳到下一章开头并播放章节过场卡;已经是最后一章时会提示已到结尾。 +存档页里长按确定可删除该存档位。 + +## 来源 + +- 仓库与分支:`Shinku-Chen/ai-passport` 的 `feature/starry-sky-railroad` + ()。 +- 剧本、素材与中文译文来自公开的手环移植版 + [`liuyuze61/Starry_Sky_Railroad_and_Shiro-s_Journey_miband9P`](https://github.com/liuyuze61/Starry_Sky_Railroad_and_Shiro-s_Journey_miband9P) + (小米手环 9 Pro 快应用),转换为阅读器资源包。原作是商业作品:本移植为个人同人作品, + 请支持正版。 + +## 已知缺口 + +- 源数据缺第 7 章(章节文件从 6 直接跳到 8),源应用的分支标记也从未被设置,所以剧情是 + 1 → 40 直达唯一的 `FIN` 结局。本移植忠实保留源数据的现状。 +- 本作只有一个结局、也没有按结局解锁的标记,因此标题菜单里没有"真正的结局"入口。 +- 拉丁字母按源字体的自然宽度排,而排版模型按半角格子预算,所以夹着较长英文单词的行最多会 + 超出正文区一个全角字(全剧本 19,986 行里 2 行);LVGL 标签会在自己的盒子内换行。 +- 无音频:源移植版没有音频,这里也不加。 +- 尚未在硬件上把整条剧情从头玩到尾;单章阅读、翻页、立绘与正文带的叠压顺序、跳过章节流程 + 以及真机截图钩子都已在实机上核对过。 From c147f0a50d7a9d354ea8729cf8d126417c7fb724 Mon Sep 17 00:00:00 2001 From: Xulin Wu Date: Sun, 27 Sep 2026 13:06:43 +0800 Subject: [PATCH 3/5] docs: add game demo-to-device acceptance workflow --- docs/development/README.md | 1 + docs/development/README.zh_CN.md | 1 + .../game-demo-to-device-acceptance.md | 88 +++++++++++++++++++ .../game-demo-to-device-acceptance.zh_CN.md | 88 +++++++++++++++++++ 4 files changed, 178 insertions(+) create mode 100644 docs/development/engineering/game-demo-to-device-acceptance.md create mode 100644 docs/development/engineering/game-demo-to-device-acceptance.zh_CN.md diff --git a/docs/development/README.md b/docs/development/README.md index 49295fb..22e67af 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -13,6 +13,7 @@ This directory contains AI Passport engineering rules and reusable workflows, gr ## Engineering +- [game-demo-to-device-acceptance.md](engineering/game-demo-to-device-acceptance.md): shared C/WebAssembly and H5 playtesting, then physical-device acceptance. - [environment-setup.md](engineering/environment-setup.md): clean-machine bootstrap for AI agents, including international and mainland China download routes. - [build-and-test.md](engineering/build-and-test.md): ESP-IDF build and validation. - [firmware-layout.md](engineering/firmware-layout.md): default and user-defined partition layouts and merged-artifact validation. diff --git a/docs/development/README.zh_CN.md b/docs/development/README.zh_CN.md index e92606b..5068008 100644 --- a/docs/development/README.zh_CN.md +++ b/docs/development/README.zh_CN.md @@ -22,6 +22,7 @@ ## 工程约定(engineering) +- [game-demo-to-device-acceptance.zh_CN.md](engineering/game-demo-to-device-acceptance.zh_CN.md):共享 C/Wasm 游戏逻辑,先验收网页玩法,再验收真机表现。 - [environment-setup.zh_CN.md](engineering/environment-setup.zh_CN.md):AI 在全新机器上的环境引导,包含国际与中国大陆下载线路。 - [build-and-test.zh_CN.md](engineering/build-and-test.zh_CN.md):构建与验证(ESP-IDF 命令、逻辑测试、改动验证要求)。 - [firmware-layout.zh_CN.md](engineering/firmware-layout.zh_CN.md):默认/用户自定义分区布局与合并产物验证。 diff --git a/docs/development/engineering/game-demo-to-device-acceptance.md b/docs/development/engineering/game-demo-to-device-acceptance.md new file mode 100644 index 0000000..c231b2d --- /dev/null +++ b/docs/development/engineering/game-demo-to-device-acceptance.md @@ -0,0 +1,88 @@ +

+ 简体中文 · English +

+ +# Game demo to device acceptance SOP + +Use this workflow for games that choose browser-first playtesting: compile portable C into WebAssembly (Wasm), use an HTML/CSS/JavaScript (H5) shell to tune play and interaction, then accept the resulting firmware on the device. This is a project integration pattern; the template does not supply a universal Wasm game builder or hardware emulator. + +Record evidence before advancing each acceptance gate. Small device feasibility probes may run earlier, especially for a new renderer, audio path, or memory budget. Feed those measurements back into the demo; they do not replace final physical-device acceptance. + +## 0. Define the acceptance contract + +Before implementation, write one small scenario table in the game's task document. Include start/end states, screen orientation, the physical UP/DOWN/OK keys and their positions, short/long-press behavior, normal/failure paths, replay/exit, and the cues the player must read. Confirm the mapping on the actual board instead of assuming that screen-relative left/right means physical UP/DOWN. Set measurable device targets for frame cadence, memory margin, and input response where they matter, including the scene and sampling duration. Record which scenarios need play without debug hints and which may use controlled fixtures. + +| Case | Setup and input | Expected result | Acceptance evidence | +| --- | --- | --- | --- | +| Start and pause | Start from the title; activate play, then pause | One action per press; motion stops; the next action is clear | Input test and visible play | +| Outcome and replay | Reach success or failure, then restart | Outcome remains visible until the configured action; restart resets the intended state | Controlled fixture plus a complete player run | +| Input interruption | Cancel a touch, hide the tab, or return from a long press | No stuck movement or unintended short-press action | Browser input test; physical timing checked separately | + +Replace or extend these examples for the actual game. For an endless game, define a representative session and its reset/exit criteria instead of inventing a win state. + +**Exit criterion:** a player can describe the intended decision and button action at each step without reading source code. Ambiguous controls or completion rules return to design, not to firmware implementation. + +## 1. Build one portable C game, with an H5 review shell + +Keep the gameplay state machine, clock/tick rules, movement, collision, and scoring in portable C. Compile those same source files for host tests, Wasm, and firmware. Share the renderer too when it is portable; an LVGL-based page may instead share only the game model and layout data. Put ESP-IDF/LVGL, ADC buttons, battery, display transfer, and task ownership in device adapters. Keep browser input, display, scaling, and review controls in the H5 shell, without a second scoring or movement model. + +The project supplies a small bridge for initialization/reset, input events, elapsed-time ticks, state inspection, and render output where shared. Define time units, random seeds, buffer ownership, and input ordering consistently across native C and Wasm. Record the chosen compiler/SDK version and reproducible build, test, and HTTP-serve commands in the project's own guide. Load Wasm through HTTP, report load failures visibly, and keep debug fixtures out of normal player flow. + +Give each game one standalone demo page. Keep cross-game navigation outside it, and document any browser-only mapping of the application exit action (for example, returning to the current game's title). That boundary is a preview convenience, not evidence that firmware navigation has been accepted. + +Map the simulated controls to the agreed physical keys, including raw browser press/release and long-press timing. Normalize those raw events to the BSP-supported actions (PRESS, CLICK, DOUBLE, LONG); browser release is not a new device callback requirement. Use the selected device orientation and native pixel dimensions as the reference composition. CSS scaling may enlarge it; browser-only smoothing or animation must not conceal missing game frames or change camera motion. Keep assets, fonts, and UI copy traceable to the candidate firmware. Hash shared sources and generated artifacts, and make the project's check fail when they are stale; generating a new manifest alone is not a rebuild. + +**Exit criterion:** a fresh browser load runs the current C build. Replay the same seed, input events, and tick sequence in native C and Wasm; compare states and shared render output within documented tolerances. Identify any separately implemented browser UI as a visual reference: core parity does not validate its matching LVGL page, font selection, or redraw lifecycle. + +## 2. Accept the playable demo before device work + +Run host logic, input, renderer, and C/Wasm parity tests. Then use the visible H5 controls for two complementary passes: + +1. **Controlled pass:** exercise each success/failure branch, pause/resume where supported, interrupted actions, return to title, and replay. Use fixtures to reproduce hard-to-reach states, and save the fixture and expected outcome. +2. **Blind player pass:** start without answer-revealing controls and play the intended route end to end. Observe whether cues are discoverable, the buttons feel predictable, spatial actions leave the player oriented where applicable, transitions have no unexplained blank frame or position jump, and the win/failure feedback is unmistakable. + +Review in the selected device orientation at native resolution and at a typical desktop/mobile viewport. Check title and outcome screens, text legibility, HUD timing against the world, animation continuity, and focus-loss/cancel behavior. Iterate on C, assets, or the shell and repeat affected checks until the designated player/reviewer accepts the interaction. Record reviewer, candidate, and date. A fixture-only success cannot replace normal play; a screenshot cannot establish animation comfort. + +**Exit criterion:** the scenario table has PASS evidence for the complete flow and edge cases, a current C/Wasm parity result, and a recorded player decision that the demo's feel is ready for hardware. Keep open issues explicit instead of silently carrying them into the device gate. + +## 3. Build and install a device candidate safely + +Integrate the accepted C core into the application's own UI through the `main/` lifecycle and BSP interfaces, following the [AI development guide](../ai-guide.md). Run the [complete repository gate](build-and-test.md) in the required ESP-IDF environment. Validate the candidate's actual image offsets, application size, and partition layout using that guide; do not promote one game's partition choices into a template-wide rule. Record the commit, uncommitted-source status, Wasm manifest, firmware hash, and shared asset hashes. Retain matching build/debug artifacts as specified by the build guide. + +Before installation, obtain authorization to flash and identify the actual board and serial port. Choose an installation method compatible with its current layout and data-preservation needs, following the build guide. An original-firmware readback is not a prerequisite. Device detection alone does not authorize flashing or a full-chip erase; preserve any data the user needs and respect project-specific protected regions. A successful transfer or boot proves installation, not game acceptance. + +**Exit criterion:** the validated candidate boots to the intended entry screen, the installed layout matches the approved plan, and the exact installed build is identifiable. + +## 4. Accept on the physical device + +Repeat the same scenario table with the physical buttons. Run at least one complete normal playthrough or the agreed endless-game session, plus controlled checks for rare branches. Check initial text and glyphs, short/long-press behavior, motion, outcome/replay, exit/re-entry, and game-specific cases. Where battery is displayed, test an available reading, an unavailable placeholder, and a late reading that refreshes the screen; do not require a fabricated percentage on the first frame. Check actual redraw behavior, task cleanup, and audio when used. Compare the physical screen and hand feel with the accepted H5 reference and record differences. + +Measure device-only facts in representative scenes: frame submission and, where available, panel-completion cadence; render and display time; free/minimum heap and largest block; input response; crashes, watchdogs, allocation failures, tearing, or black frames. Warm up and sample for the duration specified in the game's probe plan. Compare like-for-like scenes and use the targets defined at Gate 0. Browser performance counters, serial screenshots, and automated C tests cannot establish physical fluidity or memory safety under sustained play. + +**Exit criterion:** physical controls and the full game flow pass, measured device targets pass, and no unresolved difference makes the game confusing or uncomfortable. If a fix changes shared C or assets, rebuild Wasm and firmware, rerun affected demo scenarios, then repeat the device checks; do not close a device failure with browser evidence alone. + +## Record the handoff + +For each candidate, keep a concise acceptance record with: + +| Field | Required evidence | +| --- | --- | +| Identity | Commit, Wasm manifest/source hash, firmware and asset hashes, board revision, install method | +| Demo | Scenario table, controlled fixture results, blind-play notes, visual/motion evidence, native-C/Wasm parity | +| Build | Static/host tests, firmware and configured-layout gate results | +| Device | Installed-build proof, physical playthrough and edge cases, performance/memory sample, sanitized logs or capture | +| Decision | `PASS`, `FAIL`, or `NOT RUN` separately for Build, Host tests, Demo, and Device tests; owner, date, `Unverified` items | + +Use `NOT RUN` for missing evidence. Keep sensitive device identity and unsanitized serial data out of committed records. Do not label the release ready while a required gate is `FAIL` or `NOT RUN`. + +## Commands and handoff checklist + +Each game must supply its own Wasm build, stale-artifact check, parity test, and HTTP preview commands. Run them before the browser acceptance pass. Once the candidate is ready, use the existing repository gates from the project root: + +```bash +./tools/validate.sh --static +# Activate the required ESP-IDF environment before the complete gate. +./tools/validate.sh +``` + +Before handing the candidate to a device tester, provide the demo URL/start command, scenario table and demo decision, exact validated firmware identity, installation/data plan, and device measurement plan. Use the [hardware guide](../../hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.md) for applicable board checks. Web preview acceptance, firmware build acceptance, and device acceptance remain separate results. diff --git a/docs/development/engineering/game-demo-to-device-acceptance.zh_CN.md b/docs/development/engineering/game-demo-to-device-acceptance.zh_CN.md new file mode 100644 index 0000000..fb22282 --- /dev/null +++ b/docs/development/engineering/game-demo-to-device-acceptance.zh_CN.md @@ -0,0 +1,88 @@ +

+ 简体中文 · English +

+ +# 游戏 Demo 到真机验收 SOP + +选择先在浏览器试玩的游戏可以使用这套流程:把可移植 C 编译成 WebAssembly(Wasm),通过 HTML/CSS/JavaScript(H5)外壳调顺玩法与交互,再验收对应固件的真机表现。这是项目集成方式;模板并未提供通用的 Wasm 游戏构建器或硬件模拟器。 + +每个验收阶段留下证据后再进入下一阶段。小范围真机可行性探针可以提前进行,尤其是新增渲染器、音频链路或内存方案时。将测量结果反馈到 Demo 设计中;这些探针不能代替最终真机验收。 + +## 0. 定义验收契约 + +开发前,在游戏任务文档中写一张简短的场景表:开始/结束状态、屏幕方向、实体 UP/DOWN/OK 键及其位置、短按/长按、正常/失败路径、重玩/退出,以及玩家必须读懂的线索。对照实际设备确认映射,不要默认画面中的左/右就对应物理 UP/DOWN。对重要的帧节奏、内存余量和按键响应,事先定义可测的真机目标,并写明场景和采样时长。标明哪些场景需要关闭调试提示游玩,哪些允许使用受控场景。 + +| 案例 | 初始条件与操作 | 预期结果 | 验收证据 | +| --- | --- | --- | --- | +| 开始与暂停 | 从标题页开始,进入游戏再暂停 | 每次按键只触发一次动作;运动停止;下一步操作明确 | 输入测试与可见试玩 | +| 结果与重玩 | 到达成功或失败状态,再重新开始 | 结果保持显示,直到执行约定动作;重玩重置预期状态 | 受控场景与玩家完整游玩 | +| 输入中断 | 取消触控、隐藏标签页,或松开长按键 | 不持续误行走,也不额外触发短按 | 浏览器输入测试;物理时序单独验收 | + +按实际游戏替换或补充这些示例。无尽玩法应定义有代表性的一段游玩及其重置/退出条件,无需虚构通关状态。 + +**通过条件:** 不看源码的玩家也能说清每一步要判断什么、按哪个键。操作或通关规则仍有歧义时,回到玩法设计,不进入固件实现。 + +## 1. 用一份可移植 C 代码和 H5 评审外壳实现 Demo + +把玩法状态机、时钟与 tick 规则、行走、碰撞和计分放在可移植 C 代码中,让同一批源文件用于主机测试、Wasm 和固件。渲染器可移植时一并共用;基于 LVGL 的页面也可以只共用玩法模型与布局数据。ESP-IDF/LVGL、ADC 按键、电量、显示传输与任务所有权放在设备适配层。浏览器输入、显示、缩放与评审控件留在 H5 外壳,不再实现第二套计分或行走模型。 + +项目需要提供一层薄桥接,支持初始化/重置、输入事件、时间步进、状态读取,以及适用时的共享渲染输出。原生 C 和 Wasm 统一时间单位、随机种子、缓冲区所有权与输入顺序。在项目指南中记录所选编译器/SDK 版本及可复现的构建、测试、HTTP 启动命令。通过 HTTP 加载 Wasm,加载失败时显示明确错误,调试场景与普通玩家流程隔离。 + +每款游戏提供一个独立 Demo 页面,不额外加入跨游戏导航。明确说明网页对应用退出动作的映射(例如返回当前游戏标题页);这一边界仅是预览便利,不代表固件导航已经通过验收。 + +模拟按键要对应约定的实体按键,并覆盖浏览器原始按下/松开及长按时序。将原始事件归一化为 BSP 支持的动作(PRESS、CLICK、DOUBLE、LONG);浏览器松开事件不代表要求设备新增松开回调。以选定的设备方向和原生像素尺寸作为构图基准。CSS 可以缩放画面;网页独有的平滑处理或动画不能掩盖游戏缺帧,也不能改变相机运动。素材、字体和界面文字应能追溯到候选固件。为共享源码和生成产物记录哈希,过期时让项目检查失败;仅重新生成 manifest 不等于重新构建。 + +**通过条件:** 浏览器全新加载时运行的是当前 C 构建。用同一随机种子、输入事件和时间步进序列回放原生 C 与 Wasm,比较状态与共享渲染输出,差异在记录的容差内。单独实现的浏览器 UI 应标明仅作视觉参考:核心一致性不能验证对应 LVGL 页面、字体选择和重绘生命周期。 + +## 2. 先验收可玩的 Demo + +运行玩法逻辑、输入、渲染和 C/Wasm 一致性测试。然后用画面上可见的 H5 操作做两轮互补验收: + +1. **受控场景:** 覆盖各个成功/失败分支,适用时覆盖暂停/继续、操作中断、返回开头和重玩。对难以自然到达的状态使用场景注入,并保存注入条件与预期结果。 +2. **无提示游玩:** 不打开揭示答案的控件,从头到尾按预期路线玩一遍。观察关键线索能否发现、按键是否可预期、转弯后能否辨认方向、切换时是否出现莫名黑帧或站位跳变、通关和失败反馈是否明确。 + +以选定设备方向的原生分辨率和常见桌面/手机窗口检查开头与结果界面、文字可读性、HUD 与场景同步、动画连续性,以及失焦和取消输入后的行为。根据结果修改 C、素材或 H5 外壳,并重复受影响的检查,直到指定玩家/评审者认可交互,记录评审人、候选版本和日期。只通过场景注入不能代替正常游玩;单张截图也不能证明动画舒适。 + +**通过条件:** 场景表中的完整流程和边界案例都有 PASS 证据,C/Wasm 一致性结果是当前版本,且记录玩家认为 Demo 手感可以进入真机的结论。未解决的问题应明确列出,不能悄悄带入真机关卡。 + +## 3. 安全构建并安装真机候选版 + +按 [AI 开发指南](../ai-guide.zh_CN.md),通过 `main/` 生命周期与 BSP 接口,将已验收的 C 核心集成进应用自己的 UI。在要求的 ESP-IDF 环境下运行[仓库完整验证](build-and-test.zh_CN.md)。依据该指南验证候选版实际的镜像偏移、应用大小和分区布局,不把某个游戏的分区选择变成模板通用要求。记录提交号、源码是否有未提交变更、Wasm manifest、固件哈希及共享素材哈希。按构建指南保留匹配的构建与调试产物。 + +安装前取得刷写授权,并识别实际板卡和串口。按照构建指南,选择兼容当前布局与数据保留需求的安装方式。回读原固件不是前置条件。检测到设备不等于取得刷写或整片擦除授权;保留用户需要的数据,并遵守项目特定的受保护区域要求。传输成功和正常开机仅证明安装成功,不等于玩法验收。 + +**通过条件:** 已验证的候选版能进入预期起始画面,实际安装布局符合批准的方案,并且能识别实际安装的是哪一版。 + +## 4. 在物理设备上验收 + +用实体按键重复同一张场景表。至少完成一次正常游玩或约定的无尽玩法时段,再针对罕见分支做受控检查。核对初始文字及字形、短按/长按、运动、结果/重玩、退出再进入,以及该游戏特有的场景。显示电量时,分别检查读数可用、不可用时占位、迟到读数刷新;不要求首帧虚构百分比。检查实际重绘、任务清理,以及使用音频时的音效表现。将实际屏幕和手感与已验收 H5 基准比较,记录差异。 + +在有代表性的场景测量设备独有事实:提交帧率及可获得时的屏幕完成帧节奏、渲染和显示耗时、空闲/最低堆内存与最大连续块、按键响应、崩溃、看门狗、分配失败、撕裂或黑帧。按游戏探针计划预热并采样足够时长,只比较相同场景,使用第 0 关预先定义的目标。网页性能计数、串口截图和 C 自动化测试都不能证明实体屏幕的流畅度或长时间游玩的内存安全性。 + +**通过条件:** 实体按键和完整流程通过、真机测量达到目标,没有让游戏难以理解或不舒服的未解决差异。若修复修改了共享 C 或素材,应重新构建 Wasm 与固件、复测受影响的 Demo 场景,再复测真机;不能仅凭网页结果关闭真机失败项。 + +## 留存交接记录 + +每个候选版保留一份简短记录: + +| 字段 | 必需证据 | +| --- | --- | +| 版本身份 | 提交号、Wasm manifest/源码哈希、固件与素材哈希、板卡版本、安装方式 | +| Demo | 场景表、受控场景结果、无提示游玩记录、画面/动画证据、原生 C/Wasm 一致性 | +| 构建 | 静态/主机测试、固件及所配置布局的检查结果 | +| 真机 | 安装版本证明、实体完整游玩及边界案例、性能/内存采样、脱敏日志或截图 | +| 结论 | Build、Host tests、Demo、Device tests 分别标 `PASS`、`FAIL` 或 `NOT RUN`;负责人、日期、`Unverified` 项目 | + +缺少证据时标 `NOT RUN`。不要把设备身份信息或未脱敏串口数据提交进仓库。必要关卡为 `FAIL` 或 `NOT RUN` 时,不标记为可发布。 + +## 命令与交接清单 + +每个游戏需要自行提供 Wasm 构建、产物过期检查、一致性测试和 HTTP 预览命令,并在浏览器验收前执行。候选版准备好后,在项目根目录使用已有仓库检查: + +```bash +./tools/validate.sh --static +# 运行完整检查前先激活要求的 ESP-IDF 环境。 +./tools/validate.sh +``` + +交给真机测试者前,提供 Demo 地址/启动命令、场景表和 Demo 验收结论、已验证固件的准确标识、安装/数据保留方案、真机测量计划。适用的板卡检查参见[硬件指南](../../hardware-design/AI_HARDWARE_DEVELOPMENT_GUIDE.zh_CN.md)。网页 Demo、固件构建与真机验收分别记录结果。 From 2106220705a251cc58b916bb6b2dcd29938cf532 Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Sun, 27 Sep 2026 18:25:14 +0800 Subject: [PATCH 4/5] docs(reference): add senren-banka application archive Archive the published Senren * Banka visual novel reader as a text-only application playbook: bilingual functional summaries (what it does, how the three keys drive it, how the assets and script are packed), the publish metadata submitted to the community (title, description, category, cover file name and format, source address), and the community project id. Register the entry in both language versions of the reference index. --- docs/reference/README.md | 1 + docs/reference/README.zh_CN.md | 1 + .../shinku-chen/senren-banka/README.md | 124 ++++++++++++++++++ .../shinku-chen/senren-banka/README.zh_CN.md | 81 ++++++++++++ 4 files changed, 207 insertions(+) create mode 100644 docs/reference/shinku-chen/senren-banka/README.md create mode 100644 docs/reference/shinku-chen/senren-banka/README.zh_CN.md diff --git a/docs/reference/README.md b/docs/reference/README.md index c34ae8c..f81e415 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -35,6 +35,7 @@ The engineering rules themselves live under - [Voice Keychain](shinku-chen/voice-keychain/README.md) — a sound-effects keychain that turns the AI Passport into a pocket audio player. - [What to Eat Today](shinku-chen/eat-what/README.md) — a button-driven food roulette that turns the AI Passport into a "what should I eat?" spinner. - [Connect Four](shinku-chen/connect-four/README.md) — a landscape 10 × 7 four-in-a-row game with three computer difficulty levels, a two-player mode, synthesized sound, and an idle deep sleep. +- [Senren * Banka](shinku-chen/senren-banka/README.md) — a portrait visual novel reader that carries the whole game — story, backgrounds, sprites and event illustrations — on the device, with auto-read, fast-forward, chapter skipping and save slots. ### PhoenixZHC diff --git a/docs/reference/README.zh_CN.md b/docs/reference/README.zh_CN.md index 58cac0f..8c34c87 100644 --- a/docs/reference/README.zh_CN.md +++ b/docs/reference/README.zh_CN.md @@ -28,6 +28,7 @@ - [音效钥匙扣](shinku-chen/voice-keychain/README.zh_CN.md) — 把 AI Passport 变成口袋音频播放器的音效钥匙扣。 - [今天吃啥](shinku-chen/eat-what/README.zh_CN.md) — 按键驱动的食物轮盘,把 AI Passport 变成「今天吃什么」小转盘。 - [四子棋](shinku-chen/connect-four/README.zh_CN.md) — 横屏 10 列 × 7 行的四子连珠游戏,带三档电脑难度、双人模式、合成音效与空闲自动深睡。 +- [千恋*万花](shinku-chen/senren-banka/README.zh_CN.md) — 竖屏视觉小说阅读器,把整部剧情连通背景、立绘与事件插图装进设备,支持自动阅读、快进、跳过章节与多档存档。 ### PhoenixZHC diff --git a/docs/reference/shinku-chen/senren-banka/README.md b/docs/reference/shinku-chen/senren-banka/README.md new file mode 100644 index 0000000..52d2801 --- /dev/null +++ b/docs/reference/shinku-chen/senren-banka/README.md @@ -0,0 +1,124 @@ +

+ 简体中文 · English +

+ +# Senren * Banka + +A portrait visual novel reader for the AI Passport, ported from the Mi Band fan +port of *Senren \* Banka*. The whole story, its backgrounds, sprites and event +illustrations live in the firmware, and three keys carry you from the prologue to +the ending. + +## Publish information + +- **Title**: Senren \* Banka +- **Description**: submitted as: + + > Turn AI Passport into a pocket visual-novel reader: the whole story and cast of Senren * Banka in your hand, readable from beginning to end with just three buttons. Auto-read keeps the pages turning on their own, holding Up fast-forwards, and you can save or resume whenever you like. + > + > A taste of the story: + > + > In a hot-spring town tucked deep in the mountains, so far from the main roads that even the buses never come, life has kept its own slow rhythm. Over the years the town grew famous for one peculiar local attraction: a sacred blade sealed in stone, never once drawn by anyone who tried. + > + > Then a visiting student snaps it in half. + > + > The "compensation" demanded of him turns out to be a marriage — to the daughter of the shrine's keeper, whom he has just met. And that is only the beginning: a fiancée he barely knows, a mysterious girl only he can touch, and a curse still sleeping beneath the town. + > + > Where their meetings and romances eventually lead, only the hands that hold that blade will know. + > + > (Synopsis adapted from the Moegirlpedia article on Senren Banka, CC BY-NC-SA 4.0.) + +- **Category**: games +- **Cover**: `senren-banka-cover.png` (PNG, 420 × 560, 3:4) — publish metadata + only; the cover image is not committed here. +- **Source**: + +## What it does + +- **A complete reading app, not a demo**: the firmware boots straight into the + reader's own title screen. There is no test menu and no network use; the story + is read entirely offline. +- **The full game script**: every chapter and dialogue line of the source port is + packed into the firmware, together with 92 backgrounds, 123 character sprites in + several poses each, 570 event illustrations and the music-room style extras the + port ships. +- **Portrait, full-screen art**: backgrounds and event illustrations fill a + 240 × 320 portrait screen, sprites are bottom-aligned and drawn over them, and + the dialogue sits in a translucent band below. +- **Typewriter text with page breaks**: each line types out at a selectable speed; + a tap completes the line immediately, and a line that does not fit flips to the + next page instead of being cut. +- **Chapter cards**: each chapter announces itself as a card reading + `Chapter X-X` (chapter and section), shown over the current scene; any key, or + the transition timer, continues reading. +- **Choices**: branch points show the source port's options in place of the + dialogue; the selection is saved as soon as it is confirmed. +- **Skipping and jumping**: the menu can skip to the start of the next chapter, + and the reader reports when the last chapter has been reached. +- **Save and resume**: one auto-save plus five manual slots. The auto-save is + written on every chapter change, on every choice, and before the device sleeps, + so the title screen's "Continue" always returns to where reading stopped. +- **Settings**: text speed (slow / medium / fast), an about screen describing the + fan-port provenance, and a power-off entry. +- **Idle handling**: after 60 seconds the picture dims, after 3 minutes the screen + turns off and after 7 minutes the device deep-sleeps; any key wakes it and + reading resumes in place. Auto-read and fast-forward are exempt, so a story left + running never dims or sleeps by itself. + +## Interaction + +Three keys drive the whole app. + +Title screen: + +- **Up / Down**: move through the menu (start reading, continue, load progress, + settings). +- **OK**: enter the selected entry. +- **OK (hold)**: power off. + +While reading: + +- **Up / Down (tap)**: read the next line; completing a line still being typed and + turning the page both happen here. +- **OK (tap or hold)**: open the menu — continue, save progress, load progress, + skip chapter, back to title. +- **Up (hold)**: fast-forward; the reader advances on its own until the key is + released. +- **Down (hold)**: toggle auto-read, which advances at a fixed pace and keeps the + screen lit. + +At a choice: + +- **Up / Down**: move the highlight; **OK**: confirm. + +Save screens: + +- **Up / Down / OK**: pick and open the auto-save or one of the five manual slots. +- **OK (hold)**: delete the selected slot. + +Press timing: a tap shorter than 180 ms is ignored as a click, and 500 ms of hold +triggers the long-press action. + +## How it is built + +- The reader carries its own small inflate implementation rather than relying on + the ROM decompressor, so the whole output of a block is decoded into one buffer + instead of needing a 32 KB sliding dictionary. +- Images are stored per device geometry in a chunked palette format (backgrounds + and event illustrations as 240 × 320 JPEG, sprites by pose), and event + illustration variants are stored as sparse mask patches against a base picture. +- The story is packed into small blocks with a 3 KB ceiling, which keeps the + firmware's working buffer at 4 KB — the part has no PSRAM to spare. + +## Source + +- Repository: `Shinku-Chen/ai-passport`, branch `feature/senren-banka`, + release `v0.1.0-senren-banka` + (). +- Upstream work: [`hrk666666/Senren-Banka-MiBand-10`](https://github.com/hrk666666/Senren-Banka-MiBand-10) + — the Mi Band fan port this branch derives from. It declares no licence; its + script and artwork are fetched with a tool, packed into the firmware, and the + upstream project is credited as the source. The port is shared for personal + study and exchange only, and the first-run notice inside the app says so. +- Released to the community as project `community-07c775dc` (id 679); the + submission was pending review when this archive was written. diff --git a/docs/reference/shinku-chen/senren-banka/README.zh_CN.md b/docs/reference/shinku-chen/senren-banka/README.zh_CN.md new file mode 100644 index 0000000..b485a4e --- /dev/null +++ b/docs/reference/shinku-chen/senren-banka/README.zh_CN.md @@ -0,0 +1,81 @@ +

+ 简体中文 · English +

+ +# 千恋*万花(Senren \* Banka) + +AI Passport 上的竖屏视觉小说阅读器,移植自《千恋*万花》的手环同人移植版。全部剧情、背景、立绘与事件插图都装进固件,三个按键就能从序章一路读到结局。 + +## 发布信息 + +- **标题**:千恋*万花(Senren \* Banka) +- **简介**:提交原文: + + > 把 AI Passport 变成一台随身视觉小说阅读器:《千恋*万花》的完整故事与立绘装进口袋,三个按键就能从头读到尾。自动阅读可以自己往下走,长按上键一路快进,进度随时存档、随时接着读。 + > + > 下面是原作的引子。 + > + > 在一座连公交都不通的深山里,有个叫做“穗织”的小镇。小镇地处偏僻,与周边来往甚少,甚至连城镇的现代化都慢了半拍。也正因如此,穗织镇渐渐发展出了独具特色的地方文化,现如今已成了别具一格的温泉旅游胜地,在全国颇具盛名。 + > + > 穗织镇最具人气的观光项目之一,是一把特殊的刀。神刀——丛雨丸。这把刀一直插在岩石之中,无人能将其拔出。然而这把拔不出的刀,却被有地将臣折断了!正当他面对如此突发事件不知所措时,一份沉重的责任压在了他的肩上。这份责任,竟是“结婚”二字!令人震惊的事态让将臣不知如何是好。然而这些,仅仅只是个开始而已。等待着将臣的,是更加奇妙而不可思议的每一天。初次见面的结婚对象。只有自己才能触碰的谜之少女。以及,残留在穗织这片土地的诅咒之谜……在这变幻莫测的新生活里,他们的邂逅与恋情最终将通往何方?一切的答案,都在紧握丛雨丸的那双手中—— + > + > (引子文字引自萌娘百科《千恋万花》条目,遵循 CC BY-NC-SA 4.0 协议。) + +- **分类**:games +- **封面**:`senren-banka-cover.png`(PNG,420 × 560,3:4)—— 仅记录发布元数据,封面图不进本仓库。 +- **源码**: + +## 功能 + +- **一个完整的阅读器,不是演示**:固件开机直接进入它自己的标题页,没有测试菜单、不联网,全程离线阅读。 +- **整部剧本**:源移植版的每一章、每一句对白都打进固件,连同 92 张背景、123 个可换姿势的立绘、570 张事件插图与移植版自带的附加内容。 +- **竖屏满屏画面**:背景与事件插图铺满 240 × 320 竖屏,立绘底对齐叠在画面上,正文显示在下方半透明文字带里。 +- **打字机正文与自动分页**:每句按可选速度逐字显示;按一下立刻补全整句,一句放不下会翻到下一页而不是被截断。 +- **章节卡**:进入新章节时显示写着 `第 X-X 章`(章-节)的过场卡,叠在当前画面上;按任意键或等过场计时结束继续。 +- **选项分支**:遇到分支点时用原作选项替换正文,确定后立刻写入存档。 +- **跳过章节**:菜单里可以直接跳到下一章开头,读到最后一章时会明确提示。 +- **存档与续读**:1 个自动存档加 5 个手动存档。自动存档在每次换章、每次做出选择、以及睡前写入,所以标题页的"继续阅读"永远回到上次停下的地方。 +- **系统设置**:文字速度(慢 / 中 / 快)、介绍移植来源的"关于本作"、以及关机。 +- **闲置处理**:60 秒画面变暗、3 分钟熄屏、7 分钟进入休眠;按任意键唤醒并回到原处。自动阅读与快进不受影响,放着读的故事不会自己变暗或休眠。 + +## 操作 + +三个按键就能完成全部操作。 + +标题页: + +- **上 / 下**:在菜单项间移动(开始阅读、继续阅读、读取进度、系统设置)。 +- **确定**:进入选中的项。 +- **长按确定**:关机。 + +阅读中: + +- **上 / 下(单击)**:读下一句;补全正在打字的一句、以及翻页都走这里。 +- **确定(单击或长按)**:打开菜单——继续阅读、保存进度、读取进度、跳过章节、返回标题。 +- **长按上**:快进,自己往下推,松手即停。 +- **长按下**:开关自动阅读;开着时按固定节奏自动翻页,并且保持屏幕常亮。 + +遇到选项时: + +- **上 / 下**:移动高亮;**确定**:确认。 + +存档页: + +- **上 / 下 / 确定**:选择并打开自动存档或 5 个手动存档之一。 +- **长按确定**:删除选中的存档。 + +按键时序:短于 180 毫秒的按下会被当作抖动忽略,按住 500 毫秒触发长按动作。 + +## 实现要点 + +- 阅读器自带一个精简的 inflate 实现,不依赖 ROM 里的解压器:一个块的解压结果整体落在单个缓冲里,从而不需要 32 KB 滑动字典。 +- 图像按设备原生几何存储成分块调色板格式(背景与事件插图为 240 × 320 JPEG,立绘按姿势逐张存);事件插图的变体以稀疏掩码补丁的形式叠加在底图上。 +- 剧本按小块打包(每块不超过 3 KB),固件的工作缓冲因此只要 4 KB —— 这块板没有 PSRAM 可用。 + +## 源码 + +- 仓库:`Shinku-Chen/ai-passport`,分支 `feature/senren-banka`,release `v0.1.0-senren-banka` + ()。 +- 上游工作:[`hrk666666/Senren-Banka-MiBand-10`](https://github.com/hrk666666/Senren-Banka-MiBand-10) + —— 本分支所依据的手环同人移植版。该仓库未声明许可证;其剧本与素材由工具拉取后打包进固件,并在文档中注明来源。本移植仅供个人学习与交流,应用内的首次运行提示也写明了这一点。 +- 社区投稿:作品 `community-07c775dc`(id 679),写这份档案时状态为审核中。 From 9ea7ba8eec93b622ba92770a967d7891a901fb92 Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Sun, 27 Sep 2026 23:45:21 +0800 Subject: [PATCH 5/5] docs(reference): the Senren * Banka sources ship with the branch --- docs/reference/shinku-chen/senren-banka/README.md | 10 +++++++--- .../reference/shinku-chen/senren-banka/README.zh_CN.md | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/reference/shinku-chen/senren-banka/README.md b/docs/reference/shinku-chen/senren-banka/README.md index 52d2801..1d3d850 100644 --- a/docs/reference/shinku-chen/senren-banka/README.md +++ b/docs/reference/shinku-chen/senren-banka/README.md @@ -117,8 +117,12 @@ triggers the long-press action. (). - Upstream work: [`hrk666666/Senren-Banka-MiBand-10`](https://github.com/hrk666666/Senren-Banka-MiBand-10) — the Mi Band fan port this branch derives from. It declares no licence; its - script and artwork are fetched with a tool, packed into the firmware, and the - upstream project is credited as the source. The port is shared for personal - study and exchange only, and the first-run notice inside the app says so. + script and artwork ship with the branch under `assets/senren-source/` (92 + backgrounds, 123 sprites, 570 event illustrations and 112 script chunks, plus a + `MANIFEST.json` recording the upstream ref and a SHA-256 per file; `tools/senren_fetch_source.py` + can fetch them again), packed into the firmware, and the upstream project is + credited as the source. Repacking from that directory is byte-identical to the + committed packs. The port is shared for personal study and exchange only, and + the first-run notice inside the app says so. - Released to the community as project `community-07c775dc` (id 679); the submission was pending review when this archive was written. diff --git a/docs/reference/shinku-chen/senren-banka/README.zh_CN.md b/docs/reference/shinku-chen/senren-banka/README.zh_CN.md index b485a4e..e6ee39d 100644 --- a/docs/reference/shinku-chen/senren-banka/README.zh_CN.md +++ b/docs/reference/shinku-chen/senren-banka/README.zh_CN.md @@ -77,5 +77,5 @@ AI Passport 上的竖屏视觉小说阅读器,移植自《千恋*万花》 - 仓库:`Shinku-Chen/ai-passport`,分支 `feature/senren-banka`,release `v0.1.0-senren-banka` ()。 - 上游工作:[`hrk666666/Senren-Banka-MiBand-10`](https://github.com/hrk666666/Senren-Banka-MiBand-10) - —— 本分支所依据的手环同人移植版。该仓库未声明许可证;其剧本与素材由工具拉取后打包进固件,并在文档中注明来源。本移植仅供个人学习与交流,应用内的首次运行提示也写明了这一点。 + —— 本分支所依据的手环同人移植版。该仓库未声明许可证;其剧本与素材随本分支收录在 `assets/senren-source/`(92 张背景、123 个立绘、570 张事件插图、112 个剧本分块,另含记录上游引用与逐文件 SHA-256 的 `MANIFEST.json`,也可用 `tools/senren_fetch_source.py` 重新拉取),打包进固件并在文档中注明来源;用该目录重打包与已提交的包字节级一致。本移植仅供个人学习与交流,应用内的首次运行提示也写明了这一点。 - 社区投稿:作品 `community-07c775dc`(id 679),写这份档案时状态为审核中。