← Sat, Oct 3 digest

More like SC-Forth-thousand, am I right?

read article ↗ hn thread ↗

A developer ports CamelForth-80 to a homemade Sega SG-1000 clone for a retrocomputing challenge, detailing assembler adjustments and custom VDP scrolling.

read it A delightful, hands-on build log detailing the nitty-gritty of porting an 8-bit Forth interpreter and writing custom VDP scrolling routines.

summary

The author documents porting CamelForth-80 to a custom Sega SG-1000 clone called the Soggy-1000 for a retrocomputing challenge. They cover adapting the source code from the legacy Z80MR assembler to zasm, implementing text output and direct VDP video RAM scrolling for the TMS9918 chip, and handling edge cases like newlines and backspaces. The post highlights the practical hurdles of bootstrapping an interactive programming environment on limited 8-bit hardware.

key points

  1. Ported CamelForth-80 to run on a custom Z80-based Sega SG-1000 clone using zasm instead of the legacy Z80MR assembler.
  2. Implemented scrolling directly in the TMS9918 video chip's 16KB VRAM to preserve the system's scarce 1KB of work RAM.
  3. Optimized newline calculation using a bitwise AND operation since the text display width of 32 columns is a power of two.

who should read it

Retrocomputing enthusiasts, assembly programmers, and developers interested in low-level systems programming.

discussion positive

best comment by boomlinde ↗

Fun read. I look forward to seeing how they'll deal with bank switching.

Expresses enthusiasm for the piece and anticipates upcoming hardware bank-switching challenges.

Generated by an LLM from the article and thread. Check the sources before relying on it.