Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
богатые залежи золота и теперь США

Почему Curiosity на Марсе, а не в Неваде
<sarcasm> забыли. :) :(И на близких расстояниях:
Я совершенно не разбираюсь в технологиях подобного рода.
Due to very limited NES resources, such as CPU speed, RAM and ROM size, writting a proper, clean C code isn't very effective. To make it faster and shorter you have to optimize it through doing things that otherwise aren't considered acceptable. They are disable some of C advantages, making the code more low level and less structured, but even with these limitations it remains very high level comparing to assembler.
There are suggestions that will make your code more effective, but certainly less readable:
Avoid local variables as much as possible, make them static at least
Avoid passing parameters to functions
Avoid to use functions that only used once
Use __fastcall__ calling convention
Arrays of structs are slow, separate arrays are faster
Fastest type is unsigned char, use it as much as possible. Don't forget that in CC65 int is 16 bit wide
Signed types are slower
You can put some variables into zero page using a pragma (see below), it makes them faster
Don't forget that you need to declare array of pointers as const type* const if you need to put it into ROM
Use preincrements where possible, they are both faster and shorter
Avoid to use multiple and division as much as possible, they are very slow. Use bit shifts where possible instead
If you need to process an array of objects, it is better to copy data from arrays to separate vars. Use these vars in the code, and then copy new data back to the arrays. This could make code significally shorter and faster, because access to an array item generates more code than access to a variable
Declaring global variables static also helps to find unused global variables, compiler will report about them
Почему Curiosity на Марсе, а не в Неваде