Jump to content
IGNORED

I'm officially looking to become a programmer.


pojr

Recommended Posts

I've been pondering what console I wanted to begin programming games for, and after reading the FAQs on AtariAge, I decided the extremely unappreciated Atari 2600. But however, I need baby steps on where to start. I was looking through the tutorials, but I can't seem to understand either one. They go too fast, and they assume that I already know basic programming. I've been programming in PHP, but that's apples and oranges. PHP and video game programming are apparently nothing alike.

 

I have trouble understanding simple things like why Assemblers are necessary, why there are so many different files for one simple game, and other aspects that might be simple to you guys. I read the first few parts of Andrew Davie's tutorial, and I fell apart by the time I made it to the actual programming part. I can't explain in detail exactly what I don't understand because I don't understand any of it. However, here's what I DO understand:

 

 

  • There can only be two 8-bit objects on the screen at once, which I guess means sprites that use smaller pixels.
  • There are missels (not sure what they are), players (not sure what these are either), sprites, a ball (I guess the ball from pong), and a playfield (the background). I know the Genesis has two playfields which are used for parallax scrolling, however the Atari and most early consoles only have one.
  • The playfield pixels are horizontal lines, so they're shaped funny.
  • Sprites can be duplicated, the copied sprite doesn't contribute to flickering. You can also pick how far to the right the copied sprite is from the real sprite.
  • There's only 4K of memory (unless you stash more in the cartridge).
  • I could be wrong about this, but the Atari 2600 can scroll up and down, but not left and right (unless you resort to certain methods like stop motion).
  • The 2600 plays like a pong console with paddles, a ball and a playfield that keeps score. All the games manipulate the 2600 in clever ways to allow several fun and exciting games.

 

I got most of this information from here:

 

http://www.atariage.com/forums/topic/178563-why-cant-the-atari-2600-display-better-graphics/

 

What I'm asking is where to start. How do I make this possible? I'm the worst learner on the planet, but as soon as I understand the basics, I should be able to learn fast. Sorry if I sound bland.

Link to comment
Share on other sites

How I started:

 

  1. Download Stella, an atari 2600 emulator: http://stella.sourceforge.net/
  2. Download and install DASM, http://www.atari2600.org/DASM. Some files you just have to put in a directory, like C:\atari2600
  3. Download the asm file 'How to draw a playfield' from http://www.io.com/~nickb/atari/docs.html. The file is: http://www.io.com/~nickb/atari/doc/nbtia_1.asm
  4. Try to let DASM to compile the asm file, with a commandline like: c:\atari\dasm\dasm-2.20.11\bin\dasm.exe c:\atari\nbtia_1.asm -f3 -oc:\atari\onbtia_1.bin
  5. Start the bin with Stella.
  6. Now start poking around in the asm file, recompile it, see what happens and takeover the world!

 

Some other things I used:

- Stella programmers guide: http://www.atarihq.com/danb/files/stella.pdf

- 6502 emulator to teach myself 6502 in a convinient way: http://home.pacbell.net/michal_k/6502.html

- A good list of the 6502 opcodes: http://www.obelisk.demon.co.uk/6502/reference.html

- Ask questions on AtariAge©

Edited by roland p
Link to comment
Share on other sites

I don't have the time for a complete explanation now (sorry), but first you have to understand which objects form a 2600 display. For each scanline you have:

- two 8 bit sprites (also called players)

- two 1 bit missiles

- one 1 bit ball

- a 20 bit playfield (divided into three registers), repeated once/scanline

 

Each bit represents a width of 1 pixel (but the width can be doubled or quadrupled) of the 160 pixel horizontal resolution. Except for the playfield, there each pixel has a fixed width of 4 pixel.

 

All objects, except for the playfield, can be horizontally positioned at will. For the playfield registers there are only two, fixed position combinations (often called asymmetrical and symmetrical or reflected).

 

Sprites and missiles can be displayed repeated (2 or 3 times), with 3 possible distances (8, 24, 56 pixel).

 

This describes what you can do in one single scanline (there are a few more things like e.g. colors). Theoretically you could update each object's parameters for each scanline, but since the CPU time is very limited, you carefully have to decide what you can do.

 

Hope that helps a bit.

Link to comment
Share on other sites

is windows vista going to cause a problem for Stella and/or DASM? if so i won't be able to use my laptop (my desktop has XP and i will never replace that OS).

 

reason i'm asking is because i'm at work so i can't do anything yet; firewalls.

 

edit: okay, i see Stella is compatible.

Edited by bomberpunk
Link to comment
Share on other sites

If you want to know more about the differences between Basic and Assembly language, a good source can be beginner assembly programming books. Some can be found on

 

http://www.atariarchives.org

 

They are written for Atari home computers, but the basic concepts also apply for the VCS 2600. For example, the three introductory chapters in http://www.atariarchives.org/alp/ can help to get a better understanding how a computer system with a 6502 type CPU is programmed in general.

Link to comment
Share on other sites

I hope this isn't a dumb question, but which specific version of DASM do I download? I have a 64-bit Windows 7, but it seems like this program is only for Mac platforms. I'm guessing there's something I'm missing.

 

Get the win32 zip from here: http://sourceforge.net/projects/dasm-dillon/files/dasm-dillon/2.20.11/

 

Chris

  • Like 1
Link to comment
Share on other sites

What I'm asking is where to start. How do I make this possible? I'm the worst learner on the planet, but as soon as I understand the basics, I should be able to learn fast. Sorry if I sound bland.

I don't want to discourage you, but assembly language is hard, even for professional software developers. That's why almost nobody still uses it anymore... we have better, much easier tools at our disposal nowadays for most all programming tasks. But allow me to elaborate further:

 

When you're programming in assembly language, you're basically one step away from the 1s and 0s that the CPU actually uses and understands. The assembler is the program that takes your assembly language text file and converts it directly into the 1s and 0s. If you've used PHP, you're probably familiar with *some* of the principles you'd still see in assembly language, like variables, conditional statements... stuff like that. But you're still pretty far removed from the details, and there's a lot of things you will run into that are going to be new: like binary number representation, binary math, bitwise operations, addressing modes. That's all stuff that you don't normally worry about in most high level programming languages like PHP, because the compiler or interpreter abstracts it all from you. And there's a reason for that: most of this stuff is a pain in the ass to deal with manually. :)

 

It's kind of like the difference between driving a car and working on a car. Most people can drive a car without understanding all the details of how exactly the car works. That's like high level programming. Assembly language programming is more like working on the car, because you have to know how everything under the hood works.

 

So I guess what I'm saying is, if you really want to program for the Atari 2600 and avoid the hassle of dealing with the frustration, you *could* try writing something in Batari Basic, which is the one high-level language available specifically for writing Atari 2600 games. Sure, you won't have as much flexibility in terms of capabilities, but it's going to be much easier and probably more enjoyable for you.

 

Anyway just my $0.02. :) Feel free to ask any other more specific programming related questions you might have though...

Edited by Ben_Larson
Link to comment
Share on other sites

I second this. Batari Basic gets the rough stuff done for you, where you can then focus on your program and getting stuff done at a fairly high, and IMHO, easy level.

 

From there, you can start to dig into assembly language by including bits of it in your Batari Basic program as needed, eventually graduating to your own assembly language program.

 

The reason assemblers are needed is the CPU speaks only simple numbers, and those are really hard for people, so we map those to short mnemonics that we can remember, with the assembler mapping those to the numbers the CPU needs.

 

At a low level, computers really only add numbers together, move them around, and operate on them logically. Everything happens with those operations, and they happen really fast. If you were to speed yourself up, by many times, you would be able to see the TV beam draw the screen. That's where the VCS is, and your program stays just ahead of that beam, getting stuff done in real time to draw the screen.

 

Fun stuff!

 

Batari basic allows you to live in the slow, human view, treating things like objects and handle them with simple numbers. This is good for beginning. At the assembly view, you deal with the detail, the numbers, loops, cycles, and timing of things in relation to that beam.

Link to comment
Share on other sites

It's a good thing.

 

You've got a few tasks to get done.

 

One is to understand the hardware and how and why it works as it does. Another is programming in general. Easy environments help with that, and many of us started out in some BASIC or other, moving to bigger and better things as we outgrew BASIC. Finally, you've got games in general to understand. In many ways, I personally find that as hard as assembly is!

 

It's entirely possible to go hard core, and just do all at once, but probably easier and more productive to "peel back the onion" a layer at a time.

Link to comment
Share on other sites

Hmm, yeah I think I know what you mean. No point in getting frustrated over something when you can make your work easier with the same end result.

 

Just wondering, about the homebrew Atari games that exist right now, those were all made using Assembly?

Link to comment
Share on other sites

Many of them were. The best ones, IMHO, were assembly. However, some good games have been done with Batari Basic.

 

I'm not a pro at all. Game programming is work to me, as is programming in general, because I do it for a hobby, and not all the time.

 

With assembly, progress on the VCS was very slow, and I more or less chose to follow other efforts. When the first working Batari Basic was released, I knocked out a simple, working game, in hours, and spent some time on a pretty good one over the course of weeks. On that second effort, I had begun to incorporate assembly, "in line", with good results. Had that continued, I would have been making my own kernel, rapidly leaving that environment, as several have done.

 

Don't let me get in the way though. There are tutorials here on assembly, and it's possible to make sense of them, and some have with good results.

 

Suppose a lot of that depends on your expectations and your ability to time commit. Maybe progress isn't so important, or can be viewed on a smaller scale, little steps, and that's a good, motivating thing. Or, you are smart as hell, and will take some big jumps! Who knows?

 

My post was operating under the assumption that you've not done much programming, and might be result oriented, seeing some stuff go, to keep the momentum, and or learn the concepts in a fairly easy to realize way.

 

Anything can happen with this stuff, and there are good assembly programmers here. Damn good ones actually.

Link to comment
Share on other sites

Man, I don't know what I want to do now. Using Batari Basic would be like using Dreamweaver instead of learning HTML. Tough decision. I feel like I would be taking the lazy way out. :x

Not marrying a supermodel and settling for an overweight harpy with a yeast infection is taking the lazy way out too, but a lot of non-rich men can't get a supermodel no matter how hard they try. Do they reach for perfection their whole lives, then die a virgin or do they get realistic and accept that supermodels will always be out of their league?

 

If a guy has learning disabilities, ADD, and is bad at math, it's not lazy if he uses batari Basic. If a guy always wanted to make Atari 2600 games, but has a wife and a bunch of screaming kids that demand almost every second of his time when he's not sleeping or working, it's not lazy if he uses batari Basic. If a teenager has school, a job, and girls to chase, it's not lazy if he uses batari Basic. And the list goes on.

 

It's hard to make a fun game that anyone would want to play, whether you use assembly language or batari Basic. There's a lot of crap out there made with assembly language, so using assembly language doesn't mean your game will be any good. The time and energy you save by using batari Basic can be used on trying to make your game more fun. You can think of batari Basic as the lazy way out, but you still have to come up with the most unique concept that you can, write the program and create your sprite animations and sound effects. There's a lot of work to do if you want to create a polished game that hasn't already been done to death. The tool you use doesn't really matter. What matters is that your game must be fun. And it also wouldn't hurt if it's fun while being fairly unique instead of just being another clone or port.

 

 

Related link:

 

www.randomterrain.com/game-design.html

  • Like 4
Link to comment
Share on other sites

If you choose to go full assembly, my recommendation is to make milestones for yourself before committing to a full game.

That will ease with burnout.

 

I recommend:

- compile a stable screen, and be able to change the background color

- put blocky "text" in a screen.

- draw a single player object

- learn to move the player object

- add a second player object, tie to joystick 2

- make the background color change when they collide.

 

After that, you can look into programming up a game in assembly, as you'll have some of the basic skills down already.

Don't just jump in with an idea to make Pitfall 3 right out of the gate. Start small. :)

 

-John

Link to comment
Share on other sites

I personally don't understand 6502 assembly nearly at all. I did some 6510 playing around in monitor on my C64 in 90s but... I know for sure that programming Atari 2600 is really about "racing the beam" and the question is, who really has time to learn all that today when all that technology including CRT is off mainstream, when you could invest the time and effort into something that generates profit... speaking about those who are not in the waggon already. Of course there are exceptions, people who are so intelligent that they can absorb all this in a matter of weeks. So probably, a job for them.

Edited by maiki
Link to comment
Share on other sites

who really has time to learn all that today when all that technology including CRT is off mainstream, when you could invest the time and effort into something that generates profit...

 

It's called having fun ;). Homebrew programmers write games on old platforms because its interesting to see what the machines can do. Sometimes its quite a challenge to get your game idea into a workable form given the limitations of your target machine. Plus you get the glory of putting your game out on cart for yourself and for others to play and collect.

  • Like 1
Link to comment
Share on other sites

It's called having fun ;). Homebrew programmers write games on old platforms because its interesting to see what the machines can do. Sometimes its quite a challenge to get your game idea into a workable form given the limitations of your target machine. Plus you get the glory of putting your game out on cart for yourself and for others to play and collect.

And adding to that, one person can create a whole game, unlike modern consoles that need an army of programmers and artists of all types.

 

With the Atari 2600, you don't have to record any music, sound effects, or voice actors. All the music and sound effects you need are lying dormant inside of the Atari 2600, waiting for you to tickle them into existence.

 

And for people who program for fun, various AtariAge members have created and still are creating new kernels, minikernels, modules and enhancements to make batari Basic even more fun to use. And people with Windows PCs can use Visual batari Basic which has all kinds of features and tools to help make make the whole game making experience faster, easier and more fun.

 

When you get to the stage where your batari Basic game is fun enough and polished enough to deserve its own cartridge and box, if you sell less than 50, it's no big deal because a lot of people will still end up playing your game thanks to emulators and the Harmony cartridge. You'll have fun and bring a little extra joy into people's lives.

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