Jump to content
IGNORED

Session 20: Asymmetrical Playfields - Part 3


Recommended Posts

Is that correct? I'd love to see it in action on a television set.

 

That is correct. I, too, would love to see it on a TV!

 

 

I just converted Andrew's Chronocolour NTSC bouncing Mario demo and Jason's Color.bin to WAV files using Bob Colbert's MAKEWAV program, saved them onto microcassette, and loaded them up on the "Heavy Sixer" using the Supercharger.

 

Both of them look GREAT on a real TV. The output through a real Atari and TV beats the socks off of the emulator displaying on my LCD monitor.

 

 

Hey Sheldon, thanks for doing the test.

 

One thing which might make your life easier - if you plug your supercharger into your speaker output then you don't need the microcasette save step. You can just treat the PC as your tape-recorder, and PLAY the WAV file as if you're pressing PLAY on a tape deck. It works - this is how most using the supercharger for development have been doing things.

 

What was the flicker like, on the real thing?

 

Cheers

A

Link to comment
Share on other sites

I also plugged Andrew's color values into Jason's Color.bin file to see what that would look like on a real TV.  Andrew's color values for RED, GREEN and BLUE are a little darker, which causes the word HELLO and the ending exclamation mark to appear a little darker white than when using Jason's color values.  Also, the white text appears to blink worse when using Andrew's RGB values.

I wrote a program to help out with all the confusions about colour values

 

Read the thread here

http://www.atariage.com/forums/viewtopic.php?t=31579

I posted the source and a bin at the bottom.

Link to comment
Share on other sites

I must not have a grip on branch instructions or something. Can someone tell me what I am doing wrong in my code for Exercise 4?

 

; Andrew Davie's "Atari 2600 Programming for Newbies"
; Session 20 - Asymmetrical Playfields - Part 3
; Playfield Graphics Code Cleaned up by Thomas Jentzsch
; Exercise 4 - Color Boxes in RGB





               processor 6502

               include "vcs.h"

               include "macro.h"

   
;--------------------------------------------------------------------------

   

               SEG

               ORG $F000

   

Reset



  ; Clear RAM and all TIA registers



               ldx #0

               ldy #0

               lda #0

Clear

               sta 0,x

               inx

               bne Clear

   

      ;--------------------------------------------------------------------

      ; Once-only initialisation...

   

                       

      ;--------------------------------------------------------------------

   

StartOfFrame

   

  ; Start of new frame

  ; Start of vertical blank processing

   

               lda #%00000000

               sta CTRLPF    ; don't mirror playfield



               

               lda #$00

               sta COLUBK   ; set the background color





               lda #0

               sta VBLANK

   

               lda #2

               sta VSYNC

   

               sta WSYNC

               sta WSYNC

               sta WSYNC   ; 3 scanlines of VSYNC signal

   

               lda #0

               sta VSYNC



      ;------------------------------------------------------------------

      ; 37 scanlines of vertical blank...

           

               ldx #0

VerticalBlank

               sta WSYNC

               inx

               cpx #37

               bne VerticalBlank

           

      ;------------------------------------------------------------------

      ; Do 192 scanlines of color-changing (our picture)

       

               ldx #0   ; this counts our scanline number

               cpy #00

               beq RedSet

               

               cpy #01

               beq GreenSet

               

               cpy #02

               beq BlueSet

               

      ;--------------------------------------------------------------------------



RedLine                      ;   @07    
; left PF: 

   lda BOX_RED_STRIP_0,x   ; 4          

   sta PF0                ; 3 @14     @ < 22, ok    

   lda BOX_RED_STRIP_1,x   ; 4  

   sta PF1                ; 3 @21     @ < 27, ok 

   lda BOX_RED_STRIP_2,x   ; 4  

   sta PF2                ; 3 @28     @ < 38, ok 




; right PF: 

   lda BOX_RED_STRIP_3,x   ; 4  

   sta PF0                ; 3 @47     26 < @ < 48, just ok 





   lda BOX_RED_STRIP_4,x   ; 4  

   sta PF1                ; 3 @62     37 < @ < 54, too late    

   lda BOX_RED_STRIP_5,x   ; 4  

   sta PF2                ; 3 @69     47 < @ < 64, too late 



   sta WSYNC              ; 3 
;---------------------------------------    

   inx                    ; 2 

   cpx #192               ; 2 

   bne RedLine              ; 2³

   jmp ClearVar



