IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New no go :-(
It boots my eComStation 1.1 CD, but it shows a scrambled logo then "reboots" before doing any installation. May try again later, but am busy [link|http://www.atariage.com/forums/index.php?automodule=blog&blogid=148&|writing a game] at the moment.
Darrell Spice, Jr.            Trendy yet complex\nPeople seek me out - though they're not sure why\n[link|http://spiceware.org/gallery/ArtisticOverpass|Artistic Overpass]                      [link|http://www.spiceware.org/|SpiceWare]
New Neat!
When somebody asks you to trade your freedoms for security, it isn't your security they're talking about.
New It's the most challenging coding I've done so far
128 bytes of RAM
4 KB ROM (though I'm using bankswitching to get 16KB)
NO video RAM
1 MHz 6507 (6502 missing a few address lines and the interrupt)

The video chip has a few registers to control 1/2 line worth of PlayField (the blocky background), 2 sprites, 2 missiles and a ball. The 1/2 line comes in that the PlayField is 40 bytes wide, but the 3 registers only hold 20 bytes of data. The playfield shown on the right is either repeated or reversed from what was shown on the left(if you need both sides to look different then the CPU has to update the 3 PlayField registers mid-scanline) The background/ball shares a color, sprite0/missile0 share a color and sprite1/missile1 share a color. The program also has to trigger when the vertical sync, vertical blank ans overscan sections of the video signal. If you don't do it right the picture will roll.

for the sprites, missiles and ball the video chip only holds a single scanline worth of data. If you want your sprite to have different pixels on/off for each scanline then your program has to update the sprite's pattern on every scanline. If you don't update it then the next scanline will look exactly like the current one.

Because the CPU draws the display, the game logic takes place during the Vertical Blank and Overscan. If you're game logic takes too long to execute then the signals to the TV will not be sent at the right time and the picture will roll.

My game uses the playfield to draw all 4 scores in 4 colors. To do so I load players 1 & 4's score into the playfield registers(PF1 and PF2, there's also PF0), then I have change the playfield's color while it's being drawn so that it changes between each player's score. Likewise, because of how the playfield repeats, I have to update PF1 and PF2 with players 2 & 3's score after the first scores have been displayed, but before the second scores start being displayed. For each scanline I get 76 CPU cycles of time, so most Atari VCS programmers will document the cycle count during the display portion of the program.

Here's an example of code that draws the scores using the "blocky background"

\nPushDigits                ; push 2 digit shapes on stack so score kernel has enough\n        ldx #6            ; cycles to draw all 4 scores in different colors\n.pushDigits\n\tldy Score1\n\tlda DigitsRev,y   ; part of the display outputs the byte as 01234567\n\tpha\n\tinc Score1\n        ldy Score4\n\tlda Digits,y      ; part of the display outputs the byte as 76543210\n\tpha\n\tinc Score4\n\tdex\n\tbpl .pushDigits\n\t\n\tldx #01\n\tsec\n\tlda Score1\n\tsbc #$07\n\tsta Score1\n\tlda Score4\n\tsbc #$07\n\tsta Score4\n\t\n\tlda PlayerColor1 ; load the sprite colors for the top players\n\tsta COLUP0\n\tlda PlayerColor3\n\tsta COLUP1\n\t\n.VblankWait\n\tlda INTIM\n\tbne .VblankWait  ; wait for a timer to signal end of vertical blank\n\tsta VBLANK\n\tsta WSYNC ; halts CPU until the end of the current scanline\n\n\t\nDisplayKernel\n                          ; +--------------+\n\t\t\t  ; |    START     |\n                          ; | SCORE KERNEL |\n\t\t\t  ; +--------------+\n\t\t\t  ; display first 6 lines of scores.  Coming in the \n\t\t\t  ; PF color is set to player 4 and the scores for\n\t\t\t  ; player 4 and player 1 have been pushed onto the\n\t\t\t  ; stack\n\tREPEAT 6          \n\tpla               ; 4    fetch score graphic for player 4\n\tsta PF1           ; 3 7  show score for player 4\n\tpla               ; 4 11 fetch score graphic for player 1\n\tsta PF2           ; 3 14 show score for player 1\n\tdec Score3        ; 5 19 prep score 3\n\tdec Score2        ; 5 24 prep score 2\n\tldy Score3        ; 3 27 \n\tlda Digits,y      ; 4 31 fetch digit shape for player 3\n\tldx PlayerColor1  ; 3 34 \n        stx COLUPF        ; 3 37 change PF color to player 1's color\n\tsta PF1           ; 3 40\n\tldx PlayerColor3  ; 3 43\n\tstx COLUPF        ; 3 46 change PF color to player 3's color\n\tldy Score2        ; 3 49\n\tlda DigitsRev,y   ; 4 53 fetch digit shape for player 2\n\tldx PlayerColor2  ; 3 56\n\tsta PF2           ; 3 59\n        stx COLUPF        ; 3 62 change PF color to player 2's color\n\tnop               ; 2 64\n\tldx PlayerColor4  ; 3 67\n\tstx COLUPF        ; 3 70 change PF color to player 4's color (for start of next line)\n\tsta WSYNC         ; 3 73 halt CPU until end of current scanline\n\tREPEND\n\t             \t  ; draw last line of scores\n\t\t\t  ; same as first 6, but we load the castle color at the\n\t\t\t  ; end instead of player 4's color \n\tpla               ; 4 \n\tsta PF1           ; 3 7\n\tpla               ; 4 11\n\tsta PF2           ; 3 14\n\tdec Score3        ; 5 19\n\tdec Score2        ; 5 24\n\tldy Score3        ; 3 27\n\tlda Digits,y      ; 4 31\n\tldx PlayerColor1  ; 3 34\n        stx COLUPF        ; 3 37\n\tsta PF1           ; 3 40\n\tldx PlayerColor3  ; 3 43\n\tstx COLUPF        ; 3 46\n\tldy Score2        ; 3 49\n\tlda DigitsRev,y   ; 4 53\n\tldx PlayerColor2  ; 3 56\n\tsta PF2           ; 3 69\n\tstx COLUPF        ; 3 62\n\tnop               ; 2 64\n\tldx WallColor     ; 3 67\n\tstx COLUPF        ; 3 70
Darrell Spice, Jr.            Trendy yet complex\nPeople seek me out - though they're not sure why\n[link|http://spiceware.org/gallery/ArtisticOverpass|Artistic Overpass]                      [link|http://www.spiceware.org/|SpiceWare]
     If you really need windows occasionally - (tuberculosis) - (6)
         Neat. Thanks for the pointer. -NT - (Another Scott)
         Hmm - my GalCiv CD is calling my name - (SpiceWare) - (3)
             no go :-( - (SpiceWare) - (2)
                 Neat! -NT - (inthane-chan) - (1)
                     It's the most challenging coding I've done so far - (SpiceWare)
         Apparently can import VPC 7 images - (tjsinclair)

Quite another Theatre of operations.
47 ms