Compare commits

...

3 commits

Author SHA1 Message Date
Gwenhael Le Moine
08a683d204
replace IdleXLoop with usleep 2024-09-27 21:25:03 +02:00
Gwenhael Le Moine
dea07d3bcc
document where ui calls were in emulator.c (even if there's not used there anymore) 2024-09-27 21:24:15 +02:00
Gwenhael Le Moine
a39e209394
move increasing t1_count here otherwise it would never be 2024-09-27 21:23:23 +02:00

View file

@ -225,13 +225,13 @@ static void EmulatorLoop( void )
/* DrawLcd(); */
/* Emulator Interrupt Request */
if ( ( t1_count & INT_T1_MASK ) == 0 && emulator_int_req ) {
if ( ( t1_count++ & INT_T1_MASK ) == 0 && emulator_int_req ) {
ChfCondition CPU_I_EMULATOR_INT, CHF_INFO ChfEnd;
ChfSignal();
}
/* X Events handling */
/* HandleXEvents(); */
/* UI Events handling */
// ui_get_event();
/* Handle serial port */
HandleSerial();
@ -324,7 +324,7 @@ static ChfAction EmulatorLoopHandler( const ChfDescriptor* d, const ChfState s,
this ensures that the latest LCD updated actually
get to the screen.
*/
// DrawLcd();
// ui_update_display();
/* Handle serial port activity before entering the outer idle
loop, because this could possibly bring the cpu out of
@ -399,6 +399,7 @@ static ChfAction EmulatorLoopHandler( const ChfDescriptor* d, const ChfState s,
*/
debug1( DEBUG_C_TIMERS, CPU_I_IDLE_X_LOOP, ms );
// IdleXLoop( ms );
usleep( ms );
/* End of idle loop; compute actual elapsed time */
gettimeofday( &end_idle, NULL );