PDA

View Full Version : CP/M on HP-86B



smp
June 22nd, 2012, 12:27 PM
Hello all,

As you may have seen from my various posts elsewhere in the VC Forum, I am having an adventure with my new-to-me HP-86B.

I currently have the following equipment working:


HP-86B
HP-9121D dual 3.5 inch floppy drive (single sided, 270K capacity disks)
Dynex 17" LCD TV / video monitor with underscan capability on the VGA input
VideoSecu TV Video RCA to PC VGA Converter Adapter Switch Box
HP-82900A Auxiliary Processor (AKA CP/M System module)


My goal was to ultimately get the HP-86B working with CP/M, and I have had CP/M up and running since Friday, June 15, 2012.

Recently, I have spent my time getting back familiar with CP/M version 2.2, using PIP, ED, ASM and DDT as well as a couple of the old CP/M primers that I have saved over the years.

Now that I have my appetite whetted again, I am looking to embark on getting some additional software running on my machine. I have come up with an interesting problem: How the heck can I get CP/M programs into this machine?

Let me explain: This machine is not your run-of-the-mill CP/M machine. The best metaphor might be an Apple IIe with a Z-80 processor card installed and running CP/M (I never had one of those, but the HP-86B is similarly set up).

The HP-86B has a custom HP processor inside along with 128K of memory for user programs. It normally boots up into its HP proprietary BASIC operating system, and it has the capability for folks to write their own programs, purchase programs for a variety of uses from HP, or utilize programs uploaded by users into HP's user library. In addition to other specialty modules produced by HP, HP also created a module originally named 82900A CP/M System, then later changed to 82900A Auxiliary Processor. Simply stated, this module is a Z-80 with 64K memory and an interface to the HP module bus in the back of the HP-86B. There is a special HP CP/M boot disk that contains 3 files: Autost, CP/M, and CP/MSYS.

Autost is a very small BASIC program that the HP-86B will read from the disk drive if it's available on power-up. It sets the screen size and sets the keyboard to be normally lower case, and then loads the binary called CP/M.

CP/M is the binary that stays resident in the HP-86B, loads the CP/M system into the Z-80 Auxiliary Processor, and performs the interface between the Z-80 and the console and disk interfaces in the HP-86B.

CP/MSYS is a large file on the disk that contains the CP/M file system and the basic files normally expected in a bare bones CP/M system.

I believe this is where my problem lies. If the HP-86B is operating normally as an HP-86B, the CAT command will display the directory of the disk as containing the 3 files I just described. When this disk is used to boot up and run CP/M, the DIR command in CP/M will show the normally expected files: PIP, DUMP, LOAD, DDT, ED, ASM, STAT, SUBMIT, XSUB and FORMAT.

When operating within CP/M, I can create my own programs. I have created my HELLO.ASM program in assembly language using ED, and I have assembled it using ASM. I have used LOAD to create a .COM file from the assembled code. On the disk I now see several additional files in CP/M: HELLO.ASM, HELLO.BAK, HELLO.PRN, HELLO.HEX, and HELLO.COM. Everything seems to be working fine.

Now for the Catch. If I boot up the HP-86B normally and use the HP CAT command again, I still get back the same original 3 files: Autost, CP/M, and CP/MSYS. All my HELLO.* files are buried within the CP/MSYS file.

So, I am looking for a way to get a large source file into CP/M on this system. Time to check out the manuals.

