The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Help request for someone with a real HEPAX
Message #1 Posted by Eric Smith on 23 May 2010, 10:13 p.m.

I've recently been informed of a potential problem with HEPAX simulation, which occurs on simulators by multiple authors. Unfortunately I cannot find my HEPAX module at the moment to verify how it behaves. If anyone with a real HEPAX (not e.g. Diego's NoVRAM or NoV64) has a spare few minutes to try something for me, I'd be most appreciative. Just contact me by email.

Thanks! Eric

      
Re: Help request for someone with a real HEPAX
Message #2 Posted by JMBaillard on 24 May 2010, 10:23 a.m.,
in response to message #1 by Eric Smith

Hi Eric,

I do have an HEPAX module
so, if I can help...

Regards,
Jean-Marc.

            
Re: Help request for someone with a real HEPAX
Message #3 Posted by Eric Smith on 25 May 2010, 2:50 a.m.,
in response to message #2 by JMBaillard

Thanks Jean-Marc, but others here on the forum have now done the test I needed. The NoV-64 and HEPAX work as expected, but V41, Nonpareil, and i41cx+ have a bank-switching issue.

I've ordered a NoV-64, and once I get that I can collect logic analyzer traces for comparison to the simulators.

                  
Re: Help request for someone with a real HEPAX
Message #4 Posted by Håkan Thörngren on 25 May 2010, 3:47 a.m.,
in response to message #3 by Eric Smith

I am curious on what the issue is?

                        
Re: Help request for someone with a real HEPAX
Message #5 Posted by Meindert Kuipers on 25 May 2010, 5:16 a.m.,
in response to message #4 by Håkan Thörngren

I am interested as well to find out about this issue. I can do some tests with HEPAX in the MLDL2000, and get accurate traces. This is not the real HEPAX however, but a copy in Flash ROM with its own bankswitching mecahnism.

Meindert

                              
Re: Help request for someone with a real HEPAX
Message #6 Posted by Ángel Martin on 25 May 2010, 8:37 a.m.,
in response to message #5 by Meindert Kuipers

I'll leave Eric to elaborate as he sees appropriate but it's related to some instances where the operation fails to switch back to bank1.

I tested the real HEPAX, the NoVoRAM and the MLDL2k and all of them manage to work as expected.

I however remember being able to trip up the HEPAX itself but don't know the sequence anymore. - In fact, that's how I managed to look at bank3, taking advantage of a failed switch back. Surely involves calling XF or HEPAX...

                                    
Re: Help request for someone with a real HEPAX
Message #7 Posted by Diego Diaz on 25 May 2010, 7:10 p.m.,
in response to message #6 by Ángel Martin

Hi all,

There are a couple of things that makes bankswitching (BS) a not-so-easy feature to be implemented, neither physical nor emulated.

First is the fact that *every* BS module (or its emulated counterpart) *must* be able to interpret the ENBANK instructions, modify their internal memory addressing accordingly *and* keep track of it. This must be done independently inside every BS module.

Second, every non-BS module (including OS mainframe) *must* be accessible no matter which bank is active in the BS module where the "call" (JC/JNC) comes from.

The mess may come from any combination of these two sources:

Example 1: A BS module is running on bank n (n>1) then it jumps to an address in a non-BS page. If emulator does not have *all* non-BS pages visible from *all* banks you'll get a weird behaviour... (more likely a crash).

Example 2: Emulator includes ENBANK handling... (this is needed if it emulates CX) but just one bank pointer (instead of one for every BS module). Then it switches accordingly to the "last" ENBANK instruction, but it will switch "every" BS module... again a source for weird behaviour, since a BS module with 4 banks could be accidentally swiched back to bank n (say 2) when it is supposed to be in bank k (say 3).

To my mind the bug reported by Eric is about this second example. I faced this very same problem when developing the NoV-AdvH modules emulation, which handles two BS modules (HEPAX & Advantage) with the same code.

Software emulators will need one BANK pointer for OS (CX) + one for HEPAX + one for Advantage... IR... etc...

Don't know how MLDL handle BS but, since it's a physical device as NoV's, they don't need to care about the OS pointer (calculator itself handles it) that's why HEPAX works as expected on both. However, this is the reason why you cannot (yet) run Advantage into NoV-64: a second BS pointer is needed.

