WP 34S and 31S bugs and fixes
|
12-28-2014, 07:06 PM
Post: #81
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(12-27-2014 02:33 PM)Marcus von Cube Wrote:(12-26-2014 06:12 PM)Nigel (UK) Wrote: I've given a WP-34S containing firmware with the question mark problem to someone as a Christmas present. Apart from the unnecessary menu entry, are there likely to be any more problems with it? Here's how the story finally ends. Your update to the makefile didn't fix my particular problem - I had flashed my calculator with a file from the repository that didn't have the issue and mistakenly thought that it had gone for ever. I finally tracked down the cause to the compiler - not the yagarto compiler, but the gcc 4.8.1 compiler that came with MinGW. The flag -DREALBUILD as a compiler option was generally not defining REALBUILD, so that the INCLUDE_STOPWATCH "flag" was set in features.h (and hence elsewhere) in some runs and not set in other runs. This led to variations in the number of functions defined in different compiler runs, one effect of which was the "gap" in the catalogue that I noticed. I am sure that there were other effects as well, none of them good! I have now reverted to an earlier gcc compiler (4.5.2) and everything compiles without issue. I shall not update MinGW again! Thank you for helping me with this - the correct copy of catalogues.h was invaluable. Nigel (UK) |
|||
01-01-2015, 10:42 PM
Post: #82
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(12-23-2014 01:38 PM)Bit Wrote:(12-23-2014 12:02 PM)PANAMATIK Wrote: IMO a logical integer contraction would be: mantissa, then 'e' followed by the decimal number of digits that are not shown. i.e. in binary 10011011 -> 1001e04 decimal 1234567 -> 1234e3. Its like a non normalized exponential display in real mode and easy to understand. 'e' is for: exponent in the current base, expressed as decimal number. I've created an implementation and I have to admit it seems to be a better user interface than I suspected it would be. Bernhard, thank you for the idea. Please see this post in the Y register display thread for the details. |
|||
01-08-2015, 03:04 AM
(This post was last modified: 01-08-2015 01:30 PM by Bit.)
Post: #83
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
If an error occurred on the 34S after an operation that didn't disable stack lift, and tracing was also enabled, the stack would be lifted twice, duplicating the X register.
Here's how to reproduce the problem in single precision mode with flag D cleared: [EEX] [1] [5] [0] [ENTER] [*] [EEX] [9] [9] [*] Simpler way that also works in double precision mode: [1] [ENTER] [+] [0] [/] I've committed a fix. The problem was that xeq() saved the contents of the original stack after it called print_trace(), which in turn calls process_cmdline() and possibly lifts the stack. |
|||
01-08-2015, 04:34 AM
Post: #84
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
The YDON and YDOFF commands were included in the 34S and 31S even if Y register display was completely disabled at compile time. I've fixed that and also added an option to permanently enable Y register display, which saves 284 bytes in the 34S so it may be useful in some cases.
|
|||
01-08-2015, 04:48 AM
Post: #85
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes | |||
01-08-2015, 05:28 AM
Post: #86
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 04:48 AM)walter b Wrote:You're welcome.(01-08-2015 04:34 AM)Bit Wrote: The YDON and YDOFF commands were included in the 34S and 31S even if Y register display was completely disabled at compile time. I've fixed that ... There's more:
Walter, could you please comment on whether you think my proposed fixes should be committed, or if you'd like some other behavior? |
|||
01-08-2015, 07:09 AM
Post: #87
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 05:28 AM)Bit Wrote: For sure 3. is done on purpose. Fractions on the WP 34S have a very limited range. Well, it's larger than on the HP-33Sii but anyway EEX doesn't make real sense here. So please leave that as it is. I agree with you on 2. Your suggestion concerning 1. sounds reasonable but I need some time to check. Please be patient here, I think I can do it this evening. d:-) |
|||
01-08-2015, 04:38 PM
Post: #88
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 07:09 AM)walter b Wrote:(01-08-2015 05:28 AM)Bit Wrote: Ok, I also agree on your suggestion for 1. d:-) |
|||
01-09-2015, 12:32 AM
Post: #89
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 04:38 PM)walter b Wrote:(01-08-2015 07:09 AM)walter b Wrote:(01-08-2015 05:28 AM)Bit Wrote: My original patch worked in such a way (because it was simpler to implement) that whenever the command line contained an invalid fraction, a domain error would be produced when you pressed the button for any operation, not when the button was released. Thus the names of operations wouldn't be displayed and they couldn't be canceled (NULL-ed). While that's an improvement, it's not the most elegant solution because it isn't consistent with how the calculator usually behaves. I created another patch (it needs a bit more testing) that's better IMO: Error messages are only produced when you try to execute an operation by releasing the button, but not if you cancel it. (Keys that immediately do something like entering a catalog still produce an error message on key press.) The cost is roughly 50 bytes in the firmware because the function that verifies the command line needs to be invoked from more places. Which behavior should be adopted? |
|||
01-09-2015, 12:38 AM
Post: #90
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 07:09 AM)walter b Wrote:(01-08-2015 05:28 AM)Bit Wrote:... Should CLx silently erase the command line only when invoked directly from the keyboard or also when it's executed in a program? |
|||
01-09-2015, 02:09 AM
Post: #91
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
I'd say CLx should silently clear the command line in both.
Pauli |
|||
01-09-2015, 02:19 AM
(This post was last modified: 01-10-2015 07:47 PM by walter b.)
Post: #92
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes | |||
01-09-2015, 02:26 AM
Post: #93
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-09-2015 12:32 AM)Bit Wrote: I created another patch (it needs a bit more testing) that's better IMO: Error messages are only produced when you try to execute an operation by releasing the button, but not if you cancel it. (Keys that immediately do something like entering a catalog still produce an error message on key press.) The cost is roughly 50 bytes in the firmware because the function that verifies the command line needs to be invoked from more places. I'd vote for your new patch. d#-O |
|||
01-10-2015, 06:28 PM
Post: #94
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-09-2015 12:38 AM)Bit Wrote:(01-08-2015 07:09 AM)walter b Wrote: ... CLALL, CLSTK and RESET also effectively discard the command line. They're only accessible from the keyboard via catalogs so the command line will always be processed before they execute. But CLSTK can also be programmed and the following program produces a domain error: [1] [.] [2] [.] [CLSTK] This isn't a big problem in my opinion but fixing it in addition to CLx doesn't further increase the size of the firmware, so I suggest we do the right thing here and fix CLSTK as well. |
|||
01-10-2015, 07:52 PM
Post: #95
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-10-2015 06:28 PM)Bit Wrote:(01-09-2015 12:38 AM)Bit Wrote: Should CLx silently erase the command line only when invoked directly from the keyboard or also when it's executed in a program?... CLSTK can also be programmed and the following program produces a domain error: Agreed. d:-) |
|||
01-11-2015, 05:07 AM
Post: #96
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-08-2015 05:28 AM)Bit Wrote: There's more: I've committed patches that fix issues 1 and 2. I've also added a compile time option (IGNORE_INVALID_FRACTIONS) that disables command line checks and causes the calculator to simply ignore invalid fractions: a.b.0 becomes the integer a and a..0 (if such fractions are enabled) becomes zero. It saves ~ 252 bytes in the 34S, and considering that invalid fractions never appear automatically or in any non-obvious way, some may prefer not to spend that much firmware space only to report that one error condition. Please test and report any issues or weird behavior. |
|||
01-11-2015, 06:51 PM
Post: #97
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
I think this is a bug...
The product (Pi) and sum (Sigma) functions don't behave as described in the IOP in the V3.2 printed manual. Specifically, the IOP indicates that they are both one number functions. However, they also fill the stack with zeroes on return. From Code: [r3723]: trunk / xrom / prodsum.wp34s: Perhaps this is just a documentation issue. However, I think most users would expect the stack to be preserved. |
|||
01-11-2015, 09:40 PM
Post: #98
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes | |||
01-12-2015, 12:48 AM
Post: #99
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-11-2015 09:40 PM)Paul Dale Wrote:(01-11-2015 06:51 PM)DMaier Wrote: I think this is a bug... This wouldn't be difficult to change if that's desired, see the patch below. Solve and integrate could probably be adapted in a similar way. (STOS/RCLS aren't currently used by any XROM routines so it's safe to change their behavior when called from XROM.) Code: diff -ur wp34s_r3723/xeq.c wp34s_sum_prod_save_stack_r3723_20150111/xeq.c |
|||
01-12-2015, 01:14 AM
Post: #100
|
|||
|
|||
RE: WP 34S and 31S bugs and fixes
(01-12-2015 12:48 AM)Bit Wrote: This wouldn't be difficult to change if that's desired, see the patch below. Solve and integrate could probably be adapted in a similar way. (STOS/RCLS aren't currently used by any XROM routines so it's safe to change their behavior when called from XROM.) For consistency, f' and f" should also do the same and likely solve and integrate. Should the stack or some portion of it be preserved when passed to the user's routine? What if that routine makes changes? Currently, A .. D aren't changed and aren't filled by these and the user can do what they want with them even if they are in the stack. - Pauli |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 20 Guest(s)