Showing changes from revision #7 to #8:
Added | Removed | Changed
The HAL only attempts to abstract the hardware controller aspects of the OS video. It does not (yet) consider pixel formats, framestore layout, hardware graphics acceleration. All these would affect a great deal of RISC OS graphics code that forms much of the value of the OS. This means that the envisaged HAL/RISC OS combination makes some specific assumptions about graphics framestore layout as follows:
Bits | Meaning |
---|---|
0-4 | Red |
5-9 | Green |
10-14 | Blue |
15 | Supremacy (0=solid, 1=transparent) |
Bits | Meaning |
---|---|
0-7 | Red |
8-15 | Green |
16-23 | Blue |
24-31 | Supremacy (0=solid, 255=transparent) |
Bits | |
---|---|
0-7 | Reserved (0), or Supremacy (0=solid, 255=transparent) |
8-15 | Red |
16-23 | Green |
24-31 | Blue |
Note that it is possible to support hardware where only some pixel depths are available, or only some fit the RISC OS assumptions. Also some hardware has some configurability for ‘arbitrary’ choices like RGB versus BGR ordering. Hence, the restrictions are typically much less severe than might first be thought.
Supporting a software only pointer/cursor is feasible (much less work than new pixel formats) but not yet considered.
Items marked ¶ are internal calls for OS use only; their functionality and availability is subject to change without warning. User programs interested in using these calls should instead use the equivalent RISC OS SWI call (if available).
Starting with RISC OS 5.21, on startup the OS will issue a call to HAL_VideoPixelFormats to detect if the HAL video API is implemented. If this call returns non-zero then the OS will register a “HAL” driver with GraphicsV and map GraphicsV calls to HAL calls as follows:
For VSync events, the OS will use HAL_VideoFlybackDevice to determine the IRQ device number to respond to, and will call GraphicsV 1 as appropriate whenever the interrupt fires.
Note that HAL_VideoSetPowerSave is currently not available via GraphicsV.
Prior to RISC OS 5.21, any calls made to GraphicsV which were for driver zero and were not handled by a driver module would be forwarded onto the HAL. Additionally, some HAL video calls were required to be implemented for module-based drivers to operate correctly.