tag:blogger.com,1999:blog-54354617051422572332024-03-05T07:10:06.636-05:00World of VAXThe adventures in big computing, from antiques to new machines, electronics, and whatever else I feel like yammering on about.vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-5435461705142257233.post-40594147363200644052019-04-22T16:04:00.001-04:002019-04-22T16:04:34.870-04:00TeleVideo Systems Part VII - Almmmost replacement for MmmOST<h2>
<span style="font-family: Trebuchet MS, sans-serif;">Almmmost CP/M file server</span></h2>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Functions</span></h3>
<span style="font-family: "Trebuchet MS", sans-serif;">Almmmost is meant to be a general replacement for the TeleVideo MmmOST server software, which ran on Z80-based CP/M systems, and served data to up to 16 clients on a star-based network. It’s designed to work on more modern hardware and uses a still-available Z85C30 serial controller chip to interface with the TeleVideo client systems.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The main functions I was looking to provide were:</span><br />
<br />
<ul>
<li><span style="font-family: Trebuchet MS, sans-serif;">Communications with the original hardware over an 800K baud RS-422 SDLC link</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Compatibility with the original client OS</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Server software that runs on hardware that’s easy to acquire, develop on, and provides a robust TCP/IP stack (and with a CPU fast enough to do TLS/SSL connections to modern systems)</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Ability to boot the clients off of the RS-422 link</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Private and Shared drive functionality to provide per-client storage, and the ability to share files between clients easily</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Remote floppy drive access, replaced with images, to facilitate moving data into the system</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Multiple client support off of one server</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Support for standard MmmOST interfaces through RS-422 and the MULTI.SYS shared file</span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;">Additional support for special files, like MULTI.SYS, which provide access to dynamic data or the ability to access resources through the server’s TCP/IP connection</span></li>
</ul>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Not included yet, but things I’d like to add which MmmOST supported include Print queueing, file/record locking support, and communication using mailboxes/FIFOs between clients on the same server. Printing and communication should be easy to add, but locking support will require a re-design of some of the server software.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;">Design</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The system is built around a Next Thing Co. CHIP ARM board. It was chosen because it’s cheap and easily available (though, it is discontinued). It should be adaptable to another Linux-based ARM board with enough GPIOs and a PWM available without too much effort. It was designed to be modular, to make it easy to add/subtract client ports as desired.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The software is all written in C, with one shell script to set up the PWM for an 800K baud rate. It consists of a kernel module and a single-threaded server application that uses the kernel driver to talk to clients and can interpret/process requests from clients. Adding locking support will require moving to either a multi-threaded or state-machine model to track both client interactions and lock availability.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Hardware design</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The hardware was gone through two revisions. The first revision was a “quick and dirty” design, to glue a 5V logic Z85C30 and the RS-422 buffers to a 3.3V set of GPIOs. It only supported a maximum of two clients (one per port on the Z85C30) but was sufficient to figure out how to interface with the clients and understand the protocol.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg179wrbADxFNiCb96GlclgL-vZanyUMrbm9u0U0IROTnxTKSBCA5dWMCu3fyuEHV4CateEhBpKwCAI2992dUp-Yh_7udaXck3haSreQoqlg6X0SQp8zVvVrXHe2OZCslCsp4AhBwjf7t0/s1600/DSC05206.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1064" data-original-width="1600" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg179wrbADxFNiCb96GlclgL-vZanyUMrbm9u0U0IROTnxTKSBCA5dWMCu3fyuEHV4CateEhBpKwCAI2992dUp-Yh_7udaXck3haSreQoqlg6X0SQp8zVvVrXHe2OZCslCsp4AhBwjf7t0/s320/DSC05206.JPG" width="320" /></a></div>
<div style="text-align: center;">
<b style="font-family: "Trebuchet MS", sans-serif; font-size: small;">picture of hardware rev 1</b></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<span style="font-family: Trebuchet MS, sans-serif;">The hardware was re-designed to use two boards, one which plugs into the ARM board’s GPIO headers, and it does 3.3V to 5V level conversion, generates the chip select lines (allowing for multiple Z85C30 chip connections), and generates the 6MHz “system” clock that is used internally by the Z85C30s.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghb7HFztxnDlVNjSgjML7hcypBzQWuD8Bz_3mxkkxsTsjA0rb5O3zPXXeyygxNKPDPBIbPctvmPRtrzTVUvHSyF8SNhzGdTam_HprNoWp10oarNdz6schnqMu_vzomRw5TKHo-krWrI5k/s1600/IMG_20190303_215239.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghb7HFztxnDlVNjSgjML7hcypBzQWuD8Bz_3mxkkxsTsjA0rb5O3zPXXeyygxNKPDPBIbPctvmPRtrzTVUvHSyF8SNhzGdTam_HprNoWp10oarNdz6schnqMu_vzomRw5TKHo-krWrI5k/s320/IMG_20190303_215239.jpg" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: x-small;"><b>picture of hardware rev 2</b></span></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<span style="font-family: Trebuchet MS, sans-serif;">The second board handles I/O to the clients and is connected using a simple bus over a common 34-pin ribbon cable connector, allowing multiple boards to be connected easily. The bus carries the 8 data bits, a set of chip selects to allow for multiple client-I/O boards, the 6MHz system & 800KHz Tx clock, control lines for the Z85C30s, and 5V power to the boards.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The I/O board contains a Z85C30 serial interface chip, 26LS31/32 RS-422 drivers, and a dip switch to select the board ID (which connects that chip select line to the Z85C30).</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS", sans-serif;">I used Eagle to design the boards and used Advanced Circuits and Seeed Studio to manufacture the boards. I was impressed with the quality of board I could get from Seeed Studio - including fast DHL shipping I spent about $30 total to get 10 of each board. I also got a lot better with surface mount soldering through the process. I’ve found that I actually prefer surface mount parts to through-hole parts because they’re much easier and faster to solder as long as you have decent tools.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The board designs are linked at the end of this article in the GitHub repository.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">First Gen software</span></h3>
<br />
<span style="font-family: Trebuchet MS, sans-serif;">My first attempt at software, I ended up trying to just use the GPIOs in userland software, and ioremap’d them into the process’s I/O space. I was able to use this for some initial debugging and testing, but I quickly ran into a problem that Linux will steal enough time from the process to underrun or overrun the 1-byte buffer on the Z85C30. Dropping the baud rate to 666KHz helped quite a bit, but I still had occasional corrupted packets.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">This taught me a few things about how the basic I/O routines worked. Operating SDLC on the Z85C30 was a bit different than the code on the Z80-SIO and needed me to select the correct CRC initial vector. I was able to use the onboard Baud Rate Generator on the Z85C30, but in the end, decided that it wasn’t flexible enough, and it was easier to just generate the needed baud rate on the system PWM.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">I also discovered that the routines on the TeleVideo systems transmitted the bytes in reverse order, and discarded the checksum bytes (though, they did verify that the checksum was received correctly).</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Kernel Driver</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">After giving up on userland code to do this, I wrote a kernel driver (tvi_sdlc). It still took some effort to make this fast enough to not underflow buffers. I ended up having to turn off interrupts and preemption while transferring a packet two/from the Z85C30. Fortunately, the longest packet size was 128 bytes, so the delay doesn’t cause too many problems with the system. I also discovered that I/O to the GPIO pin memory locations (I think this really only applies to writes, but it’s possible that reads are also affected) have quite a few wait states, which limit you to about 1-2M GPIO changes per second.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">With that knowledge, I cut out as many I/Os as I could, trying to do single reads/writes to change as many pins at once as possible. This is what let me turn the baud rate back up to 800K without dropping any characters when reading/writing a port.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Overall, the driver is a fairly simple character driver, which implements IOCTL’s to change and check the state of various registers in the chip, and direct I/O to read/write packets as SDLC frames. The application opens the device file once per I/O port it uses, and the kernel and application use that to track which port to talk to.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Application</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The application is a C based program with multiple modules. The main module (almmmost.c) reads a config file, initializes general parameters, and asks the other modules to initialize themselves. It starts the main loop that waits for clients to make requests. Once it receives a request, it determines where the request should be handed off to, and dispatches it to the correct modules. The software uses a round-robin to check for requests to attempt to prevent one client from starving other clients from having requests serviced.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Once the request is received and dispatched, that request is followed through until completion. This won’t work as written to allow for locking (as any blocking request will prevent the lock from being released), but it allowed for most of the code to be easily implemented.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The interface to the kernel module is written in almmmost_device.c. It handles config file parsing for device configuration, resetting ports, checking the port for a request (if CTS is received), and reading/writing packets. The config file parser looks at the config file section that configures how many I/O ports should be used, and which number in the program attaches to which physical port.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The OS loading module (almmmost_osload.c) handles sending the bootloader and OS image to the client system. It’s called when the server receives a request packet with ‘L’ in the second byte and sends back the appropriate data for the system that made the request. The module uses the config file to point at raw OS images and gives parameters that can be modified on a real MmmOST system by GENPARAM. This data structure provides the location in RAM of the system console buffer, the print spool drive, the MmmOST “general” revision, a bitfield indicating which drives are public drives and the number of shared disks that it handles. It then passes control to the share disk image handling module to further modify the images.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The Shared Disk Image module (almmmost_image.c) handles requests from the client to access individual 128-byte CP/M records on disks shared by the server. This is primarily used by Private drives (which aren’t shared between clients), and Public Only drives (which don’t support shared files), but also is used for Public drives to read the disk directory by things like DIR. It uses parameters supplied by the config file to build up the CP/M Drive Parameter Headers and Drive Parameter Blocks for the disk images.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The Shared File module (almmmost_file.c) handles requests to the shared (Public) drives. It implements a CP/M file system so that the disk is still image-compatible with CP/M. Most functions line up with BDOS functions and handle things like opening/closing files, reading/writing files, and modifying the file’s FCB to update the current file location. It tries to return sensible errors for various conditions, and prevent multiple clients from opening the same file to write to at the same time. This module hands off file access to the Special file module for any files that the module will handle.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The Special File module handles files like MULTI.SYS, which don’t represent data stored on the disk image, but perform some other function. MULTI.SYS is implemented to access the system time, with other functions not yet implemented. The module implements a simple character generator (CHARGEN.SYS), files to move data to the host filesystem directly (FILEIN.SYS and FILEOUT.SYS), a file to directly access URLs via libcurl on the host (URLGET.SYS), and two functions that use libcurl and a web service running elsewhere to convert HTML to text (LYNXGET.SYS) and to convert images to a format that can be displayed on the TS-803 and TPC-I (IMGGET.SYS). These both use CGI scripts that are in the cgi source directory.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">The Miscellaneous module (almmmost_misc.c) handles requests that didn’t fit in elsewhere. These include print spool functions, responding to client requests for information, and the LOGON command that changes the current Private drive.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Finally, the Command line module (almmmost_cmdline.c) provides a command line for debugging and changing things on the server while it’s running, by presenting a command line when you press ctrl-C. This lets you do things like print a list of open files, display generated disk parameters, change out disk images while the server is running, and sync disk image data/shut down the server safely.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Z80 software</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Several programs were written in Z80 assembly to work with the special files.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">FILEOUT copies a file to B:FILEOUT.SYS. This was needed because PIP tries to copy to a temporary file, and then rename it, which doesn’t work correctly with special files.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">IMAGEGET uses IMGGET.SYS to retrieve and display an image at an entered URL onto the screen on a TS-803 or TPC-I.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUr0wpw0dLm4GbuEnde4xevGTlkuqq6KQHX1D0G2wclsISD7K0uPEgBAyEorwKwnRGgH-jEOGeWT9ppMIP2SvpTybj2dufxpkqPkb8jwdM2YYq7PEDSdOGq2GGoIzUTwbms5Y7SHxnt14/s1600/DSD02014.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1068" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUr0wpw0dLm4GbuEnde4xevGTlkuqq6KQHX1D0G2wclsISD7K0uPEgBAyEorwKwnRGgH-jEOGeWT9ppMIP2SvpTybj2dufxpkqPkb8jwdM2YYq7PEDSdOGq2GGoIzUTwbms5Y7SHxnt14/s320/DSD02014.JPG" width="213" /></a></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: x-small;"><b>Logo displayed on a TS-803, and moon picture on a TPC-I</b></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">LYNXGET uses LYNXGET.SYS to retrieve and display a web page on the system console.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">URLDISP and URLGET use URLGET.SYS get a file from a URL and display it to the console, or save it to disk, unprocessed.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmQe0e8rQaBickW9qjiNNFOtCJxig2yEUXLrdevvPkOZQehEdqQtxMGJrfS3LMVFMu5cmHRL1mnfxmqXv_qzJurL0UOJmiF-Ba1jdyAv7ewUwfQ__63cG0zdm1jvuwZwW4Z5VNL5a8JEY/s1600/ORG_DSD02009.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmQe0e8rQaBickW9qjiNNFOtCJxig2yEUXLrdevvPkOZQehEdqQtxMGJrfS3LMVFMu5cmHRL1mnfxmqXv_qzJurL0UOJmiF-Ba1jdyAv7ewUwfQ__63cG0zdm1jvuwZwW4Z5VNL5a8JEY/s320/ORG_DSD02009.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: x-small;"><b>URLDISP displaying HTML</b></span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Several other programs there were written at test programs to figure out how to display graphics on the systems.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Limitations</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">There are still some bugs in the software. It’s all single threaded, and locking will require some amount of re-writing the code to make it work. I don’t have a real MmmOST system to compare this against, but all my test so far have produced results which at least seem reasonable to me.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Future work</span></h3>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Locking and print spool handling are the next two things that should be worked on. Mailboxes/FIFOs to communicate between clients would also be nice.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">One thing I noticed while working on this is that the OS images are rather large. On the TS-803 and TPC-I, there is only about 75-80% of the system memory left for running application programs. It’d be nice to re-write the OS to make it more efficient. I’m not yet sure how compatible it would be, but something like TurboDOS compatibility would be nice, as it seems like a faster/better alternative to CP/M, which supported similar features to MmmOST.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<h3>
<span style="font-family: Trebuchet MS, sans-serif;">Downloads</span></h3>
<div>
<span style="font-family: Trebuchet MS, sans-serif;">Everything can be downloaded from my <a href="https://github.com/vax11/almmmost" target="_blank">GitHub repository</a>. </span></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com2tag:blogger.com,1999:blog-5435461705142257233.post-71566016086662010882019-04-11T18:36:00.000-04:002019-04-11T18:52:31.594-04:00TeleVideo Systems Part VI - MmmOST Protocols<style>
.tproto {border-collapse: collapse; border: 1px solid gray; padding: 2px; font-family: "trebuchet ms", sans-serif; }
.tproto tr:nth-child(even) { background-color: #073707; }
.tproto th { width: 1*; background-color: #272727; }
</style>
<br />
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">TeleVideo Systems MmmOST Protocol</span></h2>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Methods</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Reverse engineering required quite a bit of patience, and some trial-and-error. I was able to start out with schematics, a copy of MmmOST in an ImageDisk image, and along the way found a copy of the TeleVideo client source code archived online.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">I still don't have access to a working Service Processor, so I haven't been able to verify that the behavior matches the original hardware, but I have been able to re-implement most of it so that the client software seems to run correctly. I'll have a set of blog articles about that in the future, but some of the hardware that I produced for that was necessary for verifying how the protocol worked.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">If you haven't read the first article with an overview of what MmmOST is and how it works, it'd be best to read through that first.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Hardware information</span></h3>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The systems use a Zilog Z80A SIO/2 (Z8442) chip in SDLC (aka HDLC) synchronous serial mode, with an 800KHz transmit clock derived from the 4MHz CPU clock. This is (per specs) the fastest data rate that can be used in this mode on the SIO chip. The system transmits over an RS-422 channel (using +/- 5V drivers into a 100ohm impedance), sending a Transmit Data (TxD), Transmit Clock (TxC), and Request to Send (RTS) signal. It receives from the other end a Receive Data (RxD), Receive Clock (RxC), and Clear to Send (CTS) signal. These are generated from the matching signals on the other end.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br /></div>
<div align="center">
<table class="tproto"><caption>RS-422 Client connection</caption>
<tbody>
<tr>
<th class="tproto">1</th><th class="tproto">2</th><th class="tproto">3</th><th class="tproto">4</th><th class="tproto">5</th><th class="tproto">6</th><th class="tproto">7</th><th class="tproto">8</th>
</tr>
<tr>
<td class="tproto">GND</td><td class="tproto">TxD+</td><td class="tproto">RxD+</td><td class="tproto">RTS+</td><td class="tproto">CTS+</td><td class="tproto">TxC-</td><td class="tproto">RxC-</td><td class="tproto">GND</td>
</tr>
<tr>
<td class="tproto"></td><td class="tproto">TxD-</td><td class="tproto">RxD-</td><td class="tproto">RTS-</td><td class="tproto">CTS-</td><td class="tproto">TxC+</td><td class="tproto">RxC+</td><td class="tproto">Test</td>
</tr>
<tr>
<th class="tproto"></th><th class="tproto">9</th><th class="tproto">10</th><th class="tproto">11</th><th class="tproto">12</th><th class="tproto">13</th><th class="tproto">14</th><th class="tproto">15</th>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The basic handshaking of the protocol goes like this (client and server can be reversed depending on data direction):</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<ol>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Client raises RTS</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Server acknowledges and sends CTS to client</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Client sends data using SDLC encoding to the global address, with standard SDLC CRC-16 checksum at the end</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Client and server drop RTS/CTS</span></li>
</ol>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">There are delays that are needed between 2 and 3, and after 4, to ensure that the other end is ready to receive data, and has cleared any junk out of receive buffers, and to ensure that both ends have dropped RTS after the request. These were mostly determined by trial and error.</span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Boot loader dump</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The bootloader provided the first look at what data is sent. Requests are sent from the client to the server as a 10-byte SDLC frame, generally with the first byte (called SOR, or Start of Request) set to 01h. The bootloader received by the firmware in EPROM as one 128-byte record, which assuming the CRC is checked out as good by the SIO chip, is then executed. The particular machine design determines where this is loaded into RAM, but generally, it's loaded near the lowest address which is always RAM, regardless of the state of the EPROM enable latch / RAM bank switch. On early machines, this is address 4000h, and on later machines, it's a bit above C000h.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">I was able to find a copy of the boot loader in a MmmOST install floppy image, as an Intel HEX formatted file named XPD?BOOT.HEX - where the "?" varies based on machine type.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">The system sends out a message, including the following:</span><br />
<br />
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Command - IPL is ASCII 'L' or 4Ch</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">USER - the hardware type -- 0 for the 801/802/800A, and other values for later machines</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">CBOOT - set to 1 since it's a cold boot; this is set to 0 if CP/M is doing a warm boot</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">RECS - the number of records that are expected for the OS image; +/- a few records will be accepted as well</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">SREC - start record number; I haven't seen this set to anything but 0</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Signature bytes - when loading the OS image, these are always 0's</span></li>
</ul>
</div>
<div align="center">
<table class="tproto"><caption>IPL request from bootloader for OS</caption>
<tbody>
<tr>
<th class="tproto"></th><th class="tproto">SOR</th><th class="tproto">IPL</th><th class="tproto">USER</th><th class="tproto">CBOOT</th><th class="tproto">RECS</th><th class="tproto">SREC</th><th class="tproto">6</th><th class="tproto">7</th><th class="tproto">8</th><th class="tproto">9</th>
</tr>
<tr>
<th class="tproto">801</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">00h</td><td class="tproto">01h</td><td class="tproto">58h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td>
</tr>
<tr>
<th class="tproto">802H</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">01h</td><td class="tproto">01h</td><td class="tproto">68h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td>
</tr>
<tr>
<th class="tproto">803</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">04h</td><td class="tproto">01h</td><td class="tproto">6Eh</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td>
</tr>
<tr>
<th class="tproto">803H</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">05h</td><td class="tproto">01h</td><td class="tproto">6Eh</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td>
</tr>
<tr>
<th class="tproto">TPC-I</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">07h</td><td class="tproto">01h</td><td class="tproto">6Eh</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td><td class="tproto">00h</td>
</tr>
</tbody></table>
</div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Hardware capture</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">To get more data, I had built hardware using an ARM board (the Next Thing Co CHIP) with GPIOs interfacing to a Z85C30 serial chip. Initially, I ran this at a 666KHz clock to avoid dropping characters, but I was able to bump it up to 800KHz with some hardware and software redesign. Any speed lower than 666KHz (which was picked as it was a divider of the clock for the Z85C30) resulted in the client system timing out.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">Using this, I was able to capture that request that the EPROM was sending out for the boot loader. It was the same 10-byte format which was used by the bootloader. One thing that I ended up having to sort out, is that the request for the boot loader was very similar to the request for the whole OS. The only consistent difference was that the signature bytes at the end of the request were 4,5,6,7 in the request from the EPROM (which only would process one 128-byte record) versus all zeros in the request from the bootloader, which was actually asking for the whole OS image. The boot loader also is not a part of the OS image, so keying off of these signature bytes was critical to select what data to send to the client.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">The format is the same as the above request for the OS from the boot loader.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
</div>
<div align="center">
<table class="tproto"><caption>EPROM Bootloader IPL request</caption>
<tbody>
<tr>
<th class="tproto"></th><th class="tproto">SOR</th><th class="tproto">IPL</th><th class="tproto">USER</th><th class="tproto">CBOOT</th><th class="tproto">RECS</th><th class="tproto">SREC</th><th class="tproto">4</th><th class="tproto">5</th><th class="tproto">6</th><th class="tproto">7</th>
</tr>
<tr>
<th class="tproto">801</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">00h</td><td class="tproto">01h</td><td class="tproto">37h</td><td class="tproto">00h</td><td class="tproto">04h</td><td class="tproto">05h</td><td class="tproto">06h</td><td class="tproto">07h</td>
</tr>
<tr>
<th class="tproto">803</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">04h</td><td class="tproto">01h</td><td class="tproto">FFh</td><td class="tproto">00h</td><td class="tproto">04h</td><td class="tproto">05h</td><td class="tproto">06h</td><td class="tproto">07h</td>
</tr>
<tr>
<th class="tproto">803H</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">05h</td><td class="tproto">01h</td><td class="tproto">FFh</td><td class="tproto">00h</td><td class="tproto">04h</td><td class="tproto">05h</td><td class="tproto">06h</td><td class="tproto">07h</td>
</tr>
<tr>
<th class="tproto">TPC-I</th><td class="tproto">01h</td><td class="tproto">4Ch</td><td class="tproto">07h</td><td class="tproto">01h</td><td class="tproto">FFh</td><td class="tproto">00h</td><td class="tproto">04h</td><td class="tproto">05h</td><td class="tproto">06h</td><td class="tproto">07h</td>
</tr>
</tbody></table>
</div>
<div>
<br /></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">CBIOS Source Code </span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The next thing I was able to look at was a copy of the CP/M CBIOS source code, in 8080 and Z80 assembly code (the mix of the two is a pain to read - I've also discovered that Zilog Z80 mnemonics seem to make more sense and are more readable than the Intel 8080 ones). TeleVideo actually distributed this code with machines at the time, and some of it has been preserved on Bitsavers. The source code which I was looking at covered the TS-803 and TPC-I (which have very similar hardware) and could generate either the standalone CP/M or "USER" version for the service processor to send to clients.</span>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">Service processor requests</span></h4>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">There are a few functions that send a request to the service processor for some non-disk related action. I call these "Checks", as they use ASCII 'C' as their function code in the request</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">During boot and afterward there are a few requests sent:</span></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Get print spool drive</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Start a new print spool (print the old one)</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Get Processor ID (service processor port number) number and if autologin command should be run</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Get MmmOST "GENREV" version</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Directory hijack request (locking for asking to read a Public drive directory section)</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Each of these is sent with a 128-byte additional record, which is unused for these requests. The client expects a 4-byte reply, which contains the response for the request/command.</span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div align="center">
<table class="tproto"><caption>MmmOST Check Request</caption>
<tbody>
<tr>
<th class="tproto">SOR</th><th class="tproto">REQ</th><th class="tproto">DRV</th><th class="tproto">SUBREQ</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th>
</tr>
<tr>
<td class="tproto">01h</td><td class="tproto">43h</td><td class="tproto">x</td><td class="tproto">y</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td>
</tr>
</tbody></table>
<br />
<table class="tproto"><caption>MmmOST Print Spool Request (end spool)</caption>
<tbody>
<tr>
<th class="tproto">SOR</th><th class="tproto">REQ</th><th class="tproto">DRV</th><th class="tproto">SUBREQ</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th><th class="tproto">X</th>
</tr>
<tr>
<td class="tproto">01h</td><td class="tproto">4Eh</td><td class="tproto">01h</td><td class="tproto">52h</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">Disk direct read/write requests</span></h4>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">There are two functions, used to read/write individual 128-byte CP/M records on the disk. The blocks may be bigger than this, but the service processor handles blocking/deblocking the data to/from disk. These are primarily used on Private and Public-only disks. On Public disks (with MmmOST managing shared files), applications can only read the directory blocks and are not allowed to write blocks directly.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Reading:</span></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">10-byte IPC request to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">4-byte IPC response to the client</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">If no error was returned, 128-byte record to the client</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Writing:</span></div>
</div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">10-byte IPC request to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">128-byte record to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">4-byte IPC response to the client</span></li>
</ul>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The request looks like this:</span></div>
<div align="center">
<table class="tproto"><caption>Read/Write CP/M disk record</caption>
<tbody>
<tr>
<th class="tproto">SOR</th><th class="tproto">REQ</th><th class="tproto">DISK</th><th class="tproto">TK8</th><th class="tproto">RECL</th><th class="tproto">RECH</th><th class="tproto">TK16L</th><th class="tproto">TK16H</th><th class="tproto">WRTYPE</th><th class="tproto">SEL</th>
</tr>
<tr>
<td class="tproto">01h</td><td class="tproto">'R'/'W'</td><td class="tproto">0-11</td><td class="tproto">X</td><td class="tproto">RL</td><td class="tproto">RH</td><td class="tproto">TL</td><td class="tproto">TH</td><td class="tproto">WT</td><td class="tproto">0/1</td>
</tr>
</tbody></table>
<br /></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">The Disk is 0-11, corresponding to A through N</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">TK8 is an 8-bit value for the track number on the disk</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">RECH/RECL are two halves of the 16-bit value for the 128-byte record number of the track being accessed</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">TK16H/TK16L are two halves of the 16-bit value for the disk track (aka cylinder) being accessed</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">WRTYPE tells the service processor what kind of write to do - Async write for a data record (0), Sync write for a directory record (1), or (2) if it's the first write to the block, and the service processor doesn't need to preserve the data in the block's other records.</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">SEL is 0 or 1, depending on if the disk has been selected previously</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Note that blocks are typically bigger than records, which are fixed at 128 bytes. Generally, blocks are a few KB in size - TeleVideo uses 2KB for floppies and 4KB for hard disks.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The response looks like this:</span></div>
<div align="center">
<table class="tproto"><caption>Read/Write CP/M disk record response</caption>
<tbody>
<tr>
<th class="tproto">RET</th><th class="tproto">X</th><th class="tproto">ERRNO</th><th class="tproto">PRNT</th>
</tr>
<tr>
<td class="tproto">0-FFh</td><td class="tproto">0</td><td class="tproto">x</td><td class="tproto">y</td>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Retcode is the CP/M 2.2 compatible return code, that would be returned in the A register for the CP/M function call. 0 indicates no error, and 1 indicates an irrecoverable error</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">X appears to be unused</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">ERRNO is the error code returned to the caller, usually one from the following table</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">PRNT is set to 1 to print the error returned</span></li>
</ul>
<div align="center">
<table class="tproto"><caption>Read/Write CP/M error response codes</caption>
<tbody>
<tr>
<th class="tproto">Error condition</th><th class="tproto">Value</th>
</tr>
<tr>
<td class="tproto">Error selecting drive</td><td class="tproto">0</td>
</tr>
<tr>
<td class="tproto">Error reading drive</td><td class="tproto">1</td>
</tr>
<tr>
<td class="tproto">Error writing drive</td><td class="tproto">2</td>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">BDOS function handling</span></h4>
</div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The CP/M functions that work with files (using File Control Blocks, or FCBs) are intercepted for shared "Public" drives. Note that Public-only drives are different, and do not support shared file handling and locking, and Private drives can only be used by one user station at once, so those are both handled directly by the user station's CBIOS as a sort of remote block store.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">The functions that are intercepted include:</span><br />
</div><div align=center>
<table class="tproto"><caption>Intercepted CP/M BDOS function calls</caption>
<tbody>
<tr>
<th class="tproto">Number</th><th class="tproto">Function call</th>
</tr>
<tr>
<td class="tproto">15</td><td class="tproto">Open File</td>
</tr>
<tr>
<td class="tproto">16</td><td class="tproto">Close File</td>
</tr>
<tr>
<td class="tproto">17</td><td class="tproto">Search for first match</td>
</tr>
<tr>
<td class="tproto">19</td><td class="tproto">Delete file</td>
</tr>
<tr>
<td class="tproto">20</td><td class="tproto">Read file, sequential</td>
</tr>
<tr>
<td class="tproto">21</td><td class="tproto">Write file, sequential</td>
</tr>
<tr>
<td class="tproto">22</td><td class="tproto">Make (create) new file</td>
</tr>
<tr>
<td class="tproto">23</td><td class="tproto">Rename file</td>
</tr>
<tr>
<td class="tproto">30</td><td class="tproto">Set file attributes</td>
</tr>
<tr>
<td class="tproto">33</td><td class="tproto">Read file, Random</td>
</tr>
<tr>
<td class="tproto">34</td><td class="tproto">Write file, Random</td>
</tr>
<tr>
<td class="tproto">35</td><td class="tproto">Compute file size</td>
</tr>
<tr>
<td class="tproto">36</td><td class="tproto">Set random record from seq. position</td>
</tr>
<tr>
<td class="tproto">40</td><td class="tproto">Write random, zero fill block</td>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">All BDOS functions that are intercepted for handling by MmmOST on the Public drive send a request IPC and FCB, and receive an IPC response and modified FCB back from the service processor. Depending on the function (and if there was an error), they will also send or receive a 128-byte record with the actual data in it as well. This is only used for the 5 functions that read or write to a file.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The sequence looks like this:</span></div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">10 byte IPC request to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">36 byte FCB to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">For Write/Write random/Write Zero fill, send 128-byte data record to the server</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">4 byte IPC response to the client</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">36 byte modified FCB to the client</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">If Read/Read random, and if there was no read error, send 128-byte data record to the client</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The BDOS IPC request looks like this:</span></div>
</div>
<div align="center">
<table class="tproto"><caption>CP/M BDOS intercepted function request</caption>
<tbody>
<tr>
<th class="tproto">SOR</th><th class="tproto">REQ</th><th class="tproto">LOGDRV</th><th class="tproto">FUNC</th><th class="tproto">USER</th><th class="tproto">FNUML</th><th class="tproto">FNUMH</th><th class="tproto">CBD</th><th class="tproto">CBF</th><th class="tproto">X</th>
</tr>
<tr>
<td class="tproto">1</td><td class="tproto">46h</td><td class="tproto">0-11</td><td class="tproto">x</td><td class="tproto">x</td><td class="tproto">fl</td><td class="tproto">fh</td><td class="tproto">x</td><td class="tproto">x</td><td class="tproto">x</td>
</tr>
</tbody></table>
<br /></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">REQ is ASCII 'F' for a file request</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">LOGDRV is the currently logged on drive on CP/M</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">FUNC is the CP/M BDOS function call number</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">FNUMH/FNUML are 8-bit parts of the 16-bit file number used by MmmOST to keep track of the file</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">CBD is the "default" drive for file requests</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">CBF is "Current BDOS Function", which is probably the same as FUNC</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The response looks like this:</span></div>
<div align="center">
<table class="tproto"><caption>CP/M BDOS intercepted function response</caption>
<tbody>
<tr>
<th class="tproto">FNUML</th><th class="tproto">FNUMH</th><th class="tproto">RETCODE</th><th class="tproto">ERR</th>
</tr>
<tr>
<td class="tproto">FL</td><td class="tproto">FH</td><td class="tproto">0-FFh</td><td class="tproto">0-FFh</td>
</tr>
</tbody></table>
</div>
<div>
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif;">FNUMH/FNUML are the MmmOST file number</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">RETCODE is the return code returned to the caller, typically 0xFF on error</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">ERR is the error code which CP/M can use to determine the fault</span></li>
</ul>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">ERR is divided up into 3 fields. Bit 7 is set to 1 to print an extra second line of error, used for BIOS returned messages. Bits 6-4 are used for errors from the BIOS (problems reading/writing). Bits 3-0 are used for error from the data passed to the BDOS function. The list of error codes are:</span></div>
</div>
<div align="center">
<table class="tproto"><caption>MmmOST Error Codes</caption>
<tbody>
<tr>
<th class="tproto">Value</th><th class="tproto">Error</th>
</tr>
<tr>
<td class="tproto">0</td><td class="tproto">OK</td>
</tr>
<tr>
<td class="tproto">1</td><td class="tproto">Command fault</td>
</tr>
<tr>
<td class="tproto">2</td><td class="tproto">Write Protect</td>
</tr>
<tr>
<td class="tproto">3</td><td class="tproto">Illegal Call</td>
</tr>
<tr>
<td class="tproto">4</td><td class="tproto">Bad File for request</td>
</tr>
<tr>
<td class="tproto">5</td><td class="tproto">Drive type bad for request</td>
</tr>
<tr>
<td class="tproto">6</td><td class="tproto">Transfer out error</td>
</tr>
<tr>
<td class="tproto">7</td><td class="tproto">Transfer in error</td>
</tr>
<tr>
<td class="tproto">8</td><td class="tproto">Genrev does not match</td>
</tr>
<tr>
<td class="tproto">9</td><td class="tproto">No space on drive</td>
</tr>
<tr>
<td class="tproto">90h</td><td class="tproto">Bad sector</td>
</tr>
<tr>
<td class="tproto">98h</td><td class="tproto">Read only</td>
</tr>
<tr>
<td class="tproto">C0h</td><td class="tproto">Drive selection error</td>
</tr>
</tbody></table>
</div>
</div>
<div>
<br /></div>
</div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Other programs</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">LOGON.COM is the most useful other program. It send a request to the server to switch your private directory to a different password-protected (or back to the default) directory.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">The request follows the same 10-byte / 128-byte / 4-byte sequence from "Check" requests earlier. One major difference is that the SOR byte is 00h instead of 01h. The 128-byte data field contains the password as the first 8 bytes (and the remainder should be ignored). The 4 byte response will have the first byte as 0 if the request was successful.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">The Logon request looks like this, with DRV set to the CP/M drive number to attempt to log-on with the password:</span><br />
</div><div align=center>
<table class="tproto"><caption>MmmOST LOGON.COM Request</caption>
<tbody>
<tr>
<th class="tproto">SOR</th><th class="tproto">REQ</th><th class="tproto">DRV</th><th class="tproto">SUBREQ</th><th class="tproto">x</th><th class="tproto">x</th><th class="tproto">x</th><th class="tproto">x</th><th class="tproto">x</th><th class="tproto">x</th>
</tr>
<tr>
<td class="tproto">00h</td><td class="tproto">43h</td><td class="tproto">x</td><td class="tproto">4Ch</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td><td class="tproto">0</td>
</tr>
</tbody></table>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Timing concerns</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Testing this on TS-801s and TS-803s, they both use somewhat different time outs and have different timing requirements. I have observed that a 45uS sleep after requests are serviced before checking for CTS, a 1-5ms sleep before sending each boot loader block, and a 100uS sleep before sending data back to the client in the file handler was optimal to avoid times or sending data before the client was ready for it.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">In other words, timing race conditions seem to be something that needs to be carefully handled in working with these systems. The Z80 code mostly uses busy loops as delays or for timeouts, which are very clock speed sensitive.</span></div>
<div>
<br /></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Future work needed</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">There's more MmmOST software that needs to be reverse engineered, including print queue handling.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">It'd be nice to also look at TurboDOS as another example of how this was done by a different CP/M compatible OS.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">Also, I'd like to work on modifying SimH to simulate TeleVideo systems. The RS-422 connection could be emulated with a network (or local) socket between two copies of the simulator.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">A future blog will document my creation of a replacement for MmmOST, which runs on modern hardware.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">References</span></h3>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><a href="http://bitsavers.org/bits/" target="_blank">Bitsavers's "bits" collection</a> has the TeleVideo source code and some disk images. Dave Dunfield's <a href="http://www.classiccmp.org/dunfield/" target="_blank">collection of images</a> has Imagedisk images for MmmOST on a TS-806, along with the software needed to read them. Online CP/M manuals such as <a href="http://www.gaby.de/cpm/manuals/archive/cpm22htm/" target="_blank">this one</a> have been very important in understanding how CP/M works. Datasheets for Zilog parts such as the <a href="http://www.z80.info/zip/um0081.pdf" target="_blank">Z80 SIO and other peripherals</a> are valuable for understanding the code, along with the schematics in the TeleVideo service <a href="http://www.bitsavers.org/pdf/televideo/" target="_blank">manuals on Bitsavers</a>.</span></div>
<div>
<br /></div>
<div>
<br /></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-636378961132249622019-04-10T16:15:00.000-04:002019-04-11T18:38:53.893-04:00TeleVideo Systems Part V - MmmOST Introduction<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">TeleVideo Systems MmmOST Operating System</span></h2>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">MmmOST, or "Multi-user, multi-tasking, multi-processor Operating System Technology" was a network operating system that TeleVideo developed and released along with their CP/M based computers starting in 1981. The system was based around a central server running CP/M 2.2 and the MmmOST software, and connected to multiple client TeleVideo computer systems.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">This differed from MP/M which was offered from Digital Research, because MP/M functioned as a multi-user operating system on one computer with multiple serial dumb terminals, allowing for time-sharing of a single CPU. MmmOST ran applications software on single-user computers, one for each person, and did resource sharing to allow multiple people access to the same data, while not constraining CPU and memory resources to a single computer.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4wV0R5vOkSYpvknXsAEXryX18K73jxo4TWU9X0qZWE1TDx1Wv-3H4_HUP6iDRTeqvorso-UQskDAESeA3XOHbI9564QEelg8IU1jdA1Nd9nA8xmT_ilbMjb1piNIj6oe6saR6DItaeAw/s1600/DSD01477.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4wV0R5vOkSYpvknXsAEXryX18K73jxo4TWU9X0qZWE1TDx1Wv-3H4_HUP6iDRTeqvorso-UQskDAESeA3XOHbI9564QEelg8IU1jdA1Nd9nA8xmT_ilbMjb1piNIj6oe6saR6DItaeAw/s320/DSD01477.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;"><b>TeleVideo TS-816 Service Processor</b></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Hardware features</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">MmmOST ran on either a TS-806 or TS-816 (aka "System II" and "System III"), which supported up to 6 or 16 users. These systems were called "Service Processors". The 806 included 64KB of RAM, a 5.25" floppy drive for system maintenance and back-ups, a 10MB or 20MB ST-506 interface 5.25" full-height hard drive (with expansion to a 2nd external drive), and 6 ports to connect clients, or "User stations" to. The TS-816 included 128KB of RAM, a tape drive replacing the 806's floppy drive, a 20 or 40MB ST-1000 interface 8" hard drive with an optional external expansion drive, and 8 or 16 User station ports. Both systems included serial and parallel ports for shared printers and a console terminal. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The system connected the server to the clients in a "star" network configuration, similar to how twisted-pair ethernet is connected to a network switch. Each user station was connected back to the service processor over a 15-pin 100-ohm shielded twisted pair cable of up to 300 ft. For shorter (up to 10 ft) runs, ribbon cables were usable as well. The connection between the two used SDLC over an RS-422 link at 800K baud, which could transfer data at up to 80-100K Bytes/sec. To make cabling simpler, the TX/RX pins were flipped between the service processor's and user stations' connectors, allowing for simple straight-through cables.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOcNfNbU_JmwschjOGxnBebPDaqdw4pNY9ABf42yyJXqkB3i-3YoGX9we8ciQPiFbTP4CMFyhsLFZVj2r43KnS_Urd-Itjf2vByKPY1392Q8mkvZEqj0C5GoUABVQvJ_44ikpCudvJBeM/s1600/ts816-layout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="809" data-original-width="686" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOcNfNbU_JmwschjOGxnBebPDaqdw4pNY9ABf42yyJXqkB3i-3YoGX9we8ciQPiFbTP4CMFyhsLFZVj2r43KnS_Urd-Itjf2vByKPY1392Q8mkvZEqj0C5GoUABVQvJ_44ikpCudvJBeM/s320/ts816-layout.png" width="271" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;"><b>Example system layout from TS-816/40 manual</b></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Software features</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">MmmOST provided a few basic features to clients - clients could boot off of the RS-422 connection back to the host (MmmOST required this to keep track of the state of each client and ensure that the client OS was properly configured for the system), and the server provided printer sharing/queueing and disk/file sharing to the clients.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">Booting</span></h4>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Booting was integrated into the EPROM on the user stations, such that flipping one jumper (jumper 5 on all of the Z-80 based systems) would switch between booting off of a local disk or downloading the boot loader and OS from the RS-422 link. Every time that a program would exit on CP/M on the user station - or when the system was reset - it would re-download the OS from the service processor. The service processor would reset its internal state, releasing any resources that the user had exclusive access to.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">Printer sharing</span></h4>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The system maintained print spools for each user station and controlled access to printers. Users could request exclusive access to printers, or queue up print jobs without having to wait for access to the printer to continue. This kept different users print jobs from mixing (such as when one person wanted to print payroll checks, and another print out a sales report, the sales report wouldn't get printed on the expensive check stock).</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">User stations all allowed either a serial or parallel printer to be attached locally as well so that local printers or modems could be used instead of the shared printer.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h4>
<span style="font-family: "trebuchet ms" , sans-serif;">Disk and File sharing</span></h4>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">MmmOST shared hard disk space on the server out to individual user stations. Between this and the remote booting, the clients could be operated without any local storage at all. Two systems, the TS-800A and TS-800R (based off of the TS-802 and TS-803), were full computers that shipped without any local storage options at all, and could only be run connected to a service processor.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">On other systems where local storage was available (such as the TS-801, 802(H), 803(H), TPC-I, 1603, etc), the local floppy and/or hard drives were still available to the user, with names starting at N - typically M/N for the two floppy drives, and O/P for hard drives. Note that CP/M 2.2 limited drive sizes to 8MB (2^16 x 128-byte records), so larger drives had to be partitioned into no bigger than 8MB chunks.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">On the server, there were typically at least two hard drive partitions available to clients. One, which showed up as "A" on clients, was a "private" drive, which functioned similarly to a home directory or user profile. Private drives were allocated one per user station, and additional password-protected drives could be "logged onto" using the MmmOST LOGON.COM program. At the client, these appeared as a standard block-oriented disk to CP/M. MmmOST would maintain separate directories and manage allocation space on the real disk to separate out users' files. The data was stored in a mostly CP/M compatible way, so that doing a "dir" on the service processor drive that stored private directories without running MmmOST would show every users' files. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">One side note, these private drives were not the same as CP/M 2 and MP/M "users". Changing the user number (from 0-15) separated out files on the same private drive. Under MmmOST, user numbers provided a way to separate out different files, since CP/M 2 doesn't support named directories of files.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The other main type of drive is a "public" drive. This was shared between all of the clients. The clients could directly access the blocks on the drive, but in general CP/M would handle file accesses by passing the call (with the appropriate FCB) up to the service processor, and get back the result with the new/updated FCB. This is the type of file handling that MmmOST used for special files, such as MULTI.SYS, which allowed the user stations to make special requests to the service processor. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Public drives also supported record-level locking of data, so that applications could be written which allowed multiple users to access the same database. This would be useful for something like a client database where it would allow different people to work on the data in the database, without overwriting each others' updates and corrupting the database.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif;">Public-Only drives are shared like Public drives, but do not support locking or access control to files. They can be used for read-only access to programs or data, or for anything which will only be accessed by one user at a time, such as the floppy disk on the TS-806 service processor.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">MULTI.SYS</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Multi.sys was a "virtual" file that MmmOST kept on the shared drive, which allows for the user stations to make requests of MmmOST. There were a few different sections of the file, which allowed access to the service processor time (to synchronize it with user stations), file locking requests, and inter-user communications.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Time access was the simplest, reading a certain record of the file returned the current time on the service processor.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Record locking allowed a program running on a user station to request access to a file. It could request either exclusive whole-file read/write access, exclusive access to particular records, or just test for locks on the file.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Inter-user communication is a simple form of IPC, which allows messages to be passed between software running on different user stations. The default mode is a "mailbox", which allows each user station access to a short 128-byte mailbox, which any user station can use to send a message to another user station. The mailbox is overwritten, with no history or queueing, every time a new message arrives for that user station.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">As an alternative to the mailbox, named FIFO queues can be selected instead. There are default FIFOs for each user station and can be additional named FIFOs, which multiple user stations can share.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Other commands</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">There are other commands which are distributed with MmmOST that talk to the service processor directly, instead of using a file like MULTI.SYS. These include LOGON (change which private drive is currently in use), DSTAT (to get information from the user processor about resources), PRNT/SELQUEUE (to control shared printing and queues), and a few others.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">More info</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">My next blog post will go into more detail that I've reverse engineered while building a modern replacement for MmmOST.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The TeleVideo MmmOST 2.1 programmers manual has more details on the system, programming to use MmmOST features, and how to change MmmOST parameters. A copy is available <a href="https://drive.google.com/file/d/176RChpOz9PekdhVeaA6_mWEsud0sjuob/view?usp=sharing" target="_blank">on Google Drive here.</a></span></div>
<div>
<br /></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-29877440293399319922019-04-09T16:52:00.000-04:002019-04-09T16:54:28.582-04:00TeleVideo Systems Part IV - TS-801<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">TeleVideo TS-801 "System I"</span></h2>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The TeleVideo TS-801 was TeleVideo's first entry into the single-user CP/M computer market. It was also usable as a client system off of one of their distributed systems, which were centered around one of the TS-806 or TS-816 "Service Processor" systems.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The system is not expandable but arrives as a fairly well-configured system. It was released in 1981 and listed for $3295 with a 4MHz Z-80, 64KB of ram, two floppy drives, a couple of serial ports, and a Centronics-compatible parallel printer interface.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><picture></picture></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghHyWUrgf1vF3dROmhyphenhyphen21do_NqGAX5cvy0sek8WWQRTMUtl7LhZHbPXEIeAmyOyXbEBBB1TbNEVjrflbzHV3EvSIhdteLzYPoQh8Lpyj_hH3F7tgCxQBxjAPiE_sPNGiQ7_YMR9jQdgd4/s1600/DSD01483.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghHyWUrgf1vF3dROmhyphenhyphen21do_NqGAX5cvy0sek8WWQRTMUtl7LhZHbPXEIeAmyOyXbEBBB1TbNEVjrflbzHV3EvSIhdteLzYPoQh8Lpyj_hH3F7tgCxQBxjAPiE_sPNGiQ7_YMR9jQdgd4/s320/DSD01483.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
</div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Outside appearances</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The TS-801 has a pair of double-sided/double-density Tandon TM100-2A floppy drives with up to 360KB of storage each, plus a red reset button on the front. On the back, there's a DB-25 terminal port for the console terminal, a DB-25 serial printer port, and a 36-pin Centronics parallel port, along with a DA-15 RS-422 port to connect to a Service Processor for use in a distributed system.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLc5drPVw27sX-wuvHKoaol-0EF_Ibw1BWhz6llbji0uBNp8uz_I-jXtD81_qyz1C0ZvxHPHq3cZq8j_zu-g9bRoYg8c3adAmH3MMGRr2gTy-1b8M5hiR1-DVWNrNhX91HCtaL36kCT0/s1600/DSD01488.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzLc5drPVw27sX-wuvHKoaol-0EF_Ibw1BWhz6llbji0uBNp8uz_I-jXtD81_qyz1C0ZvxHPHq3cZq8j_zu-g9bRoYg8c3adAmH3MMGRr2gTy-1b8M5hiR1-DVWNrNhX91HCtaL36kCT0/s320/DSD01488.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Due to how the machine is set up, you can either use the RS-422 port or the serial printer port. To switch between the two, there are a set of jumpers on the motherboard that need to be cut and re-soldered differently. This is probably the worst way I could think of implementing this. However, I'm sure that it was expected that you would only change this at most once when the system was initially installed.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><picture></picture></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Disassembly</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The inside of the TS-801 is fairly simple and designed to be serviceable. The major chips are socketed, and the floppy drives are mounted to a platform that hinges out of the way for access to the system board. The power supply is a fairly simple open-frame unit, which provides +5, +12, and -12V to the system board and floppy drives.</span><br />
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgElC2q-tH9UaPYTaHMbZTd5FzC609RVe5tfc2YYXW0lccJS2fe3BCuYKLmxGsOKWeLdxpiHkwwulmEJp7sAm2SJf2ElQxUD0XntFvtL6gfSs4kaXaCgAqw6MMQD9C-_G-N7QWL-cI1c8k/s1600/DSD01486.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgElC2q-tH9UaPYTaHMbZTd5FzC609RVe5tfc2YYXW0lccJS2fe3BCuYKLmxGsOKWeLdxpiHkwwulmEJp7sAm2SJf2ElQxUD0XntFvtL6gfSs4kaXaCgAqw6MMQD9C-_G-N7QWL-cI1c8k/s320/DSD01486.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">I have noticed that there are some differences between the two TS-801 systems that I have. The second system has several chips soldered into the "spare" locations on the board, and a bunch of fly-wire connecting them into various parts of the board.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Also, there are the set of jumpers on the motherboard which need to be adjusted to switch between using the 2nd (printer) serial port, or the RS-422 port.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><picture></picture></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVgfEYbMDGhUVk9FcfnEejODd1-QAD90o-Xq7Cl-sVN1vDHEmdBa30AXzTuLtLeKHtFQ9PTyaMVErSCfd-IsTsnMjCmBnKk9-RDJGE3FcHiGKi4Q_kQpTUcJLoaMgjMnbCa6wUiobmaNc/s1600/DSD01487.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVgfEYbMDGhUVk9FcfnEejODd1-QAD90o-Xq7Cl-sVN1vDHEmdBa30AXzTuLtLeKHtFQ9PTyaMVErSCfd-IsTsnMjCmBnKk9-RDJGE3FcHiGKi4Q_kQpTUcJLoaMgjMnbCa6wUiobmaNc/s320/DSD01487.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
</div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">System Design</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The system overall is fairly similar to the TS-802 that came out a few months later. There seem to be two main differences: The system requires an external terminal, versus the integrated terminal in the TS-802. The system also has one less SIO chip, which means that there are fewer serial ports available.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The main chips in the system are:</span><br />
<ul><span style="font-family: "trebuchet ms" , sans-serif;">
<li><span style="font-family: "trebuchet ms" , sans-serif;">4MHz Zilog Z80A CPU</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Z8410 DMA</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Z8442 SIO/2 - RS-232 terminal and either RS-232 printer or RS-422 link</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Z8420 PIO - Centronics serial interface</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">Z8430 CTC - Time of day interrupt, baud rate generation</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">WD1793 - FM/MFM floppy drive controller</span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">16 x 4164 64k x 1 150ns DRAM </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif;">2732 - 250ns, 4K x 8 EPROM</span></li>
</span></ul>
<span style="font-family: "trebuchet ms" , sans-serif;"> </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The same code will (mostly) run on either system, because they both use the same controllers, at the same IO port addresses. The TS-802 moved the floppy (and an optional hard drive controller for the TS-802H) off to a daughter card, which made things a bit more modular.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Trying to get the system working, I ran into several issues. I'm still not convinced anyone had these systems actually working before I got them - the hardware seems flaky, but the hardware mods to the second system seem to make them slightly more stable. It would randomly reset occasionally while running CP/M programs.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Knowing they were similar to the TS-802, I grabbed the 802 service manual off of Bitsavers and started comparing it to the system board. Most of the schematic matched up, but some parts around the memory latch -- the circuit that selects between having the boot EPROM or DRAM selected in memory -- was different. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">I hooked up a logic analyzer, and sure enough, the latch seemed to randomly be flipping between EPROM and DRAM. Sitting at the CP/M command prompt, this wasn't really noticeable, because it only affects the bottom 16K or so of RAM, and CP/M and the SSP command interpreter lives up in the top 16K of RAM.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Comparing the wiring to the schematic, It appeared that the system controlled the latch based off decoding the address bus, and the buffered /IORQ line. On the 802, the system uses a signal it calls /IOWR, generated from the buffered /IORQ and /WR lines.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">At first glance, just using /IORQ seems like it should work, but will set the latch anytime you do an IN/OUT instruction to address 04 (really, 4 or 5, because the bottom address line isn't decoded), and re-set the latch to enable the EPROM at address 6.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">However, in processing an interrupt on the CPU, /IORQ and /M1 are used to signal an interrupt acknowledge and get the interrupt vector from the interrupting device. If this occurs when the processor is executing code with the bottom 8 bits of the address in the range 04-07, it'll trip the latch to potentially change state. The system has a periodic timer generating interrupts to track the time of day, which will occasionally cause this to happen. If that happens when you're executing code in the bottom 16K of RAM, it will instead execute code from the PROM - either crashing the system or (more commonly) resetting it.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">This problem manifested itself as randomly rebooting the system when I tried to execute CP/M programs. If the latch was set to use the EPROM, when CP/M tried to jump to the program at address 100h, it would instead jump to the EPROM at address 100h.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">I was able to fix this by severing a trace for /IORQ, and running a jumper wire to connect /IOWR as a control input to the latch instead.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">After this change, I was able to get this second system to mostly work, using the RS-422 port to boot off of a service processor.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Thoughts</span></h3>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">These systems were pretty rough, though they meant to be cheap business systems. They came as un-expandable systems but were fairly maxed-out for a single-user system, with a full 64KB of RAM, and two floppy drives. TeleVideo quickly released the TS-802 for about $200 more, which included an integrated terminal, and made the TS-801 obsolete. The TS-801 seems fairly obscure, and I doubt many people bought them with the lower priced TS-802 (and later, TS-803 and TPC-I systems) coming out over the next couple of years.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">Today, they're sort-of nice because they're easy to connect to a service processor and serial terminal server to development work on without needing physical access to the system. The biggest problem is that they still seem to have design issues which make the big red reset button on the front is important to have access to. The Tandon floppy drives seem to be fairly unreliable; I'm not sure if that's due to age, or just their generally low quality. The Teac FD55 drives in later machines are less expensive, smaller, and in my experience are way more reliable.</span></div>
<div>
<br /></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-64708143457106529102019-01-25T10:48:00.000-05:002019-01-25T11:41:23.351-05:00TeleVideo Systems Part III - TS-1605 PC/XT Clone<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<h2>
<span style="font-family: "trebuchet ms" , sans-serif;">TeleVideo TS-1605 PC/XT Clone</span></h2>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">The TeleVideo TS-1605 is one of their first PC clone systems, and unlike the earlier TS-1603, it includes expansion capabilities using an ISA card slot, and optional ISA expansion chassis. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif;">I ended up picking up one of eBay with a few known faults, hoping that I could fix them. The two errors were obvious in the eBay listing, a 201 and 601 error. Based on IBM's standard numbering this meant there probably was a memory fault and a floppy disk fault of some sort.</span><br />
<h2 style="text-align: center;">
<div style="text-align: start;">
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
</div>
<div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7890/32959503948_36e4ba9892_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7890/32959503948_36e4ba9892_o.jpg" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;"><a href="https://www.flickr.com/photos/vax-o-matic/32959503948/in/dateposted-public/lightbox/" target="_blank">TeleVideo TS-1605 computer</a></span></div>
</div>
</div>
</h2>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Outside appearances</span></h3>
<span style="font-family: "trebuchet ms" , sans-serif;">This system, based on the 970 terminal and TS-803 before it, has a nice 14" green phosphor tilting screen, and a base that swivels nicely if it's placed on a hard surface. <br /><br />The front has a modular 6-pin coiled cable coming out of it to plug a keyboard into. This appears to be a mostly IBM PC/XT compatible keyboard but powered using 12V instead of 5V. I haven't quite figured out if it can be made to be compatible with a PC/XT keyboard, and my initial attempts didn't work out with supply 12V power the keyboard and connecting it to an IBM 5160 PC/XT. <br /><br />The front also shows to vertically stacked 360KB (DSDD, 48tpi) TEAC FD-55B floppy drives, which are the same as TeleVideo used in the TS-803 CP/M system.</span><br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm5.staticflickr.com/4913/32959502878_c775a3274c_o.jpg" width="320" /></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;"><a href="https://www.flickr.com/photos/vax-o-matic/32959502878/in/dateposted-public/lightbox/" target="_blank">Back of TS-1605</a></span></div>
</div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">The back of the system shows some integrated peripherals: </span><ul>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">RCA jack and DE-9F RGBI output, compatible with an IBM CGA monitor. </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">DB-25M RS-232 serial port from an 8250 UART </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">DB-25F IBM-compatible Centronics interface parallel printer port </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">DIP switches for setting, easily accessible from the back of the case </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">A built-in ISA expansion slot, for connecting one card, or an expansion chassis, which I pulled through the expansion slot hole to make it easier to connect cards. </span></li>
</ul>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Disassembling the system</span></h3>
<div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWgIgxP2g5yZo4RDwI-eKYAViFQ01-ZYw-sCSy6AQJwv69gxpiIxfoTBNt3rEqg4CS8GXojTMfmnGEiMsLEjM_FHPEpr5TQYh1HLoY-obRFq5d8J4_Lk-1Yihjwi9nMcbAYlBQ6ikZi7c/s1600/DSC09906.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWgIgxP2g5yZo4RDwI-eKYAViFQ01-ZYw-sCSy6AQJwv69gxpiIxfoTBNt3rEqg4CS8GXojTMfmnGEiMsLEjM_FHPEpr5TQYh1HLoY-obRFq5d8J4_Lk-1Yihjwi9nMcbAYlBQ6ikZi7c/s320/DSC09906.JPG" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">System with side cover removed</span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">The system is fairly easy to get the cover off with only 3 screws at the bottom of the right side holding it on. I figured that before I would power the system up, I should pull it apart, and test out the power supply outputs, and check that everything physically looked OK. </span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><br /></span></div>
</div>
</div>
<div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI2aQjdV8e7WRwDyuPgtpG-9qgcpaQGC0RasEtw_VWtTBGlRWK6wv3KM_Jgp_3o0R9S20T3dHfG0SjzeM369QeOTVqgdbQSl__l8fctFCv-l3P8CTh9hUNIk1DII1TNPD2tNyQI6CPNH8/s1600/DSC09907.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI2aQjdV8e7WRwDyuPgtpG-9qgcpaQGC0RasEtw_VWtTBGlRWK6wv3KM_Jgp_3o0R9S20T3dHfG0SjzeM369QeOTVqgdbQSl__l8fctFCv-l3P8CTh9hUNIk1DII1TNPD2tNyQI6CPNH8/s320/DSC09907.JPG" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">RAM card close-up</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
</div>
</div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: small;"><span style="font-family: "trebuchet ms" , sans-serif; font-weight: normal;">Inside there was a 256K ram expansion card installed into the card slot. The slot itself is mounted on a cable that plugs into a 64 pin header on the board, making it easy to remove to connect something external to. </span></span><div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCu0vIt-MLonTOo1OHtsQ9yODGHMg08Qxjswmqmi-LTmQ2E2psy_ddl93Cdw5AcFDnvJPK94yLDgFWJM2KOhFcx26N6nk1JQ4tFWYi7FrME-ZOGrw8iTQ0-RDT-TYFT-vl3yZCwNlwVS4/s1600/DSD01542.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCu0vIt-MLonTOo1OHtsQ9yODGHMg08Qxjswmqmi-LTmQ2E2psy_ddl93Cdw5AcFDnvJPK94yLDgFWJM2KOhFcx26N6nk1JQ4tFWYi7FrME-ZOGrw8iTQ0-RDT-TYFT-vl3yZCwNlwVS4/s320/DSD01542.JPG" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">System board close-up with 8088 CPU / 8087 socket and connectors for floppy drive, hard drive controller, and 64-pin ISA slot header.</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
</div>
</div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><br /><span style="font-weight: normal;">Removing that shows off some features on the system board: </span></span><ul>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">Intel 8088 CPU </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">Slot for 8087 math coprocessor </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">4 memory banks and an option MUX chip to allow upgrading the stock 128K of ram to 256K (4 banks of 4164) or 512K (2 banks of 41256) -- the system only allows 4 banks of 256K RAMs </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">32K of static ram in 51400 chips for video memory </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">TeleVideo gate array and ROM chips for the CGA-compatible video card and system BIOS </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">An NEC 765 and FDC9229B floppy controller and data separator </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">34-pin IBM-compatible floppy drive connector </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">An onboard 6-pin modular jack for the keyboard cable </span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">40-pin WD1000 compatible hard drive interface, which is the same as used on various Z80 systems, including the TS-802H, 803H, 806, and 816. </span></li>
</ul>
<h3>
<span style="font-family: "trebuchet ms" , sans-serif;">Debugging memory</span></h3>
<div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOeI6eBgIUDbMxzuiXD02TCMl4_9A_Q6QwVclswFJMTQo9MLPkAMJUm0MQC5ht4s0b9Nk4GtruQGR88t9W8g_Opmlkgl4CiCx-lwmUXhPeJoRW1dSPGlxvbm-d2Oi6wgDk5wY5sbEhqn8/s1600/DSD01540.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOeI6eBgIUDbMxzuiXD02TCMl4_9A_Q6QwVclswFJMTQo9MLPkAMJUm0MQC5ht4s0b9Nk4GtruQGR88t9W8g_Opmlkgl4CiCx-lwmUXhPeJoRW1dSPGlxvbm-d2Oi6wgDk5wY5sbEhqn8/s320/DSD01540.JPG" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">System board RAM, 4 banks of 8 chips, and BIOS EPROM</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">First, I tried to find and eliminate the memory fault. I started by pulling out the memory expansion card, which didn't help at all. All of the onboard memory was socketed, so I went through and tried to find which chips were bad. The system still tried to boot with a reduced amount of memory and the "201" memory error, so I hoped to boot up DOS and used DEBUG to find the bad memory.</span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">This didn't go quite as well as I planned. The floppy drives didn't work either, so I was trying to boot off an XT-IDE card. However, as soon as it displayed the boot menu, the system would freeze, and not display any input. I first figured this was due to the memory issue, but it turns out that it wasn't. Fortunately, I had another 8-bit IDE card which I was able to use, and boot off an SD card in an IDE to SD adapter. It's a "Centos, Inc. CI-1020", as far as I can tell not related to RedHat.</span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">Once I got booting sorted out, I was able to boot up MS-DOS 5.0, run DEBUG, and poke around memory. I discovered that a section of RAM had one bit that was stuck on. I didn't have schematics, so I went through and replaced memory chips one bank at a time until the error went away. Once I did that, I put back memory chips one at a time until the error re-appeared. That helped isolate the one bad 4164 chip. Fortunately, I have a stack of spare 4164 from Quadboard and AST Six Pack expansion boards.</span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif;">Debugging floppy drives</span></h3>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2IAsdPR8rZvi6ysVLN7rmjaxMPmYNjAYpTb_MTriOsYrJPzs63_jT_1fvV-CLpNSY8S2_JuyR7mbOQ4YaXiKub7aZ0f09U5XGPE1T47mU4e9ITCSYGIi7Agp8o9RcBs_LtXpWZNXLu-0/s1600/DSD01541.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2IAsdPR8rZvi6ysVLN7rmjaxMPmYNjAYpTb_MTriOsYrJPzs63_jT_1fvV-CLpNSY8S2_JuyR7mbOQ4YaXiKub7aZ0f09U5XGPE1T47mU4e9ITCSYGIi7Agp8o9RcBs_LtXpWZNXLu-0/s320/DSD01541.JPG" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">Floppy controller and video memory/chips</span></div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;">The next problem I went to diagnose was the "601" disk error. Booting off of a floppy disk didn't work, and the drive didn't respond from within DOS either. However, the drive light and motor did turn on, so at least some parts were working.</span></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">At this point, I had found a schematic in the technical manual for the machine on eBay. So, I could see that the drive select/motor lines were driven by a latch chip on the motherboard. The rest of the drive controller was integrated, and the way that it was all integrated, it would have been a major effort to replace the onboard controller with an ISA card. So, I pulled out my oscilloscope and started looking at things.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">First, I looked at the data line from the drives to the controller. With a disk in the drive, and the system trying to use the disk (I had to do this from within DOS since the BIOS didn't even try to boot off of the failed controller) I saw pulses that looked like flux transitions on the disk. So far so good - the drives were probably OK.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">The system uses an NEC D765 floppy controller, and an FDC9229B data separator, to convert the data stream into clock and data pulses for the controller. So, one of these two chips were likely the problem. Hooking the scope up to pins on the NEC chip, it looks like it was receiving its chip select line, clock, read/write, etc, ok. However, I noticed that the chip wasn't responding to commands, and the data line from the FDC9229B was stuck low.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">I wasn't sure at this point if it was the D765 or FDC9229B. However, both were available on eBay for reasonable prices, so I got both. A few days later, I had received both of them and continued with debugging. Replacing the D765 didn't change anything until I had also replaced the FDC9229B. With it working correctly, I put back the original D765, and that worked as well. So I had narrowed it down to the FDC9229B and pitched the old one.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-family: "trebuchet ms" , sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;">It was fortunate that both chips were socketed, so it was easy to swap them out. Otherwise, the repair process would have taken much longer (I would have had to replace both of them, as it's difficult to desolder chips from boards without damaging one of them). And in the end, they would have ended up with sockets anyways.</span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
<h3 style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif;">Expanding I/O</span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipcpcNIHeQhjqxGDOBsavs0ZH4WT6cN-JDyxcQsL9t3HlZLWHA-TStLsHLlowW2NZGsRw2I-WXhNw6VAwXQ56BSK4zP3RAx2N4JUsz8_8VwIrUTlJz7esCYpy_uVm6GGZWyjIBtwbSj98/s1600/IMG_20181118_233752.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipcpcNIHeQhjqxGDOBsavs0ZH4WT6cN-JDyxcQsL9t3HlZLWHA-TStLsHLlowW2NZGsRw2I-WXhNw6VAwXQ56BSK4zP3RAx2N4JUsz8_8VwIrUTlJz7esCYpy_uVm6GGZWyjIBtwbSj98/s320/IMG_20181118_233752.jpg" width="320" /></span></a></div>
<div style="text-align: center;">
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: x-small;">ISA expansion</span></div>
</div>
<div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small; font-weight: normal;"><br /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: small;"><br /></span>
</span><br />
<div style="text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: small;"><span style="font-family: "trebuchet ms" , sans-serif; font-weight: normal;">The system came with only one ISA slot but was also offered with an expansion chassis for additional card slots. I thought I'd try an easy solution to get more slots. On eBay, I was able to find an ISA riser card with multiple slots, which had a normal ISA card-edge connector on it. The one I found was called a <a href="https://www.ebay.com/sch/i.html?_nkw=CTK-303">"Generic CTK-303" like these on eBay</a>.</span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"> </span><br />
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><br /></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;">
</span>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="font-weight: normal;">I was able to pull the ISA slot cable out through the hole at the back of the case and plug it in. Note that it's a 16-bit riser card, where the computer has the original IBM 5150 PC style 8-bit slots. This doesn't really matter, as long as I don't try to use any cards where the 16-bit "extension" slot gets in the way. Few cards had that problem, such as the IBM original CGA card. However, with the built-in CGA compatible video, I wasn't going to be using a CGA card in this either.</span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;">
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-weight: normal;">I found a collection of cards to plug in, including a 3com 3c503 Ethernet card, 8-bit IDE card, IBM 3270 emulator card, RAM expansion, and serial port card, and booted the system back up. Everything seemed functional (I didn't test every card, but I didn't see any signs that I had overloaded the bus).</span></div>
<h3 style="text-align: left;">
<span >The Future!</span></h3>
<div style="text-align: left;">
<span style="font-weight: normal;">Going forward, </span>there's<span style="font-weight: normal;"> a few things I'd like to work on. I'd like to use the system with the IBM 3270 card and IBM's PCOMM as a 3270 terminal, mostly because it looks cool. I'd also like to stick the ISA riser card into an external chassis with a separate power supply, and cable back to the host. Since the connection is just a standard 64-pin header connector on the system, this should be relatively easy. It'd also help </span>getting<span style="font-weight: normal;"> the memory up to 640K or so. I have purchased the memory MUX chip and have a stack of 41256's, which would let me at least increase the memory on the system board to 512K.</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><br /></span></div>
</span><br />
<div style="text-align: left;">
<br /></div>
</div>
</div>
</div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com2tag:blogger.com,1999:blog-5435461705142257233.post-67051608358327694132019-01-23T11:15:00.000-05:002019-01-23T16:39:23.735-05:00TeleVideo Systems Part II - Keyboards<h2 style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">TeleVideo 965 Keyboard Emulation</span></h2>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The Terminal</span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHoDQfirvTSR9hpZSp2HlF7t1mjMI_VMqfjoOpDqb4BNQ2rIv9o7PVFF0ADXa6mXdyRtPk8b3N-63XusONcMzhQsVShT0mSXzN60xBHZd4gs3bUHOx9_oa4kCa1KOn1SXpKscAh5cORZg/s1600/DSC09731.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"></span></a></div>
<div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7860/46782914712_00687013f2_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7860/46782914712_00687013f2_o.jpg" width="320" /></a></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46782914712/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo 965 terminal with a PS/2 keyboard</a></b></span></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I purchased a set of TeleVideo 965 terminals for a relatively good deal on eBay, hoping that I could make them work with existing TeleVideo keyboards I have. I had some reason to suspect this - older terminals both used a 12V power supply to the keyboard and a TTL-level RS-232 connection between the keyboard and terminal logic.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Unfortunately, they weren't quite compatible, as I noticed the 965 has a 4-pin (handset-style) modular jack, and the slightly earlier 970 terminal I have has a 6-pin (RJ14 type) modular cable.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Older Terminal keyboards</span></h3>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEtAofKDATKVJaO_pyIYYoWKIrhyphenhyphen9H-TNzsnwvkcmJp5pT2BzbhnZNBhZZMd7HSyFk_vM2a2hPT_OFt1zBAd4KT9wkqdxVna0H-lBeOMT6Bdfy2POG-FSxJaVu0SVQTg7IMfmzYoZ4ShQ/s1600/DSC09665-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="788" data-original-width="1600" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEtAofKDATKVJaO_pyIYYoWKIrhyphenhyphen9H-TNzsnwvkcmJp5pT2BzbhnZNBhZZMd7HSyFk_vM2a2hPT_OFt1zBAd4KT9wkqdxVna0H-lBeOMT6Bdfy2POG-FSxJaVu0SVQTg7IMfmzYoZ4ShQ/s320/DSC09665-crop.JPG" width="320" /></a></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>TeleVideo 970 keyboard, missing F1 and CHAR INSERT</b></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">TeleVideo's original detached-keyboard terminals, the 925 and 950, both use a 4-pin modular jack. Going through the <a href="http://www.bitsavers.org/pdf/televideo/925/120036-00-A_925_Maintenance_Manual_Jul85.pdf" target="_blank">925 schematics available on Bitsavers</a>, it's apparent what the pinout is, and the supply voltage. The maintenance manual also lists the baud rate of 1200 baud for this keyboard.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The later model 970 keyboard added pins for a shield (likely to appease the FCC) and -RESET line to the terminal (the same keyboard was used on the TS-803 computer, and possibly others). Looking through the <a href="http://www.bitsavers.org/pdf/televideo/970/Model_970_Terminal_Theory_of_Operation.pdf" target="_blank">970 technical manual on Bitsavers</a>, you can see that the supply is 12V, like the earlier keyboard. However, the baud rate is increased to 9600 baud, as I was able to verify with an oscilloscope.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Keyboard protocol analysis</span></h3>
<div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I figured the best place to start was to decode what data the 970 keyboard was sending to the terminal.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbpKjvhoZIUlBD_nb-et1w3vom26hqP3iUBm9Db6kv8UgDb5Qjem5M0855DmYxl4MT1fYjfvLP_uvwilndQkStqqHRmjQlv2RVC6JQJqMJrHMKJop0B0kdkNSHaN8W321Ym2gOa8QpVs/s1600/DSC09735-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1151" data-original-width="1600" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbpKjvhoZIUlBD_nb-et1w3vom26hqP3iUBm9Db6kv8UgDb5Qjem5M0855DmYxl4MT1fYjfvLP_uvwilndQkStqqHRmjQlv2RVC6JQJqMJrHMKJop0B0kdkNSHaN8W321Ym2gOa8QpVs/s320/DSC09735-crop.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>TeleVideo 970 keyboard data capture on a 'scope</b></span></div>
</div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Hooking an oscilloscope to the keyboard pins, using a couple of spare modular jacks to connect pins through, I was able to verify the voltage of the connection, and the data coming out of the keyboard was 2 bytes of TTL level serial, at 9600 baud, 8/N/1. I then connected the output of the keyboard up to a Linux PC using a generic TTL serial adapter. From there, I was able to write a small program to log key presses and let me input what I was pressing, and dump the output into a CSV file for filtering through.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsaHOH5QEJ7-KeDd2PTctmzvyx9WxVeL1s126-BWJY4MTyiuQrjq28Fam44hp83bTf27pccQkoNdhiL0sTLOIzkdvSiNFPFTb5dOYG1RlXqLgjZ7m503xHOqBdL_BSraFRYZ3kURzncVg/s1600/DSC09732-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1229" data-original-width="1600" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsaHOH5QEJ7-KeDd2PTctmzvyx9WxVeL1s126-BWJY4MTyiuQrjq28Fam44hp83bTf27pccQkoNdhiL0sTLOIzkdvSiNFPFTb5dOYG1RlXqLgjZ7m503xHOqBdL_BSraFRYZ3kURzncVg/s320/DSC09732-crop.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>Keyboard decoding hardware setup</b></span></div>
</div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I discovered that the basic protocol is a byte to indicate the status of shift/modifier keys, such as shift, caps lock ("alpha lock"), control, and function, along with a second byte to indicate the key pressed, which was mostly the ASCII version of the key pressed. This made the keyboard fairly simple to understand. All I had to do is see how the modifier keys modified this second byte, and what all of the special function keys on the keyboard did.</span></div>
</div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">At this point, I hoped that the terminal didn't have to send any data to the keyboard to initialize it.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Keyboard interface analysis</span></h3>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I assumed that the 965 keyboard interface would be similar to the older 970 interface, and used a multimeter to test the pins coming out of the terminal. I quickly discovered that the terminal ran off of 5V instead of 12V, and was hoping that the baud rate was still 9600 baud. </span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNKqQVEAIC9olgEZ2E7amPUvR5lfs7WnlfKvDGO5yw1PI03ZZIroIEbODZSNpuNa1Aekl5qX2C2b-rTbKRSt5Um6xyewNW4-UHZZi_MPFGbTaP55Z5L-pBMi6s6gvSaiZHcHG9EolURTw/s1600/DSC09737.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1068" data-original-width="1600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNKqQVEAIC9olgEZ2E7amPUvR5lfs7WnlfKvDGO5yw1PI03ZZIroIEbODZSNpuNa1Aekl5qX2C2b-rTbKRSt5Um6xyewNW4-UHZZi_MPFGbTaP55Z5L-pBMi6s6gvSaiZHcHG9EolURTw/s320/DSC09737.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>Keyboard simulator using "echo"</b></span></div>
</div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">My first test was to use my Linux box to simulate a keyboard and send two-byte sequences to the terminal. This worked perfectly, and I was able to get things I typed to show up on the terminal screen after looping back the primary serial port Tx/Rx pins.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Testing with an adapter</span></h3>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1EFJEo086UB6gtz8ufEQpydP3F9LwOwUjGblv7RFmbDJHSdm5PPj1IFLEYaO5XRIghqM016JFhIXso30uyMfXjGrolK39Tsd2izCktRCgLpIQvLboQ5JLVty98oBD0JyxPDFOuKopwrg/s1600/DSC09733-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1020" data-original-width="1600" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1EFJEo086UB6gtz8ufEQpydP3F9LwOwUjGblv7RFmbDJHSdm5PPj1IFLEYaO5XRIghqM016JFhIXso30uyMfXjGrolK39Tsd2izCktRCgLpIQvLboQ5JLVty98oBD0JyxPDFOuKopwrg/s320/DSC09733-crop.JPG" width="320" /></a></div>
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>Keyboard with modular jack adapter</b></span></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I grabbed a couple of surplus modular jacks I had laying around, connected wires between them, and attempted to run this, with just by-passing the 7805 voltage regulator on the keyboard. This didn't quite work, as the voltage regular drew too much power, so I instead found a spare 12V DC wall-wart power supply to connect to my modular jack setup to power the keyboard.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">To my surprise, this worked pretty much perfectly! So my earlier effort reverse-engineering the 970 keyboard protocol gave me exactly what I needed to replace the 965 keyboards. I used the TTL serial adapter to record the commands that the terminal sent to the keyboard, and slowly figured out what some of them were -- reset, set/disable key repeat, etc.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Arduino PS2Keyboard library</span></h3>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">My first thought at an adapter was to finally one of the Arduino boards that I had picked up at a Pi-day sale at Sparkfun. With minimal searching, I found the <a href="https://github.com/PaulStoffregen/PS2Keyboard" target="_blank">PS2Keyboard library</a> that was available for Arduino and worked on getting it to work with a PS/2 keyboard (I was using an IBM Model M since I had several of them laying around). After some work, I was able to get the example code to work.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">My initial tests didn't work out, because I had messed up the pin-out on the PS/2 jack, and swapped +5V and the clock signal around, which gave strange results from the keyboard and attached oscilloscope confirmed there was a problem. Fortunately, PS/2 interfaces are pretty hardy, and I didn't manage to break things. If I had reversed data pins and the 12V power line to the TeleVideo keyboard, I'm sure it wouldn't have worked out well.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Re-writing PS2Keyboard</span></h3>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">After digging into what the library would do by itself, I quickly discovered what its limitations were. There were a few things that I wanted to do with my adapter, such as support the non-alphanumeric keys on the keyboard and modifier keys, which were not really supported with the Arduino library. So, I decided to scrap most of what the library included, and just focus on reusing the library parts that directly interacted with receiving data from the keyboard and turning the bit stream into PS2 scan codes. From there, I could use some translation tables to convert that data into the TeleVideo keyboard protocol modifier bytes.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">In researching this, I spent lots of time reading every reference I could find on the PS/2 keyboard protocol. The <a href="https://www.mcselec.com/index.php?option=com_content&task=view&id=38&Itemid=105" target="_blank">MCS electronics app note on interfacing to an AT keyboard</a> was useful, along with <a href="http://www.burtonsys.com/ps2_chapweske.htm" target="_blank">this article on the PS/2 keyboard protocol</a>, along with <a href="https://www.tayloredge.com/reference/Interface/atkeyboard.pdf" target="_blank">another article from the same author</a>. I used a few different references on keyboard scan codes including <a href="https://wiki.osdev.org/PS/2_Keyboard#Scan_Code_Sets.2C_Scan_Codes_and_Key_Codes" target="_blank">this osdev wiki page</a> and <a href="http://www.vetra.com/scancodes.html" target="_blank">this other list</a>. And a <a href="https://www.rose-hulman.edu/class/ee/doering/ece533/lab_3.htm" target="_blank">few</a> more <a href="http://www.jkmicro.com/ps2keyboard_en.pdf" target="_blank">general references</a>, including the <a href="http://classiccomputers.info/down/IBM_PS2/documents/PS2_Hardware_Interface_Technical_Reference_May88.pdf" target="_blank">IBM PS/2 Hardware Interface Technical Reference manual</a>.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I decided on some translations to do for keys that differed between the two. PS/2 keyboards don't have a "SET-UP" or "SEND" key, but both of those are important keys to support on the TeleVideo terminal. </span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I was able to get this mostly working, which was fairly easy to debug by moving the RS-232 output on the Arduino between my Linux box and a terminal.</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">After getting this all mostly working, I was able to add in support to send commands back to the keyboard, mostly so that I could control the LED keyboard lights and make the interface a bit more user-friendly.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Schematics and Code</span></h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The connections to the Arduino were fairly simple, just wiring up to RS-232 from the terminal, and connecting power, ground, clock and data to the PS/2 connector.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlIdFGpCK_Eok3O0YKo_0z_UnBDF5BaGUKuZX8ElFsfOe8U33_LaBn9nb3x8Ojyg_KNd6rrVP-ttyPqW1-omv_xTWlxYq2bthlT9JxgtbuC3T3sNIXxxsKooeJqfJjN6somkJ2YmOOT6g/s1600/TVI-Kbd-converter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="702" data-original-width="1600" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlIdFGpCK_Eok3O0YKo_0z_UnBDF5BaGUKuZX8ElFsfOe8U33_LaBn9nb3x8Ojyg_KNd6rrVP-ttyPqW1-omv_xTWlxYq2bthlT9JxgtbuC3T3sNIXxxsKooeJqfJjN6somkJ2YmOOT6g/s640/TVI-Kbd-converter.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><b>Schematic of keyboard converter</b></span> </div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I have uploaded the code to <a href="https://github.com/vax11/TVI-Kbd-converter" target="_blank">Github here</a>.</span></div>
<h3>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The future!</span></h3>
</div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">I have re-created the device using an Arduino Pro Mini, so that it can fit into a small enclosure and be a small adapter. I'd like to extend it to support other keyboard interfaces which are RS-232 compatible, like the earlier TeleVideo terminals, and DEC LK-201/401 keyboards.</span></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com1tag:blogger.com,1999:blog-5435461705142257233.post-68797018608020892982019-01-23T10:38:00.001-05:002019-01-23T16:37:25.198-05:00TeleVideo Systems Part I<h2 style="height: 0px; text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">TeleVideo Systems, Inc.</span></h2>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Who was TeleVideo?</span></h3>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Televideo Systems, Inc, was a bay area company that started in the 1970s by producing CRTs and monitors. Using this experience, they then produced dumb terminals, including terminals emulating the popular Lear Siegler line of ADM terminals, Digital VT-52 and VT-100, and many others. They then produced single-user and then multi-user Z-80 and CP/M based systems in the early 1980s. Once the IBM PC became popular, they produced 8088-based PC clone systems, including systems that interoperated with their Z-80 multi-user systems, and then multi-user based 80x86 PC-compatibles.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">TeleVideo terminals</span></h3>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">TeleVideo's first terminal was the 912, which looked much like the Lear Seigler ADM-3A which it emulated.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm5.staticflickr.com/4832/46835058871_6928596a2f_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm5.staticflickr.com/4832/46835058871_6928596a2f_o.jpg" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46835058871/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo 925 terminal</a></b></span></div>
</div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">TeleVideo later produced the popular 925 and 950 terminals, which were similar looking with different features. They used a 6502 CPU to control the CPU, with a pile of random logic (and later, gate chips) to create the display image from the screen buffer. On earlier terminals, this meant that changes in display attributes (blink, underline, reverse video, half intensity, etc) took up a display position. Doing this helped to reduce the memory required for the display buffer, and reduce the cost of the terminals.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> </span><br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7885/46782913592_4886042998_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7885/46782913592_4886042998_o.jpg" width="320" /></span></a></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46782913592/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo 970, rebadged by BT</a></b></span></div>
</div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The 970 had a sleek look with an adjustable tilt 14-inch green phosphor CRT, and ANSI, VT-100, and VT-52 emulation modes. The ANSI mode included a form-based mode which worked much like the IBM 3270-style block mode. The system sent a form down, laying out fields on the display, and what type of data could be entered in the fields, which the terminal would verify. When the user was done entering data, they'd hit the SEND key on the keyboard, which would transmit some or all of the screen back to the host. This helped to minimize the interaction with the host system (which with a single Z-80 serving multiple users wasn't particularly fast) and made the system more responsive and user-friendly.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7851/31893607537_1c676a449a_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7851/31893607537_1c676a449a_o.jpg" width="320" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46782914712/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo 965 Terminal</a></b></span></div>
</div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Later terminals such as the 965 would emulate dozens of other terminals. TeleVideo moved away from making straight clones (like the 912 that looked like the ADM 3A that it emulated) towards </span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">making </span>their<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"> own</span></span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"> unique, nicely styled, sleek products.</span></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The 965 is a fairly versatile terminal, which used a 65816 CPU (the 16-bit version of the 6502, just like what the Apple IIgs used) to emulate many different terminals.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm5.staticflickr.com/4804/46835059611_0c69224620_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm5.staticflickr.com/4804/46835059611_0c69224620_o.jpg" width="320" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46835059611/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo pt100 Personal Terminal</a></b></span></div>
</div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">One of the more unique terminals that I have found is the TeleVideo pt100 "Personal Terminal", which was a small easily portable all-in-one terminal, with a small amber<inches> CRT, mini keyboard, optional modem, and emulated a VT-52 and VT-100.</inches></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">One of the features that I've noticed while digging into TeleVideo systems is that TeleVideo liked to standardize on parts. Large chunks of TeleVideo terminals and computers used the same or fairly similar keyboards, for example. Since the keyboards are hard to find, that helped me make use of the systems and terminals that I received without a keyboard. I was able to use that info to build a keyboard converter for the 965 terminals that I didn't have a compatible keyboard for based on information gathered from keyboards for the earlier 970 and 925 terminals that I do have.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Z80 systems</span></h3>
<div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm5.staticflickr.com/4821/46835055161_116ab9d242_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm5.staticflickr.com/4821/46835055161_116ab9d242_o.jpg" width="320" /></span></a></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46835055161/in/album-72157675821721237/lightbox/" target="_blank">Televideo TS-801 computer</a></b></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">TeleVideo made several single-user systems, some of which could be used with a central host to make a multi-user system. They communicated over an 800K-baud RS-422 serial link, which used the SDLC protocol to serialize packets of data to communicate.</span></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The TS-801, picture above, had two 5.25" floppy drives. All of their systems came with 64K (sometimes 128K) of ram standard, as at that point it was clear that maxing out the memory was a good idea. It has a Z80A running at 4MHz for a central processor, included the Z80 DMA chip, a Z80 SIO/2 to run the serial ports and an optional RS-422 port, and a WD 179x / NEC D765 floppy controller. The TS-801 was a "cheap" model, which lacked an integral terminal that their other early models had (like the TS-800 / TS-802).</span><br />
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><br /></span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm5.staticflickr.com/4874/46835054451_8b355195e1_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm5.staticflickr.com/4874/46835054451_8b355195e1_o.jpg" width="320" /></span></a></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46835054451/in/album-72157675821721237/lightbox/" target="_blank">Televideo TS-803 computer</a></b></span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The systems were based around Digital Research's CP/M. Since they were fairly late in the CP/M timeframe, they used a fairly standard and easy to inter-operate with 5.25" double-density, double-sided, soft-sectored floppy format. The disks are 18 sectors, at 256 bytes per sector, 40 tracks per side (48tpi), using MFM encoding, and can be easily read and written on a PC floppy controller.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The TS-803 above added an integrated "terminal", which supported character mode, using the logic array chip from a TeleVideo 925 terminal, and a graphics mode, which used the Synertek 6545 CRT controller and 32K of dedicated video RAM. It allowed 64K or 128K of bank-switched RAM. on the main CPU, and had a slot for an add-on card with a Z80-SIO/2 and line drivers for a host RS-422 interface.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Some of the systems included a 5-40MB hard drive, using a controller based on the Western Digital WD1000 controller.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">The single user systems would have zero - two floppies and up to two hard drives. Systems without any drives, such as the TS-800A/TS-800R are designed to only be used as </span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">terminals or user stations on a central host that would provide storage.</span></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> </span><br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7883/32959508238_f6f12b43fd_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7883/32959508238_f6f12b43fd_o.jpg" width="320" /></span></a></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><b><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><a href="https://www.flickr.com/photos/vax-o-matic/32959508238/in/album-72157675821721237/lightbox/" target="_blank">Televideo TS-816 computer</a></span></b></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br />Two host systems were available. The TS-806 was a smaller host system, which provided ports<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"> for 6 terminals, a Centronics parallel port for a printer, a couple of RS-232 ports for a printer or modem and a console terminal, along with a single 5.25" floppy drive and a 10 / 10MB 5.25" full height hard drive. It could be expanded with another hard drive of the same size, and an optional QIC tape drive to do back-ups to. It used a 4MHz Z80A CPU, 64KB of RAM, Z80A-SIO/2 chips for the user station links, a Z80A DMA interface chip to manage data transfer to/from devices and user stations, and Western Digital floppy and hard drive controllers.</span></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7909/46835055561_e47251e6f6_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7909/46835055561_e47251e6f6_o.jpg" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/46835055391/in/album-72157675821721237/lightbox/" target="_blank">Back of TeleVideo TS-816, showing user ports</a></b></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The TS-816 was an expanded version of the TS-806. It allowed up to 16 user stations over RS-422 links, an optional Centronics parallel printer port, three RS-232 connections for printers/etc and a maintenance terminal, and a QIC tape drive and 8" hard drive that stored 25 or 40MB. It used the same Z80A CPU, but had 128K of bank-switched RAM, plus the same Z80A-SIO/2 chips for user station links, DMA and WD hard drive controller.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Both host systems had fairly ugly beige and black cases that were designed before TeleVideo switched to more modern looking cases (apparently after they hired someone to do product design for them).</span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7880/32959503278_ed0b523a01_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7880/32959503278_ed0b523a01_o.jpg" width="320" /></span></a></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/32959503278/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo TPC-I missing the keyboard</a></b></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">One of the more interesting systems was the "TPC-I" TeleVideo Portable Computer. There was a TPC-II version which was introduced a little later as a PC compatible computer. The TPC-I had a Z80, 64K of ram upgradable to 128K, the same graphics mode as on the TS-803 and included the same mouse port. The TPC-II is notable as it was the first computer I had growing up (but sadly was thrown out when my parents moved out of their house).</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The TPC-I I acquired had two 5.25" double-sided, double-density (TEAC FD55-B) floppy drives. There was an available option of an RS-422 port (using the same adapter as the TS-803), but that was not installed in the system I received. It was also, unfortunately, missing the keyboard. However, it is compatible with the PC keyboard from the TS-1605 and TPC-II models, so I was able to use the system with that keyboard. The keyboard and lack of a hard drive interface seem to be the two main (software-affecting) differences between it and the TS-803 -- the TS-803 boot image loads on the TPC-I, although the keyboard doesn't work.</span><br />
<h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">PC compatibles</span></h3>
<div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://farm8.staticflickr.com/7890/32959503948_36e4ba9892_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><img border="0" data-original-height="534" data-original-width="800" height="213" src="https://farm8.staticflickr.com/7890/32959503948_36e4ba9892_o.jpg" width="320" /></span></a></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;"><b><a href="https://www.flickr.com/photos/vax-o-matic/32959503948/in/album-72157675821721237/lightbox/" target="_blank">TeleVideo TS-1605 IBM PC/XT compatible</a></b></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">TeleVideo produced a few 8088-based PC compatibles. After the first model (TS-1603), they started producing systems with an ISA card slot, and optional expansion chassis, which allowed system expansion using the now standardized IBM PC expansion bus.</span></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span> <span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">From the first systems, they moved into 286 and 386-based systems, before mostly giving up the clone market, which had been greatly diluted with competitors by the time, and focused back on terminals. They produced a few Windows Terminal Server compatible terminals, before eventually selling off parts of the company, filing for bankruptcy, and ending terminal sales completely in 2011.</span></span></div>
vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-49117454094113971242011-04-13T17:28:00.001-04:002011-04-28T14:51:14.621-04:00IBM Mainframes at home<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5293/5568653685_9e4f6a6d95.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://farm6.static.flickr.com/5293/5568653685_9e4f6a6d95.jpg" width="224" /></a></div><br />
<span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: large;">Introduction</span><br />
<br />
I recently seized the opportunity to acquire a good-condition IBM zSeries 890 computer, which I knew was taken good care of (including careful de-installation). This is a model that was sold from April of 2004 up until June of 2008. It is a newer model of the series of computers that IBM initially released with the IBM System/360 back in 1964. The instruction set and system features have had some changes and additions in that timeframe, but in the end, most user programs written for the S/360 Model 30 in 1964 still run without any changes on the current systems that are being sold, such as the IBM zEnterprise 196 (though changes have required updates to systems level software, such as operating systems).<br />
<br />
Major landmarks are IBM S/360 introduction in 1964 (with a 24-bit address space), Virtual memory becoming standard on S/370 in 1972, 31-bit address space with S/370-XA in 1981, multiple CPU/SMP systems in 1973, LPAR (logical partitions) in 1980, S/390 with ESCON (10 and later 17 MByte/s fiber-based peripheral attachment), CMOS-based CPUs with the S/390 G3 in the 1990s, and 64-bit architecture in 2000 with the IBM z900. More information about all of these is available via google.<br />
<br />
<span class="Apple-style-span" style="font-size: large;">System Details</span><br />
<br />
The system is in a wide, heavy rack, about 30" wide and 76" tall, and about 1500lbs, according to IBM. This is a typical weight and size for an IBM rack of equipment (similar to older IBM S/390 and RS/6000 SP systems). Inside the rack, starting at the top are the rack-level power supply, processor and memory cabinet (CEC), and at the bottom, the I/O card enclosure. On a set of fold-out arms on the front side of the machine are the Service Element (SE) laptops, which are sort of a service processor - they manage loading firmware into the system, turning power on and off, configuring the hypervisor for LPARs, accessing the system consoles, and other low-level system tasks. They manage features such as Capacity Upgrade on Demand (CUoD), Capacity Backup, limiting the hardware to what you have actually paid for, and are serial number locked to the particular machine they're connected to.<br />
<br />
My machine is a 2086-A04 (which is common across all z890 systems), and configured as a 2086-140, with two dual-port fiber Gigabit Ethernet adapters, two dual-port 2Gb Fiberchannel/FICON adapters, and two 15-port ESCON adapters. In addition, the SE laptops connect to the outside world using a pair of 10/100 PCMCIA ethernet adapters. Earlier systems used Token Ring instead... I'm happy to not have to deal with Token Ring for this anymore.<br />
<br />
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-size: large;">Central Electronics Complex - CPU and Memory</span></div><div><br />
</div>The -140 configuration means that there's 1 CP (Central Processor), which runs at speed level 4 (on a scale of 1 to 7), which can run any z890-compatible OS. It also has one "IFL" (Integrated Facility for Linux), which is one processor core which runs at full speed (level 7), which is microcode locked to only running Linux, and doesn't count towards the speed rating of the machine.<br />
<br />
IBM mainframes are given a speed rating, originally in MIPS, and now in MSU, which is used to price software that runs on the mainframe. Mine is rated 110 MIPS, and 17 MSU. By comparison, a full speed CPU is rated 366 MIPS and 56 MSU, which is the speed of my IFL. The z890 came in 28 different speed increments (1-4 CPUS x 1-7 speed ratings) from 26 MIPS / 4 MSU to 1365 MIPS / 208 MSU, to closely match the amount of system speed you required, which helps keep your software costs down.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5182/5617522340_62603e406d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://farm6.static.flickr.com/5182/5617522340_62603e406d.jpg" width="320" /></a></div><div style="text-align: center;"><span class="Apple-style-span" style="font-size: x-small;"><b>Processor book, with memory removed</b></span></div><br />
The z890 is actually nearly the same as a z990 system, with the exception that it has only one processor book (out of 4 that can fit into a one-rack z990 system), and only scales to 4 user-accessible cores (there is one additional core, called a "System Assist Processor" or SAP, which is dedicated to doing system I/O handling). The z890 can scale up to 56 total processor cores.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5061/5616935741_59d1d46a1d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="http://farm6.static.flickr.com/5061/5616935741_59d1d46a1d.jpg" width="320" /></a></div><div style="text-align: center;"><b><span class="Apple-style-span" style="font-size: x-small;">System memory module - 8GB</span></b></div><br />
The system has 8GB of RAM, which is a custom module that plugs into the processor "book". The memory is available in 8GB increments up to 32GB of ram. The 24GB option, as there is only one RAM slot, is actually implemented as a 32GB module with 8GB "turned off" by IBM. As you will learn by working with these systems for a bit, IBM has an annoying habit of charging you to turn on parts of the system which you already own, but haven't paid to unlock yet.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5224/5616935209_99910745c3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="199" src="http://farm6.static.flickr.com/5224/5616935209_99910745c3.jpg" width="320" /></a></div><div style="text-align: center;"><b><span class="Apple-style-span" style="font-size: x-small;">STI cables and connectors</span></b></div><br />
Each processor book (which is only one for the z890) has 8 "STI" (Self-Timed Interface) links, which connect the CPU and memory to I/O adapters. In the z890, these links run at 2GBps (16Gbps). There are 7 that you can use in a fully configured system for I/O cards, and you can also use the remaining one (or more) to network (couple) systems together to build a system that is more redundant. With the apporpriate hardware, you can run these coupling links (but not at the full 2GBps) up to 100km, creating as IBM calls it, a "geographically-diverse" system, which can help provide for a disaster-recovery system link.<br />
<br />
<span class="Apple-style-span" style="font-size: large;">Peripherals</span><br />
<br />
Two things that I appreciate about this system compared to past systems are the ethernet on its SE (which also lets me boot the system from an FTP server on its network), and SCSI over Fiberchannel support, which lets me use standard FC raid arrays as storage for a Linux system.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5264/5617519860_6b13a367ed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://farm6.static.flickr.com/5264/5617519860_6b13a367ed.jpg" width="208" /></a></div><div style="text-align: center;"><span class="Apple-style-span" style="font-size: x-small;"><b>IBM 3174 Terminal Controllers and 3483 Terminal</b></span></div><br />
In addition, the FICON can act as a system channel (like ESCON or Bus & Tag) to appropriate peripherals, at speeds of up to about 200MBps. It also has ESCON, which is a more traditional connection, and allows up to 17MBps connection to peripherals. Parallel Channel (aka S/370 Channel, or Bus & Tag) peripherals can be hooked up using a protocol converter such as the IBM 9034. This will let me connect my 3480 cartridge-style Channel-Attached tape drives, 3174-21L 3270-style terminal controllers, and eventually 3420-8 vacuum-column 9-track tape drives, to the system.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5148/5617521022_9e348cbce5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="98" src="http://farm6.static.flickr.com/5148/5617521022_9e348cbce5.jpg" width="320" /></a></div><div style="text-align: center;"><span class="Apple-style-span" style="font-size: x-small;"><b>IBM 9034 Escon to Bus & Tag Converter</b></span></div><br />
<span class="Apple-style-span" style="font-size: large;">To Be Continued...</span><br />
<br />
Future posts will document installation and setup of Debian GNU/Linux, and peripherals.vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com4tag:blogger.com,1999:blog-5435461705142257233.post-45457552865074691322010-10-09T10:07:00.018-04:002010-11-20T13:23:38.301-05:00IBM p550 at home with Debian and Infiniband<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuFgf_gygK0tX6Fgm7N9aihINtE0YqwaE0sXE76Dd3CL-79JqtGa626hLJnVxchQfVqVH2k8Egx7Z5R8fIIPcmJhyAXNyFvX2zJUU93A_ed2D42ITXdQonQFen87YeqobqlNNC_yzgMds/s1600/p550-front-dsc02639.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 194px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuFgf_gygK0tX6Fgm7N9aihINtE0YqwaE0sXE76Dd3CL-79JqtGa626hLJnVxchQfVqVH2k8Egx7Z5R8fIIPcmJhyAXNyFvX2zJUU93A_ed2D42ITXdQonQFen87YeqobqlNNC_yzgMds/s320/p550-front-dsc02639.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5541699270602084898" /></a><br /><div>It's time for yet another blog post on getting once expensive machines running at home. </div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Introduction</span></div><div><br /></div><div>I'm working with an IBM pSeries machine called a p550 (specifically, a model 9113-550 in IBM speak). It was built in 2004, had a list price of some 10s of kilo-bucks new, has 4 x 1.5GHz POWER5, 8GB RAM, and runs AIX up through the most recent releases of AIX 7. </div><div><br /></div><div>It has a built-in hypervisor and what IBM calls "LPAR" support, which is a mode of virtualization which gives you "Logical PARtitions" of the memory and CPUs in the machine, with a granularity of 1/10th of a CPU. LPAR support requires a desktop machine that IBM calls an HMC, or "Hardware Management Console", which breaks out all of the logical consoles on the machine, and allows you to configure resource allocation and things like virtual ethernet switches and virtual SCSI adapters. In addition, a piece of software for the machine called VIOS or "Virtual I/O Server" is required for LPAR mode if you want to share hardware adapters (eg, ethernet, SCSI or Fiberchannel adapters) between OSes. Since I have neither of those, I am just running the machine in "bare metal" mode, with only one OS instance.</div><div><br /></div><div>For I/O, the system has a built-in SCSI raid, gigabit ethernet, a Service Processor which controls functions like power on the machine, 5 internal hot-plug PCI-X slots, and an external link that allows for more I/O trays with disk and PCI-X cards to be added. I have installed a Mellanox Infinihost Infiniband card, to hook up to my Infiniband fabric.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Making the Service Processor work for you</span></div><div><br /></div><div>In addition to the serial console port, the system has a pair of ethernet ports, which are designed to connect to a system HMC, but which also allow https-based access to the service processor menus. By default, it will try to get an address via dhcp, or you can configure it through the serial port. The Service processor requires you to log in to do anything. I believe that the default username/password combination is admin/admin. That's what we had it set to on the machines at work.</div><div><br /></div><div>To set the IP address, you need to navigate through the menus:</div><div>5. Network Services</div><div>1. Network Configuration</div><div>1. Configure interface Eth0</div><div>Then, chose either static or dynamic, and enter information as needed.</div><div><br /></div><div>In order to get this to work for me, I had to use Firefox, and enable an SSL option, because while it uses https, it uses a somewhat insecure method of doing SSL that is disabled by default. To enable this, put "about:config" in the address bar, and change the option "security.ssl3.rsa_null_md5" to "true". Once you do that, you can get to the web version of the service processor menus (ASPI in IBM-speak) at https://1.2.3.4 (replacing 1.2.3.4 with the IP address you set above).</div><div><br /></div><div>One additional thing you will probably want to set up is "Serial Port Snoop" under System Service Aids -> Serial Port Snoop. Setting a "Snoop String" will all you to enter a string through the serial console to force reboot the machine if it locks up, or you do something wrong while booting, and the console isn't set to the right place.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Installing Debian</span></div><div><br /></div><div>I net-booted the installer. To do this, set up the host in dhcpd.conf with an entry like this:</div><div><br /></div><div><div><span class="Apple-style-span">host p550 {</span></div><div><span class="Apple-style-span"> hardware ethernet 00:02:55:df:d5:dd;</span></div><div><span class="Apple-style-span"> fixed-address p550.blah;</span></div><div><span class="Apple-style-span"> next-server storage.blah;</span></div><div><span class="Apple-style-span"> filename "/tftpboot/debian-squeeze-ppc64-vmlinuz-chrp.initrd";</span></div><div><span class="Apple-style-span">}</span></div></div><div><br /></div><div>Boot the machine into OpenFirmware (hit "8" at the firmware "IBM IBM IBM IBM ..." screen), and net-boot from there:</div><div><br /></div><div><span class="Apple-style-span">0> boot net console=hvsi0</span></div><div><br /></div><div>If you don't boot with the right args from openfirmware, you won't get a working console when you boot into the installer. That's where the "serial port snoop" option from the service processor comes in handy.</div><div><br /></div><div>Once you get to the end of the installer, you will need to do some magic to get the bootloader (yaboot) installed. Hopefully, the Debian people will get some of this sorted out before the release of Squeeze. Tell the installer that you want a shell, then do this:</div><div><br /></div><div># mount --bind /dev /target/dev</div><div># chroot /target</div><div># mount -t proc proc proc</div><div># yabootconfig</div><div># ybin </div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Upgrading firmware</span></div><div><br /></div><div>Debian doesn't include binary update_flash in its powerpc-utils package. <a href="http://sourceforge.net/projects/linux-diag/files/powerpc-utils/">Download the latest binary release in RPM format</a>.</div><div><br /></div><div>Convert that to an rpm with Alien (apt-get install alien if you don't have it):</div><div><br /></div><div><span class="Apple-style-span"># alien powerpc-utils-1.2.3-0.ppc.rpm</span></div><div><br /></div><div>then</div><div><br /></div><div><span class="Apple-style-span"># apt-get remove powerpc-ibm-utils powerpc-utils</span></div><div><span class="Apple-style-span"># dpkg -i powerpc-utils_1.2.3-1_powerpc.deb</span></div><div><br /></div><div>Now, you can <a href="http://www-933.ibm.com/support/fixcentral/">download a new flash image</a> from IBM. Once you get it, use alien to convert and unpack the rpm, and do "update_flash ./tmp/fwupdate/01SF240_403_382", where 01SF240_403_382 is the flash image name from the RPM you downloaded. When you reboot the system, Linux will update the system flash just before rebooting.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Infiniband and beyond</span></div><div><br /></div><div>I had some problems initially getting Infiniband set up and going. I'm using a Topspin SDR Infiniband adapter, which is basically a stock Mellanox InfiniHost . It seems that the hypervisor on the machine wasn't allocating all of the resources that the card was asking for. </div><div><br /></div><div>After some discussion on the linuxppc-dev mailing list, it was pointed out that there are certain slots in the machine which the system calls "super slots", and which the firmware is willing to allocate more resources than a typical PCI-X card requests. <a href="http://www.redbooks.ibm.com/redpapers/pdfs/redp4095.pdf">This Redbook (PDF)</a> on IBM's redbook site details Infiniband usage on pSeries systems, Section 3.4.3 indicates which slots you may install an infiniband adapter into on certain machines. On a p550, these are slots C2 and C5. I had plugged my IB adapter into slot C1, which is why I was having problems.</div><div><br /></div><div>After getting it into the slot, it was just a matter of getting the right drivers loaded on the host OS. In order to use IP over Infiniband, you'll want the ib_ipoib module. To use RDMA and the Verbs interface, you'll want ib_umad and ib_uverbs modules to be loaded. At this point, it basically acts like a typical Linux system with Infiniband, just with more I/O bandwidth than you can get out of a typical PCI-X based system.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">What next?</span></div><div><br /></div><div>Setting up an HMC, and playing around with virtualization on the machine sounds like it could be a good time.</div>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com1tag:blogger.com,1999:blog-5435461705142257233.post-53698571090398908892010-10-02T21:46:00.007-04:002010-11-11T23:23:02.785-05:00Running an Altix 4700 supercomputer at home<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm5.static.flickr.com/4072/5168713184_c2d9f2cfe9.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 169px; height: 500px;" src="http://farm5.static.flickr.com/4072/5168713184_c2d9f2cfe9.jpg" border="0" alt="" /></a><div><span class="Apple-style-span" style="font-size: large;">Introduction</span></div><div><br /></div><div>At the beginning of the year, work decomissioned the SGI Altix 4700 system that we put into production around January 2007. It sat around unused, and we had little luck finding a buyer for the system - it seems that no one is really commercially interested in running Linux on big Itanium systems anymore.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">What's an Altix 4700?</span></div><div><br /></div><div>Briefly, an SGI Altix 4700 is a large multi-processor SSI (single-system image) supercomputer, which uses Intel Itanium 2 (in my case, 1.6GHz, dual-core Montecito) processors, and memory on blades, which are interconnected using a "ccNUMA" architecture. This stands for "cache-coherent Non-Uniform Memory Access" - basically, a method of making large SMP-like machines by gluing processors with local memory together with a system interconnect.</div><div><br /></div><div>With NUMA, unlike SMP, there is memory that is closer to (and thus faster from) each CPU. Like SMP, however, the system is contained in one single address space (unlike, say, a cluster which is connected using Ethernet or Infiniband). It thus runs a single OS image, and looks to the user like one large SMP system.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">System Specs</span></div><div><br /></div><div>The system that I have is contained within one rack, and has 4 "bricks", each with 8 processor blades, each blade containing 2 dual-core 1.6GHz Montecito and 16GB of RAM, plus one system I/O blade with disks, PCI-X slots, Gigabit ethernet, USB, etc, and assorted NUMA routing blades and system controllers.</div><div><br /></div><div>That totals 128 system cores, and 512GB RAM. The theoretical peak GFLOP rating of the system as configured is approx 820GF. Of course, 128 CPU and 256 DIMMs draw a bit of power...</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Powering/cooling a supercomputer</span></div><div><br /></div><div>Running as a full system, the computer draws 9kW of power, and requires 2 x 200-240V, 30A power circuits. That's a lot of power. I pay about $0.072/kWh, so running the system for one hour costs me about $0.65.</div><div><br /></div><div>One issue with running a system that draws 9kW is that you get 9kW of heat output. As a coworker of mine has said, at work we run heaters, that produce computation as a side-effect. The easiest and most cost-effective solution is to open up some windows, and turn on some fans. With an outside temperature of about 60F, I can set up a few fans, open some windows, and keep the temperature inside below 80F.</div><div><br /></div><div>It is possible to deal with this problem, to make the machine a bit more friendly and less power-hungry to run -- you can run less than a full system. By pulling out the blades that you don't want to run, you can cut down the power usage by a proportional amount. For testing purposes, I have run the system with either 1/2 or 1/8 of the blades running to reduce my power usage.</div><div><br /></div><div>One thing I've noticed is that EFI state information (its equivalent of a PC's "CMOS" configuration memory) is stored and updated only on one system blade. So, you really want to make sure that you have blade "0" (the bottom left blade in the chassis marked "001c01") installed, or booting will become much more difficult.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Installing Debian</span></div><div><br /></div><div>At work, we ran the machine with SuSE. Due to licensing issues, the fact that SuSE sucks to administer, and that I prefer to run Debian on things, I got to installing Debian. The machine runs EFI, Intel's "next-generation BIOS" that is used on Itanium (IA-64) systems, and some x86 (PC like) systems such as Apple's Intel-based systems. The boot process is pretty close to PXE booting, and Debian seems to have pretty good IA-64 support. The install went smoothly - I ended up installing "Squeeze" - the next version of Debian that will be released.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Kernel changes</span></div><div><br /></div><div>In general, the Debian kernel just works. However, it only has support for up to 64 cpus (cores) built in. I downloaded the latest kernel sources from ftp.kernel.org, primed the configuration with the Debian kernel config, adjusted the max number of CPUs, recompiled, and rebooted the system into the new kernel.</div><div><br /></div><div>I should note that being able to do a make -j 64 does a lot to speed up a kernel compile... :)</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">Running HPL</span></div><div><br /></div><div>HPL is the standard benchmark to test the effective speed of supercomputers, and is used by the ranking on the "Top500" list at <a href="http://top500.org/">http://top500.org</a>.</div><div><br /></div><div>HPL is also contained within the "hpcc" benchmark collection, which is how I ran the benchmark. At first, I tried the Debian package for hpcc. I got some fairly poor results, because it doesn't use an optimized "BLAS" math library. To speed things up, I went to TACC's web site and downloaded <a href="http://www.tacc.utexas.edu/tacc-projects/gotoblas2/">GotoBLAS2</a>, compiled that with the added gcc option "-mtune=itanium2", copied it to /opt, and built hpcc from its source. The instructions <a href="http://mail.csie.thu.edu.tw/~ctyang/HPCC_Readme1st.txt">here</a> are useful to build these two software packages.</div><div><br /></div><div><span class="Apple-style-span" style="font-size: large;">What next?</span></div><div><br /></div><div>The systems' CPUs aren't all that fast compared to modern CPUs. For example, the rating in Gigaflops of all 128 cores is about 4 x the rating of a 3.2GHz IBM/Sony Cell BE CPU. One place that the system does have an advantage, though, is its 512GB of DDR2 memory. Someone could easily plug an Infiniband, 10 Gigabit Ethernet, or Fiberchannel card into the machine, and turn it into a pretty snappy solid-state drive, accessible over iSCSI, FCoE, Infiniband SDP, or straight FC.</div><div><br /></div><div>The next item that I'm going to work on, is getting some FPGA blades from another Altix system working in the 4700, and test out writing code to use the FPGAs to speed up compute intensive tasks. An example of what FPGAs are typically used for is to search a genomics database for a particular DNA sequence. Basically, any algorithm that is applied to a stream of data can be a good candidate for putting into an FPGA.</div>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com3tag:blogger.com,1999:blog-5435461705142257233.post-88273302602667718012010-08-10T21:33:00.011-04:002010-08-10T22:34:02.032-04:00The HTC Evo and a VT125<div>This follows on from my <a href="http://worldofvax.blogspot.com/2010/08/compiling-simh-emulators-for-android.html">previous blog post</a> about booting ancient OSes on emulators for ancient computers on your Android phone.</div><div><br /></div><div>Since I still have an extensive collection of vintage DEC hardware, I decided to extend what I had been working on by connecting some vintage hardware up to the emulated system.</div><div><br /></div><div>The first thing I had at hand was a DEC VT125 terminal - a close relative of the VT100, which includes some added graphics support. A quick power-up verified that it work. Now, to get it to talk to my phone's emulated VAX.</div><div><br /></div><div>Now, I didn't have any good way of connecting a serial port directly to my phone, but SIMH does support a telnet connection to the emulator's console by doing a command like this (2301 is the TCP port to accept connections on):</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">sim> set console telnet=2301</span></div><div><br /></div><div>Now, to create a telnet session from my VT125, I grabbed a Xyplex MAXserver 1640 from my bastement. These are similar to a vintage DECserver, but support telnet (and many other things) in addition to the usual DEC-specific LAT protocol. Basically, I can hook a terminal up to this, and use it to telnet to a host. It also works the other way around, so that I can hook a system's serial port up to it (such as a console port), use telnet to connect to the MAXserver, and connect to the serial console on the physical machine. This later setup is something we do with systems at work, and is very commonly done, as opposed to connecting serial terminals up to network-attached hosts, like I am trying to do.</div><div><br /></div><div>For the purposes of this post, I won't go into detail on how to set up a MAXserver, but I basically placed a boot image on a tftp server, told the MAXserver to boot from that image, gave it an IP address, and told it to reset itself to default settings.</div><div><br /></div><div>To connect the MAXserver to the VT125, I used a RJ45 serial cable (a "roll over" cable) and DB25 to RJ45 adapter, which has the same pinout as a Cisco RJ45 to DB25 DTE serial cable. Ethernet then connects the MAXserver to my home network.</div><div><br /></div><a href="http://farm5.static.flickr.com/4134/4880472647_9f13640d36.jpg"><img src="http://farm5.static.flickr.com/4134/4880472647_9f13640d36.jpg" border="0" alt="" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 500px; height: 333px; " /></a><div style="text-align: center; "><br /></div><div>Next, I set my phone to connect over WiFi to my home network, and noted its IP address. After turning on my VT125, booting the MAXserver, and starting up the emulated VAX on my phone. From there, I told the MAXserver to connect to my emulated VAX console:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">Xyplex> connect 172.27.3.150:2301</span></div><div><br /></div><div>Now, just boot the emulated VAX, and enjoy!</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiizW9gJ1I1bVg5UvoAJmHAvwx_9-APrNhQcnkIcSUxGqb6ok8Hx3g68ySn86z889rVJAgxERnmwbC5QJfRPJ4Gt-3un2nSze3PqGRNCO5AvvmO1FcUi2LNZPi3nRU1adl9Jz-S4POq2tA/s1600/evo-simh-vt125-43BSD-booted-dsc02448.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 309px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiizW9gJ1I1bVg5UvoAJmHAvwx_9-APrNhQcnkIcSUxGqb6ok8Hx3g68ySn86z889rVJAgxERnmwbC5QJfRPJ4Gt-3un2nSze3PqGRNCO5AvvmO1FcUi2LNZPi3nRU1adl9Jz-S4POq2tA/s320/evo-simh-vt125-43BSD-booted-dsc02448.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5503970756785775026" /></a><br /><div>I have more pictures up on my <a href="http://www.flickr.com/photos/vax-o-matic/sets/72157624699224958/">flickr account</a>.</div>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com3tag:blogger.com,1999:blog-5435461705142257233.post-2824995058883235942010-08-07T09:41:00.009-04:002010-08-11T13:14:11.459-04:00Compiling SIMH emulators for Android<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7TudP38lVsM5jc15sQRB0gGb2sAqMhB24WIyDSUfmhiBnRiuvogi6vWu9RBXurbxwCZf7BsXayZfQLUzpLBXTe1UnjgmzQQn_bHfS46KForqY68xDmo1B6A9PJcoRnHb8zJznmJ43EaY/s1600/43bsd-evo-1-100804.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 234px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7TudP38lVsM5jc15sQRB0gGb2sAqMhB24WIyDSUfmhiBnRiuvogi6vWu9RBXurbxwCZf7BsXayZfQLUzpLBXTe1UnjgmzQQn_bHfS46KForqY68xDmo1B6A9PJcoRnHb8zJznmJ43EaY/s400/43bsd-evo-1-100804.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5504136087402832786" /></a><div style="text-align: left;"><span class="Apple-style-span" style="color:#0000EE;"><u><span class="Apple-style-span" style="color:#000000;"><br /></span></u></span></div><div>In order to make this process easier on my phone, I used a rooted firmware. It will take some more effort to get this to work as a packaged application.</div><div></div><div><span class="Apple-style-span" style="font-size:large;"><b>Setting up the development environment.</b></span></div><div></div><div>To get started, you'll need a working native C compiler for Android. After a lot of trial and error, I ended up discovering what I had to do. I used an amd64 architecture version of <a href="http://www.debian.org/">Debian GNU/Linux</a>, <a href="http://www.ubuntu.com/">Ubuntu</a> works the same way. Using a Linux host to compile the code if not essential will make your life a lot easier. Follow <a href="http://source.android.com/source/download.html">the official instructions</a> to download the source to Android using git, and then build it.</div><div><br /></div><div>Along with doing that, I tested this on the Android emulator, which is a part of what you just downloaded and built, under <span class="Apple-style-span" style="font-family:'courier new';">out/host/linux-x86/bin</span>. Put that directory in your path, and run the "android" command, create a virtual platform, and boot it. From the command line, if you built a virtual device named "Android21", for example, you'll want to run "emulator -avd Android21 -shell" so that you can get a shell on the virtual device. To copy files over to the image, the easiest method that I've found is to shut down the emulator, mount the virtual sdcard image (for these examples, I'm using "Android21" as the virtual device name):</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ sudo mount -o loop ~/.android/avd/Android21.avd/sdcard.img /mnt</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ sudo cp whatever /mnt</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ sudo umount /mnt</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div>In addition, you will want the "agcc" script to make it easier to compile things. Download it from <a href="http://plausible.org/andy/agcc">here</a>. I modified my copy to use gcc-4.4.0 instead of gcc-4.2.1. You will need to add the location of arm-eabi-gcc to your path, and change all references of "4.2.1" in the agcc script to "4.4.0" and add that to your path. arm-eabi-gcc can be found under the <span class="Apple-style-span" style="font-family:'courier new';">prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin</span> path of where you built the android sources.</div><div><span class="Apple-style-span" style="font-size:large;"><br /></span></div><div><span class="Apple-style-span" style="font-size:large;"><b>Fixing the Android SDK and SIMH makefile</b></span></div><div><br /></div><div>The current version of the Android libc (bionic) headers has a problem compiling when bionic/libc/kernel/arch-arm/asm/byteorder.h is included. In order to make the file compile, comment out these lines, lines 22-27 in my copy:</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">/*#ifndef __thumb__</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">* if (!__builtin_constant_p(x)) {</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">*</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">* asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">* } else</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">*#endif */</span></div><div><br /></div></div><div>Once you do that, you will need to need to download the <a href="http://simh.trailing-edge.com/">SIMH sources</a>. Unpack them, and modify the the makefile in the top directory, to make the following changes:</div><div><br /></div><div>On line 12, remove <span class="Apple-style-span" style="font-family:'courier new';">-lrt</span> from <span class="Apple-style-span" style="font-family:'courier new';">OS_CCDEFS</span>, so that it reads:</div><div><span class="Apple-style-span" style="font-family:'courier new';">OS_CCDEFS = -lm -D_GNU_SOURCE</span></div><div><br /></div><div>Change all references of "<span class="Apple-style-span" style="font-family:'courier new';">gcc</span>" to "<span class="Apple-style-span" style="font-family:'courier new';">agcc</span>".</div><div><br /></div><div>Only some of the simulators actually compile, and I haven't tried to compile network support for any of it. In order to get network support, you would need to compile libpcap as well. For now, that is left as an exercise for the reader. :)</div><div><br /></div><div>After those changes, I just did <span class="Apple-style-span" style="font-family:'courier new';">make vax vax780</span> to build the MicroVAX 3900 and VAX-11/780 simulators, which can be copied over to your phone or emulator. You will probably get a bunch of warnings about the use of variable-size enums versus 32-bit enums. They seem to be harmless, and I'm pretty sure that you can ignore those warnings.</div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>If you're too lazy to compile it</b></span></div><div><br /></div><div>If you don't feel like spending the time to set up a development environment, and compile SIMH by yourself, I have a <a href="http://computer-refuge.org/classiccmp/android/">pre-compiled version</a> for Android available. I used SIMH v3.8-1, which is the newest release as of this posting. You can get a pre-compiled copy of the Android emulator to test on from the pre-compiled <a href="http://developer.android.com/sdk/index.html">Android SDK</a>. After you download and unpack that, you will need to put the tools directory inside the sdk into your path.<br /><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>Preparing your phone and copying things over</b></span></div><div><br /></div><div>You will need a rooted phone to make this work easily. Rooting your phone is left as an exercise for the reader. Once you have root permissions, you will need to USB debugging on your phone. On my Evo, it's under Settings -> Applications -> Development -> USB debugging.</div><div><br /></div><div>You will need an application that will work as a terminal emulator on your phone. You can use "<span class="Apple-style-span" style="font-family:'courier new';">adb shell</span>" from the Android SDK, which will give you a shell from your phone on your computer. To run completely hosted from the phone, use something like <a href="http://code.google.com/p/connectbot/">ConnectBot</a>. </div><div><br /></div><div>From this point you can copy files necessary for the emulator to your phone. I copied the necessary files all to my phone's SD card:</div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ adb shell mkdir /sdcard/simh</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ adb push BIN/vax /sdcard/simh</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ adb push VAX/ka655x.bin /sdcard/simh</span></div><div>...</div><div><br /></div><div>Now, use adb shell to do a few things on the phone itself. Pay attention to what your phone is saying, as the first time you try to "<span class="Apple-style-span" style="font-family:'courier new';">su</span>" on your phone, it may pop up a dialog asking if this is ok. Whether or not you see that will depend on exactly how you rooted your phone. If "<span class="Apple-style-span" style="font-family:'courier new';">adb shell</span>" gives you a "#" prompt straight away, you don't need to use su, as you're already root.</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ adb shell</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">$ su - </span></div><div><span class="Apple-style-span" style="font-family:'courier new';"># mkdir /data/simh</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"># cat /sdcard/simh/vax</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"># chmod 755 /sdcard/simh/vax</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">It is necessary to put any executables on the internal storage (eg in <span class="Apple-style-span" style="font-family:'courier new';">/data/simh</span> like I did), because you cannot directly execute binaries from the sdcard, at least in Android 2.1.</span></div><div><br /></div><div><span class="Apple-style-span" style="font-size:large;"><b>Running a SIMH emulator</b></span></div><div><br /></div><div>Once you've done that, as root on the phone, do something like:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"># cd /sdcard/simh</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"># /data/simh/vax</span></div><div><br /></div><div>And then just use SIMH as you normally would.</div><div><br /></div><div>Connectbot allows for multiple simultaneous sessions, so you could do "<span class="Apple-style-span" style="font-family:'courier new';">set console telnet=2300"</span> inside the emulator, and then open another telnet session in connectbot to 127.0.0.1:2300 to connect to a separate console. Connectbot simulates "screen" as a terminal emulator, which seems to do an adequate VT100 emulation for most things. The most I've tested it so far it running <span class="Apple-style-span" style="font-family:'courier new';">/usr/games/worms</span> from 4.3BSD, after "<span class="Apple-style-span" style="font-family:'courier new';">setenv TERM vt100"</span>. If you have your device on a WiFi network, you could even use another machine to telnet into SIMH and be the console, or another emulated serial terminal on the system.</div><div><br /></div><div>That's it! If you don't know what to do from here, take a look around the <a href="http://simh.trailing-edge.com/">SIMH site</a>, you can run things like ancient versions of UNIX, OpenVMS through HP's hobbyist program, NetBSD, or play with the other emulators and other OSes. Where you go from here is up to you.</div><div><br /></div><div>EDIT Aug 8, 2010:</div><div><br /></div><div>I forgot to add the pictures that I have taken of this. <a href="http://www.flickr.com/photos/vax-o-matic/sets/72157624653779094/">Check them out</a> on flickr. I also now added the picture to the top.</div>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com4tag:blogger.com,1999:blog-5435461705142257233.post-48602530140471602122010-08-06T11:17:00.004-04:002010-08-06T11:43:28.172-04:00Back againAfter a bit of a hiatus from posts, I'm back again. <div><br /></div><div>I've finished a big hurdle in the start of downsizing and creating focus in my computer and interesting technology collection, and after finally buying a house, I have completely finished moving out of a ~2500 sq ft warehouse that I was using to store my collection. At its peak, it was stacked high with equipment, and paths to navigate through the space were sometimes non-existent. </div><div><br /></div><div>I have since resolved to limit the size of my collection, and thus the number of projects that I want to do. As a direct result of my massive work in downsizing (with critical help from friends for some larger items and a push to finish up towards the end of July - but otherwise mostly done by myself over the January through July of 2010), I now have time to work on projects instead of just spending all of my time moving things back and forth.</div><div><br /></div><div>I replaced my old iPhone 1.0 with an HTC Evo, running Android, back in June when they came out, and have been exceedingly happy with it. As a direct result of how easy it is to hack and develop on, I have started some projects involving running computer simulators on it. Currently, I have the set of VAX emulators (VAXstation 3900 and VAX-11/780) from <a href="http://simh.trailing-edge.com">Bob Supnik's Simh emulator collection</a> running both 4.3BSD and OpenVMS, with a minimal amount of work.</div><div><br /></div><div>I have <a href="http://www.flickr.com/photos/vax-o-matic/sets/72157624653779094/">posted pictures of 4.3BSD running</a> both on the Android emulator, and my phone on my Flickr account.</div><div><br /></div><div>My next post will describe what I had to do to get Simh to compile and run on my phone, and after playing with that, my next target is the <a href="http://www.hercules-390.org">Hercules IBM Mainframe emulator</a>.</div>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-5594646596715379922009-02-28T11:03:00.002-05:002009-02-28T11:06:14.171-05:00New blogI've created a <a href="http://rcac-coates.blogspot.com">new blog</a> to keep track of the progress we're making at work on our new Coates cluster that we're putting in this spring. I know I haven't posted here in a while, but I expect to spend more time posting to that one (and I want to keep the content separate from my personal blog anyways).vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-84368037950950525692008-06-26T18:34:00.005-04:002008-07-04T15:34:11.717-04:00A supercomputer reborn<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQtkkgnwLQigZWp1-_TSbxKsuvMsuP92fI-FkI3rFyaJoAQOn81NdOATe1Ba22vzK8qk42sXqpVBrlkt03Kl4N25ptqzG-rN8eA2cG8y0vKBvDrl1lvq2CguM0KlX53mHye_ABMBmr1k8/s1600-h/highnode_frame_3_nodes.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQtkkgnwLQigZWp1-_TSbxKsuvMsuP92fI-FkI3rFyaJoAQOn81NdOATe1Ba22vzK8qk42sXqpVBrlkt03Kl4N25ptqzG-rN8eA2cG8y0vKBvDrl1lvq2CguM0KlX53mHye_ABMBmr1k8/s320/highnode_frame_3_nodes.jpg" alt="" id="BLOGGER_PHOTO_ID_5219242674589310194" border="0" /></a><br /><br /><br />After my last entry, I have spent a bit of time poking at Linux kernel versions, and found what I had created last time I tried to do a Debian install on one of the SP high nodes: a custom compiled version of the 2.6.8 kernel, with the Debian Sarge installer thrown in as an initrd. To my amazement, it actually booted, and I had a system running a somewhat useful version of Linux again, instead of <a href="http://www-03.ibm.com/systems/p/os/aix/index.html">AIX</a>.<br /><br />Now, my next goal is to get this system to run the latest kernel release, and up-to<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhycPF6AGxsyEMDBcXP3jbJxWVpoNrGVRpz7GUUJa1jdvJU5yiAeTVGyGAERFeWvbLdb8MaTLpHBlXGQFQMC_teinvLJ2k12WH1H5yQqjA0Uibf7yKMKRDdTHpiHKctkockvAnbAa1x1OI/s1600-h/highnode-memory-board.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhycPF6AGxsyEMDBcXP3jbJxWVpoNrGVRpz7GUUJa1jdvJU5yiAeTVGyGAERFeWvbLdb8MaTLpHBlXGQFQMC_teinvLJ2k12WH1H5yQqjA0Uibf7yKMKRDdTHpiHKctkockvAnbAa1x1OI/s320/highnode-memory-board.jpg" alt="" id="BLOGGER_PHOTO_ID_5219242884461843794" border="0" /></a>-date software. I managed to locate my set of 32GB of ram for the system (arranged as 128, 256MB modules!), plug that in, and end up with a system that has more memory than disk space, and has more memory used when it boots (from things like <a href="http://en.wikipedia.org/wiki/Page_table">page tables</a>) than there is on the disk. Right now, I seem to be having trouble booting any kernels past 2.6.8 on the system, ending up with the kernel causing bad page faults while it tries to set up the MPIC on the system (that's the interrupt controller for <a href="http://en.wikipedia.org/wiki/PowerPC">PowerPC</a> systems).<br /><br />After I get both of those in place, I am hoping to take a spare fiber channel card, the SCSI/FC target driver in the current Linux kernel, and turn the system into a 32GB or so solid-state disk. I'm thinking that this would be a good concept to test, as it's way cheaper than getting a modern sold-state disk from <a href="http://www.texmemsys.com/">Texas Memory Systems</a>. In fact, you can pick up a new commodity x86 system with 128 or 256GB of ram and a fiber channel card or two for significantly less than a commercial solid state disk solution.vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-59931669571688285112008-06-22T19:03:00.012-04:002008-06-23T15:47:16.822-04:00The death of a supercomputer<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3z-ybHiMZMnWpXDeVy-Wwb0ZYHDGjlfkZLZW5tGidV6pigCrRWz9-8tyb_sPjawlo1HNsHo53WyiGCb8zTT24UQ7umLiSH2FtDj2T0WYFm6UquTx2Gzcxu11fnYtBWVE7h5cJxe2T0Xs/s1600-h/gs-backrow.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3z-ybHiMZMnWpXDeVy-Wwb0ZYHDGjlfkZLZW5tGidV6pigCrRWz9-8tyb_sPjawlo1HNsHo53WyiGCb8zTT24UQ7umLiSH2FtDj2T0WYFm6UquTx2Gzcxu11fnYtBWVE7h5cJxe2T0Xs/s320/gs-backrow.jpg" alt="" id="BLOGGER_PHOTO_ID_5215160704948971282" border="0" /></a><br /><br />In Feburary of 2005, Purdue was given the hardware that used to be Blue Horizon, the <a href="http://www.sdsc.edu/">San Diego Supercomputing Center</a>'s old IBM RS/6000 SP supercomputer, which was purchased through funding from <a href="http://www.nsf.gov/">NSF</a>. When <a href="http://access.ncsa.uiuc.edu/Briefs/00Briefs/000215.NPACI.html">it was new</a> in 2000, it <a href="http://top500.org/system/ranking/5011">placed 8th</a> on the list of the<a href="http://top500.org/"> top 500 supercomputers</a> in the world. When Purdue acquired it, the system was well off the bottom of the chart. The system was a set of 144, 8-processor 375MHz POWER3 "SP high node" (9076-N81) systems with 4GB of ram each.<br /><br />The people in charge of my department, named the <a href="http://www.rcac.purdue.edu/">Rosen Center for Advanced Computing</a> had decided that the price of the system (free plus shipping) was good enough to send two of our hardware guys out to condense the system down, maxing out the systems, and going from two 4-processor modules to four modules (16 processors) and from 4GB to 16GB of memory per system. At the time, we had the free power and floorspace, so it seemed like it could be a reasonable idea, and the systems were still computationally useful for a year or so after we got them. We condensed the system down from nearly 40 racks of machines to just 10, each one somewhere around twice as fast as my dual-G5 in doing a Linux kernel compile (one of my standard metrics for testing speed; I did this under a <a href="http://debian.org/">Debian</a> Linux install on both systems).<br /><br />Unfortunately. the amount of time and effort necessary to set up an IBM SP and AIX to be a useful compute resource is non-trivial. Adding to the problem, we lost two of our senior systems administrators in the Summer of 2005, one of which was our AIX guru and had set up our existing <a href="http://www.rcac.purdue.edu/userinfo/hardware/ibmsp.cfm">IBM SP system</a>s. I had played around a bit with our testing SP cluster, including reinstalling it, and discovered how much effort is required to make a useful system. Just the software necessary to do a base OS install on an SP has <a href="http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.pssp.doc/pssp35/am0immst/am0immst35.html">an install manual</a> that's over an inch thick.<br /><br />So, by Summer of 2006, our management finally decided that we should get rid of the system, which meant that some of it would be coming home with me. So, I purchased the system from Purdue's surplus store for somewhere around $500.<br /><br />The first rack of nodes (there's four nodes per rack) went onto ebay, and sold to a researcher in China for about enough money to pay for my endeavor. I shipped one more rack to a computer collector in New Jersey, and a Saturday evening after the annual <a href="http://www.vintage.org/2005/midwest/">Vintage Computer Festival/Midwest</a> show that I ran, one more rack of systems was loaded into <a href="http://computer-refuge.org/compcollect/ibm/rs6k/sp-dan/">the back of a Toyota minivan</a> and headed up with a lawnmower to Ontario, Canada. Later, a second rack would go to Canada, a few would get scrapped for parts, some nodes were stripped for ram to sell to a reseller, another rack to a company in Minnesota, and the rest sat around in my warehouse until they got scrapped, or used for parts. All that remain are two of the original nodes, and a few boxes of boards, heat sinks, memory and other parts that need to go a scrapper, so that they can be recycled.<br /><br />I'm still keeping the two nodes, and 8 or so SP thin nodes (9076-270) , partly because the POWER architecture is neat, and partly because a machine with 16GB of ram in it is still kinda pricy. Plus, in a bit more than a month, we'll be retiring our remaining SP system, which has memory modules that can push my two nodes to 64GB each. Sure, you can buy <a href="http://shop.sun.com/is-bin/INTERSHOP.enfinity/WFS/Sun_NorthAmerica-Sun_Store_US-Site/en_US/-/USD/ViewStandardCatalog-Browse?CategoryName=Sun_Fire_X4600_Se_1&CategoryDomainName=Sun_NorthAmerica-Sun_Store_US-SunCatalog">faster machines</a> with the same amount of memory, which are smaller and use less power, from people like <a href="http://www.sun.com/">Sun</a>, but I can also pay for a lot of power with the amount of money that one new machine would cost.<br /><br />I've actually managed to get Debian Linux running on them; they don't work with many kernel version, but a 2.6.8 kernel that came with a past Debian installer seemed to work OK with them. I'm trying to revive the nodes I have, but I don't seem to be able to acquire the bootable installer anymore from the usual Debian places, and I'm not sure if I have it archived off somewhere accessible. Still, I should be able to take an installed copy running on a different machine, clone it and rebuild and install the correct kernel version, and boot that on the system. I just haven't had enough time or <a href="http://www.ohmenerves.com/wp-content/uploads/round-tuit.jpg">round tuits</a> to do that yet.<br /><br />So it seems, even in the death of a supercomputer, the machine still lives on, dissected, and disseminated to other countries, providing what help it can to further science, maybe just become an <a href="http://computer-refuge.org/compcollect/">interesting conversation piece</a>, or even become recycled into parts for <a href="http://www.sicortex.com/">tomorrow's supercomputing hardware</a>.<br /><a href="http://www.rcac.purdue.edu/"></a>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com0tag:blogger.com,1999:blog-5435461705142257233.post-89838408977461197182008-06-20T21:58:00.006-04:002008-06-30T14:09:08.908-04:00"My" SiCortex SC5832<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigUl1vm5gPkwgbtCrXLSMu_A55x2YWDKXQhyphenhyphenS_npWmXCi8qfCIkUPs1s_shwZuPCfH3JxZ-_ea_n0baL9Ey3tqvHrkI7UlNeFSfZn0MogMR6EW4SV_9aqXYDkTx7Vo4WUb-wXDZUf0Nis/s1600-h/sc5832-running-diagnostics.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigUl1vm5gPkwgbtCrXLSMu_A55x2YWDKXQhyphenhyphenS_npWmXCi8qfCIkUPs1s_shwZuPCfH3JxZ-_ea_n0baL9Ey3tqvHrkI7UlNeFSfZn0MogMR6EW4SV_9aqXYDkTx7Vo4WUb-wXDZUf0Nis/s320/sc5832-running-diagnostics.jpg" alt="" id="BLOGGER_PHOTO_ID_5214158066931791858" border="0" /></a><br />Well, I actually just run it, my employer, <a href="http://www.rcac.purdue.edu/">Purdue</a> actually owns it for now. But, in 5 years or so, maybe I'll get a chance to buy it for my own enjoyment, just like other things I've managed to <a href="http://flickr.com/photos/vax-o-matic/sets/72157604250494818/">collect</a>.<br /><br /><a href="http://flickr.com/photos/vax-o-matic/sets/72157605404391067/">It</a> is a fun little MIPS processor cluster in a box, the one we have is populated with 540 nodes, each with 6, 64-bit MIPS cores and 8GB of ram. The cores are kinda poky (500MHz), but each node CPU chip (with 6 cores, a PCI-E controller, two DDR2 memory controllers, and the high-speed interconnect fabric switch) draws a whole 600mW. The system draws less than 11kW as we have it configured now, and looks quite pretty. That's approximately the same amount of power that a single rack of 24 of our new "<a href="http://news.uns.purdue.edu/x/2008a/080505McCartneyBuild.html">steele</a>" cluster nodes uses (which are Dell 1950s with dual, quad-core Xeon E5410 CPUs and 16 or 32GB ram each).<br /><br />We got the system as a "green" computing initiative that we've been working on, as our new <a href="http://www.purdue.edu/president/">President</a> seems quite interested in doing green things. It is also one of the few things we have that's not a commodity x86 cluster for HPC. We got this just after replacing three of our old compute clusters (dual processor, single core things) with a new, dual-socket quad-core cluster, also in the name of green computing. Hopefully this will stave off our need for a new datacenter, at least another year or two.<br /><br />There is some home that the system will help revive an old project, started by the late David Moffett, called the "<a href="http://www.purdue.edu/UNS/html4ever/031101.Bottum.Sun.html">High Performance Classroom</a>"; allowing students to learn about parallel computing though the use of dedicated compute time on the system. <a href="http://www.bigncomputing.org/Big_N_Computing/Big_N_Computing/Entries/2008/6/2_Why_Johnny_Can%E2%80%99t_Write_Parallel_Code.html">The idea</a> was suggested by Matt Reilly of SiCortex when he came to visit Purdue and <a href="http://www.bigncomputing.org/Big_N_Computing/Big_N_Computing/Entries/2008/6/2_Why_Johnny_Can%E2%80%99t_Write_Parallel_Code.html">talk about the system we have</a>. This is one of the few machines that my work owns that weren't purchased with funds from users or specific grants, and which we actually have some leeway at specifying at how the system gets used.<br /><br />Our other discretionary resource is a cluster of 3-year old desktop computers, that gets updated ever year; old machines from student computer labs get rotated out of use after 3 years, and into a cluster of machines that's about 500 machines in size. It's the only dedicated resource that we current have running that anyone on campus could get an account to run their own jobs on. Some of these machines are pictured in the background of the picture of the SiCortex above.<br /><br />In any case, hopefully our higher-up management decides that the SiCortex is a good enough machine to keep around (we got in on a sort-of rent-to-own plan), and use to help further one of the fundamental goals of Purdue - not the Research that keeps bringing in money, and fancy awards and prizes, but Teaching Students, which sometimes seems like it gets forgotten behind the other, gold-plated awards from the <a href="http://nsf.gov/">NSF</a> and other organizations for research.<span style="display: block;" id="formatbar_Buttons"><span class="on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"></span></span>vaxhttp://www.blogger.com/profile/08676313506833951435noreply@blogger.com1