The Introduction to the HP 82900A CP/M System clearly states the operation I detailed above on how the Autost program is detected and then runs the CP/M binary, etc. It also states that when CP/M is running, "The HP 82900A CP/M System appears to standard CP/M software as a 61K CP/M system, version 2.2, with 56K bytes of user memory." Then it says, "Only application software that is HP disc-formatted is compatible with your system." (That sounds pretty ominous to me. :( )

The HP 82900A CP/M System Reference Manual describes the use of PIP, and states that CON: and RDR: are source devices that can be re-mapped to other devices such as TTY:, CRT:, BAT:, PTR:, etc., but then also states that, "All physical input devices use keyboard input." (Things are not getting any better :( )

Similarly, the CP/M Reference Manual states that CON:, PUN:, and LST: are destination devices, and they also can be re-mapped to a variety of devices. Except for mapping CON: to CRT: or BAT:, and mapping LST: to LPT: or CRT:, it also states that, except when using only those mappings, "Output data is lost." (Oh, my! :( )

So, there's my situation. I have the source listing for FIG-Forth, and I was hoping to find a way to get the text file onto a disk and then be able to see it in CP/M on the HP-86B, but I have no idea how I could get the text file into the CP/MSYS file properly for the CP/M file system. As well, it does not appear to me that I have the ability to re-map some input to a serial port (I have the HP-82939A Serial I/O module) where I could create a program to read the text file in under CP/M.

Am I doomed to typing this entire source file in by hand? Am I doomed to typing any source text file that I want in by hand?

Any and all comments, observation, or advice are welcome.

Thanks for listening!

smp

natcha
June 22nd, 2012, 01:11 PM
You may find some help from the people in the following thread from the HPmuseum.org site:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=40122

Although the site is mostly about HP Calculators, a lot of the members also have older HP computer equipment and may be able to help you out.

Bill

smp
June 22nd, 2012, 01:16 PM
You may find some help from the people in the following thread from the HPmuseum.org site:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=40122

Although the site is mostly about HP Calculators, a lot of the members also have older HP computer equipment and may be able to help you out.

Bill


Ha! Thanks, Bill. I was actually just looking at that exact thread. Unfortunately, that thread is only about getting boot disks to work.

However, I will also post my question over there on that Forum, in case anyone there has some advice.

Thanks very much!

smp

leeb
June 22nd, 2012, 02:02 PM
Apparently the HP is using the CP/MSYS file as an IMG file, such as linux does, allowing a file to be attached as a device and accessed as a drive.
IF the FORMAT of the 'image' were known (or decipherable) then it would likely be possible to take that 'file' and insert/delete other files through another system/emulator/program.

What about the 2nd disk... is that completely 'free' or does it contain needed files on it? Does it have an 'image' file too?

It really SUX that you apparently do not have access to the serial port(s)... you could Kermit everything over that way...

Tho I have lots of 'irons in the fire', I would be interested/willing to help in this.. PM if you like.

EDIT:
Im wondering if it would be possible to write a dedicated serial-IO program to access the ports DIRECTLY...
Supposedly you have LST: , that suggests that MECHANICAL access to hardware exists... possibly.
It would be necessary to 'insert' the source file into the 'image' and then compile it with whichever language you have available...
Which might be ?
Of course, if the 'image access' were possible, then the completed COM file could be 'inserted' and runnable from that point.

Just some more musings. :rolleyes:

smp
June 22nd, 2012, 04:00 PM
Hi there, Leeb,

Thanks very much for your thoughts and encouragement.

One of the things that I left out of my original essay is that I/O in the HP-86B (and the entire HP Series 80 line) is by HP-IB, or by a special module that plugs onto the HP bus, like the Auxiliary Processor itself. Yes, the serial I/O module plugs onto that bus, but, so far at least, I have not found lower level design information for the bus or the module. That does not mean that it doesn't exist, it only means that I have not come across it. The normal HP-86B BASIC operating system has an unusual way of doing I/O, using device numbers. I have seen things associated with the Serial I/O module that call it device 10 (this is on the HP module bus). The printer seems to be device 7, on the HP-IB. The disk drives are usually device D7, on the HP-IB.

I made the point of the binary file CP/M that stays resident, performing the connection between the auxiliary Processor and the HP-86B keyboard and display, as well as the disk drives and the printer that are on the HP-IB. I have seen no documentation on how to get to any other devices, although HP does make a few allusions to perhaps making additional devices available "in the future." I do not think that ever occurred.

My perception at this point is that the CP/M binary, resident in the HP-86B, knows how to access the disk drives via the HP-IB (no big surprise), decode things from and encode things to the CP/MSYS file, and presents information back to CP/M running on the Auxiliary Processor as if it were a normal CP/M disk drive interface.

In short, I think this is a closed system. I do not have any experience about how the Apple systems with Z-80 cards or Commodore systems with their auxiliary processors operated, but I believe this is the way HP made CP/M available while still keeping things proprietary, rather that going open and allowing anyone to get software from anywhere.

This is starting to feel like a very early version of controlling the user experience, way, way before Steve Jobs initiated it within Apple.

Thanks again for your thoughts. If you have anything more, keep it coming.

I don't know, but if schematics are available for the HP module bus and for the serial I/O module, maybe there could be some custom code developed? That sounds pretty daunting to me.

smp

smp
June 22nd, 2012, 05:03 PM
Here's an update:

Based on the ideas presented by Leeb, I went over to the HP Computer Museum site (http://hpmuseum.net/) and took a look at available documentation for the HP-82939A Serial I/O Module. I found the 82939A Serial Interface Installation and Theory of Operation Manual (http://www.hpmuseum.net/capcha/freecap_wrap.php?r=1991).

Unfortunately, the module is designed around an 8048 programmable controller. The module is designed to receive commands from a BASIC program running in the HP-86B. There is a schematic, but I have not scoured it thoroughly at this point. I figure that some sort of higher level command comes from the BASIC program to the 8048 processor, and then things will be sufficiently hidden that we may be able to go no further. I don't know that we will be able to create a program in the Z-80 processor running CP/M that can reach across the HP-86B module bus, through the HP-86B, and back out the HP-86B module bus to get to this module without a pile of additional information.

Thanks for listening.

smp

smp
June 22nd, 2012, 05:17 PM
What about the 2nd disk... is that completely 'free' or does it contain needed files on it? Does it have an 'image' file too?


Hello again, Leeb,

Sorry that I missed answering this question before...

When operating in CP/M, I formatted a disk in drive B as a simple CP/M data disk. Then I copied only my HELLO.* files onto it. Before copying the files, the DIR command in CP/M returned the message: NO FILE. After copying the files onto the disk, the DIR command showed the several HELLO.* files.

I then reset the HP-86B back into the normal BASIC operating system. At that point, when I perform the CAT command, I see one file: CP/MSYS.

This supports my assumption in a previous post that the CP/M binary program resident in the HP-86B knows how to decode this file and how to encode additional things into this file, and presents information to CP/M running on the Auxiliary Processor as if it was a disk drive interface.

Thanks for asking.

smp

gslick
June 22nd, 2012, 05:53 PM
Apparently the HP is using the CP/MSYS file as an IMG file, such as linux does, allowing a file to be attached as a device and accessed as a drive.
IF the FORMAT of the 'image' were known (or decipherable) then it would likely be possible to take that 'file' and insert/delete other files through another system/emulator/program.

That should be possible.

See the HP 82900A CP/M System Reference Manual, pages A-2 and A-3.
http://www.series80.org/PDFs/HP82900A-CPM-Ref.pdf

If I get an HPDrive emulator system setup it should be possible to format an emulated disk images as a CP/M disk, and then from that disk image extract the disk sectors containing the CP/M disk image, then use CP/M disk utilities to update files on that CP/M disk image, then insert that disk image back into the HPDrive disk image and access it from the HP 86B CP/M system again.

-Glen

leeb
June 22nd, 2012, 07:57 PM
Hello again, Leeb,

Sorry that I missed answering this question before...

When operating in CP/M, I formatted a disk in drive B as a simple CP/M data disk. Then I copied only my HELLO.* files onto it. Before copying the files, the DIR command in CP/M returned the message: NO FILE. After copying the files onto the disk, the DIR command showed the several HELLO.* files.

I then reset the HP-86B back into the normal BASIC operating system. At that point, when I perform the CAT command, I see one file: CP/MSYS.

This supports my assumption in a previous post that the CP/M binary program resident in the HP-86B knows how to decode this file and how to encode additional things into this file, and presents information to CP/M running on the Auxiliary Processor as if it was a disk drive interface.

Thanks for asking.

smp

Everything in your previous post tells me that there IS a way to handle this...
If the SYSTEM is able to access 'device 07' then there SHOULD be a way for us to do the same thing...
When you send a write to LST: (since the only read is for status), it goes thru the BDOS entry (0005h) to a table of subroutine addresses in the BIOS that handle all the 'non-existent' device functions... (cldboot,wmboot,constat,conin,conout,lstout--all I can remember right now) and eventually acesses that 'cp/m interface' with the 'right stuff'...
It should only be a question of finding that 'right stuff' and where to send it...
EDIT:
Do you have access to DDT? You can use it to see where things 'go'...
:D
EDIT2:
Okay... having thought about it... it is POSSIBLE that the CPM 'resident interface' does not have the capability of working with anything but the printer. But I have difficulty believing that they enabled access to the printer device w/o being able to get to the others. I CAN see that the z80-based BIOS might have been 'shorted' them IOT reduce its footprint, altho they would have 'blank' entries in the table to keep things kosher...

Can you get me a copy of that CP/MSYS file?
Or, is there such a file somewhere that I could download and 'play with'?

smp
June 23rd, 2012, 01:10 PM
Can you get me a copy of that CP/MSYS file?
Or, is there such a file somewhere that I could download and 'play with'?



If you send me a PM with your mailing address, I will send you the disk.

Thanks,
smp

leeb
June 28th, 2012, 02:22 PM
The PDF file above only references 5.25 (and 8") disks...
what does 'STAT DSK:' show you?

EDIT:
Something else that might be interesting... an entry in the 'boot thread' referred to:

BTW, if you happen to have the software for the HP 82900A terminal emulation co-processor, then this should be usable with the CP/M module, since the actual hardware card is the same for both systems. Unfortunately, I do not have this S/W.

:D

gslick
June 28th, 2012, 03:05 PM
The PDF file above only references 5.25 (and 8") disks...
what does 'STAT DSK:' show you?

I assume the 9121 3.5-inch floppy has the same logical format as the 5.25-inch floppy. Physically the 5.25-inch floppy has 2 sides and 33 tracks with 16 sectors of 256 bytes and 270,336 bytes total, while the 9121 3.5-inch floppy has 1 side and 66 tracks with the same 16 sectors of 256 bytes and the same 270,336 bytes total.

If I dump the raw sectors of the floppy I can see the ASCII text of the DUMP.ASM file, but I can't find anything that I can recognize as a CP/M directory structure.

-Glen

leeb
June 28th, 2012, 05:50 PM
I assume the 9121 3.5-inch floppy has the same logical format as the 5.25-inch floppy. Physically the 5.25-inch floppy has 2 sides and 33 tracks with 16 sectors of 256 bytes and 270,336 bytes total, while the 9121 3.5-inch floppy has 1 side and 66 tracks with the same 16 sectors of 256 bytes and the same 270,336 bytes total.

If I dump the raw sectors of the floppy I can see the ASCII text of the DUMP.ASM file, but I can't find anything that I can recognize as a CP/M directory structure.

-Glen
What you would want to focus on is tracks 3 to 63, all sectors (0-15).
Track 3 is the CP/M directory.
Tracks 4-63 are the file space (according to the 5.25 format), while the last 2 tracks contain the BASIC file and the CP/M 'binary'...

This is according to the PDF I downloaded from the link above...

EDIT:
The directory will look fairly symmetrical with the filenames followed by the extent values...
:D

leeb
June 28th, 2012, 11:08 PM
I have a program called

22disk

that is able to read/write multiple formats... and I was able to configure it to read/write the 3.5 HP...

But that's not the best part! When I did a CP/M directory, I was VERY SURPRISED to see the CONTENTS OF THE CPM 'directory'!!

I expected it to show me the 'base' HP area with CP/MSYS... but no!
DIRECT into the CP/M 'file'!

I am returning the DATA disk you sent me, with a couple of my own placed on it... you will need to see if there is any 'head alignment/erase' issue(s) between your original SS/DD drives and the DS/HD one I wrote with.

I am also sending another floppy with DOS 6.22 and the 22disk program, properly configured, etc. for you to try. (see cpmx.bat in / )

If you can get your files onto a PC this should just about cover the issue, short of actually getting the serial I/O working...

It'll be a day or 2 before I get the mail out, but it is 'on its way'!

Sorry for the blurry pics, but you will see what I mean!
EDIT: I intend to work on getting my Model 4p emulator (thus my 4p) to be able to open these disks as well.. yet another 'avenue' into storage-land! :p
94979498

smp
June 29th, 2012, 03:12 AM
Hi Lee (and Glen),

I am at work right now, so I cannot answer the question about what STAT DSK: will report in CP/M. I'll try that tonight or tomorrow and report back to you.

As far as the HP terminal emulation software is concerned, please remember that it is also initiated from the HP BASIC operating system, so it will also have no knowledge about the CP/M OS or file system. If the terminal emulation software is actually another separate system, being a terminal emulator, it may not have any file transfer or storage capability at all (I have never looked into it).

It really looks to me like HP did all they could to provide their customers the ability to use CP/M, but keep them in a "walled garden," to use a term we hear often today. The business of only being able to use "HP disc-formatted software" would keep customers coming back to HP, rather than being able to tap into the vast array of software that was blooming at the time.

I am now wondering if the actual schematic is available for the HP-82900A Auxiliary Processor module, could a serial I/O port be patched in, and then an assembly program could be written to use it to perform I/O with the outside world?

Thanks for listening...
smp

smp
June 29th, 2012, 03:24 AM
Hi Lee,

Holy cow!

Apparently, while I was writing my previous reply, you were sending in that last message of yours. Thanks very much for this info. Very exciting, indeed. I will look for the disk that you will be sending, and I'll let you know what I find.

Just for the record, I am a Macintosh kind of guy... We have had only Macintosh computers in the house over the years, so my experience with PCs is pretty much limited to using them at work. Not a lot of rooting around in the inner hardware and software on my work computers, I'm afraid. I just picked up an older PC that is supposed to have Windows 98 on it, but I have yet to go out and get a keyboard and mouse for it, and fire it up. Hopefully, this will be the machine that I will bring up to do the things that you are describing to me here. For some reason, dealing with PCs is daunting to me. I'd much rather be skulking around inside an old S-100 machine or playing with this HP machine. But we'll see what comes about.

Thanks, once again, for all your attention and advice!
smp

leeb
June 29th, 2012, 10:04 AM
For the record, 22disk will not work on XP or above - the NT subsystem prevents 'direct hardware control' as used by the program.
Which is why I built a bootable DOS 6.22 for you....

What you need is one of these....
9500
That you can use to 'interbreed' to your heart's content! :p

But you cant have that one... not my 2810!!! :eek:
I actually used my 3800hd, which has the 22disk AND my 4p emulator on it.

I kinda guessed you were a MAC guy from the avatar... :rolleyes:
Wont hold it against you! :p


Will try to get the envelope out today! :D

smp
June 29th, 2012, 12:23 PM
OK, here's the result of the command STAT DSK: on my HP-86B with HP-9121D 3.5" disk unit, running CP/M:

A: Drive Characteristics
1952: 128 Byte Record Capacity
244: Kilobyte Drive Capacity
128: 32 Byte Directory Entries
128: Checked Directory Entries
128: Records/ Extent
8: Records/ Block
32: Sectors/ Track
3: Reserved Tracks

If I do the STAT command on drive B: I get the same thing.

That doesn't seem to correlate with what Glen said earlier. 1952 128 byte records = 249,856 bytes, or 244 KBytes per disk. I suppose that's right when you are talking data only and not the directory stuff, too?

Anyway, that's what the system tells me.

smp

smp
June 29th, 2012, 12:35 PM
Nice computer, by the way, Lee.

I had a Tandy 1400FD a long, long time ago, and it was a tremendously solid laptop computer. Not such a nice screen as you have there on the 2810. Recently, I have wondered if I had held onto it if it would have made a good terminal for my S-100 machine, or whether it would have been good for doing some of this disk investigation and copying business. Being a floppy only system, I would have been only running DOS, just like you say. Maybe I need to be on the lookout on eBay? The Sellers probably want a mint for those, though.

Sigh!

smp

leeb
June 29th, 2012, 01:05 PM
OK, here's the result of the command STAT DSK: on my HP-86B with HP-9121D 3.5" disk unit, running CP/M:

A: Drive Characteristics
1952: 128 Byte Record Capacity
244: Kilobyte Drive Capacity
128: 32 Byte Directory Entries
128: Checked Directory Entries
128: Records/ Extent
8: Records/ Block
32: Sectors/ Track
3: Reserved Tracks

If I do the STAT command on drive B: I get the same thing.

That doesn't seem to correlate with what Glen said earlier. 1952 128 byte records = 249,856 bytes, or 244 KBytes per disk. I suppose that's right when you are talking data only and not the directory stuff, too?

Anyway, that's what the system tells me.

smp

Dont forget... some of that TOTAL capacity is being used by the BASIC pgm and the CP/M 'interface' file...


Nice computer, by the way, Lee.

Awww, shucks... THAT old thing?? :D

I had a Tandy 1400FD a long, long time ago, and it was a tremendously solid laptop computer. Not such a nice screen as you have there on the 2810. Recently, I have wondered if I had held onto it if it would have made a good terminal for my S-100 machine, or whether it would have been good for doing some of this disk investigation and copying business. Being a floppy only system, I would have been only running DOS, just like you say. Maybe I need to be on the lookout on eBay? The Sellers probably want a mint for those, though.

Sigh!

smp

Well, as I said, I used the 3800hd to get the info I put up...
(And I have 'one or two' machines Id be willing to part with if interested. Just FYI... :rolleyes: )
... and yes, Terminal (in windows 3.1 for example) would be an EXCELLENT interface for a terminal-based system. Have not used many dos-based terminal emulations but sure an acceptable one could be found...
Even something like Kermit would satisfy that requirement, and still provide the type of comms youre looking for.
Machines this old are usually limited to 19200 baud, but should be plenty for such an application.
EDIT:
Of course, being in the 'Apple world', you still have plenty of options there too... just would have to set your speed DOWN... and down....

BTW... disks went out TODAY before 1PM...
:D
(This is only the 3rd or so edit so far...)
If you have no trouble working with that data disk, I would be more-than-happy to send you a copy of Pascal MT+ that is the language I used to write my PROLOG-compatible z80 assembler. (.ASM sample on data disk)...
(The 22disk SHOULD be capable of creating a data disk... tho I havent tried it yet.)
... another FYI. :p

gslick
June 29th, 2012, 08:21 PM
Ok, I finally got most of this working. I must have done something wrong when I created a new CP/M floppy on my HP-86B and then dumped the sectors to take a look. I think I used the 3.5-inch drive on my 9133H and maybe that ended up creating a double sided floppy and I only dumped the sectors from one side assuming the physical format would be the same as with the 9121 3.5-inch format. Maybe that's why I couldn't find the CP/M directory when I dumped the raw sectors.

I went back to the original Teledisk image format I downloaded from hpmuseum.net HP87CPM.TD0. Then I used ImageDisk TD02IMD.COM to convert that to HP87CPM.IMD.

C:\ImageDisk\TD02IMD.COM HP87CPM.TD0
TD 1.5 5.25-96 LD MFM D-step, 2 sides 29/10/2003 11:46:21
HP87 CP/M SYSTEM
32/1: CRC error (bad sector)
33/1: Duplicate sector numbers
33/1: CRC error (bad sector)
34/1: CRC error (bad sector)
72 tracks, 1134 sectors converted.

Then I used ImageDisk IMDU.COM to convert the ImageDisk format image file to a raw sector file, while excluding the extra two tracks which I don't believe contain valid data. This resulted in a 270,336 byte HP87CPM.DSK image file.

C:\ImageDisk\IMDU.COM HP87CPM.IMD HP87CPM.DSK /B X=33,34
IMageDisk Utility 1.18 / Mar 07 2012
IMD TD 1.5 5.25-96 LD MFM D-step, 2 sides 29/10/2003 11:46:21
HP87 CP/M SYSTEM
Assuming 1:1 for Binary output
0/0 250 kbps DD 16x256
33/1 250 kbps DD 31x256
34/0 250 kbps DD 16x256
34/1 250 kbps DD 15x256
70 tracks(35/35), 1134 sectors (907 Compressed, 4 Bad)

Then with that HP87CPM.DSK disk image file I could use Cpmtools 2.9 http://www.cpm8680.com/cpmtools/index.htm to access the contents of the CP/M file system contained in that disk image file.

Here is a new entry I added in my local copy of cpmtools diskdefs. I think these values are correct for the HP 86B CP/M:

diskdef hp87cpm
seclen 256
tracks 66
sectrk 16
blocksize 1024
maxdir 128
skew 0
boottrk 3
os 2.2
end

C:\cpmtools>cpmls -f hp87cpm -l HP87CPM.DSK
0:
-rwxrwxrwx 8192 Dec 31 1969 asm.com
-rwxrwxrwx 4864 Dec 31 1969 ddt.com
-rw-rw-rw- 4224 Dec 31 1969 dump.asm
-rwxrwxrwx 512 Dec 31 1969 dump.com
-rwxrwxrwx 6656 Dec 31 1969 ed.com
-rwxrwxrwx 2944 Dec 31 1969 format.com
-rwxrwxrwx 1792 Dec 31 1969 load.com
-rwxrwxrwx 7424 Dec 31 1969 pip.com
-rwxrwxrwx 5248 Dec 31 1969 stat.com
-rwxrwxrwx 1280 Dec 31 1969 submit.com
-rwxrwxrwx 768 Dec 31 1969 xsub.com

You can use cpmcp to copy files from and to the disk image.

C:\cpmtools>cpmcp -f hp87cpm HP87CPM.DSK 0:dump.asm dump.asm

C:\cpmtools>type dump.asm
; FILE DUMP PROGRAM, READS AN INPUT FILE AND PRINTS IN HEX
;
; COPYRIGHT (C) 1975, 1976, 1977, 1978
; DIGITAL RESEARCH
; BOX 579, PACIFIC GROVE
; CALIFORNIA, 93950
;

I also finally got an old Windows XP system setup with HPDrive to emulate HPIB disks and was able to boot the HP 86B CP/M from the HP87CPM.DSK file loaded in a emulated drive.

HPDrive uses 286,720 byte files for this floppy disk size so I added back 16KB of 0xDB fill bytes to the end of the 270,336 byte HP87CPM.DSK image file to make up for the 2 tracks that I stripped off earlier.

I was also able to use cpmcp to copy a file into the disk image and then with that image loaded in HPDrive the new file showed up as expected when accessing that emulated disk from the real HP 86B system.

I wasn't able to use the format command on the HP 86B system to create a new CP/M disk on an emulated HPDrive disk. Something doesn't seem quite right with the emulated formatting operations on the HPDrive system and it fails with an error. The plain HP 86B INITIALIZE command also fails on an emulated HPDrive disk.

-Glen

leeb
June 29th, 2012, 11:13 PM
Havent used imagedisk that much but it still looks like youre creating 2-sided images...
The only question is, does it go to the end track and change sides, or
does it write sectors 1-16 THEN change sides, THEN change tracks...
???

Not sure that XP (or 7/vista,etc) will allow 'low-level' access like that... which is why I use ME or older...

Sounds like lots of work. :rolleyes:
But if it ends up working, THATs whats important!

Youze guise got the toyz... Im just playing in the sandbox! :p

:D

gslick
June 30th, 2012, 12:33 AM
I waa just using ImageDisk utilities to manipulate the original Teledisk disk image file, not to actually access a physical floppy the second time around. You've right, you cannot directly access a physical floppy with ImageDisk while running inside Windows XP. I waa just manipulating image files.

The ImageDisk sector order in a raw image file is track 0, side 0 then track 0, side 1 before advancing to track 1.

-Glen

leeb
June 30th, 2012, 01:33 PM
I believe I now understand how/why 22disk was able to access and view/modify/delete files on this format disk...

(referring to 66 tracks as 0-65)
The format itself specifies that tracks 0-1 designate the HP-part of the configuration...
Tracks 2 and 3 are the CP/M 'boot tracks'... as they normally would be as 0 and 1.
Track 4 is the CP/M directory and 5-63 are data areas.

22disk has been told that 0-1 are 'skipped', so it simply ignores them and recognizes the rest of the disk (minus tracks 64 & 65) as if they didnt exist. Thus, although the HP portion is told that 'file CP/MSYS starts at t2s1', that is irrelevant UNLESS one were to attempt to 'change the size' (add/remove tracks/sectors) of the CP/M 'filesystem area'...

I suspect it also means that, when I formatted a disk last nite (in 22disk) and put some files on it, that the first (and last) 2 tracks are (likely) 'empty'... and the HP FORMAT program would need to be used to generate the 'missing' 4 tracks... or a program that makes an image of those tracks and 'inserts' them after the fact. Until that happened, I believe that HP would consider this disk 'empty'... without even knowledge of the 'CP/MSYS'...

SMP should soon be able to tell us if the disk I modified is useable, and if so, he has a reliable way to transfer programs/files in/out of the CP/M disks.

Long-term would be the development of the HP-IB serial port 'driver' for CP/M to allow it to directly work with the (9600-baud max!) serial port... as I doubt it is built into the 'cpm binary/interface', and would be far more difficult to disassemble than the CP/M parts.
:D

smp
July 1st, 2012, 02:30 PM
Hi guys,

All I can say at this point is thank you so much for your continuing assistance.

I have spent a considerable amount of time this weekend being frustrated in attempting to replicate Glen's results. I thought to myself, why not try to replicate Glen's results using Parallels on my Mac? That way I can get familiar with these PC tools and gain a better understanding about what you guys are discovering first hand. Well, after many hours of effort, I have 3 different virtual machines, one with Windows XP, another with Windows 98, and a third with MS-DOS 6.21. Each of them is capable of doing some of what has been reported by Glen, but none of them actually works all the way through.

I knew from your posts that Windows XP would only be good for playing around with disk images, and not for actually creating real physical floppy disks, but I never got that far, anyway. In my Windows XP setup, I can do the first 2 steps of what Glen reported. I can use the Image Disk tools to create the .IMG file from the original .TD0 file, and I can create the .DSK file from the .IMG file. However, when I try to use the CPM Tools, I get an error that the PATH cannot be found. Consequently, when I try to use cpmls, I get an "unknown format" error, even though I have updated the diskdefs file. Apparently, not being able to trace the path makes it so cpmls cannot see the updated diskdefs, even though they are right in the same directory?

On to Windows 98. I keep hearing that folks use Windows ME or earlier, so since I have acquired a pristine original OEM package of Windows 98 along with its installation key, I figured that I'd be golden. No way, Jose! Parallels installs Windows 98, but leaves so many drivers in a bad state that I cannot get a network connection and I have a significantly bad time attempting to transfer files in via a floppy disk. So much for that. I have been successful with using the Image Disk tool here, too, so at least I did have that much success with Windows 98.

Lastly, on to MS-DOS 6.21. Well, actually MS-DOS 5.0, and then upgrade to DOS 6.21, because I had a real installation copy of MS-DOS 5, but only upgrade disks for DOS 6.21. After an eternity trying to noodle out how to get DOS installed as a virtual machine at all, I finally got that all going, and voila! I can successfully use the Image Disk tools to replicate the first 2 steps of what Glen did (just like in Windows XP), but when I tried to use cpm tools, I get an error message that these tools cannot be used in DOS mode. Seems they must be run under some version of Windows. I tried to find a copy to download that does not require Windows, but I have not been successful so far.

This Microsoft OS stuff is really, really difficult to deal with! I know I am not doing myself any favors trying to use these things in virtual machines, but I thought that I'd be able to get things to go and get some experience before I have to deal with some older PC and whatever might be wrong with it, too.

SIGH!!!

I got some experience alright, but mostly negative experience so far. I guess that I'll just have to acquire some more hardware...

I will let you know when the disks arrive, Lee. We will see how successful you have been with putting additional files onto them.

Thanks for listening.

smp

gslick
July 1st, 2012, 02:57 PM
For best results copy the contents of the cpmtools zip file into a c:\cpmtools directory and then I think things should just work. That's what I did. I think there is an environment variable you could set if the files are located somewhere else. I didn't try that.

-Glen

smp
July 1st, 2012, 03:58 PM
Hi Glen,

Well, I did what you said, and I copied my cpmtools folder to the top of my C: drive, and I named the folder cpmtools.

That has eliminated the complaint about not finding the path. I also checked, and \cpmtools is properly being inserted at the beginning of the path as directed by cpmtools.bat.

However, I still am getting the "cpmls: unknown format hp87cpm" error. I have checked and re-checked that I have edited your definition ito the diskdefs file (as the very first entry). For the record, I cannot use cpmls on the example file, either:

C:\cpmtools>cpmls -f apple-do EXMPLCPM.dsk
cpmls: unknown format apple-do

C:\cpmtools>

Oh, well, it's probably something involving the Parallels virtual machine setup, and I'm too tired to do much more.

Thanks again for all your attention.

smp

leeb
July 1st, 2012, 05:20 PM
Hi Glen,

Well, I did what you said, and I copied my cpmtools folder to the top of my C: drive, and I named the folder cpmtools.

That has eliminated the complaint about not finding the path. I also checked, and \cpmtools is properly being inserted at the beginning of the path as directed by cpmtools.bat.

However, I still am getting the "cpmls: unknown format hp87cpm" error. I have checked and re-checked that I have edited your definition ito the diskdefs file (as the very first entry). For the record, I cannot use cpmls on the example file, either:

C:\cpmtools>cpmls -f apple-do EXMPLCPM.dsk
cpmls: unknown format apple-do

C:\cpmtools>

Oh, well, it's probably something involving the Parallels virtual machine setup, and I'm too tired to do much more.

Thanks again for all your attention.

smp

Well, if you have a 6.21 virtual DOS working, then all you will need to do is copy the 22disk DIRECTORY and cpmx.bat to your C drive and run cpmx.bat from there...

I think you will be happy with what you see... unless the virtual DOS doesnt allow low-level control of the drive... then you will likely not get ANYTHING to work correctly.
I have never used the cpmtools utilit(ies) glen mentions... but inside the 22disk directory is a file called tmp.txt (I believe). it is a TEXT version of the disk definitions it is capable of using, and you will find HP1 and HP2 (the one I modified from HP1 for 3.5-SSDDs) there.

Or...
You could put the data disk in the HP and see if it can still read it... then see if you see the files I put on it.

Or both. :p
:D
EDIT:
I just took a look at the wiki on Parallels...
If youre running a 64-bit version it may be responsible for your issues with 98... which would likely balk at the 64-bit setup. Particularly if it is 'forced' onto 98 and not 'self-demoting', dropping back to 32-bit mode. Or perhaps telling Parallels to default to 32 bit would make it happier...

Just a few pennies-worth.. :p

gslick
July 2nd, 2012, 12:52 PM
However, I still am getting the "cpmls: unknown format hp87cpm" error. I have checked and re-checked that I have edited your definition ito the diskdefs file (as the very first entry). For the record, I cannot use cpmls on the example file, either:

C:\cpmtools>cpmls -f apple-do EXMPLCPM.dsk
cpmls: unknown format apple-do

C:\cpmtools>


What did you use to edit the diskdefs file? Do you see something like this:


C:\cpmtools>debug diskdefs
-d
0AE3:0100 64 69 73 6B 64 65 66 20-68 70 38 37 63 70 6D 0A diskdef hp87cpm.
0AE3:0110 20 20 73 65 63 6C 65 6E-20 32 35 36 0A 20 20 74 seclen 256. t
0AE3:0120 72 61 63 6B 73 20 36 36-0A 20 20 73 65 63 74 72 racks 66. sectr
0AE3:0130 6B 20 31 36 0A 20 20 62-6C 6F 63 6B 73 69 7A 65 k 16. blocksize
0AE3:0140 20 31 30 32 34 0A 20 20-6D 61 78 64 69 72 20 31 1024. maxdir 1
0AE3:0150 32 38 0A 20 20 73 6B 65-77 20 30 0A 20 20 62 6F 28. skew 0. bo
0AE3:0160 6F 74 74 72 6B 20 33 0A-20 20 6F 73 20 32 2E 32 ottrk 3. os 2.2
0AE3:0170 0A 65 6E 64 0A 0A 64 69-73 6B 64 65 66 20 69 62 .end..diskdef ib
-q

Or something like this:


C:\cpmtools>debug diskdefs.dos
-d
0AE3:0100 64 69 73 6B 64 65 66 20-68 70 38 37 63 70 6D 0D diskdef hp87cpm.
0AE3:0110 0A 20 20 73 65 63 6C 65-6E 20 32 35 36 0D 0A 20 . seclen 256..
0AE3:0120 20 74 72 61 63 6B 73 20-36 36 0D 0A 20 20 73 65 tracks 66.. se
0AE3:0130 63 74 72 6B 20 31 36 0D-0A 20 20 62 6C 6F 63 6B ctrk 16.. block
0AE3:0140 73 69 7A 65 20 31 30 32-34 0D 0A 20 20 6D 61 78 size 1024.. max
0AE3:0150 64 69 72 20 31 32 38 0D-0A 20 20 73 6B 65 77 20 dir 128.. skew
0AE3:0160 30 0D 0A 20 20 62 6F 6F-74 74 72 6B 20 33 0D 0A 0.. boottrk 3..
0AE3:0170 20 20 6F 73 20 32 2E 32-0D 0A 65 6E 64 0D 0A 0D os 2.2..end...
-q

The key difference I am trying to point out here is the end of line termination, 0x0A (LF) only or 0x0D and 0x0A (CR and LF).

The MS-DOS convention is CR and LF while the Unix convention is LF only.

The Win32 Cpmtools 2.9 binaries appear to only work with a Unix convention version of the diskdefs file. If you edited the file with an editor that saved the file using the MS-DOS convention then that is a problem and would cause the "unknown format" error message.

-Glen

smp
July 2nd, 2012, 04:22 PM
Hi Lee,

OK! 22DISK it will be next. No time right now, but I'll get to it later this week.

I have not yet received your diskettes, but I'll let you know about them when they arrive.

Thanks,
smp

smp
July 2nd, 2012, 04:29 PM
Hi Glen,

Who knew? I just used EDIT in the DOS window. So, now I have probably corrupted the entire DISKDEFS file.
Oh, well, thanks very much for letting me know this. I suppose the next time I can edit the file on my Mac and transfer that over to the virtual machine.
Like I said to Lee, I don't have time right now, but I'll be back at it later this week.

Thanks!
smp

smp
July 3rd, 2012, 01:56 PM
Hi Lee!

The disks arrived today, and I think I can report success:

I see 2 additional files on the HP DATA disk: X10.SRC and TIME.PAS

I can also TYPE both files.

X10.SRC starts with:

; Code snippet... X/10 and X*10
; Orig date unk
; modified 8-3-:0 mlb
;

then there's some source code,

and the file ends with:

RowCol * 21 ;
Col * 05 ;

I'm not certain if that's all that is supposed to be there, or not.


TIME.PAS starts with:

program TIME;
{ version 1.0 12-9-08
version 1.1a 1-1-09
stable version
version 1.2a 7-24-09

then goes on...

the file ends with:

else showhow;
end;
end.


Hopefully, I have gotten everything you put into the CP/MSYS file for me to find?

I am feeling pretty excited about this!

Thanks!

smp

EDIT: I'm sorry, but the message editor shows the proper indenting and stuff, but then strips off the leading spaces when I posted the message...

smp
July 3rd, 2012, 02:01 PM
Hi again, Lee,

I will now be perusing the DOS disk that you sent, and try to get the files into my virtual MS-DOS machine.

Thanks a million! I will probably be asking for specific, details on the steps to take with the 22DISK program(s) to do the same thing for myself.

Thanks again for all your patience and attention.

smp

smp
July 3rd, 2012, 02:34 PM
OK!!!

I read your MS-DOS disk, and I copied the 22DSK directory and the cpmx.bat file onto my MS-DOS virtual machine. Running cpmx.bat starts up 22DISK, and I see the 22DISK main menu as I should. I also see the line under the menu announcing that it is prepared to read disks of type = HP2 and all the details that are on that line.

I can select item 6, Display a CP/M Directory, but unfortunately (but totally expected) I cannot actually read a HP CP/M disk that I inserted into my floppy drive. I really didn't expect that this old program would actually be able to reach out of the virtual machine, through my Mac, through the USB port and read the floppy. That would have been a real miracle. It does try to do its job, but then I get an "Error reading diskette A ... Drive not Ready." However, I think we are in the middle of proving that we can get this done, if I get (yet another) computer working.

Maybe I can get that old PC that I just purchased off eBay to run as an HP-Drive, like Glen did. If nothing else, maybe I can simply use these programs to make some disks. It certainly sounds like I have some new work to get to.

Thanks!
smp

leeb
July 3rd, 2012, 04:15 PM
Yes, Im afraid the problem is the emulator...
If you can get the 'old PC' to RUN... that DOS disk has a WORKING 6.22 ON IT.
It WILL WORK with TRUE drive access...

If I have to, I'll send you the 3800hd to prove it.

He11, it will likely work on the old 1500hd too... and Id have no problem at all giving that one away!
:D

smp
July 3rd, 2012, 04:18 PM
Hi Lee,

So, you didn't answer my question from a few posts up - did I see the 2 files you put on the disk correctly?

Thanks!
smp

leeb
July 3rd, 2012, 04:26 PM
Hi Lee,

So, you didn't answer my question from a few posts up - did I see the 2 files you put on the disk correctly?

Thanks!
smp

Sorry... didnt think to look for any 'unreads'...

Yes, those are it!
... and the Pascal file is pretty long, so if it ended with 'end.' as you showed, then you were able to read it correctly! :cool:

Your only problem now is the emulator.
:D

smp
July 4th, 2012, 03:06 PM
Hi Lee and Glen!

I have achieved some success!

I fired up the old Pentium computer I got from eBay a couple of weeks ago - it came up in Windows 98, but there were a number of funky things going on, so I reformatted the disk drive and loaded MS-DOS 5, then upgraded to MS-DOS 6.21.

I loaded the 22DISK programs and cpmx.bat onto drive C:, just like I did in my virtual machine exercise. Voila! 22DISK was able to read my HP-87 CP/M data disk that Lee sent back to me.

I struggled a bit to get the FIGFORTH.ASM source code text file out of my Mac and onto a MS-DOS data disk, but I finally managed it. I copied that file onto my C:drive, and I was able to use 22DISK to copy the DOS file onto my HP CP/M disk.

On my HP-86B, in CP/M, I have now been able to go through the FIGFORTH.ASM file, and edit out the documented errors that I know. I have been able to assemble the file, LOAD it and I can run the resulting FIGFORTH.COM file. I am now in the midst of scouring the documentation that I have to set variables in the source file correctly, so I will be able to save Forth screens to disk and be able to retrieve them again. This is the method that Forth uses to save and load one's Forth programs. It looks like I may have to dig up the Forth code for the Forth Editor, but this is where I want to be - working with Forth, in CP/M, on my HP-86B!

WHEW!

Thank you very much, Lee, for experimenting and figuring out how to use 22DISK to get this done. This is a big first step.

Thank you, Glen, for setting up your HP Drive, and letting me know that this is also a viable option. I intend to go on and load Windows 98 onto that old computer I have and then I will be able to use the CPMTOOLS program that you suggest. As well, I will then also be able to attempt to set up my own HP Drive.

Thanks a million, you guys. I would not have been able to get here without your assistance. This is a wonderful community here on the Vintage Computer Forums. I hope that over time I can give back a little of what I have received.

I will continue to post about my progress, and I will certainly be asking more questions in the future. I just wanted you guys to know right away that I am achieving success, and thank you both for all your help.

smp

leeb
July 4th, 2012, 03:32 PM
The IMPORTANT thing...

Can the HP(CPM) read what I sent to you?
Oh wait...
nevermind. :rolleyes:

I didnt see anything in the book about video 'emulation' of the CP/M... what does it use to clear the screen? <ctrl> L perhaps?

If we can determine what/how to move around the screen, we can get a working copy of Wordstar to you for code editing... FAR superior to ED.
Hell... beating a wooden log with 2 sticks is better than ED. :rolleyes:

Now... howzabout a copy of Pascal MT+?
:p

gslick
July 4th, 2012, 05:48 PM
There is an official version of Wordstar for HP-86/87 CP/M.

I haven't tried it yet myself.

http://www.hpmuseum.net/display_item.php?sw=270

leeb
July 4th, 2012, 07:43 PM
There is an official version of Wordstar for HP-86/87 CP/M.

I haven't tried it yet myself.

http://www.hpmuseum.net/display_item.php?sw=270

That's even better!!!
NOTHING Id rather use for coding than Wordstar!... IMO, of course! :p

smp
July 5th, 2012, 01:24 PM
Hi Glen,

Thanks a million!

Now for the not-so-good news:

I downloaded the file: WORDSTAR.TD0 from the HP Computer Museum site. I moved the file onto an MS-DOS formatted floppy disk on a USB drive connected to my Mac. I started up Parallels and started my Windows XP virtual machine. I connected the floppy disk drive to Windows XP. In Windows, I opened an MS-DOS window. Within that MS-DOS window, I did a CD A:. On A: I placed a copy of WORDSTAR.TD0 into my IMD118 directory. Within A:\IMD118\ I did TD02IMD WORDSTAR.TD0...

I got the following error message:

TD 1.5 3.5 LD MFM S-step, 2 sides 25/07/2004 22:23:18
WORDSTAR FOR HP 150
Cannot do mixed sector size within track
A:\IMD118>

This is the same sequence that I used successfully to replicate what you did previously with the file HP87CPM.TD0, except I replicated what you did, and I successfully ended up with the .IMD file.

Can you please try this process? I am not familiar with these tools, and I have not found any directions to guide me on what to try next. I'll be looking on the HP Computer Museum site - I seem to remember that they had some directions for transforming .TD0 files into .IMD files.

Thanks in advance, for your continued attention and advice. I will post back if I find something and make any breakthrough, or get further into trouble.

smp

leeb
July 5th, 2012, 01:29 PM
Hi Glen,

Thanks a million!

Now for the not-so-good news:

I downloaded the file: WORDSTAR.TD0 from the HP Computer Museum site. I moved the file onto an MS-DOS formatted floppy disk on a USB drive connected to my Mac. I started up Parallels and started my Windows XP virtual machine. I connected the floppy disk drive to Windows XP. In Windows, I opened an MS-DOS window. Within that MS-DOS window, I did a CD A:. On A: I placed a copy of WORDSTAR.TD0 into my IMD118 directory. Within A:\IMD118\ I did TD02IMD WORDSTAR.TD0...

I got the following error message:

TD 1.5 3.5 LD MFM S-step, 2 sides 25/07/2004 22:23:18
WORDSTAR FOR HP 150
Cannot do mixed sector size within track
A:\IMD118>

This is the same sequence that I used successfully to replicate what you did previously with the file HP87CPM.TD0, except I replicated what you did, and I successfully ended up with the .IMD file.

Can you please try this process? I am not familiar with these tools, and I have not found any directions to guide me on what to try next. I'll be looking on the HP Computer Museum site - I seem to remember that they had some directions for transforming .TD0 files into .IMD files.

Thanks in advance, for your continued attention and advice. I will post back if I find something and make any breakthrough, or get further into trouble.

smp

I too, will see what I can do. I have that imagedisk around somewhere...
Trust me... it WILL be worth it! :p
:D
EDIT: Im wondering if your problem(s) is(are)nt being caused by the USB-based drive...
You might want to try the procedure on the PC...

smp
July 5th, 2012, 02:48 PM
Yes, I agree with you. There is probably something wrong with the setup with the virtual machine - except that I was able to replicate Glen's activities with the initial HP87CPM.TD0 file.

So, I went out into the garage and tried my old PC. I get the same error as I reported from the ImageDisk program.

I downloaded Teledisk version 2.16 (the one for 3.5 inch disks) and got that over onto my old PC, too. That program wants to see every diskette that I insert as a 1.44 MB diskette, even though the Teledisk program correctly sees the WORDSTASR.TD0 file as coming from a low density formatted source disk. So, I am feeling that my old PC hardware is probably fouling me up somehow.

Oh, well. I will keep rooting around and keep trying things, but if I can't get the file out of the .TD0 format, I will not be able to put the image onto a disk, and if the programs suggested by the folks who created the .TD0 files in the first place won't work on my hardware, I may be back in the position of looking for some more hardware that will actually work.

SIGH...

smp

leeb
July 5th, 2012, 02:56 PM
Well, there is one possiblity not being considered...

That the FILE itself is messed up...

:(

Later y'all!
Im out to attempt recovery of an Android tablet with an ARM cpu!

I get to learn ARM SoC assembly language/programming!
Oh joy. :rolleyes:

smp
July 5th, 2012, 04:11 PM
I got the following error message:

TD 1.5 3.5 LD MFM S-step, 2 sides 25/07/2004 22:23:18
WORDSTAR FOR HP 150
Cannot do mixed sector size within track
A:\IMD118>




I am thinking that the original disk was a 5.25 inch double sided disk. That is what is in the picture on the web page that Glen's link pointed to. And within the directions elsewhere on the web site, "...Insert a floppy disc ... The disc need not be blank or formatted. However, it must be the same size and density as the disc from which the archive was made."

Taking the instructions literally, that means that the Teledisk utility can re-create only the exact same physical diskette type as the image was originally on.

That will blow me out of the water for now. Looks like I will have to consider moving on with an attempt to create an HP Drive.

smp

leeb
July 5th, 2012, 07:17 PM
Boy... you sure do give up easy, huh? :p
You think that DINOSAUR in my avatar went together easy?
(5.25 SSDDs to 3.5 DSDDs, custom FD cable, custom HD interface, custom HD driver(s))

Let me see what sort of alchemy I can work up...
Give me a day or two... will keep yall in the loop!
:D

gslick
July 5th, 2012, 09:32 PM
My project for the last couple of evenings was to get a real physical 9895A 8-inch floppy drive up and running with CP/M on the HP-86B. I wanted to do this with a real drive because I haven't been able to get emulated HPDrive disks to format successfully with the HP-86B. If I could get a real physical 8-inch floppy formatted with CP/M on the HP-86B then I could create a disk image from that and use that image with an emulated HPDrive disk. The advantage of doing this is that the 8-inch disks contain over 1MB of data while the 5.25-inch or 3.5-inch disks are around a quarter of that.

I've had a 9895A drive for a few years now and have never actually done anything with it other than power it on briefly, after which it blew its main fuse. I finally decided to get it going and after replacing the fuse with a proper rated one things looked mostly good, except for some head positioner issues. After some mechanical work to clear up something jamming the stepper motor drive I got one of the two 8-inch drives running.

Here are the drive format details after I finally got an 8-inch floppy formatted with CP/M on the HP-86B:


A>stat dsk:

A: Drive Characteristics
1952: 128 Byte Record Capacity
244: Kilobyte Drive Capacity
128: 32 Byte Directory Entries
128: Checked Directory Entries
128: Records/ Extent
8: Records/ Block
32: Sectors/ Track
3: Reserved Tracks

E: Drive Characteristics
8864: 128 Byte Record Capacity
1108: Kilobyte Drive Capacity
128: 32 Byte Directory Entries
128: Checked Direcotry Entries
256: Records/ Extent
32: Records/ Block
60: Sectors/ Track
2: Reserved Tracks

5.25-inch Disk Parameter Block:
20 00 03 07 00 F3 00 7F 00 F0 00 20 00 03 00

0020 Sectors Per Track (32)
03 Block Shift (Allocation Block Size 1024)
07 Block Mask
00 Extent Mask
00F3 Maximum Allocation Block Number (243)
007F Number of Directory Entries - 1 (127)
00F0 Allocation Blocks Bitmap for the Directory
0020 Size of Buffer for Directory Checking (32)
0003 Number of Tracks Before the Directory (3)

8-inch Disk Parameter Block:
3C 00 05 1F 01 14 01 7F 00 80 00 20 00 02 00

003C Sectors Per Track (60)
05 Block Shift (Allocation Block Size 4096)
1F Block Mask
01 Extent Mask
0114 Maximum Allocation Block Number (276)
007F Number of Directory Entries - 1 (127)
0080 Allocation Blocks Bitmap for the Directory
0020 Size of Buffer for Directory Checking (32)
0002 Number of Tracks Before the Directory (2)

One thing that puzzles me is that while the Maximum Allocation Block Number for the 5.25-inch disk format matches my calculations for the number of CP/M directory and file sectors on a 5.25-inch inch disk after subtracting the 3 reserved tracks at the beginning of the disk and the 2 tracks at the end of the disk for the BASIC Autost program and the CP/M binary program, the Maximum Allocation Block Number for the 8-inch disk format appears to only take the 2 reserved tracks at the beginning of the disk into account and not the 1+ tracks at the end of the disk.

For the 8-inch format I calculate ((150-2)*30)-32 = 4408 256-byte sectors, or 275.5 4096-byte blocks. So I would expect the rounded down and zero-based Maximum Allocation Block Number to be 274, not 276.

-Glen

gslick
July 6th, 2012, 08:33 AM
I spent some time looking at the WORDSTAR.TD0 image and realized that it was actually the HP-150 version and the HP Museum site was pointing to the same image for both the HP-150 and HP-86/87 CP/M versions. I sent an email to Jon there and got a quick reply with the correct image which has now been renamed WORDSR80.TD0 there for the HP-86/87 CP/M version. The page there has now been updated to point to the correct image version.

http://www.hpmuseum.net/display_item.php?sw=270
http://www.hpmuseum.net/software/WORDSR80.TD0

I was able use Teledisk to write the WORDSR80.TD0 image out to a physical 3.5-inch floppy (the web page for the HP-86/87 CP/M version of WordStar 3.0 shows a 5.25-inch floppy picture although the text does say 3.5-inch) and then read that
physical 3.5-inch floppy back into a plain disk image using HPDir and then access that disk image just fine from my HP-86B CP/M system as an emulated disk using HPDrive. Now I can run WordStar on my HP-86B.

-Glen

C:\HPDIR>hpdir -query
Info: NI TNT4882 GPIB hardware found at location 0x2C0 [Board 0]
Scanning devices on GPIB:
(0) HP82901/HP9121 (identify=$0104) at address 6
Sending parallel poll query...response=00000000

C:\HPDIR>hpdir -dup 706: WORDSR80.DSK
record 1119 (100%)

C:\cpmtools>cpmls -l -f hp87cpm WORDSR80.DSK
0:
-rw-rw-rw- 12544 Dec 31 1969 example.txt
-rwxrwxrwx 32896 Dec 31 1969 install.com
-rwxrwxrwx 15872 Dec 31 1969 ws.com
-rw-rw-rw- 27904 Dec 31 1969 wsmsgs.ovr
-rw-rw-rw- 34048 Dec 31 1969 wsovly1.ovr
-rwxrwxrwx 15872 Dec 31 1969 wsu.com

C:\HPDRIVE>hpdrive -9121 -a 4 -l 2 -d -n 2 HP87CPM.DSK WORDSR80.DSK
Info: HPDrive 4.0 beta4 (2012/04/09)
Info: NI TNT4882 GPIB hardware found at location 0x2C0 [Board 0] (3c)
File HP87CPM.DSK is write protected, mounting in read-only mode.
File WORDSR80.DSK is write protected, mounting in read-only mode.
9121 drive ready, listening at GPIB address 4 (0.27 0.27 MBytes)

leeb
July 6th, 2012, 01:17 PM
... For the 8-inch format I calculate ((150-2)*30)-32 = 4408 256-byte sectors, or 275.5 4096-byte blocks. So I would expect the rounded down and zero-based Maximum Allocation Block Number to be 274, not 276.
-Glen

The 8-in drive is 77 tracks, right? So it should be 154-2... then the 2 at the end... so 152 total tracks.
Just using the numbers in the DPB, etc I came up with 277 blocks (at 128 byte/rec)... for the total 8864 records.
So... if you figure 256 byte recs, the total is 4432, but the number of records/block would also be halved... so it should still come out to 277...
276 suggests that 32 128-byte records are 'missing'... perhaps there on the end of the disk...

GOOD CATCH on that Wordstar issue - Im sure SMP will appreciate that, as I know I look forward to seeing if the install program (which I 'dont seem to have') will allow me to make 'preferred' changes to the way mine works (for the 4p).

I still have to track down my copy if Imagedisk, but I know its around somewhere...

MAD PROPS to you!!! :bigups:

gslick
July 6th, 2012, 01:29 PM
The HP 9895A physical format is 77 tracks but as I understand how they are used by the drive is that 2 of the tracks are reserved as spares for bad tracks and logically there are only 75 tracks.

Same as on the 5.25 inch where there are physically 35 tracks with 2 reserved as spare tracks leaving 33 logical tracks. Or 3.5 inch with a single side of 70 physical tracks and 4 reserved. That's where the 66 tracks value comes from for the 5.25 and 3.5 inch formats and that number works with the maximum block value there.

smp
July 6th, 2012, 06:34 PM
Boy... you sure do give up easy, huh? :p



Hi again guys,

We were off doing other things today, but when we got home, I put in some more time on my old PC, and I now have the PC successfully running MS-DOS 6.21 as before, but now I have both the original 3.5 inch 1.44 MB floppy disk drive, AND a 5.25 inch 360K floppy disk drive. I had to go through all 3 of my 5.25 inch drive units that I have saved for my S-100 machine. I didn't really know if any of them are in working condition. I think that 2 of them (both are half height form factor) are higher density than 360K, but I could not get either of those to completely integrate with the PC. My full height form factor drive went right in and worked as a 360K drive right off. So, I now have the ability to read and write 5.25 inch 360K double sided diskettes.

On the PC, I have the Image Disk tools, as well as Teledisk version 2.11 (supposedly for 5.25 inch diskettes) and Teledisk version 2.16 (supposedly for 3.5 inch diskettes).

Right now I'm tired, and I do not know if this has actually advanced my capabilities to deal with the issues I am facing, or not. I tried to use Teledisk to write the WORDSTAR.TD0 file onto a 5.25 inch diskette, but I got the error message that the file was from a 3.5 inch disk so it would not write it onto a 5.25 inch disk. I have not been able to dig up a real 270K or 720K 3.5 inch diskette to play around with, so when I try to play around with the 3.5 inch disk drive, it always assumes I want 1.44 MB format. I don't know if that is fouling me up or not. Like I said, I'm tired, so I will be packing things in for tonight.

I think I am now in better shape with my hardware that I was before. Right?

smp

smp
July 6th, 2012, 07:23 PM
I spent some time looking at the WORDSTAR.TD0 image and realized that it was actually the HP-150 version and the HP Museum site was pointing to the same image for both the HP-150 and HP-86/87 CP/M versions. I sent an email to Jon there and got a quick reply with the correct image which has now been renamed WORDSR80.TD0 there for the HP-86/87 CP/M version. The page there has now been updated to point to the correct image version.

http://www.hpmuseum.net/display_item.php?sw=270
http://www.hpmuseum.net/software/WORDSR80.TD0

I was able use Teledisk to write the WORDSR80.TD0 image out to a physical 3.5-inch floppy (the web page for the HP-86/87 CP/M version of WordStar 3.0 shows a 5.25-inch floppy picture although the text does say 3.5-inch) and then read that
physical 3.5-inch floppy back into a plain disk image using HPDir and then access that disk image just fine from my HP-86B CP/M system as an emulated disk using HPDrive. Now I can run WordStar on my HP-86B.

-Glen



Holy cow! I think I got it!

After I posted my last message, I re-read the previous posts and saw Lee's comment that I ought to be happy about Glen's success with Wordstar. So, I went back and really read what Glen had said, and I gave it a try.

I downloaded the correct Wordstar file and got it onto my PC. I used Teledisk version 2.16, like I think I was supposed to. And I used one of my high density 3.5 inch diskettes, with the high density hole blocked to make it pretend to be a low density diskette.

Teledisk gave me an error on pretty much every track at sector 17, but I saw somewhere that one of the things to try is ignore errors and just go on, so I did. When I got the entire diskette copied, I brought it onto my HP-86B and, holy cow, everything showed up on my drive B: as it should. I went onto drive B: and executed WS, and there I was, in Wordstar.

Now I know absolutely nothing about using Wordstar, so I stumbled around with the onscreen assistance, and I was able to load in EXAMPLE.TXT and wander around in it. I could not find the command to exit from Wordstar (!) so I reset the HP-86B to get out of everything. Now, obviously, I need to find some directions on how to use Wordstar, so I can actually be able to accomplish something.

Thanks a million, Glen. I don't really understand everything that's going on, but I have been able to keep up with your accomplishments. Also, it appears that my PC is actually working OK, so that is an accomplishment for me.

Thanks a million, guys. Your attention and assistance is greatly appreciated.

smp

gslick
July 6th, 2012, 07:30 PM
Right now I'm tired, and I do not know if this has actually advanced my capabilities to deal with the issues I am facing, or not. I tried to use Teledisk to write the WORDSTAR.TD0 file onto a 5.25 inch diskette, but I got the error message that the file was from a 3.5 inch disk so it would not write it onto a 5.25 inch disk. I have not been able to dig up a real 270K or 720K 3.5 inch diskette to play around with, so when I try to play around with the 3.5 inch disk drive, it always assumes I want 1.44 MB format. I don't know if that is fouling me up or not. Like I said, I'm tired, so I will be packing things in for tonight.
smp

I wrote the WORDSR80.TD0 Teledisk disk image file to a non-HD 3.5-inch floppy disk. In the PC world that would be a 360KB (single-sided) or 720KB (double-sided) floppy, not an HD 1.44MB (double-sided) floppy. If you were to write that Teledisk disk image file to a 5.25-inch floppy there isn't any HP drive hardware that would work with. The disk image is for a singled-sided 70 track 3.5-inch disk while the HP 5.25-inch drives are double-sided 35 track disks. (The Teledisk disk image appears to actually contain some sort of information for the second side and for tracks 70-79, although whatever information they contain for those tracks is not meaningful).

You should get your old PC set up with the GPIB board and HPDir and HPDrive and once you have that set up it will make some things easier.

-Glen

leeb
July 6th, 2012, 09:45 PM
Holy cow! I think I got it! .... Thanks a million, guys. Your attention and assistance is greatly appreciated.

smp

1) Open the file you want to work with AFTER starting wordstar. otherwise it will default to DOCUMENT mode (unless it has been changed by the install pgm)
2) Once its started, press 'N' for non-document file (unformatted, plain text)
3) Use of ^Kq will exit a file... prompted if file is changed. ^Kd (done) will save & close.
4) ^Kx exits Wordstar.
*** IF you press ^K and wait, it will display the options!

That's the fast-and-dirty. If you have 'arrow' keys you are likely able to use them... else ^E=up, ^X=down, ^S = left, ^F = right...

Oh... you might want to check the PCs BIOS to see if it can be 'forced' to the DD floppy type. Might have less issues with it.
:D

smp
July 7th, 2012, 01:01 PM
You should get your old PC set up with the GPIB board and HPDir and HPDrive and once you have that set up it will make some things easier.

-Glen



Hi Glen,

Amen to that! However, my latest adventure with my old PC is that I cannot get the CD Drive to work. Since I had to rebuild the hard disk, I started off with MS-DOS, and I figured that I could add Windows 98 later. Now that later is here, I have a non-responsive CDROM drive. Of course! All I have is MS-DOS, and MS-DOS knows nothing about the CDROM drive. The adventure goes on!





1) Open the file you want to work with AFTER starting wordstar. otherwise it will default to DOCUMENT mode (unless it has been changed by the install pgm)
2) Once its started, press 'N' for non-document file (unformatted, plain text)
3) Use of ^Kq will exit a file... prompted if file is changed. ^Kd (done) will save & close.
4) ^Kx exits Wordstar.
*** IF you press ^K and wait, it will display the options!

