Jump to content



0

Can't get background to flash


3 replies to this topic

#1 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 504 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Sep 27, 2011 12:04 AM

Hi everyone,

Getting close to getting a simple display up despite everything that's happening to me. The problem I'm having is for some reason i can't set my background to quickly change to white then back to blue when the fire button is pressed. Here's the bit of code that does it:
		 lda INPT4                           		 ; was the gun trigger pressed?

		 bmi SkipCheckFire                      ; if the gun's trigger wasn't pressed then jump to
 
SkipCheckFire

	    lda #WHITE

	    sta COLUBK								  ; set the background color to white

	    lda #BLUE

	    sta COLUBK								  ; then back to blue to simulate a gunfire

SkipCheckFire
In practice this should work, but it doesn't. I have attached my code for reference. Any assistance would be greatly appreciated.

Sincerely,

Primordial Ooze

#2 sloopy OFFLINE  

sloopy

    River Patroller

  • 2,258 posts
  • lookin for bits, i like bits...
  • Location:in my cave of despair, surrounded by toys...

Posted Wed Sep 28, 2011 12:20 AM

altho i am not familiar with 2600 coding, i would guess its cause you need to have COLUBK have #WHITE in it for more then 5 machine cycles... depending on when this happens, it wouldnt be on screen to even see...

sloopy.

#3 ScumSoft OFFLINE  

ScumSoft

    Moonsweeper

  • 331 posts
  • Location:Polysorbate 60

Posted Wed Sep 28, 2011 6:11 PM

Of course that won't work silly, you have to draw the white screen first THEN set it back to black.
Your not drawing the screen between the changes.

#4 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 504 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Thu Sep 29, 2011 12:28 AM

View PostScumSoft, on Wed Sep 28, 2011 6:11 PM, said:

Of course that won't work silly, you have to draw the white screen first THEN set it back to black.
Your not drawing the screen between the changes.
Thanks, with your information i managed to get it working. That was a silly mistake to assume that you can flicker the screen simply by changing the background color twice in succession expecting that the Atari would simply change to background twice and updating the screen twice in quick succession. Boy so i need to revisit Andrew Davies tutorials again, especially to refresh my memory about the television display basics. Thanks again for your help.

Sincerely,

Primordial Ooze




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users