Commit 1bb3b9d0 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Made 32-bit compatible.

Detail:
  Lots of little changes throughout a lot of source.
Admin:
  Appears to work - not stress tested with things like lots of tasks, big
  transfers, and all the other things that tend to go wrong.

Version 4.47. Tagged as 'Wimp-4_47'
parent 79eb2aec
......@@ -77,6 +77,7 @@
Option HideIconBar, false ; icon bar is behind Wimp back window until brought to front
Option UTF8, true ; support for UTF-8 alphabet (Unicode)
Option CnP, true ; support for RISC OS selection model and Cut-and-Paste in writeable icons
Option NoFontBodge, false ; don't use outline fonts
Option RegisterMessages, false
Option RegisterTools2D, false
......
; Copyright 2000 Pace Micro Technology plc
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
;
; Wimp options for a 32-bit desktop build of the Window Manager
;
module_postfix SETS " 32-bit"
Option ServiceCallTable, true ; Add Ursula kernel Service Call table
Option ShrinkableAreas, true ; Support Shrinkable Dynamic Areas
Option TrueIcon2, true :LAND: TrueIcon1 ; true colour support, phase 2
Option TrueIcon3, true :LAND: TrueIcon2 ; true colour support, phase 3 (windows)
Option IconiseButton, true ; Windows given iconise button
Option BounceClose, true ; Furniture buttons are release-type
Option ForegroundWindows, true ; Layering of windows within each stack
Option SpritePriority, true ; Allow configurable sprite pool priority
Option Autoscr, true ; Add Wimp_AutoScroll and dragbox-within-window facilities
Option StickyEdges, false ; unimplemented ; Allow windows to "stick" when dragged over edge of screen
Option MultiClose, true ; Allow Ctrl-Alt clicks on close/iconise buttons
Option PushBothBars, true ; Push in both scrollbars on adjust-drags
ASSERT International_Help <> 0
END
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "4.46"
Module_Version SETA 446
Module_MajorVersion SETS "4.47"
Module_Version SETA 447
Module_MinorVersion SETS ""
Module_Date SETS "13 Apr 2000"
Module_FullVersion SETS "4.46"
Module_Date SETS "25 Apr 2000"
Module_FullVersion SETS "4.47"
END
/* (4.46)
/* (4.47)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.46
#define Module_MajorVersion_CMHG 4.47
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 13 Apr 2000
#define Module_Date_CMHG 25 Apr 2000
#define Module_MajorVersion "4.46"
#define Module_Version 446
#define Module_MajorVersion "4.47"
#define Module_Version 447
#define Module_MinorVersion ""
#define Module_Date "13 Apr 2000"
#define Module_Date "25 Apr 2000"
#define Module_FullVersion "4.46"
#define Module_FullVersion "4.47"
......@@ -176,8 +176,9 @@ int_autoscroll
BL update_autoscroll_state
CLRV
TST R0, #af_enable
EXITS NE
EXIT NE
MOV R0, #SpriteReason_SetPointerShape
ADRL R14, special_pointer ; if turned off, get pointer to sprite
......@@ -191,7 +192,8 @@ int_autoscroll
MOV R6, #0
MOV R7, #0
SWI XWimp_SpriteOp
EXITS
CLRV
EXIT
update_autoscroll_state
; In: R0 = new autoscroll state, in bits 0-4
......@@ -202,12 +204,13 @@ update_autoscroll_state
BL update_autoscroll_flags
LDR R0, autoscr_state
CLRV
TEQ R0, R1
EXITS EQ ; no change
EXIT EQ ; no change
LDR R14, autoscr_rout
TEQ R14, #0
EXITS EQ ; no pointer update routine
EXIT EQ ; no pointer update routine
CLRV ; make sure clean on entry
Push "wsptr"
......@@ -215,11 +218,10 @@ update_autoscroll_state
Push "R14" ; store new PC
LDR R14, autoscr_wsptr
Push "R14" ; store new wsptr
MOV R14, PC ; gets PC+12
MOV R14, PC ; gets PC+8
Pull "wsptr, PC" ; BL [autoscr_rout]
NOP
Pull "wsptr" ; retrieve Wimp wsptr
EXITS
EXIT
update_autoscroll_flags
; Updates status flag bits to reflect current state
......@@ -232,7 +234,7 @@ update_autoscroll_flags
STREQ R0, autoscr_state
STREQB R0, autoscr_scrolling
STREQB R0, autoscr_pausing
EXITS EQ
EXIT EQ
LDR R14, =af_status_bits ; all bits default to 0
BIC userblk, R0, R14 ; keep in userblk until end of routine
......@@ -315,7 +317,7 @@ update_autoscroll_flags
BICEQ userblk, userblk, #af_status_vert
STR userblk, autoscr_state
EXITS
EXIT
get_centre_zone
; In: handle = autoscroll window handle
......@@ -360,7 +362,7 @@ get_centre_zone
MOVLT y0, y1, LSR#1 ; find the middle of the overlap
MOVLT y1, y0
EXITS
EXIT
autoscroll_pointer_routine_1
; handles pointer changes according to the default rules
......@@ -383,7 +385,7 @@ autoscroll_pointer_routine_1
MOVNE R1, #1
TEQ R0, R1 ; don't do anything if status constant
EXITS EQ
EXIT EQ
TEQ R0, #0 ; is it being turned on or off?
BEQ %FT10
......@@ -437,7 +439,8 @@ autoscroll_pointer_routine_1
MOV R0, #SpriteReason_SetPointerShape
SWI XWimp_SpriteOp
EXITS
CLRV
EXIT
10 ; turn *off* autoscroll pointer
LDRB R3, autoscr_old_ptr_number
......@@ -496,7 +499,8 @@ autoscroll_pointer_routine_1
SWI XOS_Word ; restore original pointer colour 3
ADD sp, sp, #8
EXITS
CLRV
EXIT
autoscroll_pointers
DCB "ptr_autoscrh", 0, 0, 0, 0
......@@ -505,7 +509,7 @@ autoscroll_pointers
poll_autoscroll
; Called during poll - update scroll flags, issue open/scroll rqs if necessary
Entry "R0-cy1"
EntryS "R0-cy1"
LDR R0, autoscr_state
BL update_autoscroll_state
......
......@@ -283,7 +283,8 @@ createsystemp
MOVVC R14,#1
STRVC R14,[handle,#w_areaCBptr] ; use common sprite pool
98
Push "R0,PC" ; Save flags
SavePSR R14
Push "R0,R14" ; Save flags
TEQ userblk,#0
MOVNE R2,userblk ; userblk --> window block
MOVNE R0,#ModHandReason_Free
......@@ -293,7 +294,7 @@ createsystemp
BLNE XROS_Module
BL int_close_template
Pull "R0,R14"
TEQP R14,#0 ; Restore V flag
RestPSR R14,,f ; Restore V flag
99
ADD sp,sp,#12 ; lose copy of name
Pull "R1-R6,userblk,PC"
......@@ -611,7 +612,7 @@ resizeiconbaricons
STRB R0,iconbar_needs_rs
LDR handle,iconbarhandle
CMP handle,#1
Pull "R0-R5,R7,handle,userblk,PC",LT,^
Pull "R0-R5,R7,handle,userblk,PC",LT
Abs handle,handle
LDR R5,[handle,#w_icons]
LDR R3,[handle,#w_nicons]
......
......@@ -253,18 +253,17 @@ noclaim
DCB "DF:An area (%0) which has already been freed (or not previously claimed) has tried to be freed from %1.",0
ExtendList
Push R14
EntryS
MOV R14,#1
STRB R14,reentrancyflag
BL Dynamic_Module
MOV R14,#0
STRB R14,reentrancyflag
Pull PC,VC,^
Pull PC
EXITV
|
XROS_Module Entry
XROS_Module EntryS
TEQ R0,#6
TEQNE R0,#7
TEQNE R0,#13
......@@ -330,8 +329,7 @@ Dynamic_Module
[ :LNOT:Medusa
BL XROS_Module
MOV R1,R2
Pull PC,VS
Pull PC,,^
Pull PC
| ; Medusa
05
......@@ -413,8 +411,7 @@ Dynamic_Module
STRB R1,memoryOK
STRVS R0,[SP]
Pull "R0-R9,PC",VS
Pull "R0-R9,PC",,^
Pull "R0-R9,PC"
]
......
......@@ -268,7 +268,7 @@ allocatespritememory
10
LDR R1,wimpspritepoolarea
BL Dynamic_Module
Pull "R1,R8,PC",VC,^
Pull "R1,R8,PC",VC
MyXError WimpNoSprites
Pull "R1,R8,PC"
......
......@@ -366,7 +366,7 @@ tile_putsprite
SWI XOS_SpriteOp
SWIVS XOS_WriteI+16
Pull "R1-R7,PC",,^
Pull "R1-R7,PC"
get_new_pixtable Entry "R0-R6"
......@@ -390,7 +390,7 @@ get_new_pixtable Entry "R0-R6"
STR R7,tile_pixtable
STR R7,tile_temptab
EXITS
EXIT
05
; if tile_temptab and tile_pixtable were different then we must have been
......@@ -403,7 +403,7 @@ get_new_pixtable Entry "R0-R6"
LDR R7,pixtable_at
STR R7,tile_temptab
EXITS
EXIT
LTORG
......
......@@ -20,7 +20,8 @@ watchdogguard DCD &E240569E
[ WatchdogTimer
BreakWatchdogHandler Entry "R0"
BreakWatchdogHandler
Push "R0-R1"
|
......@@ -36,12 +37,19 @@ BreakWatchdogHandler
]
TEQ R2,#15 ; break key
MOVNE PC,lr
Push "R0"
Push "R0-R1"
]
[ No32bitCode
MOV R0,PC
TEQP PC,#SVC_mode
NOP
|
MRS R0,CPSR
ORR R1,R0,#SVC_mode
BIC R1,R1,#I32_bit+F32_bit
MSR CPSR_c,R1
]
Push "R0-R2,LR"
LDR R0,watchdogcodew
......@@ -91,9 +99,13 @@ BreakWatchdogHandler
SWI XOS_Byte ; clear escape condition
watchdogend
Pull "R0-R2,LR"
[ No32bitCode
TEQP PC,R0
NOP
Pull "R0,PC"
|
MSR CPSR_c,R0
]
Pull "R0-R1,PC"
LTORG
......@@ -285,13 +297,13 @@ watchdogappname
printjobrunning Entry R0
LDR R14,taskhandle
TEQ R0,R14 ; killing current task ?
EXITS NE
EXIT NE
SWI XPDriver_CurrentJob
EXITS VS
EXIT VS
TEQ R0,#0
EXITS EQ
EXIT EQ
SWI XPDriver_AbortJob
EXITS
EXIT
]
......@@ -319,10 +331,17 @@ SWIWimp_SetWatchdogState
[ SnapShot
capturescreen
Push R0
Push "R0-R1"
[ No32bitCode
MOV R0,PC
TEQP PC,#SVC_mode ; need a stack!!!
NOP
|
MRS R0,CPSR
BIC R1,R0,#I32_bit+F32_bit
ORR R1,R1,#SVC_mode
MSR CPSR_c,R1
]
Push "R0-R2,LR"
MOV R0,#121
......
......@@ -122,7 +122,6 @@ $l CallFilter $name,$nohandle
ADRL R11,$name.WP ; address the vector table
MOV LR,PC ; setup suitable return address
LDMIA R11,{wsptr,PC} ; call the filter
NOP
Pull "R2,R11,wsptr" ; restore pushed registers
MEND
......@@ -546,7 +545,7 @@ priority_null * 1:SHL:5 ;32
priority_top * 1:SHL:20
task_environment # 4*3*MaxEnvNumber ; environment pointers
task_registers # 4*16 ; USR register set
task_registers # 4*17 ; USR register set
task_datasize # 0
; extra bits for Wimp_Poll - not stored in task_flagword
......@@ -866,9 +865,10 @@ openspending # 1 ; whether we're in the middle of a set o
ALIGNHASH 4
oldfxstatus # 11 ; *FX 4
oldfxstatus # 13 ; *FX 4
; *FX 219
; *FX 221..228
; *FX 9..10
; *FX 229
[ mousecache
......@@ -1397,6 +1397,8 @@ rlinks # 4*maxrects
rectarea # 16*maxrects
rectend # 0
registerbuffer # 4*17
ALIGNHASH 64
maxtasks * 128
......@@ -1404,7 +1406,6 @@ maxtasks * 128
taskstack # maxtasks * 4 ; each task can only be in it once!
taskpointers # maxtasks * 4 ; pointers to task data blocks
maxtaskhandle * :INDEX:@
registerbuffer # 4*16
PollTasks # maxtasks * 4 ; Packed list of tasks with pollwords
......@@ -1412,6 +1413,7 @@ errorbuffer # 256 ; used by error handler
taskbuffer # 256 ; command which starts a task
errordynamic * errorbuffer+4 ; put these after stashed PC
errordynamicsize * ?errorbuffer-4
stackspace # 0 ; temporary stack for debugging!
tools_area # 4 ; area for tools list
......@@ -1859,6 +1861,7 @@ MySWIBase * Module_SWISystemBase + WimpSWI * Module_SWIChunkSize
|
DCD 0
]
DCD Flags
Title = "WindowManager",0
Helpstr = "Window Manager",9,"$Module_MajorVersion ($Module_Date)"
......@@ -2139,6 +2142,13 @@ WimpButtonTypeC_Syntax DCB "SWNMBT",0
]
Flags
[ No32bitCode
DCD 0
|
DCD ModuleFlag_32bit
]
Helptable
Command IconSprites,1,1,International_Help ; max/min pars (!)
Command Pointer,1,0,International_Help
......@@ -2734,7 +2744,7 @@ getspritefname
]
DebugS xx,"getspritefname: ",R1
Pull "R0,PC",,^
Pull "R0,PC"
;............................................................................
......@@ -3398,7 +3408,8 @@ declareresourcefsfiles
SWI XOS_CLI ; ensure WIMPSymbol has been seen
BL getromsprites
Pull "R0,PC",,^
CLRV
Pull "R0,PC"
;.................................................................................
......@@ -3421,12 +3432,12 @@ claim
Pull "PC"
release
Push "R0-R1,LR"
EntryS "R0-R1"
01
MOV R2,wsptr
SWI XOS_Release ; release until bored
BVC %BT01
Pull "R0-R1,PC",,^
EXITS
;.................................................................................
......@@ -3494,7 +3505,8 @@ Die
Debug_Close
Pull "R0-R3,R12,PC",,^ ; no errors allowed here!
CLRV ; no errors allowed here!
Pull "R0-R3,R12,PC"
MakeErrorBlock WimpCantKill
......@@ -3586,7 +3598,7 @@ Service
[ Medusa :LAND: :LNOT: UseAMBControl
TEQNE R1, #Service_PagesSafe
]
MOVNES PC, LR
MOVNE PC, LR
Service2
LDR wsptr,[R12]
......@@ -3673,19 +3685,15 @@ ValidateAddress
MOV R0,#6
SWI XOS_ReadDynamicArea ; is there a kernel free pool
Pull "R0-R2,lr"
MOVVCS PC,lr
MOVVC PC,lr
CLRV
|
MOVS PC,lr
MOV PC,lr
]
]
Debug valid,"Validate address ",r2,r3
Push "LR"
[ ChildWindows
LDRB r14,memoryOK ; BUGFIX: NRaine 6-Aug-96 (should be unconditional)
|
LDR r14,memoryOK
]
TST r14,#mem_claimed
Pull "PC",EQ
LDR r14,freepoolbase
......@@ -3708,7 +3716,7 @@ serviceresourcefsstarting
ADRL R0,resourcefsfiles
MOV LR,PC ; LR -> return address
MOV PC,R2 ; R2 -> address to call
Pull "R0,PC",,^
Pull "R0,PC"
; try to locate ROM sprite area - if not found, refuse to start up!
......@@ -3790,8 +3798,8 @@ getromsprites
SWI XOS_Find ; close file
99
BLVS loseromsprites ; don't return error - just lose sprites
STRVS R0,[sp]
Pull "R0-R6,PC",,^
CLRV
Pull "R0-R6,PC"
spritesfname DCB "WindowManager:Sprites", 0
ALIGN
......@@ -3817,7 +3825,7 @@ switchingtosprite
STR R4, switchtospr_current ; remember where output is switched to now
TEQ R4, #0 ; if switching to screen
BLEQ switchingtosprite_recache ; then make sure parameters are correct
EXITS
EXIT
switchingtosprite_recache
; recaches graphics parameters iff switchtospr_correctfor <> switchtospr_current
......@@ -3825,11 +3833,11 @@ switchingtosprite_recache
LDR R0, switchtospr_current
LDR R14, switchtospr_correctfor
TEQ R0, R14
EXITS EQ
EXIT EQ
STR R0, switchtospr_correctfor
BL readvduvars2 ; including new screen/sprite size etc.
BLVC calcborders ; to set up dx, dy
EXITS
EXIT
]
; Service_ModeChange: cache new graphics parameters
......@@ -3921,7 +3929,7 @@ invalidatecache
99
]
10
Pull "R0,R2,PC",,^
Pull "R0,R2,PC"
;
; Entry: R2 = new CAO pointer
......@@ -3945,7 +3953,7 @@ newapplication
STR R1,parentquithandler ; for checking later
Debug task1,", Parent quit handler =",R1
;
Pull "R0-R3,PC",,^
Pull "R0-R3,PC"
;
; ChangeEnvironment monitoring
......@@ -4091,7 +4099,14 @@ finishupcall
MOV R1,#erf_okbox:OR:erf_pollexit ; select 'OK'
SWI XWimp_ReportError
;
Pull "R0-R1,PC",,^ ; claim vector
[ No32bitCode
MOV R14,#0
]
MRS R14,CPSR
TST R14,#2_11100
Pull "R0-R1,PC",EQ,^ ; claim vector
CLRV
Pull "R0-R1,PC"
finishupcall_withmessage
Push "R0-R3"
......@@ -4120,7 +4135,14 @@ finishupcall_withmessage
MOV R1,#erf_okbox:OR:erf_pollexit ; Request the Box Removed
SWI XWimp_ReportError
;
Pull "R0-R3,PC",,^ ; claim vector
[ No32bitCode
MOV R14,#0
]
MRS R14,CPSR
TST R14,#2_11100
Pull "R0-R3,PC",EQ,^ ; claim vector
CLRV
Pull "R0-R3,PC"
messagefrom DCB "MF", 0
ensuredisc DCB "ID", 0 ; followed by media type (eg. 'disc')
......@@ -4258,7 +4280,7 @@ deallocateptrs ROUT
BL killiconbar
;
Pull "R0-R5,PC",,^
Pull "R0-R5,PC"
deletependingtask
......@@ -4283,7 +4305,8 @@ deletependingtask
MOV R14,#nullptr
STR R14,pendingtask
01
Pull "R0-R2,PC",,^
CLRV
Pull "R0-R2,PC"
killiconbar
......@@ -4323,7 +4346,8 @@ deletemessagequeue
STR R14,lastpointer
]
;
Pull "R0-R3,PC",,^ ; ignore errors
CLRV
Pull "R0-R3,PC" ; ignore errors
;;-----------------------------------------------------------------------------
......@@ -4468,14 +4492,18 @@ Wimp_SWIdecode
Push "LR"
;
[ debugints
[ No32bitCode
MOV R14,#I_bit
TST R14,PC
|