Jump to content
IGNORED

I want to program, I have an idea, help me learn please.


Recommended Posts

So I have decided I want to learn some about programming for the 2600. I have read some, and I asked in the pinned thread for information on the most recent edition of this "book" so that I started in the best place. So if someone can help me out on that I would be thankful for that as well. I have some programming experience so I figure that should help some.

 

Drawing from that experience I decided to set a goal for myself that would be a simple idea and see how hard it would be to make happen. While doing this I would like to learn as much about the basics as possible. So I want to program a test cart of sorts. It will allow me to test the function of all switches and controller inputs for my VCS. If I learn that I can add more I will add more to the project later (paddles and such), but I think this is a good place to start. Learning to do this will teach me how to program for each input on the console and controller and how to change the display based on input. Not to mention I think this would be personally helpful as I hate testing to make sure a console is working right with normal games.

 

I'll attach an image I played with to show the idea and the basic idea of how it may look when I'm done. Clearly the graphics will be different, but the idea is there. The reason I post all this is because I think this would be a great way for new people to learn the basic control inputs and how to program for them in future projects that look more like a real game. If someone with real experience would like to write this and use it as an example that would be cool too, I could check my work against that to see how I did.

 

So any help or advice would be great. I'm really just looking for this "book" there is a pinned thread about in its most up to date and complete form. That seems like a pretty good place to start and I'm certainly willing to put in the work on my end. If the advice is just don't do this I'm ok with that, I just really want to start on the right foot and not learn the wrong things and have to unlearn them off the rip.

 

Thanks for reading that wall of text from someone with no experience at all in doing this. I'm sure you get plunty of people talking big and doing nothing, I would like to avoid that with your help.

post-26868-0-13060800-1347989186_thumb.jpg

Link to comment
Share on other sites

Thanks. I have looked into Batari before. I can see some value to it but I do worry that it is more limited than learning this the old fashioned (if a little harder) way. I'll follow the other link and see what happens. Thanks for the input.

You'll want to download a copy of the Stella Programmer's Guide, too. There are different versions/revisions of it, but the one I use is the version that says "Reconstructed by Charles Sinnett 6/11/93" at the bottom of the title page. It's 57 pages long and it would be a good idea to print out the whole thing and stick it in a loose-leaf binder. Most of it deals with the TIA registers, but it also contains information related to the RIOT (6532) chip-- which it calls the "PIA." The console switches and game controllers are read from some of the RIOT registers as well as some of the TIA registers. The console switches are read from SWCHB. The two joysticks as well as the keypads are read from SWCHA, but first you need to set SWACNT to configure SWCHA for input. The joystick buttons are read from INPT4 and INPT5. The paddles are read from INPT0 through INPT3. And the paddle buttons are read from SWCHA.

 

Console switches:

SWCHB = $0282

Bit 3 indicates the state of the color/b&w TV switch-- if it's 0 the switch is set to b&w, if it's 1 the switch is set to color.

Bit 6 indicates the state of the left difficulty switch-- if it's 0 the switch is set to B, if it's 1 the switch is set to A.

Bit 7 indicates the state of the right difficulty switch-- if it's 0 the switch is set to B, if it's 1 the switch is set to A.

Bit 1 indicates the state of the game select switch-- if it's 0 the switch is pressed down, if it's 1 the switch is up.

Bit 0 indicates the state of the game reset switch-- if it's 0 the switch is pressed down, if it's 1 the switch is up.

 

Joysticks:

SWCHA = $0280

Write 0 to SWACNT ($0281) to configure all 8 bits of SWCHA for input.

Bit 6 indicates whether the left joystick is pushed left-- if it's 0 the stick is pushed left, if it's 1 the stick is not pushed left.

Bit 7 indicates whether the left joystick is pushed right-- if it's 0 the stick is pushed right, if it's 1 the stick is not pushed right.

Bit 4 indicates whether the left joystick is pushed up-- if it's 0 the stick is pushed up, if it's 1 the stick is not pushed up.

Bit 5 indicates whether the left joystick is pushed down-- if it's 0 the stick is pushed down, if it's 1 the stick is not pushed down.

Bit 2 is like bit 6, but indicates whether the right joystick is pushed left.

Bit 3 is like bit 7, but indicates whether the right joystick is pushed right.

Bit 0 is like bit 4, but indicates whether the right joystick is pushed up.

Bit 1 is like bit 5, but indicates whether the right joystick is pushed down.

 

Left joystick button:

INPT4 = $0C

Bit 7 indicates whether the left joystick button is pressed-- if it's 0 the button is pressed, if it's 1 the button is not pressed.

 

Right joystick button:

INPT5 = $0D

Bit 7 indicates whether the right joystick button is pressed-- if it's 0 the button is pressed, if it's 1 the button is not pressed.

Link to comment
Share on other sites

Ok, so I read the first 4 sections in the book and I have to say I understand it better than I had expected I would off the rip. That said I know I have to read that again and that my head is a bit numb. This is some deep crap.

If you're referring to the Stella Programmer's Guide, I recommend giving it a light first read without trying to get too deeply into it. Then keep it by your side whenever you're going to do any programming for the 2600, so you can look up anything you run into that you need more information about. The reason for the light first read is so you'll at least have some rough idea of what's in the document, so it will be easier to find the information you need when you need it.

Link to comment
Share on other sites

I was refering to Atari 2600 Programming for Newbies. I keep forgetting the name of the book so I was being too vague. I read all about how TVs and scanlines and all that work. I got a bit lost when we went from talking about NTSC being 525 scanlines deep to NTSC being 262.5 lines deep. Interlacing has lost me a bit here. I'm going to read this again today while I should be working.

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