User Tools

Site Tools


tymcom-x-tape

This is an old revision of the document!


Creating SIMH tape images

Creating a tape image for TITO

When files are copied from TOPS-20 (36-bit byte size) with KERMIT, they are stored in ANSI ASCII mode.

Joe wrote type36 to display 36-bit files on *nix systems to determine if they are ANSI ASCII binaries or DEC compatible core-dump binaries.

Linux% type36
Usage: type36 [-s] [-a|-c|-d] filename [[-a|-c|-d] filename]
        -a = ANSI ASCII mode, -c = Core dump mode, -d = doubleword mode
        -s = input is in SIMH tape emulation format.

Linux% type36 -a ../m33/tito-ansi.sav | head -7
        36-bit dump of ../m33/tito-ansi.sav as ANSI ASCII (4x7-bit + 1x(1+7)-bit
address    even word      odd word    SIXBIT     7-bit bytes in hex  ASCII text
000000|777775,   117| 36564,   140|__] !/#UT !@ 7F7F6800A70757200030 ..h.'.W .0
000002|     0, 36564|260740, 34273|   #UT6'@#B[ 0000003D3A2C1E0038DD ...=:,..8]
000004|777777,   132| 36563, 36777|___ !:#US#W_ 7F7F78002D0757183DFF ..x.-.W.=.
000006|777652,   136|    16,     3|_^J !>  .  # 7F7A50002F0000700081 .zP./..p..
000010|200740, 24642| 47000,     0|0'@"FB$X     201E0029510960000000  ..)Q.`...

This shows that the file is in *.SAV format.

     IOWD 3,120: .JBSA=36564,,140  .JBFF=36564  .JBPFH=PUSHJ P,34273
     IOWD 1,133: .JBCOR=36563,,36777
     IOWD n,137: .JBVER=16,,3      .JBDA=MOVE P,24642  141=CALLI 0

When a core image is saved to tape, TOPS-10 writes a 4-word dummy file (to indicate there is no high-seg) and EOF before writing the SAV file,

Linux% ls -l 20bytes
-rw-r--r-- 1 jms jms   20 Mar 19 23:44 20bytes

Linux% od -c 20bytes
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020  \0  \0  \0  \0
0000024

Joe wrote to-simh to convert an ANSI ASCII file to core dump format and write the file out as a SIMH tape image (each block is proceeded and followed by the byte count in little-endian format).

Linux% to-simh
Usage: to-simh [-a|-c|-d|-b 128] filename [filename...]

Linux% to-simh -a 20bytes ../m33/tito-ansi.sav >tito.tape
Reading from 20bytes - Words read (octal):  4
Reading from ../m33/tito-ansi.sav - Words read (octal):  200  200 ... 141

This builds a SIMH tape image. Verify it using type36 -s -c.

Linux% type36 -s -c tito.tape | less
        36-bit dump of tito.tape as Core Dump  (4x8-bit + 1x(4+4)-bit
address    even word      odd word    SIXBIT     7-bit bytes in hex  ASCII text
--- block_size (0x14) = 20 bytes (  4 words) leading
000000|     0,     0|     0,     0|             00000000000000000000 ..........
000002|     0,     0|     0,     0|             00000000000000000000 ..........
--- block_size (0x14) = 20 bytes (  4 words) trailing
--EOF--
--- block_size (0x280) = 640 bytes (128 words) leading
000000|777775,   117| 36564,   140|__] !/#UT !@ 7F7F6800A70757200030 ..h.'.W .0
000002|     0, 36564|260740, 34273|   #UT6'@#B[ 0000003D3A2C1E0038DD ...=:,..8]
000004|777777,   132| 36563, 36777|___ !:#US#W_ 7F7F78002D0757183DFF ..x.-.W.=.
000006|777652,   136|    16,     3|_^J !>  .  # 7F7A50002F0000700081 .zP./..p..
000010|200740, 24642| 47000,     0|0'@"FB$X     201E0029510960000000  ..)Q.`...
000012|402000, 34267|260740, 35712|@0 #BW6'@#O* 40400038DB2C1E003B65 @@.8[,..;e

Search for known plaintext.

/oper
005660|222372, 42644|406511,751100|23Z$6D@U)])  244F50455241544F5220 $OPERATOR
005662|462230,342634|516124, 44646|F28<6<IQ4$FF 4C4943454E5345204953 LICENSE IS
005664|202351,752100|516132,427000|03I]1 IQ:BX  204E4F54205345542E00  NOT SET..
005666|777777,     2|    26,    11|___  "  6  ) 7F7F7800010001300084 ..x....0..
005670|222511,152236|201212,600000|25)-2>0**P   245449544F2028560000 $TITO (V..
005672|     0, 13646|576200,     0|   !>FOR     00000017535F48000000 ....S_H...
005674| 21754, 21755|272771,     0|"/L"/M77Y    043E6023F62E5F480000 .>`#v._H..
005676| 21754, 21757|     0, 13642|"/L"/O   !>B 043E6023F70000001751 .>`#w....Q
005700|245011, 42644|425010,152100|4H)$6DBH(-1  29204845524520415420 ) HERE AT
005702|576300,     0| 21761, 21762|OS    "/Q"/R 5F4C000000043F082379 _L....?.#y
005704|   731, 13532|440700, 13533| '9!=:D' !=; 001D48172D481C0017AD ..H.-H...-
005706|     0, 21710|222473,151650|   "/(24[-.H 00000023642453595354 ...#d$SYST
005710|426324, 57640|777761, 21773|BS4%^@__Q"/[ 454D205F507F7F0823FD EM _P...#}
005712| 21770, 21771|     0,    15|"/X"/Y     - 043F4023FC0000000086 .?@#|.....
005714|422132,644606|425644,     0|B1:TF&BND    4445564943453A200000 DEVICE: ..
005716|522032, 42500|472372,420256|J0:$5 G3ZB"N 54415045204E4F542057 TAPE NOT W
005720|512232,442500|502451,752212|I2:D5 H4I]2* 524954452050524F5445 RITE PROTE
005722|416510,542032| 50000,     0|AU(L0:%      435445440D0A00000000 CTED......
005724|522032, 42500|446464, 53644|J0:$5 DTT%>D 54415045204953205752 TAPE IS WR
005726|446510,520240|512372,442606|DU(J"@I3ZD6& 4954452050524F544543 ITE PROTEC
005730|522130,406424|777560, 22013|J18@T4_]P"0+ 5445440D0A7F77002485 TED...w.$.

Jump to end of file.

020340|254000,   140|712000,     0|5@  !@Y0     2B0000003072         +...0r
--- block_size (0x1E5) = 485 bytes ( 97 words) trailing
--EOF--
--EOF--

Creating TITO saveset tape images

Attach the physical tape drive to the NetBSD system. Copy the savesets (dozens of tape files) to disk.

#!/bin/bash
reelid=${1?"tape number needed"}
tape=/dev/nrst0      # non-rewind mode
mkdir -p /home/jms/pdp10/$reelid
cd /home/jms/pdp10/$reelid
i=100    # First one is "file.101"
ss=0     # First saveset is "ss1"
while cp $tape file.$((++i)); do
  ls -l file.$i
  [ -s file.$i ] || break
  [ `wc -c <file.$i` == 25 ] && mkdir ss$((++ss))
  mv -v file.$i ss$ss
done

Stop the bash job when the files are 0 bytes. Each file copied from tape contains all the files for one user. Look for files that are 25 bytes long; these are the start-of-saveset headers.

Create two saveset images. (Saveset ss1 is an unwanted partial save on tape 169270.)

  to-simh ss2/* > ../simh-ks/saveset1.tape
  to-simh ss3/* > ../simh-ks/saveset2.tape

Patching the raw disk image

Putting TITO.SAV on disk using FILDDT

This operation was performed by using Van Dyke's SecureCRT terminal emulator and a Cygwin window on a Windows machine. TOPS-10 already running and login 1,2 via telnet localhost 2020.

1. Create tito.txt by using FILDDT and the Receive ASCII on the terminal emulator.

  .r filddt
  File: tito.sav
  $$a $$h 0$n

Edit the saved file, removing extra lines. Then add “D+” to each line.

2. Edit REFSTR.MAC, copying and pasting the code that creates CRASH.SAV to create TITO00.SAV Set the file size using MOVEI T4,^D17 (pages) and update ITEM macro X TIT,TITO00,SAV,555000,31.

3. Rebuild monitor, use ./pdp10 tym-fresh.ini to refresh the disk(s).

4. Exit the TYMCOM-X simh, attach tymb00.dsk as rp2 on the TOPS-10 simh.

  .^E
  sim> attach rp2 tymb00.dsk
  sim> go

5. Patch the raw disk unit. (Load symbols to get a writeable symbol table)

  .r filddt
  File: sys:mon14/s
  File: rpa2/u/p

6. Track down the data pages for (SYS).UFD (RIB address at 1023). Search all 7 data pages for TITO00.

  $$A   $$H   1023/  1450
  1450000<1450777>0$N
  1450051/  200000,,1440
  $$6t  1440000<1447777>0$n
  TITO00.SAV    200000,,15

7. Display the RIB. First data page pointer is at 15051, it points to page 16.

  0,,15000/
  15000<15777>0$n
  15051/   200000,,16

8. Define D as 16000.

  16000/   d:

9. Use terminal's Send ASCII function to send contents of tito.txt to FILDDT.

10. Update work count in RIB to be last word plus 1.

  15010/ 20342

11. Enable Receive ASCII and store in tito2.txt

  16000<37777>0$n

12. End Receive ASCII and on local machine (Cygwin) execute the following to verify the transfer:

  perl -pi.bak -e 's/^(\d+)/sprintf "D+%o",oct($1)-016000/e' tito2.txt
  diff tito.txt tito2.txt

13. Exit FILDDT and detach rp2 from the TOPS-10 simh.

  .^E
  sim> detach rp2

14. Boot TYMCOM-X in production mode.

  ./pdp10 tym-prod.ini
  (Hit Enter twice to get logged in, then ''set date mm dd yyyy'' and ''set time hhmm''.)
  
Highest memory address is 3,,777777

Checking all units on disk controller - reading UNIT ID from HOME pages.
 RMA0:DSKB00=B0    RMA1:DSKB01=B1    RMA2:-offline-    RMA3:-offline-
 RMA4:-offline-    RMA5:-offline-    RMA6:-offline-    RMA7:-offline-

1024K of memory online.
To automatically login, login over shut.
X14, hardware *B*, KS-4257, base 6760, X14-P035/E02, 6-3-92, M02654

End of ONCE; starting null job

Hi there!  Please type your user name:
Remember to set date,time 27-SEP-1989 00:00:02  Date not set! <beep>
!
!set date 03 22 1990     ;28 years in the past
!set time 2041
Date/time is now 22-Mar-1989 22:41:00 Thursday
--- System is SHUT ---

!r tito00
TITO (V16.3) HERE AT 14:37 19-MAR-90
SYSTEM X14-P035/E02
DEVICE: mta0
TRACKS: 9
DENSITY(1600,800): 1600
TAPE NOT WRITE PROTECTED
*unload
*^E
sim> attach tu0 saveset1.tape
sim> go
*dir all

At this point, TITO appears to be hung. Using restore all also fails. — Joe Smith 2018/03/25 02:27

Other pages

tymcom-x-tape.1522209726.txt.gz · Last modified: 2018/03/28 04:02 by jms