That's the fast-and-dirty. If you have 'arrow' keys you are likely able to use them... else ^E=up, ^X=down, ^S = left, ^F = right...



Hi Lee,

Thanks very much for those tips. I have done a proper install, and now those tips make a bit more sense.





Oh... you might want to check the PCs BIOS to see if it can be 'forced' to the DD floppy type. Might have less issues with it.




Yes. I checked, and there does not seem to be a way available to do that. That's OK, though, because when I followed the directions properly, and I had a high density disk with its HD hole blocked to pretend to be a low density disk, everything came out OK.

I am learning a lot here, kind of a trial by fire for me.

Thanks guys, for your patience and attention.

smp

leeb
July 7th, 2012, 02:20 PM
Hi Glen,

Amen to that! However, my latest adventure with my old PC is that I cannot get the CD Drive to work. Since I had to rebuild the hard disk, I started off with MS-DOS, and I figured that I could add Windows 98 later. Now that later is here, I have a non-responsive CDROM drive. Of course! All I have is MS-DOS, and MS-DOS knows nothing about the CDROM drive. The adventure goes on!




Hi Lee,

Thanks very much for those tips. I have done a proper install, and now those tips make a bit more sense.





Yes. I checked, and there does not seem to be a way available to do that. That's OK, though, because when I followed the directions properly, and I had a high density disk with its HD hole blocked to pretend to be a low density disk, everything came out OK.

