• Please review our updated Terms and Rules here

Transferring Source Code from Windows to a PDP-12

m_thompson

Veteran Member
Joined
Jul 8, 2014
Messages
1,985
Location
Rhode Island, USA
I have the source code for Spacewar! for the PDP-12. It has been modified by several people to fix bugs, and the RICM modified it to use PDP-1 style game controllers that we made.

I assembled it with PALBART on my laptop and used the RIM loader to load it into the PDP-12. That works OK.

I used John Wilson's PUTR program to copy the source to an RK05 image, mounted the image with SerialDisk, and use OS/8 COPY to move the source from the RK05 image to the physical RK05. The source code got really mangled in the process. I used OS/8 to list the source code on the RK05 image, and it is also mangled. Maybe the problem is PUTR?

Is there a recommended procedure to move text files from a PC to a PDP-8?
 
Mangled how? Totally unreadable or something less tragic? I know on DOS to Linux/Linux to DOS transfers one has to run dos2unix or unix2dos to get the right carriage return/line feed set for the system going to. I am guessing this in not the issue though.
 
What I do to move from PDP-8 diskimage to regular file is to just run os8xplode.

To go the other direction, run os8xplode as above, then move your new files into the .0 or .1 subdirectory. Then it's a two-step process:
1) os8implode scans the sub-directories, finding file names that match the 6.2 naming convention, and creating an XML dexcription of the proposed new volume.
2) mkdsk reads the XML created above, consctructing a new disk image.


This really works a treat with SerialDisk images, because you can just arrange to serve "image.new".

Vince
 
Are you able to bang it out as a virtual paper tape image?

I thought about that, but right now the reader-run signal on the PDP-12 isn't working correctly so there is no hardware flow control. On the PDP-9 the source files are not just text, they are an editor file. I didn't know if that was also true with the PDP-8.

I have KERMIT12 on the PDP-12 and a version of KERMIT on my PC, but I haven't been able to figure out how to transfer files with it.

Mangled how? Totally unreadable or something less tragic?

About 50% of the text is mangled. Its more complicated than just a CR-LF problem.

What I do to move from PDP-8 diskimage to regular file is to just run os8xplode.


Vince
I have never heard of that tool. I will give it a try.
 
Ah, you mention they are "editor" files. I have no idea what that means, but it's more than just text. No can help. But will be interested to see what help you get.
 
I thought about that, but right now the reader-run signal on the PDP-12 isn't working correctly so there is no hardware flow control. On the PDP-9 the source files are not just text, they are an editor file. I didn't know if that was also true with the PDP-8.
The problem that I've seen is that when EDIT decides to dump a block to disk, it drops input
characters.

I have KERMIT12 on the PDP-12 and a version of KERMIT on my PC, but I haven't been able to figure out how to transfer files with it.
I've never gotten KERMIT12 to do anything useful.

I have never heard of that tool. I will give it a try.
I hope you like it. The doc directory has the "man pages equivalents". You will need to install Perl to run the various tools.

Basically, if you've got an image "foofoo.dsk" with an RK05 of SerialDisk image, then
$ os8xplode foofoo.dsk
will create idrectories "foofoo.0" and "foofoo.1" with exploded copies of the files from the two OS/8 file-systems. It will also create a bunch of files in there whose first character is ".", which contain the various reserved areas of the volume, and a file called "foofoo.xml", which has the information to rebuild "foofoo.dsk" from the other various files.

You can update these directories as you like, using host tools like editors, makefiles, source control, etc. Most of the files should be simple ASCII, and not a problem. Output from the cross assembler needs to be turned into something suitable for OS/8 with a command like
$ bin2bn sdsksy.bin >sdsksy.bn
which basically pads it out to a multiple of an OS/8 block so that it can pass as binary for mkdsk below.

The command
$ os8implode foofoo
will enumerate "foofoo.0" and "foofoo.1", looking for the reserved bits and files following the 6.2 rules for an OS/8 file name. It will create "foofoo.xml+", with instructions on how to assemble the new volume, including any changes you've made. You'll need to repeat this step every time the disk directory has changed -- you want to add, delete, or lengthen a file.

Now the command
$ mkdsk foofoo.xml+
will read the instructions created above, and create "foofoo.new", an updated version of "foofoo.dsk".

If you set up SerialDisk's server to use "foofoo.new" as the boot media, you can easily pass things to the PDP-8. Passing them back would involve running os8xplode on "foofoo.new", then copying stuff from "foofoo.new.0" or "foofoo.new.1" back to the corresponding "foofoo" directory.

This also works well with SIMH, provided you can fire up a connection between the server and the locally running SIMH. There are some suitable example "pdp8.ini" files in the SerialDisk distro.

Obviously, the name "foofoo" above can be whatever you want it to be.

