Sim45-Hardware Emulation
#1

Hi!
I finally have managed to run the hp45 Microcode on a PIC Microchip. Everything works fine execp for the tig-functions.
My program interprets the following Opcodes (all decimal= in another way:
116,244,372,500,628,756,884,1012: I think they are op_clear_s, but sim45 says the are op_del_sel_rom.

512: I think it is a reserved function not used by the hp45, but sim45 says it´s op_rom_addr_to_buf

564 and 692: I think it´s op_clear_s, but sim45 treats them as op_del_sel_grp.

My information is from the patent 4....... (the one about the hp45). I would like to know where you got your information from and why your trig-functions work and mine not.

I actually wrote the whole program in very simple c, so any compiler for a microcontroller will compile it. I tested it on my pc and it actually runs on my pic.

Beta testers please eMail me.

#2

Quote:
decimal= in another way: 116,244,372,500,628,756,884,1012: I think they are op_clear_s, but sim45 says the are op_del_sel_rom. [...] 564 and 692: I think it´s op_clear_s, but sim45 treats them as op_del_sel_grp.

Definitely delayed select rom instructions and delayed select group instructions. The clear s
instruction is 52 decimal (and 52 + x * 64).

Quote:
512: I think it is a reserved function not used by the hp45, but sim45 says it´s op_rom_addr_to_buf

Yes.

Quote:
I would like to know where you got your information from

I'm not sure who "you" in this sentence refers to, but I wrote the CASMSIM simulator in March 1995, using information from US patents. The trig functions seem to work OK. sim45 is a Java port of CASMSIM by Dave Hicks. CASMSIM is now obsoleted by Nonpareil, which simulates a wider range of HP calculators.

Quote:
and why your trig-functions work and mine not.

A bug in your implementation? Possibly you have the wrong opcodes for the clear s instruction?

I suggest capturing a trace of your simulator, and comparing it to this
Nonpareil simulation trace of the HP-45 computing the cosine of 30 degrees
.

Currently I'm trying to track down a similar problem in Nonpareil; the logarithmic and exponential functions of the HP-25 are not working correctly in simulation.

#3

Hi Eric,

I still think I´m right. 116,244,... all end with ...100 (in binary), that means they are Type3- Instructions.
52+x*64 = 52,116,..,244,308,372,436,500,...
So the formula you provided also tells they are clear_s.

I think my problem is that I took the output of your assembler and interpreted it my way.

Greetings, Klaus

#4

While the original 1818-0012 CTC chip probably did clear the status bits as expected from the patent description for any instruction xxxx110100, the later 1818-0078 must have ignored the instruction if the top four bits were nonzero. The "delayed select rom n" and "delayed select group n" instruction do in fact use these encodings.

The HP-35, HP-45, and HP-80 do not use the "delayed select" instructions, and have been seen with either CTC chip. The HP-55 and HP-65 use the "delayed select" instructions, and I have only ever seen the 1818-0078 CTC chip in those models. I am not sure whether the HP-46, HP-70, HP-81, and HP 1722A use any "delayed select" instructions, but I suspect that they are used in the HP-70 and not in the others.

I probably noticed this feature of the instruction encoding when I originally wrote CASMSIM back in 1995, but had since forgotten about it.

The HP-35, HP-45, and HP-80 ROMs do not contain any "clear status" instructions with non-zero top four bits, so it is acceptable to only simulate the behavior of the later CTC chip.

#5

Here is an example assembler source file and corresponding listing file:

delayed_inst.asm

delayed_inst.lst

#6

Hi Eric,
thank you for helping me.
I have adapted my program to your opcodes, and now everything seems to work (at least on the pc, the pic seems to have problems (perhaps with a data type). Are you interested in publishing my program as a subproject of nonpareil (I will try to run more of the classic calcs)?
I also have some patents yoou haven´t listed. Would you like a list of them?

Thank you ! Klaus

#7

Quote:
I have adapted my program to your opcodes, and now everything seems to work

Great! I hope you are able to find the bug in the PIC version quickly.

I've also got a PIC version under development, but I'm not as far along. I started it in late 1995 on a PIC16C74, but didn't get too far before I shelved it. Just last month my friend Richard Ottosen built some new hardware using a PIC18F452, and I dusted off the old code and have been working on it.

I'll probably have some pictures of Richard's hardware online soon, so I'll post a link here.

Quote:
Are you interested in publishing my program as a subproject of nonpareil (I will try to run more of the classic calcs)?

Probably not an "offical" subproject, but I'd be delighted to either provide a link, or to provide a web page for your program on the Nonpareil site.

Quote:
I also have some patents yoou haven´t listed. Would you like a list of them?

Yes, thanks! I've been meaning to get PDFs of all the known patents online, so that will provide more motivation for me to get my act together.



Possibly Related Threads...
Thread Author Replies Views Last Post
  Dedicated HP calculator programming-hardware-bug website? Geoff Quickfall 12 823 10-12-2013, 11:34 PM
Last Post: Les Koller
  Last HP emulation, 32 & 01 Olivier De Smet 0 248 09-07-2013, 08:27 AM
Last Post: Olivier De Smet
  HP Prime (DVT Prototype) Hardware Details Adrien Bertrand 7 696 08-10-2013, 12:04 PM
Last Post: Eric Smith
  [wp34s] Minor Issue with Stopwatch on real hardware RalfGeiger 3 526 04-16-2013, 04:12 PM
Last Post: Eric Smith
  HP 50G emulation for android Olivier De Smet 3 426 04-14-2013, 12:01 PM
Last Post: CompSystems
  HP 10s+ hardware Mic 1 236 04-07-2013, 07:52 PM
Last Post: Eddie W. Shore
  New HP71B emulation (go71b) Olivier De Smet 9 747 06-26-2012, 10:25 AM
Last Post: Jerry Raia
  SY-41CL: Hardware Difference Between V2 and V3 Gerry Schultz 2 299 05-26-2012, 11:54 AM
Last Post: Monte Dalrymple
  Program works in emulators but not on HP-15c hardware Marcel Samek 32 1,994 05-11-2012, 08:46 PM
Last Post: Jeff O.
  HP-41 keyboard issue - help from the hardware gurus here Geir Isene 7 610 04-16-2012, 05:06 PM
Last Post: Geir Isene

Forum Jump: