61 points by ingve 2 days ago | 2 comments
rasz 2 days ago
> VGA is only a slightly extended superset of the EGA

People remember EGA as being planar and VGA packed/chunky in its most widely used mode 13h 320x200@256.

In reality VGA never stopped being planar internally. VGA like EGA before supports 256KB of ram, but instead of simply giving user access to linear sliding 64KB window it arranges video ram into 4 chained planes. Writing 4 consecutive pixels at 0x0 stores those in video memory 64KB apart.

Depending on the implementation all this complexity can add up. Simply turning off Chaining is not enough, but can be bypassed by engaging VESA linear modes. Effect can be miniscule:

Toshiba Satellite T2130CS CT65545 https://www.youtube.com/watch?v=7PjA6PfyWW8 Mode Y: 28 fps. 13h: 36 fps. VESA: 37 fps

be significant:

SiS 6326 PCI https://www.youtube.com/watch?v=minIT5dBCVQ Mode Y: 55 fps. 13h: 59 fps. VBE2 (LFB): 75 fps

or outright massive:

Rendition Veritè V2200 (internally a MIPS based DSP emulates VGA core in software) https://www.youtube.com/watch?v=6unNuPympE4 Mode Y: 14 fps. 13h: 59 fps. VBE2 (LFB, PM): 305 fps!

There was even a Tweak released for one vendor (Trident) http://www.geocities.ws/liaor2/myutil/m13speed.html that intercepted setting mode 13h and switched it for custom VESA underneath.

"M13speed examines all video BIOS calls (10h.) If the call is a request for VGA mode13h (320x200 256-color), M13speed replaces the call with a request for VESA SVGA 640x400x8 (mode 100h.) ... The TSR's response to setmode13h includes issuing a VESA setmode100h (640x400 SVGA) request, reprogramming the VGA CRTC and SR registers to setup a 320x200 display field, which looks, feels, smells like MCGA 320x200."

"Without m13speed, the 9680 posted MCGA ("vidspeed L") write performance of 14mb/sec. ...loaded m13speed and re-tested my 9680's MCGA performance - 50mb/sec"

userbinator 2 days ago
Writing 4 consecutive pixels at 0x0 stores those in video memory 64KB apart.

I don't think "64KB apart" would make much sense either, especially because of the flexibility of the VGA memory controller described in the article; they end up in 4 separate 64KB planes. Unless you're referring to the linear view of the framebuffer that post-VGA GPUs use, in which case the mapping between the planes and LFB can differ considerably between implementations: https://stackoverflow.com/questions/36269239/meaning-of-byte...

rasz 2 days ago
Yes. Bytes land in separate planes which afaik are 64KB apart in video memory if you would/could access it linearly. I think it was performance driven decision in the design of EGA with 4 parallel ram banks enabling 4x faster solid color fills etc. Both MCGA and VESA VBE cut all that crap out only allowing linear buffer which greatly simplified hardware interface unlocked new optimization possibilities.

All VGA clones still have to at least pretend mode 13h writes are divided into planes.

bananaboy 18 minutes ago
Personally I never think of them being 64kb apart since you can’t access it linearly (without vesa at least and all the stuff I do for VGA is pre-vesa). I think of it as stacked planes.
Dwedit 7 hours ago
The thing that really surprised me is how rare actual IBM MCGA cards were, yet the MCGA-compatible VGA mode was so widely used.
fredoralive 4 hours ago
MCGA was basically a cut down VGA on the motherboard of the low end 8086 / ISA PS/2s, and both chipsets were introduced at the same time. Next-to-no-one would want a not-quite-VGA that lacks high res colour or EGA modes, so nearly nobody bothered cloning it, only the higher end option. The only known clone is in a couple of Epson models, and like the PS/2s it’s a motherboard integrated chip, not an expansion board.
torgoguys 5 hours ago
Because it was the only "standard" 256-color mode back in the day, supported by both mcga and vga. MCGA cards had just enough ram to support this mode (64kb) while vga cards were a strict superset and had a full 256k of ram.