Lab 5: VBE Framebuffer And XPM
Generated folder: labs/graphics/
Lab 5 turns the screen into memory. You select a VBE-style graphics mode, map a linear framebuffer, compute pixel addresses, draw rectangles, parse small XPM sprites, and present frames.
Device Model
| Concept | Meaning |
|---|---|
| mode info | width, height, pitch, bits per pixel |
| linear framebuffer | contiguous pixel memory |
| pitch | bytes between row starts |
| color format | how color bytes are stored |
| present | show the prepared frame |
Pitch is not always width * bytes_per_pixel.
Plan
- Query mode information.
- Set the requested graphics mode.
- Map the framebuffer once.
- Compute pixel offsets with pitch.
- Clip rectangles and sprites.
Next: implementation tasks.