Hey guys. First time poster, 6502 newb.
I wrote out a little program here:
http://pastebin.ca/1758079
What I'm trying to do is load a value from a constant (P2Velocity in this case) and store that value into an address with a label (P1Velocity).
What happens is, if I put the value #$02 into P1Velocity, and then load it into my MoveP1Loop routine, where I add it to the current position with ADC, the sprites just don't draw to the screen, whereas if I use ADC with a literal #$02, it works perfectly. There's a bunch of weirdness like that happening whenever I use those labels I defined at the beginning of the program. Using values like #$01 and #$03 do just fine!
I've seen lots of examples doing things this way and they seem to work. I'm stumped and to newb to get down to the nitty gritty. FCEUX shows that the correct values are being stored in the correct addresses. I'm turning to you pros to help me out.
If you want, I can zip up all of the assets and post them somewhere, too, if you think that'll help you guys troubleshoot. Thanks!
UPDATE:
If I move around the order that I store values into addresses starting on line 93, things will start/stop working (like values other than #$01). Any idea why this is?
-A
I wrote out a little program here:
http://pastebin.ca/1758079
What I'm trying to do is load a value from a constant (P2Velocity in this case) and store that value into an address with a label (P1Velocity).
What happens is, if I put the value #$02 into P1Velocity, and then load it into my MoveP1Loop routine, where I add it to the current position with ADC, the sprites just don't draw to the screen, whereas if I use ADC with a literal #$02, it works perfectly. There's a bunch of weirdness like that happening whenever I use those labels I defined at the beginning of the program. Using values like #$01 and #$03 do just fine!
I've seen lots of examples doing things this way and they seem to work. I'm stumped and to newb to get down to the nitty gritty. FCEUX shows that the correct values are being stored in the correct addresses. I'm turning to you pros to help me out.
If you want, I can zip up all of the assets and post them somewhere, too, if you think that'll help you guys troubleshoot. Thanks!
UPDATE:
If I move around the order that I store values into addresses starting on line 93, things will start/stop working (like values other than #$01). Any idea why this is?
-A