FNX6809 Manuals: Difference between revisions

From F256 Foenix
Jump to navigationJump to search
No edit summary
(→‎Memory Map: add new memory map to wiki)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
== MMU Registers ==
== MMU Registers ==
{| class="wikitable"
{| class="wikitable" style="text-align:center;"
|+
|+
!Address
!Address
Line 32: Line 32:
| -  
| -  
| -  
| -  
|
|$FFF0-$FFFF
|$FFF0-$FFFF
Enable
Enable
| colspan="2" |$FD00-$FDFF
|$FD00-$FDFF
Enable
Enable
|}
|}
Line 42: Line 43:
'''ACT_LUT''' these two bits specify which MLUT (0–3) is used to translate CPU bus address to system bus addresses.
'''ACT_LUT''' these two bits specify which MLUT (0–3) is used to translate CPU bus address to system bus addresses.


'''EDIT_LUT''' these two bits will specify which MLUT (0 - 3) is being edited and will appear in memory addresses 0x0008–0x0010.
'''EDIT_LUT''' these two bits will specify which MLUT (0 - 3) is being edited and will appear in memory addresses $FFA8-$FFAF.


== Memory Map ==
These locations are defined in nitros9/defs/f256.d:
 
MMU_MEM_CTRL    equ       $FFA0
 
MMU_IO_CTRL        equ       $FFA1
 
MMU_SLOT_0          equ       $FFA8               $0000-$1FFF
 
MMU_SLOT_1          equ       $FFA9               $2000-$3FFF
 
MMU_SLOT_2          equ       $FFAA               $4000-$5FFF
 
MMU_SLOT_3          equ       $FFAB               $6000-$7FFF
 
MMU_SLOT_4          equ       $FFAC               $8000-$9FFF
 
MMU_SLOT_5          equ       $FFAD               $A000-$BFFF
 
MMU_SLOT_6          equ       $FFAE               $C000-$DFFF
 
MMU_SLOT_7          equ       $FFAF               $E000-$FFFF
 
 
<nowiki>*</nowiki> MMU_IO_CTRL bits
 
<nowiki>*</nowiki> $FFA1 has 2 bits:
 
<nowiki>*</nowiki>    FFA1[0] =
 
<nowiki>*</nowiki>        1 = Enable internal RAM for segment $FD00-$FDFF.
 
<nowiki>*</nowiki>        0 = Disable; RAM/FLASH is accessible.
 
<nowiki>*</nowiki>
 
<nowiki>*</nowiki>    FFA1[1] =
 
<nowiki>*</nowiki>        1 = Enable internal RAM for segment $FFF0-$FFFF
 
<nowiki>*</nowiki>        0 = Disable; RAM/FLASH is accessible.
 
<nowiki>*</nowiki> When enabled, the areas supersede RAM/flash, but will be disabled by RESET. When the system resets,
 
<nowiki>*</nowiki> those regions revert to RAM/flash. Also at RESET, the contents of RAM retain the old values until the
 
<nowiki>*</nowiki> system powers off.


'''NOTE:'''  If you are writing an OS-9 program, use <code>F$MapBlk</code> and <code>F$ClrBlk</code> instead of directly accessing these addresses. NitrOS-9 keeps track of each process' MMU LUT (but only if you use <code>F$MapBlk</code> and <code>F$ClrBlk</code>). Addressing the MMU directly can create unpredictable results.


== Memory Map ==
[[File:K2MemoryMap.png|frameless|818x818px]]


== Memory Model ==
== Memory Model ==
[[File:FNX6809-MemoryModel Page 1.png|thumb|430x430px|FNX6809 Memory Model Page 1|none]]
[[File:FNX6809-MemoryModel Page 2.png|none|thumb|430x430px|FNX6809 Memory Model Page 2]]
__FORCETOC__

Latest revision as of 08:19, 29 August 2025

MMU Registers

Address R/W Name 7 6 5 4 3 2 1 0
$FFA0 RW MMU_MEM_CTRL - - EDIT_LUT - - ACT_LUT
$FFA1 RW MMU_IO_CTRL - - - - - $FFF0-$FFFF

Enable

$FD00-$FDFF

Enable

There are 4 MLUTs (MMU Lookup Tables).

ACT_LUT these two bits specify which MLUT (0–3) is used to translate CPU bus address to system bus addresses.

EDIT_LUT these two bits will specify which MLUT (0 - 3) is being edited and will appear in memory addresses $FFA8-$FFAF.

These locations are defined in nitros9/defs/f256.d:

MMU_MEM_CTRL    equ       $FFA0

MMU_IO_CTRL        equ       $FFA1

MMU_SLOT_0          equ       $FFA8               $0000-$1FFF

MMU_SLOT_1          equ       $FFA9               $2000-$3FFF

MMU_SLOT_2          equ       $FFAA               $4000-$5FFF

MMU_SLOT_3          equ       $FFAB               $6000-$7FFF

MMU_SLOT_4          equ       $FFAC               $8000-$9FFF

MMU_SLOT_5          equ       $FFAD               $A000-$BFFF

MMU_SLOT_6          equ       $FFAE               $C000-$DFFF

MMU_SLOT_7          equ       $FFAF               $E000-$FFFF


* MMU_IO_CTRL bits

* $FFA1 has 2 bits:

*    FFA1[0] =

*        1 = Enable internal RAM for segment $FD00-$FDFF.

*        0 = Disable; RAM/FLASH is accessible.

*

*    FFA1[1] =

*        1 = Enable internal RAM for segment $FFF0-$FFFF

*        0 = Disable; RAM/FLASH is accessible.

* When enabled, the areas supersede RAM/flash, but will be disabled by RESET. When the system resets,

* those regions revert to RAM/flash. Also at RESET, the contents of RAM retain the old values until the

* system powers off.

NOTE: If you are writing an OS-9 program, use F$MapBlk and F$ClrBlk instead of directly accessing these addresses. NitrOS-9 keeps track of each process' MMU LUT (but only if you use F$MapBlk and F$ClrBlk). Addressing the MMU directly can create unpredictable results.

Memory Map

Memory Model

FNX6809 Memory Model Page 1
FNX6809 Memory Model Page 2