I've got an understanding problem when it comes to the memory mapping of VGA. So I think I've got a wrong assumption somewhere.
From what I've understood, I think that a VGA adapter has 256 KB of memory but usually only exposes 64 KB to the host at any given time. So if you like to have a resolution of 640x480 pixels with 16 colors then you would need 153 600 bytes of the memory. But since the host can only access 64 KB it needs to swap the planes/banks behind the 64 KB window to access different parts of the 256 KB of video memory.
So when I set a mode I write the value 0001|b to the map mask register to select plane #0. When the OS asks my miniport driver for the bank switching code then I return some code that changes the value in the map mask register to 0010|b for example to switch to plane #1.
Now my problem is, that I seem to be the only person who does this. For example, when I looked at how Microsoft sets a mode, I noticed that they write 1111|b in the map mask register and when it comes to providing the code for the bank switching they simply provide a return-instruction with the comment that this function should never be called anyway. When a miniport driver sets a mode they even overwrite the map mask register right afterwards to make sure it contains 1111|b. When I looked at ReactOS I noticed that they haven't even implemented the function that provides the bank switching code.
But how is this possible?