REA MCP
☰
ZH-CN
● — 人在线 · 浏览 — 次
赞助提交案例
Reddit 帖子 · 发布者 pzarevich

DeepSeek V4.1 Flash 使用 REA 逆向工程一款 1984 年 DOS 游戏,并以 0.68 美元将其重建为 Chrome 版本

一名开发者描述如何将 REA 作为 MCP 服务器与 Ghidra 搭配使用,反编译 1984 年 Sopwith DOS 二进制文件,提取精灵图、地形与游戏数据表,并将其重建为 HTML/Canvas 游戏,文中附有仓库链接与方法论。

已翻译

关于这个案例

这篇 Reddit 帖子详细说明了一套具体的 REA 工作流程:DeepSeek V4.1 Flash 使用 REA(一个运行 Ghidra 的 MCP 服务器)反编译一个 43 KB 的 DOS 游戏二进制文件,恢复其游戏循环、物理、计分与数据表,并将其重建为可玩的 HTML/Canvas 移植版。作者附上开源代理框架与 REA 的链接,说明如何直接从 EXE 提取素材,并将移植版与在 DOSBox 中运行的原始版本进行比较。

安装配置

安装方法请查看原始来源。

原文 / README

Disclosure: I work on AgenC Core, the open-source agent harness used here: https://github.com/tetsuo-ai/agenc-core

I gave DeepSeek V4.1 Flash (effort max) one prompt and the original Sopwith executable from 1984: a 43 KB DOS binary, with no source code. It had REA connected as an MCP server (https://github.com/morluto/rea), which runs Ghidra under the hood. Then it worked on its own for an hour, in a sandbox with no internet.

What it did:

  • Decompiled the whole binary with REA and worked out the game loop, controls, flight physics, scoring, computer planes and world layout.
  • Wrote a Python extractor that pulls everything straight out of the EXE: the sprites (the plane at every angle, buildings, oxen, birds), the 3,000-point terrain profile and the game tables.
  • Rebuilt it as a plain HTML/Canvas game at the original 320x200 CGA resolution, with PC-speaker style sound.
  • Ran the original in DOSBox, captured reference frames, and compared them side by side with its port in headless Chrome. The only thing not inside the EXE was the BIOS font, so it recovered that from the DOSBox screenshots.

The numbers:

  • 1 hour, one prompt, no follow-ups
  • 374 model calls, 624 tool calls (7 of them REA)
  • 145M input tokens (99.7% cache hits), plus 308K output
  • $0.68 total at DeepSeek’s off-peak rate ($1.37 at peak)

The flying in the video is a small script pressing the game’s real keys, so you can see takeoff, the bombing runs and the autopilot landing in one take.

The full prompt is in the comments. The author released Sopwith’s source under the GPL, but the agent never saw it: it worked only from the binary.

更多类似作品