我试图用 6502 汇编语言编写游戏,但我的精灵不想移动:我的精灵是 200 美元,所以我做了以下操作:
Spriteloop:
LDX $200 ;loading content of $200 address in X register
INX ;increment the number
JMP Spriteloop ;loop back to move again
但是,它不起作用,我的精灵不动。
谢谢
您需要将 X 存储回内存寄存器。我认为是 STOX 还是 STX?自从我使用任何 6502 组件以来已经有一段时间了。
Are you using OAMDMA to copy page 2 to VRAM in PPU? If you don't do this the sprites won't move. The system RAM is not connected to PPU so you need to copy it over.
Keep in mind that VRAM updates should be done during VBlank to prevent graphical glitches.