SAGA_VIDEO_CLUT Registers

Change the current palette of the SAGA 8-bits Video Mode.


  • SAGA_VIDEO_CLUT
  • From 0xDFF400 To 0xDFF7FC
  • Write-Only
  • 32-bits

256-colors lookup table for use with the 8bits Chunky video mode.

Each color are 32-bits length, in the ARGB (-|R8|G8|B8) format.

See SAGA_VIDEO_MODE register and the SAGA_VIDEO_CLUT8 mode.


Set the 4 first colors, using direct addresses :

MOVE.L  #$0000FF,$DFF400 ; Set Color #001
MOVE.L  #$0006FF,$DFF404 ; Set Color #002
MOVE.L  #$000CFF,$DFF408 ; Set Color #003
MOVE.L  #$0012FF,$DFF40C ; Set Color #004

Set the 4 first colors, using the base address :

MOVE.L  #$0000FF,$DFF400+(0*4) ; Set Color #001
MOVE.L  #$0006FF,$DFF400+(1*4) ; Set Color #002
MOVE.L  #$000CFF,$DFF400+(2*4) ; Set Color #003
MOVE.L  #$0012FF,$DFF400+(3*4) ; Set Color #004

Load a full palette from DATA :

SAGA_VIDEO_CLUT EQU $DFF400   ; 

Main:
  LEA     Palette,a0          ; Load Palette
  MOVE.L  #SAGA_VIDEO_CLUT,a1 ; CLUT Register base
  MOVEQ.L #256-1,d7           ; 256 colors
.loop                         ; For each colors
  MOVE.L  (a0)+,(a1)+         ; Write color in register
  DBF     d7,.loop            ; Next
  RTS
  
  EVEN
