I'll have to try that code. Here is some sample data from a 1630 IA file that I was looking at last time:
The first two bytes 0x00FA is the block length, and I assume those bytes would not be included in the checksum. I believe the next four bytes 0x00003050 is the load address of the data block, and probably included in the checksum, but maybe not. Then I assume the final two bytes 0x0180 is the checksum.
0x00,0xfa,0x30,0x50,0x00,0x00,0xe0,0x00,0x02,0x02,0x00,0x00,0x00,0x00,0x02,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03
0x00,0x00,0xff,0xff,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x03
0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20
0x20,0x20,0x20,0x6d,0x65,0x6d,0x77,0x72,0x6d,0x65,0x6d,0x72,0x64,0x6f,0x70,0x66
0x63,0x68,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6f,0x20,0x77,0x72
0x69,0x6f,0x20,0x72,0x64,0x69,0x6e,0x74,0x61,0x6b,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x02,0x02
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00
0x01,0x80
Ok, I think I'm learning something about the file format for HP 1630 Logic Analyzer "Tape" peripherals - including not only the HP-IL 82161A cassette drive but also the HP-IL 9114b disk drive.
Neither the cassette drive nor the HP-IL floppy drive have file systems - the file systems were accomplished on the HP-IL "controller", either an HP 41/71 calculator or in our case the HP 1630A/D/G Logic Analyzer. This format is not the same as the GPIB disk drive!
The HP 1630 has a "Tape" screen that appears when either an HP-IL cassette drive or 9114b disk drive is connected. A completely different peripheral screen for "Storage" appears with an HP GPIB disk drive.
In addition - the HP 1630 only supports a single "Tape" device, and the COPYFILE command on the HP Inverse Assembler mini data cassettes only allows copying to another mini data cassette. I imagine the same restriction for the 9114b diskettes - which can be emulated with a PIL Box.
My findings are based with experiments using the PIL-Box.
The ilPerf application for the PIL-Box supports two disk drives and a printer interface. I haven't tried the printer interface yet. I do know the HP 1630 only appears to support a single 9114b floppy disk - as a tape drive.
I can use the HP 1630 "Tape" menu to format either a mini data cassette, or a 9114b floppy disk based on whether I've plugged in the cassette drive or PIL-Box before navigating to the Tape menu.
With the cassette drive plugged in - using the COPYFILE command from an IA cassette, you can copy any file including COPYFILE to the same tape or a different tape.
However - in both the cassette and floppy cases - only ten files are displayed, with configurable file names.
When you use COPYFILE, that utility will copy the entire file name - and if the file was marked write-protected (* on first character of filename), the copy will also be marked write protected with the same full name.
In addition, because HP-IL has automatic device IDs - the HP 82161A MUST be the first device in the loop. I don't have the HP-IL Thinkjet printer to experiment, but it would likely be the second device.
In my experiments using the PIL Box to analyze the HP-IL traffic - the PIL Box is plugged in 'downstream' of the 82161A cassette drive.
HP-IL is differential serial with IN and OUT ports. The controller sends commands on the OUT port, each device is enumerated based on location from the controller, and sends responses on their OUT ports to the next device. Therefore any device on the loop is able to get their command and must resend IN port traffic that is not addressed to them to their OUT port.
Because HP-IL was designed to work with the HP-41 and HP-71 calculators, the HP-IL command set is very primitive - see the HP 82161A Cassette Drive Owners Manual for the commands.
What I have found on my HP 1630A logic analyzer connected to the PIL Box on HP-IL, is there are only 11 files created by the 1630 format command - whether it is the cassette or 9114b floppy disk.
Those 11 files are named: FILE0 through FILE9 and then FILEX.
When I do a lifdir command on the PIL Box emulated floppy disk file - it looks like this:
J:\>lifdir "hp9114b-config1-3 -4.dat"
Volume : HP1630
Tracks: 80 Surfaces: 2 Blocks/Track: 16 Total size: 2560 Blocks, 655360 Bytes
FILE0 ?(FFFE) 12800/12800 28/07/13 08:31:40
FILE1 ?(FFFE) 12800/12800 28/07/13 08:31:40
FILE2 ?(FFFE) 12800/12800 28/07/13 08:31:40
FILE3 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE4 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE5 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE6 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE7 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE8 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILE9 ?(FFFE) 12800/12800 28/07/13 08:31:41
FILEX ?(FFFE) 512/512 28/07/13 08:31:41
11 files (16 max), last block used: 257 of 2560
Note the volume name is HP1630 - if the logic analyzer sees a different volume name, it does not support reading or writing any file - including it will not reformat that tape or disk.
I have experimented with formatting the emulated 9114b floppy disk, then writing the current 1630 configuration to different file locations.
From these experiments, I have concluded the following:
- The HP1630 9114b HP-IL diskette format is unique
- The current LIF utilities only appear to understand showing the directory and lifget can extract a file.
- The current LIF utilities do not understand that FILEX in this format contains the directory information including filenames.
- gslick's HP 1630 IA diskette HPI files do not work as HP-IL 9114b image files with the HP 1630.
I have file captures of formatting an emulated 9114b floppy disk with the PIL Box, and captures of writing one more configuration file.
But I don't have any experience with the low-level HP-IL commands, so I don't know how to extract a file from gslick's 1630 disk images and insert it as one of the 9114b files with the filename inserted into the FILEX file.
Here is the contents of FILEX displayed with HxD after writing the HP 1630 default configuration into the first file, 3rd file and 8th file with names: CONFIG1, CONFIG3 and CONFIG8. I believe FILE0 on the cassette is the output of the first file.
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 46 49 4C 45 58 20 20 20 20 20 FF FE 00 00 01 00 FILEX ÿþ....
00000010 00 00 00 02 13 07 28 08 31 41 80 01 00 00 00 00 ......(.1A€.....
00000020 00 06 48 50 31 36 33 30 01 F4 43 4F 4E 46 49 47 ..HP1630.ôCONFIG
00000030 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 1
00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00000050 20 20 20 20 20 20 20 00 06 28 08 40 00 00 00 00 ..(.@....
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 4F ..............CO
00000090 4E 46 49 47 33 20 20 20 20 20 20 20 20 20 20 20 NFIG3
000000A0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000000B0 20 20 20 20 20 20 20 20 20 20 20 00 06 28 08 43 ..(.C
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 43 4F 4E 46 49 47 38 20 ........CONFIG8
00000190 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000001A0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000001B0 20 20 20 20 20 00 06 28 08 47 00 00 00 00 00 00 ..(.G......
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF ..............ÿÿ