HP-16C in Nonpareil release 0.61



#2

The HP-16C is supported in the newly released Nonpareil 0.61. Also bugs have been fixed, so now the HP-34C, HP-37E, HP-38E, and HP-38C work correctly. Building from source code now uses SCons instead of make.

But perhaps the biggest news is that Nonpareil now saves and restores the calculator state. Now there is continuous memory, even for calculators that didn't originally have it.

Still working on Windows support. I'm not sure when that will be ready.


#3

Hi Eric,

I installed SCons so I assume no need to unpack scons-local. Got following displayed:

$ scons
scons: Reading SConscript files ...

scons: warning: Ignoring missing SConscript 'scons-local/SConscript'
File "SConstruct", line 163, in ?
scons: done reading SConscript files.
scons: Building targets ...
gcc -Wall -g -Ibuild -Isrc -I/usr/include/libxml2 -c -o build/util.o src/util.c
gcc -Wall -g -Ibuild -Isrc -I/usr/include/libxml2 -c -o build/arch.o src/arch.c
gcc -Wall -g -DNONPAREIL_RELEASE=0.61 -Ibuild -Isrc -c -o build/release.o src/re
lease.c
gcc -Wall -g -Ibuild -Isrc -I/usr/include/libxml2 -c -o build/state_write.o src/
state_write.c
In file included from src/state_write.c:33:
src/proc.h:45: error: conflicting types for `addr_t'
/usr/include/cygwin/types.h:197: error: previous declaration of `addr_t'
scons: *** [build/state_write.o] Error 1
scons: building terminated because of errors.

IMHO, that is not an hint that I did something wrong with SCons.

TIA.....Mike

Edited: 12 May 2005, 8:57 a.m.

#4

As the HP-16C has nearly the same CPU as the HP-41 I traced it's execution with NutEm. I see it going through some debounce logic and stop at 108E in light sleep mode with the display filled with @s. Any key hit results in deep sleep (OFF). I assume only some fiddling with the display driver, key codes and debounce and NutEm could do the Voyagers too.

Following the first steps of the HP-16C (the substituted jump destination are labels only meaningful for the HP-41).

0000: 1CF JC     +39 0039   
0039: 231 *
003A: 00C NCXQ 038C
038C: 260 SETHEX
038D: 0A0 PT=P
038E: 2E5 *
038F: 000 NCXQ 00B9
00B9: 130 LDI
00BA: 004 CON 4
00BB: 3C8 CLRKEY
00BC: 3CC ?KEY
00BD: 266 C=C-1 X
00BE: 3EB JNC -03 =ERRIGN
00BB: 3C8 CLRKEY
00BC: 3CC ?KEY
00BD: 266 C=C-1 X
00BE: 3EB JNC -03 =ERRIGN
00BB: 3C8 CLRKEY
00BC: 3CC ?KEY
00BD: 266 C=C-1 X
00BE: 3EB JNC -03 =ERRIGN
00BB: 3C8 CLRKEY
00BC: 3CC ?KEY
00BD: 266 C=C-1 X
00BE: 3EB JNC -03 =ERRIGN

Ciao.....Mike


#5

I assume only some fiddling with the display driver, key codes and debounce and NutEm could do the Voyagers too.

Mainly ... but you will have to resolve a few things in order to make everything work correctly :-)

BTW, the display organization is 100% different compared to the HP-41C (forget all these rotate/shift instructions because all LCD segments and annunciators are memory mapped).


#6

Yes, of cause, when I say "only some fiddling" I was aware that this will not be done with a finger snap. But the core of the CPU simulation seem to work. Anyway - tnx 4 Ur hint.

Ciao.....Mike

#7

The display is completely different than that of the 41C, as HrastProgrammer has pointed out. There are a total of 100 display segments, which are individually controlled from the upper 50 bits of "RAM" locations 0x09 and 0x0a.

HrastProgrammer also discovered that RAM address 0x08 is a hardware register of some type, and the firmware will not work correctly if it behaves like RAM. It seems OK if one ignores writes and returns zeros for reads.

The 16C firmware supplied in Nonpareil is modified from the original in the calculator, and is copyrighted. It is not freely redistributable.

Eric


#8

Quote:
The 16C firmware supplied in Nonpareil is modified from the original in the calculator, and is copyrighted. It is not freely redistributable.

What are the terms for distributing the rom images that come with Nonpareil? 0.61 only mentions that the software is under the GPL, which would make them freely redistributable, even though they're copyrighted. If i were to eventally port Nonpareil to PalmOS, would i be able to distribute the rom images with it?


#9

(I wasn't really prepared to get into a copyright/licensing discussion now, but I walked right into it...)

The ROM images are not GPL'd. In earlier Nonpareil releases there was accidentally a GPL notice attached to the ones supplied as object code only, but it doesn't apply since they are not provided as source code. (Thus it is not possible for anyone to comply with the GPL terms for those files anyhow.)

However, upon request I will be happy to offer a license to include the ROM images to be distributed with any software that qualifies as Free Software based on the FSF's definition, provided that the copyright notice is maintained. A port of Nonpareil certainly qualifies.

I'm willing to negotiate licenses for the ROM images to be distributed in non-Free software.

Eric

#10

By the way, part of the purpose of some of the recent internal changes in Nonpareil has been an attempt to make it easier to port to other platforms. I'd definitely like to encourage a PalmOS port.

For most ports, the GUI code (csim.c) should just be thrown away, and not used for anything but a model.

On platforms that support multithreading, I recommend using it. All of the thread-aware code is in the single source file proc.c. It uses the threading and asynchronous queue primitives from glib, but it doesn't use very many of them, and doesn't do anything too exotic. The porting approach I suggest, for target platforms that aren't supported by glib, is to write equivalents to those routines.

For platforms that only support a single thread, the porting will be a bit more complex. I need to give a bit more thought to it. The naive approach would probably be to do away with proc.c entirely, but perhaps it would be better for me to put a bit of effort into cleaning up things to more easily fit into a single-threaded model.

Part of such a cleanup is already planned. I want to split proc.c into two separate source files, based on which thread the functions run in. A new header file will be created to document the message-passing interface between the two threads (currently at the top of proc.c).

Where possible, I'd like to integrate ports to other platforms like PalmOS or MacOS X into the standard Nonpareil distribution.

Eric

#11

In the final version of HP-11E/16E, I just write zero into register 8 on entering the POWOFF instruction and everything is working OK. Eric noticed that it is perhaps an auto power off counter or something like that. When the calculator wake up and find a non-zero value there, it just returns to the deep sleep ...


#12

At POWOFF to deep sleep or to light sleep too? When I wake up from deep sleep I set Carry and it goes to light sleep (ON for the user) even with non-zero RAM.

Ciao.....Mike


#13

At POWOFF to deep sleep or to light sleep too?

Both ...

#14

Quote:
The 16C firmware supplied in Nonpareil is modified from the original in the calculator, and is copyrighted. It is not freely redistributable

Hmmm, interesting.
Is this because you can't run the stock 16C firmware?
What mods were made?

Bill Wiese

San Jose CA

#15

The 16C firmware supplied in Nonpareil is modified from the original in the calculator, and is copyrighted. It is not freely redistributable.

How can you claim copyright to something you didn't write? It seems like you could only copyright your modifications, and that the original ROM is in the public domain (assuming your interpretation of U.S. copyright law, given on your web site, is correct).


No criticism here, just curious...


#16

Quote:
How can you claim copyright to something you didn't write?

The same way Disney can copyright folk stories that are hundreds of years old.

Material that is in the public domain may be modified and/or copyrighted by anyone. If someone wants unmodified Voyager ROMs, or doesn't want to deal with my copyright, he or she is free to obtain the ROM images by some other means.

Eric


Possibly Related Threads...
Thread Author Replies Views Last Post
  Bought a 16C to compensate a little Eelco Rouw 23 3,496 12-07-2013, 01:26 PM
Last Post: Eelco Rouw
  Another wish for next Prime firmware release Jose Gonzalez Divasson 0 501 11-21-2013, 06:55 AM
Last Post: Jose Gonzalez Divasson
  Shiny new 16C! Keith Midson 7 1,224 10-27-2013, 02:22 AM
Last Post: Keith Midson
  latest prime software release? Geoff Quickfall 3 852 10-12-2013, 03:53 PM
Last Post: Tim Wessman
  Joys of eBay: HP-32S, HP-32SII, HP-42S, HP-16C, ... Sasu Mattila 7 1,168 09-23-2013, 04:39 PM
Last Post: Julián Miranda (Spain)
  Nonpareil Rom files davorin 2 649 09-20-2013, 06:20 PM
Last Post: Didier Lachieze
  HP-16C simulator fhub 12 1,709 06-30-2013, 10:14 PM
Last Post: Robert Prosperi
  Program for HP-16c... Leonid 9 1,338 06-07-2013, 08:51 PM
Last Post: David Hayden
  Nonpareil + HP10C Mike (Stgt) 0 455 05-13-2013, 04:58 AM
Last Post: Mike (Stgt)
  HP-15C Simulator / Release 3.2.00, Build 5319 Torsten 10 1,523 05-11-2013, 05:19 PM
Last Post: Thomas Klemm

Forum Jump: