
   USB Disk Adapter for HP21xx Minicomputers
   =========================================
   
The HP21xx USB disk adapter permits connecting a vintage HP21xx
minicomputer to a USB flash disk to use for file storage. An inexpensive
VDRIVE module is used to provide a USB host interface and FAT-compatible
operating system with 8.3 file and directory names, files can be copied
to and from a PC using a common thumbdrive. Advanced usage such as loading
arbitrary binaries and returning to the operating system without rebooting
requires a HP 21MX-class machine such as a HP2113 with at least 64KW memory,
and an operating system that knows about the command set used by this adapter
such as HP-IPL/OS with vdos.ipl and vdosext.ipl loaded into the system.
Simpler usage such as loading and saving binaries and accessing the VDRIVE
command prompt can be done in as little as 8KW (or even 4KW) using a variation
of the UDOS operating system - UDOS can be used as a small (<0.5KW) standalone
utility, embedded into HP BASIC to allow saving BASIC programs to disk, or
incorporated into a small HP-IPL/OS build to permit simple file processing
on older machines such as the HP2114. Finally, the USB disk adapter can be
used as a paper-tape reader and punch emulator to use with vintage software
that knows nothing about disk files, this provides a means to boot the
machine using its stock papertape binary loader.

Directories and Files...

hpcode/         contains HP-IPL/OS VDOS and UDOS builds
scripts/        contains bash scripts for integrating GCB into a Linux GUI.
2-wire_lcd.jpg  schematic of Myke Predko's LCD interface.
gcb.tar.gz      contains a patched version of the Great Cow Basic compiler,
                includes binaries for Linux and Windows systems.
gcboot.gcb      Great Cow Basic source code for the bootloader.
gcboot.hex      hex code file for the bootloader.
gcboot.txt      documentation for the bootloader.
hpusb.gcb       Great Cow Basic source code for the main control program.
hpusb.hex       hex code file for the control program.
hpusb.txt       documentation for the control program.
parts.txt       parts list with digikey part numbers.
randomnotes.txt hardware details, testing status, known bugs/features, etc.
usbadapter3_inputoutput.jpg  schematic of the MCP23S17-based I/O circuitry.
usbadapter3_processor.jpg    schematic of the PIC18F2525-based processor,
                             VDRIVE interface, switches, LED's, power supply.
usbadapter_parts.jpg    photo of the prototype USB disk adapter.
usbadapter_wiring.jpg   photo of the wiring side of the board.

See the gcboot.txt and hpusb.txt for details about the firmware/hardware
and license information for the code. A copy of the LGPL license and the
libraries used by the code (in particular usart.h, lcd.h, system.h and
stdbasic.h) are included in the gcb.tar.gz archive.

Archive history...
11/9/2010  - Initial package w/gcboot v6, hpusb v0.21,
             Great Cow BASIC (0.9 10/11/2010) with modified assembly.bi
             and new gcbasic.bas supplied by the author. Note... GCB dates
             are day/month/year, dates in other docs here are month/day/year.
11/10/2010 - Added parts list and notes file, changed gcboot to v7 (added
             set pllen off before running app so app will default to 8mhz).
11/13/2010 - Simplified readme.txt for GCB to remove extra information, some
             of which may have been wrong or incomplete (no program changes).
             Moved updated GCB usage information into randomnotes.txt.
             Changed gcboot to v8 (added short delay before app run).
             Changed hpusb to v0.3 (added ability to flip control signals).
11/14/2010 - Changed hpusb to v0.31 (added command and flag delays).
11/17/2010 - Changed hpusb to v0.32 (modified VDRIVE code to wait longer).
             Added hpcode directory with example VDOS and UDOS builds.
11/23/2010 - Changed hpusb to v0.41 (much faster, fixed to allow empty FN).
11/25/2010 - Changed to Nov.24 2010 gcb (modified peek/poke in stdbasic.h,
             more info in readme.txt). Changes do not affect hpusb firmware.
             GCB is now in tar.gz format for much reduced archive size.
             Added vintage.ipl package and vintage.txt to hpcode dir
             explaining how to compile software using vintage compilers.
6/14/2011  - Updated hpcode directory with new v1.64 VDOS builds, updated
             packages with fixes.. clears A/B when running binaries to keep
             BCS from hanging at end, fixed VDOS' UFSIZE word so it doesn't
             fail to return file size when a lot of files (sometimes the
             VDRIVE delays before returning data), other fixes and tweaks. 

-----------------------------------------------------------------------------

All material in this archive is provided as-is and without warranty of
any kind. The builder assumes all responsibility for the interpretation,
construction and operation of the circuitry described in this archive.
If you have issues I'll help if I can, but I cannot guarantee the
circuitry will work for a particular application.

-----------------------------------------------------------------------------
Terry Newton (wtn90125@yahoo.com)
