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

Given a good thrashing.

Detail:
  All pointers passed to the Wimp (mode selectors, menus, sprite areas,
  palettes, pollwords, validation strings, message lists, routines etc etc)
  in any of its APIs can now be anywhere within the 32-bit address range.
  In general, whenever "<= 0" was accepted as a null condition, the value
  must now be either 0 or -1. It should also be tolerant of system memory
  areas (supervisor stack and RMA) being in the top half of memory.
  Also:
  * Default next slot now a build option - Ursula builds (eg Tungsten) use
    1024K instead of 640K
  * Ursula builds no longer have a build variant in the help string
  * Autosenses ROM location
  * CR-LFs in *Configure messages replaced with LF-CRs
  * Added Iyonix resources (currently based on Morris4)
  * Morris4 sprites files have gained file_lxa, small_lxa, file_unf,
    small_unf and lo!help sprites
  * Ursula sprites files have gained lo!help sprites
  * *WimpSlot can take memory sizes in megabytes or gigabytes
Admin:
  Tested on a "traditional" memory-mapped Tungsten.

Version 4.76. Tagged as 'Wimp-4_76'
parent 58f57fd9
......@@ -89,4 +89,7 @@
Option RegisterSprites22, false
Option RegisterTemplates, false
GBLA DefaultNextSlot
DefaultNextSlot SETA 640*1024
END
......@@ -16,8 +16,6 @@
; Wimp options for an Ursula build of the Window Manager
;
module_postfix SETS " Ursula"
Option ServiceCallTable, true ; Add Ursula kernel Service Call table
Option ChocolateScreen, true ; Clean cached screen after redraw loops
Option ShrinkableAreas, true ; Support Shrinkable Dynamic Areas
......@@ -38,4 +36,6 @@ module_postfix SETS " Ursula"
ASSERT International_Help <> 0
DefaultNextSlot SETA 1024*1024
END
......@@ -16,6 +16,8 @@
; Wimp options for an Ursula_RiscPC build of the Window Manager
;
module_postfix SETS " Ursula (Risc PC)"
Option ServiceCallTable, true ; Add Ursula kernel Service Call table
Option ChocolateScreen, true ; Clean cached screen after redraw loops
Option ShrinkableAreas, true ; Support Shrinkable Dynamic Areas
......
No preview for this file type
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.67.
; Last processed by srccommit version: 1.68.
;
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "4.75"
Module_Version SETA 475
Module_MajorVersion SETS "4.76"
Module_Version SETA 476
Module_MinorVersion SETS ""
Module_Date SETS "22 Aug 2002"
Module_ApplicationDate2 SETS "22-Aug-02"
Module_ApplicationDate4 SETS "22-Aug-2002"
Module_Date SETS "23 Oct 2002"
Module_ApplicationDate SETS "23-Oct-02"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "4.75"
Module_HelpVersion SETS "4.75 (22 Aug 2002)"
Module_FullVersion SETS "4.76"
Module_HelpVersion SETS "4.76 (23 Oct 2002)"
END
/* (4.75)
/* (4.76)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.67.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 4.75
#define Module_MajorVersion_CMHG 4.76
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Aug 2002
#define Module_Date_CMHG 23 Oct 2002
#define Module_MajorVersion "4.75"
#define Module_Version 475
#define Module_MajorVersion "4.76"
#define Module_Version 476
#define Module_MinorVersion ""
#define Module_Date "22 Aug 2002"
#define Module_Date "23 Oct 2002"
#define Module_ApplicationDate2 "22-Aug-02"
#define Module_ApplicationDate4 "22-Aug-2002"
#define Module_ApplicationDate "23-Oct-02"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "4.75"
#define Module_HelpVersion "4.75 (22 Aug 2002)"
#define Module_LibraryVersionInfo "4:75"
#define Module_FullVersion "4.76"
#define Module_HelpVersion "4.76 (23 Oct 2002)"
#define Module_LibraryVersionInfo "4:76"
......@@ -105,7 +105,7 @@ SWIWimp_AutoScroll
BEQ %FT01 ; don't bother validating if disabling
CMP userblk, #ApplicationStart
MyXError WimpBadPtrInR1, LT, L
MyXError WimpBadPtrInR1, LO, L
BVS ExitWimp ; then check pointer
LDR handle, [userblk, #a_handle]
......@@ -122,7 +122,7 @@ SWIWimp_AutoScroll
return_autoscroll_state
CMP userblk, #ApplicationStart
MyXError WimpBadPtrInR1, LT, L
MyXError WimpBadPtrInR1, LO, L
BVS ExitWimp ; just check pointer
ADRL R14, autoscr_state
......@@ -163,8 +163,8 @@ int_autoscroll
MOVEQ x0, x0, LSL #1
ADDEQ x0, x0, x0, LSL #2 ; load default time *10 (ds -> cs)
CMP y0, #&8000
BGE %FT01 ; if a user routine, leave alone
CMP y0, #ApplicationStart
BHS %FT01 ; if a user routine, leave alone
TST y0, #1 ; NB if you add further types, keeping
MOVEQ y0, #0 ; bit 0 set will guarantee that some
......@@ -567,7 +567,7 @@ poll_autoscroll
LDR R1, autoscr_next_t ; exit if pause hasn't finished
CMP R0, R1
EXITS LT ; else drop through to startautoscroll
EXITS LO ; else drop through to startautoscroll
startautoscroll
MOV R0, #-1 ; set flags as necessary
......@@ -605,7 +605,7 @@ continueautoscroll
SWI XOS_ReadMonotonicTime ; R0 = current time
LDR R1, autoscr_next_t
CMP R1, R0
EXITS GT ; give other events a chance
EXITS HI ; give other events a chance
MOV R1, #-1
STRB R1, autoscr_pausing ; give other events a chance next time
......
......@@ -50,8 +50,8 @@ addtoiconbar
; work out whereabouts in the list to put the new icon
CMP handle, #-1-iconbartabsize
MyXError WimpBadHandle, LE, L
CMN handle, #iconbartabsize
MyXError WimpBadHandle, MI, L
BVS ExitWimp
ADRL R14,iconbartab-1
......@@ -71,8 +71,8 @@ addwithpriority ; R0 = priority of icon to add
ADD R1,R7,#icd_list-icb_link
01
LDR R4,[R1,#icb_link] ; R4 -> next icon block
CMP R4,#0
BLE %FT02
CMP R4,#nullptr
BEQ %FT02
LDR R3,[R4,#icb_priority]
Debug icb,"Iconblk, priority, newpriority:",R4,R3,R0
CMP R0,R3
......@@ -85,8 +85,8 @@ addwithpriority ; R0 = priority of icon to add
gofindit
MOVS R4,R0 ; R4 = icon handle to open next to
MOVLT R0,#WimpPriority_Maximum
BLT addwithpriority
MOVMI R0,#WimpPriority_Maximum
BMI addwithpriority
MOV R3,R7 ; R3 -> default end to add to
BL findicon ; R1 -> previous, R2 -> current, R7 -> left/right head pointer
......@@ -316,8 +316,9 @@ wimptempfname DCB "WindowManager:Templates",0
openiconbar Entry "R1-R9,R11"
LDR R0,iconbarhandle
SUBS handle,R0,#0
EXIT LE
CMP R0,#nullptr
EXIT EQ
MOV handle,R0
BL checkhandle
EXIT VS
......@@ -415,10 +416,10 @@ int_removefromiconbar
Pull "R1-R7,PC",PL
;
LDR R0,iconbarhandle
CMP R0,#0
MOVGT R14,#nullptr ; kill off iconbar if empty
STRGT R14,iconbarhandle
BLGT int_delete_window
CMP R0,#nullptr
MOVNE R14,#nullptr ; kill off iconbar if empty
STRNE R14,iconbarhandle
BLNE int_delete_window
;
Pull "R1-R7,PC"
......@@ -446,14 +447,17 @@ tryfindicon
ADD R1,R7,#icd_list-icb_link
01
LDR R2,[R1,#icb_link]
CMP R2,#0
Pull "PC",LT ; not found (Z unset)
CMP R2,#nullptr
BEQ %FT02
LDR R14,[R2,#icb_iconhandle]
TEQ R14,R4
MOVNE R1,R2
BNE %BT01
;
Pull "PC" ; found (Z set)
02
TEQ R2,#0
Pull "PC" ; not found (Z unset)
;
......@@ -475,16 +479,16 @@ recalcposns
MOV x0,#0
LDR R1,[R7,#icd_list]
01
CMP R1,#0
LDRGT R2,[R1,#icb_iconhandle]
ADDGT R14,handle,R2,LSL #i_shift
LDRGT cx0,[R14,#i_bbx0]
LDRGT cx1,[R14,#i_bbx1]
SUBGT cx1,cx1,cx0
ADDGT x0,x0,#iconbargap ; allow for gap between icons
ADDGT x0,x0,cx1 ; plus width of icon itself
LDRGT R1,[R1,#icb_link]
BGT %BT01
CMP R1,#nullptr
LDRNE R2,[R1,#icb_iconhandle]
ADDNE R14,handle,R2,LSL #i_shift
LDRNE cx0,[R14,#i_bbx0]
LDRNE cx1,[R14,#i_bbx1]
SUBNE cx1,cx1,cx0
ADDNE x0,x0,#iconbargap ; allow for gap between icons
ADDNE x0,x0,cx1 ; plus width of icon itself
LDRNE R1,[R1,#icb_link]
BNE %BT01
;
STR x0,[R7,#icd_width]
;
......@@ -536,8 +540,8 @@ startinmiddle
allocateicons
LDR R2,[R7,#icd_list]
01
CMP R2,#0
BLT doneicons
CMP R2,#nullptr
BEQ doneicons
;
LDR R3,[R2,#icb_iconhandle]
ADD R14,handle,R3,LSL #i_shift
......@@ -611,8 +615,8 @@ resizeiconbaricons
MOV R0,#0
STRB R0,iconbar_needs_rs
LDR handle,iconbarhandle
CMP handle,#1
Pull "R0-R5,R7,handle,userblk,PC",LT
CMP handle,#nullptr
Pull "R0-R5,R7,handle,userblk,PC",EQ
Abs handle,handle
LDR R5,[handle,#w_icons]
LDR R3,[handle,#w_nicons]
......@@ -634,10 +638,10 @@ resizeicons_loop
LDR R1,[R1]
LDR R0,[R2,#icb_taskhandle]
CMP R0,#0
BLT %FT05
BMI %FT05
LDR R14,orig_applicationspacesize
CMP R14,R1
BLGT mapslotinout
BLHI mapslotinout
; so that indirected data is ok. Now R1-> text
Push "R2,R3"
MOV R2,#"X"
......@@ -656,7 +660,7 @@ resizeicons_loop
Pull "R2"
LDR R1,[R2,#icb_defwidth]
CMP R0,R1
MOVGT R1,R0
MOVHI R1,R0
LDR R0,[R5,#i_bbx0]
ADD R1,R0,R1
STR R1,[R5,#i_bbx1] ; update width if needed
......@@ -675,7 +679,7 @@ resizeicons_next
Pull "R0"
CMP R0,#0
BLGT mapslotinout
BLPL mapslotinout
Pull "R0-R5,R7,handle,userblk,PC"
......@@ -689,7 +693,7 @@ mapslotinout
BNE %FT01
LDR R0,[R0,#task_slotptr]
CMP R0,#-1
BLGT mapout
BLNE mapout
01
Pull "R0"
LDR R14,=&ffff
......@@ -700,7 +704,7 @@ mapslotinout
Pull "R1-R2,PC",NE
LDR R0,[R0,#task_slotptr]
CMP R0,#-1
BLGT mapin
BLNE mapin
Pull "R1-R2,PC"
]
......
......@@ -50,7 +50,7 @@ XROS_Module Entry
ADRL R0,memory_claims
LDR R0,[R0]
CMP R0,#0
CMP R0,#nullptr
BLE %FT07
05
......
......@@ -163,8 +163,8 @@ systemfont_paint
systemfontlength
LDRB R6,[R7],#1
CMP R6,#31
ADDGT R0,R0,#1
BGT systemfontlength
ADDHI R0,R0,#1
BHI systemfontlength
MOV R0,R0,LSL #4 ; 16 OS units per char
SUB R4,R4,R0
paint_systemfont
......@@ -183,7 +183,7 @@ textop_gettextwidth
MOV R9,#bignum
CMP R2,#0
MOVGT R9,R2
MOVHI R9,R2
[ outlinefont
LDR R3,systemfont
......@@ -220,25 +220,25 @@ textop_sysfontwidth_loop
LDRB R3,[R1],#1
CMP R3,#31
ADDGT R0,R0,#1
CMPGT R9,R0
BGT textop_sysfontwidth_loop
ADDHI R0,R0,#1
CMPHI R9,R0
BHI textop_sysfontwidth_loop
MOV R0,R0, LSL #4
Pull "PC"
SWIWimp_ResizeIcon
MyEntry "ResizeIcon"
CMP R0,#0
LDRLT handle,iconbarhandle
MOVGE handle,R0
CMP R0,#nullptr
LDREQ handle,iconbarhandle
MOVNE handle,R0
BL checkhandle
BVS ExitWimp
LDR R0,[handle,#w_nicons]
CMP R1,R0
BGT badiconhandle
BHI badiconhandle
CMP R1,#0
BLT badiconhandle
BMI badiconhandle
LDR R0,[handle,#w_icons]
ADD R0,R0,R1, LSL #i_shift
STMIA R0,{R2-R5}
......@@ -309,8 +309,8 @@ SWIWimp_Extend
BEQ ExitWimp
[ ChildWindows
CMP R0,#6 ; In: R0 = 6 => get parent, 7,8 => get top/bottom child, 9,10 => get next/previous sibling
RSBGES R14,R0,#10 ; In: R1 = window handle, or -1 for top-level ; Out: R1 = result handle, or -1 for none
BGE %FT01
RSBHSS R14,R0,#10 ; In: R1 = window handle, or -1 for top-level ; Out: R1 = result handle, or -1 for none
BHS %FT01
]
TEQ R0,#11 ; In: R1 = pointer to block to fill with furniture dimensions
BEQ %FT11 ; [R1,#0] = window handle to use, or 0 for generic values
......@@ -330,15 +330,15 @@ SWIWimp_Extend
BVS ExitWimp
CMP R0,#7
LDRLT handle,[handle,#w_parent]
BLT %FT03
LDRLO handle,[handle,#w_parent]
BLO %FT03
LDREQ handle,[handle,#w_children + lh_forwards]
BEQ %FT02
CMP R0,#9
LDRLT handle,[handle,#w_children + lh_backwards]
BLT %FT02
LDRLO handle,[handle,#w_children + lh_backwards]
BLO %FT02
LDR R14,[handle,#w_flags]
TST R14,#ws_open ; sibling pointers are garbage if window is not open
......@@ -347,7 +347,7 @@ SWIWimp_Extend
CMP R0,#9
LDREQ handle,[handle,#w_active_link + ll_forwards]
LDRGT handle,[handle,#w_active_link + ll_backwards]
LDRHI handle,[handle,#w_active_link + ll_backwards]
02 CMP handle,#nullptr
LDRNE R14,[handle,#ll_forwards] ; if either forward or backward pointer is null, we're at the head entry (not a window)
......@@ -433,7 +433,7 @@ furnblock_hscrgap0 # 4
11
CMP userblk, #ApplicationStart
MyXError WimpBadPtrInR1, LT, L
MyXError WimpBadPtrInR1, LO, L
BVS ExitWimp ; check pointer valid in this case
LDR handle, furnblock_handle
......
......@@ -58,7 +58,7 @@ plotspritebackground
LDR R1,[handle,#w_areaCBptr]
CMP R1,#2
BLT %FT3
BLO %FT3
MOV R0,#24
ORR R0,R0,#256
ADR R2,plotsprite_tile1
......@@ -105,12 +105,12 @@ plotspritebackground
LDR R2,tiling_sprite
CMP R2,#0
BEQ %FT4
LDRGT R1,baseofsprites
BGT %FT5
BLLT findwimptilesprite
CMP R2,#-1
LDRNE R1,baseofsprites
BNE %FT5
BLEQ findwimptilesprite
LDRVC R1,baseofsprites
BVC %FT5
CLRV
4
SWI XOS_WriteI+16
......@@ -241,19 +241,19 @@ findwimptilesprite Entry "R0-R1"
MOV R0,#1
MOV R14,R0,LSL R14
MOV R0,#0
CMP R14,#9
MOVGT R0,#"6"
CMP R14,#8
MOVHI R0,#"6"
CMP R14,#16
MOVGT R0,#"2"
MOVHI R0,#"2"
Push "R0" ; now got "2",0 or "6",0 on stack
ADR R2,plotsprite_tile1_
LDMIA R2,{R0-R1}
Push "R0-R1" ; now have "tile_1-?#",0 on stack
CMP R14,#9
ADDLT R0,R14,#"0"
MOVGT R0,#"1"
CMPGT R14,#16
MOVGT R0,#"3"
CMP R14,#8
ADDLS R0,R14,#"0"
MOVHI R0,#"1"
CMPHI R14,#16
MOVHI R0,#"3"
STRB R0,[sp,#7]
BL findwimpspritefordepth
......@@ -278,10 +278,9 @@ findwimptilesprite Entry "R0-R1"
Push "R2-R3"
LDR R2,tile_pixtable
BIC R2,R2,#&80000000 ; incase cache invalidated before mode change
CMP R2,#0
MOVGT R0,#ModHandReason_Free
BLGT XROS_Module
BICS R2,R2,#1 ; incase cache invalidated before mode change
MOVNE R0,#ModHandReason_Free
BLNE XROS_Module
TEQ R1,#0
......@@ -356,7 +355,7 @@ tile_putsprite
MOVEQ R0,#SpriteReason_PutSpriteUserCoords
LDRNE R7,tile_temptab ; -> translation table
TSTNE R7,#&80000000
TSTNE R7,#1
BLNE get_new_pixtable
;
LDR R1,thisCBptr
......@@ -370,7 +369,7 @@ tile_putsprite
get_new_pixtable Entry "R0-R6"
BIC R7,R7,#&80000000 ; now an address again
BIC R7,R7,#1 ; now an address again
MOV R0,#0
STR R0,lengthflags
......@@ -379,10 +378,9 @@ get_new_pixtable Entry "R0-R6"
TEQ R0,R7
BNE %FT05
MOV R2,R7
CMP R2,#0
MOVGT R0,#ModHandReason_Free
BLGT XROS_Module
MOVS R2,R7
MOVNE R0,#ModHandReason_Free
BLNE XROS_Module
LDR R7,pixtable_at
MOV R6,#0
......@@ -395,10 +393,10 @@ get_new_pixtable Entry "R0-R6"
05
; if tile_temptab and tile_pixtable were different then we must have been
; tiling a window with a custom tile. Can't free it either. However, the
; genereic table is probably stuffed as well.
; generic table is probably stuffed as well.
LDR R7,tile_pixtable
ORR R7,R7,#&80000000
ORR R7,R7,#1
STR R7,tile_pixtable
LDR R7,pixtable_at
......
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