SAGA_VIDEO_MODE Register

Change the current SAGA Video Mode,

including PixelFormat and DoubleScan flags.


  • SAGA_VIDEO_MODE
  • 0xDFF1F4
  • Write-Only
  • 16-bits

A valid SAGA Video Mode value is an addition of :

  • Low Byte : SAGA_VIDEO_FORMAT
  • High Byte : SAGA_VIDEO_DBLSCAN

This enumeration is used to describe the PixelFormat of the Video.

Name Value BytesPerPixel Description
SAGA_VIDEO_FORMAT_OFF 0x00 _ Chunky-DMA Off
SAGA_VIDEO_FORMAT_CLUT8 0x01 1 CLUT8
SAGA_VIDEO_FORMAT_RGB16 0x02 2 R5|G6|B5
SAGA_VIDEO_FORMAT_RGB15 0x03 2 -|R5|G5|B5
SAGA_VIDEO_FORMAT_RGB24 0x04 3 R8|G8|B8
SAGA_VIDEO_FORMAT_RGB32 0x05 4 -|R8|G8|B8
SAGA_VIDEO_FORMAT_YUV422 0x06 2 Y4|U2|V2

This enumeration is used to describe the DoubleScan flag of the Video.

Name Value Description
SAGA_VIDEO_DBLSCAN_OFF 0x00 Normal Display
SAGA_VIDEO_DBLSCAN_X 0x01 Double output each X-Pixel (X-DoubleScan)
SAGA_VIDEO_DBLSCAN_Y 0x02 Double output each Row (Y-DoubleScan)
SAGA_VIDEO_DBLSCAN_XY 0x03 Double output (XY-DoubleScan)

Example in C:

#define SAGA_VIDEO_MODE 0x00DFF1F4

#define SAGA_VIDEO_FORMAT_OFF    0
#define SAGA_VIDEO_FORMAT_CLUT8  1
#define SAGA_VIDEO_FORMAT_RGB16  2 //   R5|G6|B5
#define SAGA_VIDEO_FORMAT_RGB15  3 // -|R5|G5|B5
#define SAGA_VIDEO_FORMAT_RGB24  4 //   R8|G8|B8
#define SAGA_VIDEO_FORMAT_RGB32  5 // -|R8|G8|B8
#define SAGA_VIDEO_FORMAT_YUV422 6 //   Y4|U2|V2

#define SAGA_VIDEO_DBLSCAN_OFF   0
#define SAGA_VIDEO_DBLSCAN_X     1
#define SAGA_VIDEO_DBLSCAN_Y     2
#define SAGA_VIDEO_DBLSCAN_XY    (SAGA_VIDEO_DBLSCAN_X | SAGA_VIDEO_DBLSCAN_Y)

#define SAGA_VIDEO_MODE_FORMAT(x) (((x) & 0xff) << 0)
#define SAGA_VIDEO_MODE_DBLSCN(x) (((x) & 0xff) << 8)

// Video Mode = DblScan OFF + RGB16

*(volatile UWORD *)SAGA_VIDEO_MODE = 
  SAGA_VIDEO_MODE_FORMAT(SAGA_VIDEO_FORMAT_RGB16) |
  SAGA_VIDEO_MODE_DBLSCN(SAGA_VIDEO_DBLSCAN_OFF);

// Video Mode = DblScan XY + CLUT8

*(volatile UWORD *)SAGA_VIDEO_MODE = 
  SAGA_VIDEO_MODE_FORMAT(SAGA_VIDEO_FORMAT_CLUT8) |
  SAGA_VIDEO_MODE_DBLSCN(SAGA_VIDEO_DBLSCAN_XY);
Example in ASM:

SAGA_VIDEO_MODE EQU $DFF1F4

SAGA_VIDEO_FORMAT_OFF    EQU $00
SAGA_VIDEO_FORMAT_CLUT8  EQU $01
SAGA_VIDEO_FORMAT_RGB16  EQU $02 ;   R5|G6|B5
SAGA_VIDEO_FORMAT_RGB15  EQU $03 ; -|R5|G5|B5
SAGA_VIDEO_FORMAT_RGB24  EQU $04 ;   R8|G8|B8
SAGA_VIDEO_FORMAT_RGB32  EQU $05 ; -|R8|G8|B8
SAGA_VIDEO_FORMAT_YUV422 EQU $06 ;   Y4|U2|V2

SAGA_VIDEO_DBLSCAN_OFF   EQU $00
SAGA_VIDEO_DBLSCAN_X     EQU $01
SAGA_VIDEO_DBLSCAN_Y     EQU $02
SAGA_VIDEO_DBLSCAN_XY    EQU (SAGA_VIDEO_DBLSCAN_X | SAGA_VIDEO_DBLSCAN_Y)

; Video Mode = DblScan OFF + RGB16

MOVE.W #$0002,$DFF1F4
MOVE.W #(SAGA_VIDEO_FORMAT_RGB16|SAGA_VIDEO_DBLSCAN_OFF<<8),SAGA_VIDEO_MODE

; Video Mode = DblScan XY + CLUT8

MOVE.W #$0301,$DFF1F4
MOVE.W #(SAGA_VIDEO_FORMAT_CLUT8|SAGA_VIDEO_DBLSCAN_XY<<8),SAGA_VIDEO_MODE

Home | Links | SAGA | SAGA Video | SAGA Registers

  • saga_video_mode.txt
  • Last modified: 2016/05/23 19:07
  • (external edit)