pastfetch/README.md
randogoth 19991bee2a init
2026-08-31 16:01:14 +03:00

9.3 KiB

                       .    ,__          .           _     
 \,___,   ___    ____ _/_   /  `   ___  _/_     ___  /     
 |    \  /   `  (      |    |__  .'   `  |    .'   ` |,---.
 |    | |    |  `--.   |    |    |----'  |    |      |'   `
 |`---' `.__/| \___.'  \__/ |    `.___,  \__/  `._.' /    |
 \                          /                              

In the tradition of the widely popular fastfetch or neofetch tools on Linux, pastfetch is a DOS utility that prints a compact block of information about the running system along with a fancy logo.

It is designed for real DOS distributions, FreeDOS, SvarDOS, and popular emulators (DOSBox, DOSBox-X/Staging, DOSEMU, etc.).

ANSI logos are embedded; an ASCII fallback is used when ANSI output is unavailable.

A selection of gorgeous ANSI Logos for a variety of DOS flavors has been specifically designed for and contributed to the project by JONINSCII.

Requirements

To see the logos in all their glory you need to have an ANSI driver installed in CONFIG.SYS. A free NANSI.SYS driver is shipped with this repository.

Features

  • DOS flavour detection using ver, environment markers, OEM hints, and DR-DOS signature checks (DR-DOS/Novell DOS/SvarDOS/DOSBox variants/Dosemu/Dosbian/PC DOS/MS-DOS/FreeDOS/etc.)
  • True DOS version and flags via INT 21h/3306h (ROM/HMA bits noted)
  • Active shell derived from COMSPEC
  • Basic machine identity from INT 15h/C0h (OpenWatcom builds) or a generic label
  • CPU class (8086/8088 vs. 286 vs. 386+)
  • Conventional and extended memory sizes via BIOS interrupts
  • Drive C: total and free space (INT 21h/36h)
  • Current text mode dimensions and adapter description, VESA presence flag, plus a palette sample read via INT 10h/1015h
  • CONFIG.SYS DEVICE/DEVICEHIGH/INSTALL entries (summarised) and ANSI driver detection
  • 16-colour swatches when ANSI output is active

Screenshots

MS-DOS 6.22
MS-DOS 6.22
MS-DOS 6.22 - /noansi
MS-DOS 6.22 — /noansi
FreeDOS 1.4
FreeDOS 1.4
Caldera DR-DOS 7.03
Caldera DR-DOS 7.03
Novell DOS 7
Novell DOS 7
IBM PC DOS 7.0
IBM PC DOS 7.0
DOSBox 0.74-3
DOSBox 0.74-3
DOSBox-X 2026.05.02
DOSBox-X 2026.05.02
DOSBox Staging 0.82.2
DOSBox Staging 0.82.2
86-DOS logo
86-DOS logo
Concurrent DOS logo
Concurrent DOS logo
Dosbian logo
Dosbian logo
IBM DOS J5.0/V
IBM DOS J5.0/V
IBM DOS J5.0/V - /noansi
IBM DOS J5.0/V — /noansi

Background

At first, I planned to contribute to Leah Neukirchen's quite rudimentary DOSfetch, but with no Pascal coding experience the task felt a bit too daunting. I briefly looked into porting it to QBASIC before eventually settling on the much more approachable OpenWatcom C.

What had started as a 'simple and fun weekend project' of a nostalgic xennial dweeb quickly turned into an endless rabbit hole of digging through archive.org to find ancient DOS installation floppy images, investigating the forgotten realms of interrupts, and diving into source code of MS-DOS and the DR-DOS kernel.

I came out with the realization that from today's perspective even with a seemingly 'simple' operating system, all the different DOS flavors and variants have their own weird quirks and unique characteristics that made it more difficult to realize this project than anticipated. Eventually I got it to work on several different popular DOS emulators with different DOS 'distros' and on bare-metal DOS installations on my trusty old ThinkPad X220.

This work would have massively exceeded its scope without the assistance of ChatGPT Codex digging through 1980s source code and help debug and refine my sloppy C code.

After months of putting the project off because I was so worn down by spending days wrestling with weird memory hiccups and rendering glitches I was pretty close to giving up on the whole thing. What kept me going were JONINSCII's steady motivational nudges and the patient detective work of Claude Opus, which eventually managed to iron out the quirks.

Logos

Built-in ANSI logos for:

  • 86_dos
  • concurrentdos
  • dos
  • dosbian
  • dosbox
  • dosbox_staging
  • dosbox_x
  • dr_dos
  • freedos
  • ms_dos
  • novell_dos
  • pc_dos.

Usage

Copy pf.exe onto your DOS system or emulator and run:

pf [options]

Options:

  • /? show the inline help
  • /list or --list show the built-in logo names and exit
  • /logo NAME or --logo NAME force a particular logo (see /list)
  • /nologo disable ANSI art while keeping the info table
  • /noansi or --noansi force ASCII-only output (also skips colour blocks)
  • /r or --prompt-fix emit an extra ANSI reset/newline for shells that keep colours in the prompt
  • /safe use the normal CRT cleanup/exit path (default is fast exit)

Building

The Makefile targets DOS MZ executables:

make            # builds build/pf.exe using OpenWatcom wcl by default
make clean      # removes build/ and any leftover .obj files
  • Use make CC=owcc if you prefer the OpenWatcom owcc front-end (source owsetenv.sh/owsetenv.bat first).
  • make djgpp builds with i586-pc-msdosdjgpp-gcc (DJGPP cross toolchain).
  • Override CC, CFLAGS, and LDFLAGS for other DOS-targeting compilers that provide int86/intdos equivalents.
  • Source formatting is described by .clang-format; run clang-format -i src/*.c include/*.h before sending a patch.

Devbox

If you use devbox for the build env, here are some handy scripts:

devbox run build     # build/pf.exe via OpenWatcom wcl
devbox run clean     # removes build/ and dist/
devbox run rebuild   # clean + build
devbox run logos     # regenerate src/logos_data.inc from logos/*.ans
devbox run dist      # dist/pastfetch.zip release bundle (pf.exe + NANSI.SYS + docs)

src/logos_data.inc is generated and must not be hand-edited: change the art in logos/ and re-run devbox run logos, which drives tools/generate_logos_data.py.

Testing

Thus far I was only able to test pastfetch in the following configurations:

DOS Flavor Emulated Bare Metal
Caldera DR-DOS 7.03 untested
FreeDOS 1.4 untested
IBM PC DOS 7.0 🪲 no return to prompt
IBM DOS J5.0/V logo ANSI block shown as japanese characters untested
MS-DOS 6.22
DOSBox 0.74-3 emulator only
DOSBox Staging 0.82.2 emulator only
DOSBox-X 2026.05.02 emulator only
Novell DOS 7 untested
SvarDOS 20250427

Known Bugs

  • IBM PC-DOS sometimes does not return to the C:\> shell. Unresolved, and not reproducible in any of my emulated environments, but present on a bare metal installation.

Contribution

  • I am eagerly looking for contributors to test pastfetch on different hardware with different DOS distros.
  • Also folks who know a bit more about DOS and 16 bit computing and have more experience that would help make this a more solid piece of software.
  • If you have more feature ideas and know your way around C a bit, give it a shot

License