Jump to content



0

Problem with vertical shifting


3 replies to this topic

#1 joelm OFFLINE  

joelm

    Combat Commando

  • 4 posts

Posted Mon Sep 19, 2011 9:23 AM

Hello all, I am new here so please be patient, I'm sure I must have missed something minor.

I have been writing the example code from the sessions myself (so I can learn the flow of logic) but, except for the notes and some spacing, have been copying them more or less verbatim. My issue is that whenever I introduce anything horizontal in the code the screen seems to rollover (and flicker) when I run the binary in Stella. For example any change in the background color or any horizontal playfield (lines on the side of the screen work fine). A plain background with no horizontal images works fine with no rolling or flickering. In the initial playfield lesson a basic binary counter playfield was introduced with a rainbow background, my rainbow background rolls rapidly and is verging on headache or siezure. I will include my code (both asm and bin) so you can take a look to see if I am doing anything wrong.Attached File  test.zip   802bytes   22 downloads

#2 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Mon Sep 19, 2011 11:51 AM

Your VSYNC code is off. The part that currently reads...

						lda #0
						sta VBLANK
 
						lda #2
						sta VSYNC
 
						sta VSYNC
						sta VSYNC
						sta VSYNC
 
						lda #0
						sta VSYNC

...should read...

						lda #0
						sta VBLANK
 
						lda #2
						sta VSYNC
 
						sta WSYNC
						sta WSYNC
						sta WSYNC
 
						lda #0
						sta VSYNC

...so you turn on VSYNC, draw 3 lines with it on, and then turn it off.

#3 joelm OFFLINE  

joelm

    Combat Commando

  • 4 posts

Posted Mon Sep 19, 2011 12:31 PM

Awesome. I knew that I had missed something obvious. Becuase of my work schedule I am learning to do this between 1 and 2 am after a 12-14 hour workday... I guess I just wasnt seeing it. Thank you.

#4 RevEng OFFLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Mon Sep 19, 2011 12:35 PM

Not a problem, and welcome to AA!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users