Skip to content

Repository files navigation

Smemu6 — Smart Emulator of the Smart Keyboard

The Smart Machine deserves a smart emulator.

Emulator for the Smaky 6, a 1978 Swiss Z80-based personal computer developed at EPFL (Lausanne) by Jean-Daniel Nicoud and commercialized by Epsitec (~450 units, 1979–1983).

The machine is a Z80 @ 2.5 MHz with a 512×240 green-phosphor display, a Micropolis hard-sectored 5.25" floppy drive, and an optional WD1000/WD1001/WD1002-compatible Winchester hard disk. The Phantom ROM (2 KB) bootstraps the SAMOS operating system from floppy.

A machine worth remembering

The Smaky 6 was a genuinely groundbreaking design for its era: a fully integrated personal workstation with a custom operating system, a coherent human-interface philosophy, and hardware capabilities that compared favourably with systems costing far more. Jean-Daniel Nicoud's team at EPFL created it years before "personal computing" became mainstream in Europe, and the ~450 units that were built had an outsized influence on Swiss computer science education and research.

Today very few working Smaky 6 machines survive. smemu6 is a work of love — an attempt to preserve and document this little-known but important piece of computing history so that the machine's software, design decisions, and spirit remain accessible long after the last physical unit stops working. If you care about vintage computing, digital preservation, or simply great engineering from an unlikely corner of the world, this project is for you.

Hardware reference: docs/dev/HARDWARE.md

Try it in your browser: sch-lika.github.io/smemu6


Table of Contents

  1. Building
  2. Required Files
  3. Quick Start
  4. Command-Line Options
  5. Keyboard Controls
  6. Runtime Signals
  7. Boot Sequence
  8. Disk Image Formats
  9. ROM Extraction
  10. Documentation

1. Building

Dependencies: CMake ≥ 3.16, SDL2 development libraries, git (used by CMake FetchContent to pull the Z80/Zeta CPU library and the PSG core).

# Ubuntu / Debian
sudo apt install cmake libsdl2-dev git

# macOS (Homebrew)
brew install cmake sdl2
git clone https://github.com/Sch-LikA/smemu6
cd smemu6
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

The binary is build/smemu6. Run all commands from the repository root or from inside build/ (paths below use build/ as the working directory).

Web / Emscripten build

A browser-playable WebAssembly build is supported via Emscripten. See web/README.md for full instructions. Quick summary:

# Install and activate emsdk (one-time)
source /path/to/emsdk/emsdk_env.sh

# Configure and build (after creating .emscripten-local as described in web/README.md)
EM_CONFIG="$PWD/.emscripten-local" cmake --preset web
EM_CONFIG="$PWD/.emscripten-local" cmake --build build-web

# Serve locally with the required COOP/COEP headers
tools/serve_web.sh
# Open http://127.0.0.1:8080/
# Wait for the bundled floppy library, choose DX0/DX1 images, then click Start
# In the browser, prefer the front-panel CURSOR/COPY/KILL/PROGRA/SHOW/SEARCH/CHANGE buttons
# over host F1..F7, because browsers may reserve those function keys.
# Web button semantics match the native status bar: left-press holds, right-click toggles a latch.
# On touch devices, use the KEYBOARD button in the control strip to open the device keyboard.

Experimental SDCC scaffold

An experimental standalone SDCC proof-of-execution scaffold lives under sdcc/examples/hello_alpha. It is intentionally outside CMake and CI for now. The ongoing bring-up notes and follow-up tasks now live in sdcc/SDCC_TODO.md.

  • expected tools: sdcc, sdasz80, python3
  • current target shape: ordinary .SM, flags=1, default load=entry=0x6000 with optional example-local layout overrides via sdcc/examples/<name>/layout.conf
  • current runtime scope: confirmed direct alpha-RAM output, no libc startup, and a verified return-to-CLI path for returning main
  • the example now also carries a tiny reusable target header, sdcc/examples/hello_alpha/smaky6.h, for first-target alpha-RAM output with a simple row/column helper over the 64-column alpha screen plus screen-clear and row-clear helpers for readable standalone probes
  • when archived SM6.ST evidence is present, the standalone build script also generates an SDCC-friendly symbol header and the scaffold consumes SMAKY6_SM6_ALPHA from it instead of hard-coding the alpha base address and now also emits an assembler include so crt0.s can use SMAKY6_SM6_BUFLIN instead of hard-coding 0x45C0 the remaining return jump at 0x56AE still has no recovered .ST symbol, so the examples now factor it as a descriptive local alias only: SMAKY6_CLI_REPROMPT_SINK
