Add basic CRT interaction routine from frame sync.

This commit is contained in:
giomba 2023-10-16 22:12:55 +02:00
parent 828bb38a9a
commit 600b1d7ab3
2 changed files with 16 additions and 0 deletions

10
src/crt.c Normal file
View File

@ -0,0 +1,10 @@
#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");
}

6
src/crt.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef CEDA_CRT_H
#define CEDA_CRT_H
void crt_waitNextFrame(void);
#endif // CEDA_CRT_H