VduExt 8.34 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
        SUBT    VDU variable numbers => &.Hdr.VduExt

OldOpt  SETA    {OPT}
        OPT     OptNoList+OptNoP1List

; ************************************************************
; ***    C h a n g e   L i s t  (better late than never!)  ***
; ************************************************************

; Date       Name  Description
; ----       ----  -----------
; 27-Oct-89  TMD   Added VIDCClockSpeed
; 05-Aug-91  DDV   Added Flag_FullPalette
; 15-Jul-93  TMD   Added NumModeVars
29
; 21-Jul-98  NDT   Added PixelRate
Neil Turton's avatar
Neil Turton committed
30 31 32 33

; Sets up external symbols of the form VduExt_<var name>
; for use with SWI OS_ReadVDUVariables

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
                              ^ 0
VduExt_ModeFlags              # 1
VduExt_ScrRCol                # 1
VduExt_ScrBRow                # 1
VduExt_NColour                # 1
VduExt_XEigFactor             # 1
VduExt_YEigFactor             # 1
VduExt_LineLength             # 1
VduExt_ScreenSize             # 1
VduExt_YShftFactor            # 1
VduExt_Log2BPP                # 1
VduExt_Log2BPC                # 1
VduExt_XWindLimit             # 1
VduExt_YWindLimit             # 1

NumModeVars                   # 0
50
VduExt_MinScreenBanks         # 1 ; n.b. the kernel doesn't support this var yet (but other components do)
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103

                              ^ &80
VduExt_GWLCol                 # 1
VduExt_GWBRow                 # 1
VduExt_GWRCol                 # 1
VduExt_GWTRow                 # 1
VduExt_TWLCol                 # 1
VduExt_TWBRow                 # 1
VduExt_TWRCol                 # 1
VduExt_TWTRow                 # 1
VduExt_OrgX                   # 1
VduExt_OrgY                   # 1
VduExt_GCsX                   # 1
VduExt_GCsY                   # 1
VduExt_OlderCsX               # 1
VduExt_OlderCsY               # 1
VduExt_OldCsX                 # 1
VduExt_OldCsY                 # 1
VduExt_GCsIX                  # 1
VduExt_GCsIY                  # 1
VduExt_NewPtX                 # 1
VduExt_NewPtY                 # 1
VduExt_ScreenStart            # 1
VduExt_DisplayStart           # 1
VduExt_TotalScreenSize        # 1
VduExt_GPLFMD                 # 1
VduExt_GPLBMD                 # 1
VduExt_GFCOL                  # 1
VduExt_GBCOL                  # 1
VduExt_TForeCol               # 1
VduExt_TBackCol               # 1
VduExt_GFTint                 # 1
VduExt_GBTint                 # 1
VduExt_TFTint                 # 1
VduExt_TBTint                 # 1
VduExt_MaxMode                # 1
VduExt_GCharSizeX             # 1
VduExt_GCharSizeY             # 1
VduExt_GCharSpaceX            # 1
VduExt_GCharSpaceY            # 1
VduExt_HLineAddr              # 1
VduExt_TCharSizeX             # 1
VduExt_TCharSizeY             # 1
VduExt_TCharSpaceX            # 1
VduExt_TCharSpaceY            # 1
VduExt_GcolOraEorAddr         # 1
VduExt_VIDCClockSpeed         # 1
VduExt_PixelRate              # 1
VduExt_BorderL                # 1
VduExt_BorderB                # 1
VduExt_BorderR                # 1
VduExt_BorderT                # 1

Jeffrey Lee's avatar
Jeffrey Lee committed
104 105 106
                              ^ &C0
VduExt_CurrentGraphicsVDriver # 1

107 108 109
                              ^ &100
VduExt_WindowWidth            # 1
VduExt_WindowHeight           # 1
Neil Turton's avatar
Neil Turton committed
110 111 112

; Bits in ModeFlags

113 114 115 116 117 118 119 120 121 122
ModeFlag_NonGraphic          * 1:SHL:0
ModeFlag_Teletext            * 1:SHL:1
ModeFlag_GapMode             * 1:SHL:2
ModeFlag_BBCGapMode          * 1:SHL:3
ModeFlag_HiResMono           * 1:SHL:4
ModeFlag_DoubleVertical      * 1:SHL:5
ModeFlag_HardScrollDisabled  * 1:SHL:6 ; set when outputting to a sprite, or driver doesn't support VIDC style scrolling
ModeFlag_FullPalette         * 1:SHL:7 ; set when palette is not brain damaged
ModeFlag_64k                 * ModeFlag_FullPalette ; Used with log2bpp==4 to indicate 565 RGB/BGR mode
ModeFlag_InterlacedMode      * 1:SHL:8 ; set when interlaced mode with hardware using two seperate framebuffers
123
ModeFlag_GreyscalePalette    * 1:SHL:9 ; all entries greyscale, but no defined order
124
ModeFlag_ChromaSubsampleMode * ModeFlag_GreyscalePalette ; Used with log2bpp==7 to indicate chroma mode
Jeffrey Lee's avatar
Jeffrey Lee committed
125
                             ; bits 10-11 reserved
