Commit d87c22a4 authored by Jeffrey Lee's avatar Jeffrey Lee

Attempt to tidy up substitute screen mode selection logic

Detail:
  Over the years the OS's substitute screen mode selection logic has grown to be a tangled mess, and the logic it does implement isn't always very useful. Additionally, the kernel is structured in such a way that it can be hard for modules to override it.
  This set of changes aims to fix the many of the problems, by doing the following:
  - Moving all substitute mode selection logic out of the core VDU driver code and into a Service_ModeTranslation handler. This means you now only have one place in the kernel to look instead of several, and modules can override the behaviour by claiming/blocking the service call as appropriate.
  - Moving handling of the built-in VIDC lists out of the core VDU driver code and into a Service_ModeExtension handler. This means programs can now inspect these VIDC lists by issuing the right service call (although you are essentially limited to lists which the GraphicsV driver is OK with)
  - Moving *TV interlace & offset adjustment logic into the Service_ModeExtension handler, since they're legacy things which can be handled more cleanly for MDF/EDID (and the old code was poking memory the kernel didn't own)
  - Adding a Service_EnumerateScreenModes implementation, so that if you end up in the desktop with ScreenModes non-functional, the display manager at least has something useful to show you
  - Enhancing the handling of the built-in numbered modes so that they are now available in any colour depth; the Service_ModeExtension handler (and related handlers) treat the builtin VIDC lists as a set of mode timings, not a discrete set of modes
  - Substitute mode selection logic is a complete re-write. Instead of trying a handful of numbered fallback modes, it now tries:
    - Same mode but at higher colour depths
    - Same mode but at lower colour depths
    - Alternate resolutions (half-width mode with no double-pixel if original request was for double-pixel, and default resolution for monitor type)
  - Combined with the logic to allow the builtin VIDC lists to be used at any colour depth, this means that the kernel should now be able to find substitute modes for machines which lack support for <=8bpp modes (e.g. OMAP5)
  - Additionally the mode substitution code will attempt to retain as many properties of the originally requested mode as possible (eigen values, gap mode type, etc.)
  Other improvements:
  - The kernel now actually vets the builtin VIDC lists instead of assuming that they'll work (which also means they'll have the correct ExtraBytes value, where applicable)
  - The kernel now uses GraphicsV 19 (VetMode2) to vet the mode during the mode switch process, using the result to detect where the framebuffer will be placed. This allows for GraphicsV drivers to switch between DA 2 and external framestores on a per-mode basis.
  - The kernel now supports mode selectors which specify LineLength values which are larger than necessary; this will get translated to a suitable ExtraBytes control list item (+ combined with whatever padding the driver indicates is necessary via the VetMode2 result)
  File changes:
  - hdr/KernelWS - Reserve space for a VIDC list, since the Service_ModeExtension implementation typically can't use the built-in list as-is
  - s/Arthur3 - Issue Service_ModeFileChanged when the configured monitor type is changed, so that DisplayManager + friends are aware that the set of available modes has changed
  - s/GetAll - Fiddle with GETs a bit
  - s/MemMap2 - Extra LTORG
  - s/NewIRQs - Small routine to install/uninstall false VSync routine (previously from PushModeInfo, which wasn't really the appropriate place for it)
  - s/Utility - Hook up the extra service call handlers
  - s/vdu/legacymodes - New file containing the new service call implementations, and some related code
  - s/vdu/vdudecl - Move mode workspace definition here, from vdumodes
  - s/vdu/vdudriver - Remove assorted bits of mode substitution code. Plug in new bits for calling GraphicsV 19 during mode set, and deal with ExtraBytes/LineLength during PushModeInfo
  - s/vdu/vdumodes - Move some workspace definitions to s/vdu/vdudecl. Tweak how the builtin VIDC lists are stored.
  - s/vdu/vduswis - Rip out more mode substitution code. Issue Service_ModeFileChanged when monitor type is changed by OS_ScreenMode.
Admin:
  Tested on Raspberry Pi 3, Iyonix, IGEPv5


Version 6.14. Tagged as 'Kernel-6_14'
parent 2f8a46ed
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "6.13"
Module_Version SETA 613
Module_MajorVersion SETS "6.14"
Module_Version SETA 614
Module_MinorVersion SETS ""
Module_Date SETS "16 Sep 2018"
Module_ApplicationDate SETS "16-Sep-18"
Module_Date SETS "07 Nov 2018"
Module_ApplicationDate SETS "07-Nov-18"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "6.13"
Module_HelpVersion SETS "6.13 (16 Sep 2018)"
Module_ComponentPath SETS "apache/RiscOS/Sources/Kernel"
Module_FullVersion SETS "6.14"
Module_HelpVersion SETS "6.14 (07 Nov 2018)"
END
/* (6.13)
/* (6.14)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.13
#define Module_MajorVersion_CMHG 6.14
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 16 Sep 2018
#define Module_Date_CMHG 07 Nov 2018
#define Module_MajorVersion "6.13"
#define Module_Version 613
#define Module_MajorVersion "6.14"
#define Module_Version 614
#define Module_MinorVersion ""
#define Module_Date "16 Sep 2018"
#define Module_Date "07 Nov 2018"
#define Module_ApplicationDate "16-Sep-18"
#define Module_ApplicationDate "07-Nov-18"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_ComponentPath "apache/RiscOS/Sources/Kernel"
#define Module_FullVersion "6.13"
#define Module_HelpVersion "6.13 (16 Sep 2018)"
#define Module_LibraryVersionInfo "6:13"
#define Module_FullVersion "6.14"
#define Module_HelpVersion "6.14 (07 Nov 2018)"
#define Module_LibraryVersionInfo "6:14"
......@@ -958,8 +958,13 @@ ScrLoaSpriteCB * LargeCommon ; (size = SpriteCBsize + MaxSpritePaletteSize)
ScrSavCommon * LargeCommon ; (size = SpriteAreaCBsize + SpriteCBsize
; + MaxSpritePaletteSize)
ASSERT ?LargeCommon >= SpriteAreaCBsize + SpriteCBsize + MaxSpritePaletteSize
TempModeSelector * LargeCommon ; (size = ModeSelector_MaxSize)
ASSERT ?LargeCommon >= ModeSelector_MaxSize
VIDCList3BaseSize * VIDCList3_ControlList
VIDCList3Size * (VIDCList3BaseSize + ControlList_InvalidReason*8 + 4) ; primary params, up to 16 video control params, terminator
TempModeSelector * LargeCommon ; (size = ModeSelector_MaxSize + VIDCList3Size)
ASSERT ?LargeCommon >= ModeSelector_MaxSize + VIDCList3Size
TempVIDCList * TempModeSelector+ModeSelector_MaxSize
FldQueueSize * ScratchSpaceSize
FldQueueStart * ScratchSpace
......
......@@ -2460,6 +2460,9 @@ Config_MonitorType_setcode
MOV r0, r1
BL WriteMultiField
; Let the display manager know that the available modes have changed
MOV r1, #Service_ModeFileChanged
BL Issue_Service
Pull "pc" ; was already stacked by *Configure
LTORG
......
......@@ -39,7 +39,6 @@
GET Hdr:Heap
GET Hdr:Sprite
GET Hdr:PublicWS
GET Hdr:KernelWS
GET Hdr:HALEntries
GET Hdr:HALDevice
GET Hdr:OSEntries
......@@ -48,7 +47,6 @@
GET Hdr:HighFSI
GET Hdr:NewErrors
GET Hdr:Proc
GET Hdr:KeyWS
GET Hdr:RS423
GET Hdr:ModHand
GET Hdr:Variables
......@@ -84,6 +82,8 @@
; now the main parts of the MOS
GET hdr.KernelWS
GET hdr.KeyWS
GET hdr.Copro15ops ; some macros
GET hdr.ARMops
......@@ -120,6 +120,8 @@
GET s.MemMap2
! 0, "Main kernel size = &" :CC: :STR: (.-KernelBase)
StartOfVduDriver
GET s.vdu.VduDecl
GET s.vdu.legacymodes
GET s.vdu.VduDriver
GET s.vdu.VduSWIs
GET s.vdu.VduPalette
......
......@@ -616,4 +616,6 @@ AdjustMemoryPageFlags ROUT
EXIT
]
LTORG
END
......@@ -638,6 +638,19 @@ TickOne ROUT
; Process VSync IRQ device
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
UpdateFalseVsync ROUT
; claim or release falsevsync vector if vsyncs supported/not supported
TST r0, #GVDisplayFeature_NoVsyncIRQ ; are VSyncs not generated?
Entry "r0-r2"
MOV r0, #TickerV
ADR r1, FalseVsyncIRQ
LDR r2, =ZeroPage+OsbyteVars
BEQ %ft2
SWI XOS_Claim
EXIT
2 SWI XOS_Release
EXIT
ALIGN 32
FalseVsyncIRQ ROUT
LDR R1, =ZeroPage
......
......@@ -51,15 +51,20 @@ Module_BaseAddr SETA UtilityMod
[ ChocolateService
;service table
;
ASSERT Service_ModeExtension < Service_ModeTranslation
ASSERT Service_ModeTranslation < Service_MessageFileClosed
ASSERT Service_MessageFileClosed < Service_BufferStarting
ASSERT Service_BufferStarting < Service_TerritoryStarted
ASSERT Service_TerritoryStarted < Service_DeviceFSCloseRequest
ASSERT Service_DeviceFSCloseRequest < Service_DisplayStatus
ASSERT Service_DeviceFSCloseRequest < Service_EnumerateScreenModes
ASSERT Service_EnumerateScreenModes < Service_DisplayStatus
;
Util_ChocServTab
DCD 0 ;flags word
DCD Util_ChocService-UtilityMod ;offset to handler
DCD Service_ModeExtension
DCD Service_ModeTranslation
[ CacheCommonErrors
DCD Service_MessageFileClosed
]
......@@ -68,6 +73,7 @@ Util_ChocServTab
DCD Service_TerritoryStarted
]
DCD Service_DeviceFSCloseRequest ;service 2
DCD Service_EnumerateScreenModes
DCD Service_DisplayStatus
DCD 0 ;terminator
DCD Util_ChocServTab-UtilityMod ;table anchor
......@@ -76,12 +82,15 @@ Util_Service ROUT
[ ChocolateService
MOV r0, r0 ;magic instruction for new service table format
]
TEQ r1, #Service_BufferStarting
TEQ r1, #Service_ModeExtension
TEQNE r1, #Service_ModeTranslation
TEQNE r1, #Service_BufferStarting
TEQNE r1, #Service_DeviceFSCloseRequest
[ CacheCommonErrors
TEQNE r1, #Service_TerritoryStarted
TEQNE r1, #Service_MessageFileClosed
]
TEQNE r1, #Service_EnumerateScreenModes
TEQNE r1, #Service_DisplayStatus
MOVNE pc, lr
[ ChocolateService
......@@ -95,6 +104,12 @@ Util_ChocService
]
TEQ r1, #Service_DeviceFSCloseRequest
BEQ %FT10
TEQ r1, #Service_ModeExtension
BEQ HandleServiceModeExtension
TEQ r1, #Service_ModeTranslation
BEQ HandleServiceModeTranslation
TEQ r1, #Service_EnumerateScreenModes
BEQ HandleServiceEnumerateScreenModes
TEQ r1, #Service_DisplayStatus
BEQ HandleServiceDisplayStatus
; Else must be Service_BufferStarting
......
This diff is collapsed.
......@@ -51,6 +51,40 @@ Link RN 14
;
; To change the order of mode variables, change the following:-
; a) The order of the 'wk' labels below
; b) The order of the output variables in macro VWSTAB
; c) The order of the variables in '$.Hdr.Workspace' and '$.Hdr.NewSpace'
^ 0
wkstart # 0
; values which are calculated from sprite header when switching to sprite
wkScreenSize # 4
wkXWindLimit # 4
wkYWindLimit # 4
wkLineLength # 4
wkmiddle # 0
; values which are taken from pushed mode info (from wkmiddle ... wkmidend)
wkNColour # 4
wkYShftFactor # 4
wkModeFlags # 4
wkXEigFactor # 4
wkYEigFactor # 4
wkLog2BPC # 4
wkLog2BPP # 4
wkmidend # 0
; these are also taken from sprite header
wkScrRCol # 4
wkScrBRow # 4
wkend # 0
wksize * wkend-wkstart
wkwordsize * (wksize + 3) :AND: :NOT: 3
PushedInfoSize * wkwordsize + VIDCList3Size
NumModes * 54
maxmode * NumModes-1
; Reason codes for generalised DAG interface
......
This diff is collapsed.
......@@ -36,7 +36,6 @@ $label VIDC_ListT3 $lbpp,$hsync,$hbpch,$hlbdr,$hdisp,$hrbdr,$hfpch, $vsync,$vbp
MACRO
$label VIDC_ListT3 $lbpp,$hsync,$hbpch,$hlbdr,$hdisp,$hrbdr,$hfpch, $vsync,$vbpch,$vlbdr,$vdisp,$vrbdr,$vfpch,$pixrate,$sp,$int
$label
LCLA sp
LCLA dwidth
GBLA framerate
......@@ -59,6 +58,8 @@ framerate SETA ($pixrate*1000+framepixels/2)/framepixels
F_$label * framerate ; set up frame rate symbol
;
& framerate ; stash framerate before VIDC list, F_ labels are inaccurate because different monitor types use different timings
$label
& 3 ; format (type 3)
& $lbpp ; log2 bits per pixel
; Horizontal (in pixels)
......@@ -89,9 +90,6 @@ F_$label * framerate ; set up frame rate symbol
NumMonitorTypes * 9
NumModes * 54
maxmode * NumModes-1
minmode * 0
; These macro are used by various routines in the kernel to check for a valid mode number
; MUST be kept up-to-date with the list of invalid modes between 0 and maxmode
......@@ -1017,42 +1015,6 @@ Vwstab
& VW_52 - Vwstab ; MODE 52
& VW_53 - Vwstab ; MODE 53
; To change the order of mode variables, change the following:-
; a) The order of the 'wk' labels below
; b) The order of the output variables in macro VWSTAB below
; c) The order of the variables in '$.Hdr.Workspace' and '$.Hdr.NewSpace'
^ 0
wkstart # 0
; values which are calculated from sprite header when switching to sprite
wkScreenSize # 4
wkXWindLimit # 4
wkYWindLimit # 4
wkLineLength # 4
wkmiddle # 0
; values which are taken from pushed mode info (from wkmiddle ... wkmidend)
wkNColour # 4
wkYShftFactor # 4
wkModeFlags # 4
wkXEigFactor # 4
wkYEigFactor # 4
wkLog2BPC # 4
wkLog2BPP # 4
wkmidend # 0
; these are also taken from sprite header
wkScrRCol # 4
wkScrBRow # 4
wkend # 0
wksize * wkend-wkstart
wkwordsize * (wksize + 3) :AND: :NOT: 3
;VIDC list type 3 size (hardware independent video controller list)
;
VIDCList3BaseSize * 64
VIDCList3Size * (VIDCList3BaseSize + 16*8 + 4) ; primary params, up to 16 video control params, terminator
PushedInfoSize * wkwordsize + VIDCList3Size
M22S * 1280*976/8 ; screen size
M23S * 1152*896/8
M25S * 640*480/8
......@@ -1084,6 +1046,7 @@ scrsz SETA $ScreenSize
& $Log2BPC, $Log2BPP
& $ScrRCol, $ScrBRow
ALIGN
& 0, $BaseMode, -1 ; Dummy mode workspace block for Service_ModeExtension
MEND
VW_0 VWSTAB 0, 20K, 80, 639,255,4,1,2, 1, 79, 31,0,0,0 ; MODE 0
......
......@@ -848,25 +848,6 @@ FindOKMode ROUT
MOV r0,r3
MOV r1,r4
[ {FALSE} ; There are so many pixel formats now that it's better to let the driver do one check itself rather than doing one here and then one in the driver
;we'll do the vet on whether h/w supports the pixel depth ourselves
LDR r2,[r0,#VIDCList3_PixelDepth]
MOV r3,#1
MOV r3,r3,LSL r2 ; bits per pixel
Push "r0-r2"
LDR r4, [WsPtr, #CurrentGraphicsVDriver]
MOV r4, r4, LSL #24
ORR r4, r4, #GraphicsV_DisplayFeatures
BL CallGraphicsV
TEQ r4,#0
TSTEQ r3,r1
Pull "r0-r2"
MOVEQ r0,#1
BEQ %FT04 ; not supported
]
;now any vet the driver might want to do
LDR r4, [WsPtr, #CurrentGraphicsVDriver]
MOV r4, r4, LSL #24
......@@ -879,7 +860,7 @@ FindOKMode ROUT
Pull "r0-r4,r12"
BNE %FT05 ; driver says "Oi, Kernel, No!"
; service claimed and happy HAL so return with this mode
; service claimed and happy driver so return with this mode
MOV r1, r0
CLRV
......@@ -893,121 +874,11 @@ FindOKMode ROUT
CMP r0, #&100 ; if a mode selector and not responded to
BCS %FT30 ; then return error
MOV r10, r2 ; mode without shadow bits
MOV r1, r0 ; start from existing mode
CMP r3, #NumMonitorTypes ; monitor type must be in range
BCS %FT10 ; if not then must issue service
CMPCC r10, #NumModes ; and mode must be in range
MOVCC r11, #NumModes
MLACC r11, r3, r11, r10 ; then form monitortype*numberofmodes + modenumber
ADRCCL r14, BigVIDCTable ; point to big table
LDRCC r11, [r14, r11, LSL #2] ; and load offset
CMPCC r11, #-1 ; CS if mode number or monitor type out of range, or if not known in table
BCC %FT20 ; else it's known about, so OK
; known monitor type, but unknown mode, so find substitute
ADR r14, SubstModeTable
LDR r11, [r14, r3, LSL #2]
TEQ r11, #0 ; if r0=0, monitor type is actually unknown - issue service call
BEQ %FT10
ADD r1, r11, r14
05
BL FindSubstitute
Pull "r2-r4,r10,r11, pc" ; exit VC or VS
; unknown monitor type, so offer service
10
; if monitor type 7 (file), and requesting mode 7, try some alternative teletext modes before asking for external help
TEQ r3, #7
TEQEQ r10, #7
BNE %FT19
Push "r0,r3"
; Build up a temporary mode selector (however, needs to be in a static buffer to allow return via OS_CheckModeValid)
ADD r10, WsPtr, #TempModeSelector
ADR r0, AltTTXModeProto
MOV r2, #AltTTXMode_Size
11
SUBS r2, r2, #4
LDR r3, [r0, r2]
STR r3, [r10, r2]
BNE %BT11
; For each resolution, try all the pixel formats supported by the driver
ADR r11, AltTTXModes
12
LDMIA r11!, {r3, r4}
CMP r3, #-1
BEQ %FT18
ASSERT ModeSelector_XRes = 4
ASSERT ModeSelector_YRes = 8
ASSERT ModeSelector_PixelDepth = 12
MOV r14, #2 ; Start at 4BPP and work up
STMIB r10, {r3, r4, r14}
13
LDR r4, [WsPtr, #CurrentGraphicsVDriver]
MOV r4, r4, LSL #24
ORR r4, r4, #GraphicsV_PixelFormats
BL CallGraphicsV
CMP r4, #0
BNE %FT18
; Look for pixel formats that match the current Log2BPP
CMP r1, #0
BEQ %FT18
14
ASSERT GVPixelFormat_NColour = 0
ASSERT GVPixelFormat_ModeFlags = 4
ASSERT GVPixelFormat_Log2BPP = 8
ASSERT GVPixelFormat_Size = 12
LDMIA r0!, {r2-r4}
LDR r14, [r10, #ModeSelector_PixelDepth]
CMP r4, r14
BNE %FT17
STR r2, [r10, #AltTTXMode_NColour]
ORR r3, r3, #ModeFlag_Teletext+ModeFlag_GapMode
STR r3, [r10, #AltTTXMode_Flags]
Push "r0"
BL PushModeInfo
ADDVC r13, r13, #PushedInfoSize
Pull "r0"
MOVVC r1, r10
Pull "r0,r3",VC
BVC %FT20
17
SUBS r1, r1, #1
BNE %BT14
; Try next BPP
LDR r14, [r10, #ModeSelector_PixelDepth]
ADD r14, r14, #1
CMP r14, #6
STRLO r14, [r10, #ModeSelector_PixelDepth]
BLO %BT13
; Try next resolution
B %BT12
18
Pull "r0,r3"
MOV r10, #7
19
MOV r2, r10
MOV r1, #Service_ModeTranslation
IssueService
TEQ r1, #0
MOVEQ r1, r2 ; if claimed, then use module's mode
BEQ %FT20
; unknown monitor type
; if monitor type 7 (file), use substitution table for VGA (reasonable assumption)
TEQ r3, #7
ADREQ r1, SubstType3
BEQ %BT05
MOV r1, #0 ; else panic and use mode 0
20
BNE %FT30
MOV r1, r2 ; if claimed, then use module's mode
CLRV
Pull "r2-r4,r10,r11, pc"
......@@ -1020,110 +891,8 @@ FindOKMode ROUT
]
Pull "r2-r4,r10,r11, pc"
SubstModeTable
& SubstType01-SubstModeTable
& SubstType01-SubstModeTable
& SubstType2-SubstModeTable
& SubstType3-SubstModeTable
& SubstType4-SubstModeTable
& 0
& 0
& 0
& SubstType8-SubstModeTable
SubstType01
= 0, 8, 12, 15
SubstType2
= 23, 23, 23, 23
SubstType3
= 25, 26, 27, 28
SubstType4
= 29, 30, 31, 32
SubstType8
= 44, 45, 46, 46
; Alternate teletext modes
; Primary use case for this list of alternatives is when EDID is in use, so we only list modes which might typically show up in EDID.
AltTTXModes
[ :LNOT: HiResTTX
DCD 640, 350
DCD 640, 400
DCD 720, 400
DCD 640, 480
DCD 720, 480
|
; For HiResTTX it makes sense to include the native teletext resolution, so that we can try the other colour depths that are available (failure to get native mode 7 might have only been due to unsupported colour depth)
DCD 640, 500
]
DCD 720, 576
DCD 800, 600
DCD 1280, 720
DCD -1
AltTTXModeProto
DCD 1
DCD 0 ; width
DCD 0 ; height
DCD 2 ; Log2BPP
DCD -1
DCD VduExt_ModeFlags
AltTTXMode_Flags * . - AltTTXModeProto
DCD 0
DCD VduExt_ScrRCol
DCD 39
DCD VduExt_ScrBRow
DCD 24
DCD VduExt_NColour
AltTTXMode_NColour * . - AltTTXModeProto
DCD 15
DCD -1
AltTTXMode_Size * . - AltTTXModeProto
LTORG
; *****************************************************************************
;
; FindSubstitute - Find substitute mode with right no. of bpp
;
; in: r1 -> table of 4 bytes; subst. modes for 1, 2, 4, 8 bpp respectively
; r10 = mode specifier to be tested (shadow bit clear)
;
; out: If no error, then
; r0 preserved
; r1 = substitute mode
; V=0
; else
; r0 -> error
; r1 preserved
; endif
; r11 corrupted, all other registers preserved
;
FindSubstitute Entry
MOV r11, #0
BL PushModeInfoAnyMonitor
EXIT VS ; if error, then exit now
LDR r11, [r13, #wkLog2BPP]
ADD r13, r13, #PushedInfoSize
CMP r11, #4
MOVCS r11, #0
Push "r0-r4"
LDR r4, [WsPtr, #CurrentGraphicsVDriver]
MOV r4, r4, LSL #24
ORR r4, r4, #GraphicsV_DisplayFeatures
BL CallGraphicsV ; see if h/w supports this BPP
TEQ r4, #0
MOVEQ r2, r1
MOVNE r2, #2_111111
MOV r3, #1
MOV r3, r3, LSL r11
TST r2, r3
MOVEQ r11, #3 ; if not, use 8 BPP (assumed best chance for a mode number)
Pull "r0-r4"
LDRB r1, [r1, r11]
CLRV
EXIT
; *****************************************************************************
;
; ReadMonitorType - Read monitor type
......@@ -2187,7 +1956,7 @@ ScreenMode_EnumerateModes Entry "r3-r5"
; All other registers preserved
;
ScreenMode_SelectMonitorType Entry "r0"
ScreenMode_SelectMonitorType Entry "r0-r1"
VDWS WsPtr
CMP r1, #-1 ; if not restoring configured value
BNE %FT10 ; then skip
......@@ -2195,6 +1964,9 @@ ScreenMode_SelectMonitorType Entry "r0"
MOV r1, r0
10
STR r1, [WsPtr, #CurrentMonitorType] ; update current value
; Let the display manager know that the available modes have changed
MOV r1, #Service_ModeFileChanged
BL Issue_Service
EXIT
;**************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment