Commit a1e56734 authored by John Ballance's avatar John Ballance
Browse files

Correction to code to add GraphicsV_PixelFormats call to

  HAL graphics driver calls.  Added further debug capability
Detail:
  Added additional HAL call. minor code correction in hal graphicsv dispatcher
  Added DebugReg macro to aid debugging
Admin:
  (highlight level of testing that has taken place)
  (bugfix number if appropriate)


Version 5.35, 4.79.2.215. Tagged as 'Kernel-5_35-4_79_2_215'
parent 534344d9
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.214"
Module_Date SETS "29 Mar 2014"
Module_ApplicationDate SETS "29-Mar-14"
Module_MinorVersion SETS "4.79.2.215"
Module_Date SETS "04 Apr 2014"
Module_ApplicationDate SETS "04-Apr-14"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.214)"
Module_HelpVersion SETS "5.35 (29 Mar 2014) 4.79.2.214"
Module_FullVersion SETS "5.35 (4.79.2.215)"
Module_HelpVersion SETS "5.35 (04 Apr 2014) 4.79.2.215"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.214
#define Module_Date_CMHG 29 Mar 2014
#define Module_MinorVersion_CMHG 4.79.2.215
#define Module_Date_CMHG 04 Apr 2014
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.214"
#define Module_Date "29 Mar 2014"
#define Module_MinorVersion "4.79.2.215"
#define Module_Date "04 Apr 2014"
#define Module_ApplicationDate "29-Mar-14"
#define Module_ApplicationDate "04-Apr-14"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.214)"
#define Module_HelpVersion "5.35 (29 Mar 2014) 4.79.2.214"
#define Module_FullVersion "5.35 (4.79.2.215)"
#define Module_HelpVersion "5.35 (04 Apr 2014) 4.79.2.215"
#define Module_LibraryVersionInfo "5:35"
......@@ -175,6 +175,7 @@ EntryNo_HAL_VideoFramestoreAddress # 1 ; 116
EntryNo_HAL_UARTDefault # 1 ; 117
EntryNo_HAL_VideoStartupMode # 1 ; 118
EntryNo_HAL_VideoPixelFormatList # 1 ; 119
KnownHALEntries # 0 ; Used inside Kernel
......
......@@ -2871,9 +2871,9 @@ DebugHALPrint
CallHAL HAL_DebugTX
B %BT10
20 MOV a1, #13
CallHAL HAL_DebugTX
; CallHAL HAL_DebugTX
MOV a1, #10
CallHAL HAL_DebugTX
; CallHAL HAL_DebugTX
ADD v1, v1, #3
BIC lr, v1, #3
Pull "a1-a4,v1,sb,ip"
......@@ -2882,45 +2882,73 @@ DebugHALPrint
[ DebugHALTX
HALDebugHexTX
stmfd r13!, {r0-r3,sb,ip,lr}
AddressHAL
b jbdt1
HALDebugHexTX2
stmfd r13!, {r0-r3,sb,ip,lr}
AddressHAL
b jbdt2
HALDebugHexTX4
stmfd r13!, {r0-r3,sb,ip,lr}
DebugHALPrintReg ; Output number on top of stack to the serial port
Push "a1-a4,v1-v4,sb,ip,lr" ; this is 11 regs
LDR v2, [sp,#11*4] ; find TOS value on stack
ADR v3, hextab
MOV v4, #8
05
AddressHAL
mov r0,r0,ror #24 ; hi byte
bl jbdtxh
mov r0,r0,ror #24
bl jbdtxh
jbdt2
mov r0,r0,ror #24
bl jbdtxh
mov r0,r0,ror #24
jbdt1
bl jbdtxh
mov r0,#' '
10 LDRB a1, [v3, v2, LSR #28]
CallHAL HAL_DebugTX
ldmfd r13!, {r0-r3,sb,ip,pc}
jbdtxh stmfd r13!,{a1,v1,lr} ; print byte as hex. corrupts a2-a4, ip, assumes sb already AddressHAL'd
and v1,a1,#&f ; get low nibble
and a1,a1,#&f0 ; get hi nibble
mov a1,a1,lsr #4 ; shift to low nibble
cmp a1,#&9 ; 9?
addle a1,a1,#&30
addgt a1,a1,#&37 ; convert letter if needed
MOV v2, v2, LSL #4
SUBS v4, v4, #1
BNE %BT10
MOV a1, #13
CallHAL HAL_DebugTX
cmp v1,#9
addle a1,v1,#&30
addgt a1,v1,#&37
MOV a1, #10
CallHAL HAL_DebugTX
ldmfd r13!,{a1,v1,pc}
]
Pull "a1-a4,v1-v4,sb,ip,lr"
ADD sp, sp, #4
MOV pc, lr
hextab DCB "0123456789abcdef"
]
;
;
; [ DebugHALTX
;HALDebugHexTX
; stmfd r13!, {r0-r3,sb,ip,lr}
; AddressHAL
; b jbdt1
;HALDebugHexTX2
; stmfd r13!, {r0-r3,sb,ip,lr}
; AddressHAL
; b jbdt2
;HALDebugHexTX4
; stmfd r13!, {r0-r3,sb,ip,lr}
; AddressHAL
; mov r0,r0,ror #24 ; hi byte
; bl jbdtxh
; mov r0,r0,ror #24
; bl jbdtxh
;jbdt2
; mov r0,r0,ror #24
; bl jbdtxh
; mov r0,r0,ror #24
;jbdt1
; bl jbdtxh
; mov r0,#' '
; CallHAL HAL_DebugTX
; ldmfd r13!, {r0-r3,sb,ip,pc}
;
;jbdtxh stmfd r13!,{a1,v1,lr} ; print byte as hex. corrupts a2-a4, ip, assumes sb already AddressHAL'd
; and v1,a1,#&f ; get low nibble
; and a1,a1,#&f0 ; get hi nibble
; mov a1,a1,lsr #4 ; shift to low nibble
; cmp a1,#&9 ; 9?
; addle a1,a1,#&30
; addgt a1,a1,#&37 ; convert letter if needed
; CallHAL HAL_DebugTX
; cmp v1,#9
; addle a1,v1,#&30
; addgt a1,v1,#&37
; CallHAL HAL_DebugTX
; ldmfd r13!,{a1,v1,pc}
; ]
;
END
......@@ -21,11 +21,24 @@
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MACRO
DebugTX $str
DebugReg $reg, $str
[ DebugHALTX
Push "$reg"
[ "$str" <> ""
BL DebugHALPrint
= "$str", 0
ALIGN
]
bl DebugHALPrintReg
]
MEND
MACRO
DebugTX $str
[ DebugHALTX
BL DebugHALPrint
= "$str", 13,10,00
ALIGN
]
MEND
......
......@@ -32,7 +32,7 @@
MOSGraphicsVHAL ROUT
; HAL driver assumed to be driver #0
CMP r4, #(MOSGraphicsVHAL_TableEnd - MOSGraphicsVHAL_Table) / 4
ADDLS pc, pc, r4, LSL #2
ADDLO pc, pc, r4, LSL #2
MOV pc, lr ; reason code not known, so pass it on
MOSGraphicsVHAL_Table
MOV pc, lr ; 0
......@@ -52,6 +52,7 @@ MOSGraphicsVHAL_Table
GVHEntry IICOp ; 14
MOV pc, lr ; 15
GVHEntry StartupMode ; 16
GVHEntry PixelFormats ; 17 GVHAL_PixelFormats
MOSGraphicsVHAL_TableEnd
GVHAL_SetMode
......@@ -108,6 +109,16 @@ GVHAL_DisplayFeatures
MOV r2, r0
Pull "r0,r1,r3, r9, pc"
GVHAL_PixelFormats
Push "r3, r9, lr"
AddressHAL WsPtr
MOV r0, #0
MOV r1, #0
CallHAL HAL_VideoPixelFormatList
ORRS r3, r2, r1
MOVNE r4, #0
Pull "r3, r9, pc"
GVHAL_FramestoreAddress
Push "r3, r9, lr"
AddressHAL WsPtr
......
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