#include "biosvar.h" // GET_GLOBAL
#include "output.h" // warn_internalerror
+#include "std/vga.h" // struct video_param_s
#include "stdvga.h" // stdvga_find_mode
#include "string.h" // memcpy_far
#include "vgabios.h" // video_param_table
SET_FARVAR(seg, *dest, 0xffff);
}
+static struct video_save_pointer_s video_save_pointer_table VAR16;
+
+static struct video_param_s video_param_table[29] VAR16;
+
void
stdvga_build_video_param(void)
{
+ SET_BDA(video_savetable
+ , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
+ SET_VGA(video_save_pointer_table.videoparam
+ , SEGOFF(get_global_seg(), (u32)video_param_table));
+
static u8 parammodes[] VAR16 = {
0, 0, 0, 0, 0x04, 0x05, 0x06, 0x07,
0, 0, 0, 0, 0, 0x0d, 0x0e, 0,
#include "config.h" // CONFIG_*
#include "output.h" // dprintf
#include "std/vbe.h" // VBE_RETURN_STATUS_FAILED
+#include "std/vga.h" // struct video_func_static
#include "stdvga.h" // stdvga_set_cursor_shape
#include "string.h" // memset_far
#include "vgabios.h" // calc_page_size
#define __VGABIOS_H
#include "config.h" // CONFIG_VGA_EMULATE_TEXT
+#include "farptr.h" // GET_FARVAR
#include "types.h" // u8
-#include "farptr.h" // struct segoff_s
-#include "std/vga.h" // struct video_param_s
// Save/Restore flags
#define SR_HARDWARE 0x0001
extern u8 vgafont16alt[];
// vgainit.c
-extern struct video_save_pointer_s video_save_pointer_table;
-extern struct video_param_s video_param_table[29];
-
-// vgabios.c
extern int VgaBDF;
extern int HaveRunInit;
+
+// vgabios.c
#define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val))
int vga_bpp(struct vgamode_s *vmode_g);
u16 calc_page_size(u8 memmodel, u16 width, u16 height);
#include "vgabios.h" // video_save_pointer_table
#include "vgahw.h" // vgahw_setup
-struct video_save_pointer_s video_save_pointer_table VAR16;
-
-struct video_param_s video_param_table[29] VAR16;
-
// Type of emulator platform - for dprintf with certain compile options.
int PlatformRunningOn VAR16;
SET_BDA(modeset_ctl, 0x51);
SET_BDA(dcc_index, CONFIG_VGA_STDVGA_PORTS ? 0x08 : 0xff);
- SET_BDA(video_savetable
- , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
// FIXME
SET_BDA(video_msr, 0x00); // Unavailable on vanilla vga, but...
init_bios_area();
- SET_VGA(video_save_pointer_table.videoparam
- , SEGOFF(get_global_seg(), (u32)video_param_table));
if (CONFIG_VGA_STDVGA_PORTS)
stdvga_build_video_param();