I don't know why the bank switching doesn't work with this code; an NMI isn't being generated and/or is not handled:
-=[BANK 0]=-
;The World of Tim
;By Yoshimaster96
.org $8000
Thread1:
jmp Thread1
Thr1IO:
lda #0
sta $2005
sta $2005
;Get address of palette
lda $10
asl a
tay
lda ImagePALTable,y
sta $12
iny
lda ImagePALTable,y
sta $13
;Load palette
lda #$30
sta $2006
lda #0
sta $2006
tay
LoadPalLoop:
lda ($12),y
sta $2007
clc
lda $12
adc #1
sta $12
lda $13
adc #0
sta $13
lda $12
sec
sbc #$10
bne LoadPalLoop
;Get address of image
lda $10
asl a
tay
lda ImageNAMTable,y
sta $12
iny
lda ImageNAMTable,y
sta $13
;Display image
lda #$20
sta $2006
lda #0
sta $2006
tay
DispImgLoop:
lda ($12),y
sta $2007
clc
lda $12
adc #1
sta $12
lda $13
adc #0
sta $13
sec
sbc #$24
bne DispImgLoop
rti
Image0_NAM:
.incbin "nesst/img0/img0.nam"
Image1_NAM:
Image0_PAL:
.incbin "nesst/img0/img0.pal"
Image1_PAL:
ImageNAMTable:
.dw Image0_NAM,Image1_NAM
ImagePALTable:
.dw Image0_PAL,Image1_PAL
;Interrupt Vectors
.org $FFFA
.dw Thr1IO
.dw Thread1
.dw $FFF0
-=[BANK 7]=-
;The World of Tim
.org $8000
;Init Stuff
Start:
sei
cld
ldx #$40
stx $4017
ldx #$FF
txs
inx
stx $2000
stx $2001
stx $4010
bit $2002
VBlank1:
bit $2002
bpl VBlank1
txa
ClearMem:
sta $0000,x
sta $0100,x
sta $0300,x
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
inx
bne ClearMem
lda #$FF
ClearMem2:
sta $0200,x
inx
bne ClearMem2
lda #$00
sta $8000
lsr
sta $8000
lsr
sta $8000
lsr
sta $8000
lsr
sta $8000
VBlank2:
bit $2002
bpl VBlank2
lda #$80
sta $2000
lda #$1E
sta $2001
MainThread:
lda #$0E
sta $E000
lsr
sta $E000
lsr
sta $E000
lsr
sta $E000
lsr
sta $E000
jmp MainThread
;Interrupt Vectors
.org $FFFA
.dw MainThread
.dw Start
.dw $FFF0
-=[BANK 0]=-
;The World of Tim
;By Yoshimaster96
.org $8000
Thread1:
jmp Thread1
Thr1IO:
lda #0
sta $2005
sta $2005
;Get address of palette
lda $10
asl a
tay
lda ImagePALTable,y
sta $12
iny
lda ImagePALTable,y
sta $13
;Load palette
lda #$30
sta $2006
lda #0
sta $2006
tay
LoadPalLoop:
lda ($12),y
sta $2007
clc
lda $12
adc #1
sta $12
lda $13
adc #0
sta $13
lda $12
sec
sbc #$10
bne LoadPalLoop
;Get address of image
lda $10
asl a
tay
lda ImageNAMTable,y
sta $12
iny
lda ImageNAMTable,y
sta $13
;Display image
lda #$20
sta $2006
lda #0
sta $2006
tay
DispImgLoop:
lda ($12),y
sta $2007
clc
lda $12
adc #1
sta $12
lda $13
adc #0
sta $13
sec
sbc #$24
bne DispImgLoop
rti
Image0_NAM:
.incbin "nesst/img0/img0.nam"
Image1_NAM:
Image0_PAL:
.incbin "nesst/img0/img0.pal"
Image1_PAL:
ImageNAMTable:
.dw Image0_NAM,Image1_NAM
ImagePALTable:
.dw Image0_PAL,Image1_PAL
;Interrupt Vectors
.org $FFFA
.dw Thr1IO
.dw Thread1
.dw $FFF0
-=[BANK 7]=-
;The World of Tim
.org $8000
;Init Stuff
Start:
sei
cld
ldx #$40
stx $4017
ldx #$FF
txs
inx
stx $2000
stx $2001
stx $4010
bit $2002
VBlank1:
bit $2002
bpl VBlank1
txa
ClearMem:
sta $0000,x
sta $0100,x
sta $0300,x
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
inx
bne ClearMem
lda #$FF
ClearMem2:
sta $0200,x
inx
bne ClearMem2
lda #$00
sta $8000
lsr
sta $8000
lsr
sta $8000
lsr
sta $8000
lsr
sta $8000
VBlank2:
bit $2002
bpl VBlank2
lda #$80
sta $2000
lda #$1E
sta $2001
MainThread:
lda #$0E
sta $E000
lsr
sta $E000
lsr
sta $E000
lsr
sta $E000
lsr
sta $E000
jmp MainThread
;Interrupt Vectors
.org $FFFA
.dw MainThread
.dw Start
.dw $FFF0