Friday, November 19, 2021

"Look up in the sky!"

 Although it was a classroom full of PET 4032s that got me interested in Commodore back in the early 80s, the first PET I would ever own myself was the Commodore SuperPET.

I was not yet collecting at this point, so I thought this would be the only PET I would ever own.  For that reason, I was very careful in which model I picked.  I wanted the best.

Over the years, the numerous exotic programming languages, such as Waterloo BASIC, APL, Pascal, COBOL, etc have provided me countless hours of education and entertainment.  Lately, however, my appreciation of this machine has leapt into the stratosphere.  

It began with a purchase of Retro Innovations Super OS/9 MMU. OS/9 is a 6809-based business operating system not normally associated with Commodore computers, and this hardware upgrade would allow my SuperPET to run it.   The Super MMU, originally designed by TPUG, provides a new optional method by which the 6809 can address its extra 64K.  Normally, this memory is only available in chunks at a particular address window.  The SuperMMU allows the ram to dominate the entire address space, making it friendlier to OS/9.

The Super MMU sits between the 6809 processor and the SuperPET cpu daughterboard.  It also replaces the functionality of a 74LS273 on the board through that cable you see in the picture.  The position of the cable depends on which kind of SuperPET you have.  Two-Board SuperPETs, like mine, use the upper position, while Three-Board SuperPETs use the lower one.  It also took me forever to figure this out, but the jumper JP2 pictured here also needs to be changed to reflect your board type.  Again, the upper position is 2-board, and the lower 3-board.  You can see I have it wrong in this picture, thus the "taking a long time to figure out" part. :)

The OS/9 disks themselves came from Mike Naberezny, who also had a hand in helping bring the MMU project back to life.  The disk format for PET OS/9 is extremely strange.  OS/9 "disks" exist as 640 block RELative files on an 8050 disk.  Thus, for best results, you also kinda need a CBM 8050 drive to use with it, since other PET drives, such as 2040, 4040, etc can only fit one image per floppy, the SD2PET doesn't support REL files well enough, and the CBM 8250 requires special commands to support the 8050 REL file format.

Once the MMU was installed and the disks prepared, I was ready to boot.  This involved typing Disk8/0.os9 at the SuperPET 6809 menu screen.

After mentioning my adventures on facebook, a wonderful human being named Andy shared his SuperPET software collection with me.   Even more important, he shared his *knowledge* regarding the enigmatic loading procedures required to boot and use the several new programs.  For example, take a look at some of the commands required to boot Collossal Cave:

I have not yet made this software available on my FTP site, but it will be soon.

Not long after this, I discovered the web site of a Mr. Robert Ferguson.  He not only assembled a fantastic timeline of the SuperPET, but actually *reverse engineered* the RS232C-based "HOSTCM" filesystem protocol used by the SuperPET to transfer files to and from mainframes back in the day.  He even provides his C source.

This provided me an amazing opportunity.  You see, my user's group designed an RS232C modem, the "Gurumodem", that actually has an SD-card interface on it.  How perfect is that?! 

So, I immediately got to work porting Mr. Ferguson's code to work with the Zimodem firmware used by our modem.  While I probably could have just cut and pasted 90% of it, I instead decided to re-type and refactor while reading, so that I could actually learn how the protocol worked as I went along.  This is a bit like copying your friends homework in your own words, I guess. :)

Of course, the first step was to configure the Gurumodem for the SuperPET's default RS232 settings with the command: ATB"2400,7E1"  followed by ATS54=2S46=2&W.  Obviously, I did this on another computer at first.

I then used a very dumb and simple SuperPET terminal program called "NEWTERM" to upgrade my firmware to a special version containing the HOSTCM protocol using the command AT&U=9000.

Once the firmware upgrade completed, and I had reset the modem, I was ready to activate HOSTCM mode by entering AT+HOSTCM while inside NEWTERM.

From here on, I was able to access the SD card on my Gurumodem using the built-in syntax that involves prefixing filenames with "host./".   Above is an example from inside the SuperPET text editor, using the DIrectory command to list the contents of my SD card.

Well, that's all I've got for today.  I'd like to find a way to exercise some of the features of the HOSTCM protocol not used by the Editor, but I'll have to think about that one.   Until then, if you have a SuperPET, I encourage you to get the most from your computer by taking a look at both the Super OS/9 MMU and the Gurumodem.