u/SixColorBleeder

Swift 99/a

Cross-posting from r/ti994a since the implementation might be of interest beyond the TI crowd. Just open-sourced Swift 99/a, a native macOS emulator for the Texas Instruments TI-99/4A (1981 home computer built around the 16-bit TMS9900).

Github: https://github.com/swryder/Swift-TI-99 (BSD-2)

What's interesting about it:

It's written from scratch in pure Swift — SwiftUI for the chrome, AppKit where it has to be, Metal for the visualizer, and zero third-party dependencies. Most emulators in this space are C/C++/Rust ports of Classic99 / Win994a / js99er. This one isn't a port — it's a fresh take, which means the bugs are mine and the architecture is whatever felt clean in Swift (chip-per-file, protocol-oriented peripherals on a common bus, no cross-cutting framework).

What's emulated:

  • TMS9900 CPU — full instruction set, workspace-pointer architecture, context switching, status-register lookup tables (65K-entry word table, 256-entry byte table) for the hot path
  • TMS9918A VDP — Graphics I/II, Text 40-col, Multicolor, Bitmap. 32 hardware sprites with collision detection. NTSC timing.
  • SN76489 PSG — three tone channels + noise, fractional clock accumulator for pitch accuracy across sample rates
  • TMS5220 speech synthesizer
  • TMS9901 I/O — full CRU bit-addressable interface
  • Disk DSR — V9T9 image format, full PAB protocol (open, close, read, **write**, delete, status, directory listing), FDR parsing
  • Cartridges — raw `.bin` / `.rom` plus the LZW-compressed `.ticart`container format. Banking: standard 8KB, GROM-only, 378 / inverted 379, MBX (fixed-low / banked-high / 1KB RAM)

Fun things:

  • **Live memory map visualizer.**A 256×256 GPU-rendered heatmap of the entire 64KB CPU address space, redrawn at 60Hz. Blue for reads, red for writes, purple for both, with white-hot decay tracking recent activity. Wall-clock-based exponential decay so the fade looks the same at 15fps and 60fps. Honestly the most fun part of the project — you can watch a BASIC program execute and see exactly which pages off memory it's hammering. Key for such a weird architecture machine
  • "Monitor Mode." A chromeless window with a TI-99/4 monitor bezel asset, transparent background, draggable from anywhere. Sits on the desktop like a CRT. Pure macOS-native (NSWindow + SwiftUI overlay).
  • Clipboard paste as keyboard events. Paste from macOS into the TI's keyboard buffer. Surprisingly useful for typing in BASIC programs.

Performance approach:

  • Two execution modes: real 3 MHz (DispatchSourceTimer-paced) and uncapped (tight async loop). On Apple Silicon the uncapped mode hits >100× real speed.
  • Per-byte peripheral routing tables instead of switch-on-address — avoids branch mispredictions in the memory access hot path
  • Read shadow mirror so most reads bypass the peripheral indirection entirely

What's not done:

PEB peripherals beyond disk + speech, save states, cassette (CS1/CS2), a couple of obscure cart banking schemes. Issues and PRs welcome.

Background:

The project was the working artifact behind a LinkedIn article I wrote about how complex projects scale in the AI era — full disclosure if you're curious about the AI-assisted angle: https://www.linkedin.com/pulse/complexity-conserved-how-do-big-things-ai-era-scott-ryder-zyybc/

Cartridges and disk images are BYO.

BSD2 Open Source - Have Fun

reddit.com
u/SixColorBleeder — 13 days ago

Swift99a

Cross-posting from r/ti994a since the implementation might be of interest beyond the TI crowd. Just open-sourced Swift 99/a, a native macOS emulator for the Texas Instruments TI-99/4A (1981 home computer built around the 16-bit TMS9900).

Github: https://github.com/swryder/Swift-TI-99 (BSD-2)

What's interesting about it:

It's written from scratch in pure Swift — SwiftUI for the chrome, AppKit where it has to be, Metal for the visualizer, and zero third-party dependencies. Most emulators in this space are C/C++/Rust ports of Classic99 / Win994a / js99er. This one isn't a port — it's a fresh take, which means the bugs are mine and the architecture is whatever felt clean in Swift (chip-per-file, protocol-oriented peripherals on a common bus, no cross-cutting framework).

What's emulated:

  • TMS9900 CPU — full instruction set, workspace-pointer architecture, context switching, status-register lookup tables (65K-entry word table, 256-entry byte table) for the hot path
  • TMS9918A VDP — Graphics I/II, Text 40-col, Multicolor, Bitmap. 32 hardware sprites with collision detection. NTSC timing.
  • SN76489 PSG — three tone channels + noise, fractional clock accumulator for pitch accuracy across sample rates
  • TMS5220 speech synthesizer
  • TMS9901 I/O — full CRU bit-addressable interface
  • Disk DSR — V9T9 image format, full PAB protocol (open, close, read, **write**, delete, status, directory listing), FDR parsing
  • Cartridges — raw `.bin` / `.rom` plus the LZW-compressed `.ticart`container format. Banking: standard 8KB, GROM-only, 378 / inverted 379, MBX (fixed-low / banked-high / 1KB RAM)

