Post Reply 
Nonpareil status
10-06-2022, 11:31 PM (This post was last modified: 10-06-2022 11:37 PM by brouhaha.)
Post: #1
Nonpareil status
After the recent HHC conference, when I felt motivated to do some calculator hacking, I realized that since my move from San Jose to Denver in 2012, I've done almost no work on Nonpareil. That was never my conscious intention, and I didn't give it a lot of thought until now. It was never my conscious intention to abandon it; the move and job changes just changed my life so much that it got lost in the shuffle.

As a result of neglect, "bit rot" has set in. I did a tiny amount of work on a few dates between 2014 and 2018, which were never released. I was surprised to discover that I now couldn't even build Nonpareil rom source code on a current Linux system. The primary issues are related to much newer versions of SCons (the build system I use) and Python.

I've migrated the source code repository to Github and fixed the build issues so that it will build with SCons 4.4.0 and Python 3.10. I've merged the 2014-2018 changes, cleaned up a few things slightly, and ripped a bunch of stuff out of the build system where I was abusing SCons in ways its developers did not intend. I've added partially reverse-engineered HP-91 ROM source code. (I don't yet have the HP-91 actually working.)

I'm not promising that I'll do a whole lot of upgrades or maintenance, but I'm going to try not to let it bit rot for years again. Some of the things I hope to work on are supporting the HP-01 and HP-91.

For people just wanting a convenient simulator to use, the ones from Panamatik, Teenix, and Mike T. are probably a better choice than Nonpareil. Nonpareil is more of an ongoing research project.

Speaking of this being a research project, one of the things I'm looking into is that it appears that the HP-67 and -97 have three data storage registers in the hardware that are UNUSED! I haven't yet convinced myself 100%, but I can't find anything in the ROM that accesses registers at hardware addresses 0x3a through 0x3c. It seems that they could have made them available as user storage registers, allowing for 29 total instead of 26. Of course, they'd only be indirectly addressable.
Find all posts by this user
Quote this message in a reply
10-07-2022, 12:24 AM (This post was last modified: 10-07-2022 12:26 AM by teenix.)
Post: #2
RE: Nonpareil status
(10-06-2022 11:31 PM)brouhaha Wrote:  Speaking of this being a research project, one of the things I'm looking into is that it appears that the HP-67 and -97 have three data storage registers in the hardware that are UNUSED! I haven't yet convinced myself 100%, but I can't find anything in the ROM that accesses registers at hardware addresses 0x3a through 0x3c. It seems that they could have made them available as user storage registers, allowing for 29 total instead of 26. Of course, they'd only be indirectly addressable.

I noticed this also, but didn't look too deeply into it.

Maybe it was easier to use the SAME ROM/RAM type for manufacturing even though that RAM was not going to be used.

The code for RAM transfer is a simple loop with...

$0EA0 1E2 c + 1 -> c[p]
$0EA1 23F if no carry go to $E8F

as the final test, and when C[0] > 9, the loop stops.

If the Binary mode was enabled and the test terminated when C[0] = $D, the extra registers could have been transferred. A modification to the loop may have required too many extra instructions and wouldn't fit in any remaining unused ROM.

cheers

Tony
Find all posts by this user
Quote this message in a reply
10-11-2022, 04:02 PM
Post: #3
RE: Nonpareil status
Thanks a lot for upgrading the project.
Especially for this commit:
Code:
commit 2f847fc628fb974e03ee4c7dbc61502d87f39216
Author: Eric Smith <spacewar@gmail.com>
Date:   Thu Oct 6 18:42:16 2022 -0600

    Voyager ROMs.

Here's a short description on how to install it on RHEL8 but other Linux distributions might be similar.

Clone the Repository

Code:
git clone https://github.com/brouhaha/nonpareil.git

Patch some Scripts

I had to make a few changes in order to build it on RHEL8:
Code:
diff --git a/SConstruct b/SConstruct
index 1e5cce8..3e89db4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -197,7 +197,6 @@ SConscript ('scons/ncd.py')

 ncd_dirs = ['35', '45', '55', '80',
             '21', '22', '25-25c', '27',
-            '91',
             '67-97',
             '19c-29c',
             '32e', '37e', '38e',
@@ -227,7 +226,7 @@ all_calcs = {'classic':    ['35', '45', '67'],  # 55, 80
              'topcat':     ['97'],  # 91
              'spice':      ['32e', '33c', '34c', '37e', '38c', '38e'],
              'nut':        ['41c', '41cv', '41cx'],
-             'voyager':    ['11c', '12c', '15c', '15c-192', '16c']
+             'voyager':    ['11c', '12c', '15c', '16c']
              }

 nui_dir_sub = {'41cv': '41c',
diff --git a/src/SConscript b/src/SConscript
index 9d37491..ee4b4ce 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -42,7 +42,7 @@ if cross and ming and build_target_only:
     build_env.Append (CCFLAGS = ['-mms-bitfields'])
     build_env.Replace (PROGSUFFIX = '.exe')
 else:
-    pkg_config_cmd = 'pkg-config'
+    pkg_config_cmd = 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig pkg-config'
     sdl_pkg_config_cmd = 'sdl-config'
 pkg_config_cmd += ' --cflags --libs '
 sdl_pkg_config_cmd += ' --cflags --libs '

Installing scons

I've created a virtual environment venv to install scons:
Code:
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install scons

For this I've used Python 3.9.7.

Dependencies

Not sure what I had already installed, but I assume we have to install these packages:
  • gtk2
  • gtk2-devel
  • libgsf
  • libgsf-devel

Build and Installation

Code:
scons
scons install

This installed the binary in /usr/local/bin/nonpareil.
Since that directory is in the PATH I could start it simply with nonpareil.
Find all posts by this user
Quote this message in a reply
10-12-2022, 03:30 PM
Post: #4
RE: Nonpareil status
Thanks for reactivating it. I see there are some changes in the Voyager ROMs, I am using the old ROMs with the go1xc Android apps, should I update those?
Find all posts by this user
Quote this message in a reply
10-12-2022, 10:42 PM (This post was last modified: 10-13-2022 04:03 PM by Mark H. Shin.)
Post: #5
RE: Nonpareil status
Hello Eric!

Let me introduce my self...

I am the developer of an "ancient" emulator of the 12C, named "HP-12C Financial Emulator" circa 1995. This was developed on Windows 3.1 using VB 3.0! Its still available for download (minimum requirements: Windows XP) on the other Eric's website. Although, that submission was missing very important aspect of the original distribution-- installation setup program, the segmented font, and the all important MSAFINX.DLL (date functions). But I digress...

I have been currently studying your Nonpareil code, and specifically that of Maciej Bartosiak's MacOS code for MacOS platform.

Of course it is good news of your renewed, ongoing research...

Please be advised the following is only a "what if" scenario...

Have you looked into the Electron development platform? I do realize this may be a non trivial undertaking, but there are currently mature utilities that can ease the conversion of C code to JS.

Imagine each calculator platform simulator residing in a single JS file. Then each calculator user interface would be a single HTML page, able to handle the user interface utilizing standard HTML/CSS/JS.

In this scenario, Nonpareil would be cross-platform to virtually all platforms which support Electron.

I believe your original goal was this, but the cross-platforms tools of the time were lacking..

Regards.
Find all posts by this user
Quote this message in a reply
10-13-2022, 05:28 PM
Post: #6
RE: Nonpareil status
(10-12-2022 10:42 PM)Mark H. Shin Wrote:  Have you looked into the Electron development platform?

I'm not personally interested in doing Javascript or web development, though I'm happy to encourage others to do that.

If I was going to change development platforms at this point, I would use C++ with Qt, because it has much more robust cross-platform support than GTK. However, it would be a substantial undertaking.
Find all posts by this user
Quote this message in a reply
10-15-2022, 02:28 AM
Post: #7
HP--91 and HP-19C progress
After a lot of work on simulating the ACT external flag pins correctly, and the older external flag 0 bank switching mechanism, I've got the the HP-91 and HP-19C simulation mostly working in Nonpareil.

The 97 key legends are wrong because I haven't had time to do the proper graphics. Also, I haven't yet figured out what some of the printer characters are (0x0f, 0x1b, 0x1e, 0x1f, 0x2a, 0x2f, 0x3c), so if there are functions that use those characters, they'll print wrong.

The 19C key legends are fine but the display formatting is wrong, because the 19C uses a decimal-inside-digit format like the classic, 67 and Topcat models, and it's not yet set up for that. Also the auto-repeat on paper advance doesn't yet work. I was baffled for a long time as to why key column 2 (scanned by the PICK chip) is also connected to one of the ACT key scanner inputs, and that's what it's for.

The 92 is not yet working at all, and I haven't yet investigated it.
Find all posts by this user
Quote this message in a reply
10-15-2022, 03:21 AM
Post: #8
RE: Nonpareil status
(10-15-2022 02:28 AM)brouhaha Wrote:  After a lot of work on simulating the ACT external flag pins correctly, and the older external flag 0 bank switching mechanism, I've got the the HP-91 and HP-19C simulation mostly working in Nonpareil.

The 97 key legends are wrong because I haven't had time to do the proper graphics. Also, I haven't yet figured out what some of the printer characters are (0x0f, 0x1b, 0x1e, 0x1f, 0x2a, 0x2f, 0x3c), so if there are functions that use those characters, they'll print wrong.

The 19C key legends are fine but the display formatting is wrong, because the 19C uses a decimal-inside-digit format like the classic, 67 and Topcat models, and it's not yet set up for that. Also the auto-repeat on paper advance doesn't yet work. I was baffled for a long time as to why key column 2 (scanned by the PICK chip) is also connected to one of the ACT key scanner inputs, and that's what it's for.

The 92 is not yet working at all, and I haven't yet investigated it.

HP-97 Print Codes

Code:

 0 00 N
 1 01 Y
 2 02 =
 3 03 0
 4 04 L
 5 05 M
 6 06 NOT=
 7 07 1
 8 08 G
 9 09 s-1
10 0A >
11 0B 2
12 0C O
13 0D H
14 0E <=
15 0F 3
16 10 P
17 11 SQRT
18 12 X
19 13 4
20 14 R
21 15 F
22 16 Z
23 17 5
24 18 S
25 19 ?
26 1A XBAR
27 1B 6
28 1C T
29 1D RTARW
30 1E <>
31 1F 7
32 20 %
33 21 s2
34 22 SIG
35 23 8
36 24 J
37 25 sX
38 26 <
39 27 9
40 28 A
41 29 a
42 2A !
43 2B DP
44 2C B
45 2D b
46 2E /
47 2F MIN
48 30 C
49 31 c
50 32 DIV
51 33 PLUS
52 34 D
53 35 d
54 36 UPARW
55 37 STAR
56 38 E
57 39 e
58 3A DNARW
59 3B BLANK
60 3C I
61 3D i
62 3E MUL
63 3F EOL

cheers

Tony
Find all posts by this user
Quote this message in a reply
10-15-2022, 02:20 PM
Post: #9
RE: Nonpareil status
(10-15-2022 02:28 AM)brouhaha Wrote:  .... I was baffled for a long time as to why key column 2 (scanned by the PIK chip) is also connected to one of the ACT key scanner inputs.....

It is also used to show the actual program step in the display while the SST or R/S button is hold down. Other buttons which are not connected to the ACT scanner cannot be checked whether they still are hold down. The PIK keyboard buffer only contains the "key pressed" information.

Bernhard

That's one small step for a man - one giant leap for mankind.
Find all posts by this user
Quote this message in a reply
10-15-2022, 04:17 PM
Post: #10
RE: Nonpareil status
(10-15-2022 03:21 AM)teenix Wrote:  HP-97 Print Codes

Thanks, Tony!

I was just starting to work on a setup to dump the PICK (aka PIK) character ser. I may still finish that, but now I won't need it for the 91.
Find all posts by this user
Quote this message in a reply
10-15-2022, 04:25 PM
Post: #11
RE: Nonpareil status
(10-15-2022 02:20 PM)PANAMATIK Wrote:  It is also used to show the actual program step in the display while the SST or R/S button is hold down. Other buttons which are not connected to the ACT scanner cannot be checked whether they still are hold down. The PIK keyboard buffer only contains the "key pressed" information.

Thanks, Bernhard! I only figured out the paper advance by accident and wasn't aware of the held-down behavior for SST and R/S.
Find all posts by this user
Quote this message in a reply
10-15-2022, 06:11 PM
Post: #12
RE: Nonpareil status
(10-15-2022 04:25 PM)brouhaha Wrote:  I only figured out the paper advance by accident and wasn't aware of the held-down behavior for SST and R/S.

The HP-25 does this too. I don't know if all the keystroke-programmable HPs work this way, maybe not the 65 and 55?
Visit this user's website Find all posts by this user
Quote this message in a reply
10-15-2022, 06:33 PM
Post: #13
RE: Nonpareil status
(10-15-2022 06:11 PM)Thomas Okken Wrote:  The HP-25 does this too. I don't know if all the keystroke-programmable HPs work this way, maybe not the 65 and 55?

Yes, but only the 19C ant Topcat models use the PICK chip to scan the keyboard instead of the scanner in the main processor, and of those, only the 19C has the special arrangement to hook one (electrical) row of keys to both chips. In particular, the 97 doesn't have it, so the 97 doesn't have the SST shows key code feature. (I'd best double-check that, but I'm fairly certain.)

The 97 was the first Topcat model I reverse-engineered, and the most challenging since there was very little information on how the PICK worked, and none on the CRC. The CRC reverse engineering was a joint effort between the late Jacques Laporte and myself.
Find all posts by this user
Quote this message in a reply
10-15-2022, 07:33 PM (This post was last modified: 10-15-2022 07:42 PM by Joe Horn.)
Post: #14
RE: Nonpareil status
(10-15-2022 06:33 PM)brouhaha Wrote:  ... the 97 doesn't have the SST shows key code feature. (I'd best double-check that, but I'm fairly certain.)

I just checked on a physical '97, and it *does* display the current program step's keycode while the SST key is held down (in Run mode of course).

EDIT -- The current step is also displayed while R/S and BST are held down.

EDIT 2 -- The '97 manual says that SST displays the keycodes while held down, on page 135. Examples of this happening are given on page 139. BST hold/release is described on page 144, and R/S hold/release is described on page 169.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
10-15-2022, 08:29 PM
Post: #15
RE: Nonpareil status
(10-15-2022 07:33 PM)Joe Horn Wrote:  I just checked on a physical '97, and it *does* display the current program step's keycode while the SST key is held down (in Run mode of course).
EDIT -- The current step is also displayed while R/S and BST are held down.

Hi, Joe! Thanks for checking that. I don't have a 97 close at hand. Looking at the schematic, the 97 does this in an entirely different way than any of the other calculators. I suppose that's not surprising, as the 97 does several things in a unique way. So now I have another thing to fix in Nonpareil!

I just looked at Tony Duell's reverse-engineered 95C schematic, and it does this in basically the same way as the 19C, though with a minor difference that will naturally make it slightly more difficult to simulate in Nonpareil. But I don't expect to include the 95C in Nonpareil soon, anyhow.
Find all posts by this user
Quote this message in a reply
10-16-2022, 05:50 AM
Post: #16
RE: Nonpareil status
I just updated my Classic notes PDF document and added lists for:

Program Codes
Op Codes
Printer Codes

These are all I have, there ain't no more (from me anyways)

Classic Notes

cheers

Tony
Find all posts by this user
Quote this message in a reply
10-16-2022, 08:41 AM (This post was last modified: 05-18-2023 02:54 AM by brouhaha.)
Post: #17
RE: Nonpareil status
I got the 10C working earlier today, and the 92 a few hours ago. I still have to update the keyboard graphics for the 91 and 92, and correct the last few printer characters for each. And I still have to deal with the SST showing the program step on the 19C and 97.
Find all posts by this user
Quote this message in a reply
10-16-2022, 08:43 AM
Post: #18
RE: Nonpareil status
(10-16-2022 05:50 AM)teenix Wrote:  I just updated my Classic notes PDF document and added lists for:
...
Printer Codes

Thanks, Tony! It's a great resource.

Your 92 printer character codes don't match the ones I've found.
Find all posts by this user
Quote this message in a reply
10-16-2022, 09:56 AM
Post: #19
RE: Nonpareil status
(10-16-2022 08:43 AM)brouhaha Wrote:  Your 92 printer character codes don't match the ones I've found.

Apologies, I wrote a small program to format the data, generate the printer characters, and put it in the document, otherwise too tedious. The silly thing copied the 91 data into the 92 space.

Fixed - hopefully.

cheers

Tony
Find all posts by this user
Quote this message in a reply
10-16-2022, 08:07 PM
Post: #20
RE: Nonpareil status
Thanks Tony! That's a big help!

Anyone following along should note that Tony chose to use the six bits of a character code in exactly the way the PICK PRINT 6 instruction (octal 1660) grabs them from the ACT C register, whereas I chose to reorder them, rotating the lowest order two bits to the higest order, so that the resulting low order 4 bits match those used in the four bit print instructions (PICK PRINT 0 through 3, octal 1420, 1520, 1620, 1720). In the four-bit print instructions, two bits of the opcode are added to each four-bit value from the C register, and Tony puts those two bits at the low end, whereas I put them at the high end. Neither is wrong; there are arguments to be made either way, I chose based on liking the 0 though 9 characters having consecutive codes 0x30 through 0x39. That was a purely aesthetic decision; as long as the simulator code deals with things consistently, the result is the same.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)