Post Reply 
Examples of Memory MAP with 2x Clonix-D?
09-28-2022, 05:50 PM (This post was last modified: 09-29-2022 01:06 AM by Sylvain Cote.)
Post: #7
RE: Examples of Memory MAP with 2x Clonix-D?
(09-28-2022 03:24 PM)floppy Wrote:  What does mean " is normally" ?
Sorry, a bad translation of my part, usually could be a better word.

(09-28-2022 03:24 PM)floppy Wrote:  What does mean "if hardware allows it" ?

When the HP-41 was created, bank switching did not exist at all, so nothing in the 41 hardware nor in the 41OS support this feature.

Several years later, when HP introduced the 41CX they added bank switching, they did it for two banks and only for themselves.
→ time module (page 5 bank 1) and 41CX functions (page 5 bank 2).

They did not added the bank switching by modifying how the pages works nor by modifying the base 41OS, they did it by doing two things.
  1. renaming unused CPU NOP instructions (0x100, 0x180) to ENBANK1/ENROM1 (0x100) and ENBANK2/ENROM2 (0x180)
  2. and by delegating the bank switching logic/handling to the plugged-in peripheral or module hardware.

Later on, other companies introduced their own modules and their own way of doing bank switching who were sometime different than the other companies.
They also introduced two more banks by replicating what HP did for the first two banks by using these two other NOP instructions: ENBANK3/ENROM3 (0x140) and ENBANK4/ENROM4 (0x1C0).
In the middle of this, HP introduced the Advantage module who had another bank switching behavior.

In the 41, when a bank switching is requested, several things happen: (simplified version)
  1. the ENBANKx/ENROMx instruction is placed on the main bus
  2. all the peripheral attached to the main bus received the CPU instruction (which include the main board and all the plugged-in modules/peripherals)
  3. they all look at it and check if the received instruction is for himself.
  4. if it is, then the targeted hardware decide what to do with it, not the 41 CPU, the targeted hardware only.
    To be crystal clear, the ENBANKx/ENROMx instructions are still seen as NOP (no operation) by the 41 CPU.

In summary, because it was not planned beforehand, bank switching on the 41 is a mess.
Over time, a consensus on how it should work emerged and the creators of new devices (MLDL2K, Clonix/NoV, etc) implemented their bank switching by following the agreed upon ways of doing it.
Even after all that, when someone pushes the bank switching envelope sometime we find incompatibility, which is why Diego had to modify in 2020 his bank switching internal logic to support Ángel new ROMs.

Regarding fixed/odd/even pages with bank switching.

Each ROM developer decides on which page their ROM is assigned and which bank switching behavior it supports. Once he has decided his strategy, the simple way is to read and follow their instructions. If no instruction is given, then it is a trial and error process.

Sylvain

edit: typos
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Examples of Memory MAP with 2x Clonix-D? - Sylvain Cote - 09-28-2022 05:50 PM



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