X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=src%2Fvideo.h;h=f8d49402faa91f4c5dcdd314054da388df888541;hp=645675a7af4126e82f1400bd3c89a92176505dff;hb=22dd4db1a4ff756f76bdd87062c2252fe3091228;hpb=91fc6b749ad3a64c9a2686952eb30be517c6beb9 diff --git a/src/video.h b/src/video.h index 645675a..f8d4940 100644 --- a/src/video.h +++ b/src/video.h @@ -1,9 +1,49 @@ +/* +pcboot - bootable PC demo/game kernel +Copyright (C) 2018 John Tsiombikas + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #ifndef VIDEO_H_ #define VIDEO_H_ +struct video_mode { + int mode; + int width, height; + int bpp; + int rbits, gbits, bbits; + int rshift, gshift, bshift; + unsigned int rmask, gmask, bmask; +}; + void set_vga_mode(int mode); +void *set_video_mode(int mode); +int find_video_mode_idx(int xsz, int ysz, int bpp); + +int video_mode_count(void); +int video_mode_info(int n, struct video_mode *vid); + +int get_color_bits(int *rbits, int *gbits, int *bbits); +int get_color_mask(unsigned int *rmask, unsigned int *gmask, unsigned int *bmask); +int get_color_shift(int *rshift, int *gshift, int *bshift); + +const char *get_video_vendor(void); +int get_video_mem_size(void); + /* defined in video_asm.s */ void wait_vsync(void); +void set_pal_entry(unsigned char idx, unsigned char r, unsigned char g, unsigned char b); #endif /* VIDEO_H_ */