ShowDots

A program for the Sinclair ZX Spectrum Next to unhide the "." and ".." entries on SD cards

v1.1 (c) 2026 Jan Borchers, licensed under CC BY 4.0.

WARNING

*** Always back up your SD card before running this kind of software. ***

I've run this program on my own SD card dozens of times without any data loss, but obviously, you're using this at your own risk.

Purpose

On FAT-formatted media like SD cards, recent versions of macOS set the hidden attribute bit of the "." and ".." entries when creating a new directory. This non-standard behavior causes those entries to become invisible on other systems. In some cases, this breaks apps that rely on those entries, e.g., to let the user go back up to the parent directory.

I noticed the issue on my Sinclair ZX Spectrum Next. In its System Browser, you can press "S" to show these entries, but apps like the digital audio workstation NextDAW (demo is in the distro) won't let you navigate out of such directories anymore. If you have a single directory with this issue, you can run .chmod -h . .. inside that directory on your Next to fix it. But this quickly becomes tedious, especially when copying an entire new distro from your Mac to an SD card. Spectrum Next expert Mike Cadwallader explains this problem in an excellent YouTube video.

ShowDots solves this by scanning your entire SD card in the C:/ drive (by default) on your Next and setting any hidden "." and ".." entries in each directory back to visible. A fresh 24.11 distro SD created on a Mac with 248 directories that all need fixing takes about 10 seconds.

The program only reads your SD card except when it clears the hidden attribute bit of afflicted "." and ".." entries, so I consider it safe - you can read the code yourself. That said, nevertheless:

Always back up your SD card before running this kind of software.

Installation and Use

Download and unzip this archive on your computer:

zipShowDots_v1.1.zip

Copy ShowDots.bas and ShowDots.bin into the same directory anywhere on your Next's SD card, and run ShowDots.bas on your Next. It gives a running count of the directories verified and beeps when done. To stop the program early, hold BREAK (or CAPS SHIFT and SPACE). Directories fixed until then stay fixed.

You can edit the line LET root$ = "C:/" in ShowDots.bas to start the verification on a different drive or in a subdirectory like C:/home/ to save time—but always make it an ABSOLUTE path, always end it with a "/", and always use UPPERCASE drive letters! Note that I haven't been able to test other drives than C:/ because, like many, I'm currently still waiting for my KS3 Next with two SD card slots. :)

After running, ShowDots changes back to the directory you were in when you started it. The program runs at 28 MHz and leaves the machine at that speed.

ShowDots.bas.txt is just a readable text version of the BASIC source code.

How It Works

ShowDots.bas is a short Next BASIC program. It loads the machine code ShowDots.bin into memory at address 40000, notes which directory you are in, moves to the one you want scanned, and calls the machine code to start the scan.

ShowDots.bin does the actual work and is written in Z80 assembler for speed. It recursively walks the directory tree from the start directory you specified (C:/ by default) and clears the hidden bit only for "." and ".." entries that actually have it set. It calls the esxDOS API for file system access (F_GETCWD / F_OPENDIR / F_READDIR / F_CHDIR / F_CHMOD), and the 48K ROM for printing messages and beeping when done.

ShowDots.asm is the commented Z80 assembler source code (for sjasmplus) of ShowDots.bin. You do not need this file to run ShowDots; it is just there for you if you'd like to see what it does.

ShowDots.bas.txt is just a readable text version of ShowDots.bas

Version History

2026-08-21:  v1.1

  • Up to 3x speedup by porting the entire scan to assembler,
    only writing to directories that need fixing,
    and using the filesystem's directory filter API
  • BREAK cancels a run
  • Restores current working directory afterwards

2026-08-05:  v1.0

  • First public release