SL6801 Station
AI-first reverse-engineering workbench for an undocumented MP3-player SoC
A family of cheap Chinese MP3 players (Jointbees / SMTLINK / YP3) runs on a Smartlink SL6801 SoC with no public datasheet, SDK or register map. This project makes the stock firmware observable: a QEMU machine model boots the original dump, injects touch and keys, captures screen and audio, and exposes hardware state.
Problem
The chip is undocumented and the stock image is a single XIP monolith with UI, media and Bluetooth interleaved. There is no SDK partition and nothing to look up: the mask ROM is effectively the datasheet. Dumping is fragile too — the USB bootloader drops out after roughly 30 commands, while a 2 MiB read needs 512+.
Hardware
ARM Cortex-M4F class core (Thumb-2, VFP), ~0x5C000 mask ROM, 512 KiB SRAM, 2 MiB SPI NOR (Puya P25Q16 class) XIP, 128×160 RGB565 display over SPI/DBI with GC9106/ST7735S-class controller, CST726/CST816D touch on I²C, microSD over SDIO with FAT32/exFAT, internal KADC/DAC audio, 5-key ADC ladder plus PMU power key, on-die Bluetooth and USB card-reader / ROM-bootloader modes.
Emulator
emulator/qemu/smartlink_sl6801.c models the machine: CPU and SRAM windows, SPI NOR and mask ROM load, LCD controller and DCS parser (CASET, RASET, RAMWR), touch, SD/MMC with FatFs, audio DMA and codec with a PCM tap to the host, key ADC, PMU/CPLD, RTC and backlight. The stock image is never modified on disk — a few volatile patches in guest RAM (ViewTask / context-2 wakeups, DSP write stubs) let the single-core model run it. The GUI is a Python server with vanilla JS: live framebuffer, touch/keys, switches for battery/SD/headphones/backlight, audio recording and screenshots.
AI-first reverse engineering
The emulator was built with the help of an AI agent driving Ghidra through MCP: I set the hypotheses and review the evidence, the agent runs the queries. Ghidra 12.2 plus a forked OGhidraMCP server exposes decompilation, disassembly, function/data creation, labels, comments, variables, data types, call graph, byte search, bookmarks, batch edits, undo/redo and save_program. The loop is hypothesis → MCP query → decompile/disassemble → patch the emulator → screenshot/test → document address and evidence. Destructive operations require confirmation, a reason and concrete evidence.
Tooling and results
Two tools were forked: smartlink_flash (USB timeouts/retries, chunked dump with resume) and OGhidraMCP (function/data creation, undo, batch, save) with 18 added endpoints. Result: the stock firmware boots and is fully observable in the emulator, ~3,900 functions are mapped in the Ghidra database, 22 step-* analysis phases and M0–M7 emulator stages were completed, and the desktop build ships as an AppImage (Electron + PyInstaller).
Legal
An independent research project, not affiliated with the vendor. The repository ships no mask ROM, firmware, fonts, images or music: users dump the two files from their own player and keep them private. Code is Apache-2.0, except the QEMU machine sources which are GPL-2.0.
Features
- QEMU 8.2 machine model for the Smartlink SL6801 (Cortex-M4F, mask ROM + SPI NOR XIP)
- Boots the unmodified stock firmware dump using volatile in-RAM patches only
- Live framebuffer, touch/keys, SD card, audio PCM tap and hardware switches in the GUI
- Ghidra 12.2 driven by an LLM agent over a forked OGhidraMCP server (AI-assisted workflow, 18 new endpoints)
- Forked smartlink_flash chunked dumper with USB retry and resume
- ~3,900 functions analysed, 22 step-* phases, M0–M7 emulator stages
- One-click desktop bundle: Electron + PyInstaller + AppImage