Code: Select all

```
lda #low(metaworlddata)
sta world+0
lda #high(metaworlddata)
sta world+1
ldy #$00
decode:
ldx (world),y
lda topleft,x
sta $2007
lda topright,x
sta $2007
iny
sty nametableplaceholder
tya
and #$0F
bne decode
lda nametableplaceholder; this should be at bottom but doesnt work
cmp #$F0
beq donewithnametable
sec;this needs to be infront do not move
sbc #$10
tay
secondrow:
ldx (world),y
lda bottomleft,x
sta $2007
lda bottomright,x
sta $2007
iny
cpy nametableplaceholder
bne secondrow
jmp decode
jmp atributetableset
donewithnametable:
sec;this needs to be infront do not move
sbc #$10
tay
finalloop: ;ok so some jank meant that checling for f0 at end of first row would glitch everything out so had to add this
ldx [world],y
lda bottomleft,x
sta $2007
lda bottomright,x
sta $2007
iny
cpy nametableplaceholder
bne finalloop
ldx #$00
ldy #$00
```