A Great Old-Timey Game-Programming Hack (2013)
blog.moertel.com
blog.moertel.com
The machine code for such functions can be generated from any image in a straightforward way with all kinds of useful optimizations - i.e. simply skipping transparent pixels without doing anything instead of checking transparency every single time, but require some space tradeoff, as the code was noticeably larger than the source image.
The Atari 2600 has hardware designed to take advantage of such a trick. It has some 1-bit graphical objects that are turned on or off by writing to a certain register. The hot bit of that register is located at bit 1.
Why that, why not the more obvious low or high bit? Because bit 1 corresponds to the location of the 6502's zero flag in the flags register. So you can correctly turn the object on or off with literally just a compare on its coordinate then a push-flags instruction. You'll end up pushing a 1 or 0 to enable or disable the object. No branches or conditionals, and the code is even time-invariant, a helpful property in the tightly cycle-counted world of this machine.
Finally, the video chip registers are laid out with several such objects in succession, so you can continue pushing into several of them without resetting the stack pointer. (This machine has no interrupts, so hijacking the stack pointer into video memory is perfectly safe as long as you never issue a call or other push-pop instruction.)
The machine also aligns some of its read registers the same way. The joystick button is mapped to bit 7 of its input register, so you can read and then immediately branch on the sign flag without a compare instruction.
Happy to be wrong for once ;-)
Finding loop that takes 80% cpu should be simple enough and it can't be big.
You might spend weeks making stuff faster and arrive to inferior or wrong solution. Better ship it weeks earlier and enjoy lying on a beach in the sun.
2. Information exchange was much less efficient than now. They literally would have no way of knowing what the other guys did unless each new developer was ready do reverse engineer their code themselves, which requires a significant investment of time that most likely exceeds the time they would be investing on the actual platformer. Nowadays a single person can reverse engineer the technique and everyone else can just use it, but then it simply wouldn't be published and you're on your own.
The tools available were crude; disassembly or easy finding of the 'hot' inner loops just wasn't available, and simply attaching a debugger would often result in the system not working as the game code would often rely on specific cycle timing, interrupts not happening (e.g. the article mention of any interrupts corrupting their data due to abuse of stack pointer), etc. Reverse engineering could and did happen, but it's not that feasible to two boys in the basement at the time.
Furthermore, 'the pros' at the time would deploy their code in firmware (arcade machines or cartridges) where it's even less accessible to hobbyists of the time. The only actual way of spreading such knowledge was by some of those early professionals publishing books, that among basic techniques also listed the optimization tips and tricks that they knew.