I would like to use idle in a grayscale game
there is a loop in my code which waits for the AI1 to trigger in order to synchronize every frame (i think this loop takes 50% of each frame's time)
I tried this :
while(AI1_Counter < 5)
AI1_counter = 0;
But as it's writtem in tigcc help, it interfers with the grayscales until I press a key
After that, it works fine
Is there a way to prevent idle from interfering with graycales ?
or do you have any idea to reduce the power consumption in this loop ?
you should use the pokeIO function. I think Kevin has already gave the solution in the forum.
In some of my source files, I have that : you should verify it is correct :
yes it is that:
//set the calc in low-power-mode (wakes cpu only up for grayscale, keypress, amstimer, clock)
Allright, I'll try that
but does the calculator fall asleep just after this instruction, or is there a small delay (as in _rowread) ?
I don't know, try to put some code just after the move.b #%10101,$60005 (something like move.w #$FFFF,$4C00).
« Quand le dernier arbre sera abattu, la dernière rivière empoisonnée, le dernier poisson capturé, alors vous découvrirez que l'argent ne se mange pas.
but it will be executed when the AI1 triggers
I will try something else
according to my tests, move.b #%0, $600005 stops instantly the calculator
If you are under Kernel Mode, kernel_idle(); does the job too.