VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I've been experimenting with custom video modes in int10_modes.cpp, but I don't fully understand all the items in the mode list. The first few lines look like this:

/* mode  ,type     ,sw  ,sh  ,tw ,th ,cw,ch ,pt,pstart  ,plength,htot,vtot,hde,vde special flags */
{ 0x000 ,M_TEXT ,360 ,400 ,40 ,25 ,9 ,16 ,8 ,0xB8000 ,0x0800 ,50 ,449 ,40 ,400 ,_EGA_HALF_CLOCK },
{ 0x001 ,M_TEXT ,360 ,400 ,40 ,25 ,9 ,16 ,8 ,0xB8000 ,0x0800 ,50 ,449 ,40 ,400 ,_EGA_HALF_CLOCK },
{ 0x002 ,M_TEXT ,720 ,400 ,80 ,25 ,9 ,16 ,8 ,0xB8000 ,0x1000 ,100 ,449 ,80 ,400 ,0 },

I can figure out some of the abbreviations in the top row, but not all, and would be grateful for any help. Here's what I understand, more or less:

mode = mode number (of course)
type = text, graphic, etc.
sw, sh = width and height in pixels???
tw, th = width and height in columns and rows???
cw, ch = character width and height in pixels
pt = point size???
pstart, plength = start and length of BIOS region???
htot, wtot = ???
hde, vde = ???
special flags = self-explanatory

I would be very grateful for any clarification - or for a pointer of where to look for one. Thanks for any help.

Last edited by emendelson on 2013-07-23, 01:15. Edited 1 time in total.

Reply 1 of 5, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

pt = page total (# of pages)
pstart = page start (linear address of first page)
plength = page length (page size)
htot,vtot = horizontal,vertical total (scan area)
hde,vde = horizontal,vertical display end (display area)

Reply 2 of 5, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Perfect - thank you!

Reply 3 of 5, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Sorry to come back to this thread after three years, but I wonder if anyone can explain how to determine the numbers for:

htot,vtot = horizontal,vertical total (scan area)
hde,vde = horizontal,vertical display end (display area)

Are these calculated from lines, columns, point size, etc., or must they be figured out by hand? I'll be very grateful for any help with this.

Reply 4 of 5, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The display end should be easy for your custom text modes, because generally: vde = sh, hde = tw

htot and vtot should each be larger than the display area (in pixels), with the extra representing overscan, retrace, and blanking. Together with clocking they determine the time taken to draw a line and the time taken to draw the full frame. Try to follow the example of existing modes, and you can use a debugger build to see the horizontal and vertical timings.

http://wiki.osdev.org/Video_Signals_And_Timin … lay_Composition

Reply 5 of 5, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Thank you for that; that (and the link) explains everything I didn't know.

One more question: how important is it that htot and vtot are exactly right? Or (as it seems) is it all right to have a number that is large enough, even if it's larger than necessary?

Now it's time for me to make a debug build and figure out how to use it...