aminet-emulator

$npx mdskill add Tibsfox/gsd-skill-creator/aminet-emulator

Configure and launch FS-UAE emulator for Amiga software.

  • Manages hardware profiles, ROMs, and WHDLoad settings for Amiga emulation.
  • Depends on FS-UAE emulator, Kickstart ROMs, and WHDLoad packages.
  • Derives configuration from package metadata and user hardware preferences.
  • Generates deterministic configs and launches emulator with state snapshots.

SKILL.md

.github/skills/aminet-emulatorView on GitHub ↗
---
name: aminet-emulator
description: "FS-UAE emulator configuration and launch: hardware profiles, ROM management, WHDLoad integration, config generation, and state snapshots. Use when configuring emulation, managing ROMs, or launching Amiga software."
metadata:
  extensions:
    gsd-skill-creator:
      triggers:
        intents:
          - "aminet.*run|aminet.*launch"
          - "fs-uae|fsuae"
          - "emulat.*config"
          - "whdload"
          - "rom.*manage"
        files:
          - "src/aminet/emulator-config.ts"
          - "src/aminet/hardware-profiles.ts"
          - "src/aminet/rom-manager.ts"
          - "src/aminet/whdload.ts"
          - "src/aminet/emulator-launch.ts"
          - "src/aminet/emulator-state.ts"
        contexts:
          - "amiga emulation"
          - "emulator configuration"
          - "fs-uae setup"
        threshold: 0.7
      token_budget: "1.0%"
      version: 1
      enabled: true
      plan_origin: "242-aminet-integration"
      phase_origin: "242"
---

# Aminet Emulator

## Purpose

Manages FS-UAE emulator configuration, hardware profiles, ROM provisioning, WHDLoad integration, launch orchestration, and emulator state snapshots. Enables launching Amiga software with the correct hardware configuration, Kickstart ROM, and WHDLoad settings derived from package metadata.

## Capabilities

- FS-UAE config generation with buildFsUaeConfig/generateFsUaeConfig
- Path normalization and sorted key output for deterministic configs
- Boolean 1/0 serialization matching FS-UAE format
- 5 hardware profiles: A500, A1200, A1200+030, A4000, WHDLoad
- Embedded TS constants with deep-frozen structuredClone copies
- getProfile/getAllProfiles/getProfileForModel accessors
- ROM manager with CRC32 IEEE polynomial (no external deps)
- 12 known ROM entries with checksums (no ROM data distributed)
- scanRomDirectory with Cloanto XOR decryption and overdump handling
- selectRomForProfile with WHDLoad-to-A1200 fallback mapping
- DI-based crc32Fn for testability
- selectProfileFromReadme with priority-based matching (WHDLoad > 040 > 030 > AGA > 020 > OS3.x > A500 default)
- writeFsUaeConfig with recursive mkdir
- launchEmulator orchestrating config gen + write + execFile
- Structured error types: NO_HARD_DRIVES, INVALID_PROFILE, FSUAE_MISSING, LAUNCH_FAILED
- WHDLoad .Slave detection (case-insensitive recursive scan)
- WHDLOAD_KICKSTART_MAP for 8 Kickstart revisions
- Per-game CPU/chipset/RAM/NTSC/clock overrides via buildWhdloadConfig
- save_states=0 forced for safety; PRELOAD hint at 4MB+
- 9-slot snapshot metadata (save/list/delete)
- shouldDisableSaveStates for directory hard drive safety
- buildMissingRomGuidance with CRC32 hex and legal source references

## Key Modules

| Module | Purpose |
|--------|---------|
| `src/aminet/emulator-config.ts` | FS-UAE config generation with path normalization and sorted keys |
| `src/aminet/hardware-profiles.ts` | 5 hardware profiles (A500/A1200/A1200+030/A4000/WHDLoad) |
| `src/aminet/rom-manager.ts` | CRC32 ROM identification, Cloanto decryption, directory scanning |
| `src/aminet/whdload.ts` | WHDLoad .Slave detection, kickstart mapping, per-game overrides |
| `src/aminet/emulator-launch.ts` | Launch orchestration with profile selection and structured errors |
| `src/aminet/emulator-state.ts` | 9-slot snapshots, save state safety checks, ROM guidance |

## Usage Examples

**Generate FS-UAE config:**
```typescript
import { buildFsUaeConfig, generateFsUaeConfig } from './emulator-config.js';

const config = buildFsUaeConfig({
  profile: a1200Profile,
  romPath: '/roms/kick31.rom',
  hardDrives: ['/games/Lemmings'],
});
const configText = generateFsUaeConfig(config);
// Sorted key=value pairs ready for FS-UAE
```

**Select profile from readme:**
```typescript
import { selectProfileFromReadme } from './emulator-launch.js';

const profile = selectProfileFromReadme(readmeText);
// Matches WHDLoad > 040 > 030 > AGA > 020 > OS3.x > A500 default
```

**Scan and select ROM:**
```typescript
import { scanRomDirectory, selectRomForProfile } from './rom-manager.js';

const roms = await scanRomDirectory('/roms');
const rom = selectRomForProfile(roms, 'a1200');
// Handles Cloanto encrypted ROMs and overdumps
```

**Configure WHDLoad:**
```typescript
import { detectSlaveFiles, buildWhdloadConfig } from './whdload.js';

const slaves = await detectSlaveFiles('/games/Lemmings');
const config = buildWhdloadConfig(slaves[0], {
  cpu: '68020',
  chipRam: 2048,
  ntsc: false,
});
```

**Launch emulator:**
```typescript
import { launchEmulator } from './emulator-launch.js';

const result = await launchEmulator({
  packageDir: '/games/Lemmings',
  romDir: '/roms',
  readmeText,
});
// Orchestrates: profile selection -> ROM match -> config gen -> launch
```

## Dependencies

- FS-UAE emulator installed on host system
- User-provided Kickstart ROMs (not distributed; CRC32 verification only)
- Node.js `node:child_process` for FS-UAE launch
- Node.js `node:fs` for config writing and ROM scanning
- Node.js `node:crypto` not used (CRC32 implemented inline, IEEE polynomial)

## Token Budget Rationale

1.0% budget reflects the 6 modules covering config generation, hardware profiles, ROM management, WHDLoad integration, launch orchestration, and state snapshots. Despite the module count, the patterns are well-structured with clear separation of concerns, requiring moderate context for correct configuration and launch sequences.

More from Tibsfox/gsd-skill-creator

SkillDescription
3d-interaction-designDesign heuristics for three-dimensional interaction — input modalities (6DoF controllers, gaze, gesture, voice), selection and manipulation techniques (ray-cast, virtual hand, go-go, world-in-miniature), navigation (teleport, continuous, redirected walking), and feedback loops (haptic, audio, visual). Covers Fitts' law in 3D, discoverability vs affordance, safe-zone design, and comfort/simulator sickness mitigation. Use when designing VR/AR interactions, immersive walkthroughs, or any input system where the user's body is the controller.
accessibility-patternsProvides web accessibility best practices for semantic HTML, ARIA, keyboard navigation, color contrast, and screen reader patterns. Use when building UI components, reviewing accessibility, or when user mentions 'a11y', 'accessibility', 'ARIA', 'screen reader', 'keyboard navigation', 'WCAG'.
active-listeningActive listening techniques for effective communication. Covers attending behaviors, paraphrasing, reflective listening, clarifying questions, empathic response, barriers to listening, listening in conflict, and cross-cultural listening. Use when building listening skills, improving understanding in conversation, mediating disputes, or analyzing communication breakdowns.
adversarial-pr-reviewAdversarial spec-compliance PR review — cross-references diffs against approved specs, verifies runtime claims against source, detects competing PRs, audits scope/convention compliance. Use before merging.
agile-methodsAgile and Lean software development methodologies for iterative, adaptive project execution. Covers Scrum (roles, ceremonies, artifacts), Kanban (WIP limits, flow metrics), XP (TDD, pair programming, CI), SAFe overview, Lean Software Development (Poppendieck's 7 principles), user stories (INVEST criteria), estimation via story points and velocity, and the Agile Manifesto's values and principles. Includes Cynefin framework for methodology selection and GSD's relationship to Agile as a structured Lean variant.
algebraic-reasoningSymbolic manipulation, equation solving, and algebraic structures for mathematical reasoning. Covers distributive law, factoring, completing the square, linear through polynomial equation solving, systems of equations (substitution, elimination, Gaussian elimination, matrix methods), algebraic structures (groups, rings, fields), modular arithmetic, polynomial theory, and inequalities. Use when solving equations, simplifying expressions, working with algebraic structures, or performing symbolic manipulation.
algorithmic-awarenessUnderstanding how algorithmic systems shape what users see, know, and do -- from recommendation feeds to search ranking to credit scoring to hiring software. Covers the mechanics of recommendation systems, algorithmic bias and its sources, personalization's effects on information diets, opacity and accountability, AI limitations (hallucination, confident wrongness), and the human-in-the-loop question. Use when a learner needs to think critically about why particular content reached them.
algorithms-data-structuresAlgorithms and data structures from first principles through advanced analysis. Covers sorting (bubble, insertion, selection, merge, quick, heap, radix), searching (linear, binary, BFS, DFS, Dijkstra, A*), fundamental data structures (arrays, linked lists, stacks, queues, hash tables, trees, heaps, graphs, tries), complexity analysis (Big-O, Big-Omega, Big-Theta, amortized), recurrence relations, and algorithm design paradigms (divide-and-conquer, greedy, dynamic programming, backtracking). Use when analyzing, selecting, implementing, or comparing algorithms and data structures.
aminet-browserAminet search and browse: full-text search, category tree navigation, architecture filtering, package detail, and curated collections. Use when searching, browsing, or managing package collections.
aminet-indexManages Aminet INDEX infrastructure: fetch, parse, cache, and incremental update of ~84,000-entry package database. Use when managing INDEX data, checking freshness, or parsing .readme files.