Commit a2d689f9 authored by Ben Avison's avatar Ben Avison
Browse files

Reintroduced support for IOMD machines

Detail:
  There was no "Ver" file for Machine=32, and the code for build switch
  settings appropriate for IOMD had not been kept up-to-date with various
  changes to the module which were made to support Tungsten. This version
  provides working IDE support for IOMD HAL builds, although there are
  still some issues with floppy support. Tungsten builds should be
  functionally identical.
Admin:
  Tested on a Risc PC. Joint development effort by Tom Walker and Ben Avison.

Version 3.37. Tagged as 'ADFS-3_37'
parent 63753fc1
GET Version
PCI SETL {FALSE}
Support1772 SETL {FALSE}
ByteAddressedHW SETL {FALSE}
A1 SETL {TRUE}
Top16Write SETL {FALSE}
IOMD SETL {TRUE}
TwinIDEHardware SETL {FALSE}
NewTransferCode SETL {FALSE}
FloppyPodule SETL {FALSE}
FloppyPCI SETL {FALSE}
UseDiscOp64 SETL {TRUE}
IDEDMA SETL {FALSE}
END
......@@ -6,6 +6,7 @@ ByteAddressedHW SETL {TRUE}
A1 SETL {TRUE}
Top16Write SETL {FALSE}
IOMD SETL {TRUE}
TwinIDEHardware SETL {TRUE}
NewTransferCode SETL {TRUE}
FloppyPodule SETL {FALSE}
FloppyPCI SETL :LNOT:FloppyPodule
......
......@@ -21,6 +21,7 @@ test_version SETL {FALSE}
GBLL Support1772
GBLL IOMD
GBLL PCI
GBLL TwinIDEHardware
GBLL NewTransferCode
GBLL ByteAddressedHW
GBLA Override_PDevNo
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.36"
Module_Version SETA 336
Module_MajorVersion SETS "3.37"
Module_Version SETA 337
Module_MinorVersion SETS ""
Module_Date SETS "19 Jan 2010"
Module_ApplicationDate SETS "19-Jan-10"
Module_Date SETS "06 Dec 2010"
Module_ApplicationDate SETS "06-Dec-10"
Module_ComponentName SETS "ADFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
Module_FullVersion SETS "3.36"
Module_HelpVersion SETS "3.36 (19 Jan 2010)"
Module_FullVersion SETS "3.37"
Module_HelpVersion SETS "3.37 (06 Dec 2010)"
END
/* (3.36)
/* (3.37)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.36
#define Module_MajorVersion_CMHG 3.37
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Jan 2010
#define Module_Date_CMHG 06 Dec 2010
#define Module_MajorVersion "3.36"
#define Module_Version 336
#define Module_MajorVersion "3.37"
#define Module_Version 337
#define Module_MinorVersion ""
#define Module_Date "19 Jan 2010"
#define Module_Date "06 Dec 2010"
#define Module_ApplicationDate "19-Jan-10"
#define Module_ApplicationDate "06-Dec-10"
#define Module_ComponentName "ADFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
#define Module_FullVersion "3.36"
#define Module_HelpVersion "3.36 (19 Jan 2010)"
#define Module_LibraryVersionInfo "3:36"
#define Module_FullVersion "3.37"
#define Module_HelpVersion "3.37 (06 Dec 2010)"
#define Module_LibraryVersionInfo "3:37"
......@@ -324,6 +324,7 @@ WinInit ROUT
BLNE WinClaimIDEIRQs
BVS %FT80
[ IDEDMA
Push "R1-R5"
ADDR R0, WinIDEDMAEnable
ADDR R1, WinIDEDMADisable
......@@ -333,6 +334,7 @@ WinInit ROUT
ADR R5, WinIDEDMAHandlers
STMIA R5, {R0-R4}
Pull "R1-R5"
]
MOV R0,#0 ; -SRST IEN
STRB R0,[R4,#:INDEX:IDERegDevCtrl]
......@@ -470,6 +472,8 @@ WinInit ROUT
TEQ R1,#Service_Serviced
BEQ %FT05
[ {FALSE} ; This code is using an obsolete version of the ATAControllerInfo call
; and its functionality has already been performed above anyway
Push "R9,R12"
SUB SP,SP,#32
MOV R0,SP
......@@ -494,6 +498,7 @@ WinInit ROUT
STRB R14,WinIDEHWType
LDRB R4,WinIDEDrives ; needed later
]
B %FT15
05
......@@ -507,14 +512,18 @@ WinInit ROUT
|
MOVNE R14, #Podule_DevNo
]
STRB R14, WinIDEHWDevNo
STRB R14, WinIDEHardware+WinIDEHWDevNo
]
MOVEQ R14, #WinIDEHW_Default
MOVNE R14, #WinIDEHW_Podule
; Save info
ASSERT WinIDEPtr = WinIDEHardware
[ HAL
ASSERT WinIDEPtr = 4
|
ASSERT WinIDEPtr = 0
]
ASSERT WinIDEPollPtr = WinIDEPtr + 4
ASSERT WinIDEPollBits = WinIDEPollPtr + 4
ASSERT WinIDEIRQPtr = WinIDEPollBits + 4
......@@ -523,12 +532,16 @@ WinInit ROUT
ASSERT WinIDEWritePtr = WinIDEReadPtr + 4
sbaddr R9,WinIDEHardware
[ HAL
STMIB R9,{R2-R8}
|
STMIA R9,{R2-R8}
STRB R14,WinIDEHWType
]
STRB R14,WinIDEHardware+WinIDEHWType
[ HAL
ADD R14,R2,#IDERegCtlDefaultOffset
STR R14,WinIDECtrlPtr
STR R14,WinIDEHardware+WinIDECtrlPtr
]
; Check whether there really is IDE hardware to talk to (yet - podule
......
......@@ -212,7 +212,11 @@ DoSwiSetIDEController ROUT
; Save info
ASSERT WinIDEPtr = WinIDEHardware
[ HAL
ASSERT WinIDEPtr = 4
|
ASSERT WinIDEPtr = 0
]
ASSERT WinIDEPollPtr = WinIDEPtr + 4
ASSERT WinIDEPollBits = WinIDEPollPtr + 4
ASSERT WinIDEIRQPtr = WinIDEPollBits + 4
......@@ -220,7 +224,11 @@ DoSwiSetIDEController ROUT
ASSERT WinIDEReadPtr = WinIDEIRQBits + 4
ASSERT WinIDEWritePtr = WinIDEReadPtr + 4
[ HAL
STMIB R9,{R2-R8}
|
STMIA R9,{R2-R8}
]
[ HAL
[ Override_PDevNo <> -1
......@@ -228,14 +236,14 @@ DoSwiSetIDEController ROUT
|
MOV R14, #Podule_DevNo
]
STRB R14, WinIDEHWDevNo
STRB R14, WinIDEHardware+WinIDEHWDevNo
]
MOV R14, #WinIDEHW_Podule
STRB R14, WinIDEHWType
STRB R14, WinIDEHardware+WinIDEHWType
[ HAL
ADD R14,R2,#IDERegCtlDefaultOffset
STR R14,WinIDECtrlPtr
STR R14,WinIDEHardware+WinIDECtrlPtr
]
; Claim the device vector
......@@ -249,10 +257,10 @@ DoSwiSetIDEController ROUT
; will actually be able to interrupt.
[ HAL
LDR R2,WinIDECtrlPtr
LDR R2,WinIDEHardware+WinIDECtrlPtr
]
MOV R0,#0 ; IEN
STRB R0,[R2,#:INDEX:IDERegDigOutput]
STRB R0,[R2,#:INDEX:IDERegDevCtrl]
; Mark drives as uninitialised
......@@ -1110,7 +1118,7 @@ DoSwiIDEDeviceInfo ROUT
; drive number checked
ADR r3, WinIDEDeviceMappings
ADRL r3, WinIDEDeviceMappings
LDRB r2, [r3, r1] ; get drive number (also gives type)
ADR r3, WinIDEDeviceNoIdFlags
......
......@@ -2810,7 +2810,7 @@ WinIDEInstallTransferCode ROUT
; Copy new code into RAM.
ADR R10,LowCodeLocation ; R10 -> where code will go
ADDR R10,LowCodeLocation ; R10 -> where code will go
TEQS R0,#ReadSecsOp
baddr R9,ALowReadCodeStart,EQ ; R9 -> code to copy
baddr R9,ALowWriteCodeStart,NE
......@@ -2837,7 +2837,7 @@ WinIDEInstallTransferCode ROUT
[ StrongARM
;synchronise with respect to modified code
MOV R0,#1 ;means range specified in R1,R2
ADR R1,LowCodeLocation ;start virtual address
ADDR R1,LowCodeLocation ;start virtual address
SUB R2,R10,#4 ;end virtual address (inclusive)
SWI XOS_SynchroniseCodeAreas ;do the necessary for extant ARM variant
]
......@@ -2918,15 +2918,18 @@ WinIDEReadASector32
MOV R10,PC
B ReadCode
|
ADDR R2,LowCodeLocation
STR PC,RomReturn ; set return address
ADR PC,LowCodeLocation ; i.e. B LowCodeLocation
MOV PC,R2 ; i.e. B LowCodeLocation
NOP ; not executed
; RAM code returns here
; Read another &100 bytes
ADDR R2,LowCodeLocation
STR PC,RomReturn
ADR PC,LowCodeLocation
MOV PC,R2
NOP ; not executed
]
......@@ -3117,15 +3120,17 @@ WinIDEWriteRegs SETS "R2-R9,IDE"
|
; Write &100 bytes
ADDR R2,LowCodeLocation ; i.e. BCS LowCodeLocation
STR PC,RomReturn ; set return address
ADR PC,LowCodeLocation ; i.e. BCS LowCodeLocation
MOV PC,R2
NOP ; not executed
; RAM code returns here
; Write another &100 bytes
ADDR R2,LowCodeLocation
STR PC,RomReturn
ADR PC,LowCodeLocation
MOV PC,R2
NOP ; not executed
]
......
......@@ -103,6 +103,7 @@ FlpFintr * 23 ; Device number for '765 IRQ
FlpIndex * 2 ; Device number for Index pulse IRQ
|
FlpDRQmask * 1 ; '765 DRQ FIQ mask for IOC
FlpDRQmaskbit * 0
[ FloppyPodule
FlpFintr * 13
FlpIndex * 13
......
......@@ -1471,19 +1471,17 @@ FlpHandlerData_ExecuteCommand
[ HAL
[ :LNOT:FloppyPCI
[ FloppyPodule
Push "R0,R2,R3,R9,R12"
MOV R0, #0
MOV R0, #FlpDRQmaskbit
sbaddr R1, HAL_FIQEnable_routine
MOV LR, PC
LDMIA R1, {R9, PC}
Pull "R0,R2,R3,R9,R12"
[ FloppyPodule
LDR R1, FlpDACK_TC
SUB R1, R1, #&400000
MOV LR, #1
STRB LR, [R1, #8]
|
! 1, "Don't know about FIQs for HAL, non-Podule"
]
]
]
......@@ -1692,7 +1690,9 @@ FlpHandlerData_SeekFault
TEQ R0, #&FF
BNE %FT66
BL FlpController_TransferSize
[ FloppyPCI
STR R1, FlpDMACount
]
66
]
......
......@@ -504,12 +504,13 @@ FlpDie ROUT
]
baddr R1, FlpIndexIRQ ; Address of handler
SWI XOS_ReleaseDeviceVector ; Release vector (R0-R2->R0,V)
[ FloppyPCI
LDR R0, FlpDMAHandle
CMP R0, #-1
SWINE XDMA_DeregisterChannel
MOV R0, #-1
STR R0, FlpDMAHandle
]
MOV R0, #FlpFintr ; Floppy IRQ interrupt
baddr R1, Flp765IRQ ; Address of handler
......@@ -692,15 +693,16 @@ FlpReset ROUT
SWI XOS_Hardware ; corrupts R0-R3
Pull "R1,R3,R8,R9"
|
MOV R0, #IOC ; R0-> IOC registers
LDRB LR, [R0, #IOCIRQMSKB] ; Get IRQB mask bits
ORR LR, LR, #IOMD_floppy_IRQ_bit
STRB LR, [R0, #IOCIRQMSKB] ; Enable '765 FDC interrupts
LDRB LR, [R0, #IOCIRQMSKA] ; Get IRQA mask bits
ASSERT FlpIndex < 8 ; Index IRQ in IOC IRQA
ORR LR, LR, #1:SHL:FlpIndex ; Set Index pulse mask bit
STRB LR, [R0, #IOCIRQMSKA] ; Enable Index pulse interrupts
Push "R1,R3,R8,R9"
MOV R0, #IOMD_Floppy_DevNo
MOV R8, #0
MOV R9, #EntryNo_HAL_IRQEnable
SWI XOS_Hardware ; corrupts R0-R3
MOV R0, #IOMD_FloppyIndex_DevNo
MOV R8, #0
MOV R9, #EntryNo_HAL_IRQEnable
SWI XOS_Hardware ; corrupts R0-R3
Pull "R1,R3,R8,R9"
]
]
......
......@@ -31,12 +31,16 @@ MaxUDMAMode * 7
ProbeIDEDevices ROUT
Push "R0-R3,R5-R9,IDECtrl,IDE, LR"
ASSERT WinIDEMaxDrives = 4
MOV R0, #WinIDENoDevice
STRB R0, WinIDEDeviceMappings+0
STRB R0, WinIDEDeviceMappings+1
[ :LNOT: TwinIDEHardware
ASSERT WinIDEMaxDrives = 2
|
ASSERT WinIDEMaxDrives = 4
STRB R0, WinIDEDeviceMappings+2
STRB R0, WinIDEDeviceMappings+3
]
SWI XOS_ReadMonotonicTime
BVS %FT95
......
......@@ -49,9 +49,6 @@ ServicePolice SETL {TRUE}
GBLL AutoDetectIDE
AutoDetectIDE SETL {TRUE}
GBLL TwinIDEHardware
TwinIDEHardware SETL {TRUE}
; new 32-bit FileCore error reporting scheme
GBLL NewErrors
NewErrors SETL {TRUE}
......
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