正在自动登录…
dbreunig/ nesformer
这是一个将NES的6502 CPU编译进Qwen3.5模型权重的项目,通过模型预测CPU执行日志来运行NES游戏,适合对AI与模拟器交叉领域感兴趣的研究者和开发者。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/31 02:56:41 · 查看原文
- 累计 Stars
- 154
- 当前热度
- 1 天内 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/10/31 02:56:41
- 使用方式
通过命令行使用,例如运行 `python -m nesformer run roms/thwaite.nes` 来播放游戏并保存GIF。
查看 README 依据
top folder. ### 2. Install You need Python 3.11 or newer. ```bash python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install numpy scipy numba pillow ``` ### 3. Play a game ```bash python -m nesformer run roms/thwaite.nes --frames 600 --show \ --buttons "start@90-95+200-205,a@230-233+250-253+270-273+290-293+310-313+330-333+350-353+370-373+390-393+410-413+430-433+450-453+470-473+490-493+510-513+530-533+550-553+570-573+590-593" ``` `--show` draws each frame in your terminal as the model generates it. When the run ends, the CLI
| Command | What it does | |---|---| | `python -m nesformer run ROM` | Play a ROM on the weights and save a GIF | | `python -m nesformer check ROM` | Run the weights and the reference CPU side by side; stop at the first difference | | `python -m nesformer trace ROM` | Print the model's token stream (default 40 tokens) | | `python -m nesformer build` | Compile the circuit and write `weights/` (about 10 seconds) | | `python -m nesformer info` | Describe the checkpoint | Options for `run`: | Option | Default | Meaning | |---|---|---| | `--frames N` | 120 | Stop after N frames |
- 部署要求
需要 Python 3.11 或更高版本,并安装 numpy、scipy、numba、pillow 等依赖。
查看 README 依据
top folder. ### 2. Install You need Python 3.11 or newer. ```bash python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install numpy scipy numba pillow ``` ### 3. Play a game ```bash python -m nesformer run roms/thwaite.nes --frames 600 --show \ --buttons "start@90-95+200-205,a@230-233+250-253+270-273+290-293+310-313+330-333+350-353+370-373+390-393+410-413+430-433+450-453+470-473+490-493+510-513+530-533+550-553+570-573+590-593" ``` `--show` draws each frame in your terminal as the model generates it. When the run ends, the CLI
- 已知限制
仅支持NROM卡带(iNES mapper 0),不支持非官方操作码,代码必须从卡带ROM运行,且无IRQ支持。
查看 README 依据
NES would need about 700,000 tokens per second. Games spend most of each frame in a loop that waits for vblank. When the host sees a loop body repeat exactly, with no RAM or I/O writes, it advances the clock to just before the next PPU event, and the remaining iterations still run. That cuts the token count by 2.6× to 4.2×. Overall, nesformer runs 150–290× slower than the real console. ## Limitations * **NROM cartridges only (iNES mapper 0).** The CPU can address only 32 KB of program ROM at a time. Bigger games carry a bank-switching chip (a *mapper*, such as MMC1 or MMC3) that swaps
which part of the ROM the CPU sees. nesformer's ROM reads happen inside the model, from a fixed 32 KB table, so it can't follow a bank switch yet. Supporting a mapper means storing the whole ROM in the state, keeping the bank registers there too, and adding one stage that turns each CPU address into a ROM address. * **Official opcodes only.** An unofficial opcode emits `HALT`. * **Code must run from the cartridge ROM.** A jump into RAM emits `HALT`. * **No IRQs** (APU frame IRQ, DMC). BRK and NMI work.
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/10/30 23:54:20
- 首次达标收录
- 2026/10/31 02:51:35
- 统计更新时间
- 2026/10/31 09:31:01
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
仓库信息
- 最近推送
- 2026/10/30 23:59:18
- 许可证标识
- NOASSERTION
- Fork 数
- 6
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目