I am learning a lot here, kind of a trial by fire for me.

Thanks guys, for your patience and attention.

smp

Look online for OAKCDROM.SYS... probably the most compliant drivers out there for DOS.
If you cant find it, let me know... I can probably email it to you.

IF you find it..
Entry in CONFIG.sys:
device=(wherever-u-put-it)\OAKCDROM.SYS /d:mscd001

Entry in AUTOEXEC.bat
C:\DOS\mscdex.exe /d:mscd001

You can actually start up mscdex.exe 'manually' to ensure it works...
:D
EDIT: Isnt the 98 cd bootable?
You may just need to check the BIOS again to set the 1st boot device to CDROM (ATAPI)...

If all else fails, I BELIEVE I have a 95 boot floppy (cuz 95 DIDNT self-boot) I can image off & send you.
:D

smp
July 7th, 2012, 03:04 PM
EDIT: Isnt the 98 cd bootable?
You may just need to check the BIOS again to set the 1st boot device to CDROM (ATAPI)...



OK!

I was so worried that the CDROM drive seemed to be unresponsive - I couldn't get it to open or anything.

So, after I read your question, I remembered that I had set the CDROM drive to be bootable in the BIOS. So... I carefully crowbarred the CD tray open while no power was applied, and I put in the Windows 98 CD, and when I applied power, the CD tray got sucked in, as expected, and the Windows 98 CD booted, and it installed its own driver for the CDROM drive (yes it was some version of OAK something-or-other), and the Windows 98 Setup screen came up, and I am now installing Windows 98.

I still don't know why I couldn't get the CDROM drive to open up when power was applied. It seems to me that the mechanism should recognize the "open up" button, whether or not anything else is set properly for computer operation. That just stopped me in my tracks, until your question made me think about it.

When I get Windows 98 in there, I will re-check everything that I had working under MS-DOS to be sure that it's all still there, or I will re-install it if it isn't. This will get me to the point that I can download IEEE-488 driver stuff for my HP-IB I/O board, and, hopefully get that running. Then I could be on my way to creating an HP Drive, like Glen.

Thanks again!

smp

leeb
July 7th, 2012, 03:53 PM
OK!

I was so worried that the CDROM drive seemed to be unresponsive - I couldn't get it to open or anything.

So, after I read your question, I remembered that I had set the CDROM drive to be bootable in the BIOS. So... I carefully crowbarred the CD tray open while no power was applied, and I put in the Windows 98 CD, and when I applied power, the CD tray got sucked in, as expected, and the Windows 98 CD booted, and it installed its own driver for the CDROM drive (yes it was some version of OAK something-or-other), and the Windows 98 Setup screen came up, and I am now installing Windows 98.

I still don't know why I couldn't get the CDROM drive to open up when power was applied. It seems to me that the mechanism should recognize the "open up" button, whether or not anything else is set properly for computer operation. That just stopped me in my tracks, until your question made me think about it.

When I get Windows 98 in there, I will re-check everything that I had working under MS-DOS to be sure that it's all still there, or I will re-install it if it isn't. This will get me to the point that I can download IEEE-488 driver stuff for my HP-IB I/O board, and, hopefully get that running. Then I could be on my way to creating an HP Drive, like Glen.

Thanks again!

smp

CROWBARRED!!! :eek: :eek:
There is a itty-bitty hole in front that you can use a bent-open paper clip (or somesuch) to push the mechanism that opens the drawer!
Crowbars are 'overkill'! :rolleyes:

The reason it takes so long for the drive to open is,
1) it has to complete its own 'boot' process, and by then
2) the computer has sent it a 'reset' so it goes thru it all over again,
3) THEN it can recognize the open/close button...

Patience is a virtue... or some harlot on the corner! :p
Or just allow it to fail to boot until the drive is ready to puke up whatever it has in it..
:D

smp
July 7th, 2012, 04:56 PM
CROWBARRED!!! :eek: :eek:
There is a itty-bitty hole in front that you can use a bent-open paper clip (or somesuch) to push the mechanism that opens the drawer!
Crowbars are 'overkill'! :rolleyes:




Not on THIS one there isn't! I searched for it - and I only found a small slot underneath the center of the drive tray door that was obviously for a fingernail to grab the tray door and pull it out. So, I did. And it worked. At least to get me into the lollapalooza of loading Windows 98. That did not complete, even after a number of restarts and re-dos. Win 98 seems not to like my 360K 5.25 inch drive. Towards the end of the install process it would probe the disk drive (during discovery of plug-and-play devices, and during setup of plug-and-play devices). That's where the process would hang up forever. I wiped my disk and re-installed MS-DOS 5. At least there I have a stable system that I can transfer .TD0 files to and make diskettes.

