[WP 34S] Enhanced Y register display: fractions, bugfixes etc.
03-11-2014, 10:14 PM
Post: #61
 Marcus von Cube Senior Member Posts: 754 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(03-11-2014 08:38 PM)fhub Wrote:  If these additional features are really so great, then I wonder why they aren't implemented in the 'official' WP34s version!?
At least if they are switchable (e.g. the Y-display with flag Y), then I don't see why they should hurt in any way.
We (Pauli Walter and me) need to evaluate the code and its impacts on speed and ROM size before we will release it. It's not an issue with the emulator but on the hardware. Give us some time and we'll see.

Attached File(s)

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
03-11-2014, 10:31 PM
Post: #62
 Sikuq Junior Member Posts: 34 Joined: Mar 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(03-11-2014 04:32 PM)Bit Wrote:
(03-11-2014 03:34 AM)Sikuq Wrote:  I'd sure like to try out your y-reg. display. But I can only find your source code not the compile on Sourceforge. Link? Thanks in advance.

A compiled binary is attached to post #13 in this thread.

Bit,

Many thanks.

Sikuq
03-11-2014, 10:36 PM
Post: #63
 Paul Dale Senior Member Posts: 1,434 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(03-11-2014 10:14 PM)Marcus von Cube Wrote:  We (Pauli Walter and me) need to evaluate the code and its impacts on speed and ROM size before we will release it.

And if anything subtle gets broken by it. The display code on the 34S is rather fragile.

- Pauli
03-12-2014, 09:07 AM
Post: #64
 adamkov Junior Member Posts: 8 Joined: Feb 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(03-11-2014 10:36 PM)Paul Dale Wrote:
(03-11-2014 10:14 PM)Marcus von Cube Wrote:  We (Pauli Walter and me) need to evaluate the code and its impacts on speed and ROM size before we will release it.
And if anything subtle gets broken by it. The display code on the 34S is rather fragile.

Guess it's not a lot of help but I'm testing this on my WP34S for a few weeks and yet to find anything unusual. Though I have to admit I'm not a poweruser but of course will report bugs if they ever occur.
03-12-2014, 09:46 AM
Post: #65
 walter b On Vacation Posts: 1,957 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(03-12-2014 09:07 AM)adamkov Wrote:  Guess it's not a lot of help but I'm testing this on my WP34S for a few weeks and yet to find anything unusual. Though I have to admit I'm not a poweruser but of course will report bugs if they ever occur.

Any objective error report is always appreciated.

d:-)
04-10-2014, 03:47 AM (This post was last modified: 01-21-2015 12:18 AM by Bit.)
Post: #66
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
Enhanced Y register display has been incorporated into version 3.3 of the WP 34S which is currently being developed, see this thread.

