Jump to content
IGNORED

My first kernal


Steril707

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 4 weeks later...

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
Link to comment
Share on other sites

  • 4 months later...

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...