The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

[41CL] Rescue from 'Lost Y Functions'
Message #1 Posted by Dan Grelinger on 15 Feb 2013, 11:04 p.m.

I'm a little late to the -41CL party, so please excuse me if someone has posted this information before.

As we all know (from reading the manual, or making the mistake ourselves), if the MMU is enabled without one of the three Y function ROMs addressed in the MMU, the Y functions will be lost until the batteries are removed.

However, this is not exactly true.

If a Clonix (NoVRAM, NoV32, or NoV64) module is programmed with one of the Y function ROMs, then it may be used to regain 'control' of the Y functions.

After turning off the -41CL, inserting the properly programmed Clonix, and turning the -41CL back on, the MMUDIS function is available to set the -41CL to finding the YFNZ ROM at Page 7 again.

This saves the risk of Memory Lost (and reseting the Time/Date/Accuracy Faction) from removing the batteries to disable the MMU.

      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #2 Posted by 聲gel Martin on 16 Feb 2013, 3:54 a.m.,
in response to message #1 by Dan Grelinger

Nice tip Dan, thanks for sharing it.

I added one of those "recovery gates" in the PowerCL - function YFNZ? will disable the MMU in case the YFNS ROM isn't found. Naturally this requires the PowerCl to be present in the system (ie. configured in the MMU), thus a bit of a catch-22 - but there are instances where it's very useful.

Cheers, 簍

      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #3 Posted by Monte Dalrymple on 16 Feb 2013, 11:01 a.m.,
in response to message #1 by Dan Grelinger

Another 41CL user (Doug Fields) suggested adding a command to the Timer module that is identical to an MMUDIS so that one could always get back to a state where the YFNZ was available. I have actually done that, and the modified .rom file is available, but haven't loaded it into a CL to try it out yet. I am happy to send a copy to anyone with a board that supports the MAPEN function to try it out.

            
Re: [41CL] Rescue from 'Lost Y Functions'
Message #4 Posted by Dan Grelinger on 19 Feb 2013, 9:53 a.m.,
in response to message #3 by Monte Dalrymple

I tried out Monte's new Time ROM image that includes the 'YRES' function. The 'YRES' (Y functions restore) function disables the MMU, recovering from a 'Lost Y Functions' condition caused by not having one of the Y functions ROMs plugged into a port when enabling the MMU, or from unplugging it, or plugging something in over the top of it when the MMU is enabled.

Basic testing revealed that it worked well. So well in fact that it is possible to consider not having a Y functions ROM plugged in as a normal condition. However, without any Y functions ROM in a port, the ability to store the 'hidden bits' (ROM/RAM, Stack Enable, and Private) or the Turbo mode when the 41CL is turned off is disabled. So, the unit comes always comes back in in non-Turbo mode. To restore Turbo mode, The YRES function would be executed, the 41CL turned off and back on, and then the MMUEN would restore the previous configuration.

                  
Re: [41CL] Rescue from 'Lost Y Functions'
Message #5 Posted by 聲gel MArtin on 20 Feb 2013, 1:35 a.m.,
in response to message #4 by Dan Grelinger

Did you replace the TIme Module image in the OS area or used a duplicate in another address?

                        
Re: [41CL] Rescue from 'Lost Y Functions'
Message #6 Posted by Dan Grelinger on 20 Feb 2013, 9:42 a.m.,
in response to message #5 by 聲gel MArtin

I loaded it into RAM and used the MMU and MAPEN function to map it into page 5. I did not map any other pages, i.e. the MMU entries for all other pages were '0000'.

                        
Re: [41CL] Rescue from 'Lost Y Functions'
Message #7 Posted by Dan Grelinger on 20 Feb 2013, 2:20 p.m.,
in response to message #5 by 聲gel MArtin

I forgot to mention, Monte's test version of the Time ROM has all of the 'slow down' instruction bits cleared. All functions in this test ROM run at full speed. The standard version of this ROM have all instructions running at 1X speed.

The functions that I tested (TIME, CLOCK, DATE, RCLAF, SETAF, XYZALM, ALMCAT, ADATE, ATIME) all seemed to work OK, however the catalog seemed to go by a little fast, and the alarm sequence of displays and beeps were sped up.

                              
Re: [41CL] Rescue from 'Lost Y Functions'
Message #8 Posted by Dan Grelinger on 27 Feb 2013, 4:25 p.m.,
in response to message #7 by Dan Grelinger

Monte gave me a new copy of the customized Time ROM. This version has the 'slow down' instruction bits set only where necessary, and still includes the new 'Y functions restore' (YRES) function.

My initial testing has verified that the Time functions that did not behave well when Turbo was enabled (ALMCAT [CAT 5], Notification Alarms, and Past Due Alarm notifications) now work fine. I've done the testing by using the MAPEN functionality to map the new Time rom image from RAM, and I am close to the point of flashing the Time Rom page in the protected sector at flash memory page 006 to complete my testing.

This new version of the Time ROM has two benefits over the original one shipped with the 41CL (the original was a duplicate of the HP-41CX Time functions page, with all instructions tagged to run at 1X speed).

