Lab 2 - 6502 Math Lab

Introduction This blog entry documents my journey in implementing a diagonal bouncing animation using 6502 Assembly . The objective was to make a 5x5 pixel graphic move diagonally across the screen and bounce off the edges in a smooth and continuous loop . At first glance, this seemed like a simple task, but it turned out to be quite challenging, requiring: • Dynamic coordinate updates for smooth movement • Precise boundary detection • Reversing direction correctly upon hitting an edge • Maintaining perfect diagonal motion over multiple bounces In this post, I will break down the development process, from the initial approach to debugging and optimizing the final solution. Initial Approach 🔹 Initial Approach: Using provided code At the start of this project, we were given a base code that allowed an object to move diagonally across the screen. The original implementation simply incremented both XPOS and YPOS values every frame, causing the object t...