diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-01 22:36:51 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-01 22:36:51 +0100 |
commit | e5ba9cb62c62a4a9cb9012dfd45870bc5b988def (patch) | |
tree | 403f8fec75c23480be95dd34d27a28bcfc5c8ec1 /src/vga.c | |
parent | 64c046ab4b00ffeab223364b70b75588bac31978 (diff) | |
download | gold-mine-run-e5ba9cb62c62a4a9cb9012dfd45870bc5b988def.tar.gz gold-mine-run-e5ba9cb62c62a4a9cb9012dfd45870bc5b988def.zip |
Add function to wait for VGA's vsync
Diffstat (limited to 'src/vga.c')
-rw-r--r-- | src/vga.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -24,6 +24,12 @@ void set_mode(uint8_t mode) __dpmi_int(0x10, ®s); } +void wait_vsync() +{ + while (inportb(0x3da) & 8); + while (!(inportb(0x3da) & 8)); +} + void set_palette(const uint8_t *palette) { outportb(0x3c8, 0); |