; ---------------------------------------------------------------------------
; I/O: MMU
-MMU_CR := $FF00
-MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
-MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
-MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
-MMU_CFG_RAM2 := %10111111 ; Bank 2 full RAM
-MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
-MMU_CFG_INT_FROM := %01010111 ; Bank 1 with Internal Function RAM/ROM
-MMU_CFG_EXT_FROM := %01101011 ; Bank 1 with External Function RAM/ROM
+MMU_CR := $FF00
+MMU_CFG_CC65 := %00001110 ; Bank 0 with kernal ROM
+MMU_CFG_RAM0 := %00111111 ; Bank 0 full RAM
+MMU_CFG_RAM1 := %01111111 ; Bank 1 full RAM
+MMU_CFG_RAM2 := %10111111 ; Bank 2 full RAM
+MMU_CFG_RAM3 := %11111111 ; Bank 3 full RAM
+MMU_CFG_IFROM := %01010111 ; Bank 1 with Internal Function RAM/ROM
+MMU_CFG_EFROM := %01101011 ; Bank 1 with External Function RAM/ROM
; ---------------------------------------------------------------------------
; Super CPU
stx FETVEC
stx STAVEC
ldy #0
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
sei
jsr FETCH
tax
inx
txa
sta tmp1
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
sei
jsr STASH
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
jsr FETCH
cli
cmp tmp1
; Transfer one page
-@L1: ldx #MMU_CFG_EXT_FROM
+@L1: ldx #MMU_CFG_EFROM
jsr FETCH
sta window,y
iny
; Transfer one page. Y must be zero on entry
@L1: lda window,y
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
jsr STASH
iny
bne @L1
ldy #$00
sei
-@L1: ldx #MMU_CFG_EXT_FROM
+@L1: ldx #MMU_CFG_EFROM
jsr FETCH
sta (ptr2),y
iny
sta tmp1
ldy #$00
-@L3: ldx #MMU_CFG_EXT_FROM
+@L3: ldx #MMU_CFG_EFROM
jsr FETCH
sta (ptr2),y
iny
sei
ldy #$00
@L1: lda (ptr2),y
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
jsr STASH
iny
bne @L1
ldy #$00
@L3: lda (ptr2),y
- ldx #MMU_CFG_EXT_FROM
+ ldx #MMU_CFG_EFROM
jsr STASH
iny
dec tmp1
stx FETVEC
stx STAVEC
ldy #0
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
sei
jsr FETCH
tax
inx
txa
sta tmp1
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
sei
jsr STASH
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
jsr FETCH
cli
cmp tmp1
; Transfer one page
-@L1: ldx #MMU_CFG_INT_FROM
+@L1: ldx #MMU_CFG_IFROM
jsr FETCH
sta window,y
iny
; Transfer one page. Y must be zero on entry
@L1: lda window,y
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
jsr STASH
iny
bne @L1
ldy #$00
sei
-@L1: ldx #MMU_CFG_INT_FROM
+@L1: ldx #MMU_CFG_IFROM
jsr FETCH
sta (ptr2),y
iny
sta tmp1
ldy #$00
-@L3: ldx #MMU_CFG_INT_FROM
+@L3: ldx #MMU_CFG_IFROM
jsr FETCH
sta (ptr2),y
iny
sei
ldy #$00
@L1: lda (ptr2),y
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
jsr STASH
iny
bne @L1
ldy #$00
@L3: lda (ptr2),y
- ldx #MMU_CFG_INT_FROM
+ ldx #MMU_CFG_IFROM
jsr STASH
iny
dec tmp1