Commit 108e910f authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Now gets the sprites for the startup banner from its own personal resources...

Now gets the sprites for the startup banner from its own personal resources rather than from the Wimp pool,then frees them once the banner has gone.

3 sets of sprites added here
Iyonix = used on Tungsten
Morris4 = L7205 demo actually
Ursula = big green Acorn logo

Version 2.65. Tagged as 'Desktop-2_65'
parent 7af45cc0
......@@ -23,7 +23,14 @@
#
COMPONENT = Desktop
RESOURCEEXTRA = resources_templates
RESOURCES = manual
resources:
${MKDIR} ${RESFSDIR}
${CP} LocalRes:Messages ${RESFSDIR}.Messages ${CPFLAGS}
${CAT} LocalRes:CmdHelp { >> ${RESFSDIR}.Messages }
${CP} LocalRes:Templates ${RESFSDIR}.Templates ${CPFLAGS}
${CP} LocalRes:<UserIF>.Sprites ${RESFSDIR}.Sprites ${CPFLAGS}
include StdTools
include AAsmModule
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.64"
Module_Version SETA 264
Module_MajorVersion SETS "2.65"
Module_Version SETA 265
Module_MinorVersion SETS ""
Module_Date SETS "31 Oct 2002"
Module_ApplicationDate SETS "31-Oct-02"
Module_Date SETS "11 Apr 2003"
Module_ApplicationDate SETS "11-Apr-03"
Module_ComponentName SETS "Desktop"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Desktop"
Module_FullVersion SETS "2.64"
Module_HelpVersion SETS "2.64 (31 Oct 2002)"
Module_FullVersion SETS "2.65"
Module_HelpVersion SETS "2.65 (11 Apr 2003)"
END
/* (2.64)
/* (2.65)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 2.64
#define Module_MajorVersion_CMHG 2.65
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 31 Oct 2002
#define Module_Date_CMHG 11 Apr 2003
#define Module_MajorVersion "2.64"
#define Module_Version 264
#define Module_MajorVersion "2.65"
#define Module_Version 265
#define Module_MinorVersion ""
#define Module_Date "31 Oct 2002"
#define Module_Date "11 Apr 2003"
#define Module_ApplicationDate "31-Oct-02"
#define Module_ApplicationDate "11-Apr-03"
#define Module_ComponentName "Desktop"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Desktop"
#define Module_FullVersion "2.64"
#define Module_HelpVersion "2.64 (31 Oct 2002)"
#define Module_LibraryVersionInfo "2:64"
#define Module_FullVersion "2.65"
#define Module_HelpVersion "2.65 (11 Apr 2003)"
#define Module_LibraryVersionInfo "2:65"
......@@ -13,47 +13,7 @@
; limitations under the License.
;
; > Sources.Desktop
; *********************************
; *** C h a n g e L i s t ***
; *********************************
; Date Description
; ---- -----------
; 9-Feb-90 File created from old Desktop 2.23
; 22-Feb-90 Changed to use Resources:
; 2.24 Filer_Boot's files in Resources:$.Apps
; 27-Feb-90 2.25 Removed desktop files for Filer/Act
; 28-Feb-90 Removed desktop files for !Configure,!Draw,!Edit,TinyDirs
; 2.26 Removed all references to Wimp$Path
; 1-Mar-90 2.27 Removed all references to ResourceFS
; 29-Apr-91 2.28 Corrected list of auto start applications
; 29-May-91 2.29 Added startup screen and Service_DesktopWelcome
; 18-Jan-92 General tinkering about with the module
; 17-Feb-92 2.36 Pump startup through NULL events
; Pass strings through MessageTrans
; Allocate workspace during startup only.
; 26-Feb-92 2.37 Fix bug preventing restart from working.
; 28-Feb-92 2.40 Remove check for workspace presence to enable
; multiple *Desktop commands to be active at once
; (prevents breakage of some deskboot files).
; 11-Mar-92 2.41 OSS Look auto-start strings etc. up in Messages file.
; Allows ROM app names to be localised, part of
; fix to RP-0716.
; 02-Apr-92 2.43 LRust Re-introduce check for exec file open on desktop startup.
; Allows *Exec !boot files to work correctly on shift-break
; and fixes RP-2176
; 12-Jul-93 BCockburn Removed GET of Hdr:Compress
; 26-Jul-93 JRoach If OS_GBPB on Resources:$.Apps gives trouble then stop pumping
; ROM apps rather than giving an error
; 26-Jan-95 JRH Quick hack to stop filer_booting files in Resources:$.Apps
; 15-May-95 RWB Make welcome banner not appear
; 03-Mar-00 SAR Change Boot$Error box to only have a 'Reboot' button on STBs
; 20-Apr-00 2.58 KJB Made 32-bit compatible.
; 26-Feb-01 2.60 SBF Removed dependency on the (now obsolete) STB flag; was all specific
; to the STB/NC user interface. Now uses Embedded_UI flag instead.
;NK version, uses template for welcome banner
; This is the desktop module
AREA |Desktop$$Code|, CODE, READONLY, PIC
Module_BaseAddr
......@@ -63,7 +23,7 @@ Module_BaseAddr
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:Machine.<Machine>
GET Hdr:Machine.<Machine>
GET Hdr:UserIF.<UserIF>
GET Hdr:CMOS
GET Hdr:Proc
......@@ -82,11 +42,12 @@ Module_BaseAddr
GET Hdr:ColourTran
GET VersionASM
GET Hdr:NDRDebug
GET Hdr:Sprite
GBLL DesktopAllAtOnce
DesktopAllAtOnce SETL {TRUE}
GBLL NewBanner
NewBanner SETL {TRUE} :LAND: :LNOT: Embedded_UI
GBLL NewBanner
NewBanner SETL {TRUE} :LAND: :LNOT: Embedded_UI
GBLL KeepItUp
KeepItUp SETL {TRUE} :LAND: NewBanner
......@@ -119,18 +80,19 @@ MessageBlock # 16
Workspace # 4
nactive # 4 ; no of active tasks when we started
nactive1 # 4
privatesprites # 4 ; our sprites for the banner
BannerCloseTime # 4
NewWelcomeWorkspace # 4
IconHandle # 4
WindowHandle # 4
IconHandle # 4
WindowHandle # 4
NextPump # 4
PumpHidden # 4
PumpParams_0 # 4
PumpParams_1 # 4
PumpParams_2 # 4
ModeChangeCount # 4 ; how many times we've seen Message_ModeChange
scratchbuffer1 # 256
scratchbuffer2 # 256
scratchbuffer1 # 256
scratchbuffer2 # 256
Working_Stack # 128
Working_StackEnd # 0
......@@ -236,7 +198,7 @@ Desktop_Code Entry
ADR R0, execcommand ; cancel exec file (if any)
SWI XOS_CLI
MOVVC R0, #ModHandReason_Enter
ADRVCL R1, Desktop_Title ; R1 --> module title
ADRVCL R1, Desktop_Title ; R1 --> module title
SWIVC XOS_Module
EXIT
......@@ -255,6 +217,8 @@ MyMessagesFile DCB "Resources:$.Resources.Desktop.Messages",0
filerboot DCB "Filer_Boot "
appsdir DCB "Resources:$.Apps", 0
plingstar DCB "!*", 0
spritefile DCB "Resources:$.Resources.Desktop.Sprites",0
; RWB - Remove welcome screen for STB
; NDT - Merged conditionals from RiscOS 3.70 and NCOS 1.06
[ :LNOT: Embedded_UI :LAND: :LNOT: NewBanner
......@@ -318,10 +282,41 @@ Desktop_Start ROUT
ADR r0, MessageBlock
ADRL r1, MyMessagesFile
MOV r2, #0
STR r2, privatesprites
SWI XMessageTrans_OpenFile
BVC %FT15
BVS %FT25
; Message file failed to open - free block and generate original error
15
; size up sprites file
ADRL r1, spritefile
MOV r0, #OSFile_ReadNoPath
SWI XOS_File ; attempting to load them will give an error
MOV r0, #ModHandReason_Claim
ADD r3, r4, #16
SWI XOS_Module
BVS %FT25
STR r2, privatesprites
STR r3, [r2, #saEnd]
MOV r3, #0
STR r2, [r2, #saNumber]
MOV r3, #16
STR r3, [r2, #saFirst]
STR r3, [r2, #saFree]
20
; load sprites file
MOV r1, r2
ADRL r2, spritefile
MOV r0, #SpriteReason_LoadSpriteFile
ORR r0, r0, #256 ; load banner sprites
SWI XOS_SpriteOp
BVC %FT30
MOV r9, r0
MOV r2, r1
MOV r0, #ModHandReason_Free ; free failed sprite area
SWI XOS_Module
MOV r0, r9
25
; something failed to open - free block and generate original error
MOV r9, r0
MOV r2, r12
MOV r0, #ModHandReason_Free
......@@ -329,8 +324,7 @@ Desktop_Start ROUT
MOV r0, r9
SWI OS_GenerateError
15
30
; Give ourselves workspace and stack
ADR r13,Working_StackEnd
......@@ -391,8 +385,8 @@ Desktop_Start ROUT
ADREQL R0,com_unset
SWIEQ XOS_CLI ; ignore errors
MOV R14,#0
STR R14,NewWelcomeWorkspace
MOV R14,#0
STR R14,NewWelcomeWorkspace
StartAsTask
; Up we come as a task
......@@ -428,7 +422,7 @@ StartAsTask
LDR r0,nactive1
Debug we,"nactive ",r0
CMP r0,#0
MOVNE r0,#0 ; Keep it up for 0 seconds
MOVNE r0,#0 ; Keep it up for 0 seconds
BNE NoWelcome
; Only handle Boot$Error on start up (ie. when we display welcome screen).
......@@ -525,25 +519,25 @@ ClearScreen
SWI XWimp_ForceRedraw
LDRVC r0, =&1CE3972
ADRVC r1, scratchbuffer1
ADR r3, ClearScreen ; somewhere which is non-zero
ADR r3, ClearScreen ; somewhere which is non-zero
SWIVC XWimp_Poll
NoBootError
MOV R1,#Service_DesktopWelcome
SWI XOS_ServiceCall
MOVVS R0,#0
MOVVS R0,#0
BVS NoWelcome
TEQ R1,#0 ; Was it claimed ?
[ :LNOT: Embedded_UI ; RWB - Remove welcome screen
MOVEQ R0,#0
MOVEQ R0,#0
BEQ NoWelcome
Debug we,"Service not claimed"
[ NewBanner
[ KeepItUp
BL IconbarHack
BL IconbarHack
]
BL DisplayNewWelcome
|
......@@ -598,11 +592,11 @@ MessageGotten ROUT
AllDone
[ KeepItUp
LDR r2, BannerCloseTime
TEQ r2, #0
BEQ Exit ; Nothing to keep up... (no banner)
LDR r2, BannerCloseTime
TEQ r2, #0
BEQ Exit ; Nothing to keep up... (no banner)
BL IconBarHackClose
BL IconBarHackClose
KeepItUpLoop
MOV r0, #0
......@@ -612,7 +606,7 @@ KeepItUpLoop
BVS Exit
1
Push r0
LDR r2, BannerCloseTime
LDR r2, BannerCloseTime
SWI XOS_ReadMonotonicTime
CMP r0, r2
Pull r0
......@@ -621,7 +615,7 @@ KeepItUpLoop
BEQ Exit
TEQ r0, #User_Message
TEQNE r0, #User_Message_Recorded
BEQ GotMessageKeepingItUp
BEQ GotMessageKeepingItUp
B KeepItUpLoop
GotMessageKeepingItUp
......@@ -634,7 +628,7 @@ GotMessageKeepingItUp
TEQEQ r2, #2 ; because we can't be bothered to recache fonts...
TEQNE lr, #Message_Quit
BEQ Exit
B KeepItUpLoop
B KeepItUpLoop
; If we just open the window, the iconbar will open later and will be in front of us. Thus
; when the pinboard opens at the back (-2), it will open in front of the (backwindow) iconbar
......@@ -644,32 +638,32 @@ GotMessageKeepingItUp
;
; A better solution would be to modify the wimp to ensure the icon bar isn't created at the front
IconbarHack
Push "r0-r1,lr"
SUB sp,sp,#36
MOV r1,sp
MOV r0,#-1
STR r0,[r1,#0] ; Open at left
MOV r0,#0
STR r0,[r1,#4] ; min x
STR r0,[r1,#8] ; min y
STR r0,[r1,#16] ; max y
STR r0,[r1,#20] ; flags
MOV r0,#-16
STR r0,[r1,#12] ; max x (hack to make it take up no space on iconbar)
SWI XWimp_CreateIcon
STR r0,IconHandle
ADD sp,sp,#36
Pull "r0-r1,pc"
Push "r0-r1,lr"
SUB sp,sp,#36
MOV r1,sp
MOV r0,#-1
STR r0,[r1,#0] ; Open at left
MOV r0,#0
STR r0,[r1,#4] ; min x
STR r0,[r1,#8] ; min y
STR r0,[r1,#16] ; max y
STR r0,[r1,#20] ; flags
MOV r0,#-16
STR r0,[r1,#12] ; max x (hack to make it take up no space on iconbar)
SWI XWimp_CreateIcon
STR r0,IconHandle
ADD sp,sp,#36
Pull "r0-r1,pc"
IconBarHackClose
Push "r0-r1,lr"
MOV r0,#-2
LDR r1,IconHandle
STMFD sp!,{r0-r1}
MOV r1,sp
SWI XWimp_DeleteIcon
ADD sp,sp,#8
Pull "r0-r1,pc"
Push "r0-r1,lr"
MOV r0,#-2
LDR r1,IconHandle
STMFD sp!,{r0-r1}
MOV r1,sp
SWI XWimp_DeleteIcon
ADD sp,sp,#8
Pull "r0-r1,pc"
]
;
; call OS_Exit - exits back to Wimp if any tasks started
......@@ -697,13 +691,21 @@ Exit
Exit2
[ NewBanner
BL FreeFontsEtc
BL FreeFontsEtc
]
; Close messages file
ADR r0, MessageBlock
SWI XMessageTrans_CloseFile
; free sprites
LDR r2, privatesprites
TEQ r2, #0
MOVNE r0, #ModHandReason_Free
SWINE XOS_Module
MOV r0, #0
STR r0, privatesprites
; free workspace
MOV r0, #ModHandReason_Free
MOV r2, wp
......@@ -730,7 +732,7 @@ str_desktopfile DCB "Desktop$File", 0
;
bootcommands
com1 DCB com2 - com1, "Alarm", 0
com2 DCB com3 - com2, "Printers", 0 ; was Calc
com2 DCB com3 - com2, "Printers", 0 ; was Calc
com3 DCB com4 - com3, "Chars", 0
com4 DCB com5 - com4, "Config", 0
com5 DCB com6 - com5, "Draw", 0
......@@ -992,8 +994,8 @@ executefile
PumpOneDesktopCommand ALTENTRY
01
; Use whole of scratch space for reading lines of file.
ASSERT scratchbuffer2 = scratchbuffer1 + ?scratchbuffer1
; Use whole of scratch space for reading lines of file.
ASSERT scratchbuffer2 = scratchbuffer1 + ?scratchbuffer1
LDR r1, PumpParams_0
ADR r2, scratchbuffer1
MOV r3, #?scratchbuffer1 + ?scratchbuffer2
......@@ -1452,7 +1454,7 @@ DisplayNewWelcome
SWI XOS_Module
Pull "R1-R7,PC",VS
MOV R7,R2
STR R7,NewWelcomeWorkspace
STR R7,NewWelcomeWorkspace
MOV R0,#64
MOV R1,#0
......@@ -1492,7 +1494,7 @@ DisplayNewWelcome
ADR R5,backdropname
MOV R0,#0
BL displaywindow
STR R9,WindowHandle
STR R9,WindowHandle
; SWI XWimp_DeleteWindow
Pull "R5,R6"
......@@ -1509,10 +1511,10 @@ DisplayNewWelcome
; SWI XWimp_DeleteWindow
SWI XWimp_CloseTemplate
MOV R0,R9
BL redrawwindow
LDR R0,WindowHandle
BL redrawwindow
MOV R0,R9
BL redrawwindow
LDR R0,WindowHandle
BL redrawwindow
B ExitDisplay2
......@@ -1526,11 +1528,13 @@ displaywindow
SWI XWimp_LoadTemplate
BVS ExitDisplay
LDR r0, privatesprites
STR r0, [r1, #64] ; use local sprite pool in the player window
SWI XWimp_CreateWindow
BVS ExitDisplay
STR R0,[SP,#-44]!
MOV R1,SP
STR R0,[SP,#-44]!
MOV R1,SP
SWI XWimp_GetWindowState
ADD R14,R1,#4
......@@ -1553,16 +1557,16 @@ displaywindow
STR R14,[R1,#28] ; make absolutely sure we open on top
SWI XWimp_OpenWindow
LDRVC R9,[R1,#0]
ADD SP,SP,#44
Pull "PC",VC
B ExitDisplay
LDRVC R9,[R1,#0]
ADD SP,SP,#44
Pull "PC",VC
B ExitDisplay
redrawwindow
Push "LR"
SUB SP,SP,#44
MOV R1,SP
STR R0,[SP,#0]
Push "LR"
SUB SP,SP,#44
MOV R1,SP
STR R0,[SP,#0]
SWI XWimp_RedrawWindow
ADDVS SP,SP,#44
BVS ExitDisplay
......@@ -1582,12 +1586,12 @@ ExitDisplay
ExitDisplay2
ADD SP,SP,#8 ; npix
[ KeepItUp
Pull "R1-R7,PC"
Pull "R1-R7,PC"
FreeFontsEtc
Push "R1-R7,LR"
LDR R7,NewWelcomeWorkspace
TEQ R7,#0
Pull "R1-R7,PC",EQ
Push "R1-R7,LR"
LDR R7,NewWelcomeWorkspace
TEQ R7,#0
Pull "R1-R7,PC",EQ
]
Push R0
ADD R1,R7,#768
......@@ -1609,6 +1613,14 @@ FreeFontsEtc
MOV R2,R7
MOV R0,#ModHandReason_Free
SWI XOS_Module
LDR R2, privatesprites
TEQ R2,#0
MOVNE R0,#ModHandReason_Free
SWINE XOS_Module
MOV R0, #0
STR R0, privatesprites
Pull R0
Pull "R1-R7,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