Jump to content
  • entries
    657
  • comments
    2,693
  • views
    899,062

About this blog

Atari projects, Mac mini DVR, and other things

Entries in this blog

The Return of the Judder

A long time ago in a galaxy far, far away.       Er, wrong space saga       Nathan and I aren't in agreement on pretending the pixels are square - Nathan doesn't like how the left/right movement is a different speed than up/down movement when we treat the Atari's pixels as though they were square, while I don't like the judder that occurs when we compensate for the Atari's 12:7* pixel aspect ratio.   So I've added TRUE 45°, a new menu option. When enabled all movement routines will

SpiceWare

SpiceWare

It's full of stars!

Received a question via Messager that I'm going to reply to here as I'm sure others are wondering as well:     I've seen posts by you in the batari Basic forum, so first thing to note is that none of my games were written using batari Basic1. Collect, Medieval Mayhem, and Stay Frosty (the original game which is in Stella's Stocking) are 100% 6507 assembly while all my other games utilize DPC+ Bankswitching2 with a mixture of 6507 assembly and C code. The C code runs on the ARM c

SpiceWare

SpiceWare

Escape & Grit

A couple new channels are launching next week in about 35 markets.     In Houston Escape will be found on 45.3 and Grit on 67.3. Both are new sub-channels, so I'll need to rescan to pick them up - will have to do that later as the mini is recording a show right now.

SpiceWare

SpiceWare

July Savings, larger drives

No content purchases for July, though I did send PBS $60 (I've been watching a lot of their shows again) so I have $91 in savings for the month. Cummulative Savings is now at $2308 while the balance to pay off the hardware is down to $776.   Now that I'm adding Blu-ray content my Drobo is starting to fill up.   That might be of concern as the new TV season will be starting soon, but that WD 5TB Red drive ($250) I was wondering about back in February has finally been released! They've also

SpiceWare

SpiceWare

step 14 - add animation

Static images that just slide around the screen work OK, but we can do better - so for this update we'll add a couple new images so we can animate the players as they run around the arena.   While you can have as many frames of animation as you'd like, the code is most efficient if the number of frames is a power of 2 (2, 4, 8, 16, etc). The code that cycles through 4 frames is this: Example: inc frame lda frame and #3 ; limits values from 0-3, i

SpiceWare

SpiceWare

step 13 - add sound effects

A quiet game is playable, but it's more fun with sound. TIA produces 2 channel sound. The channels are known as channel 0 and channel 1. There are 3 registers for each channel to control the sound produced: AUDC0, AUDC1 - Control of the channel, specifies the type of sound to generate. Values range from 0 to 15, though some values produce the same type of sound as others. AUDF0, AUDF1 - Frequency of the channel, values range from 0(highest) to 31 (lowest) AUDV0, AUDV1 - Vol

SpiceWare

SpiceWare

step 12 - add the missile objects

The 2LK has been revised to display both missile objects. Missile objects do not support Vertical Delay, so there's no need to prime ENAM0 or ENAM1. ArenaLoop: ; 17 - (currently 17 from bpl ArenaLoop) ; continuation of line 2 of the 2LK ; this precalculates data that's used on line 1 of the 2LK tya ; 2 19 - 2LK loop counter in A for testing and #%11 ; 2 21 - test for every 4th time through the loop, bne SkipX

SpiceWare

SpiceWare

step 11 - add the ball object

The 2LK has been revised to display the ball object. Like player0, the ball needs to be primed before the ArenaLoop begins: ; prime ENABL so ball can appear on topmost scanline of Arena ldx #1 ; 2 2 - D1=0, so ball will be off lda #BOX_HEIGHT-1 ; 2 4 - height of box graphic dcp BallDraw ; 5 9 - Decrement BallDraw and compare with height bcs DoEnablPre ; 2 11 - (3 12) if Carry is Set, then ball is on current scanline .b

SpiceWare

SpiceWare

step 10 - "Random Numbers"

And yes, those are air quotes   Inside the Atari (and computers in general), there's no such thing as a Random Number. We can, however, simulate random numbers by using a Linear Feedback Shift Register. The LFSR we're going to use was posted by batari, it's a rather slick bit of code in that it can be either an 8-bit or 16-bit LFSR. Random: lda Rand8 lsr ifconst Rand16 rol Rand16 ; this command is only used if Rand16 has been defined endif

SpiceWare

SpiceWare

step 9 - Game Variations

It's common for Atari games to have a number of game variations. To simplify the logic, the variations are usually driven by individual bits and/or groups of bits within a single byte that holds the game variation. A good example of that would be Space Invaders - check out the game matrix from the manual:   A byte is comprised of 8 bits, usually numbered 0-7 where 7 is the leftmost bit as in 76543210.   For Space Invaders the bits in the game variation are used in this

SpiceWare

SpiceWare

June Savings

No content purchased in June so $151 in savings. Cumulative savings is now at $2217.   While I did buy a Blu-ray drive, it's for the Mac Pro I plan to purchase sometime during the next few months. As such, I'm not counting its price towards the DVR setup.   I did, however, buy a couple iOS software apps. The InstaTV Pro software I'd purchased back in 2012 had stopped working and was no longer available in the US App Store, apparently due to a patent dispute. A new version of InstaTV Pro i

SpiceWare

SpiceWare

step 8 - Select and Reset support

For this update we're adding initial support for the Select and Reset buttons. For this we're adding a new RAM variable called GameState to keep track of "Game Active" vs "Game Over". ; D7, 1=Game Active, 0=Game Over GameState: ds 1 ; stored in $A7     We're going to use D7 to denote the state as we can easily test D7 (as well as D6) by using the BIT command. You can see this in the revised Vertical Blank routine were we test GameState to determine if UpdateTimer and

SpiceWare

SpiceWare

step 7 - draw the playfield

For this update, we're going to modify the Arena Loop to draw the Arena using the playfield. The new Arena loop has these new changes:   ArenaLoop: ; 27 - (currently 7 from bpl ArenaLoop) tya ; 2 29 - 2LK loop counter in A for testing and #%11 ; 2 31 - test for every 4th time through the loop, bne SkipX ; 2 33 (3 34) branch if not 4th time inx ; 2 35 - if 4th time, increase X so new p

SpiceWare

SpiceWare

step 6 - Spec Change

As anybody involved in writing software can tell you, project specifications will often change when new information becomes available.   When I started working on Collect, my plan was to use it for my presentation at Classic Game Fest. As I've progressed I've come to the realization that a full blown game is going to be just     for a one hour presentation. I decided that I'm going to leave the existing example in place and just add a few slides about Collect w

SpiceWare

SpiceWare

Step 5 - automate Vertical Delay

For this update, we're going to double the Y range of the player objects. To use the new Y value for the 2LK we just need to divide it in half using the LSR command. The remainder of the divide, which ends up in the Carry flag, will conveniently tell us if we need to turn on Vertical Delay.   This routine preps the 2LK data for player0 and turns on VDELP0 if required (if you're wondering, VDELP0 is turned off in VerticalSync): ; prep Humanoid's Y position for 2LK ldx #1

