Hii, i am new by the forum; and like 2 days old on the EFnet IRC #nesdev channel, so yea; i literally started into assembly 6502 two days ago from the very scratch; i were pointed into the NintendoAge's Nerdy Nights tutorial, and so far i am loving it!... i managed to do a nice nametable and attribute arrangement to get a fully working background using Super Mario Bros. .CHR, all of this for learning purposes, thing is; that i got recommended to simplify the controller reading engine, and also to use variables for the sprite X and Y Position; i got a nice help from darrylrev all the way BUT now i do not know what to even do
The vblanktimers variables on my code seems to loop forever, like; they wait for vblank but that never happens for some reason that i can not spot yet so i can not move any sprite anywhere since pushing buttons on the joystick seems to do anything at all.
Here is my code, any pointer is greatly appreciated:
http://pastebin.com/aquYg1pK
EDIT: i am using NESASM and FCEUXD SP 1.07 that were provided by the NintendoAge's Nerdy Nights tutorial so far if that helps on anything.
EDIT2: as suggested by jero32 on the EFnet #nesdev IRC's channel; i am adjunting the rom itself here, also; i discovered that if i wait long enough, my code does go through the both vblanktimers BUT the code is somewhere forwarded here, and pretty much freezing the game:
$E008:22 UNDEFINED
also, as far as the FCEUXD SP 1.07's debugger tells me; the PPU keeps generating scanlines, so i can say the game keeps running code.
EDIT3: thanks to rainwarrior i got everything working as it should be. it turned out to be that i did not indented the RMI below the NMI part of the code at line 282. so this;
should have been this, in order to make the whole code to work:
so everything i wanted is solved now. also; i deleted the rom i adjunted in this post before because, as rainwarrior pointed out; it contains the nes's super mario bros. CHR, and in order to avoid copyright inconvenients in this forum, i opted to wipe it.
The vblanktimers variables on my code seems to loop forever, like; they wait for vblank but that never happens for some reason that i can not spot yet so i can not move any sprite anywhere since pushing buttons on the joystick seems to do anything at all.
Here is my code, any pointer is greatly appreciated:
http://pastebin.com/aquYg1pK
EDIT: i am using NESASM and FCEUXD SP 1.07 that were provided by the NintendoAge's Nerdy Nights tutorial so far if that helps on anything.
EDIT2: as suggested by jero32 on the EFnet #nesdev IRC's channel; i am adjunting the rom itself here, also; i discovered that if i wait long enough, my code does go through the both vblanktimers BUT the code is somewhere forwarded here, and pretty much freezing the game:
$E008:22 UNDEFINED
also, as far as the FCEUXD SP 1.07's debugger tells me; the PPU keeps generating scanlines, so i can say the game keeps running code.
EDIT3: thanks to rainwarrior i got everything working as it should be. it turned out to be that i did not indented the RMI below the NMI part of the code at line 282. so this;
Code:
RTI ;** <--- you forgot to return from interrupt after your NMI is called
should have been this, in order to make the whole code to work:
Code:
RTI ;** <--- you forgot to return from interrupt after your NMI is called
so everything i wanted is solved now. also; i deleted the rom i adjunted in this post before because, as rainwarrior pointed out; it contains the nes's super mario bros. CHR, and in order to avoid copyright inconvenients in this forum, i opted to wipe it.