DOS 콘솔에서 직접 보기 위한 네 가지 수정. 1. 컬러. Open Watcom의 conio.h에는 textattr()이 없고(cprintf/cputs/getch만 제공) 이 FreeDOS 콘솔은 ANSI 이스케이프도 해석하지 않는다. 그래서 cprintf가 줄을 배치하게 두고 -- 스크롤을 알아서 처리한다 -- 방금 쓴 셀의 VGA 속성 바이트만 다시 칠한다. 커서가 그 줄 다음 행의 0열에 있다는 점을 이용해 스크롤을 직접 추적하지 않고 대상 셀을 찾는다. 줄바꿈된 긴 줄도 처리한다. 2. GET, HASH, LIST, READ, WRITE, QUIT, 미지원 명령을 로깅한다. 이전에는 EXEC과 PUT만 보였다. PING은 wait-ready가 초당 두 번 폴링하므로 제외한다. LIST는 잘림 여부를, PUT은 short write를 구분해 남긴다. 3. put_path가 채워지기만 하고 쓰이지 않아 PUT 완료 줄에 경로가 없었다. 완료 경로가 둘(길이 0, 본문 수신 완료)이라 put_finished()로 합쳤다. 4. 틱->초 변환이 1.1% 빨랐다. BIOS 틱은 18.2065Hz이므로 delta/18이 아니라 delta*549/100 (하루치 틱에도 32비트를 넘지 않는다) 을 쓴다. REBUILD.BAT을 추가한다. BUILD.BAT은 현재 디렉터리에서 wmake만 실행하는데 호스트가 exec으로 부를 때의 시작 디렉터리가 거기가 아니다. QEMU FreeDOS에서 Open Watcom C++16으로 빌드하고(no warnings, -we 활성) 콘솔 스크린샷으로 색상, 줄바꿈 색칠, 명령별 로그를 확인했다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PQm6oAvWX4Lp3iSN5AHGT
Development tools
Host support
Automation currently supports Windows 10/11 only. It requires uv, QEMU
with WHPX support, and ffmpeg.exe on PATH. The Python implementation uses
portable APIs where possible, but other hosts are not supported yet.
Getting started
uv run ferro-vm start
uv run ferro-vm status
The command list lives in the CLI itself, not in this file:
uv run ferro-vm --help
uv run ferro-vm <command> --help
Working rules, verification gates, and DOS build traps are in AGENTS.md.
How it fits together
TCPAGENT.EXE runs inside FreeDOS and dials out to 127.0.0.1:5558; its wire
protocol is documented in tcpagent/README.md. The ferro-vm daemon owns that
connection and the QEMU monitor. Local commands reach the daemon over the
Windows named pipe \\.\pipe\ferrolang-vm — there is no controller or observer
TCP port.
The daemon writes an append-only structured log (uv run ferro-vm logs, which
uses lnav when installed and otherwise falls back to PowerShell Get-Content -Wait). It records command metadata, DOS output, exit status, transfers, and
agent lifecycle events as UTF-8 lines, and deliberately never logs raw binary
payloads or protocol hex.
reset quits QEMU cleanly, restarts it, waits for FreeDOS to boot, submits the
default boot-menu Enter, and requires a TCPAGENT PING/PONG before returning.
QEMU system_reset is intentionally unsupported: repeated soft resets leave the
FreeDOS NE2000 packet driver stuck during initialization.
Standalone OCR
tools/qemu_ocr.py remains available for OCRing an existing image:
uv run python tools/qemu_ocr.py --image .qemu/qemu-screen.png