WSYNC strobe on a 7800? - Atari 7800 Programming - AtariAge Forums Jump to content Existing user? Sign In Sign In Remember me Not recommended on shared computers Sign In Forgot your password? Sign Up Atari 7800 Programming Have You Played Atari Today? 2600 | 5200 | 7800 | Lynx | Jaguar | Forums | Store Forums Clubs Apps Blogs Gallery Events More All Activity My Activity Streams Status Updates More Leaderboard Staff Online Users Guidelines More Subscriptions More More Everywhere This Forum This Topic Status Updates Topics Blog Entries Images Albums Events Pages Products Members All Activity Home Atari Systems Atari 7800 Atari 7800 Programming WSYNC strobe on a 7800? IGNORED WSYNC strobe on a 7800? By Robert M June 9, 2010 in Atari 7800 Programming Share More sharing options... Followers 0 Reply to this topic Start new topic Recommended Posts Robert M Posted June 9, 2010 Robert M Members 1,533 posts Rootbeer! Location: Western NY state Share Posted June 9, 2010 So I was looking through the 7800 Software Guide, and it seems straight forward how to program the 7800, but I noticed in the register list there is a WSYNC register which is not described elsewhere in the document. Does this register function like the WSYNC on the Atari 2600. When exactly in the raster line does the CPU start execution again? Does this let you synchronize to the 7 cycles at the start of each scanline? Does anyone know? Thanks Quote Link to comment Share on other sites More sharing options... gdement Posted June 10, 2010 gdement Members 1,763 posts Location: Northern CA Share Posted June 10, 2010 It does allow you to wait until the start of the next scanline, but I don't know precisely which cycle it resumes execution. I suppose it's similar to the 2600, but I don't know much about that system. If you haven't already, make sure you download the GCC1702B Maria Acceptance Specification and the "Maria-2 handy hints". The Acceptance Spec has some details that are lacking in the software guide, though I don't think it discusses WSYNC. It definitely has better timing info than the software guide. I'm not sure if "Handy hints" has anything useful in it, but might as well get it anyway. Quote Link to comment Share on other sites More sharing options... Robert M Posted June 10, 2010 Robert M Members 1,533 posts Rootbeer! Location: Western NY state Author Share Posted June 10, 2010 Thanks for the info, I downloaded those additional docs. I will take a look at them. I did a search on the forums, and it appears that the general opinion is that the WSYNC CPU halt is released at the start 7 CPU cycles at the start of each scanline. That would make it really easy to perform a color change every scanline with something like this: RTIHandler ; Handle unmasked interrupt generated by last non-visible zone in DLL STA WSYNC LDA COLOR ; Must be 4 cycles or less STA WSYNC STA COLOR_REGISTER STA WSYNC ... Repeat for each scanline pair. One could create a strip of RAM dedicated background colors, so that the background color is different on each scanline pair. Quote Link to comment Share on other sites More sharing options... GroovyBee Posted June 10, 2010 GroovyBee Members 9,874 posts Busy bee! Location: England Share Posted June 10, 2010 You can change more than one colour per scan line in 160A mode (2BPP). I have a G2F (A8 graphics format) image demo here :- http://www.atariage.com/forums/topic/157715-g2f-comes-to-the-7800/ Quote Link to comment Share on other sites More sharing options... supercat Posted June 10, 2010 supercat Members 7,259 posts Share Posted June 10, 2010 You can change more than one colour per scan line in 160A mode (2BPP). I have a G2F (A8 graphics format) image demo here There are a couple things to note about using such WSYNC tricks on the 7800, though: -1- Although WSYNC on the 2600 is pixel-perfect, on the 7800 it is not. Because 6507 cycles may take 2 or 3 color clocks, there is a clock worth of jitter when the 6507 comes out of WSYNC. It would have been nice if MARIA would throw in a 3-chroma cycle if needed to even things out, but it doesn't. -2- Hitting a color register mid-line will cause one pixel to appear 1.5 chroma clocks wide and the next pixel to appear 0.5 chroma clocks wide. Quote Link to comment Share on other sites More sharing options... EricBall Posted June 11, 2010 EricBall Members 2,438 posts Location: Markham, Ontario, Canada Share Posted June 11, 2010 One other item - WSYNC is not compatible with DLI. My first 7800 apps would STA WSYNC then test MSTAT for VBI. But then I figured out that STA WSYNC halts the 6502 so the DLI doesn't kick in as early. Additionally I think MSTAT is later than necessary. So I started using the DLI to flag the end of the frame and just have the mainline test for the flag without WSYNC. Quote Link to comment Share on other sites More sharing options... 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. 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... × Desktop Tablet Phone Submit Reply Share More sharing options... Followers 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. All Activity Home Atari Systems Atari 7800 Atari 7800 Programming WSYNC strobe on a 7800? Theme AtariAge (Default) Dimension Deflection (Dark) Privacy Policy Contact Us Cookies Powered by Invision Community AtariAge Home 2600 5200 7800 Lynx Jaguar Forums Forum Home Clubs Blogs Gallery Subscriptions Store Store Home New Products Bestsellers Gift Certificates General Contact Submit News Privacy Policy Legal Mailing List --> Follow AtariAge Like us on Facebook AtariAge Facebook Group Follow us on Twitter AtariAge on Instagram Watch us on YouTube Chat on Discord Copyright ©1998-2023 AtariAge × Existing user? Sign In Sign Up Forums Clubs Apps Back Blogs Gallery Events All Activity My Activity Streams Back Status Updates More Back More Leaderboard Staff Online Users Guidelines Subscriptions × Create New...