Jump to content



0

Session 20: Asymmetrical Playfields - Part 3


38 replies to this topic

#26 Andrew Davie OFFLINE  

Andrew Davie

    Stargunner

  • 1,314 posts
  • Location:Tasmania

Posted Tue Aug 5, 2003 10:18 PM

Sheldon Sims said:

Quote

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


Quote

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,208 posts
  • Forum Slacker
  • Location:Sydney, Australia

Posted Tue Aug 5, 2003 10:33 PM

Sheldon Sims said:

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

  • 110 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!

  • 16,745 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

  • 110 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

  • 110 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,208 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

  • 110 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

  • 110 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

Dones said:

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 ONLINE  

Serguei2

    Moonsweeper

  • 284 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 ONLINE  

Serguei2

    Moonsweeper

  • 284 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

View PostSerguei2, on Sun Oct 19, 2003 10:30 AM, said:

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users