Fun things:

  • **Live memory map visualizer.**A 256×256 GPU-rendered heatmap of the entire 64KB CPU address space, redrawn at 60Hz. Blue for reads, red for writes, purple for both, with white-hot decay tracking recent activity. Wall-clock-based exponential decay so the fade looks the same at 15fps and 60fps. Honestly the most fun part of the project — you can watch a BASIC program execute and see exactly which pages off memory it's hammering. Key for such a weird architecture machine
  • "Monitor Mode." A chromeless window with a TI-99/4 monitor bezel asset, transparent background, draggable from anywhere. Sits on the desktop like a CRT. Pure macOS-native (NSWindow + SwiftUI overlay).
  • Clipboard paste as keyboard events. Paste from macOS into the TI's keyboard buffer. Surprisingly useful for typing in BASIC programs.

Performance approach:

  • Two execution modes: real 3 MHz (DispatchSourceTimer-paced) and uncapped (tight async loop). On Apple Silicon the uncapped mode hits >100× real speed.
  • Per-byte peripheral routing tables instead of switch-on-address — avoids branch mispredictions in the memory access hot path
  • Read shadow mirror so most reads bypass the peripheral indirection entirely

What's not done:

PEB peripherals beyond disk + speech, save states, cassette (CS1/CS2), a couple of obscure cart banking schemes. Issues and PRs welcome.

Background:

The project was the working artifact behind a LinkedIn article I wrote about how complex projects scale in the AI era — full disclosure if you're curious about the AI-assisted angle: https://www.linkedin.com/pulse/complexity-conserved-how-do-big-things-ai-era-scott-ryder-zyybc/

Cartridges and disk images are BYO.

BSD2 Open Source - Have Fun

reddit.com
u/SixColorBleeder — 13 days ago
▲ 40 r/ti994a

https://preview.redd.it/3ifi9g8g2myg1.png?width=512&format=png&auto=webp&s=501ce56162c54edf514cf9c7c4098162563fb4ce

A few of you saw the original announcement of Swift 99/a here. Quick update: it's now on GitHub under BSD-2, and the feature set has grown enough that I figured proper roundup was due.

GitHub: https://github.com/swryder/Swift-TI-99

It's a native macOS app — pure Swift / SwiftUI / AppKit / Metal, no third-party dependencies. macOS 14.6+. Everything below is implemented and working today; this isn't a roadmap.

Hardware

  • TMS9900 CPU — full instruction set, workspace-pointer architecture, context switching, status-register lookup tables for hot-path performance
  • TMS9918A VDP — Graphics I / Graphics II / Text 40-col / Multicolor Bitmap modes, 32 hardware sprites with collision detection, NTSC timing
  • SN76489 PSG — three tone channels + noise, fractional clock accumulator for accurate pitch (the v1.2 fix some of you asked about)
  • TMS5220 speech synthesizer, so Parsec talks
  • TMS9901 — full CRU bit-addressable I/O for keyboard, joystick, DSR

Cartridges

  • Raw `.bin` / `.rom` dumps with the standard `C/D/G` filename convention
  • TiCart (`.ticart`) — Win994a-compatible
  • Banking: standard 8KB, GROM-only, 378 / inverted 379, MBX

Disks (DSK1–DSK3)

  • V9T9 disk images (`.dsk`, `.tidisk`)
  • Full DSR with PAB protocol: open, close, **read**, **write**, delete, status, directory listing
  • Variable + fixed-length records, FDR parsing, cluster management
  • Saves stick. OPEN DSKn for directory listings works as of 1.3.

Niceties

  • Monitor Mode — chromeless TI-99/4 bezel that drags from anywhere, transparent background so it sits on the desktop
  • Clipboard paste— paste text from macOS straight into the TI as keyboard events
  • Joystick via arrow keys, plus FCTN+number keyboard menu (CLEAR, BEGIN,
  • PROC'D, AID, REDO, BACK, QUIT — the muscle memory ones)
  • Live memory heatmap — 256×256 GPU-rendered view of the entire 64KB address space. Blue = reads, red = writes, with white-hot decay. Useful for understanding what the machine is actually doing.
  • Real-time FPS / MHz overlays, 3 MHz authentic mode or uncapped (roughly as if original machine ran at ~60 MHz)

What's not in yet

PEB peripherals beyond disk and speech, save states, cassette (CS1/CS2), some obscure cart banking schemes. Issues / PRs welcome.

Why it exists

Companion to a LinkedIn article I wrote on how big projects scale in the AI era — the emulator was the working artifact: https://www.linkedin.com/pulse/complexity-conserved-how-do-big-things-ai-era-scott-ryder-zyybc/

ROMs and cartridge images are not bundled (bring your own — FinalGROM 99 and WHTech are the usual sources).

Curious what people break first.

reddit.com
u/SixColorBleeder — 13 days ago
▲ 51 r/ti994a

Hey everyone,

The state of TI-99 emulation on the Mac has long been pretty bad and I decided to do something about it. I've built a Swift native Mac OS optimized (Metal, Swift UI, etc) emulator for Mac OS 14+.

It supports speech, sound, and most of the graphics modes. It can load ROMs (Carts) from either the chip dumps in the way that Classic 99 can or from the Ti-Cart format that Win 99 uses.

This was really just a hobby project experimenting with some other approaches to development but it seems to work reasonably well.

If you have questions or feedback feel free to email me at my alias email and if I have some time I'll see what I can do.

Thanks.

Retro Monitor View

Window and Memory Visualizer

Download App: Swift99a

reddit.com
u/SixColorBleeder — 19 days ago