Sheepz #1 Posted February 23, 2009 What programs/tools do I need so I can start programming for the 2600 and make some homebrew? I do not have an Atari 2600 yet but I was wondering how I could start to learn the programming language for it. Any help is greatly apperciated. Thanks! Quote Share this post Link to post Share on other sites
+atari2600land #2 Posted February 23, 2009 Batari Basic is a great start for making 2600 games. You only need to know a little BASIC, as well as learn some 2600-only terms, etc. Quote Share this post Link to post Share on other sites
Sheepz #3 Posted February 23, 2009 Thanks for pointing me in the right direction! How do you get the blank cartridges and put the code on them for use in the Atari 2600 thou? Quote Share this post Link to post Share on other sites
Wickeycolumbus #4 Posted February 23, 2009 If you choose to go the assembly route, DASM is the assembler widely used by 2600 programmers. Also, you will NEED and emulator (even if you decide to go with bB). z26 and Stella are both great. You dont really need a 2600 for testing, it takes too long that way, and it is very expensive (EPROM programmers are in $200 range). 2600 Programming for newbies is a great tutorial written by Andrew Davie that is great for beginners that want to learn assembly. Also check out Machine Language for Beginners by Richard Mansfield. Quote Share this post Link to post Share on other sites
accousticguitar #5 Posted February 23, 2009 You dont really need a 2600 for testing I would disagree with that. More than once I have had games behave differently on emulators than on the 2600. Quote Share this post Link to post Share on other sites
Wickeycolumbus #6 Posted February 23, 2009 You dont really need a 2600 for testing I would disagree with that. More than once I have had games behave differently on emulators than on the 2600. This is very true, there was a horrible bug in Vong that could only be detected with real hardware. But, it may be wise to get the hang of programming first, and then buying expensive equipment that will allow you to test on real hardware. Quote Share this post Link to post Share on other sites
+atari2600land #7 Posted February 23, 2009 Yes, I forgot about the importance of emulators. I choose Stella because it's easier to use IMO, and it runs on Windows without having to take up all of the screen (so I can look at my code without having to shut down the emulator and then start it back up.) also, it has a nifty debugger. If you ever make an actual homebrew, just call on either Al on AtariAge, or neotokeo2001 to publish it for you. Quote Share this post Link to post Share on other sites
Sheepz #8 Posted February 23, 2009 Oh so I can give AtariAge my source code and they will put it into a cartridge for me? Well that sure makes things a whole lot easier. I should be able to get an Atari 2600 in 2 weeks or so. I have $20 right now and I am going to sell some stuff on eBay so I should have about $50 after that which should be all I need. Quote Share this post Link to post Share on other sites
Devin #9 Posted February 23, 2009 Batari Basic would be a great start. It depends how hard-core a computer programmer you are. There are some definitely "gotchas" for the 2600 which might not be caught by an emulator. For instance, clearing the horizontal movement during horizontal blank can cause some weird side-effects. These are not caught by emulators - at least the ones I was using when it got me! Quote Share this post Link to post Share on other sites
Wickeycolumbus #10 Posted February 23, 2009 There are some definitely "gotchas" for the 2600 which might not be caught by an emulator. For instance, clearing the horizontal movement during horizontal blank can cause some weird side-effects. These are not caught by emulators - at least the ones I was using when it got me! Thats what got me too Quote Share this post Link to post Share on other sites
Devin #11 Posted February 23, 2009 (edited) Oh so I can give AtariAge my source code and they will put it into a cartridge for me? Well that sure makes things a whole lot easier. I should be able to get an Atari 2600 in 2 weeks or so. I have $20 right now and I am going to sell some stuff on eBay so I should have about $50 after that which should be all I need. You can give them the binary - which is created by either Batari Basic or an assembler. Batari Basic should be free of the side effects. Assembly gives you some freedom you don't have in a high-level language like Batari. It depends on the game you are writing and if you enjoy programming assembly. Of course, writing assembly is much more difficult. There have been some great games written in Batari and assembly. Edited February 23, 2009 by Devin Quote Share this post Link to post Share on other sites
Sheepz #12 Posted February 23, 2009 (edited) I think I will start with assembly and go full steam ahead! If it proves too daunting, then I will give Batari a try. I'm happy to know I do not need an Atari 2600 to start. Edited February 23, 2009 by Sheepz Quote Share this post Link to post Share on other sites
Devin #13 Posted February 23, 2009 Thats what got me too That side-effect should be considered a "coming of age" event for all 2600 programmers! Quote Share this post Link to post Share on other sites
Wickeycolumbus #14 Posted February 23, 2009 Thats what got me too That side-effect should be considered a "coming of age" event for all 2600 programmers! LOL. is there any way to emulate that Quote Share this post Link to post Share on other sites
Sheepz #15 Posted February 23, 2009 Thanks for all the help guys! You are quite the characters . Let's hope I stick around for a few years. Who knows Atari might come out with a new console . Quote Share this post Link to post Share on other sites
Devin #16 Posted February 23, 2009 I think I will start with assembly and go full steam ahead! If it proves too daunting, then I will give Batari a try. I'm happy to know I do not need an Atari 2600 to start. The most difficult aspect of Atari 2600 programming is horizontal positioning. Here is some excellent assembly code that I found on these boards eons ago. This code is a life-safer! I don't remember the author's name. This subroutine will position any of the graphical objects on the screen in the specified column. ;--------------------------------------------------------------- ; Subroutine: PosSprite ; ; In : a = position. ; x = sprite (0 = player 0, 1 = player 1, ; 2 = missile 0, 3 = missile 1, 4 = ball) ; ; Out : None ; ; Destroyed: A ;--------------------------------------------------------------- PosSprite STA HMCLR SEC STA WSYNC ; begin line 1 PosSpriteLoop SBC #15 BCS PosSpriteLoop ;+4/5 4/ 9.../54 EOR #7 ;+2 6/11.../56 ASL ASL ASL ASL ;+8 14/19.../64 STA.wx HMP0,X ;+5 19/24.../69 STA RESP0,X ;+4 23/28/33/38/43/48/53/58/63/68/73 STA WSYNC ;+3 0 begin line 2 STA HMOVE ;+3 RTS ;+6 9 Quote Share this post Link to post Share on other sites
Sheepz #17 Posted February 23, 2009 Are you trying to damage my mind Devin? LOL that looks complex! Let's hope some day it will all make sense . Quote Share this post Link to post Share on other sites
Wickeycolumbus #18 Posted February 23, 2009 Are you trying to damage my mind Devin? LOL that looks complex! Let's hope some day it will all make sense . Since you decided to go the assembly route, you must read machine language for beginners (see my above post). It will teach you everything you need to know about the 6502. Quote Share this post Link to post Share on other sites
Devin #19 Posted February 23, 2009 (edited) Are you trying to damage my mind Devin? LOL that looks complex! Let's hope some day it will all make sense . That code is complex. It is uber-elite programming! I wish I could take credit, but I can't. Atari 2600 graphic objects don't have a x position value. Instead, each objects x position is set by hitting the reset strobe when the T.V. laser is at a particular position. Needless to say, counting the clock cycles to get to a particular x position is difficult. When you have a sprite that is moving left and right, the programming can be quite overwhelming. That code really, really, really saves a ton of work - and sanity! Edited February 23, 2009 by Devin Quote Share this post Link to post Share on other sites
Sheepz #20 Posted February 23, 2009 LOL I'm so use to high level programming languages! That is kiddy stuff compared to this! Well they never said it would be easy. Quote Share this post Link to post Share on other sites
Snider-man #21 Posted February 23, 2009 Are you trying to damage my mind Devin? LOL that looks complex! Then you'll want to start with Batari Basic since assembly is gonna be WAY out of your ability until you do some reading/research. Quote Share this post Link to post Share on other sites
Ian Primus #22 Posted February 23, 2009 (edited) LOL I'm so use to high level programming languages! That is kiddy stuff compared to this! Well they never said it would be easy. Nobody said it would be easy. You do realize that the Atari 2600 is probably the single most difficult computer/game platform to code for, right? Assembly language is pretty much mandatory for more than simple games, and everything must be super optimized. The 2600 has only 128 bytes of RAM, and can only address 4k of ROM without bankswitching tricks. Yes, that's right - the Atari has one eighth of a kilobyte of RAM. And your assembled code needs to be able to fit in 4k. Sure, you can bankswitch - swap one 4k bank for another - but that means that anything that was in your first 4k is now banked out, and you can't read from it again without swapping banks again. The Atari has no frame buffer. You must draw everything one scanline at a time - and keep the timing with the TV set, ensuring that every frame you draw has the proper number of lines. Most calculations have to be done in between drawing lines on the screen. I'm not saying not to go for it - I have dabbled a bit in 2600 programming myself. It's just not easy, and you have to be prepared to take small steps. Good luck with your adventures - we'll try to help you the best we can! -Ian Edited February 23, 2009 by Ian Primus Quote Share this post Link to post Share on other sites
roland p #23 Posted February 23, 2009 LOL I'm so use to high level programming languages! That is kiddy stuff compared to this! Well they never said it would be easy. What high level languages do you use? Quote Share this post Link to post Share on other sites
Impaler_26 #24 Posted February 23, 2009 (edited) I think I will start with assembly and go full steam ahead! If it proves too daunting, then I will give Batari a try. I'm happy to know I do not need an Atari 2600 to start. I think the easiest way to start 2600 programming is to use batariBasic first. I would recommend using Visual batariBasic and once you have learned the basics of 2600 programming you can still switch to assembly. I would also recommend reading the Stella Programmer's Guide and taking a look at Andrew Davie's 2600 Programming for Newbies. Edited February 23, 2009 by Impaler_26 Quote Share this post Link to post Share on other sites
Devin #25 Posted February 23, 2009 So, to sum up what everyone has said.... Welcome to Hell... Quote Share this post Link to post Share on other sites