matos/drivers/vga.h

29 lines
660 B
C
Raw Normal View History

2018-07-20 15:41:58 +02:00
#pragma once
2024-01-29 23:27:10 +01:00
#include "stdint.h"
2019-05-15 23:20:03 +02:00
#include "types.h"
2018-07-20 15:41:58 +02:00
// https://wiki.osdev.org/Text_UI
#define BLACK 0x00
#define BLUE 0x01
#define GREEN 0x02
#define CYAN 0x03
#define RED 0x04
2018-07-20 15:41:58 +02:00
#define MAGENTA 0x05
#define BROWN 0x06
#define GREY 0x07
#define WHITE 0x0F
2018-07-20 15:41:58 +02:00
#define VGA_ADDR 0xB8000
#define VGA_WIDTH 80
2018-07-20 15:41:58 +02:00
#define VGA_HEIGHT 25
2021-01-25 20:05:38 +01:00
#define VGA_STATUS_LINE_HEIGHT 1
2018-11-08 22:08:27 +01:00
int VGASetup(uint bgColor, uint color);
2021-01-25 14:00:06 +01:00
void VGAPutc(const char str);
2021-10-25 21:29:02 +02:00
int VGAConfigure(int addr, uint width, uint height);
2021-01-25 14:00:06 +01:00
void VGAPrintf(uint color, uint bgColor, int startX, int startY, const char *format, ...);
void VGAClearLine(uint bgColor, uint line);
void VGAScrollUp(void);
2021-10-25 21:29:02 +02:00
void VGAMap(void);