SpiceWare

SpiceWare

Step 4 - 2 Line Kernel

Let's review the TIA Timing diagram from last time:   We used that to determine when we could safely update the playfield data in order to draw the score and timer. For moveable objects(player0, player1, missile0, missile1 and ball) if you update their graphics during the Visible Screen (cycles 23-76) you run the risk of shearing. For something that's moving fast, like the snowball in Stay Frosty 2, shearing may be an acceptable design compromise:   That snowball

SpiceWare

SpiceWare

Neat surprise

OS X has a handy feature where you can point at text onscreen then hit Command-CNTRL-D to get a definition:   I was replying to a PM and had typed out Medieval Mayhem when I had one of those moments of "I know it's spelled correctly, but it looks wrong" so I did it on the word Medieval. I was expecting to see something about the Middle Ages, instead i saw this:  

SpiceWare

SpiceWare

Treadmill Update

I've had the treadmill now for 8 weeks! Here's the log so far: Week Minutes Calories Miles Steps--------- ------- -------- ----- ------May 5-11 485:28 1217 10.06 32799May 12-18 1004:06 2537 21.13 68486May 19-25 524:11 1275 10.17 34933May 26- 1 1103:23 2917 24.00 77807Jun 2- 8 1504:27 4307 40.28 118487Jun 9-15 1872:47 5600 53.20 152293Jun 16-22 1675:23 5114 50.02 138645Jun 23-29 2172:08 6176 57.77 170616

SpiceWare

SpiceWare

Step 3 - Score & Timer display

After getting a stable display, I like to implement the routines for displaying the score. You can see that in the first builds of Frantic, Medieval Mayhem, and Space Rocks. Even though we're not ready to show the player's score, the display is very useful for showing diagnostic information - such as this build of Frantic which uses it to show which sprites are colliding with the player. To draw the score we're going to use the playfield graphics. The playfield pattern is comprised of 20 bi

SpiceWare

SpiceWare

Updated MODE file

No update for Collect today - I got sidetracked trying to figure out how to use the "DELEGATE" feature of jEdit's mode files. Once I figured that out I was able to revise my mode file so that binary numbers will now show the 0 and 1 digits using different colors. This makes it easier to see graphic shapes in the data:     Instructions on how to install the mode file can be found in this blog entry.   assembly-6502.xml.zip   Edit: was trying to change the

SpiceWare

SpiceWare

Step 2 - Timers

In Step 1 I used loops of sta WSYNC commands to delay the program so that Vertical Blank and OverScan would last for the proper duration. That method works fine when all we want to do is generate a static display, but as soon as we start to add game logic that won't work out so well.   The problem with the game logic is there will be so many different paths the code can take that it is nearly impossible for us to know how long the code ran, and thus we won't know how many scanlines we

SpiceWare

SpiceWare

Step 1 - Generate a Stable Display

First things first - head over to MiniDig - best of stella and download the Stella Programmer's Guide from the docs page. I've also attached it to this blog entry, but you should still check out what's available over at MiniDig. Also, for this tutorial you'll need to have DASM to compile the code as well as Stella and/or a real 2600 with a Harmony cart to run your code. The heart of the Atari is TIA, the Television Interface Adaptor. It's the video chip, sound generator, and also handl

SpiceWare

SpiceWare

Let's Make a Game!

NOTE: If you're not familiar with 6502 assembly language, take some time to check out the Easy 6502 tutorial. For my Atari 2600 Homebrew presentation I've been giving a rundown of the challenges involved in writing an Atari game, namely the limited resources and capabilities of the hardware, as well as the tools (DASM, bB, Stella, Harmony, etc) and resources(AtariAge, Mini Dig, etc) that are available to help you. I've been updating the presentation for each time I give it. On the most

SpiceWare

SpiceWare

×
×
  • Create New...