Difference between revisions of "Memory Paging Control"

From SpecNext official Wiki
Jump to: navigation, search
(core 3.0 changes/refresh)
(updated to 78a6ee50)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Port
 
{{Port
 
|Number=$7FFD
 
|Number=$7FFD
 +
|NumberDec=32765
 +
|PortMask=%01-- ---- ---- --0-
 
|ShortDesc=Selects active RAM, ROM, and displayed screen.
 
|ShortDesc=Selects active RAM, ROM, and displayed screen.
 
|Readable=No
 
|Readable=No
 
|Writable=Yes
 
|Writable=Yes
 
|Subsystem=Memory map
 
|Subsystem=Memory map
|PortMask=%01-- ---- ---- --0-
 
 
}}
 
}}
Selects the active memory page in slot 4 at $C000. See [[Memory map]].
+
Selects the active memory page in slot 4 at $C000. See [[Memory map]] (soft reset = 0).
  
 
Any values written to this port should also be stored at $5B5C if any OS routines are in use.
 
Any values written to this port should also be stored at $5B5C if any OS routines are in use.
Line 14: Line 15:
 
! Bit !! Effect
 
! Bit !! Effect
 
|-
 
|-
| 6-7 || Undocumented
+
| 6-7 || Extra two bits for 16K RAM bank if in Pentagon 512K / 1024K mode (see {{PortNo|$DFFD}}, {{NextRegNo|$8f}})
 
|-
 
|-
 
| 5 || Lock memory paging (setting to 1 locks pages and cannot be unlocked until next reset (on regular ZX128))
 
| 5 || Lock memory paging (setting to 1 locks pages and cannot be unlocked until next reset (on regular ZX128))
 
|-
 
|-
| 4 || ROM select (low bit of ROM select on +2/+3)
+
| 4 || ROM select (0 = 128k editor, 1 = 48k basic) (low bit of ROM select on +2/+3)
 
|-
 
|-
| 3 || Shadow Screen toggle - this is ULA layer shadow, not related to {{NextRegNo|$13}}
+
| 3 || Shadow Screen toggle (0 = bank 5, 1 = bank 7) - this is ULA layer shadow, not related to {{NextRegNo|$13}}
 
|-
 
|-
 
| 0-2 || Bank number for slot 4 ($C000)
 
| 0-2 || Bank number for slot 4 ($C000)
Line 28: Line 29:
  
 
When the port is locked (bit 5), the shadow screen toggle is considered part of the paging, i.e. it's not possible to flip between shadow and regular screen. Except for {{NextRegNo|$69}} which works even when port is locked, and you can unlock the port back (without reset) with {{NextRegNo|$08}}.
 
When the port is locked (bit 5), the shadow screen toggle is considered part of the paging, i.e. it's not possible to flip between shadow and regular screen. Except for {{NextRegNo|$69}} which works even when port is locked, and you can unlock the port back (without reset) with {{NextRegNo|$08}}.
 +
 +
ULA shadow screen from Bank 7 has higher priority than Timex modes, setting bit 3 to "1" when in one of the extended Timex graphic modes will switch to classic ZX128 ULA mode using Bank 7 data.

Latest revision as of 13:03, 3 November 2024

Number $7FFD
Decimal 32765
Short desc. Selects active RAM, ROM, and displayed screen.
Bit Mask %01-- ---- ---- --0-
Readable No
Writable Yes
Subsystem Memory map

Selects the active memory page in slot 4 at $C000. See Memory map (soft reset = 0).

Any values written to this port should also be stored at $5B5C if any OS routines are in use.

Bit Effect
6-7 Extra two bits for 16K RAM bank if in Pentagon 512K / 1024K mode (see Next Memory Bank Select ($DFFD / 57341), Memory Mapping Mode ($8f))
5 Lock memory paging (setting to 1 locks pages and cannot be unlocked until next reset (on regular ZX128))
4 ROM select (0 = 128k editor, 1 = 48k basic) (low bit of ROM select on +2/+3)
3 Shadow Screen toggle (0 = bank 5, 1 = bank 7) - this is ULA layer shadow, not related to Layer 2 RAM Shadow Page Register ($13)
0-2 Bank number for slot 4 ($C000)

Since core3.0 the Layer 2 can be used together with shadow ULA screen from Bank 7 (previous cores did disable Layer 2).

When the port is locked (bit 5), the shadow screen toggle is considered part of the paging, i.e. it's not possible to flip between shadow and regular screen. Except for Display Control 1 Register ($69) which works even when port is locked, and you can unlock the port back (without reset) with Peripheral 3 Register ($08).

ULA shadow screen from Bank 7 has higher priority than Timex modes, setting bit 3 to "1" when in one of the extended Timex graphic modes will switch to classic ZX128 ULA mode using Bank 7 data.