GreenLine                      ;   @07    
; left PF: 

   lda BOX_GREE_STRIP_0,x   ; 4          

   sta PF0                ; 3 @14     @ < 22, ok    

   lda BOX_GREE_STRIP_1,x   ; 4  

   sta PF1                ; 3 @21     @ < 27, ok 

   lda BOX_GREE_STRIP_2,x   ; 4  

   sta PF2                ; 3 @28     @ < 38, ok 




; right PF: 

   lda BOX_GREE_STRIP_3,x   ; 4  

   sta PF0                ; 3 @47     26 < @ < 48, just ok 





   lda BOX_GREE_STRIP_4,x   ; 4  

   sta PF1                ; 3 @62     37 < @ < 54, too late    

   lda BOX_GREE_STRIP_5,x   ; 4  

   sta PF2                ; 3 @69     47 < @ < 64, too late 



   sta WSYNC              ; 3 
;---------------------------------------    

   inx                    ; 2 

   cpx #192               ; 2 

   bne GreenLine              ; 2³

   jmp ClearVar



BlueLine                      ;   @07    
; left PF: 

   lda BOX_BLUE_STRIP_0,x   ; 4          

   sta PF0                ; 3 @14     @ < 22, ok    

   lda BOX_BLUE_STRIP_1,x   ; 4  

   sta PF1                ; 3 @21     @ < 27, ok 

   lda BOX_BLUE_STRIP_2,x   ; 4  

   sta PF2                ; 3 @28     @ < 38, ok 




; right PF: 

   lda BOX_BLUE_STRIP_3,x   ; 4  

   sta PF0                ; 3 @47     26 < @ < 48, just ok 





   lda BOX_BLUE_STRIP_4,x   ; 4  

   sta PF1                ; 3 @62     37 < @ < 54, too late    

   lda BOX_BLUE_STRIP_5,x   ; 4  

   sta PF2                ; 3 @69     47 < @ < 64, too late 



   sta WSYNC              ; 3 
;---------------------------------------    

   inx                    ; 2 

   cpx #192               ; 2 

   bne BlueLine              ; 2³


;--------------------------------------------------------------------------

ClearVar

              ; CLEAR THE PLAYFIELD REGISTERS

               lda #0

               sta PF0

               sta PF1

               sta PF2

           

      ;--------------------------------------------------------------------------

           

               lda #%01000010

               sta VBLANK   ; end of screen - enter blanking

           

      ; 30 scanlines of overscan...

       

               ldx #0

Overscan

               sta WSYNC

               inx

               cpx #30

               bne Overscan

           

               jmp StartOfFrame



               include "BOX_RED.asm"

               include "BOX_BLUE.asm"

               include "BOX_GREE.asm"


;---------------------------------------------------------------------------------



           ORG $FFFA

       

InterruptVectors



           .word Reset   ; NMI

           .word Reset   ; RESET

           .word Reset   ; IRQ

           
;-------------------------------------------------------------------------

           

RedSet

               lda #$34

               sta COLUPF   ; set the playfield color

               iny

               jmp RedLine

               

GreenSet

               lda #$C6

               sta COLUPF

               iny

               jmp GreenLine

               

BlueSet

               lda #$72

               sta COLUPF

               ldy #0

               jmp BlueLine

               

       END

 

I have attached my Red, Green and Blue graphics data in a ZIP file in case you want to play around with it. The final result should be neat if I can get the code working correctly. :)

box_data.zip

Link to comment
Share on other sites

O.k your RGB data is out of range. You shouldn't have "anything" after the

interupt vectors.

Just move this ...


RedSet

               lda #$34

               sta COLUPF   ; set the playfield color

               iny

               jmp RedLine

              

GreenSet

               lda #$C6

               sta COLUPF

               iny

               jmp GreenLine

              

BlueSet

               lda #$72

               sta COLUPF

               ldy #0

               jmp BlueLine

 

after this ..

 


     ;------------------------------------------------------------------

      ; Do 192 scanlines of color-changing (our picture)

      

               ldx #0   ; this counts our scanline number

               cpy #00

               beq RedSet

              

               cpy #01

               beq GreenSet

              

               cpy #02

               beq BlueSet

 

Worked for me. Didn't look too good but I think it would look better on the real thing :)

Link to comment
Share on other sites

  • 1 month later...
Hello everyone, this is my first time posting here. I have been following the tutorials and have been learning a lot. I wrote a free, small Win9x/XP ultility called AssymRead. It translates windows bmp files into text data for DASM. It offers a simple GUI and some customization features. Hope you find it useful.

 

