Steril707 Posted March 16, 2007 Share Posted March 16, 2007 I have been experimenting around with 2600 programming a little bit, and i have to say there is really a lot of weird stuff going on...But on the other side it's a lot of fun to get this machine to do those little things. Maybe someone can help me with my code, i am so far satisfied with my results, but i really don't have any idea why my Player graphic is always going downwards. Well, i know off course that my joystickroutine tells it to do that, but why is the "down"-bit set in there? I cannot see any reason for that anywhere in my code... Thanks for your help.. my_first_kernal.zip Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted March 16, 2007 Share Posted March 16, 2007 (edited) Without looking at your code at all, have you double-checked to make sure that you aren't testing the joystick bits backwards? EDIT: I ran the binary and it looks fine to me; the player graphic moves correctly. I also checked your joystick code and it looks fine, so...what's the problem? Edited March 16, 2007 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
Steril707 Posted March 17, 2007 Author Share Posted March 17, 2007 (edited) Without looking at your code at all, have you double-checked to make sure that you aren't testing the joystick bits backwards? EDIT: I ran the binary and it looks fine to me; the player graphic moves correctly. I also checked your joystick code and it looks fine, so...what's the problem? damn, that was the right code coupled with the wrong bin... (small edit: if you assemble the "redline.asm" you will notice what i mean, anyway, tomorrow i will post the bin file that i mean, sorry for the inconvenience..) Edited March 17, 2007 by Steril707 Quote Link to comment Share on other sites More sharing options...
Mord Posted April 8, 2007 Share Posted April 8, 2007 (edited) Without looking at your code at all, have you double-checked to make sure that you aren't testing the joystick bits backwards? EDIT: I ran the binary and it looks fine to me; the player graphic moves correctly. I also checked your joystick code and it looks fine, so...what's the problem? damn, that was the right code coupled with the wrong bin... (small edit: if you assemble the "redline.asm" you will notice what i mean, anyway, tomorrow i will post the bin file that i mean, sorry for the inconvenience..) By compiling redline.asm, I presume you meant to say that the player refused to move down. Certainly the code looks correct, but the most baffling errors (As I've found out while I toil away on Action RPG) is the simplest oversight. SkipMoveDown lda %00100000 bit SWCHA bne SkipMoveUp dec YPosFromBot You forgot the # in front of the %00100000. As such instead of loading an immediate value into the accumulator you're loading the contents of memory location %00100000 into the accumulator - which could be anything. When you then do a bit test on SWCHA on those contents it's interpreting it as down never being pressed. -- Mord Editted because my eglish sux. *nod self* Edited April 8, 2007 by Mord Quote Link to comment Share on other sites More sharing options...
Steril707 Posted August 10, 2007 Author Share Posted August 10, 2007 Without looking at your code at all, have you double-checked to make sure that you aren't testing the joystick bits backwards? EDIT: I ran the binary and it looks fine to me; the player graphic moves correctly. I also checked your joystick code and it looks fine, so...what's the problem? damn, that was the right code coupled with the wrong bin... (small edit: if you assemble the "redline.asm" you will notice what i mean, anyway, tomorrow i will post the bin file that i mean, sorry for the inconvenience..) By compiling redline.asm, I presume you meant to say that the player refused to move down. Certainly the code looks correct, but the most baffling errors (As I've found out while I toil away on Action RPG) is the simplest oversight. SkipMoveDown lda 100000 bit SWCHA bne SkipMoveUp dec YPosFromBot You forgot the # in front of the 100000. As such instead of loading an immediate value into the accumulator you're loading the contents of memory location 100000 into the accumulator - which could be anything. When you then do a bit test on SWCHA on those contents it's interpreting it as down never being pressed. -- Mord Editted because my eglish sux. *nod self* Sorry for the late reply, BUT: THANKS ALOT !!! You were right... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.