VOGONS


First post, by blaalb

User metadata
Rank Newbie
Rank
Newbie

hello there.

Can somebody help?

I try to page flip with VBE function 4F07h (setDisplayStart). Most parts work, only the lower part of the screen rest black. I can't write pixel there. I think it is, because i have only 32 banks (~2MB vram), but i need 36 banks for mode 112h (640x480x32).

Question one: can i get more vram (4 - 10 MB) to get more banks?

Question two: VBE function 4F01h (getModeInfo) returns for 'NumberOfBanks' every a 1. Does somebody know why? Have this value not to be a 32 or 20h?

Kindly regards,
blaalb

Reply 1 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Please read the VESA specs, banks are scanlinen groupings and certainly not relevant for your problem or any regular svga-style graphics.

What you are looking for are windowing routines, and for your mode they have 64k granularity.

Reply 2 of 9, by blaalb

User metadata
Rank Newbie
Rank
Newbie

Hello wd.

Your answer is for question two?

getModeInfo returns for 'NumberOfBanks' every a 1

VBE Spec says:

NumberOfBanks . This is the number of banks in which the scan lines are grouped. The quotient 
from dividing the scan line number by the number of banks is the bank that contains the scan line
and the remainder is the scan line number within the bank. For example, CGA graphics modes
have two banks and Hercules graphics mode has four banks. For modes that don't have scanline
banks (such as VGA modes 0Dh-13h), this field should be set to 1.

For modes that don't have scanline
banks (such as VGA modes 0Dh-13h), this field should be set to 1.

I read it like this:
The Byte for NumberOfBanks have only to be a 1, if i use a non banked vga mode.

But your right, this isn't a part of my problem (just confused me). I need more banks. Can i get more banks? 😀

Greetz,
blaalb

Reply 3 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The Byte for NumberOfBanks have only to be a 1, if i use a non banked vga mode.

And in all other cases it's also 1 except for CGA modes.

I need more banks. Can i get more banks?

Again, you don't need *any* banks, you need the windowing functions.

Reply 4 of 9, by blaalb

User metadata
Rank Newbie
Rank
Newbie

Thanks for your patience.

Which functions are the windowing functions?

What i use at the moment is function 4f05h to switch to the needed bank to write pixel bytes there. And it works ... i'm confused. Is it releated to realmode or protected mode programming?

Reply 5 of 9, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

There are unofficial builds of DOSBox that allow you to increase the video memory size. But before you resort to those, how did you arrive at 36 banks (windows, or whatever you want to call them)? With a 64K window size you'd need 19 (18.75) of them by my calculation. Is it because of the page flipping?

Reply 6 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

There is absolutely zero point in increasing the graphics card memory size for this mode.

Reply 7 of 9, by blaalb

User metadata
Rank Newbie
Rank
Newbie

Hi ripsaw. I get 18.x too, my fault.

Okay wd, please, don't let my 'die stupid'. With which functions can i do what i want, if 4f05h isn't the right choice?

Reply 8 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

4f05 is absolutely correct.

Your real problem is the "page flipping". You need to assure that the accessed memory is
within vram limits, in your case the easiest thing to do is checking the "number of image pages"
field for the selected mode. In dosbox you'll get 1 there so "page flipping" with 4f05/4f07 is not possible.

Either use 640x480x16bpp or read ripsaw's reply (or don't do vesa programming these days).

Reply 9 of 9, by blaalb

User metadata
Rank Newbie
Rank
Newbie

Okay. Thanks for your help.