Commit 96e8fff1 authored by Jeffrey Lee's avatar Jeffrey Lee

Fix some pointer colour issues. Fix PaletteV 6 (blank screen) return value.

Detail:
  s/vdu/vdudriver - On startup, initialise all palettes to 0, not just Pal_Blank. Ensures that entries which might not always be explicitly initialised (e.g. pointer) are self-consistent. Also make sure InitialiseMode communicates the pointer palette to the new GV driver, since some components tend to program it in a lazy manner (e.g. Hourglass)
  s/vdu/vdupalxx - Fix UpdateAllPalette setting R4 to 0 on exit. Fix PV_BlankScreen R0 return value to be 0/1 as the comment suggests instead of always being 0 due to GraphicsV calls.
Admin:
  Tested on wandboard
  Fixes incorrect hourglass colours after reset, due to software RAM clear not wiping the kernel's palette (kernel + Hourglass thought old colours were still in use, but IMXVideo hadn't been told any colours yet so was using defaults of 0)


Version 5.96. Tagged as 'Kernel-5_96'
parent 1033074e
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.95"
Module_Version SETA 595
Module_MajorVersion SETS "5.96"
Module_Version SETA 596
Module_MinorVersion SETS ""
Module_Date SETS "03 Feb 2018"
Module_ApplicationDate SETS "03-Feb-18"
Module_Date SETS "04 Feb 2018"
Module_ApplicationDate SETS "04-Feb-18"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.95"
Module_HelpVersion SETS "5.95 (03 Feb 2018)"
Module_FullVersion SETS "5.96"
Module_HelpVersion SETS "5.96 (04 Feb 2018)"
END
/* (5.95)
/* (5.96)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.95
#define Module_MajorVersion_CMHG 5.96
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 03 Feb 2018
#define Module_Date_CMHG 04 Feb 2018
#define Module_MajorVersion "5.95"
#define Module_Version 595
#define Module_MajorVersion "5.96"
#define Module_Version 596
#define Module_MinorVersion ""
#define Module_Date "03 Feb 2018"
#define Module_Date "04 Feb 2018"
#define Module_ApplicationDate "03-Feb-18"
#define Module_ApplicationDate "04-Feb-18"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.95"
#define Module_HelpVersion "5.95 (03 Feb 2018)"
#define Module_LibraryVersionInfo "5:95"
#define Module_FullVersion "5.96"
#define Module_HelpVersion "5.96 (04 Feb 2018)"
#define Module_LibraryVersionInfo "5:96"
......@@ -225,14 +225,16 @@ VduInit ROUT
STR r3, [WsPtr, #SecPalAddr]
; initialise blank palette to all solid black
; zero-init the other palettes too, to make sure log & phys palettes are
; consistent
MOV r3, #0
MOV r4, #PalEntries
LDR r4, =PalEntries*5
04 STR r3, [r2], #4
SUBS r4, r4, #1
BNE %BT04
ADD r2, r2, #Pal_RTable-(Pal_Blank+4*PalEntries) ; r2 -> rgb tables
ASSERT Pal_RTable = Pal_Blank + PalEntries*5*4
; initialise red, green and blue transfer function tables to 1-1 mapping
......@@ -333,13 +335,15 @@ InitialiseMode ROUT
MOV r0, #ScreenModeReason_SelectMode
SWI XOS_ScreenMode
EXIT VC
BVC %FT40
MOV r0, #114 ; failed, so get rid of any shadow
MOV r1, #1
SWI XOS_Byte
SWI XOS_WriteI+22
SWIVC XOS_WriteI+0 ; and if we can't get mode 0, we're really fooked!!!
40
BLVC UpdateAllPalette ; make sure GV driver is aware of the pointer colours (this will also redundantly set the main palette + border colour, but re-using this routine as-is avoids duplicating a bunch of code)
EXIT
;
......
......@@ -1024,7 +1024,7 @@ PV_2ndFlashState ROUT
;
UpdateAllPalette ROUT
Entry "r0-r3, r9-r11"
Entry "r0-r4, r9-r11"
;sort out which palette to use
LDROSB r0, FlashState
CMP r0, #1
......@@ -1060,7 +1060,6 @@ UpdateAllPalette ROUT
BL CallGraphicsV
;
PLP r11
MOV r4, #0
EXIT
; *****************************************************************************
......@@ -1077,10 +1076,10 @@ UpdateAllPalette ROUT
PV_BlankScreen ROUT
Push "r1-r3, r9"
LDRB r4, [WsPtr, #ScreenBlankFlag]
LDRB r3, [WsPtr, #ScreenBlankFlag]
CMP r0, #1
BHI %FT99 ; just reading
TEQ r0, r4 ; changing to same state?
TEQ r0, r3 ; changing to same state?
BEQ %FT99 ; if so, do nothing
AND r0, r0, #1
......@@ -1109,7 +1108,7 @@ PV_BlankScreen ROUT
BL UpdateAllPalette ; update all palette, including border + pointer
99
MOV r0, r4
MOV r0, r3
MOV r4, #0
Pull "r1-r3, r9, pc"
......
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