ports

 

https://www.mail-archive.com/sam-users@nvg.ntnu.no.backup/msg03859.html

Fixed alignment (sort of):

 

General port map - Read
-----------------------

     +------------------------------------------------------------------+    
     |PORT  (RD)|128--7| 64--6| 32--5| 16--4|  8--3|  4--2|  2--1|  1--0|
+----+----------+------+------+------+------+------+------+------+------+---+
|  FF|ATTRIBUTES|FLASH |BRIGHT|G PAPR|R PAPR|B PAPR|G  INK|R  INK|B  INK|255|
|----+----------+------+------+------+------+------+------+------+------+---|
|  FE|KEYBOARD  |SOFF  |EAR   |SPEN  |KEY  5|KEY  4|KEY  3|KEY  2|KEY  1|254|
|----+----------+------+------+------+------+------+------+------+------+---|
|FFFE|RDMSEL    |SOFF  |EAR   |SPEN  |RIGHT |LEFT  |DOWN  |UP    |CNTRL |254|
|----+----------+-------------------------------------------------------+---|
|  FD|MIDI-IN   |                      8 BITS DATA                      |253|
|----+----------+-------------------------------------------------------+---|
|  FC|VMPR      |RXMIDI|MODE 1|MODE 0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|252|
|----+----------+------+------+------+------+------+------+------+------+---|
|  FB|HMPR      |MCNTRL|MD3 S1|MD3 S0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|251|
|----+----------+------+------+------+------+------+------+------+------+---|
|  FA|LMPR      |WPROT |ROM  1|RAM  0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|250|
|----+----------+------+------+------+------+------+------+------+------+---|
|  F9|STATUS    |KEY  8|KEY  7|KEY  6|MIDI O|FRAME |MIDI I|COMMS |LINE  |249|
|----+----------+-------------------------------------------------------+---|
|01F8|HPEN      |                  CURRENT YSCAN VALUE                  |248|
|----+----------+-------------------------------------------------------|   |
|00F8|LPEN      |        CURRENT XSCAN VALUE DIV 4        |TXFMST|BLUE 0|   |
|----+----------+-------------------------------------------------------+---|
|  F0|DISC 2    |             DRIVE 2 BASE PORT - SEE BELOW             |240|
|----+----------+-------------------------------------------------------+---|
|  EF|SAMBUS CLK|       BATTERY BACKED REALTIME CLOCK - SEE BELOW       |239|
|----+----------+-------------------------------------------------------+---|
|  EC|COMMS IFC |    COMMS I/FACE SERIAL CHIP (IM26C91) -- SEE BELOW    |236|
|----+----------+-------------------------------------------------------+---|
|  E9|PTR STATUS|      |      |      |      |      |      |      |BUSY  |233|
|----+----------+-------------------------------------------------------+---|
|  E0|DISC 1    |             DRIVE 1 BASE PORT - SEE BELOW             |224|
|----+----------+-------------------------------------------------------+---|
|  DF|MULTIROM D|MR_OFF|MR_RAM|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|223|
|----+----------+------+------+------+------+------+------+------+------+---|
|  DE|MULTIROM A|MR_OFF|MR_RAM|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|222|
|----+----------+-------------------------------------------------------+---|
|  D0|ENTROPY   |    ENTROPY PORTS ALLOCATED -- PORTS &xxD0 TO &xxDF    |208|
|----+----------+-------------------------------------------------------+---|
|  7F|BLUE ALPHA| BLUE ALPHA PORTS ALLOCATED -- PORTS &007F TO &FF7F    |127|
+---------------------------------------------------------------------------+

General port map - Write
------------------------

     +------------------------------------------------------------------+    
     |PORT  (WR)|128--7| 64--6| 32--5| 16--4|  8--3|  4--2|  2--1|  1--0|
+----+----------+------+------+------+------+------+------+------+------+---+
|01FF|SOUND ADDR|      |      |      |ADDR 4|ADDR 3|ADDR 2|ADDR 1|ADDR 0|255|
|----+----------+-------------------------------------------------------|   |
|00FF|SOUND DATA|                      8 BITS DATA                      |   |
|----+----------+-------------------------------------------------------+---|
|  FE|BORDER    |SOFF  |THROM |VID&08|BEEP  |MIC   |VID&04|VID&02|VID&01|254|
|----+----------+-------------------------------------------------------+---|
|  FD|MIDI-OUT  |                      8 BITS DATA                      |253|
|----+----------+-------------------------------------------------------+---|
|  FC|VMPR      |TXMIDI|MODE 1|MODE 0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|252|
|----+----------+------+------+------+------+------+------+------+------+---|
|  FB|HMPR      |MCNTRL|MD3 S1|MD3 S0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|251|
|----+----------+------+------+------+------+------+------+------+------+---|
|  FA|LMPR      |WPROT |ROM  1|RAM  0|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|250|
|----+----------+-------------------------------------------------------+---|
|  F9|LINE INT  |               YSCAN LINE TO INTERRUPT ON              |249|
|----+----------+-------------------------------------------------------+---|
|  F8|CLUT      |      |GRN  1|RED  1|BLU  1|HALFBR|GRN  0|RED  0|BLU  0|248|
|----+----------+-------------------------------------------------------+---|
|  F0|DISC 2    |             DRIVE 2 BASE PORT - SEE BELOW             |240|
|----+----------+-------------------------------------------------------+---|
|  EF|SAMBUS CLK|       BATTERY BACKED REALTIME CLOCK - SEE BELOW       |239|
|----+----------+-------------------------------------------------------+---|
|  EE|ACCELERATR|      |CLKSPD|IORQW |ASWAIT|BANK D|BANK C|BANK B|BANK A|238|
|----+----------+-------------------------------------------------------+---|
|  EC|COMMS IFC |    COMMS I/FACE SERIAL CHIP (IM26C91) -- SEE BELOW    |236|
|----+----------+-------------------------------------------------------+---|
|  E9|PTR CTRL  |      |      |      |      |      |      |      |STROBE|233|
|----+----------+-------------------------------------------------------+---|
|  E8|PTR DATA  |                      8 BITS DATA                      |233|
|----+----------+-------------------------------------------------------+---|
|  E0|DISC 1    |             DRIVE 1 BASE PORT - SEE BELOW             |224|
|----+----------+-------------------------------------------------------+---|
|  DF|MULTIROM D|MR_OFF|MR_RAM|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|223|
|----+----------+------+------+------+------+------+------+------+------+---|
|  DE|MULTIROM A|MR_OFF|MR_RAM|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|222|
|----+----------+-------------------------------------------------------+---|
|  D0|ENTROPY   |    ENTROPY PORTS ALLOCATED -- PORTS &xxD0 TO &xxDF    |208|
|----+----------+-------------------------------------------------------+---|
|  83|MEGHIGH  D|PAGE15|PAGE14|PAGE13|PAGE12|PAGE11|PAGE10|PAGE 9|PAGE 8|131|
|----+----------+------+------+------+------+------+------+------+------+---|
|  82|MEGHIGH  C|PAGE15|PAGE14|PAGE13|PAGE12|PAGE11|PAGE10|PAGE 9|PAGE 8|130|
|----+----------+------+------+------+------+------+------+------+------+---|
|  81|MEGLOW   D|PAGE 7|PAGE 6|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|129|
|----+----------+------+------+------+------+------+------+------+------+---|
|  80|MEGLOW   C|PAGE 7|PAGE 6|PAGE 5|PAGE 4|PAGE 3|PAGE 2|PAGE 1|PAGE 0|128|
|----+----------+-------------------------------------------------------+---|
|  7F|BLUE ALPHA| BLUE ALPHA PORTS ALLOCATED -- PORTS &007F TO &FF7F    |127|
+---------------------------------------------------------------------------+

Keyboard matrix / port allocations
----------------------------------

            +-----------------------------------------------+
            |  7  |  6  |  5  |      BASE PORT &F9/249      |
