Commit c671badb authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Make GraphicsV_IICOp more consistent

No accepts  r0 = b31-24 set 0
                 b23-16 fully qualified IIC address
                 b15-0  starting offset
            r1 = buffer pointer
            r2 = number of bytes to tranfer
            r4 = b31-24 display number
                 b23-16 head
                 b15-0  reason code (=14)
Now returns r0 = result codes as per HAL_IICTransfer()
            r1 = buffer pointer incremented by number of bytes transferred
            r2 = number of bytes *not* transferred
            r4 = 0
Removed '_' after Video in entry numbers to be consistent with other HAL entry naming, and HAL_VideoFlybackDevice.
Added IICStatus return numbers to Hdr:HALEntries.
Stop calling HAL_MonitorLeadID as only IOMD implemented it - just guess VGA until the graphics driver says otherwise.

Version 5.35, 4.79.2.159. Tagged as 'Kernel-5_35-4_79_2_159'
parent 67b32058
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.158"
Module_Date SETS "02 Jul 2012"
Module_ApplicationDate SETS "02-Jul-12"
Module_MinorVersion SETS "4.79.2.159"
Module_Date SETS "04 Jul 2012"
Module_ApplicationDate SETS "04-Jul-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.158)"
Module_HelpVersion SETS "5.35 (02 Jul 2012) 4.79.2.158"
Module_FullVersion SETS "5.35 (4.79.2.159)"
Module_HelpVersion SETS "5.35 (04 Jul 2012) 4.79.2.159"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.158
#define Module_Date_CMHG 02 Jul 2012
#define Module_MinorVersion_CMHG 4.79.2.159
#define Module_Date_CMHG 04 Jul 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.158"
#define Module_Date "02 Jul 2012"
#define Module_MinorVersion "4.79.2.159"
#define Module_Date "04 Jul 2012"
#define Module_ApplicationDate "02-Jul-12"
#define Module_ApplicationDate "04-Jul-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.158)"
#define Module_HelpVersion "5.35 (02 Jul 2012) 4.79.2.158"
#define Module_FullVersion "5.35 (4.79.2.159)"
#define Module_HelpVersion "5.35 (04 Jul 2012) 4.79.2.159"
#define Module_LibraryVersionInfo "5:35"
......@@ -75,20 +75,20 @@ EntryNo_HAL_IICTransfer # 1 ; 36
EntryNo_HAL_IICMonitorTransfer # 1 ; 37
EntryNo_HAL_VideoFlybackDevice # 1 ; 38
EntryNo_HAL_Video_SetMode # 1 ; 39
EntryNo_HAL_Video_WritePaletteEntry # 1 ; 40
EntryNo_HAL_Video_WritePaletteEntries # 1 ; 41
EntryNo_HAL_Video_ReadPaletteEntry # 1 ; 42
EntryNo_HAL_Video_SetInterlace # 1 ; 43
EntryNo_HAL_Video_SetBlank # 1 ; 44
EntryNo_HAL_Video_SetPowerSave # 1 ; 45
EntryNo_HAL_Video_UpdatePointer # 1 ; 46
EntryNo_HAL_Video_SetDAG # 1 ; 47
EntryNo_HAL_Video_VetMode # 1 ; 48
EntryNo_HAL_Video_PixelFormats # 1 ; 49
EntryNo_HAL_Video_Features # 1 ; 50
EntryNo_HAL_Video_BufferAlignment # 1 ; 51
EntryNo_HAL_Video_OutputFormat # 1 ; 52
EntryNo_HAL_VideoSetMode # 1 ; 39
EntryNo_HAL_VideoWritePaletteEntry # 1 ; 40
EntryNo_HAL_VideoWritePaletteEntries # 1 ; 41
EntryNo_HAL_VideoReadPaletteEntry # 1 ; 42
EntryNo_HAL_VideoSetInterlace # 1 ; 43
EntryNo_HAL_VideoSetBlank # 1 ; 44
EntryNo_HAL_VideoSetPowerSave # 1 ; 45
EntryNo_HAL_VideoUpdatePointer # 1 ; 46
EntryNo_HAL_VideoSetDAG # 1 ; 47
EntryNo_HAL_VideoVetMode # 1 ; 48
EntryNo_HAL_VideoPixelFormats # 1 ; 49
EntryNo_HAL_VideoFeatures # 1 ; 50
EntryNo_HAL_VideoBufferAlignment # 1 ; 51
EntryNo_HAL_VideoOutputFormat # 1 ; 52
EntryNo_HAL_MatrixColumns # 1 ; 53
EntryNo_HAL_MatrixScan # 1 ; 54
......@@ -155,22 +155,22 @@ EntryNo_HAL_PhysInfo # 1 ; 105
EntryNo_HAL_USBControllerInfo # 1 ; 106
EntryNo_HAL_MonitorLeadID # 1 ; 107
# 1 ; 107 (was HAL_MonitorLeadID)
EntryNo_HAL_Video_Render # 1 ; 108
EntryNo_HAL_VideoRender # 1 ; 108
EntryNo_HAL_USBPortPower # 1 ; 109
EntryNo_HAL_USBPortStatus # 1 ; 110
EntryNo_HAL_USBPortIRQ # 1 ; 111
EntryNo_HAL_Video_IICOp # 1 ; 112
EntryNo_HAL_VideoIICOp # 1 ; 112
EntryNo_HAL_TimerIRQClear # 1 ; 113
EntryNo_HAL_TimerIRQStatus # 1 ; 114
EntryNo_HAL_ExtMachineID # 1 ; 115, ReadSysInfo 10
EntryNo_HAL_Video_FramestoreAddress # 1 ; 116
EntryNo_HAL_VideoFramestoreAddress # 1 ; 116
EntryNo_HAL_UARTDefault # 1 ; 117
......@@ -201,11 +201,22 @@ NVMemoryFlag_LowWrite * 1:SHL:11 ; locations 0-15 are writeable
; IIC
IICFlag_LowLevel * 1:SHL:0
IICFlag_HighLevel * 1:SHL:1
IICFlag_Background * 1:SHL:4
IICFlag_Fast * 1:SHL:16
IICFlag_HighSpeed * 1:SHL:17
IICFlag_LowLevel * 1:SHL:0
IICFlag_HighLevel * 1:SHL:1
IICFlag_MultiMaster * 1:SHL:2
IICFlag_Slave * 1:SHL:3
IICFlag_Background * 1:SHL:4
IICFlag_Fast * 1:SHL:16
IICFlag_HighSpeed * 1:SHL:17
IICFlag_ProtocolVersionShift * 20
IICFlag_ProtocolVersionMask * &FFF ; IIC protocol version x100
^ 0
IICStatus_Completed # 1 ; High level API return codes
IICStatus_InProgress # 1
IICStatus_NoACK # 1
IICStatus_Busy # 1
IICStatus_Slave # 1
IICStatus_Error # 1
; Keyboard scan
......
......@@ -463,7 +463,7 @@ SSETMEMC ROUT
MOV r0, #0
MOV r1
AddressHAL
CallHAL HAL_Video_SetBlank
CallHAL HAL_VideoSetBlank
Pull "r0-r3, r9, r14"
]
......
......@@ -547,15 +547,10 @@ oldirqowner & IRQ
ReadMachineType Entry "r0-r12"
[ HAL
MOV r0, #4_3330 ; Fudge 1 - VGA
; MOV r0, #4_3111 ; Fudge 2 - no connection - will do LCD
AddressHAL
CallHAL HAL_MonitorLeadID
LDR r1, =ZeroPage
MOV r0, #4_3330 ; Assume VGA during osinit
STRB r0, [r1, #MonitorLeadType]
MOV r2, #0
MOV r2, #0 ; Deprecated, just zero it
STRB r2, [r1, #IOSystemType]
EXIT
......
......@@ -314,7 +314,7 @@ SSETMEMC ROUT
MOV r0, #0
MOV r1
AddressHAL
CallHAL HAL_Video_SetBlank
CallHAL HAL_VideoSetBlank
Pull "r0-r3, r9, r14"
]
......
......@@ -1522,7 +1522,7 @@ Vdu23_0_8 ROUT
|
Push "R0-R3, R9, R12, LR"
AddressHAL
CallHAL HAL_Video_SetInterlace
CallHAL HAL_VideoSetInterlace
Pull "R0-R3, R9, R12, LR"
]
......
......@@ -179,21 +179,21 @@ VduInit ROUT
Push "r4, r9, r12"
AddressHAL
MOV r4, r12 ; temp WsPtr
CallHAL HAL_Video_Features
; Set bit 31 of features if HAL_Video_Render supported
CheckHAL HAL_Video_Render, r1
CallHAL HAL_VideoFeatures
; Set bit 31 of features if HAL_VideoRender supported
CheckHAL HAL_VideoRender, r1
ORREQ r0, r0, #1:SHL:31
STR r0, [r4, #HALVideoFeatures]
[ :LNOT:UseGraphicsV
CallHAL HAL_Video_PixelFormats
CallHAL HAL_VideoPixelFormats
STR r0, [r4, #HWPixelFormats]
CallHAL HAL_Video_BufferAlignment
CallHAL HAL_VideoBufferAlignment
STR r0, [r4, #HWBufferAlign]
]
Pull "r4, r9, r12"
;;; sort this out!
! 0, "HAL not doing anything useful with HAL_Video_BufferAlignment"
! 0, "HAL not doing anything useful with HAL_VideoBufferAlignment"
! 0, "HAL not dealing with lack of h/w pointer"
LDR R0, =RangeC+SpriteReason_SwitchOutputToSprite
......@@ -1079,7 +1079,7 @@ TV_Mode_string
BL CallGraphicsV
|
AddressHAL
CallHAL HAL_Video_SetMode
CallHAL HAL_VideoSetMode
Pull "R0-R3, R9, R12" ; restore registers after HAL call
]
......
......@@ -86,53 +86,53 @@ GV_SetMode
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_SetMode
CallHAL HAL_VideoSetMode
Pull "r0-r3, r9, pc"
GV_SetInterlace
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_SetInterlace
CallHAL HAL_VideoSetInterlace
Pull "r0-r3, r9, pc"
GV_SetBlank
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_SetBlank
CallHAL HAL_VideoSetBlank
Pull "r0-r3, r9, pc"
GV_UpdatePointer
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_UpdatePointer
CallHAL HAL_VideoUpdatePointer
Pull "r0-r3, r9, pc"
GV_SetDMAAddress
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_SetDAG
CallHAL HAL_VideoSetDAG
Pull "r0-r3, r9, pc"
GV_VetMode
Push "r1-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_VetMode
CallHAL HAL_VideoVetMode
Pull "r1-r3, r9, pc"
GV_DisplayFeatures
Push "r0,r1,r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_Features
CallHAL HAL_VideoFeatures
STR r0, [sp, #0]
CallHAL HAL_Video_PixelFormats
CallHAL HAL_VideoPixelFormats
STR r0, [sp, #4]
CallHAL HAL_Video_BufferAlignment
CallHAL HAL_VideoBufferAlignment
MOV r2, r0
Pull "r0,r1,r3, r9, pc"
......@@ -140,20 +140,20 @@ GV_WritePaletteEntry
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_WritePaletteEntry
CallHAL HAL_VideoWritePaletteEntry
Pull "r0-r3, r9, pc"
GV_WritePaletteEntries
Push "r0-r3, r9, lr"
AddressHAL WsPtr
MOV r4, #0
CallHAL HAL_Video_WritePaletteEntries
CallHAL HAL_VideoWritePaletteEntries
Pull "r0-r3, r9, pc"
GV_ReadPaletteEntry
Push "r0,r2-r3, r9, lr"
AddressHAL WsPtr
CheckHAL HAL_Video_ReadPaletteEntry, r3
CheckHAL HAL_VideoReadPaletteEntry, r3
Pull "r0,r2-r3, r9, pc", EQ
MOV r4, #0
[ NoARMv5
......@@ -173,17 +173,23 @@ GV_Render
Push "r0-r3, r9, lr"
ORR r0, r0, #1:SHL:31
AddressHAL
CallHAL HAL_Video_Render
CallHAL HAL_VideoRender
TEQ r0, #0
MOVPL r4, #0
Pull "r0-r3, r9, pc"
GV_IICOp
Push "r9, lr"
Push "r1-r3, r9, lr"
AddressHAL WsPtr
Push "r2" ; Bytes desired to tranfer
MOV r2, sp
CallHAL HAL_VideoIICOp
Pull "r4" ; Bytes actually transferred
Pull "r1-r3, r9, lr"
ADD r1, r1, r4 ; Advance pointer
SUB r2, r2, r4 ; Bytes not transferred
MOV r4, #0
CallHAL HAL_Video_IICOp
Pull "r9, pc"
MOV pc, lr
CallGraphicsV
Push "r10,r12,lr"
......
......@@ -662,7 +662,7 @@ UpdateSettingCommon ROUT
MOVLS r0, r0, LSR #8 ; type 0=normal, 1=border
MOVHI r0, #2 ; type 2=pointer
AddressHAL
CallHAL HAL_Video_WritePaletteEntry
CallHAL HAL_VideoWritePaletteEntry
Pull "r0-r3, r12, lr"
]
......@@ -713,7 +713,7 @@ UpdateSettingCommon ROUT
MOVLS r0, r0, LSR #8 ; type 0=normal, 1=border
MOVHI r0, #2 ; type 2=pointer
AddressHAL
CallHAL HAL_Video_WritePaletteEntry
CallHAL HAL_VideoWritePaletteEntry
Pull "r0-r3, r12, lr"
]
......@@ -906,7 +906,7 @@ DoR0Flash
|
PHPSEI r10 ; disable IRQs round this bit
AddressHAL
CallHAL HAL_Video_WritePaletteEntries
CallHAL HAL_VideoWritePaletteEntries
PLP r10
MOV r4, #0
]
......@@ -975,18 +975,18 @@ UpdateAllPalette ROUT
MOV r0, #0 ; type 0 (normal)
MOV r2, #0 ; start at entry 0
MOV r3, #256 ; 256 entries
CallHAL HAL_Video_WritePaletteEntries
CallHAL HAL_VideoWritePaletteEntries
;next, border colour
LDR r1, [r10] ; border colour
MOV r0, #1 ; type 1
MOV r2, #0 ; index 0
CallHAL HAL_Video_WritePaletteEntry
CallHAL HAL_VideoWritePaletteEntry
;finally, pointer colours
ADD r1, r10, #4 ; pointer to pointer colours (oh yes)
MOV r0, #2 ; type 2
MOV r2, #1 ; start at index 1
MOV r3, #3 ; 3 entries
CallHAL HAL_Video_WritePaletteEntries
CallHAL HAL_VideoWritePaletteEntries
]
;
PLP r11
......@@ -1023,7 +1023,7 @@ PV_BlankScreen ROUT
|
Push "r0, r12"
AddressHAL
CallHAL HAL_Video_SetBlank
CallHAL HAL_VideoSetBlank
Pull "r0, r12"
]
......@@ -1236,7 +1236,7 @@ PV_VIDCDisable ROUT
MOV r0, #1
AddressHAL
CallHAL HAL_Video_SetPowerSave
CallHAL HAL_VideoSetPowerSave
MOV r4, #0
Pull "r0-r3, r9, r12, pc"
......@@ -1248,7 +1248,7 @@ PV_VIDCRestore ROUT
MOV r0, #0
AddressHAL
CallHAL HAL_Video_SetPowerSave
CallHAL HAL_VideoSetPowerSave
MOV r4, #0
Pull "r0-r3, r9, r12, pc"
......
......@@ -399,7 +399,7 @@ UpdatePointer ROUT
|
Push "R9, R12, LR"
AddressHAL
CallHAL HAL_Video_UpdatePointer
CallHAL HAL_VideoUpdatePointer
Pull "R9, R12, PC"
]
......
......@@ -815,7 +815,7 @@ FindOKMode ROUT
Pull "r4"
|
AddressHAL
CallHAL HAL_Video_VetMode
CallHAL HAL_VideoVetMode
]
04
CMP r0,#0
......
......@@ -2171,7 +2171,7 @@ ScrollLineDown
;
; mjs Oct 2000 kernel/HAL split
; these routines now call HAL_Video_SetDAG
; these routines now call HAL_VideoSetDAG
; Note that the addresses provided are logical addresses for the software mapping
; of the display, and this starts at (ScreenEndAddr - TotalScreenSize) for
......@@ -2244,7 +2244,7 @@ Do_HALDAG
|
Push "r3, r9, r12, lr" ; we can corrupt r0-r2
AddressHAL
CallHAL HAL_Video_SetDAG
CallHAL HAL_VideoSetDAG
Pull "r3, r9, r12, 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