|R4||Bits 0-23: Reason Code|
|Bits 24-31: Driver number|
|Other registers dependant on call|
This vector is used by the RISC OS 5 kernel to communicate with the video driver.
User software should always aim to use the appropriate OS SWI instead of calling GraphicsV directly. The information presented here is mainly of use to OS maintainers and video driver developers.
R4 is used by all GraphicsV calls to store both the reason code and to indicate whether the call has been claimed (i.e. acted upon by a driver). When a driver claims a call it will set R4 to zero. By checking R4 after calling GraphicsV it is possible to determine whether the driver supports that call or not.
|0||Null reason code for when vector has been claimed|
|1||VSync interrupt occurred||BG||SVC/IRQ|
|10||Write palette entry||FG/BG||SVC/IRQ|
|11||Write palette entries||FG/BG||SVC/IRQ|
|12||Read palette entry||FG||SVC|
|16||Select startup mode||FG||SVC|
|17||List pixel formats||FG||SVC|
GraphicsV based video drivers should perform the following sequence of events on startup:
Once OS_ScreenMode 65 is called the driver should expect to start receiving GraphicsV calls from the OS and from other software. Before that point no calls should be received, and if they are then it’s a bug in someone else’s code and not yours.
On shutdown drivers should use the following sequence:
Note that OS_ScreenMode reasons 64-67 must only be called from the foreground.
See also HAL Video API for details on how the OS translates GraphicsV calls to HAL calls for systems which contain a video driver in their HAL.
1 Calling contexts
GraphicsV drivers can be called under a variety of different situations. Consult the table above, and the list below, to determine the situations in which each entry point may be called and how the implementation is allowed to behave.
2 GraphicsV 2
As an addition to the above rules, drivers are free to ignore any background calls they receive while they are in the middle of processing a mode change.
3 GraphicsV 3
This call is deprecated. Interlace settings should be specified via the VIDC list and associated control list items given to GraphicsV 2/7.