Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Articles

My fifth program for the Atari 2600 - Horizontal Colors

🎮 Continuing my Assembly language studies for the Atari 2600! Now mastering horizontal and vertical color control. To test it out, I drew the Italian flag 🇮🇹 on the Atari. It turned out amazing! 😄

Continuing my studies on Assembly language for the Atari 2600, I realized that I was still not comfortable with managing the timing consumed by each instruction of the 6507 microprocessor. I noticed that controlling the vertical background colors for each scanline is relatively easy, as it only requires setting the color in the COLUBK register and issuing a STROBE signal with the WSYNC register.


The biggest challenge arises when we want to change colors within the same scanline, that is, horizontally. This happens because, in this case, it is necessary to know exactly how many machine cycles each instruction consumes to set the COLUBK register, which controls the background color of the line, at the exact desired moment. Initially, everything seemed somewhat complicated, but as tests and experiments progressed, I understood the logic behind it. It is important to emphasize that without the help of the Stella emulator's debugger, the task would have been much more difficult.


To put my knowledge to the test at this stage, I decided to draw the flag of my beloved Italy, as its colors vary horizontally in three different shades. The result turned out very well, and I now feel more confident to continue my studies.


bandeira.png
Flag of Italy created with Assembly language for Atari 2600

If you want to read the previous article in this series, click here.

If you want to read the next article in this series, click here.

See you soon!

rvertulo September 02 2024 456 reads Print