The file compounds of lines each is either a comment line or a bank- or a page
description. A comment line starts with a
# and may appear anywhere in the file.
A line containing a bank description consists of the following 4 entries:
access_type bank_id log2_size bank_name.
A line containing a page description consists of these 4 entries:
bank_id followed by port_no mask and a non empty list of bank_ids.
All bank description lines must preceed the page description lines and must be
ordered ascending by their unique bank_id.
The following page description lines are ordered ascending by their first
item which is typically an
offset or in the case of a virtuel bank a bank_id. If lines have the same
first entry then they must be ordered ascending by their port_id with -
regarded less than any other port_id. And in the case even their second entries
equals each other, then these lines will be ordered by their mask.
A list of bank_ids is an ascending sequence of bank_ids separated only by
, (comma), not any whitespace.
is the type of the bank. Only the four types
r for read only memory,
w for write
only memory and
- for a virtuel bank are valid.
is a 2 digit hexadecimal byte value.
gives the size of the bank in bytes as its log2-value.
Currently only banks whose
log2_size equals 14 (16 kB)
or 12 (4 kB) are supported. Due to hardware complexity
all banks must have currently the same size!
must either indicate a readable file which contains the
machine code for the bank or the special value
which indicates either undefined storage, typically RAM,
or in the case of a virtuel bank no file name. If the corres-
sponding file is smaller than the bank size the remaining
bytes at the end of the bank will be undefined. If the file
size is larger than the bank size only the first bytes in
the file will be used.
is a 4 digit hexadecimal value telling the hardware the
start address the bank to be mapped on. Furthermore
offset must be a multiple of
1<<log2_size of the
bank size it can be mapped to.
is a decimal or hexadecimal number of value < 256 or
the character - (minus). In the second case the
mask must be 0.
is a 2 digit hexadecimal byte value which covers the relevant
part of value send to the corresponding port. The
together with the given
mask must have a unique
Each used bank_id in a page description must be defined in a previous
Summarizing, this file describes how the banks are mapped to
memory or other (virtuel) banks.
If a byte value is put to a port which has a corresponding page description
then a mapping occurs if
bank_id matches the value and-ed with the
mask of the port.
Therefore page description lines with the same
port_no should have different
bank_id s for a unique mapping. The default bank_id of a page is the one with
the lowest bank_id. This is selected at hardware initialisation and after
a bank reset.