Palette:
  DC.L $FF0000FF,$FF0006FF,$FF000CFF,$FF0012FF,$FF0018FF,$FF001EFF,$FF0024FF,$FF002AFF
  DC.L $FF0030FF,$FF0036FF,$FF003CFF,$FF0042FF,$FF0048FF,$FF004EFF,$FF0054FF,$FF005AFF
  DC.L $FF0060FF,$FF0066FF,$FF006CFF,$FF0072FF,$FF0078FF,$FF007EFF,$FF0084FF,$FF008AFF
  DC.L $FF0090FF,$FF0096FF,$FF009CFF,$FF00A2FF,$FF00A8FF,$FF00AEFF,$FF00B4FF,$FF00BAFF
  DC.L $FF00C0FF,$FF00C6FF,$FF00CCFF,$FF00D2FF,$FF00D8FF,$FF00DEFF,$FF00E4FF,$FF00EAFF
  DC.L $FF00F0FF,$FF00F6FF,$FF00FCFF,$FF00FFF9,$FF00FFF3,$FF00FFED,$FF00FFE7,$FF00FFE1
  DC.L $FF00FFDB,$FF00FFD5,$FF00FFCF,$FF00FFC9,$FF00FFC3,$FF00FFBD,$FF00FFB7,$FF00FFB1
  DC.L $FF00FFAB,$FF00FFA5,$FF00FF9F,$FF00FF99,$FF00FF93,$FF00FF8D,$FF00FF87,$FF00FF81
  DC.L $FF00FF7B,$FF00FF75,$FF00FF6F,$FF00FF69,$FF00FF63,$FF00FF5D,$FF00FF57,$FF00FF51
  DC.L $FF00FF4B,$FF00FF45,$FF00FF3F,$FF00FF39,$FF00FF33,$FF00FF2D,$FF00FF27,$FF00FF21
  DC.L $FF00FF1B,$FF00FF15,$FF00FF0F,$FF00FF09,$FF00FF03,$FF06FF00,$FF0CFF00,$FF12FF00
  DC.L $FF18FF00,$FF1EFF00,$FF24FF00,$FF2AFF00,$FF30FF00,$FF36FF00,$FF3CFF00,$FF42FF00
  DC.L $FF48FF00,$FF4EFF00,$FF54FF00,$FF5AFF00,$FF60FF00,$FF66FF00,$FF6CFF00,$FF72FF00
  DC.L $FF78FF00,$FF7EFF00,$FF84FF00,$FF8AFF00,$FF90FF00,$FF96FF00,$FF9CFF00,$FFA2FF00
  DC.L $FFA8FF00,$FFAEFF00,$FFB4FF00,$FFBAFF00,$FFC0FF00,$FFC6FF00,$FFCCFF00,$FFD2FF00
  DC.L $FFD8FF00,$FFDEFF00,$FFE4FF00,$FFEAFF00,$FFF0FF00,$FFF6FF00,$FFFCFF00,$FFFFF900
  DC.L $FFFFF300,$FFFFED00,$FFFFE700,$FFFFE100,$FFFFDB00,$FFFFD500,$FFFFCF00,$FFFFC900
  DC.L $FFFFC300,$FFFFBD00,$FFFFB700,$FFFFB100,$FFFFAB00,$FFFFA500,$FFFF9F00,$FFFF9900
  DC.L $FFFF9300,$FFFF8D00,$FFFF8700,$FFFF8100,$FFFF7B00,$FFFF7500,$FFFF6F00,$FFFF6900
  DC.L $FFFF6300,$FFFF5D00,$FFFF5700,$FFFF5100,$FFFF4B00,$FFFF4500,$FFFF3F00,$FFFF3900
  DC.L $FFFF3300,$FFFF2D00,$FFFF2700,$FFFF2100,$FFFF1B00,$FFFF1500,$FFFF0F00,$FFFF0900
  DC.L $FFFF0300,$FFFF0006,$FFFF000C,$FFFF0012,$FFFF0018,$FFFF001E,$FFFF0024,$FFFF002A
  DC.L $FFFF0030,$FFFF0036,$FFFF003C,$FFFF0042,$FFFF0048,$FFFF004E,$FFFF0054,$FFFF005A
  DC.L $FFFF0060,$FFFF0066,$FFFF006C,$FFFF0072,$FFFF0078,$FFFF007E,$FFFF0084,$FFFF008A
  DC.L $FFFF0090,$FFFF0096,$FFFF009C,$FFFF00A2,$FFFF00A8,$FFFF00AE,$FFFF00B4,$FFFF00BA
  DC.L $FFFF00C0,$FFFF00C6,$FFFF00CC,$FFFF00D2,$FFFF00D8,$FFFF00DE,$FFFF00E4,$FFFF00EA
  DC.L $FFFF00F0,$FFFF00F6,$FFFF00FC,$FFF900FF,$FFF300FF,$FFED00FF,$FFE700FF,$FFE100FF
  DC.L $FFDB00FF,$FFD500FF,$FFCF00FF,$FFC900FF,$FFC300FF,$FFBD00FF,$FFB700FF,$FFB100FF
  DC.L $FFAB00FF,$FFA500FF,$FF9F00FF,$FF9900FF,$FF9300FF,$FF8D00FF,$FF8700FF,$FF8100FF
  DC.L $FF7B00FF,$FF7500FF,$FF6F00FF,$FF6900FF,$FF6300FF,$FF5D00FF,$FF5700FF,$FF5100FF
  DC.L $FF4B00FF,$FF4500FF,$FF3F00FF,$FF3900FF,$FF3300FF,$FF2D00FF,$FF2700FF,$FF2100FF
  DC.L $FF1B00FF,$FF1500FF,$FF0F00FF,$FF0900FF,$FF0300FF,$FFFFFFFF,$FFFFFFFF,$FFFFFFFF
  
  END

Home | Links | SAGA | SAGA Video | SAGA Registers

  • saga_video_clut.txt
  • Last modified: 2016/06/24 02:26
  • (external edit)