Jump to content



0

My first kernal


4 replies to this topic

#1 Steril707 OFFLINE  

Steril707

    Chopper Commander

  • 170 posts
  • Location:München

Posted Fri Mar 16, 2007 3:31 PM

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..

Attached Files



#2 vdub_bobby OFFLINE  

vdub_bobby

    Quadrunner

  • 5,831 posts
  • Boom bam.
  • Location:Seattle, WA

Posted Fri Mar 16, 2007 3:43 PM

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 by vdub_bobby, Fri Mar 16, 2007 3:56 PM.


#3 Steril707 OFFLINE  

Steril707

    Chopper Commander

  • 170 posts
  • Location:München

Posted Fri Mar 16, 2007 6:25 PM

View Postvdub_bobby, on Fri Mar 16, 2007 10:43 PM, said:

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... :x

(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 by Steril707, Fri Mar 16, 2007 6:27 PM.


#4 Mord OFFLINE  

Mord

    Stargunner

  • 1,407 posts
  • Location:Canada

Posted Sun Apr 8, 2007 4:39 PM

View PostSteril707, on Fri Mar 16, 2007 7:25 PM, said:

View Postvdub_bobby, on Fri Mar 16, 2007 10:43 PM, said:

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... :x

(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 by Mord, Sun Apr 8, 2007 4:48 PM.


#5 Steril707 OFFLINE  

Steril707

    Chopper Commander

  • 170 posts
  • Location:München

Posted Fri Aug 10, 2007 8:38 AM

View PostMord, on Mon Apr 9, 2007 12:39 AM, said:

View PostSteril707, on Fri Mar 16, 2007 7:25 PM, said:

View Postvdub_bobby, on Fri Mar 16, 2007 10:43 PM, said:

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... :x

(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 !!! :)


:thumbsup:
You were right...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users