
  7906 Disk Simulation
  ====================

This package contains a 7906 disk image for the SimH hp2100 simulator,
the disk contains HP-IPL/OS, adapted vintage BASIC, assembler, ALGOL and
FORTRAN, and applications (games) adapted from old source code or were newly
written for the fun of it. After booting read DISK NOTES for information.

The disk image can also be run on a real HP21MX minicomputer. A working
7906 drive is rare and expensive and this has not been tested on the real
thing, but the image can be copied directly to a (once) common IDE disk and
booted using an 8052-based IDE disk adapter. Details about the disk adapter
and links to most of the software on the disk is available at:
http://newton.freehostia.com/hp/

Files...

7906dsk0.dsk - 7906-formatted bootable disk image for HP21MX
boot.sh - run to boot under Linux, edit to configure the command shell 
boot.bat - run to boot under Windows in a command shell (no term codes)
bootputty.bat - run to boot under Windows using HyperTerminal
boot_7906dsk0.sim - simulator script for booting in a command shell
boot_7906dsk0putty.sim - simulator script for booting in PuTTY
hp2100 - old 32 bit modified hp2100 binary for Linux
hp2100.exe - old 32 bit modified hp2100 binary for Windows

The boot.sh script for Linux requires xterm as written, edit as needed
to use another terminal emulator. The boot batch for Windows doesn't
support ANSI terminal codes with the stock command prompt so some
programs will not run correctly. Scripts are provided to use with
HyperTerminal which does support ANSI, see the notes below for making
it work in newer versions of Windows. It should be possible to modify
the scripts to use another telnet terminal emulator, PuTTY etc.

PC operating support is tricky, they're always changing breaking scripts,
apps, and even simple things like the backspace key. Therefore it is quite
possible that the provided scripts won't work or might require adapting.
Once the hp2100 simulator is running, the simulation can be started
manually from a command line with the command: hp2100 boot_7906dsk0.sim
Or by running hp2100 in this directory and entering: do boot_7906dsk0.sim

Windows does not support terminal codes in a command window, so no screen
clearing, colors, etc. To work around, a telnet terminal has to be used.
A batch file and sim script are provided for using PuTTY, which seems to
work well. Was using hyperterm but that was too hard to keep working.
If the provided solution doesn't work, the basic technique is to add
set telnet 23 to the startup script then either a start command for a
telnet program, or manually start one.

Assuming you get it working.. when using a separate telnet terminal,
give control-e halt signals and simulator commands in the command window
running the simulator, not in the terminal window.

Under Linux, the main considerations are getting simh properly compiled
(or working at all it seems..) and getting the terminal shell working right
as far as look and feel and backspace behavior. Edit the boot.sh script
to specify which terminal to use, or to add a line for another terminal.
The default xterm usually works fine but it's a bit "small" and plain.
Konsole usually works well with oldcomp stuff but the command line parms
tend to change, might take some experimenting to get it to work. An early
KDE4 version I tried required a --nofork option and had permanently-enabled
XON/XOFF which prevents running apps that use those control keys (like FED).
Later versions are better but the one I have now won't save the terminal
settings when I'm in Gnome. The default Gnome Terminal settings don't work
with oldcomp - backspace is broken. To fix make a new profile with BS and DEL
reversed and specify the profile name in the command line in boot.sh. This
causes it to emit ascii-8 backspaces which works in HP-IPL/OS (sort of, only
erases the previous char but most prompts are spaced so that doesn't matter),
BASIC2's backspace parser understands it but doesn't prevent prompts from
being erased (eventually I should fix that). This also applies when using
HyperTerminal under Windows. Properly implemented ascii-127 backspaces
(Konsole, xterm) work fine in both HP-IPL/OS and BASIC2.

3/6/2021 update - previous versions of HP-IPL/OS containing the 7906.ipl
disk driver contained a major bug that just happened to work with older
versions of the hp2100 simulator like my old v3.8-0 modified binaries, but
failed with newer versions of the simulator. The cause, once found, was
obvious - in the LDFB code the STC 6,C instruction to start the DMA transfer
was missing the ,C and it just looped doing no-ops then reran HP-IPL/OS in
a temporarily confused state instead of loading the binary. The fix was
literally a bit flip - in the 7906 driver in the 7!7906 word, 102706 (at
location 33032 in this build) was changed to 103706. I updated the main
build with the new hpos6i.abs build from the updated hpiplos archive then
used it to rebuild the SFS utility build, but they are identical to the old
builds except for the bit flip and the version string. Nothing else was
changed on the disk except for adding a mod note to the disk notes file.

To update existing 7606 Disk Sim installs without replacing the disk, if
based on previous versions of this then after booting enter 33032 GET PNUM
and if it says 102706 then enter 33032 103706 PUT then enter 33032 GET PNUM
again to verify it now says 103706, if all good DGEN to rewrite the boot
system. Fixing the SFS utility build is a similar process - run the utility
build, do the patch then enter "@ SFS UTILITY" XDEL "@ SFS UTILITY" XSAVE
to save it do disk. Same with any other build containing the 7906 drivers.
For builds not based on the 7906 disk sim build then have to locate the
sequence 033604 102706 to determine the location to patch.

If not for the accuracy of newer versions the SimH hp2100 simulator I never
would have noticed that typo.. without the actual hardware, the simulator is
all I have for verifying operation but even then there is no guarantee that
this will actually work on a real 7906 disk. Previous versions have been
tested on a real 21MX-E with an IDE disk interface and worked ok but that's
as close as I could get to testing this with actual hardware. And actually,
for running on real hardware, VDOS with the USB adapter was better - was like
a fancy papertape emulator except the papertapes were files on a thumbdrive
and could use the old HP tools mostly just like they would have been used.
Well except for the thumbdrive part of course. Anyway.. kudos to all those
who make the hp2100 simulator possible, without it none of this would exist
in an easily accessible form.

Nevertheless to ensure that this package will remain working despite changes
made to the simulator, for the time being I'm including my old hp2100 binaries
I made in 2008. These are 32-bit binaries but should still work on modern
systems, 64-bit Ubuntu 20.04 ran the old 32-bit binary for me without having
to do anything as core 32-bit libraries are included. The boot.sh script
exports the current directory to PATH, and Windows defaults to the current
directory, so to use another version of hp2100 simply rename the provided
binaries. More info about this modified version of hp2100 is at:
http://newton.freehostia.com/net/oldcomp/hp2100mod.html
(the mods were for partial HP terminal emulation)

----------------------------------------------------------------------------
Disk image mostly set up June 12, 2011 when converted to use HPBASIC
Recent mods (after discovering it no longer worked with newer SimH hp2100)
2/28/2021 - added old simulators, modified readme and boot.sh
3/6/2021 - fixed 7906 drivers in main build and SFS utility build
3/7/2021 - switched to using PuTTY for the Windows telnet scripts
3/9/2021 - added a few more BASIC games, edited DISK NOTES (with FED!)
3/11/2021 - bugfix and enhancements for the new PTSTRK game
Terry Newton (wtn90125@yahoo.com)