126 127 128 129 130 131 132 133 134 135 136 137 138 139
ModeFlag_DataFormat_Mask     * &F:SHL:12
ModeFlag_DataFormatFamily_Mask * 3:SHL:12 ; 0=RGB, 1=misc (CMYK), 2=YCbCr, 3=reserved
ModeFlag_DataFormatFamily_RGB   * 0:SHL:12
ModeFlag_DataFormatFamily_Misc  * 1:SHL:12
ModeFlag_DataFormatFamily_YCbCr * 2:SHL:12
ModeFlag_DataFormatSub_Mask  * &C:SHL:12  ; RGB: b14 = RGB order (0=&ABGR, 1=&ARGB)
                                          ;      b15 = alpha mode (0=transfer/supremacy, 1=alpha)
                                          ; misc: 2_00 = &KYMC
                                          ; YCbCr: b14 = range (0=full, 1=video)
                                          ;        b15 = standard (0=ITU-R BT.601, 1=ITU-R BT.709)
ModeFlag_DataFormatSub_RGB   * 4:SHL:12   ; 0=&xBGR, 1=&xRGB
ModeFlag_DataFormatSub_Alpha * 8:SHL:12   ; 0=transfer/supremacy, 1=alpha
ModeFlag_DataFormatSub_Video * 4:SHL:12   ; 0=full range, 1=video range
ModeFlag_DataFormatSub_709   * 8:SHL:12   ; 0=ITU-R BT.601, 1=ITU-R BT.709
140 141 142 143
ModeFlag_Transform_Mask      * 7:SHL:16
ModeFlag_Transform_Rotate90  * 1:SHL:16
ModeFlag_Transform_Rotate180 * 2:SHL:16
ModeFlag_Transform_VFlip     * 4:SHL:16
144 145


Jeffrey Lee's avatar
Jeffrey Lee committed
146 147 148
; Invalid GraphicsV driver number
GraphicsVInvalid * -2

149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
; OS_ScreenMode reason codes

ScreenModeReason_SelectMode             *       0
ScreenModeReason_ReturnMode             *       1
ScreenModeReason_EnumerateModes         *       2
ScreenModeReason_SelectMonitorType      *       3
ScreenModeReason_ConfigureAcceleration  *       4
ScreenModeReason_CleanCache             *       5
ScreenModeReason_ForceCleanCache        *       6
ScreenModeReason_CountScreenBanks       *       7
ScreenModeReason_SelectDisplayBank      *       8
ScreenModeReason_SelectVDUBank          *       9
ScreenModeReason_CopyBank               *       10
ScreenModeReason_SelectDevice           *       11
ScreenModeReason_ROL_DeviceDetails      *       12
ScreenModeReason_ModeStringToSpecifier  *       13
ScreenModeReason_ModeSpecifierToString  *       14
ScreenModeReason_SelectModeByString     *       15
ScreenModeReason_Limit1                 *       16 ; (not a valid reason code)

Jeffrey Lee's avatar
Jeffrey Lee committed
169 170 171 172 173 174 175
ScreenModeReason_RegisterDriver         *       64
ScreenModeReason_StartDriver            *       65
ScreenModeReason_StopDriver             *       66
ScreenModeReason_DeregisterDriver       *       67
ScreenModeReason_EnumerateDrivers       *       68
ScreenModeReason_Limit2                 *       69 ; (not a valid reason code)

176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
ScreenModeReason_ROL_ReadMaximumDriver  *       253
ScreenModeReason_ROL_DeregisterDriver   *       254
ScreenModeReason_ROL_RegisterDriver     *       255

; Mode selector format

                        ^       0
ModeSelector_Flags      #       4       ; flags word
ModeSelector_XRes       #       4       ; x-resolution in pixels
ModeSelector_YRes       #       4       ; y-resolution in pixels
ModeSelector_PixelDepth #       4       ; pixel depth (=Log2BPP)
ModeSelector_FrameRate  #       4       ; nominal frame rate (in Hz)
ModeSelector_ModeVars   #       0       ; start of pairs of (mode var index, value)

ModeSelectorFlags_FormatMask    *       &FF
ModeSelectorFlags_ValidFormat   *       1

ModeSelector_MaxSize    *       ModeSelector_ModeVars+(NumModeVars * 8)+4
                                        ; maximum size of a mode selector, with each mode variable overridden
                                        ; plus terminator on end
Neil Turton's avatar
Neil Turton committed
196

197 198 199
; Service_DisplayChanged reason codes (R0)
DisplayChanged_Changing         * 0
DisplayChanged_Changed          * 1
200 201 202 203 204
DisplayChanged_PreChanging      * 128

; Service_DisplayChanged sub-reason codes (R3)
DisplayChangedSub_ModeChanged    * 0
DisplayChangedSub_ModeNotChanged * 128
205 206 207 208

; Service_DisplayStatus reason codes (R0)
DisplayStatus_Deregistered      * 0
DisplayStatus_Registered        * 1
209 210
DisplayStatus_Changing          * 128
DisplayStatus_Changed           * 129
211

Neil Turton's avatar
Neil Turton committed
212 213 214
        OPT     OldOpt

        END