"""Seeded Fleetmesh GRASP Git repositories (`node.protocols.grasp.seeds`).
Contains the initial source files (`src/*.rs`, `src/*.asm`, `src/*.ts`, `index.html`, `nsite.json`,
`Makefile`, `README.md`) for built-in Game Engines, DMG-01 ROMs, and NIP-5A `nsite` apps.
"""
from __future__ import annotations
from typing import Dict, List, TypedDict
[docs]class SeededGraspRepo(TypedDict):
repo_id: str
title: str
description: str
linked_target_id: str
target_kind: str
owner_handle: str
owner_did: str
files: Dict[str, str]
SEEDED_GRASP_REPOS: List[SeededGraspRepo] = [
{
"repo_id": "dmg-sm83-engine",
"title": "Sharp SM83 DMG-01 Hardware Core",
"description": "Cycle-stepped 4.19 MHz Sharp SM83 CPU, MBC bank switching, 160x144 PPU & 4-Ch APU.",
"linked_target_id": "engine-dmg-sm83",
"target_kind": "engine",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# Sharp SM83 DMG-01 Hardware Core\n\nDeterministic Game Boy (DMG-01) emulator core compiled for FleetMesh Arcade.\n\n- CPU: Sharp SM83 (4.194304 MHz)\n- Verification: 1,024-byte Bao Merkle leaves\n",
"src/cpu_sm83.rs": '// Sharp SM83 instruction decoder & cycle stepper\npub struct Sm83Regs {\n pub a: u8, pub f: u8, pub b: u8, pub c: u8,\n pub d: u8, pub e: u8, pub h: u8, pub l: u8,\n pub sp: u16, pub pc: u16, pub ime: bool,\n}\n\npub fn step_instruction(regs: &mut Sm83Regs, bus: &mut [u8; 65536]) -> u32 {\n let opcode = bus[regs.pc as usize];\n regs.pc = regs.pc.wrapping_add(1);\n match opcode {\n 0x00 => 4, // NOP\n 0xAF => { regs.a = 0; regs.f = 0x80; 4 } // XOR A\n _ => 4,\n }\n}\n',
"Cargo.toml": '[package]\nname = "dmg-sm83-engine"\nversion = "1.2.0"\nedition = "2021"\n',
},
},
{
"repo_id": "gbc-cgb-engine",
"title": "Game Boy Color (CGB) Dual-Speed Core",
"description": "Backwards-compatible CGB/DMG cartridge engine supporting MBC3 RTC & MBC5 64-bank cartridges.",
"linked_target_id": "engine-gbc-sm83",
"target_kind": "engine",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# Game Boy Color (CGB) Dual-Speed Core\n\nSupports 8.38 MHz double-speed mode, 16KB VRAM (2 banks), and 32KB WRAM.\n",
"src/cgb_mode.rs": "// CGB KEY1 double-speed switch & 15-bit RGB555 palette RAM\npub struct CgbState {\n pub double_speed: bool,\n pub vram_bank: u8,\n pub bg_palette_ram: [u8; 64],\n}\n",
},
},
{
"repo_id": "wasm4-mesh-engine",
"title": "WASM-4 Fantasy Console Runtime",
"description": "Deterministic 160x160 4-color WebAssembly fantasy console with 64 KiB linear RAM.",
"linked_target_id": "engine-wasm4",
"target_kind": "engine",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# WASM-4 Fantasy Console Runtime\n\nExecutes `.wasm` cartridges inside a 64 KiB memory-mapped sandbox.\n",
"src/wasm4_host.ts": "export const WASM4_FRAMEBUFFER_ADDR = 0x00a0;\nexport const WASM4_PALETTE_ADDR = 0x0004;\nexport const WASM4_GAMEPAD1_ADDR = 0x0016;\n",
},
},
{
"repo_id": "nsite-app-bridge",
"title": "NIP-5A nsite Sandboxed App Container",
"description": "Sandboxed iframe runtime with COOP/COEP Cross-Origin Isolation and MeshAppBridge/1.0 RPC.",
"linked_target_id": "engine-nsite-sandbox",
"target_kind": "engine",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# NIP-5A nsite Sandboxed App Container\n\nProvides `MeshAppBridge/1.0` postMessage RPC for sovereign web apps.\n",
"src/bridge_rpc.ts": 'export interface MeshAppBridgeMessage {\n protocol: "MeshAppBridge/1.0";\n action: "get_identity" | "verify_bao_leaf" | "emit_score_receipt";\n payload?: Record<string, unknown>;\n}\n',
},
},
{
"repo_id": "meshboy-brick",
"title": "MeshBoy BrickBreaker DX",
"description": "60fps SM83 DMG-01 arcade block-breaker with deterministic velocity vectors and combo multipliers.",
"linked_target_id": "meshboy-brick",
"target_kind": "game",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# MeshBoy BrickBreaker DX\n\n32 KiB DMG-01 ROM written in RGBDS SM83 assembly.\nBuild with `rgbasm -o brick.o src/brickbreaker.asm && rgblink -o meshboy-brick.gb brick.o`.\n",
"src/brickbreaker.asm": '; MeshBoy BrickBreaker DX - SM83 Entrypoint ($0100)\nSECTION "Header", ROM0[$0100]\n nop\n jp StartGame\n\nSECTION "Main", ROM0[$0150]\nStartGame:\n di\n ld sp, $FFFE\n ld a, %10010001 ; LCDC on, BG+OBJ enabled\n ldh [$FF40], a\n.FrameLoop:\n halt\n call ReadJoypad\n call StepBallPhysics\n jr .FrameLoop\n',
"Makefile": "ROM = meshboy-brick.gb\nall:\n\trgbasm -o brick.o src/brickbreaker.asm\n\trgblink -o $(ROM) brick.o\n\trgbfix -v -p 0 $(ROM)\n",
},
},
{
"repo_id": "baorunner-dmg",
"title": "BaoRunner 2049",
"description": "High-speed cyber-grid courier through 1,024-byte Merkle leaves with zero-latency dodge mechanics.",
"linked_target_id": "baorunner-dmg",
"target_kind": "game",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# BaoRunner 2049 (DMG-01)\n\nNavigate corrupted 1,024-byte Merkle tree leaves at 59.7275 Hz.\n",
"src/baorunner.asm": '; BaoRunner 2049 - Cyber Courier Engine\nSECTION "CourierLoop", ROM0[$0150]\nCourierTick:\n ldh a, [$FF44] ; Wait VBlank (LY == 144)\n cp 144\n jr nz, CourierTick\n call ScrollGridLanes\n call VerifyLeafGate\n jr CourierTick\n',
"Makefile": "ROM = baorunner-dmg.gb\nall:\n\trgbasm -o runner.o src/baorunner.asm\n\trgblink -o $(ROM) runner.o\n",
},
},
{
"repo_id": "fips-defense",
"title": "FIPS Mesh Invaders",
"description": "Defend sovereign mesh relays from packet-dropping botnets using rapid-fire pulse cannons.",
"linked_target_id": "fips-defense",
"target_kind": "game",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# FIPS Mesh Invaders\n\nClassic fixed-shooter written for Sharp SM83 with 4-channel pulse + noise SFX.\n",
"src/invaders_sm83.asm": '; FIPS Mesh Invaders - Wave Spawner & Pulse Laser\nSECTION "WaveEngine", ROM0[$0150]\nFirePulseCannon:\n ld a, $80\n ldh [$FF12], a ; NR12 envelope\n ld a, $C3\n ldh [$FF14], a ; Trigger Square 1 sweep\n ret\n',
},
},
{
"repo_id": "nsite-synth-tracker",
"title": "PocketPulse Chiptune Tracker (nsite)",
"description": "Interactive 4-channel Game Boy wave/noise step sequencer & synthesizer packaged as a NIP-5A nsite.",
"linked_target_id": "nsite-synth-tracker",
"target_kind": "nsite",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# PocketPulse Chiptune Tracker (`NIP-5A` nsite)\n\nRuns inside the FleetMesh Cross-Origin Isolated nsite container.\n",
"nsite.json": '{\n "kind": 35128,\n "d_tag": "pocketpulse-tracker",\n "title": "PocketPulse Chiptune Tracker",\n "cross_origin_isolated": true,\n "entrypoint": "/index.html"\n}\n',
"index.html": '<!doctype html>\n<html lang="en">\n<head><meta charset="utf-8"><title>PocketPulse Tracker</title></head>\n<body>\n <div id="sequencer-grid">16-Step DMG Pulse/Wave Sequencer</div>\n <script src="src/tracker_apu.js"></script>\n</body>\n</html>\n',
"src/tracker_apu.js": '// 4-Channel WebAudio DMG APU Synthesizer\nexport function triggerPulseChannel(ctx, freqHz, dutyCycle = 0.5) {\n const osc = ctx.createOscillator();\n osc.type = "square";\n osc.frequency.value = freqHz;\n osc.connect(ctx.destination);\n osc.start();\n osc.stop(ctx.currentTime + 0.12);\n}\n',
},
},
{
"repo_id": "nsite-mesh-wiki",
"title": "Rhio Sovereign Knowledge Explorer (nsite)",
"description": "Offline-capable decentralized documentation & hypermedia explorer verified per 1,024B leaf.",
"linked_target_id": "nsite-mesh-wiki",
"target_kind": "nsite",
"owner_handle": "@boyroywax",
"owner_did": "",
"files": {
"README.md": "# Rhio Sovereign Knowledge Explorer\n\nDecentralized NIP-5A hypermedia viewer with per-leaf Bao verification.\n",
"nsite.json": '{\n "kind": 35128,\n "d_tag": "rhio-wiki-app",\n "title": "Rhio Sovereign Knowledge Explorer",\n "cross_origin_isolated": true,\n "entrypoint": "/index.html"\n}\n',
"index.html": '<!doctype html>\n<html lang="en">\n<head><meta charset="utf-8"><title>Rhio Knowledge Explorer</title></head>\n<body>\n <main id="wiki-root">Bao-Verified Hypermedia Graph</main>\n</body>\n</html>\n',
},
},
]