Add method to wait for some frames in CRT.
This commit is contained in:
parent
a49102fbac
commit
9d8bede050
@ -1,10 +1,13 @@
|
||||
#include "crt.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void crt_waitNextFrame(void) {
|
||||
void (*frame_sync_detection_routine)(void) = (void *)0xc75b;
|
||||
__asm__("push af");
|
||||
frame_sync_detection_routine();
|
||||
__asm__("pop af");
|
||||
}
|
||||
}
|
||||
|
||||
void crt_waitFrames(uint16_t n) {
|
||||
for (uint16_t i = 0; i < n; ++i)
|
||||
crt_waitNextFrame();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user