CREEP'S NOTES BATARI BASIC INFO...as I Figure it out |
In December of 2024, I started dabbling around in Batari BASIC for fun. It all began when I had some funky idea to just start making my own game all-of-a-sudden (left) and decided to keep on going. Originally this page was just going ot be a look into my Game Development as it goes along, but I instead decided take somewhat of a "cliff's notes" type approach instead, since I think programming, after this experience, is a lot like Playing Guitar, everyone has a different style, and it tends to inform/flavor the "music" (read VIDEO GAME).
So I'll spare you the stuff you can find on Google and just sorta' paraphrase it here. Batari BASIC is a basic-like programming language for the Atari 2600. The Atari 2600, aka. Atari VCS, Sears TeleGames Video Arcade, is an 8-bit video game console, a part of the second generation of consoles, and was released in 1977. It's notoriously one of the HARDEST game consoles to program for as it was back in the day. Guys like Rob Fulop, Gary Kitchen, Warren Robinette, David Crane, or Howard Scott Warshaw, made the machine do it's thing by programming in cold hard Assembly language....what does Assembly look like....well...
SetupRoomPrint:
The relevant parts being LDA (Load Address), JSR (not sure), LDY......yeah, THAT is how they programmed it. But that's not all. The Atari 2600 did not have a graphics processor, aka a GPU, aka a Frame Buffer as it's called in older units like the NES. The Atari 2600 LITERALLY did it's calculations based on the posiotion of the television screens' electron gun - the part inside legacy CRT Televisions, that zaps from left to right on the TV screen, making the image appear by zapping the phosphors coating the back of what otherwise is a glorified lightbulb. There is some space outside that range such as the "back porch" "front porch" or "Vertial Blank" - which go unseen by the player (usually), this extra part of the cuycle of drawing the TV screen line by line was used for calculations (score, lives, etc). This meant you had to count every friggin scanline on the 2600. That's right, all those "rasters" you CRT people keep yammering on about, the legendary programmers of the days of old had to count all of them, and not just the lines, but how much OF that line is being used to draw a picture to fit more game logic in WHILE the screen is being drawn. a major demonstration of the TRUE power of ASM programmed 2600 games....Penult (left) a full fledged Ultima-style RPG for the Atari 2600, complete with save-game support via external hardware!, and as-of-yet not released Boulderdash 2 by Andrew Davie which puts the Atari 2600 on par with some late-era NES games, or even some PC games given the zoom support! So as you can imagine I'm sure, this makes it a very tedious system to program. So during the 2000's, someone came up with an easier way - a "engine" of sorts, an interpreted language that later is compiled into your standard Stella/Z26 Emulator ROM Binary: Batari BASIC. The idea was to make it easier for would-be homebrewers to actually become homebrewers. The hope is eventually to move to the old ways of doing it (which really unlocks the 2600's surprisingly amazing full potential). Seriously, think about it, in 1977, Combat, Air-Sea Battle, and Night Driver were "State of the Art" - basic, bblocky, simple games with time limits and possibly only one or two player support and nothing more. No title screen, no big story, no big deal. Games that are roughly 2 Kilobytes in size. Skip to the mid 80's we have Pitfall II which is as big as some Black Label NES platformers in size in 1/4th the size, we had things like F-14 Tomcat Simulator that was not just an advanced flight sim for the 2600, but also looked quite impressive for the aging console as well. Then you get to SUPER amazing modern things, such as Andrew Davie's efforts with the C64 game Boulderdash. The initial game released almost a decade ago was awesome, but the current second variation he has now puts the Atari 2600 on par with a late-era NES in some ways, thinks something like Blaster Master. Hell, we even have a full RPG - Penult - with SAVE SUPPORT (SaveKey/AtariVox). The point I'm making is Batari BASIC is likely very limited, BUT, it's a good stepping stone to full-on programming the 2600, or making simpler games more on par with something between 1977-1987. And even more impressive is just how "anemic" the hardware is by the numbers. What we have is a 6507 at 1.19MHz for a CPU, a 6532 "RIOT" RAM Input/Output TImer chip with only 128 Bytes - that's right BYTES - of RAM, and handling controller inputs in some cases (except Paddles which go to the next chip)....the closest thing the 2600 has to a GPU is the custom Atari silicon "TIA" or "STELLA" chip - also known as the "Television Interface Adapter" which polls the paddles, and makes the picture into something a regular at home TV can understand over an analog TV station. Sure, the conrollers have one button - but we have ways around that, because we can repurpose the console switches once meant to make Combat more visible on a Black and White TV, handicap yourself against a amateur player, and even select game variations and start up the game. That's what all six switches on my Taiwan Heavy Sixer above do, Crazy huh? But you can cahnge Color/B&W to change controller types for one game (ie Zombie Chase which uses a Joystick OR the unerrated Driving Paddles), or the Difficulty Switches to pull up a map such as in Starmaster. The thing is, it's limitations are it's strength - the 2600 is so open-ended, there's not as much limitation as with something newer like the NES. It also utilizes on-cart expansions just like the NES to pull these sorts of wild new things off. But why program for a limited, ancient, yet open-ended system? Because it's fun, and the platform is alive and kicking, AtariAge - now owned by Atari themselves, shows a surprisingly diverse indie-dev community of people keeping this almost 50 year old game console alive with new games....nuts huh.BATARI BASIC PROGRAM STRUCTURE A Batari BASIC program, at it's most bbasic, looks a little something like this... |