aboutsummaryrefslogtreecommitdiff
path: root/src/vga.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-29 23:12:34 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-29 23:12:34 +0100
commit3f7b9d71c75360207dd05b8cb67131b08f2c18ca (patch)
tree135ed5430b14b9901662f662f7f1dd72015dc21a /src/vga.c
parent623b1dfa54e77d3ca21fb64e200a32ee9a61c021 (diff)
downloadgold-mine-run-3f7b9d71c75360207dd05b8cb67131b08f2c18ca.tar.gz
gold-mine-run-3f7b9d71c75360207dd05b8cb67131b08f2c18ca.zip
Move wait_time to vga
Diffstat (limited to 'src/vga.c')
-rw-r--r--src/vga.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vga.c b/src/vga.c
index 83ee2c7..1190b6e 100644
--- a/src/vga.c
+++ b/src/vga.c
@@ -75,6 +75,13 @@ void wait_vsync()
while (!(inportb(0x3da) & 8));
}
+void wait_frames(uint16_t frames)
+{
+ /* wait some time */
+ for (uint16_t i = 0; i < frames; i++)
+ wait_vsync();
+}
+
void set_palette(const uint8_t *palette)
{
outportb(0x3c8, 0);