Commit 6f366d87 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix FindOKMode not recovering properly from unsupported VIDC lists

Detail:
  s/vdu/vduswis - Fix 18 year old register corruption bug in FindOKMode which would prevent it from falling back to Service_ModeTranslation if Service_ModeExtension returned a VIDC list but the VIDC list was rejected by the GraphicsV driver
  s/vdu/vdudriver - Also, change a couple of error cases in ModeChangeSub so that they use the "Screen mode not available" error instead of the incorrect "Not enough screen memory" error.
Admin:
  Tested on Raspberry Pi 3
  Fixes issue reported on forums where if AnyMode is loaded, numbered modes in unsupported colour depths weren't being replaced with substitutes (although note that there are still some AnyMode-related issues to resolve)
  https://www.riscosopen.org/forum/forums/4/topics/12773


Version 6.16. Tagged as 'Kernel-6_16'
parent b3c64d93
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "6.15"
Module_Version SETA 615
Module_MajorVersion SETS "6.16"
Module_Version SETA 616
Module_MinorVersion SETS ""
Module_Date SETS "14 Nov 2018"
Module_ApplicationDate SETS "14-Nov-18"
Module_Date SETS "19 Nov 2018"
Module_ApplicationDate SETS "19-Nov-18"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "apache/RiscOS/Sources/Kernel"
Module_FullVersion SETS "6.15"
Module_HelpVersion SETS "6.15 (14 Nov 2018)"
Module_FullVersion SETS "6.16"
Module_HelpVersion SETS "6.16 (19 Nov 2018)"
END
/* (6.15)
/* (6.16)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.15
#define Module_MajorVersion_CMHG 6.16
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Nov 2018
#define Module_Date_CMHG 19 Nov 2018
#define Module_MajorVersion "6.15"
#define Module_Version 615
#define Module_MajorVersion "6.16"
#define Module_Version 616
#define Module_MinorVersion ""
#define Module_Date "14 Nov 2018"
#define Module_Date "19 Nov 2018"
#define Module_ApplicationDate "14-Nov-18"
#define Module_ApplicationDate "19-Nov-18"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "apache/RiscOS/Sources/Kernel"
#define Module_FullVersion "6.15"
#define Module_HelpVersion "6.15 (14 Nov 2018)"
#define Module_LibraryVersionInfo "6:15"
#define Module_FullVersion "6.16"
#define Module_HelpVersion "6.16 (19 Nov 2018)"
#define Module_LibraryVersionInfo "6:16"
......@@ -683,9 +683,9 @@ ModeChangeSub ROUT
BL DoFullVetMode
Pull "R2"
SUB R13, R13, #12
BEQ %FT06 ; not supported, complain
BEQ %FT041 ; not supported, complain
TST R0, #GVVetMode2_ExtraBytes_Invalid
BNE %FT06 ; Service_ModeExtension should have made sure ExtraBytes was valid
BNE %FT041 ; Service_ModeExtension should have made sure ExtraBytes was valid
; R0, R3, R5 may contain important info
STMIA R13, {R0, R3, R5}
AND R0, R0, #GVVetMode2_ResultMask
......@@ -711,8 +711,9 @@ ModeChangeSub ROUT
SWI XOS_ChangeDynamicArea
BVC %FT08
06
ADD R13, R13, #PushedInfoSize + 4*4 ; junk stacked info + mode no + vetmode2 info
ADR R0, ErrorBlock_BadMODE
065
ADD R13, R13, #PushedInfoSize + 4*4 ; junk stacked info + mode no + vetmode2 info
[ International
BL TranslateError
]
......@@ -720,6 +721,10 @@ ModeChangeSub ROUT
SETV ; indicate error
Pull PC
041
ADRL R0, ErrorBlock_ModeNotAvailable
B %BT065
045
CMP R11, R5
BHI %BT06 ; ext. framestore not big enough
......
......@@ -836,6 +836,7 @@ FindOKMode ROUT
CMP r0, #&100 ; if it's a mode number
BICCC r2, r0, #&80 ; then knock off shadow bit
MOVCS r2, r0 ; else don't
MOV r10, r3
BL OfferModeExtension
BNE %FT05
......@@ -858,6 +859,7 @@ FindOKMode ROUT
04
CMP r0,#0
Pull "r0-r4,r12"
MOVNE r3, r10
BNE %FT05 ; driver says "Oi, Kernel, No!"
; service claimed and happy driver so return with this mode
......
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