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:
|15||Supremacy (0=solid, 1=transparent)|
|24-31||Supremacy (0=solid, 255=transparent)|
|0-7||Reserved (0), or Supremacy (0=solid, 255=transparent)|
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:
|#||GraphicsV call||HAL call(s)|
|1||VSync interrupt occurred||–|
|10||Write palette entry||HAL_VideoWritePaletteEntry|
|11||Write palette entries||HAL_VideoWritePaletteEntries|
|12||Read palette entry||HAL_VideoReadPaletteEntry|
|16||Select startup mode||HAL_VideoStartupMode|
|17||List pixel formats||HAL_VideoPixelFormatList|
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.