HP41 bus analyzer



#10

Based on an idea brought forward by Eric Smith for his Rom sucker, I have put together an HP41 bus analyzer, based on an FTDI FT245BM USB chip, with the external WR strobe signal connected to the HP41 CLK01 line. With a little program in Delphi I get a listing as shown below. It is not perfect and I sometimes miss a clock or two, but it will be a good help in my further debugging the MLDL2000. The lines D3 to D7 can obviously be connected to other signals. I recently discovered a nasty bug that appears to be synthesis dependent and thus could be a timing problem.

Just thought this might be interesting,

Meindert

SYNC ISA DATA D3 D4 D5 D6 D7 Phase Comment
---- --- ---- -- -- -- -- -- ----- ------------------
0 0 0 0 0 0 0 0 46
0 1 0 0 0 0 0 0 47
0 1 0 0 0 0 0 0 48
0 0 0 0 0 0 0 0 49 Mant 1 : 0
0 0 0 0 0 0 0 0 50
0 0 0 0 0 0 0 0 51
0 0 0 0 0 0 0 0 52
0 0 0 0 0 0 0 0 53 Mant 0 : 0
0 0 0 0 0 0 0 0 54
0 0 0 0 0 0 0 0 55 Data : 006
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 Sign : 0
0 0 1 0 0 0 0 0 2
0 0 0 0 0 0 0 0 3
0 0 1 0 0 0 0 0 4
0 0 1 0 0 0 0 0 5 Exp LSD : D
0 0 1 0 0 0 0 0 6
0 0 1 0 0 0 0 0 7
0 0 1 0 0 0 0 0 8
0 0 1 0 0 0 0 0 9 Exp MSD : F
0 0 0 0 0 0 0 0 10
0 0 0 0 0 0 0 0 11
0 0 0 0 0 0 0 0 12
0 0 0 0 0 0 0 0 13 Exp Sign: 0
0 0 0 0 0 0 0 0 14
0 0 0 0 0 0 0 0 15
0 0 0 0 0 0 0 0 16
0 0 0 0 0 0 0 0 17 Mant 9 : 0
0 0 0 0 0 0 0 0 18
0 0 0 0 0 0 0 0 19
0 0 1 0 0 0 0 0 20
0 0 1 0 0 0 0 0 21 Mant 8 : C
0 0 0 0 0 0 0 0 22
0 1 1 0 0 0 0 0 23
0 1 0 0 0 0 0 0 24
0 0 0 0 0 0 0 0 25 Mant 7 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 16
0 0 0 0 0 0 0 0 17 Mant 9 : 0
0 0 0 0 0 0 0 0 18
0 0 0 0 0 0 0 0 19
0 0 1 0 0 0 0 0 20
0 0 1 0 0 0 0 0 21 Mant 8 : C
0 0 0 0 0 0 0 0 22
0 1 1 0 0 0 0 0 23
0 1 0 0 0 0 0 0 24
0 0 0 0 0 0 0 0 25 Mant 7 : 2
0 0 0 0 0 0 0 0 26
0 0 0 0 0 0 0 0 27
0 0 0 0 0 0 0 0 28
0 0 0 0 0 0 0 0 29 Mant 6 : 0
0 0 0 0 0 0 0 0 30
0 0 0 0 0 0 0 0 31 Addr: 0181
0 0 0 0 0 0 0 0 32
0 0 0 0 0 0 0 0 33 Mant 5 : 0
0 0 0 0 0 0 0 0 34
0 0 0 0 0 0 0 0 35
0 0 0 0 0 0 0 0 36
0 0 0 0 0 0 0 0 37 Mant 4 : 0
0 0 0 0 0 0 0 0 38
0 0 0 0 0 0 0 0 39
0 0 0 0 0 0 0 0 40
0 0 0 0 0 0 0 0 41 Mant 3 : 0
0 0 0 0 0 0 0 0 42
0 0 0 0 0 0 0 0 43
0 0 0 0 0 0 0 0 44
0 0 0 0 0 0 0 0 45 Mant 2 : 0


#11

You said:

"Based on an idea brought forward by Eric Smith for his Rom sucker, I have put together an HP41 bus analyzer, based on an FTDI FT245BM USB chip, with the external WR strobe signal connected to the HP41 CLK01 line ..."

Maybe this is a stupid question, but why not use the parallel port? Would seem to be much simpler to me.


Regards,

Jonathan

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

Jonathan Busby - jdb@SNMAPOhouston.rr.com

Remove the random permutation of "NOSPAM" before replying.


#12

I think that you can use the parallel port at the needeed speed only in plain old DOS. In W*ndows environment is much harder to access the parallel port directly (in W98 is easier).

My first choice was to build on the parallel port and use my old Turbo Pascal on DOS to read it. But I hasn't time...

There is also the need to put a level-converter on the inputs not only on the parallel port, but in any other "analyzer" that connects to CMOS/MOS voltage levels to TTL levels.

Best regards,

Nelson


#13

Totally correct. I use a 4049 inverting buffer for voltage conversion (the buffer is in the MLD2000 anyway). The USB solution is absolutely better than a parallel port connection: hot plug, very small and indeed very very easy to implement under Windows XP. In addition it has both hard- and software buffers for storing prattyu large amounts of data.

Meindert

#14

Quote:
but why not use the parallel port?

You'd have to disable interrupts, or you'd miss data.


#15

You said:

"You'd have to disable interrupts, or you'd miss data."

Who said we were using windoze? :) I don't know why you'd want to anyway as it's a huge mass of slow bug ridden bloatware and only gets in the way when custom low level hardware access or strict timing is required. Why not use DOS?

That being said though, even under windows it should be possible to use the parallel port as a "logic probe" as ECP mode supports FIFO buffered fully interrupt driven operation at 2Mbit/s (per each of the 8 data lines). Does anyone remember all the now obsolete parallel port only storage devices and scanners etc.? I would assume there's some standard programming interface, but I'm not a windows programmer.

It just seems to me that the above would be overkill considering that it's very easy with DOS, C/Pascal and a little in-line assembler. I've always used this method, but I guess to each his own.

Regards,

Jonathan

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

Jonathan Busby - jdb@SNMAPOhouston.rr.com

Remove the random permutation of "NOSPAM" before replying.


#16

Quote:
Who said we were using windoze?

Certainly not me. I'm using Linux.

Quote:
even under windows it should be possible to use the parallel port as a "logic probe" as ECP mode supports FIFO buffered fully interrupt driven operation at 2Mbit/s (per each of the 8 data lines).

Quite possible under Windows or Linux. But a lot more work, and there would need to be a processor in the romsucker, and firmware written for it, etc. I could certainly do that, but the FTDI USB chip was even easier. Eight bits parallel in with a strobe. On the Linux side, just open /dev/ttyUSB0 and read data. You can use stty and cat, so that you don't really even need to write a program to do the capture, although I did write one. Doesn't get much more trivial than that.

Under Windows there's a driver for the FTDI, but AFAIK you do have to write at least a simple program to read from it.


#17

I've started building a Mark 3 Romsucker. I've described the Mark 2 here, and provided links to photos.

The Mark 3 will use LM311 comparators rather than the LTC1045 level shifter, because I've had some trouble with the way I wired the latter. I'm also putting a PIC18F6620 in it, and will have the PIC do a small amount of formatting on the data before it's sent to the PC over the USB.

But the main difference is that this version will eventually
also act as a ROM emulator as well, to help with reverse-engineering the second and third generation CPUs (Woodstock and Spice). Thus far it appears that the second and third generation instruction sets are the same (aside from the checksum instruction in Spice), but as I get the instruction set reverse-engineered I plan to run "regression tests" against both to attempt to catch any differences.

It's difficult to operate a Woodstock with the back off and probes on the ACT chip, so I'm thinking about desoldering the chips from an HP-21 on a breadboard. I've got two bad HP-21s, and I haven't yet tried to repair them. I suspect the power supply circuitry has gone bad, but don't know whether it's damaged the chips. So I'll try to do something with one of those before I tear apart the working HP-21. Fortunately the HP-21 doesn't seem to be too rare, so I can probably get another one on eBay if necessary.

Does anyone have any 2nd or 3rd generation calcs (Woodstock, Topcat, Spice, etc.) they're willing to sacrifice for the reverse engineering cause? They don't have to look pretty, but ideally they should mostly work. (Although completely dead ones are still useful for spare parts.) Donations would be fantastic, but I'm willing to pay a modest amount.


#18

I have chips from a dead (corroded) solderless HP-38C. I think that the chips may be OK, as the corrosion was the cause of failure.

Best regards,

Nelson


#19

Thanks for the offer! The 38C chips may turn out to be useful, but don't send them yet, as I'm going to work on reverse-engineering the Woodstock series first.

The instruction sets of the Woodstock and Spice series processors are very close, and possibly identical, so I might not end up needing to do very much reverse engineering of the Spice.

#20

Hi Eric,

I have two Woodstocks. I'm willing to part with them for the reverse engineering cause.

HP-21 in good condition.

HP-25 in good condition but somewhat flaky keyboard.

I don't want to give them away, so let's call it a loan. No charge if you can eventually get them back to me in working order within, say, six months; otherwise we'll negotiate. (And we're responsible for our own shipping charges.)

Let me know if you're interested.

- Michael


#21

Thanks for the offer! However, I'm mostly looking for spares that I can actually completely disassemble (desolder chips from PCB), so I wouldn't want to do that on a calculator that was just on loan.

I haven't found my HP-25 yet. If it's not working (like two out of three of my HP-21s), I might want to borrow one, though I wouldn't desolder anything.

The purpose of desoldering chips is to run the ACT and the bank-switched ROMs in isolation in test circuits, in order to reverse-engineer the instruction set and the bank switching more easily. A PIC microcontroller will be wired to the bus for stimulus and capture. I suppose I'll do that with the ACT on my working HP-21, though I would have preferred to do it on a spare. It's possible that some ACT chips in later models such as the HP-19C/29C/67/97 may have added features, so if I can't get the microcode from all the calculators running correctly in simulation, I may have to do these experiments again with a later ACT.

It's possible that some or all of the chips in my non-working HP-21s might be OK, but I have limited time to spend on this so I'd prefer not to waste a bunch of time on chips that might be bad.

The HP-25 doesn't use bank-switch ROM. I'm fairly sure that the only second and third generation calcs that use bank switching are the HP19C, HP-67, HP-92, HP-95C, HP-97, HP-34C, and HP-38E/C. I only need to desolder the ROM from one second generation and one third generation calc. I'll probably do that with my HP-97, and take Nelson up on his offer of a set of chips from an HP-38C.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP71B - Bus Raymund Heuvel 8 767 05-07-2010, 10:49 AM
Last Post: Didier Lachieze
  USB Logic Analyzer Thomas Chrapkiewicz 7 662 03-09-2010, 04:54 PM
Last Post: Adrian Godwin
  OT: Sequential Boolean Analyzer Katie Wasserman 4 538 01-17-2010, 01:33 PM
Last Post: Katie Wasserman
  HP50g (Vibration Analyzer) Brad Davis 10 937 09-03-2007, 07:29 PM
Last Post: Dave Shaffer (Arizona)
  HP-85 bus and clock signals Roberto Bazzano 0 242 01-16-2006, 10:28 AM
Last Post: Roberto Bazzano
  HP Series80 bus expander Vassilis Prevelakis 0 222 10-27-2005, 08:52 PM
Last Post: Vassilis Prevelakis
  Designing a Logic State Analyzer for calc repairs don wallace 14 1,091 10-11-2005, 04:45 PM
Last Post: donald wallace
  HP-IL analyzer for the HP-71B?? Vassilis Prevelakis 5 705 03-20-2005, 07:10 AM
Last Post: Mike (Stgt)
  12c Platinum in Investor's Bus Daily RB Jones 2 378 06-03-2003, 09:47 PM
Last Post: Rick
  HP85 bus signal levels Vassilis Prevelakis 0 225 05-31-2003, 02:12 AM
Last Post: Vassilis Prevelakis

Forum Jump: