Atlas - VGA.H

Home / systems / IBM-PC / PhotonX / src Lines: 1 | Size: 1442 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1#ifndef VGA_H 2#define VGA_H 3 4#include <dos.h> 5 6#define VGA_SEG 0xA000 7#define VGA_MODE_TEXT_80x25 0x03 8#define VGA_MODE_320x200x256 0x13 9 10typedef unsigned char uint8_t; 11typedef unsigned short uint16_t; 12 13extern unsigned char far *vga; 14 15/* Core mode + utility */ 16void vga_set_mode(uint8_t mode); 17 18/* Text mode API (whitepaper-aligned) */ 19void vga_text_setcolor(uint8_t fg, uint8_t bg); 20void vga_text_gotoxy(uint8_t x, uint8_t y); 21void vga_text_putch(char c); 22void vga_text_puts(const char *str); 23void vga_text_cls(void); 24 25/* Graphics mode API (whitepaper-aligned) */ 26void vga_set_palette(uint8_t index, uint8_t r, uint8_t g, uint8_t b); 27void vga_gfx_setclscolor(uint8_t color); 28void vga_gfx_cls(void); 29void vga_gfx_putpixel(uint16_t x, uint16_t y, uint8_t color); 30void vga_gfx_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t color); 31void vga_gfx_rect(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t color); 32void vga_gfx_circle(uint16_t x, uint16_t y, uint16_t radius, uint8_t color); 33void vga_gfx_putch(char c, int x, int y, uint8_t color); 34void vga_gfx_puts(const char *str, int x, int y, uint8_t color); 35 36/* Compatibility names for existing code */ 37void set_mode(unsigned char mode); 38void set_palette(unsigned char index, unsigned char r, unsigned char g, unsigned char b); 39void clear_screen(unsigned char color); 40void put_pixel(int x, int y, unsigned char color); 41 42#endif
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.