+-----------+-----------------+-----------------------------|
|ADRSELECTOR|BASE PORT &FE/254|  4  |  3  |  2  |  1  |  0  |
|-----------+-----------------+-----+-----+-----+-----+-----|
|11111110|FE| F 3 | F 2 | F 1 |  V  |  C  |  X  |  Z  |SHIFT|
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11111101|FD| F 6 | F 5 | F 4 |  G  |  F  |  D  |  S  |  A  |
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11111011|FB| F 9 | F 8 | F 7 |  T  |  R  |  E  |  W  |  Q  |
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11110111|F7| CAPS| TAB | ESC |  5  |  4  |  3  |  2  |  1  |
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11101111|EF|DELET|  +  |  -  |  6  |  7  |  8  |  9  |  0  |
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11011111|DF| F 0 |  "  |  =  |  Y  |  U  |  I  |  O  |  P  |
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|10111111|C0| EDIT|  :  |  ;  |  H  |  J  |  K  |  L  |RETRN|
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|01111111|7F| INV |  .  |  ,  |  B  |  N  |  M  | SYM |SPACE|
|--------+--+-----+-----+-----+-----+-----+-----+-----+-----|
|11111111|FF|     |     |     |RIGHT| LEFT|   UP| DOWN|CNTRL|
+-----------------------------------------------------------+

Disc controller port allocations
--------------------------------

+-----------------------------------------------+
|    SIDE1    |  DISC CONTROLLER  |    SIDE2    |
|-------------+-------------------+-------------|
|DISC 1|DISC 2| READ    | WRITE   |DISC 1|DISC 2|
|------+------+---------+---------+------+------|
|  E0  |  F0  | STATUS  | COMMAND |  E4  |  F4  |
|------+------+---------+---------+------+------|
|  E1  |  F1  | TRACK   | TRACK   |  E5  |  F5  |
|------+------+---------+---------+------+------|
|  E2  |  F2  | SECTOR  | SECTOR  |  E6  |  F6  |
|------+------+---------+---------+------+------|
|  E3  |  F3  | DATA    | DATA    |  E7  |  F7  |
+-----------------------------------------------+

SAMbus Realtime clock port allocations
--------------------------------------

     +-------------------------------------+
     |PORT  (R/W)|     Bits  3-0     |RANGE|
+----+-----------+-------------------+-----+-----+
|00EF|SECONDS LSD|S  8|S  4|S  2|S  1| 0-9 |  239|
|----+-----------+----+----+----+----+-----+-----|
|10EF|SECONDS MSD|    |S 40|S 20|S 10| 0-5 | 4335|
|----+-----------+----+----+----+----+-----+-----|
|20EF|MINUTES LSD|M  8|M  4|M  2|M  1| 0-9 | 8431|
|----+-----------+----+----+----+----+-----+-----|
|30EF|MINUTES MS |    |M 40|M 20|M 10| 0-5 |12527|
|----+-----------+----+----+----+----+-----+-----|
|40EF|HOURS   LSD|H  8|H  4|H  2|H  1| 0-9 |16623|
|----+-----------+----+----+----+----+-----+-----|
|50EF|HOURS   MSD|    |    |H 20|H 10| 0-2 |20719|
|----+-----------+----+----+----+----+-----+-----|
|60EF|DAY     LSD|D  8|D  4|D  2|D  1| 0-9 |24815|
|----+-----------+----+----+----+----+-----+-----|
|70EF|DAY     MSD|    |    |D 20|D 10| 0-3 |28911|
|----+-----------+----+----+----+----+-----+-----|
|80EF|MONTH   LSD|MO 8|MO 4|MO 2|MO 1| 0-9 |33007|
|----+-----------+----+----+----+----+-----+-----|
|90EF|MONTH   LSD|    |    |    |MO10| 0-1 |37103|
|----+-----------+----+----+----+----+-----+-----|
|A0EF|YEAR    LSD|Y  8|Y  4|Y  2|Y  1| 0-9 |41199|
|----+-----------+----+----+----+----+-----+-----|
|B0EF|YEAR    MSD|Y 80|Y 40|Y 20|Y 10| 0-9 |45295|
|----+-----------+----+----+----+----+-----+-----|
|C0EF|WEEK DAY  *|    |W  4|W  2|W  1| 0-6 |49391|
|----+-----------+----+----+----+----+-----+-----|
|D0EF|CONTROL   D|    |    |BUSY|HOLD|     |53487|
|----+-----------+----+----+----+----|     |-----|
|E0EF|CONTROL   E|    |    |    |    | N/A |57583|
|----+-----------+----+----+----+----|     |-----|
|F0EF|CONTROL   F|    |    |    |    |     |61679|
+------------------------------------------------+

* Week day: 0 = Sunday, 1 = Monday, ... 6 = Saturday

LSD -- Least Significant Digit
MSD -- Most Significant Digit
Bits 7-4: don't care.

Serial Communications Interface ports (IM26C91 UART)
----------------------------------------------------

     +-----------------------------------------------------------------+    
     |PORT (WR)|128--7| 64--6| 32--5| 16--4|  8--3|  4--2|  2--1|  1--0|
+----+---------+------+------+------+-------------+------+-------------+----+
|00EC|   MR1   |RXRTS |R/INT |ERRORM|PARITY   MODE|PARTYP|BITS PER CHAR| 236|
|    |---------+-------------+------+----------------------------------|    |
|    |   MR2   |CHANNEL  MODE|TXRTS |CTSETX|      STOP BIT LENGTH      |    |
|----+---------+-------------+------+------+---------------------------+----|
|01EC|   SR    |RBREAK|FRAERR|PARERR|OVRERR|TXEMT |TXRDY |FFULL |RXRDY | 492|
|----+---------+-------------------------------------------------------+----|
|02EC|RESERVED*|                      DO NOT READ                      | 748|
|----+---------+-------------------------------------------------------+----|
|03EC|   RHR   |        RECEIVER HOLDING REGISTER (8 BITS DATA)        |1004|
|----+---------+-------------------------------------------------------+----|
|04EC|RESERVED*|                      DO NOT READ                      |1260|
|----+---------+-------------------------------------------------------+----|
|05EC|   ISR   |MP1PCH|MP1PCS|      |CNTRDY|DBREAK|RXRDYF|TXEMT |TXRDY |1516|
|----+---------+------+------+------+------+------+------+------+------+----|
|06EC|   CTU   |C/T 15|C/T 14|C/T 13|C/T 12|C/T 11|C/T 10|C/T  9|C/T  8|1772|
|----+---------+------+------+------+------+------+------+------+------+----|
|07EC|  (CTL)  |C/T  7|C/T  6|C/T  5|C/T  4|C/T  3|C/T  2|C/T  1|C/T  0|2028|
+---------------------------------------------------------------------------+

* Reserved registers should never be read during normal operation 
since they
  are reserved for internal diagnostics.

     +-----------------------------------------------------------------+   
     |PORT (WR)|128--7| 64--6| 32--5| 16--4|  8--3|  4--2|  2--1|  1--0|
+----+---------+------+------+------+-------------+------+-------------+----+
|00EC|   MR1   |RXRTS |R/INT |ERRORM|PARITY   MODE|PARTYP|BITS PER CHAR| 236|
|    |---------+-------------+------+----------------------------------|    |
|    |   MR2   |CHANNEL  MODE|TXRTS |CTSETX|      STOP BIT LENGTH      |    |
|----+---------+---------------------------+---------------------------+----|
|01EC|   CSR   |   RECEIVER CLOCK SELECT   | TRANSMITTER CLOCK SELECT  | 492|
|----+---------+---------------------------+---------------------------+----|
|02EC|   CR    |  MISCELLANEOUS COMMANDS   |DIS TX|ENA TX|DIS RX|ENA TX| 748|
|----+---------+-------------------------------------------------------+----|
|03EC|   THR   |      TRANSMITTER HOLDING REGISTER (8 BITS DATA)       |1004|
|----+---------+-------------------------------------------------------+----|
|04EC|   ACR   |BRGSET|CNTR/TIMER MODE/SRCE|POWERD|MP0 PIN FUNCTION SEL|1260|
|----+---------+------+--------------------+------+--------------------+----|
|05EC|   IMR   |MP1CI |MP1CL |      |CNTRDY|DBREAK|RXRDYF|TXEMTI|TXRDYI|1516|
|----+---------+------+------+------+------+------+------+------+------+----|
|06EC|  CTUR   |C/T 15|C/T 14|C/T 13|C/T 12|C/T 11|C/T 10|C/T  9|C/T  8|1772|
|----+---------+------+------+------+------+------+------+------+------+----|
|07EC|  CTLR   |C/T  7|C/T  6|C/T  5|C/T  4|C/T  3|C/T  2|C/T  1|C/T  0|2028|
+---------------------------------------------------------------------------+

Third Party vendor port allocation
----------------------------------

ENTROPY
-------

&xxEE           Accelerator             WRITE ONLY
&xxDF    &xxDE  MultiROM                WRITE ONLY
&xx82    &xx83  Gig Memory Expansion    WRITE ONLY

&xxD0 -> &xxDF  Reserved for future expansion

BLUE ALPHA
----------

&FF7F           Voicebox                UNKNOWN
&7C7F -> &7F7F  Sampler                 UNKNOWN
                Kaleidoscope            WRITE ONLY
                Hardware Kit            READ/WRITE

&xx7F           Reserved for future expansion

Back Panel Help Sheet
---------------------

+----------------------------------------------------------------------------
| NMI  MIDI OUT  MIDI IN    JOYSTICK      MOUSE    RESET  EXPANSION CONNECTOR  
|                                                                               
|                                                                                  
|      7.   .6   7.   .6    1 2 3 4 5    7.   .6                                  
|                           . . . . .       8            +------------------- 
| +-+ 3.     .1 3.     .1               3.  .  .1   +-+  |.. 1C                     
| +-+                        . . . .                +-+  |.. 1A                     
|      5.   .4   5.   .4     6 7 8 9     5.   .4         +------------------- 
|         .         .                       .                                       
|         2         2                       2                                     
+----------------------------------------------------------------------------
                                                                      
       
----------------------------------------------------------------------------+
EXPANSION CONNECTOR  EAR/MIC  LIGHT   ON/OFF     SAM SCART          POWER   |  
                               PEN                                          |   
                                              +--------------+              |      
                                            20|..         4..|2             |     
--------------------+                         |              |              | 
               32C..|  ++   3.     .1  +--+   |              |    3.  6  .1 |       
               32A..|  ++              +--+   ++..        3..|1       .     |       
--------------------+        5.   .4         21++19          |      .   .4  | 
                                .               +------------+     5  .     |        
                                2                                     2     |     
----------------------------------------------------------------------------+

MIDI IN          MIDI OUT         ATARI JOYSTICK             MOUSE
-------          --------         --------------             -----

1 Net  - Loop    1 Net  - Loop    1 Up                       1 Down
2 NC             2 GND            2 Down                     2 Up
3 Net  + Loop    3 Net  + Loop    3 Left                     3 CTRL
4 Midi + In      4 Midi + Out     4 Right                    4 Left
5 Midi - In      5 Midi - Out     5 0v                       5 Right
6 Net  - Loop    6 Net  - Loop    6 Fire                     6 Interrupt
7 Net  + Loop    7 Net  + Loop    7 +5v                      7 RDMSEL
                                  8 STROBE1 (active high)    8 +5v
                                  9 STROBE2 (active high)    Screen - Ground

LIGHT PEN        SAM SCART                               POWER INPUT
---------        ---------                               -----------
                 
1 +5v            1 Audio RH out  13 Red Earth            1 +5v
2 Audio LH O/P   2 SPEN in       14 CSYNC Earth          2 0v (Signal GND)
3 0v             3 Audio LH out  15 Red Lin out          3 0v (Digital GND)
4 SPEN input     4 Audio Earth   16 CSYNC                4 Composite Vid O/P
5 Audio RH O/P   5 Blue Earth    17 Comp. Video Earth    5 +12v
                 6 Blue TTL out  18 +12v Power in        6 Sound Ouput (Mono)
                 7 Blue Lin out  19 Comp. Video out
                 8 Red TTL out   20 Bright TTL out
                 9 Green Earth   21 GND
                10 Green TTL out   
                11 Green Lin out   
                12 +5v Power in

EXPANSION CONNECTOR DETAILS
---------------------------

       +-------------------------------------------------------------+
Pin 1C |++                                                         ++|Pin 32C
       |++                                                         ++|
       |++                                                         ++|
Pin 1A |++                                                         ++|Pin 32A
       +-------------------------------------------------------------+

