用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vizigr0u/svelteboy --skill backend命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | backend |
| description | Prime context for working on the AssemblyScript/WASM GameBoy emulator backend in /assembly/ |
| argument-hint | optional: specific area, e.g. cpu, ppu, audio, memory |
You are working on the AssemblyScript backend of SvelteBoy, a GameBoy DMG emulator that compiles to WebAssembly.
asc)assembly/index.ts — all exports must be declared hereassembly/emulator.ts — Emulator.Run() ticks CPU, Timer, PPU, DMA each cyclepnpm run asbuild:debug (dev) or pnpm run asbuild:release (prod)build/backend.wasm + build/backend.js (auto-generated ESM bindings)pnpm test — runs suites in assembly/tests/| Area | Path | Key files |
|---|---|---|
| CPU | assembly/cpu/ | cpu.ts (registers/state), opcodes.ts (256+256 CB-prefix decode), alu.ts, interrupts.ts |
| PPU | assembly/io/video/ | ppu.ts (main renderer), scanlineRenderer.ts, pixelFifo.ts, oam.ts, dma.ts |
| APU | assembly/audio/ | apu.ts (core), render.ts (sample gen), PulseChannel.ts, WaveChannel.ts, NoiseChannel.ts |
| Memory | assembly/memory/ | memoryMap.ts (address dispatch), mbc1/2/3.ts (bank controllers), savegame.ts |
| I/O | assembly/io/ | joypad.ts (input), timer.ts (DIV/TIMA), serial.ts |
| Debug | assembly/debug/ | debugger.ts (breakpoints), debugInfo.ts (snapshots), disassemble.ts |
0x00000000 VRAM (16KB)
0x00004000 OAM (160B)
0x000040A0 Ext RAM (512KB, cartridge)
0x000840A0 Work RAM (32KB)
0x0010C0A0 I/O Regs (128B)
0x0010C120 High RAM (128B)
0x0010CBA4 Cart ROM (up to 8MB)
this — use module-level functions or static class methodsUint8Array, Int16Array, etc. are first-classmemory.data<u8>(offset) for direct memory reads; use store<u8>(ptr, val) / load<u8>(ptr) for raw accessMap/Set generics with reference types — use StaticArray or custom structuresassembly/index.ts or re-exported from it@inline decorator for hot-path functions (CPU tick, PPU tick)assembly/audio/apu.ts)assembly/index.ts: export { myFunction } from "./audio/apu"pnpm run asbuild:debugbuild/backend.d.tsimport { myFunction } from "../build/backend"CPU.Tick() advances 1 M-cycle (4 T-cycles)pnpm test # all suites
# Individual suites called via testCpu(), testVideo(), etc. (also WASM exports)
$ARGUMENTS
基于 SOC 职业分类