Signed-off-by: Kevin O'Connor kevin@koconnor.net --- vgasrc/bochsvga.c | 122 ++++++++++++++++++++++++++-------------------------- vgasrc/clext.c | 32 +++++++------- vgasrc/vbe.c | 6 +- 3 files changed, 80 insertions(+), 80 deletions(-)
diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c index cbd0b41..213dbcd 100644 --- a/vgasrc/bochsvga.c +++ b/vgasrc/bochsvga.c @@ -14,68 +14,68 @@ static struct bochsvga_mode struct vgamode_s info; } bochsvga_modes[] VAR16 = { /* standard modes */ - { 0x100, { MM_PACKED, 640, 400, 8 } }, - { 0x101, { MM_PACKED, 640, 480, 8 } }, - { 0x102, { MM_PLANAR, 800, 600, 4 } }, - { 0x103, { MM_PACKED, 800, 600, 8 } }, - { 0x104, { MM_PLANAR, 1024, 768, 4 } }, - { 0x105, { MM_PACKED, 1024, 768, 8 } }, - { 0x106, { MM_PLANAR, 1280, 1024, 4 } }, - { 0x107, { MM_PACKED, 1280, 1024, 8 } }, - { 0x10D, { MM_DIRECT, 320, 200, 15 } }, - { 0x10E, { MM_DIRECT, 320, 200, 16 } }, - { 0x10F, { MM_DIRECT, 320, 200, 24 } }, - { 0x110, { MM_DIRECT, 640, 480, 15 } }, - { 0x111, { MM_DIRECT, 640, 480, 16 } }, - { 0x112, { MM_DIRECT, 640, 480, 24 } }, - { 0x113, { MM_DIRECT, 800, 600, 15 } }, - { 0x114, { MM_DIRECT, 800, 600, 16 } }, - { 0x115, { MM_DIRECT, 800, 600, 24 } }, - { 0x116, { MM_DIRECT, 1024, 768, 15 } }, - { 0x117, { MM_DIRECT, 1024, 768, 16 } }, - { 0x118, { MM_DIRECT, 1024, 768, 24 } }, - { 0x119, { MM_DIRECT, 1280, 1024, 15 } }, - { 0x11A, { MM_DIRECT, 1280, 1024, 16 } }, - { 0x11B, { MM_DIRECT, 1280, 1024, 24 } }, - { 0x11C, { MM_PACKED, 1600, 1200, 8 } }, - { 0x11D, { MM_DIRECT, 1600, 1200, 15 } }, - { 0x11E, { MM_DIRECT, 1600, 1200, 16 } }, - { 0x11F, { MM_DIRECT, 1600, 1200, 24 } }, + { 0x100, { MM_PACKED, 640, 400, 8, 8, 16, SEG_GRAPH } }, + { 0x101, { MM_PACKED, 640, 480, 8, 8, 16, SEG_GRAPH } }, + { 0x102, { MM_PLANAR, 800, 600, 4, 8, 16, SEG_GRAPH } }, + { 0x103, { MM_PACKED, 800, 600, 8, 8, 16, SEG_GRAPH } }, + { 0x104, { MM_PLANAR, 1024, 768, 4, 8, 16, SEG_GRAPH } }, + { 0x105, { MM_PACKED, 1024, 768, 8, 8, 16, SEG_GRAPH } }, + { 0x106, { MM_PLANAR, 1280, 1024, 4, 8, 16, SEG_GRAPH } }, + { 0x107, { MM_PACKED, 1280, 1024, 8, 8, 16, SEG_GRAPH } }, + { 0x10D, { MM_DIRECT, 320, 200, 15, 8, 16, SEG_GRAPH } }, + { 0x10E, { MM_DIRECT, 320, 200, 16, 8, 16, SEG_GRAPH } }, + { 0x10F, { MM_DIRECT, 320, 200, 24, 8, 16, SEG_GRAPH } }, + { 0x110, { MM_DIRECT, 640, 480, 15, 8, 16, SEG_GRAPH } }, + { 0x111, { MM_DIRECT, 640, 480, 16, 8, 16, SEG_GRAPH } }, + { 0x112, { MM_DIRECT, 640, 480, 24, 8, 16, SEG_GRAPH } }, + { 0x113, { MM_DIRECT, 800, 600, 15, 8, 16, SEG_GRAPH } }, + { 0x114, { MM_DIRECT, 800, 600, 16, 8, 16, SEG_GRAPH } }, + { 0x115, { MM_DIRECT, 800, 600, 24, 8, 16, SEG_GRAPH } }, + { 0x116, { MM_DIRECT, 1024, 768, 15, 8, 16, SEG_GRAPH } }, + { 0x117, { MM_DIRECT, 1024, 768, 16, 8, 16, SEG_GRAPH } }, + { 0x118, { MM_DIRECT, 1024, 768, 24, 8, 16, SEG_GRAPH } }, + { 0x119, { MM_DIRECT, 1280, 1024, 15, 8, 16, SEG_GRAPH } }, + { 0x11A, { MM_DIRECT, 1280, 1024, 16, 8, 16, SEG_GRAPH } }, + { 0x11B, { MM_DIRECT, 1280, 1024, 24, 8, 16, SEG_GRAPH } }, + { 0x11C, { MM_PACKED, 1600, 1200, 8, 8, 16, SEG_GRAPH } }, + { 0x11D, { MM_DIRECT, 1600, 1200, 15, 8, 16, SEG_GRAPH } }, + { 0x11E, { MM_DIRECT, 1600, 1200, 16, 8, 16, SEG_GRAPH } }, + { 0x11F, { MM_DIRECT, 1600, 1200, 24, 8, 16, SEG_GRAPH } }, /* BOCHS modes */ - { 0x140, { MM_DIRECT, 320, 200, 32 } }, - { 0x141, { MM_DIRECT, 640, 400, 32 } }, - { 0x142, { MM_DIRECT, 640, 480, 32 } }, - { 0x143, { MM_DIRECT, 800, 600, 32 } }, - { 0x144, { MM_DIRECT, 1024, 768, 32 } }, - { 0x145, { MM_DIRECT, 1280, 1024, 32 } }, - { 0x146, { MM_PACKED, 320, 200, 8 } }, - { 0x147, { MM_DIRECT, 1600, 1200, 32 } }, - { 0x148, { MM_PACKED, 1152, 864, 8 } }, - { 0x149, { MM_DIRECT, 1152, 864, 15 } }, - { 0x14a, { MM_DIRECT, 1152, 864, 16 } }, - { 0x14b, { MM_DIRECT, 1152, 864, 24 } }, - { 0x14c, { MM_DIRECT, 1152, 864, 32 } }, - { 0x178, { MM_DIRECT, 1280, 800, 16 } }, - { 0x179, { MM_DIRECT, 1280, 800, 24 } }, - { 0x17a, { MM_DIRECT, 1280, 800, 32 } }, - { 0x17b, { MM_DIRECT, 1280, 960, 16 } }, - { 0x17c, { MM_DIRECT, 1280, 960, 24 } }, - { 0x17d, { MM_DIRECT, 1280, 960, 32 } }, - { 0x17e, { MM_DIRECT, 1440, 900, 16 } }, - { 0x17f, { MM_DIRECT, 1440, 900, 24 } }, - { 0x180, { MM_DIRECT, 1440, 900, 32 } }, - { 0x181, { MM_DIRECT, 1400, 1050, 16 } }, - { 0x182, { MM_DIRECT, 1400, 1050, 24 } }, - { 0x183, { MM_DIRECT, 1400, 1050, 32 } }, - { 0x184, { MM_DIRECT, 1680, 1050, 16 } }, - { 0x185, { MM_DIRECT, 1680, 1050, 24 } }, - { 0x186, { MM_DIRECT, 1680, 1050, 32 } }, - { 0x187, { MM_DIRECT, 1920, 1200, 16 } }, - { 0x188, { MM_DIRECT, 1920, 1200, 24 } }, - { 0x189, { MM_DIRECT, 1920, 1200, 32 } }, - { 0x18a, { MM_DIRECT, 2560, 1600, 16 } }, - { 0x18b, { MM_DIRECT, 2560, 1600, 24 } }, - { 0x18c, { MM_DIRECT, 2560, 1600, 32 } }, + { 0x140, { MM_DIRECT, 320, 200, 32, 8, 16, SEG_GRAPH } }, + { 0x141, { MM_DIRECT, 640, 400, 32, 8, 16, SEG_GRAPH } }, + { 0x142, { MM_DIRECT, 640, 480, 32, 8, 16, SEG_GRAPH } }, + { 0x143, { MM_DIRECT, 800, 600, 32, 8, 16, SEG_GRAPH } }, + { 0x144, { MM_DIRECT, 1024, 768, 32, 8, 16, SEG_GRAPH } }, + { 0x145, { MM_DIRECT, 1280, 1024, 32, 8, 16, SEG_GRAPH } }, + { 0x146, { MM_PACKED, 320, 200, 8, 8, 16, SEG_GRAPH } }, + { 0x147, { MM_DIRECT, 1600, 1200, 32, 8, 16, SEG_GRAPH } }, + { 0x148, { MM_PACKED, 1152, 864, 8, 8, 16, SEG_GRAPH } }, + { 0x149, { MM_DIRECT, 1152, 864, 15, 8, 16, SEG_GRAPH } }, + { 0x14a, { MM_DIRECT, 1152, 864, 16, 8, 16, SEG_GRAPH } }, + { 0x14b, { MM_DIRECT, 1152, 864, 24, 8, 16, SEG_GRAPH } }, + { 0x14c, { MM_DIRECT, 1152, 864, 32, 8, 16, SEG_GRAPH } }, + { 0x178, { MM_DIRECT, 1280, 800, 16, 8, 16, SEG_GRAPH } }, + { 0x179, { MM_DIRECT, 1280, 800, 24, 8, 16, SEG_GRAPH } }, + { 0x17a, { MM_DIRECT, 1280, 800, 32, 8, 16, SEG_GRAPH } }, + { 0x17b, { MM_DIRECT, 1280, 960, 16, 8, 16, SEG_GRAPH } }, + { 0x17c, { MM_DIRECT, 1280, 960, 24, 8, 16, SEG_GRAPH } }, + { 0x17d, { MM_DIRECT, 1280, 960, 32, 8, 16, SEG_GRAPH } }, + { 0x17e, { MM_DIRECT, 1440, 900, 16, 8, 16, SEG_GRAPH } }, + { 0x17f, { MM_DIRECT, 1440, 900, 24, 8, 16, SEG_GRAPH } }, + { 0x180, { MM_DIRECT, 1440, 900, 32, 8, 16, SEG_GRAPH } }, + { 0x181, { MM_DIRECT, 1400, 1050, 16, 8, 16, SEG_GRAPH } }, + { 0x182, { MM_DIRECT, 1400, 1050, 24, 8, 16, SEG_GRAPH } }, + { 0x183, { MM_DIRECT, 1400, 1050, 32, 8, 16, SEG_GRAPH } }, + { 0x184, { MM_DIRECT, 1680, 1050, 16, 8, 16, SEG_GRAPH } }, + { 0x185, { MM_DIRECT, 1680, 1050, 24, 8, 16, SEG_GRAPH } }, + { 0x186, { MM_DIRECT, 1680, 1050, 32, 8, 16, SEG_GRAPH } }, + { 0x187, { MM_DIRECT, 1920, 1200, 16, 8, 16, SEG_GRAPH } }, + { 0x188, { MM_DIRECT, 1920, 1200, 24, 8, 16, SEG_GRAPH } }, + { 0x189, { MM_DIRECT, 1920, 1200, 32, 8, 16, SEG_GRAPH } }, + { 0x18a, { MM_DIRECT, 2560, 1600, 16, 8, 16, SEG_GRAPH } }, + { 0x18b, { MM_DIRECT, 2560, 1600, 24, 8, 16, SEG_GRAPH } }, + { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } }, };
static u16 dispi_get_max_xres(void) diff --git a/vgasrc/clext.c b/vgasrc/clext.c index 39f3b2a..ea2b428 100644 --- a/vgasrc/clext.c +++ b/vgasrc/clext.c @@ -227,42 +227,42 @@ struct cirrus_mode_s { };
static struct cirrus_mode_s cirrus_modes[] VAR16 = { - {0x5f,{MM_PACKED,640,480,8},0x00, + {0x5f,{MM_PACKED,640,480,8,8,16,SEG_GRAPH},0x00, cseq_640x480x8,cgraph_svgacolor,ccrtc_640x480x8}, - {0x64,{MM_DIRECT,640,480,16},0xe1, + {0x64,{MM_DIRECT,640,480,16,8,16,SEG_GRAPH},0xe1, cseq_640x480x16,cgraph_svgacolor,ccrtc_640x480x16}, - {0x66,{MM_DIRECT,640,480,15},0xf0, + {0x66,{MM_DIRECT,640,480,15,8,16,SEG_GRAPH},0xf0, cseq_640x480x16,cgraph_svgacolor,ccrtc_640x480x16}, - {0x71,{MM_DIRECT,640,480,24},0xe5, + {0x71,{MM_DIRECT,640,480,24,8,16,SEG_GRAPH},0xe5, cseq_640x480x24,cgraph_svgacolor,ccrtc_640x480x24},
- {0x5c,{MM_PACKED,800,600,8},0x00, + {0x5c,{MM_PACKED,800,600,8,8,16,SEG_GRAPH},0x00, cseq_800x600x8,cgraph_svgacolor,ccrtc_800x600x8}, - {0x65,{MM_DIRECT,800,600,16},0xe1, + {0x65,{MM_DIRECT,800,600,16,8,16,SEG_GRAPH},0xe1, cseq_800x600x16,cgraph_svgacolor,ccrtc_800x600x16}, - {0x67,{MM_DIRECT,800,600,15},0xf0, + {0x67,{MM_DIRECT,800,600,15,8,16,SEG_GRAPH},0xf0, cseq_800x600x16,cgraph_svgacolor,ccrtc_800x600x16},
- {0x60,{MM_PACKED,1024,768,8},0x00, + {0x60,{MM_PACKED,1024,768,8,8,16,SEG_GRAPH},0x00, cseq_1024x768x8,cgraph_svgacolor,ccrtc_1024x768x8}, - {0x74,{MM_DIRECT,1024,768,16},0xe1, + {0x74,{MM_DIRECT,1024,768,16,8,16,SEG_GRAPH},0xe1, cseq_1024x768x16,cgraph_svgacolor,ccrtc_1024x768x16}, - {0x68,{MM_DIRECT,1024,768,15},0xf0, + {0x68,{MM_DIRECT,1024,768,15,8,16,SEG_GRAPH},0xf0, cseq_1024x768x16,cgraph_svgacolor,ccrtc_1024x768x16},
- {0x78,{MM_DIRECT,800,600,24},0xe5, + {0x78,{MM_DIRECT,800,600,24,8,16,SEG_GRAPH},0xe5, cseq_800x600x24,cgraph_svgacolor,ccrtc_800x600x24}, - {0x79,{MM_DIRECT,1024,768,24},0xe5, + {0x79,{MM_DIRECT,1024,768,24,8,16,SEG_GRAPH},0xe5, cseq_1024x768x24,cgraph_svgacolor,ccrtc_1024x768x24},
- {0x6d,{MM_PACKED,1280,1024,8},0x00, + {0x6d,{MM_PACKED,1280,1024,8,8,16,SEG_GRAPH},0x00, cseq_1280x1024x8,cgraph_svgacolor,ccrtc_1280x1024x8}, - {0x69,{MM_DIRECT,1280,1024,15},0xf0, + {0x69,{MM_DIRECT,1280,1024,15,8,16,SEG_GRAPH},0xf0, cseq_1280x1024x16,cgraph_svgacolor,ccrtc_1280x1024x16}, - {0x75,{MM_DIRECT,1280,1024,16},0xe1, + {0x75,{MM_DIRECT,1280,1024,16,8,16,SEG_GRAPH},0xe1, cseq_1280x1024x16,cgraph_svgacolor,ccrtc_1280x1024x16},
- {0x7b,{MM_PACKED,1600,1200,8},0x00, + {0x7b,{MM_PACKED,1600,1200,8,8,16,SEG_GRAPH},0x00, cseq_1600x1200x8,cgraph_svgacolor,ccrtc_1600x1200x8}, };
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c index d7dd8b4..caf856d 100644 --- a/vgasrc/vbe.c +++ b/vgasrc/vbe.c @@ -100,7 +100,7 @@ vbe_104f01(struct bregs *regs) SET_FARVAR(seg, info->winB_attributes, 0); SET_FARVAR(seg, info->win_granularity, GET_GLOBAL(VBE_win_granularity)); SET_FARVAR(seg, info->win_size, 64); /* Bank size 64K */ - SET_FARVAR(seg, info->winA_seg, SEG_GRAPH); + SET_FARVAR(seg, info->winA_seg, GET_GLOBAL(vmode_g->sstart)); SET_FARVAR(seg, info->winB_seg, 0x0); SET_FARVAR(seg, info->win_func_ptr.segoff, 0x0); int width = GET_GLOBAL(vmode_g->width); @@ -109,8 +109,8 @@ vbe_104f01(struct bregs *regs) SET_FARVAR(seg, info->bytes_per_scanline, linesize); SET_FARVAR(seg, info->xres, width); SET_FARVAR(seg, info->yres, height); - SET_FARVAR(seg, info->xcharsize, 8); - SET_FARVAR(seg, info->ycharsize, 16); + SET_FARVAR(seg, info->xcharsize, GET_GLOBAL(vmode_g->cwidth)); + SET_FARVAR(seg, info->ycharsize, GET_GLOBAL(vmode_g->cheight)); if (depth == 4) SET_FARVAR(seg, info->planes, 4); else