sdcc/build_smaky6_sdcc_example.sh
sdcc/run_smaky6_sdcc_example.sh build/smemu6

# Or target another one-file example directory under sdcc/examples/
sdcc/build_smaky6_sdcc_example.sh hello_alpha
sdcc/run_smaky6_sdcc_example.sh build/smemu6 hello_alpha
sdcc/build_smaky6_sdcc_example.sh sm6peek
sdcc/run_smaky6_sdcc_example.sh build/smemu6 sm6peek
sdcc/build_smaky6_sdcc_example.sh sm6emitz
sdcc/run_smaky6_sdcc_example.sh build/smemu6 sm6emitz

sdcc/examples/sm6peek is the first symbol-backed follow-up example. It uses generated SM6.ST symbols beyond ALPHA and displays live reads from OUTCAR and MAXMEM in the guest workspace.

sdcc/examples/sm6emitz is the first callable-routine probe. It wraps the documented RST 20 / 0x06 zero-terminated string helper and calls it from SDCC code via a tiny example-local assembly stub. Its current relocation probe runs at 0x5500 through an example-local layout.conf. Initializing SP to the same 0xF000 value used by the known-good SDCC examples fixes the earlier launch-handoff mismatch. The remaining post-?DITEX issue is narrower: the helper still falls through shared CLI line-maintenance code internally, but switching the example's explicit exit from the raw 0x56AE sink to documented ?RTN removes the visible doubled-text tail. A later probe also forced SDCC to emit a real call _smaky6_emit_text instead of a final tail jp by adding a post-call volatile store in main; that changed the generated call site as intended, but the runtime still hit the same bad sp=0xEFFE top=0x5506 post-?DITEX keywait family, so SDCC tail-call elimination is not the root cause. The next stack-focused probe then proved the call/return path itself is still intact: immediately after raw ?DITEX, the helper sees SP=0xEFFC with the stacked word pointing at the post-call instruction in main; the first post-call C statement runs; and after _main returns, crt0 reaches its explicit exit with SP=0xF000 top=0x0000. The remaining failure therefore starts only after the explicit exit handoff, not at the raw ?DITEX return or ordinary C return boundary.

sdcc/examples/sm6ditexasm is the matching hand-written assembly-only probe. Its first draft was skewed by a local startup bug: a raw ldir clear of the full alpha buffer also zeroed the live CLI buffer at 0x45C0+, so the probe corrupted launch state before reaching RST 20 / 0x06. With that raw clear removed, the assembly-only probe now reaches raw ?DITEX and visibly prints RST20/06 CALL OK. A post-call marker proved that raw ?DITEX does return to the caller. The next narrowing result is that documented ?RTN still leads to the bad post-output keywait family here, but switching this asm-only probe to the same raw 0x56AE CLI reprompt sink used by the known-good ordinary .SM controls restores CLI.SY instead. That restored CLI handoff is still not perfect, though: the previous command name remains in the live edit buffer, so the user must clear the line (for example with ESC) before entering the next command.

For reverse-engineering work on the archived symbol-table files, a small standalone C dumper now lives at sdcc/dump_smaky6_st_symbols.c. The shared parser API is in sdcc/smaky6_st_symbols.h / sdcc/smaky6_st_symbols.c, and sdcc/export_smaky6_st_symbols.c can emit a JSON dump or a generated C header from FLO.ST / SM6.ST.

With the archived private/floppies/extracted/Sys2-2-boot/SM6.ST and FLO.ST present, the native CMake build also exposes utility targets for this pipeline:

