TRS-80 Model 4p movie streaming from floppies
youtube.com
youtube.com
The "P" in "Model 4P" stood for "portable" — it was a modified Model 4 that was shrunk down to something roughly the size of a sewing machine. It had a handle on the back. Tandy's advertisements proudly proclaimed that it fit in overhead bins on airplanes. I feel sorry for anyone who actually tried that.
As far as specs, the 4P had a 4 MHz Z-80, a minimum of 64 kB of RAM, one or two single-sided double-density (SSDD) 5.25" floppy drives, and an 80x24 text mode. There was an optional 640x200 monochrome graphics card, but it doesn't look like this demo is using that. (I'd bet it's using the graphics characters in the Model 4's 80x24 text mode — faster and less data to deal with.) If I'm remembering correctly, the SSDD disks held ~180 kB, so there's less than half a megabyte of data in play for this demo. I'm kind of amazed at the sound in this demo — I'd never heard the speaker in my 4P ever make any noises other than simple beeps.
Semi-related trivia: The "best" word processor for the Model 4, SuperSCRIPSIT, was laid out on its program disk in such a way that the drive head's stepper motor played something that almost sounded like a song when it was loading itself off of the disk. Even ~30 years later, I can still hear SuperSCRIPSIT's loading sound in my head...
The hires adapter card has pretty serious write bandwidth limitations though there are possibilities if you're willing to put up with severe screen hashing.
It is pretty surprising how good 31250 Hz 1 bit audio can sound. As long as you set your expectations reasonably. "Was recognizable and didn't make my ears bleed too much" is about right.
Then todays equivalent would be to hook up 5 external monitors, take the backing off, and running a movie through them to get 3d.
To clarify. Make the screens semi transparent, then look through all 5 from the front.
Track reads are a bit of a devil's bargain as certain data patterns cannot be written and other data patterns cannot be read. It still means more data though there is some possibility that conventional sectors with tight inter-sector gaps could do the job.
Which makes it all so sad having read that eulogy to Radio Shack here a few days ago.
It would mean starting over at a minimum. The program isn't very user friendly, either. So for goodness sake don't lose concentration in the middle of a movie.
Edit: s/loose/lose/ - my typo nemesis
Crazy thing is that it would have far more smarts than the computer playing the movie.
and now i wonder how hard it would be to build a monochrome display using Mindstorm.
The number of synchronized mindstorm bricks and motors needed would likely be a nightmare though.
The glitches you see are when a byte is dropped when reading a disk track. This causes the display to shift by a column and the interleaved audio data is displayed as graphics. And, conversely, one of the graphics columns is played as audio causing the screeching.
Some runs work better than others. The byte drops could be due to slight motor speed variance. Or just down to luck -- a few of the disk operations incur wait states as does writing to video memory. These times vary depending on exactly when they occur so it could just be down to luck. The code works in fixed 128 cycle steps with a few cycles reserved for wait state issues but apparently not enough to ensure correct operation.
And what about when the screen completely fills with garbage? I've no idea. Maybe the track didn't write correctly. Or maybe the drive misses a bit. Shifting the graphics and audio data stream by a bit would surely scramble the graphics. The audio should be mostly OK save for getting random noise every 8th bit.
I've done some other Model III demos. Here's a good starter page for them:
The Model 4p must have had a better disk controller and software than my Model 1. The Model 1 used a Western Digital 1771 controller that required a pause between writing a disk command and reading the status. A few NOPs would do, but early versions of TRSDOS missed the pause out, causing frequent crashes.
I never did movies on it, but in 1980 managed to get it to record a few seconds of recognisable speech using the I/O line in the cassette port. Filled the massive 48k memory in no time.
Doing some speech recording back in the day -- heady stuff! I've always wondered how Big Five (and other) TRS-80 games managed to get reasonable voice output considering they are 1 bit/sample at 5 KHz.
Takes me back, remembering how proud we were that our "baby" computers could speak. And now? Well, let's just say that I wish the "tab is producing audio" icon on Chrome tabs functioned as a mute button.
Thanks !
At the 112 x 48 resolution I used, dither with or without error diffusion lost most of the image. Well, it would have looked fine standing back 6 feet or two metres or so, but what's the point if it looks bad at normal viewing disance?
I experimented with edge detection and GIMP filters like Posterize and Cartoonify reasoning they would tend to bring out the rough shapes in the image. I ended up doing some of it with Posterize and most with Cartoonify. The result is acceptable enough, but I do think the "tunnel" effects could be made to look a lot closer to the original.
3d rendering on ascii terminal, if you can, build and run the source ( http://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html ), it's always pretty to see running.
I hacked the crap out of those machines; they taught me programming. Assembly language routines in string space, anyone? VARPTR FTW.
BTW: Love the choice of video. Very cool.
The floppy reading and and video/audio display are completely interleaved. The program works in 32 microsecond steps with 13.5 microseconds dedicated to reading the disk and 18.5 microseconds spent on graphics and audio update. These two conceptional threads communicate via a 32 KB ring buffer.
You can hear the disk seek a few times before the display starts as it builds up some buffer. I imagine a graphics display could be managed at a coarser level of interleaving at the expense of floppy bandwidth. Audio, however, needs constant servicing to work at all.