Entry | |
---|---|
R0 | Pointer to Mode Selector Block describing the required properties of the overlay |
R1 | Aspect ratio to use when calculating returned min/max scale values |
Top 16 bits = width | |
Bottom 16 bits = height | |
R2 | Flags |
Bit 0: Overlay must support scaling | |
Bits 1-31 reserved, should be zero | |
R3 | Mask of which heads the overlay is to be used with |
R4 | Bits 0-23: 20 (reason code) |
Bits 24-31: Driver number |
Exit | |
---|---|
R0 | Overlay number |
R1 | Flags: |
Bits 0-7: Overlay type (0 = Z-Order, 1 = Basic, 2+ reserved) | |
Bits 8-31: Reserved | |
R2 | Minimum width overlay can be scaled to |
R3 | Minimum height overlay can be scaled to |
R4 | 0 |
R5 | Maximum width overlay can be scaled to |
R6 | Maximum height overlay can be scaled to |
- | All other registers preserved |
Creates a new hardware overlay.
For rotated overlays, the aspect ratio and the returned width & height values correspond to the rotated form of the overlay, i.e. as it will appear on screen.
GraphicsV drivers are not required or expected to support dynamic allocation of buffers – if multiple buffers are desired, the necessary number of buffers must be specified in the mode selector via mode variable 13.
If an overlay supports alpha formats, it’s expected that it will be alpha-blended by the hardware. TCK for overlays currently isn’t supported (only the desktop should use TCK).
To account for driver restrictions and to allow for more optimal memory management, all overlays for a driver will be destroyed when the driver changes mode.
Because some GraphicsV reason codes can accept either a driver number or a head number in bits 16-23 of R4, drivers should choose overlay numbers such that they don’t overlap the range of head numbers.
Overlay hardware falls into two basic categories: “Z-Order” and “Basic”. Z-Order hardware allows full control of the Z order of the created overlays. Basic hardware offers no control of the Z order, and it’s expected that they’re placed somewhere between the desktop and the mouse pointer.
Currently the API restricts Z-Order overlays to be placed underneath the desktop. Alpha-blending or transparency colour key (TCK) must be used to mark out the desktop areas through which the overlay(s) should be visible.
Because Basic overlays are on top of the desktop, software must take care to hide them when necessary, e.g. if an error message appears which the user must be able to see.
The Mode Selector Block is expected to include some additional Mode Variable Numbers. Refer to Extended Framebuffer Format Specification for ModeFlags and NColour values:
Value | Name | Meaning |
---|---|---|
0 | ModeFlags | Data format and colour space information |
3 | NColour | Maximum logical colour |
13 | MinScreenBanks | Optional. If omitted, 1 overlay bank should be assumed |