cmake --build build -j$(nproc) --target dump_smaky6_st_symbols export_smaky6_st_symbols smaky6_st_exports smaky6_st_generated_example
build/smaky6_st_generated_example

Generated headers and JSON exports are written under build/generated-st/.


2. Required Files

  • roms/samos_sys17.rom: 2 KB, required. Phantom bootstrap ROM (TMS2716 SYS17).
  • roms/chargen.rom: 2 KB, optional. Character generator PROM; a synthetic fallback is built in.
  • floppies/*.dsk: optional. Floppy disk images; see §8.
  • harddisks/SM6WIN0.DSK: optional 16 MB Winchester drive 0 image.
  • harddisks/SM6WIN1.DSK: optional 16 MB Winchester drive 1 image.

Without samos_sys17.rom the CPU will execute random bytes and the emulator will report a warning but continue.


3. Quick Start

cd build

# Boot SAMOS from floppy (machine boots DX0 automatically)
./smemu6 -floppy "../floppies/Sys1-H.dsk"

# Boot SAMOS from a metadata-preserving DX0 hostdir export
python3 ../tools/extract_samos_image.py ../floppies/Sys2-2.dsk ../tmp/Sys2-2-hostdir
./smemu6 -floppy-hostdir ../tmp/Sys2-2-hostdir

# Boot from Winchester (DX0) with floppy accessible as DX1
./smemu6 -harddisk ../harddisks/SM6WIN0.DSK \
            -floppy2 "../floppies/Sys1-H.dsk"

# Enable the experimental PSG expansion card (currently claims ports 0x20..0x27)
./smemu6 -floppy "../floppies/SIGMA.dsk" -psg

# Headless run with SDL dummy drivers (e.g. in CI)
SDL_AUDIODRIVER=dummy SDL_VIDEODRIVER=dummy \
    ./smemu6 -floppy "../floppies/Sys1-H.dsk" \
                -inject-str "LIST\n" -timeout 20

# Scale the window up 3× and add CRT scanline effect
./smemu6 -floppy "../floppies/Sys1-H.dsk" -scale 3 -scanlines

4. Command-Line Options

4.1 Storage

-floppy <path>

Mount a floppy disk image on DX0: (the primary floppy drive). Floppy controller writes are supported. File-backed floppy images are writable in place.

./smemu6 -floppy ../floppies/Sys1-H.dsk

-floppy-hostdir <path>

Mount a host-directory-backed floppy on DX0: using an in-memory overlay. For bootable DX0 media, the host tree must preserve SAMOS metadata and sector order; tools/extract_samos_image.py can export a suitable tree from a known good .dsk image such as floppies/Sys2-2.dsk.

python3 tools/extract_samos_image.py floppies/Sys2-2.dsk tmp/Sys2-2-hostdir
./smemu6 -floppy-hostdir tmp/Sys2-2-hostdir

Note: tools/extract_samos_image.py is a wrapper around the unified smaky6_samos.py tool (from the smaky6-tools repository). It preserves the original interface while delegating to smaky6_samos.py extract-all with metadata and directory-clearing flags.

-floppy2 <path>

Mount a floppy disk image on DX1: (the secondary floppy drive).

./smemu6 -floppy ../floppies/Sys1-H.dsk -floppy2 ../floppies/Burotic.dsk

-harddisk <path>

Mount a flat binary hard-disk image as Winchester drive 0 (SM6WIN0). The WD1000/WD1001/WD1002-compatible controller is emulated at ports 0x20–0x27. Geometry: 6 heads, 32 sectors/track, 256 bytes/sector, up to 255 cylinders.

./smemu6 -harddisk ../harddisks/SM6WIN0.DSK -floppy2 ../floppies/Sys1-H.dsk

Note: On a Winchester-equipped Smaky 6 the hard disk is DX0 and the floppy (if fitted) is DX1. Use -harddisk with -floppy2, not -floppy. This currently conflicts with -psg: both devices decode ports 0x20..0x27.

-harddisk2 <path>

Mount a flat binary hard-disk image as Winchester drive 1 (SM6WIN1).

Note: The WD1000/WD1001/WD1002 hardware supports two drives (SDH register bit 3), and the emulator correctly images both. However, standard SAMOS does not expose a separate CLI device name for drive 1 — the OS has only a single Winchester dispatch path (RST 20 → 0x0339) governed by a binary floppy/Winchester flag at RAM address 0x4502. Drive 1 is accessible only if the SAMOS Winchester driver explicitly sets SDH bit 3, which is not observed in the standard SYS.SY 1-H image. Mount it for archival or custom-software use, but do not expect it to appear as a second named device in the SAMOS CLI.

./smemu6 -floppy ../floppies/Sys1-H.dsk -harddisk ../harddisks/SM6WIN0.DSK -harddisk2 ../harddisks/SM6WIN1.DSK

-psg

Enable the experimental 4-chip PSG expansion card for SIGMA bring-up.

Current scope:

  • claims ports 0x20/0x21, 0x22/0x23, 0x24/0x25, 0x26/0x27
  • odd port = register select, even port = data, matching the current SIGMA-derived probe map
  • SIGMA now gets past the card-detect probe, loads PSG.DF, and reaches the main music menu with -psg
  • default PSG clock is now the measured real-hardware value 1.410 MHz; use -psg-clock <hz> to sweep the observed potentiometer range 1000000..2400000 during SIGMA bring-up
  • the KiCad netlist still shows the AY CLOCK net is driven locally from U16 pin 4 through a Schmitt-trigger RC network (1nF1, R6, RV1), so remaining hardware work is about matching the potentiometer setting and any downstream shaping, not recovering a host-bus clock source
  • conflicts with -harddisk and -harddisk2, because the Winchester controller already uses the same decoded port range
  • the native SDL launcher and the web launcher can now enable the PSG card before boot; on native builds the same hard-disk conflict still applies

4.2 Boot Control

-break-to-monitor

Inject a SHIFT+BREAK combination shortly after startup to enter the SAMOS monitor instead of booting from floppy. Useful for ROM-level debugging.

-inject-str <string>

Inject a sequence of key codes once the SAMOS CLI prompt (>) is detected on screen. The string is converted to uppercase Smaky key codes:

  • \n: Enter (CR, 0x0D).
  • \f: Wait for the next CLI prompt before injecting the following bytes.
  • az: Uppercased to AZ.
  • AZ, 09, space: passed as-is.
  • Other characters: skipped.
# Run the LIST command automatically after boot
./smemu6 -floppy ../floppies/Sys1-H.dsk -inject-str "LIST\n"

# Run one command, wait for the next prompt, then run another
./smemu6 -harddisk ../harddisks/SM6WIN0.DSK -floppy2 ../floppies/Sys1-H.dsk \
    -inject-str "LIST DX1:\n\fLIST DX1:\n"

-inject-delay <frames>

Wait this many 50 Hz frames after the CLI prompt becomes visible before triggering -inject-str or -inject-keycode. Useful when the OS reaches the prompt before the screen content has fully stabilized.

-inject-at-prompt <n>

Fire the configured injection on the nth visible CLI prompt transition instead of the first one. Default: 1.

-inject-at-frame <n>

Fire -inject-str or -inject-keycode at absolute frame n instead of waiting for a CLI prompt. Useful for low-level boot or timing probes.


4.3 Display

-scale <n>

Integer pixel-doubling factor for the SDL window. Range: 1–8. Default: 1.

The logical resolution is 512 × 508 (512 wide; 480 px machine area with 2:1 vertical stretch + 14 px disk-activity bar + 14 px function-key bar). The physical window is n × 512 by n × 508.

Scale Window size Typical use
1 512 × 508 Default / CI
2 1024 × 1016 Comfortable on 1080p
3 1536 × 1524 HiDPI / 1440p
4 2048 × 2032 4K screens
./smemu6 -floppy ../floppies/Sys1-H.dsk -scale 2

-scanlines

Draw a CRT-style scanline overlay: every other output row is darkened, simulating the dark gaps between phosphor scan lines on a real monitor.

./smemu6 -floppy ../floppies/Sys1-H.dsk -scale 2 -scanlines

-vmode <mode>

Force the display to start in a specific video mode, overriding what the ROM writes to port 0x00. One of:

  • alpha: text only, alpha character plane.
  • graphic: bitmap only, 60-row × 512-px graphic plane.
  • super: superimposed alpha + graphic.
./smemu6 -floppy ../floppies/Sys1-H.dsk -vmode alpha

-gfxbits <order>

Set the bit order for the graphic (bitmap) plane. One of:

  • msb: bit 7 = leftmost pixel. Default and standard Smaky 6 hardware setting.
  • lsb: bit 0 = leftmost pixel. Use for compatibility checks on unusual images.

-no-display-off

Suppress display-blank writes. Normally, writing 0x00 to port 0x00 (bit 0 = 0) blanks the screen. With this flag those writes are ignored and the screen stays visible at all times. Useful when software briefly blanks the display during a mode switch and you want to keep the window live.

./smemu6 -floppy ../floppies/Sys1-H.dsk -no-display-off

-verbose-video

Log display on/off and video mode changes to stderr. Off by default. Useful when debugging boot sequences or investigating unexpected screen blanking.

./smemu6 -floppy ../floppies/Sys1-H.dsk -verbose-video

4.4 Audio

-no-beeper

Disable the emulated buzzer. By default the beeper is on and generates sample-accurate square-wave tones through SDL audio. Use this flag when running headless or when audio is unavailable.

SDL_AUDIODRIVER=dummy ./smemu6 -floppy ../floppies/Sys1-H.dsk -no-beeper

-drive-sound

Enable floppy drive sound effects: motor whir, head-step clicks, and sector-hole ticks. Off by default.

./smemu6 -floppy ../floppies/Sys1-H.dsk -drive-sound

4.5 Timeouts and Scripting

-timeout <seconds>

Kill the emulator after this many wall-clock seconds. 0 = run forever.

Default policy (when this option is omitted):

  • With -trace: 45 seconds.
  • Without -trace: run forever.

Useful in CI pipelines combined with -inject-str.

./smemu6 -floppy ../floppies/Sys1-H.dsk -inject-str "LIST\n" -timeout 30

For readable CLI/screen captures, pair -scrdump with -no-display-off. SAMOS often blanks the display between updates, so -scrdump alone can miss the visible prompt.


4.6 Debug and Tracing

All trace output goes to stderr.

-trace

Log Z80 PC milestones to stderr as the machine boots: ROM entry, MOVROM (Phantom ROM bank-switch), SAMOS handoff, CLI prompt detection. Also sets the default timeout to 45 s (see -timeout).

-traceflow

Log a dense stream of Z80 PC values during the focused post-handoff control flow (low-RAM range). Very verbose — use only when chasing a specific boot hang.

-trace08

Log every IN/OUT access on port 0x08 (E405/08 RTC serial interface): clock edges, data bits, and decoded register values.

-tracepsg

Log PSG traffic on ports 0x20..0x27: chip index, register-select vs data access, and the transferred byte. Useful for SIGMA hardware-probe work and AY register bring-up.

-trace11

Log every read of port 0x11 (unknown device; always returns 0x00).

-tracecd

Log every read of port 0xCD (mapped as 0x0D after 6-bit mask; Winchester DMA / status register; always returns 0x00).

-trace19

Log every write to port 0x19 (floppy motor-on / NMI-arm / drive-select control register). Shows the raw value and the decoded drive-select and motor/NMI bits.

-tracefdc

Log focused floppy events: sector-ID bytes, checksum mismatches, and INIR data-stream boundaries. Less noisy than -trace19; useful for diagnosing sector-read errors.

-tracekbd

Log every keyboard CLA read (port 0x00 IN) and status read (port 0x01 IN), including the key code returned and the FOUND flip-flop state. For a focused Linux/X11 regression check of overlapping printable typing, run tools/check_keyboard_asd_trace.sh; it injects overlapping a s d keydown/keyup events and verifies that the CLI receives all three visible insertions in order.

-tracesnd

Log every write to port 0x03 (buzzer bit-bang). Each line shows the T-state timestamp and the new bit value, allowing exact frequency measurement.

-trace-win

Log every Winchester hard-disk controller command (RESTORE, SEEK, READ, WRITE) to stderr. Each line shows the drive number, cylinder, head, sector and LBA, allowing diagnosis of disk access patterns and CHS mapping issues.

-scrdump

After each frame, dump any changed alpha-plane rows to stderr as ASCII text. If only the inverse attribute changes, emit a companion [scri rXX] mask line where ^ marks cells whose alpha byte has bit 7 set. Useful for capturing screen output in headless / CI runs without a screen.

-dump-ram <path>

At emulator exit, write the full 64 KB address space to a binary file. Also triggered at any time by Ctrl+D in the terminal or the SIGUSR1 signal (see §6), which writes a timestamped dump without stopping the emulator.


4.7 Miscellaneous

-help

Print the short option summary to stderr and exit.


5. Keyboard Controls

The host keyboard maps to audited Smaky 6 matrix positions. Ordinary keys are resolved through the S471 table in src/keyboard.c, then exposed through the strict CLA / SYS.SY path. This is now a host-scancode-position model, not a host text-input passthrough.

  • A..Z, 0..9, Space: resolved by host position through the audited S471 table.
  • Backspace: Smaky BS (0x08).
  • Tab: Smaky TAB (0x09).
  • Enter / Return: Smaky CR (0x0D).
  • F1..F7: Smaky function-key bits CURSOR / COPY / KILL / PROGRA / SHOW / SEARCH / CHANGE.
  • Arrow keys: host aliases for the documented CURSOR+r/d/f/c combinations (Up/Left/Right/Down).
  • F9: DEFINE (0x1F) via the current strict matrix map.
  • F11 / Pause: BREAK, top-right key; fires NMI and drops into SAMOS monitor.
  • Shift+F11 / Shift+Pause: SHIFT+BREAK, hard reset and reboot from DX0:.
  • Escape: ESC / UNDO, top-left key, current working code 0x06.
  • End: current audited ordinary-key position 30 (0x04 normal, 0x05 shifted).
  • Ctrl+D in the terminal: dump 64 KB RAM to file, same as SIGUSR1.

Older convenience aliases such as F8, Insert, Home, Left Alt, Left Ctrl, Left Windows / Super, AltGr, and Delete should no longer be treated as current documented bindings unless they are reintroduced in code.

Hardware note: the full S471 keyboard ROM dump is now available. The emulator matches the confirmed special-key outputs it exposes directly, including Escape -> 0x06, Backspace -> 0x08, Tab -> 0x09, Return -> 0x0D, and Space -> 0x20. Ordinary printable keys now follow the current audited host scancode position map into the S471 normal / Shift / Caps layers. This is a strict CLA-centric baseline, but it does not yet expose every original Smaky physical position or a separate accented-text compatibility path.

Runtime note: overlapping printable key presses are queued and promoted one by one, so fast typing now reaches the CLI through the visible input path instead of stopping after the first printable key.

Function-key note: F1..F7 are program keys, not CLI text-entry keys. They do not echo characters at the prompt; they are consumed by software that reads the Smaky function-key state.

Function-key status bar: The bottom strip of the emulator window shows 7 clickable buttons — one per Smaky function key (CURSOR, COPY, KILL, PROGRA, SHOW, SEARCH, CHANGE). Left-click and hold to activate a function key; release to deactivate. Right-click toggles a persistent latch: the button stays active (rendered in yellow) until right-clicked again, enabling single-handed modifier+key combinations.

Disk / RESET status bar: The middle strip shows floppy and Winchester drive activity LEDs. At the right end are two buttons:

  • BREAK — left-click fires an NMI (same as F11 / Pause)
  • RESET — requires two clicks: first click arms the button (it blinks orange for 3 seconds); second click confirms the hard reset. Clicking anywhere else cancels the armed state.

6. Runtime Signals

  • SIGINT: clean shutdown, same as closing the window.
  • SIGTERM: clean shutdown.
  • SIGUSR1: dump 64 KB RAM to smaky6_ram_NNNN_pcXXXX.bin without stopping.

The emulator prints its PID at startup:

[main] PID 12345 — send SIGUSR1 to dump RAM

Example:

kill -USR1 12345

7. Boot Sequence

Power-on / RESET
    │
    ▼
Phantom ROM (roms/samos_sys17.rom, 2 KB at 0x0000–0x07FF)
    │
    ├─ Display "ROM de chargement rev 1-7"
    ├─ Wait for boot key:
    │     Enter / Space        → boot from DX0: (floppy)
    │     SHIFT+BREAK          → boot from DX0: (hard reset path)
    │     BREAK                → PDP-11 paper-tape loader (USART)
    │     FUNCTION+BREAK       → RAM test
    │
    ▼
Phantom ROM loads SYS.SY from DX0: via NMI-driven floppy streaming
    │   (sectors read through port 0x1B, NMI on sector holes at 80 Hz)
    │
    ▼
OUT (01h), A=00h  →  MOVROM: Phantom ROM disabled, RAM at 0x0000
LDIR: copy SYSMON from SYS.SY to 0x0000–0x07FF
    │
    ▼
JP 0x0105  →  SAMOS OS init
    │
    ▼
Load CLI.SY  →  "SAMOS rev 2-8 / DX0: / >" prompt

Automatic boot: The FOUND latch on the keyboard controller powers up asserted on real hardware. The emulator replicates this: the Phantom ROM boot menu receives an Enter key on the very first CLA read and immediately proceeds to boot from DX0. No flag is needed for a normal floppy or Winchester boot.

With -harddisk: Mount the Winchester image as DX0 and the floppy (if any) as DX1 using -floppy2. The Phantom ROM boots from DX0 (the Winchester) automatically.

./smemu6 -harddisk ../harddisks/SM6WIN0.DSK -floppy2 ../floppies/Sys1-H.dsk

8. Disk Image Formats

Floppy images (.dsk)

Raw flat binary: track 0 sector 0 first, 256 bytes per sector, 16 sectors per track.

  • 163,840 bytes: 40 tracks × 16 × 256, standard single-sided 5.25".
  • 315,392 bytes: 77 tracks × 16 × 256, extended 77-track drives.

Track count is auto-detected from image size.

Hard-disk images (.DSK)

Raw flat binary indexed by LBA. Sector size: 256 bytes.

LBA = cylinder × 192 + head × 32 + sector_within_track

The supplied harddisks/SM6WIN0.DSK and SM6WIN1.DSK images are 16 MB each. Only the first ~1054 sectors (~270 KB) contain non-zero data in the known disk images.


9. ROM Extraction

If you have the original PDF documentation with hex listings:

pdftotext -layout Smaky6-doc.pdf /tmp/smaky6.txt

# Extract Phantom ROM (SYS17, 2 KB)
python3 ../smaky6-tools/smaky6_rom_extract.py /tmp/smaky6.txt \
    --start 0 --end 7777 \
    --output roms/samos_sys17.rom \
    --report sysmon_report.txt

The character generator ROM (roms/chargen.rom) is a standard 2716 EPROM image (2048 bytes, 16 bytes per glyph, 128 glyphs). If the file is missing, the emulator falls back to a built-in synthetic table that covers the printable ASCII range.


10. Documentation

Additional guides are available in the docs/ folder:


License

Emulator source code copyright © 2024–2026 Marcel Prisi — released under the GNU General Public License v3 (see LICENSE).

Acknowledgements

The Smaky 6 was designed by Jean-Daniel Nicoud and his team at EPFL (Lausanne, Switzerland) and commercialized by Epsitec SA. The ROM content has been made freely available by Epsitec SA for anyone to use.

Third-party libraries

About

Emulator for the Smaky 6, a 1978 Swiss Z80-based personal computer (EPFL / Epsitec)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages