Post Reply 
HP-15C expanded memory firmware: problems with matrix larger than 8x8
01-11-2023, 08:03 AM (This post was last modified: 01-11-2023 08:07 AM by brouhaha.)
Post: #1
HP-15C expanded memory firmware: problems with matrix larger than 8x8
Alternate firmware for the 15C to provide more user memory has existed since 2005. I did early work on this, and Hrast Programmer and J-F Garnier found additional necessary code changes that I missed. J-F Garnier posted the latest version of our mod, supporting 192 registers (plus registers 0, 1, and I) in the forum back in July. These patches have been used in simulation (e.g., Nonpareil), as well as on the 15C Limited Edition. Also, Swissmicros has versions of firmware for their DM15 and DM15L calculators that probably contain similar patches.

A 15C with extended memory can handle matrices with more than 64 elements, including square matrices larger than order 8. Unfortunately the 15C cannot properly do matrix division, inversion, or compute the determinant of matrices larger than order 8. Attempting these operations can yield incorrect results, or even hang the calculator. J. Fossy Weinzinger determined (as quoted in the Swissmicros Voyager User Manual, Appendix B) that this is due to the way the 15C firmware computes the LU decomposition of the matrix. In the process, the firmware may interchange rows of the matrix, and it records the row interchanges in three extra bits in the diagonal elements of the matrix. Unfortunately there are only three such bits available, so the calculator can only indicate an interchanged row offset for up to eight rows.

Fixing this problem would be rather difficult, and although I have an idea for where to store additional bits, I haven't analyzed enough of the code to even begin to code it. It's also not certain that there aren't other problems with the LU decomposition of order 9 and larger matrices waiting to be discovered even if the row interchange problem is fixed. However, I could change the code that tests for square matrices, which generates an Error 11 if the matrix is non-square, to also generate the Error 11 if the matrix is square but larger than order 8.

If I generate 15C firmware for extended memory with 192 registers (plus R0, R1, and I), that has the patch described, would anyone care to test it? I would provide the patched firmware as a text file as used with Nonpareil. People have used the Nonpareil files with other simulators, or on the HP-15C LE, but I am not able to provide the instructions for doing that, or support for doing it, therefore this is only recommended for people already experienced with dealing with 15C firmware on their platform.

The main things that need to be tested are:
* whether the patch interferes with any matrix operations that DO NOT involve dividing, inverting, or computing the determinant of a matrix larger than order 8
* whether the patch interferes with any other 15C functionality (unlikely)
Find all posts by this user
Quote this message in a reply
01-11-2023, 01:15 PM (This post was last modified: 01-11-2023 01:58 PM by J-F Garnier.)
Post: #2
RE: HP-15C expanded memory firmware: problems with matrix larger than 8x8
Ouch ! You frightened me Eric with your post subject. I thought you found a new problem in the expanded memory firmware.

Fixing the known problem with matrix larger than 8x8 and operations involving the LU decomposition would be nice for sure, even if I'm not sure there is a real practical need for it.

For me, the main benefit of the expanded memory versions is that we don't have any practical memory limitation.

With the standard 64-register version, using two 4x4 matrices leaves only 14 registers for programming, but not even enough for integration.
With the 192-reg expanded version, we can have two matrices up to 8x8 (128 reg.), use the complex mode (5 reg.) and the solve&integrate features (23 reg.), and still have 18 registers (126 bytes) for a non-trivial program.

However, your idea to trigger Error 11 in case of a matrix > 8x8 is interesting, it would protect unaware users from potentially bad consequences.
This would be consistent with the other minor limitations of the extended versions:
- we can't allocate more than 99 storage registers,
- we can't create a matrix with more than 99 elements in a row or column,
both cases that trigger Error 10 and so are harmless.

It remains the (IMHO minor) bug with program steps beyond 999 , especially step 1000 that is displayed as: " 000-000000"
Any way to limit the steps to 999?

[Edit:]
While we are at it, it would be nice to improve the MEM display for configurations with more than 99 free/program registers.
Currently, this is displayed with my patch as, e.g. " 19164 10-0" or " 19 64110-0"
Not so difficult to read when we are used to it, but may be confusing for new users.
It would be nice to add a '.' separator such as " 19.164. 10-0" or " 19. 64.110-0"
but I didn't try to do it at the time.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2023, 04:09 PM
Post: #3
RE: HP-15C expanded memory firmware: problems with matrix larger than 8x8
(01-11-2023 01:15 PM)J-F Garnier Wrote:  It remains the (IMHO minor) bug with program steps beyond 999 , especially step 1000 that is displayed as: " 000-000000"
Any way to limit the steps to 999?

It would be easier to limit it to 994 steps. I'll look into that.
Find all posts by this user
Quote this message in a reply
01-16-2023, 01:44 AM
Post: #4
RE: HP-15C expanded memory firmware: problems with matrix larger than 8x8
The patch for square matrices larger than order 8 to generate an Error 11 instead of an incorrect result or hang is available here:
http://www.brouhaha.com/~eric/hpcalc/hp1...atch.xhtml
Find all posts by this user
Quote this message in a reply
Post Reply 




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