Hey, dude, thats an awesome tool!

Dunno about the pros, but for this humble n00b here your utility is great! Looks very professional, its easy, simple and well polished... can't figure out why no one commented your work yet..

 

Here are 2 snapshots taken using you cute tool... one is a test file with geometric forms, and the other is... try to guess! :)

 

btw... to use the table, i simply copy and pasted Andrew's snippet (Session 20, 4th code) in my kernel, replaced PFxData for PFData_x, and... voilá! it worked! frawlessly!

and the most incredible thing is: theres no need to adjust the delay! no need to calculate any noop, sleep or whatsoever. The way it is, with no delay, the timing is already perfect! Just adjust the # of lines (to correspond to your actual image) and be happy!

 

Very well done, man! :)

post-4052-1063630011_thumb.jpg

post-4052-1063630012_thumb.jpg

Link to comment
Share on other sites

  • 1 month later...
  • 7 years later...

Hi RCorcoran

 

 

I still got 404 error using Explorer 6.0 and real download.

It worked using Netscape 6.

 

I'll try it out.

 

 

Robin Gravel

 

Hi,

 

I found a copy of it from Andrew Davie embedded in a different thread

http://www.atariage.com/forums/topic/77792-where-can-i-download-fsb-exe/

 

I hope this helps,

-Dave

Edited by Manticore
Link to comment
Share on other sites

  • 2 years later...

Does the DASM directive dc.b add extra padding?

 

I have been able to get asymmetric playfields working fine when using the .byte {constant} approach (which is what the FSB tool generates).

 

But when I try to use dc.b and then list out 192 bytes (once for each of the 6 columns) the playfields are in some unknown state.

 

Example 1 (working):

.byte 0

.byte 0

.byte 0

.byte 0

 

asym1_zpsba14a7cd.png

 

Example 2 (not working):

dc.b $00, $00, $00, $00, ...

 

asym2_zpse49587e4.png

Edited by jarrodparkes
Link to comment
Share on other sites

I think I may have figured this out. I believe there is a limit of how many values you can list using a "dc" directive.

 

Instead of dc.b and then listing 192 bytes, I have broken them into rows of 16 bytes each.

I rather like the HEX directive. You can list the values in hex format without the usual dollar sign, and you don't need to include a comma between values:

 

  HEX DE AD BE EF DE AD BE EF DE AD BE EF DE AD BE EF
  HEX DE AD BE EF DE AD BE EF DE AD BE EF DE AD BE EF

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Sorry if this is a bit off topic and I understand this topic itself is from 2015?! but my question is in regards to succeeding players (6 total) trick to make a title!

 

Well, how is it that the title has 2 players0 and 2 players1, each different from each other on the same scanline? I thought they had to be duplicates?! (like space invaders)

Does this mean that I can have this set up going on even in game play?

 

meaning I can have a sort of "high resolution" game as long as I keep the 6 players limit going down the top to the bottom of the screen! that's a lot of player sprites!

a similar multiplying thing, I saw done with balls and missiles! which can be used for colorful stars!

 

as always I am more of a mock up guy! http://aloan.site90.net/atari_graphics_simplified.html

Edited by Aloan
Link to comment
Share on other sites

The use of VDELP0 and VDELP1 enable shadow registers for player graphics, which makes it possible to update each copy of the players to show a different 8 bit value. This is how they came up with the 6 digit score routine, and a moving version of it was used for Dragster:

s_Dragster_1.png

 

 

How the 48 pixel display works is fairly complicated. I used it for Medieval Mayhem's menu, but didn't understand how it worked at the time.

  • Like 1
Link to comment
Share on other sites

The use of VDELP0 and VDELP1 enable shadow registers for player graphics, which makes it possible to update each copy of the players to show a different 8 bit value. This is how they came up with the 6 digit score routine, and a moving version of it was used for Dragster:

Thanks for the response! now: in the Atari 2600 M.A.S.H. game it is the first time ever that I was in disbelief as I (using stella's Alt+B) discovered that the trees in the playfield were made using a ball!!!!

m_a_s_h.png

I noticed that the trees were single color...

But what is intriguing is how the ball made those pine trees!

My thought is it made a trail of paint!

but then again I have to ask, so the ball can also be used to make another player sprite (at least stationary) and maybe it can even have varying colors per scan line as is the case with colorful stars like in Moon Patrol!

Edited by Aloan
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...