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

GraphicsV 5

GraphicsV
» GraphicsV 5

Graphics Vector (42)

Entry  
R0 Flags
Bit 0 = pointer display enable (0=off, 1=on)
Bit 1 = pointer shape update (0=no change, 1=updated)
Bits 2-31 reserved
R1 X position of pointer
R2 Y position of pointer
R3 shape_t descriptor block
R4 Bits 0-23: 5 (reason code)
Bits 24-31: Driver number
Exit  
R4 0 if request handled by hardware pointer, else preserved if software pointer required
- All other registers preserved

Use

The kernel issues this call during VSync when the pointer shape or position changes. The appropriate driver should respond by performing the requested action and setting R4 to 0 to claim the call.

The coordinates given in R1 and R2 are measured in pixels, and indicate the top-left corner of the pointer image. 0,0 would place the image in the top-left corner of the screen.

R3 points to a shape_t descriptor block:

typedef struct shape_t
{
  uint8   width;      /* unpadded width in bytes (see notes) */
  uint8   height;     /* in pixels */
  uint8   padding[2]; /* 2 bytes of padding for field alignment */
  void   *buffLA;     /* logical address of buffer holding pixel data */
  void   *buffPA;     /* corresponding physical address of buffer */
}

Notes

  • If R0 bit 0 is 0 (pointer off), R1-R3 are undefined
  • The shape data from RISC OS is always padded with transparent pixels on the rhs, to a width of 32 pixels (8 bytes)
  • Pointer clipping is the responsibility of the video driver (eg. may be able to allow display of pointer in border region on some h/w)
  • The buffer for the pixel data is aligned to a multiple of 256 bytes or better.

A simple video driver, where hardware permits, can use the shape data in the buffer directly, ignoring the updated flag. The OS guarantees that the buffer data is valid for the whole time it is to be displayed. Other drivers may need to make copies of the data, e.g. for conversion to different pixel formats.

Software pointer support

If a driver does not provide full support for a hardware pointer then it can indicate this by having GraphicsV 8 return with bit 1 of R0 clear. The OS will then render a software pointer whenever a call to GraphicsV 5 comes back as unclaimed (R4 unchanged). This allows for selective use of the software pointer, e.g. if the hardware pointer can only be used in some portions of the screen. Note that the driver must take care to disable the hardware pointer when a request is received to move it into an area in which it cannot be displayed.

See also

  • GraphicsV
Revised on July 10, 2015 13:43:12 by Jeffrey Lee (213) (5.148.5.244)
Edit | Back in time (6 revisions) | See changes | History | Views: Print | Source | Linked from: HAL Video API, GraphicsV 1, GraphicsV, GraphicsV 8, Proposed GraphicsV enhancements

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 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