Home XBIOSXBIOS Keyboard functionsKeyboard functions XBIOS function listXBIOS function list

4.22 VIDIX XBIOS extension

VIDIX (VIDeo Interface for *niX) is a programming interface for Unix-like operating systems that allows direct access to the framebuffer of a video card. VIDIX integration inside TOS (for CT60/CTPCI/Firebee) was added on January 24, 2007.

• vdxConfigPlayback      Prepare BES (BackEnd Scaler).
• vdxDestroy             Quit driver.
• vdxGetCapability       Get capability.
• vdxGetGrKeys           Get graphic keys.
• vdxGetVersion          Get version.
• vdxInit                Initialize driver.
• vdxPlaybackCopyFrame   Copy frame with DMA.
• vdxPlaybackFrameSelect Prepare frame.
• vdxPlaybackGetDeint    Get interlacing.
• vdxPlaybackGetEq       Get color correction.
• vdxPlaybackOff         Deactivate BES (BackEnd Scaler).
• vdxPlaybackOn          Activate BES (BackEnd Scaler).
• vdxPlaybackSetDeint    Set interlacing.
• vdxPlaybackSetEq       Set color correction.
• vdxProbe               Probe the board.
• vdxQueryDMAStatus      Get DMA status.
• vdxQueryFourcc         Request fourcc.
• vdxSetGrKeys           Set graphic keys.

4.22.1 vdxConfigPlayback

Name: »vdxConfigPlayback« - Prepare BES (BackEnd Scaler).
 
Opcode: 406 (0x0196)
 
Syntax: int32_t vdxConfigPlayback ( vidix_playback_t *info ) ;
 
Description: Driver should prepare BES on this call.
 
APP pass to driver the following info:
 
Field Meaning
vidix_playback_t.fourcc Contains fourcc of movie.
vidix_playback_t.capability Currently contains a copy of vidix_capability_t.flags.
vidix_playback_t.blend_factor Currently unused.
vidix_playback_t.src x,y,w,h fields contain original movie size (in pixels) x and y often are nulls.
vidix_playback_t.src.pitch y, u, v fields contain source pitches for each Y,U,V plane in bytes (For packed fourcc only Y value is used). They are hints for driver to use same destinition pitches as in source memory (to speed up memcpy process). Note: when source pitches are unknown or variable these field will be filled into 0.
vidix_playback_t.dest x,y,w,h fields contains destination rectangle on the screen in pixels.
vidix_playback_t.num_frames Maximal # of frames which can be used by APP. (Currently 10).

Driver should fill following fields:
 
Field Meaning
vidix_playback_t.num_frames Real # of frames which will be used by driver. (Should be less or equal to app's num_frames).
vidix_playback_t.dest.pitch y, u, v fields should contain alignment for each Y,U,V plane in bytes. (For packed fourcc only Y value is used).
vidix_playback_t.frame_size Driver should tell to app which size of source frame (src.w and src.h) should use APP (according to pitches and offsets).
vidix_playback_t.offsets Offsets from begin of BES memory for each frame.
vidix_playback_t.offset y, u, v fields should contain offset for each Y,U,V plane within frame. (For packed fourcc only Y value is used).
vidix_playback_t.dga_addr Address of BES memory.

Also see this picture:
 
    VIDEO MEMORY layout:
     +-----------  It's begin of video memory     End of video memory--------------+
     |                                                                             |
     v                                                                             v
     [      RGB memory                         |         YUV memory    |  UNDEF    ]
                                               ^
                                               |
                                               +---- begin of BES memory
    BES MEMORY layout:
     +-------- begin of BES memory
     |
     v
     [ | |                      |       |       |
       ^ ^                      ^       ^       ^
       | |                      |       |       + BEGIN of second frame
       | |                      |       + BEGIN of V plane
       | |                      + BEGIN of U plane
       | +------- BEGIN of Y plane
       |
       +--------- BEGIN of first frame

This means that in general case:
offset of frame != offset of BES
offset of Y plane != offset of first frame
 
But often: vidix_playback_t.offsets[0] = vidix_playback_t.offset.y = 0;
 
Formula: (For Y plane) copy source to: vidix_playback_t.dga_addr + vidix_playback_t.offsets[i] + vidix_playback_t.offset.y
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackCopyFrame   vdxPlaybackFrameSelect   vdxQueryDMAStatus   vdxQueryFourcc
 

4.22.1.1 Bindings for vdxConfigPlayback

C: int32_t vdxConfigPlayback ( vidix_playback_t *info );
 
Assembler:
 
pea       info         ; Offset 2
move.w    #406,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.2 vdxDestroy

Name: »vdxDestroy« - Quit driver.
 
Opcode: 403 (0x0193)
 
Syntax: void vdxDestroy ( void ) ;
 
Description: Quit the VIDIX driver.
 
Warning: This function is optional.
 
Return value: Nothing.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxInit
 

4.22.2.1 Bindings for vdxDestroy

C: void vdxDestroy ( void );
 
Assembler:
 
move.w    #403,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.3 vdxGetCapability

Name: »vdxGetCapability« - Get capability.
 
Opcode: 404 (0x0194)
 
Syntax: int32_t vdxGetCapability ( vidix_capability_t *to ) ;
 
Description: Driver should return capability with filled vidix_capability_t.type field.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxGetVersion   vdxProbe
 

4.22.3.1 Bindings for vdxGetCapability

C: int32_t vdxGetCapability ( vidix_capability_t *to );
 
Assembler:
 
pea       to           ; Offset 2
move.w    #404,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.4 vdxGetGrKeys

Name: »vdxGetGrKeys« - Get graphic keys.
 
Opcode: 410 (0x019a)
 
Syntax: int32_t vdxGetGrKeys ( vidix_grkey_t *grkey ) ;
 
Description: This interface should be tuned but introduced for overlapped playback and video effects (TYPE_FX).
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxSetGrKeys
 

4.22.4.1 Bindings for vdxGetGrKeys

C: int32_t vdxGetGrKeys ( vidix_grkey_t *grkey );
 
Assembler:
 
pea       grkey        ; Offset 2
move.w    #410,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.5 vdxGetVersion

Name: »vdxGetVersion« - Get version.
 
Opcode: 400 (0x0190)
 
Syntax: unsigned vdxGetVersion ( void ) ;
 
Description: Get the version.
 
Return value: Version.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxGetCapability   vdxProbe
 

4.22.5.1 Bindings for vdxGetVersion

C: unsigned vdxGetVersion ( void );
 
Assembler:
 
move.w    #400,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.6 vdxInit

Name: »vdxInit« - Initialize driver.
 
Opcode: 402 (0x0192)
 
Syntax: int32_t vdxInit ( void ) ;
 
Description: Initialize the VIDIX driver.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxDestroy
 

4.22.6.1 Bindings for vdxInit

C: int32_t vdxInit ( void );
 
Assembler:
 
move.w    #402,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.7 vdxPlaybackCopyFrame

Name: »vdxPlaybackCopyFrame« - Copy frame with DMA.
 
Opcode: 416 (0x01a0)
 
Syntax: int32_t vdxPlaybackCopyFrame ( vidix_dma_t *dmai ) ;
 
Description: Function for copy frame with the DMA.
 
Warning: This function is optional.
 
Return value: Driver should return 0 else EINVAL, ERANGE, ENOMEM, E2BIG or ENOSYS.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxConfigPlayback   vdxPlaybackFrameSelect   vdxQueryDMAStatus   vdxQueryFourcc
 

4.22.7.1 Bindings for vdxPlaybackCopyFrame

C: int32_t vdxPlaybackCopyFrame ( vidix_dma_t *dmai );
 
Assembler:
 
pea       dma          ; Offset 2
move.w    #416,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.8 vdxPlaybackFrameSelect

Name: »vdxPlaybackFrameSelect« - Prepare frame.
 
Opcode: 409 (0x0199)
 
Syntax: int32_t vdxPlaybackFrameSelect ( uint32_t frame ) ;
 
Description: Driver should prepare and activate corresponded frame. This function is used only for double and triple buffering and never used for single buffering playback.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxConfigPlayback   vdxPlaybackCopyFrame   vdxQueryDMAStatus   vdxQueryFourcc
 

4.22.8.1 Bindings for vdxPlaybackFrameSelect

C: int32_t vdxPlaybackFrameSelect ( uint32_t frame );
 
Assembler:
 
move.l    frame,-(sp)  ; Offset 2
move.w    #409,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.9 vdxPlaybackGetDeint

Name: »vdxPlaybackGetDeint« - Get interlacing.
 
Opcode: 414 (0x019e)
 
Syntax: int32_t vdxPlaybackGetDeint ( vidix_deinterlace_t *info ) ;
 
Description: Function for get interlacing.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackSetDeint
 

4.22.9.1 Bindings for vdxPlaybackGetDeint

C: int32_t vdxPlaybackGetDeint ( vidix_deinterlace_t *info );
 
Assembler:
 
pea       info         ; Offset 2
move.w    #414,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.10 vdxPlaybackGetEq

Name: »vdxPlaybackGetEq« - Get color correction.
 
Opcode: 412 (0x019c)
 
Syntax: int32_t vdxPlaybackGetEq ( vidix_video_eq_t *eq ) ;
 
Description: Function for get color correction.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackSetEq
 

4.22.10.1 Bindings for vdxPlaybackGetEq

C: int32_t vdxPlaybackGetEq ( vidix_video_eq_t *eq );
 
Assembler:
 
pea       eq           ; Offset 2
move.w    #412,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.11 vdxPlaybackOff

Name: »vdxPlaybackOff« - Deactivate BES.
 
Opcode: 408 (0x0198)
 
Syntax: int32_t vdxPlaybackOff ( void ) ;
 
Description: Driver should deactivate BES on this call.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackOn
 

4.22.11.1 Bindings for vdxPlaybackOff

C: int32_t vdxPlaybackOff ( void );
 
Assembler:
 
move.w    #408,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.12 vdxPlaybackOn

Name: »vdxPlaybackOn« - Activate BES.
 
Opcode: 407 (0x0197)
 
Syntax: int32_t vdxPlaybackOn ( void ) ;
 
Description: Driver should activate BES on this call.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackOff
 

4.22.12.1 Bindings for vdxPlaybackOn

C: int32_t vdxPlaybackOn ( void );
 
Assembler:
 
move.w    #407,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.13 vdxPlaybackSetDeint

Name: »vdxPlaybackSetDeint« - Set interlacing.
 
Opcode: 415 (0x019f)
 
Syntax: int32_t vdxPlaybackSetDeint ( vidix_deinterlace_t *info ) ;
 
Description: Function for set interlacing.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackGetDeint
 

4.22.13.1 Bindings for vdxPlaybackSetDeint

C: int32_t vdxPlaybackSetDeint ( vidix_deinterlace_t *info );
 
Assembler:
 
pea       info         ; Offset 2
move.w    #415,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.14 vdxPlaybackSetEq

Name: »vdxPlaybackSetEq« - Set color correction.
 
Opcode: 413 (0x019d)
 
Syntax: int32_t vdxPlaybackSetEq ( vidix_video_eq_t *eq ) ;
 
Description: Function for set color correction.
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxPlaybackGetEq
 

4.22.14.1 Bindings for vdxPlaybackSetEq

C: int32_t vdxPlaybackSetEq ( vidix_video_eq_t *eq );
 
Assembler:
 
pea       eq           ; Offset 2
move.w    #413,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.15 vdxProbe

Name: »vdxProbe« - Probe the board.
 
Opcode: 401 (0x0191)
 
Syntax: int32_t vdxProbe ( int32_t verbose, int32_t force ) ;
 
Description: Probe the board. verbose and force are unused for the Atari driver.
 
Return value: Driver should return 0 if it can handle something else ENXIO.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxGetCapability   vdxGetVersion
 

4.22.15.1 Bindings for vdxProbe

C: int32_t vdxProbe ( int32_t verbose, int32_t force );
 
Assembler:
 
move.l    force,-(sp)  ; Offset 6
move.l    verbose,-(sp); Offset 2
move.w    #401,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
lea       10(sp),sp    ; Correct stack

4.22.16 vdxQueryDMAStatus

Name: »vdxQueryDMAStatus« - Get DMA status.
 
Opcode: 417 (0x01a1)
 
Syntax: int32_t vdxQueryDMAStatus ( void ) ;
 
Description: Function for get the status of the DMA after a vdxPlaybackCopyFrame().
 
Warning: This function is optional.
 
Return value: Driver should return 0 or 1 if busy, else ENOSYS.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxConfigPlayback   vdxPlaybackCopyFrame   vdxPlaybackFrameSelect   vdxQueryFourcc
 

4.22.16.1 Bindings for vdxQueryDMAStatus

C: int32_t vdxQueryDMAStatus ( void );
 
Assembler:
 
move.w    #417,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.22.17 vdxQueryFourcc

Name: »vdxQueryFourcc« - Request fourcc.
 
Opcode: 405 (0x0195)
 
Syntax: int32_t vdxQueryFourcc ( vidix_fourcc_t *to ) ;
 
Description: Select requested fourcc, width and height. Driver should answer - can it configure video memory for a given fourcc or not.
 
Return value: Driver should return 0 else ENOSYS.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxConfigPlayback   vdxPlaybackCopyFrame   vdxPlaybackFrameSelect   vdxQueryDMAStatus
 

4.22.17.1 Bindings for vdxQueryFourcc

C: int32_t vdxQueryFourcc ( vidix_fourcc_t *to );
 
Assembler:
 
pea       to           ; Offset 2
move.w    #405,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.22.18 vdxSetGrKeys

Name: »vdxSetGrKeys« - Set graphic keys.
 
Opcode: 411 (0x019b)
 
Syntax: int32_t vdxSetGrKeys ( const vidix_grkey_t *grkey ) ;
 
Description: This interface should be tuned but introduced for overlapped playback and video effects (TYPE_FX).
 
Warning: This function is optional.
 
Return value: Driver should return 0.
 
Availability: CT60/CTPCI hardware acceleration board and FireBee.
 
Group: VIDIX XBIOS extension
 
See also: Binding   vdxGetGrKeys
 

4.22.18.1 Bindings for vdxSetGrKeys

C: int32_t vdxSetGrKeys ( const vidix_grkey_t *grkey );
 
Assembler:
 
pea       grkey        ; Offset 2
move.w    #411,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

Home XBIOSXBIOS Keyboard functionsKeyboard functions XBIOS function listXBIOS function list