Standard 64 pin Euroconnector socket with rows A-C fitted. All identifiers
ending with L are active low.

PIN   SIGNAL          PIN   SIGNAL
---   ------          ---   ------

 1A   DBDIRL           1C   IORQL                     
 2A   RDL              2C   MREQL                     
 3A   WRL              3C   HALTL                     
 4A   BUSACKL          4C   NMIL                      
 5A   WAITL            5C   INTLL                     
 6A   BUSREQL          6C   CD1                       
 7A   RESETL           7C   CD0                       
 8A   CM1L             8C   CD7                       
 9A   REFRESHL         9C   CD2                       
10A   0 VOLTS*        10C   +5 VOLTS*                 
11A   A0              11C   CD6                       
12A   A1              12C   CD5                       
13A   A2              13C   CD3                       
14A   A3              14C   CD4                       
15A   A4              15C   CPU CLK                   
16A   A5              16C   A15                       
17A   A6              17C   A14                       
18A   A7              18C   A13                       
19A   A8              19C   A12                       
20A   A9              20C   A11                       
21A   A10             21C   DISC 2L                  
22A   EXTINTL         22C   ROMCSL                    
23A   XMEML           23C   EARMIC                    
24A   8 MHz           24C   DISC 1L                   
25A   RED 1           25C   PRINTL                    
26A   GREEN 1         26C   BLUE 1                    
27A   CSYNCL          27C   ROMCSRL                   
28A   SPEN            28C   AUDIO RIGHT OUTPUT
29A   BLUE 0          29C   AUDIO LEFT OUTPUT
30A   RED 0           30C   COMPOSITE VIDEO
31A   BRIGHT          31C   GREEN 0                   
32A   +5 VOLTS        32C   0 VOLTS

*Not to be used as a supply rail - reference only

MEMORY MAPPING
--------------
         +-------------------------------------------------------+
         |<------------ 64k ADDRESSING SPACE OF CPU ------------>|
         |                                                       |
         |0000     3FFF|4000     7FFF|8000     BFFF|C000     FFFF|
         +-------------+-------------+-------------+-------------|
         |             |             |             |             |
RAM 0 = 0|             |  SECTION B  |  SECTION C  |  SECTION D  | ROM  1 = 0
         |    ROM 0    |             |             |             | 
         |             |   LMPR +1   |    HMPR     |   HMPR +1   | MCNTRL = 0
         |             |             |             |             |
         +-------------------------------------------------------+
         |             |             |             |             |
                                                                
         |             |             |             |             |
         +-------------+                           +-------------+
         |             |             |             |             |  
RAM 0 = 1|  SECTION A  |                           |             | ROM  1
         |             |             |             |    ROM 1    |        = 1
(LMPR)   |    LMPR     |                           |             | (LMPR)
         |             |             |             |             |
         +-------------+                           +-------------+
                                     |             |             |
                                                                      
                                     |             |             |    
  
                                     +---------------------------+      
                                     |             |             |           
                                     |  EXTERNAL   |  EXTERNAL   | MCNTRL    
                                     |             |             |        = 1
                                     |  MEMORY C   |  MEMORY D   | (HMPR)
                                     |             |             |
                                     +---------------------------+

If the ENTROPY MultiROM expansion is connected, then ROM 0 and ROM 1 may be
replaced with other data. These are controlled by ports &DE and &DF;

&DE handles ROM 0, &DF handles ROM 1.

  
   MR_OFF = 1        MR_OFF = 0
+-------------+   +-------------+
|             |   |             |
|  ORIGINAL   |   |  MULTI-ROM  |
|             |---|             | MR_RAM = 0
|  ROM  0/1   | | |  ROM  PAGE  |
|             | | |             |
+-------------+ | +-------------+
                |
                | +-------------+
                | |             |
                | |  MULTI-ROM  |
                +-|             | MR_RAM = 1
                  |  RAM  PAGE  |
                  |             |
                  +-------------+

ENTROPY MULTI-ROM
-----------------

The Entropy Multi-ROM (M-R) expansion board has been designed as a
multi-function programmer's toolkit. Its 128k-512k ROM contains a fast
Macro/Conditional Assembler, Monitor & Debugger, Systems Utilities,
Disc Toolkit and other programs.

The Entropy Multi-ROM is accessed by two ports, &DE and &DF. When ROM is
paged into sections A or D, it may be overlayed with the M-R's RAM orROM.

On reset, registers &DE and &DF are reset to contain zero. This pages in the
M-R's initialisation code. On power-up, the SAM's memory is tested and
initialised; on reset, the full initialisation procedure is not followed,
allowing the memory to be examined or debugged.

MultiROM Specifications
-----------------------

ROM:  between 128k and 512k system ROM, including BIOS, initialisation
      routines, modified SAM Basic ROM v3.0, SAMDOS, toolkit, Assembler etc.

RAM:  Either 32k or 128k of battery-backed static RAM.

Multi-ROM Memory Map            << THIS INFORMATION MAY NOW BE
--------------------            << INCORRECT!

MultiROM system variables begin in RAM page 1 at &2000. They should not be
overwritten, as the M-R uses them as part of its configuration.

MultiROM pages 0 and 1 are also used as a temporary 24k buffer. This is so
that the M-R may display a screen without destroying data.

On a 512k machine, page 30 of the SAM's internal RAM is copied to page 0 of
the M-R's RAM. Page 31 (&0000-&1FFF) is copied into the corresponding area
of page 1 of the M-R RAM.

On a 256k machine, page 14 is copied to page 0 of the M-R, and page 15 is
copied to page 1.

+-------------------------+        
|                         |
| BUFFER/SCRATCHPAD  AREA | PAGE 0
|                         |
+-------------------------|      
| BUFFER/SCRATCHPAD  AREA |
| - - - - - - - - - - - - | PAGE 1
|  Multi-ROM SYSTEM VARS  |
+-------------------------|                            
|                         |    Multi-ROM Application    PAGES
|                         |       (IF PRESENT)                                     
|          Space          | 2-->7                          
+-------------------------+

Multi-ROM Systems Variables             <<THIS INFORMATION MAY NOW BE
---------------------------             << INCORRECT

All of the Multi-ROM systems variables reside in page 1 of the Multi-ROM's
RAM. If they are paged into section A, use the addresses below as given; if
however they are paged into section D, add &C000 to them.

ADDRESS              

&2000 (9)   MALLOCT  MultiROM's RAM Allocation Table
&2009 (257) XALLOCT  External memory pages &0000 to &00FF Allocation table
                     (Used in conjunction with MasterDOS / EDOS)
&2110 (32)  GALLOCT  Gigabyte allocation table (bitwise)
&2130 (1)   SYSDAT   BIT  0 -- SAM Basic has been initialised if set
                          1 -- External memory is present if set
                          2 -- Internal memory physically present:
                               0 -- 256k    1 -- 512k
                        3-4 -- Number of physical drives present
                          5 -- Gig is present if set
                          6 -- SAM Basic area is invalid if set (may be done
                               for more source space, by the monitor prog,
                               etc)
                          7 -- Memory fault has occured if set

Multi-ROM Allocation tables
---------------------------

These act exactly as in the ALLOCT table held at &5100 in the SAM's internal
memory, and are used in the same way, except for the GALLOCT table.

GALLOCT is the Gigabyte allocation table. It is an array of bits; each bit
corresponds to a 4Mb section of external memory. If it is present, the bit
is set, if it is not, it is reset. This is to aid quick allocation of memory.

If more than 4Mb of external memory is present, then the first pages of the
second 4Mb section will be filled with an XALLOCT table, 65280 bytes in
length. This contains a byte for each possible external memory page (other
than the first 256 pages, which are catered for by the other XALLOCT table).

Allocation table values
-----------------------

FF -- Page not present
FE -- Memory fault in this page -- do not use to store data
D0 -- DOS
C1 -- METEOR assembler
C0 -- COMET assembler
B0 -- BASIC
20 -- Utility page

The correct way to allocate memory pages to your programs is to request it
using the MEM_ALLOC system call in the MultiROM, or an equivalent program.
This will return a unique ID byte for your program to use in the allocation
table.

The MultiROM information in this documentation is now a little out of date -
it is recommended that you look at the latest information release instead,
although some of the points raised here are still valid.