User Tools

Site Tools


tymcom-x-tape

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tymcom-x-tape [2018/03/25 02:08]
jms [Putting TITO.SAV on disk using FILDDT]
tymcom-x-tape [2018/04/13 05:11]
jms [Copying MON14.SAV to the disk]
Line 1: Line 1:
 +====== 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,,     .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"/  !>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"/    - 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 -t ss2/* > ../simh-ks/saveset1.tape
 +    to-simh -t 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''  Use a terminal emulator that has "Send ASCII" and "Receive ASCII" functions.
 +
 +0. ''TITO.SAV'' is 66 blocks (17 pages).  With DDT it is 97 blocks (25 pages).
 +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,^D33'' (pages) and update ITEM macro ''X TIT,TITO00,SAV,555000,00''.
 +
 +3. Rebuild monitor, copy it to ''SYS:'', 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.
 +
 +Transfer to simh's console is about 61 characters per second; 127 minutes to transfer TITO with DDT loaded (457K).
 +
 +10. Update word count in RIB to be last word plus 1.
 +    15010/ 20342        (40232 with DDT loaded)
 +
 +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:
 +    cygwin% perl -pi.bak -e 's/^(\d+)/sprintf "D+%o",oct($1)-016000/e' tito2.txt
 +    cygwin% diff tito.txt tito2.txt
 +
 +13. Exit FILDDT and ''detach rp2'' from the TOPS-10 simh.
 +    ^Z
 +    !^E
 +    sim> detach rp2
 +    
 +14. Create a respawn point via ''cp tymb00.dsk tymb00+tito.dsk; cp tymb01,dsk tymb01+tito.dsk''.
 +
 +15. Boot TYMCOM-X in production mode.  Due to Y2K8 problem, must use date from 28 years ago.
 +(Hit Enter twice to get logged in, then ''set date mm dd 1990'' and ''set time hhmm''.)
 +
 +   ./pdp10 tym-prod.ini
 +
 +  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 04 09 1990     ;28 years in the past
 +  !set time 2041
 +  Date/time is now 09-Apr-1989 22:41:00 Monday
 +  --- 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
 +  *rewind
 +  *^E
 +  sim> attach tu0 saveset1.tape
 +  sim> go
 +  *dir all
 +  INPUT TAPE POS RANGE: 301-e
 +  CONTINUE ON DEVICE: ^E
 +  sim>attach tu0 ss2.tape
 +  sim>go
 +  mta0
 +  INPUT TAPE POS RANGE:
 +  LOGICAL END OF TAPE REACHED
 +  *exit
 +
 +It takes about 30 seconds to restore each tape (as long as output has been suppressed with Control-O).
 +
 +===== Creating the front-end file =====
 +
 +
 +    !gfd ks2020
 +    !run ksfefs
 +    Name of file containing bootstrap program {(SYS)BOOTS.DMP} : (sys)boots.dmp
 +    Name of file containing microcode {(SYS)MCODE} : (sys)mcode
 +    Name of file containing pre-boot program: {(SYS)KSBLOD.DMP} : (sys)ksblod.dmp
 +    Structure to write on {DSKB} : dskb
 +      DSKB0:  65536 pages starting at 12.   Writing HOM block in page 0
 +    Writing (SYS)BOOTS.DMP to page  13 14
 +    Writing (SYS)MCODE to page  15 16 17 18 19 20 21 22 23 24 25 26
 +    Writing (SYS)KSBLOD.DMP to page  27
 +    Writing 8080 directory to page 12
 +    Duplicating BOOTS in page  3 4 5
 +    Done.
 + 
 +The ''ksfefs'' misinterpreted the RIB pointer to ''FEFILE.SYS'' [200000,,14] as [xwd 65536,14] and wiped out the RIn and ''tito00.sav'' Edited REFSTR.MAC to return [xwd 64,^D<3*95> to point to the 64 pages on cylinder 3.
 +Copied monitor, refreshed, and re-transferred ''tito.ddt''.
 +
 +    !run ksfefs
 +    Name of file containing bootstrap program {(SYS)BOOTS.DMP} : (sys)boots.dmp
 +    Name of file containing microcode {(SYS)MCODE} : (sys)mcode
 +    Name of file containing pre-boot program: {(SYS)KSBLOD.DMP} : (sys)ksblod.dmp
 +    Structure to write on {DSKB} : dskb
 +      DSKB0:  64 pages starting at 285.   Writing HOM block in page 0
 +    Writing (SYS)BOOTS.DMP to page  286 287
 +    Writing (SYS)MCODE to page  288 289 290 291 292 293 294 295 296 297 298 299
 +    Writing (SYS)KSBLOD.DMP to page  300
 +    Writing 8080 directory to page 285
 +    Duplicating BOOTS in page  3 4 5
 +    Done.
 +
 +At this point, ''boot rp'' loads BOOTS, which defaults to ''(SYS)SYSTEM.SAV'', but that dies with ''IME'' stopcode.
 +
 +===== Copying MON14.SAV to the disk =====
 +
 +Since we don't have KERMIT or other file transfer program on TYMCOM-X, do it with ''FILDDT'' Two caveats: 1) (SYS)FILDDT does not allow patching of data files, but (MPL)FILDDT does.  2) Patching a zero length file goes only so far before dying with an Address Check.  Since the current (SYS)SYSTEM.SAV is unuseable, patch it instead.
 +
 +On TOPS-10, start a Receive ASCII operation and display the whole monitor in octal.
 +
 +  .r filddt
 +  File: mon14.sav/d
 +  $$a $$h 0$n
 +  0/   777777,,113
 +  1/   203141,,171100
 +     ...
 +  245643/   140
 +  245644/   254000,,203146
 +
 +Edit the saved text to remove the first lines, and change "/" to "!" The text file is 1.8 Mbytes in size.
 +
 +Set the terminal emulator to delay 17 milliseconds between characters for the Send ASCII operation.  Expect it to take 8.5 hours to transfer all that data.
 +
 +  !run (mpl)filddt
 +  File: (sys)system.sav/d/p
 +  $$a $$h
 +  0/   777777,,113
 +  1/   203141,,171100
 +     ...
 +  245643/   140
 +  245644/   254000,,203146
 +  ^Z
 + 
 +Exit the TYMCOM-X simh job and start fresh (to get the implied zeroing of memory).
 +
 +  ^E
 +  sim>quit
 +  Linux% ./pdp10 x14-prod.ini
 +  PDP-10 simulator V4.0-0 Current        git commit id: da31dfa7
 +  BOOTS:
 +  
 +  LOADING (SYS)SYSTEM.SAV
 +  X14, hardware *B*, KS-4257, base 6760, X14-P035/E02, 6-3-92, M02654
 +  
 +  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.
 +  X14, hardware *B*, KS-4257, base 6760, X14-P035/E02, 6-3-92, M02654
 +  
 +  End of ONCE; starting null job
 +  INITIA starting DSKCLN on TTY0
 +  
 +  Hi there!  Please type your user name: oper
 +  proj code: 
 +  
 +  date not set, type date as mm-dd-yyyy 04-12-1990 
 +  type time as hh:mm 15:53
 +  
 +  .systat
 +  SYSTEM SHUT
 +  
 +  TYMSHARE X14-P035/E02 6-3-92 up 36:13 at  6:28:35 on Thu Apr 12,1990
 +  Null time = 36:13, Idle = 100% (Idle time per MIN. = 100%)
 +  2 jobs in use out of 31.  1 detached
 +  
 +  JOB  TYMNET       PROG   LO+HI(P) STATE       TRU  CONNECT USER NAME
 +    DETACHED      DSKCLN 16       TI         3.46  0:00:00 OPER +
 +   2*  -11327-   #10 SYSTAT 32      RN        20.30  0:36:09 OPER (OPER) +
 +  + means TYMSHARE inhouse user
 +  
 +  Users=2 Det=1 [1,1], Queues: RUN=1 DIO=0 TIO=1 IO=0 SPC=0
 +  2046 Physical pages available (MONITOR = 282P, User Area = 1764P)
 +  Virt. memory used (TPU/TPA): 48/1764 = 3%
 +
 +At this point, the systems programmer is expected to use the ''SETE'' command to set license (setting all privileges).  Due to forgotten SETE passwords, fake it by poking kernel memoryl
 +
 +Use DDT to get the address of JBTLIC (GETTAB table for job license).  In this case it is 11106.  Adding 2 for job #2 is 11110.  Then use ''DSKCLR 2,'' to clear the ''DSKCLN'' needed bit to write-enable the structure.
 +
 +  ^E
 +  sim>examine 11110
 +  sim>deposit 11110 777777777777
 +  sim>go
 +  !pjob
 +  Frame 2  TTY10  OPER[1,21] at X14
 +  
 +  !r ddt
 +  DDT
 +  dskclr 2,$x
 +  DDT
 +  ^C
 +
 +Use ''GFD SYS'' to change the effective PPN (and default directory) and edit ''ACCESS.MSG'' to have two lines of 80 blanks.  (The monitor wants to output "Date/time is now ..." at the same time ''LOGINN'' outputs the contents of ''ACCESS.MSG''.)
 +
 +Success!   --- //[[joeinwap@gmail.com|Joe Smith]] 2018/04/13 05:10//
 +==== Other pages ====
 +
 +[[tymcom-x|Overview]] page, [[tymcom-x-simh|SIMH Setup]] page, [[tymcom-x-startup|TYMCOM-X Startup]] page, [[tymcom-x-tape|TITO on disk]] page, [[tymcom-x-status|Status]] page.
  
tymcom-x-tape.txt · Last modified: 2018/04/24 07:59 by jms