Commit dca30c08 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Kernel now uses PortManager to set TV_Mode GPIO line, and updates it on every...

Kernel now uses PortManager to set TV_Mode GPIO line, and updates it on every mode change, rather than doing it once based on the monitor lead ID.

Requires PortManager, and required if PortManager is present.

Version 4.92. Tagged as 'Kernel-4_92'
parent 2af69516
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "4.91"
Module_Version SETA 491
Module_MajorVersion SETS "4.92"
Module_Version SETA 492
Module_MinorVersion SETS ""
Module_Date SETS "06 Oct 1999"
Module_FullVersion SETS "4.91"
Module_Date SETS "07 Oct 1999"
Module_FullVersion SETS "4.92"
END
/* (4.91)
/* (4.92)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.91
#define Module_MajorVersion_CMHG 4.92
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Oct 1999
#define Module_Date_CMHG 07 Oct 1999
#define Module_MajorVersion "4.91"
#define Module_Version 491
#define Module_MajorVersion "4.92"
#define Module_Version 492
#define Module_MinorVersion ""
#define Module_Date "06 Oct 1999"
#define Module_Date "07 Oct 1999"
#define Module_FullVersion "4.91"
#define Module_FullVersion "4.92"
......@@ -678,6 +678,7 @@ largest_rma_size * (128*1024) ; and the ceiling for rma use
GET Hdr:ColourTran
GET Hdr:Debug
GET Hdr:nvram
GET Hdr:PortMan
GET s.PMF.DEF ; Common with 6502 code in the keyboard
Protocol
......
......@@ -419,29 +419,7 @@ UpdateLatchB
TEQP R14, #0
Pull "R2, R3, PC"
[ STB
; *****************************************************************************
;
; UpdateCLines - update IOMD_CLINES 8bit IO port
; In:
; r3: new value
; r4: mask of bits to set
;
; Out:
; All regs preserved
UpdateCLines ENTRY "r0, r1"
LDR r0, =(IOMD_Base + IOMD_CLINES)
LDRB r1, [r0]
ORR r1, r1, #IOMD_C_ReadMask ; Set readable bits
BIC r1, r1, r4 ; Clear bits to write
ORR r1, r1, r3 ; Set bits to write
STRB r1, [r0]
EXIT
; *****************************************************************************
|
[ :LNOT: STB
; *****************************************************************************
;
; UpdateMonitorTypeLatch - update monitor type latch and soft copy
......@@ -885,14 +863,6 @@ ReadMachineType ENTRY "r0-r12"
AND r2, r2, #3 ; only bit 0 of ID valid on IOMD-based systems
]
[ STB :LAND: IOMD_C_TVMode <> 0 ; set the TVMode to 0 (VGA) if id bits1,0 != 01 (TV)
AND r3, r2, #2_11 ; bits we're interested in
CMP r3, #2_01 ; TV?
BEQ %FT90 ; yes
MOV r3, #0
MOV r4, #IOMD_C_TVMode
BL UpdateCLines
]
90
MOV r1, #0
STRB r2, [r1, #MonitorLeadType]
......
......@@ -652,6 +652,12 @@ ModeChangeSub ROUT
SETV ; indicate error
Pull PC
[ STB
TV_Mode_string
= "TV_Mode", 0
ALIGN
]
; valid mode and enough memory
08
......@@ -846,6 +852,18 @@ ModeChangeSub ROUT
ANDNE R1, R1, #3 ; else only use bits 0 and 1
STRB R1, [WsPtr, #ScreenBlankDPMSState]
[ STB
LDR R1, [R0, #(PseudoRegister_HClockSpeed:SHR:22)-&80*4] ; are we using HCLK?
CMP R1, #-1
Push "r0-r1"
MOVEQ R0, #2 ; if not, pull the TV_Mode GPIO line low (if present)
MOVNE R0, #3 ; if we are, pull it high
ADR R1, TV_Mode_string
SWI XPortMan_AccessBit ; (don't forget svc_PortMan below)
Pull "r0-r1"
]
MOV R1, #0 ; always select 24MHz clock to feed into VIDC, and normal syncs
|
; now set up the VIDC clock latch, before we program any VIDC registers
......@@ -2561,6 +2579,25 @@ OfferModeExtension ROUT
Pull "r1, pc"
]
[ STB
svc_PortMan
TEQ R0, #0 ; PortManager starting
MOVNES PC, LR
; When PortManager restarts, we need to put TV_Mode back. PortMan defaults to
; output high, but we don't know polarity of bit, so must set either way.
Entry "r0-r1, WsPtr"
VDWS WsPtr
LDR R0, [WsPtr, #VIDCControlCopy] ; get saved VIDC control register
AND R0, R0, #CR_VCLK :OR: CR_HCLK :OR: CR_RCLK
TEQ R0, #CR_HCLK ; are we using HCLK?
MOVNE R0, #2 ; no: TV_Mode = 0
MOVEQ R0, #3 ; yes: TV_Mode = 1
addr R1, TV_Mode_string
SWI XPortMan_AccessBit
EXITS
]
; *****************************************************************************
;
; ETB - Redefine character
......
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