mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
intwrap vbe and vga calls
This commit is contained in:
1 parent
56912f57b6
commit
65936631e4
6 files changed
+244
-555
No files matched your search
@@ -19,6 +19,7 @@
|
||||
// TODO: Deprecated and broken. Needs to be converted to Video Driver!
|
||||
|
||||
#include <grub/machine/vga.h>
|
||||
#include <grub/machine/int.h>
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/term.h>
|
||||
@@ -82,6 +83,25 @@ static grub_font_t font = 0;
|
||||
#define INPUT_STATUS1_REGISTER 0x3DA
|
||||
#define INPUT_STATUS1_VERTR_BIT 0x08
|
||||
|
||||
static unsigned char
|
||||
grub_vga_set_mode (unsigned char mode)
|
||||
{
|
||||
struct grub_bios_int_registers regs;
|
||||
unsigned char ret;
|
||||
/* get current mode */
|
||||
regs.eax = 0x0f00;
|
||||
regs.ebx = 0;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
|
||||
ret = regs.eax & 0xff;
|
||||
regs.eax = mode;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
wait_vretrace (void)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user