Search the Community
Showing results for tags 'cpu speed mhz cycles vera scan line'.
Hi all, I want to validate a calculation on how much instructions are processed by the 6502, every time the vera scans a display line. Let's assume that the average instruction processing time is 5 cycles. (It might be an overestimation, depending on the type of instructions used). But let us imagine 5, as there is a program that uses a lot of indirect indexed addressing, like LDA ($ZP),Y ... I've understood that the CX16 works at 8Mhz, so translating this, that would be around 8.000.000 cycles per second, correct? The vera display is configured to operate at 640x480 resolution, and no scaling. Let's assume that the vera scans the display 60 times per second. So the average amount of instructions that would be processed by the 6502 would be 8.000.000 cycles per second / 5 cycles per instruction, which would be 1.600.000 instructions / second. The vera scans the complete display 60 times per second, so that would mean that 1.6000.000 instructions per second / 60 vera scans per second would result in 26.666 instructions per single vera display scanning operation. However, there are 480 vera scan lines, so 26.666 instructions per vera display scan / 480 vera scan line would result in around 55 instructions per scan line per 60 times a second. So if we need to control about 40 objects, that would mean that for each object, there would be about 1,375 instructions per scan line available. Is the above calculation correct or is it way off? And what other variants or parameters come into play? Please see the below, it is the reason of my asking ... The white border measures the processing from the start of scanning till the end of scanning. Each object on the display is processing movement logic, behaviour logic, draw logic ... I was surprised that the machine takes time to process all this logic. Which makes it excitiing, because it allows to build a relatively more complex game, but still there are boundaries as a result of the machine configuration. kind regards, Sven