However, the patch to reduce the number of screen updates and improve responsiveness on the 30b hardware has not been committed to SVN yet (see the explanations in post #25, point 3 and in post #34, point 1). You'll find it below and it's included in the last binary I published (see post #13). The patch is small but somewhat tricky. Any feedback about potential bugs or unexpected behavior would be very welcome.

Code:
diff -ur wp34s-code/data.h wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/data.h --- wp34s-code/data.h    2014-04-07 12:22:01.813519672 -0400 +++ wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/data.h    2014-04-09 23:21:42.289210691 -0400 @@ -473,6 +473,7 @@  extern REGISTER *StackBase;         // Location of the RPN stack  extern decContext Ctx;             // decNumber library context  extern FLAG JustDisplayed;         // Avoid duplicate calls to display(); +extern FLAG WasDataEntry;         // No need to update the display  extern char TraceBuffer[];           // Display current instruction  #ifndef REALBUILD  extern char LastDisplayedText[NUMALPHA + 1];       // This is for the emulator (clipboard) diff -ur wp34s-code/display.c wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/display.c --- wp34s-code/display.c    2014-04-07 12:22:01.813519672 -0400 +++ wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/display.c    2014-04-09 23:21:42.289210691 -0400 @@ -1916,6 +1916,22 @@          return;      }   +    if (WasDataEntry) { +#if defined(QTGUI) || defined(IOS) +        xset(LastDisplayedNumber, ' ', NUMBER_LENGTH); +        LastDisplayedNumber[NUMBER_LENGTH]=0; +        xset(LastDisplayedExponent, ' ', EXPONENT_LENGTH); +        LastDisplayedExponent[EXPONENT_LENGTH]=0; +#endif +        wait_for_display(); // Normally called from reset_disp() + +        // Erase 7-segment display +        for (i = 0; i <= EXP_SIGN; ++i) { +            clr_dot(i); +        } +        goto only_update_x; +    } +      // Clear display      reset_disp();   @@ -2117,6 +2133,7 @@  nostk:    show_flags();      if (!skip) {          if (State2.runmode) { +only_update_x:              p = get_cmdline();              if (p == NULL || cata) {                  if (ShowRegister != -1) { @@ -2129,6 +2146,9 @@                  disp_x(p);                  x_disp = 1;              } +            if (WasDataEntry) { +                goto finish; +            }          } else {              unsigned int pc = state_pc();              unsigned int upc = user_pc(pc); @@ -2176,6 +2196,7 @@          annunciators();  #endif   +finish:      State2.version = 0;      State2.disp_as_alpha = 0;      State2.smode = SDISP_NORMAL; @@ -2391,6 +2412,7 @@  {      State2.disp_freeze = 0;      State2.disp_small = 0; +    WasDataEntry = 0;      if ( State2.invalid_disp && str2 == NULL ) {          // Complete redraw necessary          DispMsg = str1; diff -ur wp34s-code/keys.c wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/keys.c --- wp34s-code/keys.c    2014-03-04 21:31:09.142046108 -0500 +++ wp34s-code_r3607_20140409_fewer_screen_updates_on_data_entry/keys.c    2014-04-09 23:21:42.293210691 -0400 @@ -55,6 +55,8 @@      confirm_none=0, confirm_clall, confirm_reset, confirm_clprog, confirm_clpall  };   +FLAG WasDataEntry; +  /* Local data to this module */  unsigned int OpCode;  FLAG OpCodeDisplayPending; @@ -2497,6 +2499,7 @@  void process_keycode(int c)  {      static int was_paused; +    volatile int cmdline_empty; // volatile because it's uninitialized in some cases        if (was_paused && Pause == 0) {          /* @@ -2623,8 +2626,13 @@              dot(RPN, ShowRPN);  #ifndef CONSOLE              if (! State2.disp_temp ) { -                // This will get rid of the last displayed op-code -                display(); +                if (!WasDataEntry) { +                    // This will get rid of the last displayed op-code +                    display(); +                } +                else { +                    finish_display(); // Update the RPN annunciator +                }              }  #endif              return; @@ -2641,6 +2649,7 @@          /*           *  Decode the key            */ +        WasDataEntry = 0;          ShowRPN = ! Running;    // Default behaviour, may be turned off later            c = process(c);        // returns an op-code or state @@ -2681,13 +2690,19 @@          default:              if (State2.runmode || NonProgrammable) {                  NonProgrammable = 0; -                if (c >= (OP_SPEC | OP_ENTER) && c <= (OP_SPEC | OP_F)) +                if (c >= (OP_SPEC | OP_ENTER) && c <= (OP_SPEC | OP_F)) {                      // Data entry key +                    WasDataEntry = 1; +                    cmdline_empty = (CmdLineLength == 0);                      xeq(c); +                    cmdline_empty |= (CmdLineLength == 0); +                }                  else {                      // Save the op-code for execution on key-up                      OpCode = c;                      OpCodeDisplayPending = 1; +                    finish_display(); // Update the RPN annunciator +                    goto no_display; // No need to update the display before the command is executed                  }              }              else { @@ -2695,15 +2710,19 @@              }          }      } +    if (! Running && ! Pause  #ifndef CONSOLE -    if (! Running && ! Pause && ! JustStopped && ! JustDisplayed && c != STATE_IGNORE) { -        display(); -    } -#else -    if (! Running && ! Pause && c != STATE_IGNORE && ! JustDisplayed) { +                 && ! JustStopped +#endif +                          && ! JustDisplayed && c != STATE_IGNORE) { +        const int orig_WasDataEntry = WasDataEntry; + +        WasDataEntry &= !(c == (OP_SPEC | OP_ENTER) || cmdline_empty || State2.invalid_disp);          display(); +        WasDataEntry = orig_WasDataEntry;      } -#endif + +no_display:          JustDisplayed = 0;          watchdog();  }
04-10-2014, 11:33 AM
Post: #67
 Jeff O. Member Posts: 165 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(04-10-2014 03:47 AM)Bit Wrote:  However, the patch to reduce the number of screen updates and improve responsiveness on the 30b hardware has not been committed to SVN yet... I've attached it here and it's included in the last binary I published.

Any chance you could provide a binary of the latest SVN version with the patch?

Dave - My mind is going - I can feel it.
04-11-2014, 03:31 AM
Post: #68
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(04-10-2014 11:33 AM)Jeff O. Wrote:  Any chance you could provide a binary of the latest SVN version with the patch?
I've compiled the binary from the latest SVN version and updated the attached file in post #13.
04-11-2014, 12:33 PM
Post: #69
 Jeff O. Member Posts: 165 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(04-11-2014 03:31 AM)Bit Wrote:
(04-10-2014 11:33 AM)Jeff O. Wrote:  Any chance you could provide a binary of the latest SVN version with the patch?
I've compiled the binary from the latest SVN version and updated the attached file in post #13.

Thanks. Much snappier keyboard response. I see our stack-height indicator dot friend is back too. Noted that with Y display off, the dot is on the right of the dot-matrix area. As I said somewhere, I don't have a strong opinion either way about this indicator. Seems harmless enough and possibly useful.

Dave - My mind is going - I can feel it.
11-11-2014, 03:09 PM
Post: #70
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
It's been more than half a year since I created the patch that reduces the number of screen updates to make things faster (attached to post #66). I've been using it ever since and a few others on this forum also.

It's not the most elegant solution but since no serious problems have been reported, I think it may be time to incorporate it into the mainline. Walter, Pauli, Marcus, do you agree? Any objections?
11-11-2014, 05:35 PM
Post: #71
 Nigel (UK) Senior Member Posts: 320 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(11-11-2014 03:09 PM)Bit Wrote:  It's been more than half a year since I created the patch that reduces the number of screen updates to make things faster (attached to post #66). I've been using it ever since and a few others on this forum also.

It's not the most elegant solution but since no serious problems have been reported, I think it may be time to incorporate it into the mainline. Walter, Pauli, Marcus, do you agree? Any objections?

I've been using Bit's screen update patch for the same period of time with no problems. I've recently switched back to the unpatched code (latest firmware in each case) to see if it made a difference and the calculator does seem less responsive. I have made no measurements so it might be my imagination, but the effect seems real.

Nigel (UK)
11-11-2014, 07:42 PM
Post: #72
 Jeff O. Member Posts: 165 Joined: Dec 2013
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(11-11-2014 03:09 PM)Bit Wrote:  It's been more than half a year since I created the patch that reduces the number of screen updates to make things faster (attached to post #66). I've been using it ever since and a few others on this forum also.

It's not the most elegant solution but since no serious problems have been reported, I think it may be time to incorporate it into the mainline. Walter, Pauli, Marcus, do you agree? Any objections?

I was recently wondering what happened to that more responsive version. Have you kept your patched version up-to-date with the official mainline version? Not sure what changes have been incorporated in the mainline version in half a year, but I guess would not want to miss out anything. But I would also like the snappier keyboard response of your version. If possible (and if my vote matters) I vote that it be incorporated into the mainline version.

Dave - My mind is going - I can feel it.
11-12-2014, 12:37 AM (This post was last modified: 11-17-2014 01:44 AM by Bit.)
Post: #73
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(11-11-2014 07:42 PM)Jeff O. Wrote:  I was recently wondering what happened to that more responsive version. Have you kept your patched version up-to-date with the official mainline version? Not sure what changes have been incorporated in the mainline version in half a year, but I guess would not want to miss out anything. But I would also like the snappier keyboard response of your version. If possible (and if my vote matters) I vote that it be incorporated into the mainline version.

The original patch is still compatible with the latest version. I've updated the compiled binary in post #13 in this thread. It's based on the very latest code that I downloaded from SVN a few hours ago, and I'm pretty sure it works well but I haven't had a chance to flash it to real hardware yet.
11-15-2014, 10:58 PM
Post: #74
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(11-11-2014 03:09 PM)Bit Wrote:  It's been more than half a year since I created the patch that reduces the number of screen updates to make things faster (attached to post #66). I've been using it ever since and a few others on this forum also.
This has been incorporated into the official build, and also into my builds: Bit's WP 34S and 31S patches and custom binaries.
01-01-2015, 10:37 PM (This post was last modified: 01-31-2015 02:39 PM by Bit.)
Post: #75
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
I've created a patch that enables Y register display in integer modes. It's based on the ideas described in an other thread, e.g. in this post.

A small amount of space is reserved on the left for the shift indicators in small font and the window indicator bars are displayed on the right, the Y register has to fit between these two. One window indicator bar is always shown to act as a reminder that the calculator is in integer mode. (In bases 2, 8, 10 and 16, the number base indicators are easy to recognize but other number bases could be mistaken for an exponent.)

Leading zeros (if enabled) are cut off if necessary in order to fit the number into the available space. If it still doesn't fit, the least significant digits are removed and the number of digits removed is indicated after a colon, much like the exponent display in double precision mode for large exponents. For example, 10000000 could become 1000:4. Three significant digits shown is the worst case and it only happens in binary mode. I chose the colon instead of an 'e' to avoid confusion with 'E' in base 15 and 16. Space is tight so digit separators are not used for the Y register.

Since the signed number representation and word size aren't displayed in the upper line, I've created a new status screen for them that shows up as the first one when you press [h] [STATUS].

In the attached archive you'll find the patch, a flash image and a Windows binary. Please test it if you have the time (Y register display isn't enabled by default like in my other builds, you'll need to use YDON), and let me know what you think.

Attached File(s) Thumbnail(s)

01-02-2015, 01:26 AM (This post was last modified: 01-02-2015 01:26 AM by PANAMATIK.)
Post: #76
 PANAMATIK Senior Member Posts: 873 Joined: Oct 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(01-01-2015 10:37 PM)Bit Wrote:  let me know what you think.

I think this is an unexpected new years surprise. Thanks for implementing my suggestions.

Your description, i.e. use of : instead of e, seems a good choice and is easy to understand. I frequently use hexadecimal number calculations, nearly never binary, and the numbers are 16-bit 4 digits wide, so most of the time the Y register will show just the complete number, as if there were no restrictions.

I have already downloaded the image and will flash it as soon as I find the time. This makes the WP34S another tiny?/big? step more perfect.

Thank you.

Bernhard
01-19-2015, 04:53 PM
Post: #77
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(01-01-2015 10:37 PM)Bit Wrote:  Since the signed number representation and word size aren't displayed in the upper line, I've created a new status screen for them that shows up as the first one when you press [h] [STATUS].

I've discovered a bug: If any hotkeys were assigned, the number base indicator in the new status screen got mixed up. Next time I release binaries, they'll have the fix included.
01-19-2015, 05:10 PM
Post: #78
 PANAMATIK Senior Member Posts: 873 Joined: Oct 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(01-19-2015 04:53 PM)Bit Wrote:  I've discovered a bug: If any hotkeys were assigned, the number base indicator in the new status screen got mixed up. Next time I release binaries, they'll have the fix included.

This matches good with my tight time table. I didn't had time to flash your last release, now I will wait for your next.

Thanks
Bernhard
01-22-2015, 05:21 AM
Post: #79
 Bit Member Posts: 265 Joined: Jan 2014
RE: [WP 34S] Enhanced Y register display: fractions, bugfixes etc.
(01-19-2015 05:10 PM)PANAMATIK Wrote:
(01-19-2015 04:53 PM)Bit Wrote:  I've discovered a bug: If any hotkeys were assigned, the number base indicator in the new status screen got mixed up. Next time I release binaries, they'll have the fix included.

This matches good with my tight time table. I didn't had time to flash your last release, now I will wait for your next.

Thanks
Bernhard

I've updated my custom binaries in this post. Please give them a try and report any issues, suspected issues, or anything at all that just doesn't seem perfect. Thank you.
 « Next Oldest | Next Newest »

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