1. Only those instructions that need to run at '1X' speed are flagged for 1X execution. This enables most of the Time functions to take advantage of the selected Turbo mode. I have not noticed any difference during keyboard execution, but in theory, programs with Time functions in them will benefit when Turbo is enabled.

2. The insertion of a new function 'YRES' that works just like 'MMUDIS', but is available even when no CL Extra Functions are currently mapped to memory. Normally, recovery from this state requires the batteries to be removed (for > 11 seconds on my unit) in order for the MMU enabled bit to be reset and YFNZ functions be made available in page 7 again. Now, as the Time functions are always available (assuming no advanced OS remapping) it is possible to recover from a 'lost Y functions' with a single command.

The Time functions headers are now '-TIME 3A' and '-CL TIME', which are visual clues that the adjusted Time Rom is installed.

                                    
Re: [41CL] Rescue from 'Lost Y Functions'
Message #9 Posted by Angel Martin on 28 Feb 2013, 2:24 p.m.,
in response to message #8 by Dan Grelinger

sounds great!, thanks for the update. I'll definitely get to that as soon as I recover from the PC crash that has turned all my programming environment upside down for the last two weeks.

                                          
Re: [41CL] Rescue from 'Lost Y Functions'
Message #10 Posted by Dan Grelinger on 28 Feb 2013, 3:54 p.m.,
in response to message #9 by Angel Martin

I have not done much testing, but I took the leap and burned the new TIME 3A rom into page 006 of flash memory. No issues yet.

                                                
Re: [41CL] Rescue from 'Lost Y Functions'
Message #11 Posted by Monte Dalrymple on 28 Feb 2013, 4:34 p.m.,
in response to message #10 by Dan Grelinger

It's really unfortunate that the Time ROM is pretty much completely full, because it has 26 precious FAT entries available. If it wasn't so dangerous (because the OS makes calls directly into Page 5) I might consider moving stuff around to make use of those FAT entries.

Along those same lines, the X-Functions in Page 3 has the FAT completely full, but about 180 words of code space available in the ROM. Right now I am considering using the space for a couple of routines that will implement on-demand paging, with a four-level stack for each MMU entry in memory. This will allow code to dynamically switch in pages temporarily, making almost unlimited code space available for a function.

                                                      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #12 Posted by Paul Dale on 28 Feb 2013, 5:54 p.m.,
in response to message #11 by Monte Dalrymple

Could you use the TIME rom FAT entries to jump to stubs that jump to page 3? It isn't like either of these pages are going to move or not be present.

- Pauli

                                                            
Re: [41CL] Rescue from 'Lost Y Functions'
Message #13 Posted by Monte Dalrymple on 28 Feb 2013, 7:52 p.m.,
in response to message #12 by Paul Dale

The problem is that the FAT entry points to the name label, which has to be in the same page, and then it's two words for a jump. So even with a two-charater name it requires at least four words beyond the two words of the FAT entry. I think there might be room for one function with a two-character name. But I really want to use the available space in Page 3 for the demand paging routines... so I think we're out of luck.

                                                      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #14 Posted by 聲gel Martin on 1 Mar 2013, 5:23 a.m.,
in response to message #11 by Monte Dalrymple

I don't know if you have already done this for YRES but here's some ideas:

1. The "code" in addresses 0x504C to 0x505C is just the section headers. I think it'll be pretty safe to move that down (say for instance to 0x5D44). This will free eight FAT entries.

2. Doing a similar move in page#3 should be no problem - you can take the CLKEYS function down, just 10 bytes to move. This will free up one FAT entry in the XFNS as well.

HTH, 簍

                                                            
Re: [41CL] Rescue from 'Lost Y Functions'
Message #15 Posted by Monte Dalrymple on 1 Mar 2013, 10:17 a.m.,
in response to message #14 by 聲gel Martin

That's exactly what I did in the Time module. But the XFNS FAT is already full.

                                                                  
Re: [41CL] Rescue from 'Lost Y Functions'
Message #16 Posted by Angel Martin on 1 Mar 2013, 2:41 p.m.,
in response to message #15 by Monte Dalrymple

I'm pretty sure there's still one free entry in the XFNS FAT... in fact I used that trick already in an alternate version of the OS I got installed on V41.

                                                
Re: [41CL] Rescue from 'Lost Y Functions'
Message #17 Posted by Dan Grelinger on 4 Mar 2013, 3:47 p.m.,
in response to message #10 by Dan Grelinger

I've completed the testing of the new '-TIME 3A' Rom. I executed all standard and CX time functions, spending considerable time on alarms, and found no issues.

Good work Monte!

                                                      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #18 Posted by Monte Dalrymple on 6 Mar 2013, 9:52 a.m.,
in response to message #17 by Dan Grelinger

Dan, thank you for your testing. I'll probably start loading this image onto the remaining CL boards.

      
Re: [41CL] Rescue from 'Lost Y Functions'
Message #19 Posted by Diego Diaz on 16 Feb 2013, 2:08 p.m.,
in response to message #1 by Dan Grelinger

Hi there,

Thanks for sharing Dan, it's good to know of yet another useful procedure for the Clonix/NoV family... ;-)

All the best from Caribbean.

Diego.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall