While browsing some scans of old, out-of-print books about the Amstrad NC100, I discovered that it has a built-in screenshot facility. I knew my various Psion devices could do this, but not the NC100.

The trick — press Control–Shift–S — was mentioned in Robin Nixon’s The Amstrad Advanced User Guide, published in 1993 by Sigma Press. The book contained BBC Basic and C utilities for converting the raw bitmap data generated by the keypress.
I immediately keyed in the C code to try it out. It did the job.
Typing in a listing! What an old-school feeling!
The snag is, the utilities create Windows Paintbrush PCX files. PCX is a format that’s all but useless these days. So I immediately wondered how the code might be tweaked to output something the graphics packages I use can actually read.
This led me to the BMP format. Why BMP? Firstly, lots of tools can read it, but crucially it’s a bitmap format rather than a compressed one so the sharp pixel edges would be retained. My first choice was PNG, but this is a format that mandates image compression (albeit lossless) and that I considered to be an unnecessarily complex addition for code that I wanted to be as simple and as dependency free as the original Nixon utility. And I’d never before delved into the structure of BMP files. So BMP was my choice.
Incidentally, I do know that I could use the PCX conversion utility as is and just convert the result again with the Image Magick command line tool, but where’s the fun in that?
Enter, then, notepad2bmp, a command line tool written in C with no dependencies beyond the standard library and which will take a native NC100 screenshot file and generated a fresh BMP from it. The first version, 0.1.0, performed a straightforward translation. It was based on the first, Windows 3-oriented, incarnation of the BMP spec., which seemed appropriate given the age of the software generating the source screenshots.
But then I got thinking, and given that the whole point is conversion of a proprietary format into a more open, more accessible one, perhaps the code needs to generate files in the most up-to-date version of the BMP spec.

Additionally, I realised that what I always do with a transferred screenshot is scale it up to a more friendly size, so the conversion tool could do that for me too. I upscale greyscale and simple colour bitmap screenshots using the nearest neighbour algorithm so that the hard pixel edges are retained and the scaled image isn’t blurred with interpolated colour. It’s a process that takes a pixel matrix and generates the new, interpolated pixel colours by ‘growing’ each original pixel in every direction: one pixel becomes four in a 2x scale, one becomes nine in a 3x scale and so forth.
The original NC100 images use one bit per pixel colouring, so every byte holds eight pixels’ worth of data. I converted each bit to a byte value, and then used the larger pixel map as the basis for the upscaled 3x version. The source 480×64 image jumps to 1440×192. BMP files store horizontal and vertical print resolution information too, so I treated that 3x jump as an increase of the base images 72 dots per inch resolution (long the Mac standard) to 216dpi. Just in case, I added a switch to disable upscaling for anyone who wants the converted screenshot at the native resolution.

Wikipedia has a great introduction to the BMP format, and Microsoft’s site helped with some further pointers too. The current notepad2bmp code uses the BMP version 5 header spec. The files generated open nicely in macOS’ Preview and my photo editing app of choice, Pixelmator Pro.
As I say, the code is pure C so it should be compilable on any platform that supports the language and has a shell to run the compiled binary, including Linux and Windows though these have not been tested. It makes a handy accompaniment to notepad2text, my upgraded version of a 1990s original app for converting NC100 word processor files to plain text.
You can find the source code for both tools in my GitHub repo.
And finally, if you tweak the code, you can get a suitably LCD-esque colour scheme:

