5 ms·
Nice read. I wouldn’t have minded more technical details about the implementation and challenges, but that’s probably because I’ve had to write generic SVGA dri
by ComputerGuru 4y ago
Nice read. I wouldn’t have minded more technical details about the implementation and challenges, but that’s probably because I’ve had to write generic SVGA drivers to support generic graphics cards before. (I’m not clear on what was the more convenient alternative to VMs that the author ended up using, though?)
Side-bar but still on-topic: It really irks me to no end that Windows 3.x and Windows 95 could get a fairly hardware-agnostic (fallback) software-rendered GUI fully up and running and exposed to user space in the early 90s and even today Linux/BSD can’t manage that (even just in SVGA mode) without vendor specific drivers. Xfree86 and then Xorg with the fb driver were attempts at doing the same but I can attest they never achieved that same universality. I had hoped EFI fb could finally give us the same for modern PCs but the chances of open source efifb drivers in userland working on a chipset/implementation they haven’t been tested against are a real crapshoot.
I had “success” (compared to the status quo, not compared to the situation on Windows) writing X drivers that wrote to the kernel framebuffer but that broke when everything was rewritten or deprecated in order to support EFI. Even then, the support for listing supported modes and changing to them was very poor (which make sense given how little serious use the kernel frame buffer sees), never mind figuring out what modes intersected with those the display supported. Laptops with integrated plus discrete graphics cards (or desktop motherboards with the same) were also problematic for various reasons.
- fredoralive 4y agoWasn’t Windows back then dependent on vendor supplied device specific display drivers for anything above basic VGA? There wasn’t a real standard for “SVGA”, and the VBE stuff wasn’t that well supported early on? The Windows fallback until circa Windows XP was good old 640x480x16.
- tomcam 4y ago> Wasn’t Windows back then dependent on vendor supplied device specific display drivers for anything above basic VGA? In theory, yes, but the reality was starkly different as I recall (I worked there in the late 90s). In my experience, Microsoft was doing a ton of heavy lifting helping vendors with device drivers.
- illys 4y agoI remember using a 800x600 16 color generic SVGA driver with early Windows (3.11 or 95?). At registry level, I guess the mode was made mostly standard as a derivate of the 640x480 16 color standard VGA mode. Indeed both modes fit within the 64 kiB segment using 4 layers and matching the 256 kiB of VGA memory.
- mjg59 4y agoHistorically you wanted the -vesa Xorg driver, today -modesetting should work fine on the firmware-provided framebuffer using simpledrm. But the EFI spec provides no way to change screenmode at runtime, so you're going to need a native driver for that under all circumstances.
- Teknoman117 4y agoI remember using Xvesa in the 00's on 90's hardware with great success. Damn Small Linux, etc. iirc, -vesa got kinda bad after the advent of the "GPU". Cards didn't natively support VBE and emulated a subset of it just for compatibility purposes. It's gotten worse these days. I don't know if I'd call it a bad thing though - with the push for hardware accelerated rendering to help with battery life on portable devices, many of the desktop environments have lost support for "software" graphics. They instead depend on software OpenGL support via llvmpipe and chug hard even on modern devices (if you don't have a driver installed) and VMs.
- mjg59 4y agoSome degree of VBE is required for Windows to boot in BIOS mode (and even in EFI mode before Windows 8 for really tedious reasons). I'd expect it to be fine for basic mode setting, but you're still stuck with the modes the card firmware provides which means it's probably 4:3 ratios.
- bibaheu 4y agoWhat are those tedious reasons? Like when booting on very old hardware, you got a Vista-like splash screen on Win7?
- mjg59 4y agoSome part of the boot stack expected to be able to make VBE calls to set the inital screen mode before loading actual drivers, which means hardware that wants to support Windows 7 needs to provide a CSM layer to support that even if it's otherwise booting via EFI (the CSM layer just rewrites VBE calls into EFI GOP calls, so the graphics card doesn't need to provide VBE itself)
- kevin_thibedeau 4y agoI recently installed FreeDOS on a Ryzen system to get a parallel port device working. It boots fine but anything that uses graphics modes is flaky and will often hang the machine hard where Ctrl+Alt+Del doesn't work. SB16 compatibility is out of the question. Curiously I got it into a weird mode where artifacts from a corrupted framebuffer in DOS were persistent on screen as a faint ghost image after booting into Linux even when cycling the power for a short duration. I have no idea how that could happen.
- deaddodo 4y ago> Curiously I got it into a weird mode where artifacts from a corrupted framebuffer in DOS were persistent on screen as a faint ghost image after booting into Linux even when cycling the power for a short duration. I have no idea how that could happen. This is most definitely a hardware issue with your display, not the frame buffer. What you describe would require alpha blending in software and couldn’t just “happen” with a linear array of corrupted bytes; it would require intentionality.
- kevin_thibedeau 4y agoI cycled (soft) power on the screen too. It was persistent during the BIOS boot phase, kernel text framebuffer, and into Wayland.
- diffuse_l 4y agoRegarding the more convenient alternative - as I understand it, it was using assembler and compiler that can run on a modern system, and only passing the floppy image between the host and the vm, instead of running the development tools inside the vm.
- bananaboy 4y agoYes my understanding of the article was that he was cross-compiling and cross-assembling on his modern system.
- 6451937099 4y agoS