원클릭으로
backend
Prime context for working on the AssemblyScript/WASM GameBoy emulator backend in /assembly/
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Prime context for working on the AssemblyScript/WASM GameBoy emulator backend in /assembly/
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Prime context for working on the Svelte 5 frontend in /src/ — components, stores, WASM bridge, audio, canvas rendering
Profile-driven performance optimization for SvelteBoy AssemblyScript/WASM backend. Use when asked to optimize emulator performance, profile hotspots, or reduce CPU usage.
Prime context for working on the SvelteBoy APU — architecture, channel implementations, register layout, event queue, render pipeline, and test patterns
Guide for writing AssemblyScript backend tests in assembly/tests/ — patterns, helpers, ROM setup, and wiring
Complete Game Boy DMG hardware reference — all registers, timing, opcodes, PPU modes, APU circuits, MBC banking. Authoritative inline spec for emulator implementation.
Prime context for architectural discussions about SvelteBoy's design patterns, component interactions, timing model, and trade-offs vs. general emulator approaches
| 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