krpalmer: Imagination sold and serviced here: Infocom (infocom)
[personal profile] krpalmer
Poking back through a “retro image processor” on my iPad, I discovered its “ASCII-plus art” section included the TRS-80 Model 100’s character set. With one of those early portable computers having long been in my family (if not ready to my hands right now), I was a bit pleased to find its characters among those of PCs and PETs. In those less standardized days when just seven bits of an 8-bit computer’s address space were defined as ASCII characters, the Model 100’s upper range included not just accented letters and block graphics but tiny icons such as phones, planes, alien landers, and race cars.

For all of the thoroughly “lo-fi” charms of ASCII art, though, I did know the Model 100 was a bit more versatile than the Commodore PET or even TRS-80 Model I (which let you think you were switching large rectangular “pixels” on and off from BASIC, but had a character set with block graphics that could reproduce any such arrangement). The big square pixels (with thin lines visible separating the LCD cells) that made up its characters could also be controlled with point and line commands. With that in mind, I looked up its screen resolution and set up a new “custom system.”

Although limited to a proto-widescreen format of 240 pixels across by a mere 64 pixels high, the first image I made was just recognizable and interesting enough to start a thought rolling through my head: “Could I get this on an actual Model 100 screen... or at least an ‘emulated’ one?” I contemplated the antique RLE format I’d played around with earlier this year, remembering it had preceded GIF on the online service CompuServe and how a Model 100 “Learner’s Manual” in my family had plugged dialling in there. The Applesoft BASIC program I’d typed in from a scanned magazine that could turn the ASCII characters in an RLE file back into pixels also came to mind. Thinking of the wall I’d have had to climb to convert that listing into a working TRS-80 Color Computer program before just happening to find a faster machine-language utility near the very bottom of my disk images (and discovering later on the old CompuServe terminal program in an online archive could load RLE images offline), though, left me wondering what challenges I might face with the Model 100’s BASIC. For a little while I wondered about some Python image-manipulation programs I’d fiddled with and whether I could sort them out well enough to write a program of my own that would count alternating black and white pixels and encode that count into ASCII, but output in separated chunks small enough to be swallowed without choking by an old input statement.

As I wondered about “reinventing the wheel,” though, I did recall seeing “printer output formatters” in BASIC for files from the computer’s text editor and thought I could chase one of them down through my scanned computer magazines. There were no instructions to “keep your paragraphs short,” and at last I recognized a command to read in a file of arbitrary size one character at a time, similar to the command the Applesoft program used. I’d installed some time before a modern command-line package that, by “piping” modules together, could make RLE files, so I was all set up there. Starting up the “Virtual T” emulator, I got to work with small programs just to clarify points in my mind before at last jumping in at the deep end and starting to draw lines.

The Model 100’s screen wasn’t quite as wide horizontally as the Color Computer’s (apparently the “lowest common denominator” of the time setting the RLE standard), so I would have to cut off each line early but still keep tracking the pixels cut off to keep everything lined up. That took a fair bit of thinking and a fair bit of outputting from Virtual T’s “print to file” option; it’s not that easy to keep track of a program when you can only see eight lines of it on your computer’s screen. At last, though, things seemed to settle down. I took a commemorative screen shot, then wondered if I’d really got the logic right to the point of it working with a different file. More thinking later, I had things reworked. This time, I typed the listing in with BBEdit to be able to go back and set line numbers in retrospect. Importing that file, though, revealed I’d managed to leave dollar signs out where they should have been and include a dollar sign where it shouldn’t have. More editing got things back into shape with the emulated computer’s on-screen menu almost full of examples, drafts, and working files (although its 32K of memory had done better with RLE files, which seemed to prioritize utter simplicity of format over data compression, than I’d first worried about).

As ever when it comes to old computers for me, the pointlessness of it all might have been the point; actually having programmed in Python might have been better than tangling lines of BASIC (where, as ever, the GOTO command is “considered harmful”). I’m at least daydreaming about a super-deluxe version that will draw a thumbnail of a full RLE image and invite you to say just what line you want to start plotting a third of it from, but for the moment I do want to make a post up. In composing that post in BBEdit, I’m also a little bit aware of how cramped I find the Model 100’s screen, regardless of whoever might still extol how it switches on in a second, runs for hours and hours on AA batteries, and has a fuller-travel keyboard than a lot of desktop keyboards these days.

rle100

10 REM RLE Image Displayer
20 DEFINT A-Z
30 C=-1
40 FILES
50 INPUT"Open which file";N$
60 OPEN N$ FOR INPUT AS 1
70 A$=INPUT$(1,1)
80 IF A$<>CHR$(27) THEN 70
90 A$=INPUT$(1,1):IF A$<>"G" THEN 80
100 A$=INPUT$(1,1):IF A$<>"H" THEN 80
110 CLS
200 A$=INPUT$(1,1):A=ASC(A$)-32
210 IF A<0 THEN 700
220 IF A=0 THEN 600
230 D=X+A
240 IF D<=239 THEN 400
250 IF X>=240 THEN 300
260 LINE(X,Y)-(239,Y),ABS(C)
300 IF D<=255 THEN 500
310 X=0:D=D-256:Y=Y+1
320 IF Y=64 THEN 700
400 LINE(X,Y)-(D,Y),ABS(C)
500 X=D
600 C=NOT C
610 GOTO 200
700 CLOSE 1
710 A$=INKEY$:IF A$="" THEN 710
720 END

June 2025

S M T W T F S
1234567
8910111213 14
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 29th, 2025 05:26 am
Powered by Dreamwidth Studios