05-16-2015, 11:09 PM
I wrote a perl script, copyil.pl, and a companion 71B BASIC program, COPYIL, to copy files from a Linux/Unix/OS X box to the 71B using a Prologix GPIB-USB controller (FW version 6.101) and the 82169A HP-IL/HP-IB Interface. With a bit of change this should work with the Prologix GPIB-Ethernet or, with possibly even more changes, other vendor's GPIB interfaces. This should also be usable on Windows with some suitable binmode settings made in the perl script.
The configuration that I've tested with is MacBook Pro <-> GPIB-USB (address 2) <-> 82169A (transparent mode, address 1 assigned by the 71B) <-> 71B (HP-IL controller).
You can point copyil.pl at multiple LIF files or directories to download several during one session. Any directory with a name of :main or :port(d) (case insensitive) will be used to set the destination device name for the files contained within. By default, the target device name is :MAIN.
To bootstrap COPYIL into 71B, you first run copyil.pl -r copyil.b71 on the host, then issue COPY :2 on the 71B.
It can also be used to upload binary image files, such as for ROMs, if you run copyil.pl -h <hex address> binary-image-file. COPYIL does this by POKEing the hex data received from the host. Note to those uploading images, be sure to target a FRAM area that has been configured in the middle of system RAM, so as to avoid either clobbering COPYIL at the low end of memory and the stacks and buffers at the high end of memory. You are responsible for determining the correct address, CONFST, below may be useful.
There is rudimentary handshaking and some error detection. Always start copyil.pl first, then run COPYIL on the 71B.
[attachment=2036]
I also wrote a program, CONFST (named after the symbolic address of the OS tables), inspired by Paul's MEMBUF, that displays the configured devices and memory type as a string (SRAM, IRAM, ROM, IO) . RAM and ROM sizes are reported in KB, IO registers in nibbles.
[attachment=2035]
The configuration that I've tested with is MacBook Pro <-> GPIB-USB (address 2) <-> 82169A (transparent mode, address 1 assigned by the 71B) <-> 71B (HP-IL controller).
You can point copyil.pl at multiple LIF files or directories to download several during one session. Any directory with a name of :main or :port(d) (case insensitive) will be used to set the destination device name for the files contained within. By default, the target device name is :MAIN.
Code:
copyil.pl [-bdr] [-h hexaddr] [-p port] pathname [...]
-b => TRANSFORM TEXT INTO BASIC after copy
-d => Turn on debug output
-r => Send using "raw mode" (no handshaking)
-h hexaddr => Convert a binary file to hex encoded
-p port => Set the port name
To bootstrap COPYIL into 71B, you first run copyil.pl -r copyil.b71 on the host, then issue COPY :2 on the 71B.
It can also be used to upload binary image files, such as for ROMs, if you run copyil.pl -h <hex address> binary-image-file. COPYIL does this by POKEing the hex data received from the host. Note to those uploading images, be sure to target a FRAM area that has been configured in the middle of system RAM, so as to avoid either clobbering COPYIL at the low end of memory and the stacks and buffers at the high end of memory. You are responsible for determining the correct address, CONFST, below may be useful.
There is rudimentary handshaking and some error detection. Always start copyil.pl first, then run COPYIL on the 71B.
[attachment=2036]
I also wrote a program, CONFST (named after the symbolic address of the OS tables), inspired by Paul's MEMBUF, that displays the configured devices and memory type as a string (SRAM, IRAM, ROM, IO) . RAM and ROM sizes are reported in KB, IO registers in nibbles.
Code:
Pt Dv Size Addr Type
0 0 4K 40000 SRAM
0 1 4K 42000 SRAM
0 2 4K 44000 SRAM
0 3 4K 46000 SRAM
5 3 32K 30000 SRAM
0 5 16K 50000 ROM
4 0 16K 58000 ROM
5 0 32K D0000 ROM
5 1 32K C0000 ROM
5 2 32K B0000 IRAM
0 4 16N 20000 I/O:0