Vince
 
I sometimes have trouble with putr using some wrong options.
This was often when doing copy instead of copy/binary.
You say It's text. This should not need /binary, but maybe it's worth a try?
 
When transferring 'pure' text files from one machine to another you can do this using a straight-forward text copy but without using handshake.

However, the key thing to look for with your PC terminal emulator program, is the inter-character delay, inter-line delay and line terminator character conversion.

A bit of trial and error may be required as well.

The 'problem' is that this is the slowest way of doing it, and there is no check that it got from one end to the other without error.

I did write a simple program at one time that sent one character, waited for the character echo from the receiver, checked the character echo for correctness and then applied a shorter intercharacter and interline delay than the above completely open-loop method.

I still use the open loop method on 'bare metal machines with a simple debug monitor' to download test programs. For example, we use Intel 286/10A systems at work that contain the iSDM-286 debug monitor. I wrote a simple program to convert a simple binary program (as output from an assembler/linker/locator) into debug monitor substitute commands. I can then use a conventional terminal emulator to download these simple test programms quickly and easily.

Obviously, if you don't have a pure text file, you are a bit limited in what you can do. Can you binary post the file you have and we will see if it is convertible to a pure text file (if it is source)?

Dave
 
Thanks for all of the suggestions. I will give them a try on Saturday. It sure would be simpler if I could figure out how to transfer files with Kermit12.
 
I installed Perl on my Windows laptop, and then Vince's tools. A readme file or help within the Perl file would be nice to have.

I ran the os8explode tool and it created two directories, one for each unit on the OS/8 RK05 disk image, and an XML file that describes the structure of the disk. I was surprised that this process took just a second.

I opened the spcwr3.12 file that contains the updated Spacewar! source code and found that it was mangled. I replaced the source, binary, and listing files with undamaged ones.

I ran the os8implode tool and it created an updated XML file that reflected the updated contents of the RK05 partition directories.

I ran the mkdsk tool and it used the new XML file and the updated contents of the two directories to make a new RK05 disk image. The new RK05 disk image is 1873 kB, and the original RK05 is 3248 kB. The 8dir tool said that the new RK05 image only contained a single unit, and the original contained two.

I mounted the new RK05 image with serialdisk and both units work OK. I copied the updated source file from the serialdisk image to the physical RK05 and assembled it.

.COMPILE RKB0:SPCWR3.PA
ERRORS DETECTED: 0
LINKS GENERATED: 106

I was able to EXECUTE the Spacewar! binary. Now I need to modify TANK and Lunar Lander to use the game controllers we made.
 
I installed Perl on my Windows laptop, and then Vince's tools. A readme file or help within the Perl file would be nice to have.
There are short write-ups in the 8tools/doc/ sub-directory. I started out with a model where the scripts would be sort of self-documenting, but then found that the damned legal boilerplate was all anyone could see when they ran "less" or "more" on rhe scripts.
I opened the spcwr3.12 file that contains the updated Spacewar! source code and found that it was mangled. I replaced the source, binary, and listing files with undamaged ones.
Yeah, the mangled one should match what was on the original OS/8 volume.
I ran the os8implode tool and it created an updated XML file that reflected the updated contents of the RK05 partition directories.

I ran the mkdsk tool and it used the new XML file and the updated contents of the two directories to make a new RK05 disk image. The new RK05 disk image is 1873 kB, and the original RK05 is 3248 kB. The 8dir tool said that the new RK05 image only contained a single unit, and the original contained two.
The new images created by mkdsk are only as long as they need to be to hold the data you've specified. The empty and unused blocks don't get written. (I suppose that could be controversial, but SIMH does that too, if you initialize a volume on a new file image.)

Then, os8dir has a heuristic to determine if there are one or two file-systems, based on the file's length in blocks., and the knowledge that no file system can be more than 4K blocks. The used part of your second partition didn't take it over 4K, so it guessed one volume instead of two.

Glad it is working with only minor issues!

Vince
 
When using serial disk, what happens to the disk image made by mkdsk if I add files? Will serial disk increase the size of the disk image? If not, then it might be a good idea for mkdsk to make the RK05 images 3248kB.
Your os8dir program only saw one unit on the disk image created by mkdsk, but OS/8 saw two units.
 
When using serial disk, what happens to the disk image made by mkdsk if I add files? Will serial disk increase the size of the disk image? If not, then it might be a good idea for mkdsk to make the RK05 images 3248kB.
Your os8dir program only saw one unit on the disk image created by mkdsk, but OS/8 saw two units.
SerialDisk's server will seek and read or seek and write, which will have the desired effects on the disk image.

Yeah, OS/8 has a built-in notion of the file-system size, and doesn't need to use a heuristic.

Vince
 
Back
Top