RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

HAL Video API

Hardware Abstraction Layer
» List of HAL APIs
» HAL Video API

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:

  • Memory mapped framestore
  • Expected to be contiguous physical memory, can be specific memory (eg. VRAM)
  • Mapped as contiguous logical memory
  • Progressive raster scan in logical memory from top left pixel to bottom right
  • Start of each raster row must be word aligned
  • Number of pixels in a row should be such that row is a whole number of words
  • Spacing between start of each row is a constant number of words, possibly greater than row length (via mode variable, LineLength)
  • 1,2,4,8,16 or 32 bits per pixel (bpp)
  • Little endian pixel packing for 1,2,4 bpp (least significant bits are leftmost pixels)
  • Presence of palette assumed for 1,2,4,8 bpp (8-bits per r,g,b component in each entry)
  • 16 bpp format:
Bits Meaning
0-4 Red
5-9 Green
10-14 Blue
15 Supremacy (0=solid, 1=transparent)
  • 32 bpp format:
Bits Meaning
0-7 Red
8-15 Green
16-23 Blue
24-31 Supremacy (0=solid, 255=transparent)
  • Palette words are 32 bits:
Bits Meaining
0-7 Reserved (0), or Supremacy (0=solid, 255=transparent)
8-15 Red
16-23 Green
24-31 Blue
  • Pointer/cursor is assumed supported in hardware, 32×32 pixels, each pixel either transparent or one of 3 paletted colours
  • Support for physically interlaced, logically progressive framestore via MMU tricks and use of LineLength mode variable, currently not fully integrated into kernel

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.

Entry points

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).

  • HAL_VideoFlybackDevice ¶
  • HAL_Video_SetMode ¶
  • HAL_Video_WritePaletteEntry ¶
  • HAL_Video_WritePaletteEntries ¶
  • HAL_Video_ReadPaletteEntry ¶
  • HAL_Video_SetInterlace ¶
  • HAL_Video_SetBlank ¶
  • HAL_Video_SetPowerSave ¶
  • HAL_Video_UpdatePointer ¶
  • HAL_Video_SetDAG ¶
  • HAL_Video_VetMode ¶
  • HAL_Video_PixelFormats ¶
  • HAL_Video_Features ¶
  • HAL_Video_BufferAlignment ¶
  • HAL_Video_OutputFormat ¶
  • HAL_MonitorLeadID ¶
  • HAL_Video_Render ¶
  • HAL_Video_IICOp ¶

See also

Extended Framebuffer Format Specification – Proposal for extending RISC OS and the HAL to support additional framebuffer formats

Information source: Kernel.Docs.HAL.HAL_API in CVS
Revised on February 8, 2012 13:45:27 by Jeffrey Lee (213) (195.72.173.130)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: HAL entry points from RISC OS, List of HAL APIs, HAL_VideoFlybackDevice, HAL_Video_BufferAlignment, HAL_Video_Features, HAL_Video_ReadPaletteEntry, HAL_Video_SetBlank, HAL_Video_SetDAG, HAL_Video_SetMode, HAL_Video_SetPowerSave, HAL_Video_UpdatePointer, HAL_Video_VetMode, HAL_Video_WritePaletteEntry, HAL_FIQClear, HAL_Video_IICOp, HAL_Video_Render, HAL_IRQClear, OMAP3 HAL, HAL_MonitorLeadID, HAL_Video_OutputFormat, HAL_Video_PixelFormats, HAL_Video_SetInterlace, HAL_Video_WritePaletteEntries, GraphicsV

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys