Commit 6589f4d7 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Update to work with zero page relocation

Detail:
  s/ADFS, s/Adfs00, s/Adfs50 - Use OS_ReadSysInfo 6 to get ESC_Status location and store it in module workspace
  s/Adfs05 - Updated debug code to use OS_ReadSysInfo 6 to get IRQsema location. Updated CheckEscape to use local ESC_Status pointer, and updated it to only be compiled if it's actually needed
  s/Adfs10, s/Adfs14, s/Adfs15, s/Adfs17 - Use local ESC_Status pointer
Admin:
  Tested (with low processor vectors) in Iyonix ROM softload
  Note that FIQ handlers haven't been updated to support high vectors, since they aren't currently used on any hardware capable of using high vectors


Version 3.40. Tagged as 'ADFS-3_40'
parent fff2a575
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.39"
Module_Version SETA 339
Module_MajorVersion SETS "3.40"
Module_Version SETA 340
Module_MinorVersion SETS ""
Module_Date SETS "18 Jul 2011"
Module_ApplicationDate SETS "18-Jul-11"
Module_Date SETS "07 Aug 2011"
Module_ApplicationDate SETS "07-Aug-11"
Module_ComponentName SETS "ADFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
Module_FullVersion SETS "3.39"
Module_HelpVersion SETS "3.39 (18 Jul 2011)"
Module_FullVersion SETS "3.40"
Module_HelpVersion SETS "3.40 (07 Aug 2011)"
END
/* (3.39)
/* (3.40)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.39
#define Module_MajorVersion_CMHG 3.40
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 Jul 2011
#define Module_Date_CMHG 07 Aug 2011
#define Module_MajorVersion "3.39"
#define Module_Version 339
#define Module_MajorVersion "3.40"
#define Module_Version 340
#define Module_MinorVersion ""
#define Module_Date "18 Jul 2011"
#define Module_Date "07 Aug 2011"
#define Module_ApplicationDate "18-Jul-11"
#define Module_ApplicationDate "07-Aug-11"
#define Module_ComponentName "ADFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
#define Module_FullVersion "3.39"
#define Module_HelpVersion "3.39 (18 Jul 2011)"
#define Module_LibraryVersionInfo "3:39"
#define Module_FullVersion "3.40"
#define Module_HelpVersion "3.40 (07 Aug 2011)"
#define Module_LibraryVersionInfo "3:40"
......@@ -53,6 +53,7 @@ ARM810support SETL {FALSE}
GET Hdr:Podule
GET Hdr:DMA
GET Hdr:DMADevice
GET Hdr:OSRSI6
GET NewBits.s
GET ADFSMacros.s
......
......@@ -480,6 +480,7 @@ HAL_CounterDelay_routine a4 8
HAL_FIQEnable_routine a4 8
HAL_FIQDisableAll_routine a4 8
]
ptr_ESC_Status a4 4
;Low level workspace
......
......@@ -85,13 +85,30 @@ $Host_Inclusion
; DREG R0, "Rin:",cc
[ Dev
; Ugly but necessary because debug macros can get called before
; workspace is set up
; Exits NE if IRQsema <> 0
MACRO
CheckIRQsema
Push "r0-r2,lr"
MOV r0, #6
MOV r1, #0
MOV r2, #OSRSI6_IRQsema
SWI XOS_ReadSysInfo
MOVVS r2, #0
CMP r2, #0
LDREQ r2, =Legacy_IRQsema
LDR r2, [r2]
TEQ r2, #0
Pull "r0-r2,lr"
MEND
PHEX
SavePSR R4
[ :LNOT: IrqDebug
MOV R3, #IRQsema
LDR R3, [R3]
TEQS R3, #0
BNE PHEXIT1
CheckIRQsema
BNE PHEXIT1 ;return if IRQ thread
]
MOV R3, LR
......@@ -158,10 +175,8 @@ Mess1 ;R0,R1,LR stacked
SavePSR R0 ;save PSR
MOV R1, LR ;save link
[ :LNOT: IrqDebug
MOV LR, #IRQsema
LDR LR, [LR]
TEQS LR, #0
MOVNE PC, R1 ;skip if IRQ thread, return NE
CheckIRQsema
MOVNE PC, R1 ;skip if IRQ thread, return NE
]
BIC LR, R0, #3
[ No32bitCode
......@@ -515,6 +530,7 @@ BlockMove ROUT
Pull "R0-R12,PC"
]
[ Support1772
; ===========
; CheckEscape
; ===========
......@@ -526,12 +542,13 @@ BlockMove ROUT
CheckEscape
Push "R1,LR"
LDR R1, =ESC_Status
LDR R1, ptr_ESC_Status
LDRB R1, [R1]
EOR R1, R1, #EscapeBit
TSTS R1, #EscapeBit
MOVEQ R0, #IntEscapeErr
Pull "R1,PC"
]
; ===========
; ReadOldCMOS
......
......@@ -175,8 +175,8 @@ TestEscapeStatus ROUT
LDR R0, opCode
TSTS R0, #NoEscape ;are we ignoring escapes ?
MOVNES PC, R14
MOV R0, #0
LDRB R0, [R0, #ESC_Status]
LDR R0, ptr_ESC_Status
LDRB R0, [R0]
TSTS R0, #EscapeBit
MOVEQS PC, R14
MOV R0, #IntEscapeErr
......
......@@ -3947,8 +3947,8 @@ WinIDECheckEscape ROUT
; escape is allowed during this op - check if pressed
MOV R0,#0 ; R0 -> low memory
LDRB R0,[R0,#ESC_Status] ; get escape flag
LDR R0,ptr_ESC_Status
LDRB R0,[R0] ; get escape flag
TSTS R0,#EscapeBit ; escape?
MOVEQ PC,LR ; return if not
......
......@@ -809,7 +809,7 @@ NotDrq ROUT
15
TSTS R4, #NoEscape
BNE %FT20 ;if ignoring escapes
MOV LR, #ESC_Status
LDR LR, ptr_ESC_Status
LDRB LR, [LR]
TSTS LR, #EscapeBit
MOVNE R0, #IntEscapeErr
......@@ -1061,7 +1061,7 @@ FiqError
AND R4, R4, #OpMask
BNE %FT45 ;if ignoring escapes
MOV LR, #ESC_Status
LDR LR, ptr_ESC_Status
LDRB LR, [LR]
ASSERT EscapeBit<&100 ;to preserve C
TSTS LR, #EscapeBit
......
......@@ -757,7 +757,7 @@ FlpTickerV ROUT
; Check for escape key pressed
MOV LR, #ESC_Status ; Escape flag global address
LDR LR, ptr_ESC_Status ; Escape flag global address
LDRB LR, [LR] ; Get escape flag
TSTS LR, #EscapeBit ; Escape pressed?
MOVNE R0, #FlpMsgESC ; Yes then escape message
......
......@@ -204,6 +204,15 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
STR R1, HAL_FIQEnable_routine
]
MOV R0,#6
MOV R1,#0
MOV R2,#OSRSI6_ESC_Status
SWI XOS_ReadSysInfo
MOVVS R2,#0
CMP R2,#0
LDREQ R2,=Legacy_ESC_Status
STR R2,ptr_ESC_Status
; Determine machine type
Push "R3,R4"
......
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