Jump to content

Photo

Session 20: Asymmetrical Playfields - Part 3


53 replies to this topic

#26 Andrew Davie OFFLINE  

Andrew Davie

    Stargunner

  • Topic Starter
  • 1,741 posts
  • Dr.Boo
  • Location:Tasmania

Posted Tue Aug 5, 2003 10:18 PM

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

#27 Happy_Dude OFFLINE  

Happy_Dude

    River Patroller

  • 4,212 posts
  • Forum Slacker
  • Location:Sydney, Australia

Posted Tue Aug 5, 2003 10:33 PM

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....pic.php?t=31579
I posted the source and a bin at the bottom.

#28 Sheldon Sims OFFLINE  

Sheldon Sims

    Chopper Commander

  • 112 posts
  • Location:San Fernando, Trinidad, West Indies

Posted Wed Aug 6, 2003 6:18 AM

I was going to ask Happy Dude to repost the link to his program, because Andrew and Happy Dude's last replies had disappeared, but by replying to my last reply, the other replies came back. This is strange. Haha. :D

Thanks for the link, Happy Dude. I'll check it out. :)

#29 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 22,107 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Wed Aug 6, 2003 9:03 AM

Posting in normally quite fast, but editing is slow as hell (>2 min!). But AA will switch to a better forum software soon.

#30 Sheldon Sims OFFLINE  

Sheldon Sims

    Chopper Commander

  • 112 posts
  • Location:San Fernando, Trinidad, West Indies

Posted Wed Aug 6, 2003 2:39 PM

Very nifty program, Happy Dude. I like that. That will definitely come in handy. :)

#31 Sheldon Sims OFFLINE  

Sheldon Sims

    Chopper Commander

  • 112 posts
  • Location:San Fernando, Trinidad, West Indies

Posted Sun Aug 10, 2003 12:24 PM

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. :)

Attached Files



#32 Happy_Dude OFFLINE  

Happy_Dude

    River Patroller

  • 4,212 posts
  • Forum Slacker
  • Location:Sydney, Australia

Posted Sun Aug 10, 2003 12:34 PM

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 :)

#33 Sheldon Sims OFFLINE  

Sheldon Sims

    Chopper Commander

  • 112 posts
  • Location:San Fernando, Trinidad, West Indies

Posted Sun Aug 10, 2003 1:15 PM

Yeehaw! Thanks Happy Dude. That did the trick. I will try it on my real Atari and see how it looks. :)

#34 Sheldon Sims OFFLINE  

Sheldon Sims

    Chopper Commander

  • 112 posts
  • Location:San Fernando, Trinidad, West Indies

Posted Sun Aug 10, 2003 3:06 PM

I tried Exercises 3 and 4 on my real Atari. They work well, but the flicker will kill you. Haha. :D

Here is a .zip file containing the binary files in case anyone wants to try them out.

Thanks to Thomas Jentzsch and Happy Dude for helping me out with the exercises for this session. :)

Attached Files



#35 MestreLion OFFLINE  

MestreLion

    Combat Commando

  • 3 posts
  • Location:Rio de Janeiro, Brazil

Posted Mon Sep 15, 2003 6:46 AM

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! :)

Attached Thumbnails

  • test.jpg
  • avatar.jpg


#36 Serguei2 OFFLINE  

Serguei2

    Dragonstomper

  • 634 posts
  • Location:Canada

Posted Sun Oct 19, 2003 7:39 AM

I got 404 error when downloading fsb.exe


Serguei

#37 RCorcoran OFFLINE  

RCorcoran

    Dragonstomper

  • 526 posts
  • Location:Glendale, Arizona, USA

Posted Sun Oct 19, 2003 9:43 AM

Serguei2:

You may want to try again as it just worked for me. If it still won't work for you, I'm sure someone here (like myself) with a copy will gladly send it to you via other means. :)

#38 Serguei2 OFFLINE  

Serguei2

    Dragonstomper

  • 634 posts
  • Location:Canada

Posted Sun Oct 19, 2003 10:30 AM

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

#39 Manticore OFFLINE  

Manticore

    Combat Commando

  • 6 posts

Posted Wed Jan 19, 2011 9:02 PM

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....wnload-fsb-exe/

I hope this helps,
-Dave

Edited by Manticore, Wed Jan 19, 2011 9:35 PM.


#40 jarrodparkes OFFLINE  

jarrodparkes

    Combat Commando

  • 8 posts
  • Location:Huntsville, Alabama

Posted Sat Aug 10, 2013 10:29 PM

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

Posted Image

Example 2 (not working):
dc.b $00, $00, $00, $00, ...

Posted Image

Edited by jarrodparkes, Sat Aug 10, 2013 10:34 PM.


#41 jarrodparkes OFFLINE  

jarrodparkes

    Combat Commando

  • 8 posts
  • Location:Huntsville, Alabama

Posted Sat Aug 10, 2013 11:36 PM

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.

#42 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,558 posts
  • Location:Georgia, USA

Posted Sun Aug 11, 2013 8:37 PM

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


#43 jarrodparkes OFFLINE  

jarrodparkes

    Combat Commando

  • 8 posts
  • Location:Huntsville, Alabama

Posted Sun Aug 11, 2013 8:51 PM

@QuadRunner do you know if there is a limit on how many values you can list with these directives (dc.b, hex, .byte)?

#44 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,558 posts
  • Location:Georgia, USA

Posted Sun Aug 11, 2013 11:43 PM

@QuadRunner do you know if there is a limit on how many values you can list with these directives (dc.b, hex, .byte)?

Do you mean per line?

#45 jarrodparkes OFFLINE  

jarrodparkes

    Combat Commando

  • 8 posts
  • Location:Huntsville, Alabama

Posted Mon Aug 12, 2013 8:02 AM

Yes per line.

#46 Joeyjoejoejr OFFLINE  

Joeyjoejoejr

    Combat Commando

  • 3 posts

Posted Thu Jan 29, 2015 10:48 PM

Just wanted to leave this here:

 

https://github.com/j...field_converter

 

It's a ruby script that will convert a bmp image to 6502 assembly.  Specifically it take a 40 x 192 bmp and outputs bytes suitable for use in a playfield.



#47 Joeyjoejoejr OFFLINE  

Joeyjoejoejr

    Combat Commando

  • 3 posts

Posted Thu Jan 29, 2015 10:49 PM

Just wanted to leave this here:

 

https://github.com/j...field_converter

 

It's a ruby script that will convert a bmp image to 6502 assembly.  Specifically it take a 40 x 192 bmp and outputs bytes suitable for use in a playfield.



#48 Aloan OFFLINE  

Aloan

    Star Raider

  • 73 posts

Posted Sun Dec 25, 2016 7:16 PM

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....simplified.html


Edited by Aloan, Sun Dec 25, 2016 7:18 PM.


#49 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 10,699 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Dec 26, 2016 10:39 AM

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.



#50 Aloan OFFLINE  

Aloan

    Star Raider

  • 73 posts

Posted Thu Dec 29, 2016 9:51 AM

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, Thu Dec 29, 2016 9:55 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users