I've defined the following in the first 3 banks:

Code: Select all

```
;----------------------------------------------------------------
; program bank 0
;----------------------------------------------------------------
.base $8000
nametable_1:
.incbin "nt1.nam"
.org $c000
;----------------------------------------------------------------
; program bank 1
;----------------------------------------------------------------
.base $8000
nametable_2:
.incbin "nt2.nam"
.org $c000
;----------------------------------------------------------------
; program bank 2
;----------------------------------------------------------------
.base $8000
nametable_3:
.incbin "nt3.nam"
.org $c000
```

To test this, before I turn on the ppu, I switch to a bank and then load a nametable

Code: Select all

```
LDY #$02 ; bank 3
JSR switch_bank_y
; load nametable
LDA #<nametable_1
STA temp_ptr + 0
LDA #>nametable_1
STA temp_ptr + 1
LDA #$20
STA $2006
LDA #$00
STA $2006
LDY #$00
LDX #$04
-:
LDA (temp_ptr), y
STA $2007
INY
BNE -
INC temp_ptr + 1
DEX
BNE -
```