# DX10_APP **Repository Path**: sltplan/DX10_APP ## Basic Information - **Project Name**: DX10_APP - **Description**: FTdx10 SD卡APP固件 — 插卡运行 SD 上的 app,无卡等于官方(实验性) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-30 - **Last Updated**: 2026-11-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DX10_APP · FTdx10 SD卡APP固件 **中文** | [English](#english) > ⚠️ **实验性固件**:基于 Yaesu 官方 FTdx10 DISPLAY V01-06 修改,只动 DISPLAY 分区。 > 刷机有风险,请先备份;本项目与 Yaesu 无关,固件版权归 Yaesu。 > > **状态**:补丁可正常刷入。早期内部测试 app 曾因一个 `surf()` 调用错误导致界面卡死, > 该问题已修复并加了空指针保护;**修复版尚未在真机复测**(作者机器暂不可用)。 > 静态检查与 Unicorn 模拟全部通过,详见 [`docs/15-兼容性审查.md`](docs/15-兼容性审查.md)。 ## 这是什么 给 FTdx10 前面板(DISPLAY / RZ/A1H)固件加一个约 1 KB 的「插卡加载」桩: - **有卡**、且 `FTDX10/APPS/BOOT.BIN` 存在 → 从 SD 卡读进 RAM 执行; - **无卡 / 没有文件 / 拔卡** → 与官方固件行为一致; - 运行期**不写 flash**,只读 SD;升级页面零改动。 仓库自带的示例 app 是一个**空壳**:只有 `entry/poll` 骨架和 API 表说明, **不绘制任何界面内容**,加载后第一帧就退出。它是给你写自己 app 的起点, 不是可用的功能 app。 ## 文件 | 文件 | 说明 | |---|---| | `firmware/FTDX10_DISPLAY_V0106.SFL` | 补丁固件(已按升级器要求的 24 字符文件名命名) | | `apps/BOOT.BIN` | 示例壳 app(加载后立即退出,无可见变化) | | `sdboot/stub.S` | 引导桩源码(ARM 汇编,1,072 B) | | `sdboot/app_shell.S` | 示例壳源码(链接地址 `0x2042A4C4`) | | `tools/sdboot.py` | 构建器:官方 SFL → 等长补丁;可打包自己的 app | | `tools/compat_check.py` | 兼容性静态检查 | | `docs/14-插卡引导.md` | 设计、地址表、载荷格式、API | | `docs/15-兼容性审查.md` | 兼容性风险与证据 | | `SHA256SUMS.txt` | 校验和 | ## 刷机(只刷 DISPLAY) 1. **先备份**:FRAM、菜单/信道、官方恢复包(官方 DISPLAY V01-06 SFL)。 2. 用**电台格式化过**的 FAT32 SD 卡,按下面放文件(`APPS` 目录自己建): ```text FTDX10/ ├── FTDX10_DISPLAY_V0106.SFL ← 本仓库 firmware/ 里的文件 └── APPS/ └── BOOT.BIN ← 本仓库 apps/ 里的示例壳 ``` 3. 电台:`FUNC → EXTENSION SETTING → SD CARD → FIRMWARE UPDATE`, 选 `FTDX10_DISPLAY_V0106.SFL`,等 `COMPLETED`,重启。 > **文件名必须是 `FTDX10_DISPLAY_V0106.SFL`**(`FTDX10_DISPLAY_V` + 4 位版本 + `.sfl`,共 24 字符)。 > 固件是精确匹配文件名的,带任何后缀都会显示 `(No such file)`。 ## 使用 - 卡在、`APPS/BOOT.BIN` 在:加载并执行,示例壳会立刻退出,界面上看不到变化; - 卡不在 / 无文件:完全官方 UI; - 拔卡:回到官方 UI。 示例壳故意不含界面内容;要看到效果,需要自己写 app(见下一节)。 ## 回滚 把**官方** FTDX10 DISPLAY V01-06 的 SFL 放进卡上 `FTDX10/` 重刷即可。MAIN 始终未动。 ## 原理(简) - 挂钩:正常 UI 主循环每帧的 `bl sub_20132F48`(显示 flush,运行地址 `0x2012FDB8`); - 桩:放在镜像内 `0xFF` 空洞 `0x2042596C`(1,072 B),负责状态机、FAT 读取、cache 维护; - 载荷:从 `I:\FTDX10\APPS\BOOT.BIN` 读进 RAM `0x2042A4B4`,清 cache 后执行; - 升级分支(`0x20946B04 == 0xBBBB`)不经过桩,升级页代码/文案逐字节未改; - 运行期不写 flash、不碰升级/SFL/loader。 ## 自己写 app 载荷格式(小端,16 字节头): ```c struct payload_hdr { uint32_t magic; /* 0x44583130 "DX10" */ uint32_t size; /* 代码字节数,<= 2852 */ uint32_t entry; /* 相对代码起点的偏移 */ uint32_t poll; /* 相对代码起点的偏移;0 = 无 poll */ }; /* 代码起点 = 0x2042A4C4 */ ``` `api` 表(`entry/poll` 的 r0):`surf / rect / text / flush / card / fopen / fread / fclose / cycles`。 以 `sdboot/app_shell.S` 为模板:`entry` 初始化,`poll` 每帧调用(返回 0 继续、非 0 退出)。 打包: ```bash python3 tools/sdboot.py \ --sfl FTDX10_DISPLAY_V0106.SFL \ --payload-src sdboot/app_shell.S \ -o out ``` > 重新构建需要**官方原版** DISPLAY V01-06 SFL(本仓库只分发打好补丁的成品)。 ## 兼容性与风险 - 只支持 **DISPLAY V01-06**(建议 MAIN V01-15); - 改动面:1,052 字节(1 条 `bl` + 1,072 B 桩),其余与官方逐字节相同; - 桩占用 JIS 表 535/15,210 个空洞表项(3.5%);固件字符串全 ASCII,正常 UI 不查表; - 坏卡/SD 慢时,加载可能让 UI 停顿一下; - 无 MMU 隔离:野指针载荷可能卡死(重刷官方即可恢复); - 刷机风险自负;建议先不插卡验证与官方无差异,再试自己的 app。 ## 法律与致谢 - 固件基于 Yaesu 官方 FTdx10 更新包(DISPLAY V01-06)修改,版权归 Yaesu; 本项目仅用于个人学习/研究,与 Yaesu 无任何关联,不提供任何担保。 - 如权利方认为不妥,请联系删除。 - 逆向与工具思路参考了 ham 社区的公开工作(SFL 解码、FTDX10 固件分析等)。 --- # DX10_APP · SD-card app firmware for the FTdx10 display [中文](#dx10_app--ftdx10-sd卡app固件) | **English** > ⚠️ **Experimental firmware**: based on Yaesu's official FTdx10 DISPLAY V01-06, > DISPLAY partition only. Flashing is at your own risk — back up first. > Not affiliated with Yaesu; the firmware remains Yaesu's copyright. > > **Status**: the patch flashes fine. An early internal test app froze the UI due > to a `surf()` calling bug; it is fixed and null-guarded, but the **fixed build > has not been re-tested on hardware yet**. Static checks and Unicorn emulation > pass; see [`docs/15-兼容性审查.md`](docs/15-兼容性审查.md) (Chinese). ## What it is A ~1 KB "SD boot" stub added to the FTdx10 front-panel (DISPLAY / RZ/A1H) firmware: - **Card inserted** and `FTDX10/APPS/BOOT.BIN` present → the file is loaded into RAM and executed; - **No card / no file / card removed** → identical to the stock firmware; - **No flash writes at runtime**; SD is read-only; the firmware-update page is untouched. The bundled example app is an **empty shell**: just the `entry/poll` skeleton and the API map, **no UI content**; it exits on the first frame. It is a starting point for writing your own app, not a usable feature app. ## Files | File | Purpose | |---|---| | `firmware/FTDX10_DISPLAY_V0106.SFL` | patched firmware (already named as required by the updater) | | `apps/BOOT.BIN` | example shell (loads and exits immediately; no visible change) | | `sdboot/stub.S` | boot stub source (ARM asm, 1,072 B) | | `sdboot/app_shell.S` | example shell source (linked at `0x2042A4C4`) | | `tools/sdboot.py` | builder: official SFL → equal-length patch; packs your app too | | `tools/compat_check.py` | static compatibility checker | | `docs/14-插卡引导.md` | design, address map, payload format, API | | `docs/15-兼容性审查.md` | compatibility review and evidence | | `SHA256SUMS.txt` | checksums | ## Flashing (DISPLAY only) 1. **Back up**: FRAM, menu/memory data, and the official recovery package. 2. Use a FAT32 card formatted by the radio, then copy: ```text FTDX10/ ├── FTDX10_DISPLAY_V0106.SFL ← from firmware/ └── APPS/ └── BOOT.BIN ← example shell from apps/ ``` 3. On the radio: `FUNC → EXTENSION SETTING → SD CARD → FIRMWARE UPDATE`, select `FTDX10_DISPLAY_V0106.SFL`, wait for `COMPLETED`, reboot. > **The file name must be exactly `FTDX10_DISPLAY_V0106.SFL`** > (`FTDX10_DISPLAY_V` + 4-digit version + `.sfl`, 24 chars). The updater matches > the name exactly; any suffix shows `(No such file)`. ## Usage - Card + `APPS/BOOT.BIN`: the payload is loaded and run; the example shell exits immediately, so nothing changes on screen; - No card / no file: stock UI; - Card removed: back to the stock UI. The shell deliberately contains no UI. Write your own app to see something. ## Rollback Reflash the **official** FTDX10 DISPLAY V01-06 SFL from `FTDX10/` on the card. MAIN is never touched. ## How it works - Hook: the per-frame `bl sub_20132F48` (display flush) in the normal UI main loop at `0x2012FDB8`; - Stub: 1,072 B placed in a `0xFF` hole at `0x2042596C`; state machine + FAT read + cache maintenance; - Payload: read from `I:\FTDX10\APPS\BOOT.BIN` into RAM at `0x2042A4B4`, cache cleaned, then executed; - The updater path (`0x20946B04 == 0xBBBB`) never reaches the stub; the update page is byte-identical; - No flash writes at runtime; the updater/SFL/loader logic is untouched. ## Writing your own app Payload format (little-endian, 16-byte header): ```c struct payload_hdr { uint32_t magic; /* 0x44583130 "DX10" */ uint32_t size; /* code bytes, <= 2852 */ uint32_t entry; /* offset from code start */ uint32_t poll; /* offset from code start; 0 = no poll */ }; /* code start = 0x2042A4C4 */ ``` The `api` table (passed in r0 to `entry`/`poll`): `surf / rect / text / flush / card / fopen / fread / fclose / cycles`. Start from `sdboot/app_shell.S`: `entry` initialises, `poll` runs every frame (return 0 to continue, non-zero to exit). Build with: ```bash python3 tools/sdboot.py \ --sfl FTDX10_DISPLAY_V0106.SFL \ --payload-src sdboot/app_shell.S \ -o out ``` > Rebuilding requires the **official** DISPLAY V01-06 SFL (only the patched image > is distributed here). ## Compatibility and risks - DISPLAY V01-06 only (MAIN V01-15 recommended); - Diff vs. stock: 1,052 bytes (one `bl` + the 1,072 B stub); everything else is byte-identical; - The stub occupies 535 of 15,210 unused JIS-table slots (3.5%); firmware strings are ASCII-only, so the normal UI never consults that table; - A slow/faulty card may briefly stall the UI during load; - No MMU isolation: a bad payload can hang the UI (reflash the official image to recover); - Flashing is at your own risk. Verify the no-card behaviour first. ## Legal - The firmware is a modification of Yaesu's official FTdx10 update (DISPLAY V01-06); copyright remains with Yaesu. This project is for personal research only, with no warranty and no affiliation with Yaesu. Contact for removal if required. - Reverse-engineering ideas and tooling were informed by public ham-radio community work.