From: Han on
I just wanted to verify if I have the correct understanding of how to
select banks for the newer calculators.

- On the 48G series, the bankswitcher selected banks of card slot 2.
On the newer calculators, the bankswitcher selects the banks of Flash
ROM. On both families, the remaining hardware have their own CONFIG.

- One guide says that the old bank selection method whereby using a
read command still works like it did on the HP48 (with the same
misbehavior). However, there is also a new method using a write
command as well, where the lower 2 bits determine which of the first 4
banks are selected for #00000-#3FFFF and the next 4 bits determine the
which of the last 12 banks are mapped to #40000-#7FFFF.

Is my understanding correct?

From: Andreas Möller on
Hello,

> - One guide says that the old bank selection method whereby
> using a read command still works like it did on the HP48
> (with the same misbehavior).
I would have to dig this out from some very old posts.
What I can say from memory is that the ACPTR memory access scheme is
still present which execute the bank switching routine to uncover a
bank for an ACPTR.

> Is my understanding correct?
I beliefe the most correct information about it can be found in
"Introduction to Saturn Assembly Language" which covers 48 and 49
memory management.
Christoph Giesselink (Author of EMU48) does surely knows it.
You may also have a look at the source code of Nosy which is pretty
good in extracting ROM routines, however it may fail under some
circumstances.

> where the lower 2 bits determine which of the first 4
> banks are selected for #00000-#3FFFF and the next 4 bits determine
the
> which of the last 12 banks are mapped to #40000-#7FFFF.
>
This is from an old post, note that some information is obsolete now.

From: Eric Smith
Newsgroups: comp.sys.hp48
Subject: HP 49G memory map (was Re: 49g mem scanner and other)
Date: 25 Aug 1999 17:41:40 -0700
(----snip----)
There are two megabytes of flash, which are divided into sixteen banks
of 128K each. Any one of the first four banks can be mapped to
00000..3ffff,
and any of the sixteen can be mapped to 40000..7ffff.

[Note that the most significant address line from the Saturn is not
used by
the Flash memory, so the same banks selected for 00000..3ffff and
40000..7ffff
will also appear at 80000..bffff and c0000..fffff if you unconfigure
the
RAM that normally covers that area.]

Of the sixteen banks, the first eight contain the HP 49G operating
system,
and the last eight contain the user Flash (used as port 2). There are
hooks
in place to handle the case that a future version of the operating
system
might take more than eight banks, in which case the user Flash would
get
fewer banks.

The first half (64 Kbytes) of bank 0 of the Flash is the boot sector.
This
area is write-protected such that there is no way to overwrite it
without
modifying the hardware. This sector contains the boot code which
validates
the contents of the remaining system banks. If there is a problem,
perhaps
because of a failed upgrade attempt, the boot code allows the user to
download
the OS again. On reset, bank 0 is mapped to 00000..3ffff. After
boot, a
different bank is normally mapped there. (I'm not sure which one, but
it can
only be 1, 2, or 3.)

The second half of bank 0 is not write-protected, and is apparently
part
of the port 2 user Flash (along with banks 8..f).

The range from 40000..7ffff can be mapped to any of the Flash banks,
including
the user banks. This is also where the "ERAM" (port 1 user RAM) is
configured
when needed. Since there is 256K of ERAM, only half of it can be
configured
there at a given time.

Since the memory configuration of the Yorke chip is very flexible, it
is
possible for future software or alternative operating systems to map
the
memory in different ways. For instance, an all-RAM configuration or a
configuration with RAM at low addresses and Flash at high addresses is
apparently possible.
(----snip----)

-----------------------------------------------------------------------------
| 00000 3ffff | 40000 7ffff | 80000 bffff | c0000
fffff |
-----------------------------------------------------------------------------
\ can be mapped / \can be mapped to/ \ normally always
configured /
\ to first four / \any flash, or / \ as user
IRAM /
\ banks / \ user ERAM / \ (HOME and port
0) /
\ / \ (port 1) |
\ /
|----------/ \----------|
-----------------------------|
|
| |
|
| |
|
| |
| Flash - 16 banks of 128 KB | RAM - 3
areas |
| -------------------- |
-------------------- |
| | bank 0 64K boot | | | 0-256K
| /
|\ | sector | /| | IRAM |
<---
| --->| -------- |<---- | | (HOME & port 0)|
| | 64K normal | |\ --------------------
|\ -------------------- /| --------->| 256-384K ERAM |
| --->| bank 1 |<---- |\ ---------- (port 1)|
|\ -------------------- /| --------->| 384-512K |
| --->| bank 2 |<---- | --------------------
\ -------------------- /|
--->| bank 3 |<---- |
-------------------- /|
| bank 4 |<---- |
-------------------- /|
| bank 5 |<---- |
-------------------- /|
| bank 6 |<---- |
-------------------- /|
| bank 7 |<---- |
-------------------- /|
| bank 8 |<---- |
-------------------- |
. |
. |
. |
-------------------- /
| bank f |<----
--------------------

HTH,
Andreas
http://www.software49g.gmxhome.de