Rule of thumb:

BS modules: must have a dedicated BANK pointer for each BS page.

non-BS module: must be visible from every posible BANK (1-4)

I've also implemented a safety rule into NoV's: BANK is always set back to 1 just before STAND-BY.

Hope this helps.

Diego.

Edited: 25 May 2010, 7:39 p.m.

                                          
Re: Help request for someone with a real HEPAX
Message #8 Posted by Meindert Kuipers on 26 May 2010, 1:46 p.m.,
in response to message #7 by Diego Diaz

Thanks for this explanation Diego.

Most modules implement bankswitching in a pair of banks (one module port), and that is how the MLDL2000 does it, every pair of banks has its own register to remember the state. ANd I realize that this is a source of possible conflict, if 2 BS modules are used in the same (virtual) module slot.

The W&W RAMBOX (and also the 41CY) can switch pages in a different way, but I have forgotten how exactly.

It is important to return to bank 1 on STANDBY, I forgot this in the first MLDL implementations, and both HEPAX and Avantage ROMs will not work in that case.

Still it would be nice if Eric could explain the suspected bug in some detail ...

Meindert

                                                
Re: Help request for someone with a real HEPAX
Message #9 Posted by Diego Diaz on 26 May 2010, 4:44 p.m.,
in response to message #8 by Meindert Kuipers

Hi Meindert,

Quote:
The W&W RAMBOX (and also the 41CY) can switch pages in a different way, but I have forgotten how exactly.

For obvious reasons I have this information really "fresh" in my mind.

However, I don't think the term "Bankswitching" is fully appropriate. Although it also makes use of the same pseudo-instructions (H'100, H'140 & H'180) it's more a question of available OP codes than real Bankswitch. If I'm allowed to name it I'll choose "RAM swapping".

The process was first (and accurately) described by J-F Garnier in this thread.

Again, implementing this on emulated or physical devices is somehow cumbersome. IMHO this this one is a bit easier for the SW guys, than for the HW ones.

Best from Madrid.

Diego.

                                                
Re: Help request for someone with a real HEPAX
Message #10 Posted by Eric Smith on 26 May 2010, 5:33 p.m.,
in response to message #8 by Meindert Kuipers

Antonio Lagana tracked down the HEPAX issue to the Nonpareil code failing to select bank 1 when going into sleep states (either light or deep sleep). Neither he nor I ever noticed any issue with the Advantage ROM without that.

The specific symptom was that in PROGRAM mode, when entering the XP or HEPAX functions, bank 3 would remain selected. This results in the HEPAX functions not being available, and the bogus FAT of bank 3 showing in CATALOG 2.

I suspect, but have not verified, that doing this on an HP-41 with both a HEPAX and HP-IL Development module, and with flag 44 set (possibly by executing the "ON" function of the HP-IL Development module), would result in the same behavior.

Flag 44 prevents the 41 from going into deep sleep, but with the HP-IL Development module installed, it also will not go into light sleep.

                                          
Re: Help request for someone with a real HEPAX
Message #11 Posted by Håkan Thörngren on 26 May 2010, 4:01 p.m.,
in response to message #7 by Diego Diaz

Diego, thank you for the in depth explanation!

I had the bug in my not released emulator as well, I just corrected it.

It makes perfect sense, the ROM will just react to bank switch instructions when fetched from the same unit. Otherwise it would need to contain bus decode logic to spot bank switch instructions, which would complicate the design.

                                                
Re: Help request for someone with a real HEPAX
Message #12 Posted by Diego Diaz on 26 May 2010, 4:50 p.m.,
in response to message #11 by Håkan Thörngren

You're welcome Håkan.

I'm glad to know this info has been useful.

Look forward to seeing your emulation released.

Best.

Diego.

      
Re: Help request for someone with a real HEPAX
Message #13 Posted by Eric Smith on 26 May 2010, 5:44 p.m.,
in response to message #1 by Eric Smith

Much thanks to Ángel Martin, Diego Diaz, Peter Platzer, and Antonio Lagana for their assistance in tracking this down!


[ Return to Index | Top of Index ]

Go back to the main exhibit hall