The code I have is as follows (the .org is just so I can find the subroutine in the fceuxd's debugger):
Code: Select all
;*TODO: Implement a working version of this subroutine
.org $c500
switch_tile:
lda nametableaddr_low
clc
adc tileswitch_low
sta tileswitch_low
lda nametableaddr_high
adc tileswitch_high
sta tileswitch_high
lda newtile
ldy #$2
sta (tileswitch_low),y
rtsCode: Select all
sta (tileswitch_low),yWhy is this so? Is is because I am trying to change a value in ROM? If so, how can I go about changing a nametable's tile?
Thanks for any and all help!