HI, im struggeling with a problem with my decoder. I just want to shrink my background data by using 2x2 tiles and my setup is like this:
and my decoder where the problem is looks like this:
as you can see there are no loops cos i just want it to show the first tile. and then work from there. now it shows random tiles after every small change i do. whats wrong?
Code:
Ground:
.db $32, $33, $42, $43
Wall:
.db $30, $31, $40, $41
Ice:
.db $34, $35, $44, $45
Black:
.db $24, $24, $24, $24
Cave:
.word Ground, Wall, Ice, Black
FirstScreen:
.db $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03
.db $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03
.db $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $02,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01
.db $32, $33, $42, $43
Wall:
.db $30, $31, $40, $41
Ice:
.db $34, $35, $44, $45
Black:
.db $24, $24, $24, $24
Cave:
.word Ground, Wall, Ice, Black
FirstScreen:
.db $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03
.db $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03, $03,$03,$03,$03
.db $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $02,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $00,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$02, $02,$00,$00,$01
.db $01,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$00, $00,$00,$00,$01
.db $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01, $01,$01,$01,$01
and my decoder where the problem is looks like this:
Code:
LDX #$00
LDA FirstScreen, x
TAX
LDA Cave, x
STA meta_tile_ptr
LDA meta_tile_ptr
STA $2007
LDA FirstScreen, x
TAX
LDA Cave, x
STA meta_tile_ptr
LDA meta_tile_ptr
STA $2007
as you can see there are no loops cos i just want it to show the first tile. and then work from there. now it shows random tiles after every small change i do. whats wrong?