<!-- PDF page 246 -->

Next's memory can be paged into the top 16K.

Also in this mode, **D3** of port **EFF7h** can be set to place 16K bank 0 into the bottom 16K, overlaying the ROM.

Writes to ports **7FFDh**, **DFFDh**, **1FFDh** and **EFF7h**, will cause the bottom 16K and the top 16K to remap; if allRAM mode is selected, the entire 64K remaps.

In Pentagon 512K mode, port **7FFDh** is extended so that bits **D7:D6** augment the bank number in bits **D2:D0** to form a 5-bit bank number for the top 16K.

On the ZX Spectrum Next, port **1FFDh** continues to function (allRAM mode and ROM selection) and **D3** of port **EFF7h** can be set to map 16K bank 0 on top of ROM in the bottom 16K.

Writes to ports **7FFDh**, **DFFDh**, **1FFDh** and **EFF7h** will cause the bottom 16K and the top 16K to remap; if allRAM mode is selected, the entire 64K remaps.

In Pentagon 1024K mode, port **EFF7h D2** = **0** enables Pentagon 1024K mapping and port **EFF7h D2** = **1** selects standard ZX Spectrum mapping as described above.

With Pentagon 1024K mode active, port **7FFDh** is unlocked and **D5** (the lock bit) is repurposed as another bank bit.

The bank number paged into the top 16K is taken as port **7FFDh** bits {**D5,D7,D6,D2,D1,D0**} to reach 1MB in 16K banks.

On the Next, port **1FFDh** continues to function (allRAM mode and ROM selection) and **D3** of port **EFF7h** can be set to map 16K bank 0 on top of ROM in the bottom 16K.

Writes to ports **7FFDh**, **DFFDh**, **1FFDh** and **EFF7h** will cause the bottom 16K and the top 16K to remap; if allRAM mode is selected, the entire 64k remaps.

For 100% compatibility with the original banking methods listed above, extra ports like **1FFDh** can be disabled using the internal port decodes with **NextREGs 130 - 133** (**82h - 85h**).

### The Expansion Bus

The Expansion Bus is found in the back of the ZX Spectrum Next and exposes its CPU to the world. As it too gets addressed by **IN** and **OUT** commands, it is listed below:

<table>
<tbody>
<tr><th rowspan="28">Bottom Side</th><td>A11</td><td>28</td><td>28</td><td>Reserved</td><th rowspan="28">Top Side</th></tr>
<tr><td>A9</td><td>27</td><td>27</td><td>A10</td></tr>
<tr><td>B̅U̅S̅A̅C̅K̅</td><td>26</td><td>26</td><td>A8</td></tr>
<tr><td>R̅O̅M̅C̅S̅</td><td>25</td><td>25</td><td>R̅F̅S̅H̅</td></tr>
<tr><td>A4</td><td>24</td><td>24</td><td>M̅1̅</td></tr>
<tr><td>A5</td><td>23</td><td>23</td><td>NC</td></tr>
<tr><td>A6</td><td>22</td><td>22</td><td>NC</td></tr>
<tr><td>A7</td><td>21</td><td>21</td><td>W̅A̅I̅T̅</td></tr>
<tr><td>R̅E̅S̅E̅T̅</td><td>20</td><td>20</td><td>NC</td></tr>
<tr><td>BUSREQ[^p246-6]</td><td>19</td><td>19</td><td>W̅R̅</td></tr>
<tr><td>NC</td><td>18</td><td>18</td><td>R̅D̅</td></tr>
<tr><td>NC</td><td>17</td><td>17</td><td>I̅O̅R̅Q̅</td></tr>
<tr><td>Reserved</td><td>16</td><td>16</td><td>M̅R̅E̅Q̅</td></tr>
<tr><td>R̅O̅M̅C̅S̅</td><td>15</td><td>15</td><td>H̅A̅L̅T̅</td></tr>
<tr><td>GND</td><td>14</td><td>14</td><td>N̅M̅I̅</td></tr>
<tr><td>I̅O̅R̅Q̅U̅L̅A̅</td><td>13</td><td>13</td><td>I̅N̅T̅</td></tr>
<tr><td>A3</td><td>12</td><td>12</td><td>D4</td></tr>
<tr><td>A2</td><td>11</td><td>11</td><td>D3</td></tr>
<tr><td>A1</td><td>10</td><td>10</td><td>D5</td></tr>
<tr><td>A0</td><td>9</td><td>9</td><td>D6</td></tr>
<tr><td>C̅L̅K̅</td><td>8</td><td>8</td><td>D2</td></tr>
<tr><td>GND</td><td>7</td><td>7</td><td>D1</td></tr>
<tr><td>GND</td><td>6</td><td>6</td><td>D0</td></tr>
<tr><td><b>Key</b></td><td>5</td><td>5</td><td>Key</td></tr>
<tr><td>+9V (PSU)[^p246-7]</td><td>4</td><td>4</td><td>R̅O̅M̅C̅S̅</td></tr>
<tr><td>+5V</td><td>3</td><td>3</td><td>D7</td></tr>
<tr><td>A12</td><td>2</td><td>2</td><td>A13</td></tr>
<tr><td>A14</td><td>1</td><td>1</td><td>A15</td></tr>
</tbody>
</table>

*The ZX Spectrum Next Expansion Bus*

[^p246-6]: *BUSREQ is incorrectly active High oin Issue 2 but fixed on Issue 4*
[^p246-7]: *This pin receives the unregulated power from the PSU line. If you plug a higher voltage PSU, that voltage will be present at that pin and may damage your peripherals*