smp

leeb
July 7th, 2012, 07:35 PM
Sorry the floppys arent cooperating...

This is what Ive been working on... to get JTAG to work on an ARM-based tablet...

9620

Sorry its so hard to read... the uploader was giving me 'attitude'. :rolleyes:

:D

gferluga
July 11th, 2015, 11:16 AM
Can you share the MS-DOS disk with the 22DSK folder?
Thx

gferluga
July 12th, 2015, 03:48 AM
Anyone on this issue?
Is possible to get the 22DISK with HP2 configuration?
Thx

smp
July 12th, 2015, 08:52 AM
Anyone on this issue?
Is possible to get the 22DISK with HP2 configuration?
Thx

If you are the fellow named Giancarlo that I received a private e-mail message from, I just responded to you with two messages containing the two files that you need.

Good luck to you! Please let us know how things work out.

smp

biin
May 15th, 2016, 01:18 AM
I spent some time looking at the WORDSTAR.TD0 image and realized that it was actually the HP-150 version and the HP Museum site was pointing to the same image for both the HP-150 and HP-86/87 CP/M versions. I sent an email to Jon there and got a quick reply with the correct image which has now been renamed WORDSR80.TD0 there for the HP-86/87 CP/M version. The page there has now been updated to point to the correct image version.

http://www.hpmuseum.net/display_item.php?sw=270
http://www.hpmuseum.net/software/WORDSR80.TD0


RIP Jon :(

http://www.hpmuseum.org/forum/printthread.php?tid=6160