Hello hardware and software emulation enthusiastics:
I worked on RAMBOX II emulation, at the request of a serious user who needs to find a backup solution for his 64k application in his tired HP-41CY.
The information reported here may help others involved in emulation.
I remind you that the RAMBOX II offers two 32k blocs that I will call block A and block B.
The RAMBOX II OS provides 3 keywords to manage the blocks:
PG<>: swap the two 32k blocks,
PG01: enable the even pages from block A and odd pages from block B
PG10: enable the odd pages from block A and even pages from block B
Looking at the Mcode of these functions shows that there are very simple.
They use the famous ENBANK1, ENBANK2 and ENBANK3 opcodes. They act in a special way,
different from the usual operation found the Advantage, Hepax, internal CX or Zeprom modules.
Remember that these opcodes are nops for the CPU, they are decoded by the module itself.
Code for PG01 and PG10 are:
; PG01
8DC3 100 ENBANK1
8DC4 180 ENBANK2
8DC5 3E0 RTN
; PG10
8DCA 100 ENBANK1
8DCB 140 ENBANK3
8DCC 3E0 RTN
The problem that worried me is how the PG<> could *swap* the pages with a combination of the same ENBANKx opcodes.
The light came from a post from Mike http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv013.cgi?read=47293
(Thanks Mike!) who highlighted the differences between the 2 copies of the RAMBOX II OS normally found in each first page of the two 32k blocks.
In "RAMBOX 64a" found in block A, PG<> is:The two PG<> functions are actually two different functions:
8DBC 180 ENBANK2
8DBD 140 ENBANK3
8DBE 3E0 RTN
In "RAMBOX 64b" found in block B, PG<> is:
8DBC 04E C=0 ALL
8DBD 100 ENBANK1
8DBE 3E0 RTN
the one in block A enables block B, and the one in block B enables block A!
The PG<> effect is actually to swap blocks, because it will always enable the opposite block.
Finally, here are the actual effects of each ENBANKx opcodes to the RAMBOX pages:
ENBANK1: reset all pages to block A
ENBANK2: enable odd pages of block B
ENBANK3: enable even pages of block B
RAMBOX II emulation will be available soon in Emu41. I hope that the information will also be helpful
to the many emulation (hardware or software) projects that are on going.
As a HP-71B fan and the author of one of the only two known HP-71B emulators (the other one is from HrastProgrammer),
my only wish would be to see such projets for this great machine.
Just imagine a CLONIX module for the HP-71B!
Best Regards.
Jean-Francois