screen mode problems
When it switches to video mode lower than 8- bit color, it still shows that it is 8-bit (eg. 640x200x8 instead of 640x480x1) at the right on the vm. please fix this
Could you provide a program/OS invocation that reproduces this?
it is caused by the site itself lemme send a screenshot
windows 1.0 doesnt support vga video modes by default but it says it is 8-bit video mode but it is 4-bit
I think the problem is right here in src/vga.js where a non-SVGA video mode is set. The last argument 8 in that function call is the bpp argument, and this shouldn't be a constant as we can derive bpp from a VGA register.
Bit 6 8BIT of the VGA attribute mode register indicates 8-bit color mode, and bit 1 MONO indicates monochrome mode. If neither of these two bits is set I assume it means 4-bit color mode.
So it's really easy to distinguish 8-, 4- and 1-bit color modes.
I've tested it locally and it seems to work (I get 4 bpp in Windows 1.01 now), I just need to test it a bit more and will submit a PR when done.
EDIT: Tested 8-bit (320x200x8) and 4-bit (640x350x4) modes.
Ok it's fixed, two example screenshots (click to zoom):
320x200x8:
640x350x4:
Monochrome is untested, and I'm not sure if it would work. On osdev it says about the MONO bit:
It is present and programmable in all of the hardware but it apparently does nothing. The internal palette is used to provide monochrome emulation instead.
I'll leave it as a TODO.
Seems to be fixed, thanks @chschnell