Skip to content

Utilizing unused VGA memory #137

@toncho11

Description

@toncho11

It seems that only 64 kb of VGA memory are mapped to RAM and modes 10 and 13h are optimized to use less than 64 kb to control the screen. This means that on VGA cards with 256kb of RAM or 512kb most of the video ram is unused?

Is it possible to write a kind of frame buffer that uses page flipping and VGA X mode? X mode will reduce the usable memory to 185 kb, but that still seems plenty.

Below is what I am reading:

Performance Gains
Page flipping and Mode X are used together to overcome two major performance bottlenecks of the VGA card:

A. Eliminating Screen Tearing (Page Flipping)
Mode X is the first VGA mode that allows hardware-based page flipping, which is critical for smooth animation. Mode 13h (the standard 320×200 mode) does not allow it, resulting in noticeable screen tearing during animation.

B. Accelerated Drawing (Mode X)
Mode X's unchained planar access allows the CPU to write data to all four memory planes simultaneously. This means a single CPU write operation can affect four bytes of VRAM, effectively quadrupling the VRAM write bandwidth for operations like clearing the screen or copying large sprites (blitting), which is highly beneficial for a frame buffer approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions