Skip to content

Hardware Solution Profiles

Przemyslaw Rachwlal edited this page May 4, 2026 · 1 revision

Hardware Solution Profiles

Purpose

A demonstration program should not dictate the full hardware configuration of a machine.

Example:

  • blink.asm needs CPU, RAM, and an LED
  • hello-uart.asm needs CPU, RAM, and a UART
  • hello-lcd.asm needs CPU, RAM, and an LCD 16×2
  • i2c-scan.asm needs CPU, RAM, I2C controller, and optionally UART for logging

The current development direction separates:

  1. Program source code
  2. Compiled binary
  3. Hardware definition required to run the program
  4. UI layout for visible modules

Current Problem

MinimalBlinkMachineSession currently builds a fixed set of devices:

  • CPU
  • RAM
  • LED
  • LCD 16×2
  • I2C controller
  • UART
  • Terminal

This is convenient for prototyping but poor for emulation — a simple blink.asm shows and initializes devices it never uses.

Target Model

Introduce a HardwareSolutionProfile (or SolutionProfile) that describes what hardware to build for a given program or scenario.

Solution Manifest Format

Each program in programs/asm/ has a paired .solution.json file:

{
  "id": "blink",
  "displayName": "Blink LED",
  "cpu": { "type": "mos6502", "clock": 1000000 },
  "memory": {
    "ram": [{ "start": 0x0000, "size": 0x8000 }]
  },
  "devices": [
    { "id": "led", "type": "led", "address": 0xFF00 }
  ],
  "ui": {
    "panels": {
      "left": ["cpu-registers"],
      "right": ["led"]
    }
  }
}

Device Profile

Each device in the manifest specifies:

  • id — unique identifier
  • type — device type (led, lcd, uart, i2c, timer, rtc)
  • address — base memory-mapped address
  • options — type-specific configuration (e.g. LCD columns/rows, I2C address)

Current Programs

Program Hardware Required
blink.asm CPU + LED
hello-uart.asm CPU + UART
hello-lcd.asm CPU + LCD HD44780
hello-lcd-poll.asm CPU + LCD HD44780 (polling)
hello-lcd-i2c.asm CPU + I2C + LCD PCF8574
i2c-scan.asm CPU + I2C + UART

Implementation Status

  • SolutionDefinition and SolutionDefinitionLoader classes exist in Symulator.Application
  • All 6 example programs have .solution.json manifests
  • MinimalBlink machine reads manifests but still builds all devices as fallback
  • Full dynamic device selection is planned but not yet implemented

See Also

Clone this wiki locally