IvanDSM wrote:
I'm learning 6502 asm, and i'm creating a small project called Тетрис (or Tetris if you prefer)
I have plenty to say about this, but I'll hold back for now so that I can help you with your code. I just feel like getting one thing off my chest: Do you know what "
lock delay" and "
hard drop" are?
Quote:
and this time i got the code for the title screen showing up, but it only gives me a CPU jam! Upon compiling and running on FCEUX, $0000 is BRK!
$0000-$07FF is RAM, and it doesn't have a value until you put one there.
Quote:
The code is long, so i uploaded it to MediaFire:
http://www.mediafire.com/?8b4gy1a4rgzbf4f
First let's get some power-up state compatibility problems out of the way:
Code:
lda #%10000000
sta PPU_CTRL
jsr waitVBlank
waitVBlank is the "spin on PPU_STATUS" subroutine. Why are you turning on NMIs (the write to PPU_CTRL) before you spin on PPU_STATUS? You really shouldn't be writing anything after you've spun on PPU_STATUS twice. And before clearVRAM, you need one more JSR waitVBlank and then you can turn on NMIs in PPU_CTRL.
Why do you have palette code right in the middle of your code? Either JMP past it or move it out of the way of code.
It's best not to enable the display (write to PPU_MASK) until after the entire nametable has been written to VRAM. If you try to write to VRAM while the PPU is rendering, you'll just cause a load of glitches.