backend

Outline backend structure, entry points, and build steps for an AssemblyScript/WASM GameBoy emulator.

4|1|Updated Aug 19, 2023
One-click install
npx skills add https://github.com/vizigr0u/svelteboy --skill backend-vizigr0u
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend
Source: https://github.com/vizigr0u/svelteboy/tree/main/.claude/skills/backend
Command: npx skills add https://github.com/vizigr0u/svelteboy --skill backend-vizigr0u

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured context and onboarding guide for backend development of the GameBoy emulator in AssemblyScript/WASM, consolidating the essential file locations, build steps, and tests to accelerate productive work.

Core Features & Use Cases

  • Language: AssemblyScript (TypeScript-like, compiles to WASM via asc)
  • Entry point / public API: assembly/index.ts — all exports must be declared here
  • Main loop: assembly/emulator.ts — Emulator.Run() ticks CPU, Timer, PPU, DMA each cycle
  • Build and tests: pnpm run asbuild:debug (dev), pnpm run asbuild:release (prod); tests run via pnpm test in assembly/tests
  • Outputs: build/backend.wasm and build/backend.js

Quick Start

Open assembly/index.ts and start implementing backend changes, then build with pnpm run asbuild:debug for development or pnpm run asbuild:release for production.

Frequently Asked Questions about backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a WASM backend for a GameBoy emulator in AssemblyScript?

To structure a WASM backend for a GameBoy emulator, use AssemblyScript and declare all public API exports in assembly/index.ts. Implement the main tick loop for CPU, PPU, and memory components in assembly/emulator.ts.

What build commands are used for AssemblyScript emulator development?

For AssemblyScript emulator development, run pnpm run asbuild:debug for development builds and pnpm run asbuild:release for production. These scripts compile the code and output artifacts to the build directory.

Where does the main emulation loop run in an AssemblyScript GameBoy emulator?

The main emulation loop runs in the Emulator.Run() method inside assembly/emulator.ts. This function ticks the CPU, Timer, PPU, and DMA components each cycle to advance the GameBoy emulation state.

How do I test an AssemblyScript GameBoy emulator backend?

To test an AssemblyScript GameBoy emulator backend, run the pnpm test command. This executes the test suite located in the assembly/tests directory to verify your CPU, memory, and PPU implementations.

What output artifacts are generated when building a WASM emulator backend?

Building a WASM emulator backend generates build/backend.wasm and build/backend.js as output artifacts. These files contain the compiled WebAssembly binary and its JavaScript glue code for integration.

Does GameBoy emulator backend development require specific entry point files?

GameBoy emulator backend development requires assembly/index.ts as the designated entry point file. All backend module exports and public API interfaces must be declared within this specific file structure.