Source
...
Target
Commits (8)
  • Jeffrey Lee's avatar
    Fix pinboard save code returning corrupt error pointers · 521331ae
    Jeffrey Lee authored
    Detail:
      s/Save - After the 'dot check' or DoSave resulted in an error being generated, IntSave_KeyPressed was pulling R0 from the stack instead of returning the error block pointer. This typically results in ofla errors on an Iyonix or alignment faults on a beagleboard.
    Admin:
      Tested on BB-xM rev A3. Errors due to no dot in the filename, or DoSave failing, are now reported correctly.
    
    
    Version 0.89. Tagged as 'Pinboard-0_89'
    521331ae
  • Ben Avison's avatar
    Add Message_ToggleBackdrop to allow the backdrop to be moved to front or back. · bae04ff4
    Ben Avison authored
    Detail:
      The Message_ToggleBackdrop has been introduced by ROL in one of their Select
      releases. In order to bring the RISC OS 5 API closer the ROL branch this
      changeset aims to add this message to RO5.
    
      Applications can broadcast Message_ToggleBackdrop to request that the backdrop
      application moves the backdrop. The message can be used to move the backdrop
      to the front, the back, toggle it or to get notified of the backdrop's
      current position.
    
      After the backdrop has been moved, this message is sent back to the
      application to notify it of the backdrop's new position.
    
      Message_ToggleBackdrop &400D1:
         +0  = 24 (Message size)
         +4  = Backdrop controlling application
         +8  = My reference number
         +12 = Your reference number
         +16 = &400D1 (Message_ToggleBackdrop)
         +20 = Flags (if not present, assumed 0)
                 b0-1  = type of toggle
                          0 = toggle
                          1 = front
                          2 = back
                          3 = notify of status
                 other = reserved
    Admin:
      Tested on RO 5.16
    Author:
      Fred Graute
    
    Version 0.90. Tagged as 'Pinboard-0_90'
    bae04ff4
  • Steve Revill's avatar
    Fixed so that it builds. There was a PC-relative LDR out-of-range error. · 0b08c342
    Steve Revill authored
    Version 0.91. Tagged as 'Pinboard-0_91'
    0b08c342
  • Robert Sprowson's avatar
    Restore *AddTinyDir <nothing> functionality. · 60352ea6
    Robert Sprowson authored
    See ticket #283.
    Moved 'Status' document into Docs.
    Merged 'Changes' into 'BlackLog' and delete.
    Expanded 2x POPs of lr/pc cos ARM deprecated it.
    Combined 2x MUL/ADD into MLA so the module is the same size.
    
    Version 0.92. Tagged as 'Pinboard-0_92'
    60352ea6
  • Robert Sprowson's avatar
    Collapse dead switches. · 1b0998ec
    Robert Sprowson authored
    Same binary as 0.92, not tagged.
    1b0998ec
  • Robert Sprowson's avatar
    Replace magic numbers with sumbols from header files for OS_ calls. · d905f03e
    Robert Sprowson authored
    Same binary as 0.92, not tagged.
    d905f03e
  • Robert Sprowson's avatar
    Shade "Configure..." when boot was unsuccessful. · 988bb75f
    Robert Sprowson authored
    When BootResources$Path is unset the option to run the configure plugin is no longer available.
    Shared a "Filer_Run " string in 3x places.
    Replaced most occurrences of calling XOS_ReadModeVariable of the current mode's XEig and YEig factors to use the cached copy sitting unloved in the workspace. Should thrash less during redraw.
    
    Version 0.93. Tagged as 'Pinboard-0_93'
    988bb75f
  • Jeffrey Lee's avatar
    Fix caching of backdrop sprites · 77e35785
    Jeffrey Lee authored
    Detail:
      s/Backdrop - The tidying up in revision 4.8 caused a vital "MOV r0,#-1" to be lost, causing the wrong mode to be used when fetching the screen BPP. As a result, caching the sprite would fail if the sprite was in a lower BPP than the current screen mode, as the calculated sprite area size would have been too small. This fixes that.
    Admin:
      Tested on rev A2 BB-xM.
      Sprite backdrops now seem to work again.
    
    
    Version 0.94. Tagged as 'Pinboard-0_94'
    77e35785
...@@ -214,7 +214,7 @@ Version: 0.36 Fri 01-Nov-91 Steve Cormie ...@@ -214,7 +214,7 @@ Version: 0.36 Fri 01-Nov-91 Steve Cormie
Version: 0.37 Tue 19-Nov-91 David De Vorchik Version: 0.37 Tue 19-Nov-91 David De Vorchik
* Support for true-palette sprites added - uses ColourTrans more efficently. * Support for true-palette sprites added - uses ColourTrans more efficently.
* Updated to use DragASprite in save dialogue (based on CMOS bit!).
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
...@@ -321,6 +321,13 @@ Version: 0.50 Thu 23-Apr-92 Steve Cormie ...@@ -321,6 +321,13 @@ Version: 0.50 Thu 23-Apr-92 Steve Cormie
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
Version: 0.51 Thu 25-Feb-93 Steve Cormie
* Added solid icon drags.
* Iconised windows can go to icon bar (configurable).
---------------------------------------------------------------------------
Version: 0.52 Thu 15-Jul-93 Neil Kelleher Version: 0.52 Thu 15-Jul-93 Neil Kelleher
* (Steve Cormie) Added package for multiple icon drags * (Steve Cormie) Added package for multiple icon drags
...@@ -331,7 +338,6 @@ Version: 0.52 Thu 15-Jul-93 Neil Kelleher ...@@ -331,7 +338,6 @@ Version: 0.52 Thu 15-Jul-93 Neil Kelleher
Version: 0.53 Fri 20-Aug-93 Neil Kelleher Version: 0.53 Fri 20-Aug-93 Neil Kelleher
* Fixed various bugs * Fixed various bugs
* updated to use Wimp_TextOp * updated to use Wimp_TextOp
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
...@@ -462,4 +468,3 @@ Version: 0.66 Mon 09-Jan-95 Alan Glover ...@@ -462,4 +468,3 @@ Version: 0.66 Mon 09-Jan-95 Alan Glover
* Fixed MED-04197: use wide translation tables to render 256grey sprites * Fixed MED-04197: use wide translation tables to render 256grey sprites
correctly in 16/32bpp. correctly in 16/32bpp.
Version 0.32 (SCormie - 16 Oct 1991)
* Fixed bugs in interactive help text.
* With interactive help running, leaving the pointer over the border of a menu
caused a message token not found error. This has been fixed so that no text
is produced.
* Pinboard menu now opens 64 units to the left of the mouse pointer (as
specified in the style guide).
* Info box template was out of date.
Version 0.33 (SCormie - 21 Oct 1991)
* Now checks size word in DataSaveAck message returned because of a pinboard save,
if this is < 0 then the destination is treated as temporary eg. <Wimp$Scrap> and
is not copied to the pinboard save file buffer.
* Fixed bug where pressing return in the pinboard save box created a file of type
Data instead of Obey.
* Fixed bug where pressing the RESET button caused Pinboard to create an address
exception in the Wimp. Basically, Pinboard was left with a list of non-existant
icons and tried to delete one of them.
* If a window has the caret when it is to be iconised then the caret is removed first.
* Fixed help and syntax messages.
* Stopped pinboard running files when they are dragged off screen.
* The mouse pointer is no longer allowed to leave the screen during a drag operation.
* Tidy changes are now saved in the Pinboard save file (or Desktop boot file).
* Fixed bug where a Tidy operation with a large icon caused bad problems (sometimes
lost the icon, sometimes got stuck in an infinite number of blank error message
boxes).
Version 0.34 (SCormie - 24 Oct 1991)
* Error box should have had OK instead of Cancel.
* Now fully internationalised. Resource files moved from Pinboard to Messages module,
task name and all error messages looked up in Messages file.
Version 0.35 (SCormie - 30 Oct 1991)
* Double-click on icons now causes a DATAOPEN message to be broadcast. If no other
task is interested in the file/directory/application then the message is bounced
back by the Wimp and Pinboard does a Filer_Run or Filer_OpenDir.
Version 0.36 (SCormie - 1 Nov 1991)
* Shutdown then Restart now starts up the Pinboard task again.
* "Use *Desktop..." error now displayed rather than token when trying to start
Pinboard when it is already running.
* Now updates x and y positions of icons when snapped to a grid point by grid lock.
* Bringing up the save box no longer stops hot keys from working.
* Loading 8bpp backdrop sprites in 8bpp modes now works.
Version 0.37 (David De Vorchik - 19 Nov 91)
* Uses ColourTrans properly to translate sprite so that can work with true-256 colour
sprites.
* Updated to use DragASprite in save dialogue (based on CMOS bit!).
Version 0.38 (Steve Cormie - 22 Jan 1992)
* Fixed backdrop code so that a sprite area of the correct size is allocated
and created.
* Fixed tiling so that edges of the sprite are not chopped off.
* Fixed everything which takes account of the icon bar (the size being used was
too large so scaled and tiled sprites left a line of background above the icon
bar in VGA modes).
* When *Pin commands are written to the Pinboard save file, negative numbers caused
by icons being partly off screen are now preceded by '0' eg. *Pin blah 0-50 500.
This is required because OS_ReadArgs cannot read -ve numbers (it thinks they are
flags).
* Save files are now set to type &FEB correctly.
* Bounding boxes of icons on a shifted icon bar are now calculated correctly.
* Added sprite and support for default tiling of LCD background on start up and
mode changes (if there is no backdrop sprite already).
Version 0.39 (Steve Cormie - 24 Jan 1992)
* Fixed bug where the top of the icon bar was overwritten in rectangular pixel modes.
* Fixed bug in backdrop mode change code.
Version 0.40 (Steve Cormie - 27 Jan 1992)
* Finally fixed backdrop/icon bar overlap properly (honestly!!).
Version 0.41 (Steve Cormie - 20 Feb 1992)
* Fixed bug RP-0961. Pinboard now reinitialises everything and
starts from scratch whenever the desktop is started.
* Now uses TerrMgr instead of UpperCase macros.
Version 0.42 (Steve Cormie - 26 Feb 1992)
* LCD backdrop code now uses an ECF, this allows background stipple with centred
backdrops and fixes square pixel vs. rectangular pixel mode problems.
Version 0.43 (Steve Cormie - 28 Feb 1992)
* Fixed remaining bugs in backdrop tiling (I hope).
Version 0.44 (Steve Cormie - 12 Mar 1992)
* Dragging single TinyDirs icons to a filer viewer no longer copies all of the
icons (or changes the text colour on the icons).
* Message file and error lookup modified, mainly so that the message file is now
opened during task initialisation, not module initialisation. Fixes RP-1617.
* Pinboard now only does a Filer_Run on a double-clicked object. Filer_Run
should now be modified to handle SHIFT correctly and broadcast a DATAOPEN
message (fixes G-RO-9915a).
Version 0.45 (Steve Cormie - 23 Mar 1992)
* Help and syntax of * commands brought into line with their action and manuals.
Version 0.46 (Steve Cormie - 23 Mar 1992)
* Fixed mistake in 0.45 and updated template file.
Version 0.47 (Steve Cormie - 25 Mar 1992)
* Non-interactive file copy from pinboard now works correctly (fixes RP-1951).
Version 0.48 (Steve Cormie - 02 Apr 1992)
* Tidy code now updates icon handles correctly (fixes RP-2158).
Version 0.50 (Steve Cormie - 23 Apr 1992)
* No longer removes caret from iconised windows (Wimp now does this).
* Now responds to Service_Memory.
Version 0.51 (Steve Cormie - 25 Feb 1993)
* Added solid icon drags.
* Iconised windows can go to icon bar (configurable).
Version 0.52 (Neil Kelleher - 15 July 1993)
* Added Fonting Wimp support
Version 0.53 (Neil Kelleher - 1 Sep 1993)
* Added interational help
Version 0.54 (Neil Kelleher - 15 Sep 1993)
* Added -Remove option to backdrop command.
File moved
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "0.88" Module_MajorVersion SETS "0.94"
Module_Version SETA 88 Module_Version SETA 94
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "04 Oct 2008" Module_Date SETS "28 Sep 2011"
Module_ApplicationDate SETS "04-Oct-08" Module_ApplicationDate SETS "28-Sep-11"
Module_ComponentName SETS "Pinboard" Module_ComponentName SETS "Pinboard"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Pinboard" Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Pinboard"
Module_FullVersion SETS "0.88" Module_FullVersion SETS "0.94"
Module_HelpVersion SETS "0.88 (04 Oct 2008)" Module_HelpVersion SETS "0.94 (28 Sep 2011)"
END END
/* (0.88) /* (0.94)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.88 #define Module_MajorVersion_CMHG 0.94
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Oct 2008 #define Module_Date_CMHG 28 Sep 2011
#define Module_MajorVersion "0.88" #define Module_MajorVersion "0.94"
#define Module_Version 88 #define Module_Version 94
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "04 Oct 2008" #define Module_Date "28 Sep 2011"
#define Module_ApplicationDate "04-Oct-08" #define Module_ApplicationDate "28-Sep-11"
#define Module_ComponentName "Pinboard" #define Module_ComponentName "Pinboard"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Pinboard" #define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Pinboard"
#define Module_FullVersion "0.88" #define Module_FullVersion "0.94"
#define Module_HelpVersion "0.88 (04 Oct 2008)" #define Module_HelpVersion "0.94 (28 Sep 2011)"
#define Module_LibraryVersionInfo "0:88" #define Module_LibraryVersionInfo "0:94"
...@@ -95,7 +95,7 @@ ModeChange ...@@ -95,7 +95,7 @@ ModeChange
ADR r1,dataarea ADR r1,dataarea
LDR r0,icon_bar_height LDR r0,icon_bar_height
STR r0 ,[r1,#8] ; Don't cover icon bar STR r0 ,[r1,#8] ; Don't cover icon bar
MOV r6,#-2 MOV r6,#-2
ADD r0,r1,#20 ADD r0,r1,#20
STMIA r0,{r4,r5,r6} STMIA r0,{r4,r5,r6}
...@@ -103,26 +103,26 @@ ModeChange ...@@ -103,26 +103,26 @@ ModeChange
Pull "PC",VS Pull "PC",VS
Debug bd,"Opened window" Debug bd,"Opened window"
MOV r0,#-1 MOV r0,#-1 ; Current mode
MOV r1,#11
MOV r1,#VduExt_XWindLimit
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
MOVVC r3,r2 MOVVC r3,r2
MOVVC r1,#4 MOVVC r1,#VduExt_XEigFactor
SWIVC XOS_ReadModeVariable SWIVC XOS_ReadModeVariable
MOVVC r3,r3,ASL r2 MOVVC r3,r3,ASL r2
STRVC r3,Screen_x1 STRVC r3,Screen_x1
STRVC r2,XEig STRVC r2,XEig
Pull "PC",VS
MOV r0,#-1 MOVVC r1,#VduExt_YWindLimit
MOV r1,#12 SWIVC XOS_ReadModeVariable
SWI XOS_ReadModeVariable
MOVVC r3,r2 MOVVC r3,r2
MOVVC r1,#5 MOVVC r1,#VduExt_YEigFactor
SWIVC XOS_ReadModeVariable SWIVC XOS_ReadModeVariable
MOVVC r3,r3,ASL r2 MOVVC r3,r3,ASL r2
STRVC r3,Screen_y1 STRVC r3,Screen_y1
STRVC r2,YEig STRVC r2,YEig
Pull "PC",VS Pull "PC",VS
LDR r0,backdrop_options LDR r0,backdrop_options
...@@ -318,14 +318,14 @@ Int_CacheBackdropSprite ROUT ...@@ -318,14 +318,14 @@ Int_CacheBackdropSprite ROUT
; First check that the file still exists and is still a sprite file. ; First check that the file still exists and is still a sprite file.
MOV r0,#23 ; Read catalogue info with type / no path MOV r0,#OSFile_ReadWithTypeNoPath
LDR r1,backdrop_path LDR r1,backdrop_path
SWI XOS_File SWI XOS_File
Pull "PC",VS Pull "PC",VS
CMP r0,#1 CMP r0,#1
MOVNE r2,r0 MOVNE r2,r0
MOVNE r0,#19 ; Generate error. MOVNE r0,#OSFile_MakeError
SWINE XOS_File SWINE XOS_File
Pull "PC",VS Pull "PC",VS
...@@ -360,22 +360,18 @@ Int_CacheBackdropSprite ROUT ...@@ -360,22 +360,18 @@ Int_CacheBackdropSprite ROUT
; Sprite is scaled, get screen size (r4 = width, r5 = height, r2 = memory req.) ; Sprite is scaled, get screen size (r4 = width, r5 = height, r2 = memory req.)
MOV r0,#-1 ; Use current mode MOV r0,#-1 ; Use current mode
MOV r1,#11 ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r4,r2,#1
STR r4,scale_x1
MOV r1,#12 ; Screen height in pixels MOV r1,#VduExt_XWindLimit ; Screen width in pixels
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
Pull "PC",VS ADDVC r4,r2,#1
ADD r5,r2,#1 STRVC r4,scale_x1
STR r5,scale_y1 MOVVC r1,#VduExt_YWindLimit ; Screen height in pixels
SWIVC XOS_ReadModeVariable
MOV r0,#-1 ; Current mode. ADDVC r5,r2,#1
MOV r1,#7 STRVC r5,scale_y1
SWI XOS_ReadModeVariable ; R2= screen size in bytes MOVVC r1,#VduExt_ScreenSize
SWIVC XOS_ReadModeVariable ; R2= screen size in bytes
Pull "PC",VS Pull "PC",VS
B %FT10 ; Go allocate memory etc. B %FT10 ; Go allocate memory etc.
...@@ -384,13 +380,13 @@ Int_CacheBackdropSprite ROUT ...@@ -384,13 +380,13 @@ Int_CacheBackdropSprite ROUT
; We are not going to scale it so find out how big it will be in the current mode. ; We are not going to scale it so find out how big it will be in the current mode.
MOV r0,#&4f MOV r0,#open_read :OR: open_nopath :OR: open_mustopen :OR: open_nodir
LDR r1,backdrop_path LDR r1,backdrop_path
SWI XOS_Find ; Open for reading. SWI XOS_Find ; Open for reading.
Pull "PC",VS Pull "PC",VS
MOV r1,r0 MOV r1,r0
MOV r0,#3 ; Read bytes from file MOV r0,#OSGBPB_ReadFromGiven ; Read bytes from file
ADR r2,dataarea ADR r2,dataarea
MOV r3,#4 MOV r3,#4
MOV r4,#4 ; Read offsets to first sprite and end of area MOV r4,#4 ; Read offsets to first sprite and end of area
...@@ -401,7 +397,7 @@ Int_CacheBackdropSprite ROUT ...@@ -401,7 +397,7 @@ Int_CacheBackdropSprite ROUT
SUB r4,r0,#4 SUB r4,r0,#4
Debug bd,"Offset to sprite is ",r4 Debug bd,"Offset to sprite is ",r4
MOV r0,#3 MOV r0,#OSGBPB_ReadFromGiven
MOV r3,#48 MOV r3,#48
SWI XOS_GBPB ; Read sprite header SWI XOS_GBPB ; Read sprite header
BVC %FT06 BVC %FT06
...@@ -435,37 +431,31 @@ Int_CacheBackdropSprite ROUT ...@@ -435,37 +431,31 @@ Int_CacheBackdropSprite ROUT
Debug bd,"First bit = ",r3 Debug bd,"First bit = ",r3
SUB r4,r4,r3 ; Adjust width SUB r4,r4,r3 ; Adjust width
ADD r4,r4,#1 ; Real width in bits ADD r4,r4,#1 ; Real width in bits
MOV r1,#9 ; get log2bpp for sprites mode MOV r1,#VduExt_Log2BPP ; get log2bpp for sprites mode
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
Pull "PC",VS Pull "PC",VS
MOV r4,r4,LSR r2 ; width in pixels MOV r4,r4,LSR r2 ; width in pixels
Debug bd,"Sprite width is ",r4 Debug bd,"Sprite width is ",r4
MOV r1,#5 ; Get YEig for sprite's mode MOV r1,#VduExt_YEigFactor ; Get YEig for sprite's mode
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
Pull "PC",VS Pull "PC",VS
MOV r5,r5, ASL r2 ; Height in OS units in sprites mode MOV r5,r5, ASL r2 ; Height in OS units in sprites mode
MOV r1,#4 ; Get XEig for sprite's mode MOV r1,#VduExt_XEigFactor ; Get XEig for sprite's mode
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
Pull "PC",VS Pull "PC",VS
MOV r4,r4, ASL r2 ; Width in OS units in sprites mode MOV r4,r4, ASL r2 ; Width in OS units in sprites mode
; Now convert back to pixels for current mode ; Now convert back to pixels for current mode
LDR r2, YEig
MOV r0,#-1 ; Use current mode
MOV r1,#5 ; YEig
SWI XOS_ReadModeVariable
Pull "PC",VS
MOVS r5,r5, LSR r2 ; Height in pixels MOVS r5,r5, LSR r2 ; Height in pixels
MOVEQ r5,#1 ; Must be minimum of 1 pixel MOVEQ r5,#1 ; Must be minimum of 1 pixel
MOV r2,r5, LSL r2 ; Height in OS units in current mode MOV r2,r5, LSL r2 ; Height in OS units in current mode
STR r2,scale_y1 STR r2,scale_y1
Debug bd,"Height in OS units is ",r2 Debug bd,"Height in OS units is ",r2
MOV r1,#4 ; XEig LDR r2, XEig
SWI XOS_ReadModeVariable
Pull "PC",VS
MOVS r4,r4, LSR r2 ; Width in pixels MOVS r4,r4, LSR r2 ; Width in pixels
MOVEQ r4,#1 ; Must be minimum of 1 pixel MOVEQ r4,#1 ; Must be minimum of 1 pixel
MOV r2,r4, LSL r2 ; Width in OS units in current mode MOV r2,r4, LSL r2 ; Width in OS units in current mode
...@@ -473,7 +463,7 @@ Int_CacheBackdropSprite ROUT ...@@ -473,7 +463,7 @@ Int_CacheBackdropSprite ROUT
Debug bd,"Width in OS units is ",r4 Debug bd,"Width in OS units is ",r4
MOV r0,#-1 MOV r0,#-1
MOV r1,#9 MOV r1,#VduExt_Log2BPP
SWI XOS_ReadModeVariable ; Get Log2BPP for current mode SWI XOS_ReadModeVariable ; Get Log2BPP for current mode
MOV r3,r4,ASL r2 ; Width in bits MOV r3,r4,ASL r2 ; Width in bits
...@@ -534,7 +524,7 @@ got_memory ...@@ -534,7 +524,7 @@ got_memory
; mark as active to stop memory from being stolen! ; mark as active to stop memory from being stolen!
MOV r0,#16 ; Load file, no path. MOV r0,#OSFile_LoadNoPath
LDR r1,backdrop_path LDR r1,backdrop_path
MOV r2,#&8000 MOV r2,#&8000
LDR r3,slot_size LDR r3,slot_size
...@@ -581,7 +571,7 @@ LoadedOK ...@@ -581,7 +571,7 @@ LoadedOK
STR r2,[r1] STR r2,[r1]
MOV r2,#&10 MOV r2,#&10
STR r2,[r1,#8] STR r2,[r1,#8]
LDR r0,=9+&100 ; SNew LDR r0,=&100 + SpriteReason_ClearSprites
SWI XOS_SpriteOp SWI XOS_SpriteOp
ADDVS sp,sp,#8 ADDVS sp,sp,#8
Pull "PC",VS Pull "PC",VS
...@@ -598,7 +588,7 @@ LoadedOK ...@@ -598,7 +588,7 @@ LoadedOK
Debug bd,"Screen mode is ",r2 Debug bd,"Screen mode is ",r2
MOV r6,r2 MOV r6,r2
LDR r0,=15+&100 LDR r0,=&100 + SpriteReason_CreateSprite
MOV r1,#&8000 MOV r1,#&8000
ADRL r2,BackdropSpriteName ; Create new sprite in current mode ADRL r2,BackdropSpriteName ; Create new sprite in current mode
MOV r3,#0 ; No palette MOV r3,#0 ; No palette
...@@ -615,8 +605,6 @@ LoadedOK ...@@ -615,8 +605,6 @@ LoadedOK
MOV r9,r1 MOV r9,r1
MOV r10,r2 MOV r10,r2
[ Version >= 037
LDR R0,[R2,#spImage] LDR R0,[R2,#spImage]
LDR LR,[R2,#spTrans] LDR LR,[R2,#spTrans]
CMP R0,R2 CMP R0,R2
...@@ -660,53 +648,6 @@ LoadedOK ...@@ -660,53 +648,6 @@ LoadedOK
SWI XColourTrans_SelectTable SWI XColourTrans_SelectTable
Pull "PC",VS ; return if it errored (V set => R0 -> error block) Pull "PC",VS ; return if it errored (V set => R0 -> error block)
|
; ooohy poohey code that does not cope with new sprite files!
LDR r0,[r2,#32] ; Get offset to data
CMP r0,#44 ; Does it have a palette ?
BNE %FT01
; It does not have a palette, get wimp's default for that mode
Push "r2"
LDR r0,[r2,#40]
MOV r1,#9
SWI XOS_ReadModeVariable
CMP r2,#3
MOVGES r1,#0
ADRLT r1,default_palette
LDRLT r2,=&45555254 ; "TRUE"
SWILT XWimp_ReadPalette ; Get wimps default palette.
Pull "r2"
Pull "PC",VS
B %FT10
01 ; It does have a palette, convert it to a form we can use.
ADD r0,r0,r2 ; r0 -> Word after palette data
ADD r3,r2,#44 ; r3 -> First entry of palette
MOV r4,r3
02
LDR r14,[r3],#8 ; Get every second entry.
STR r14,[r4],#4
CMP r3,r0
BNE %BT02
ADD r1,r2,#44
Debug bd,"Palette modified"
10 ; Now r1-> palette
LDR r0,[r2,#40]
MOV r2,#-1
MOV r3,#-1
ADR r4,dataarea
SWI XColourTrans_SelectTable
Pull "PC",VS
Debug bd,"Got translation table."
]
ADR r6,ScaleFactors ADR r6,ScaleFactors
MOV r0,#0 MOV r0,#0
STR r0,[r6,#0] ; x0 (y1 x1 y1 x1) STR r0,[r6,#0] ; x0 (y1 x1 y1 x1)
...@@ -719,24 +660,17 @@ LoadedOK ...@@ -719,24 +660,17 @@ LoadedOK
BEQ %FT01 BEQ %FT01
; Scaled sprite, x1,y1 are screen x1,y1 ; Scaled sprite, x1,y1 are screen x1,y1
LDR r2, XEig ; Get XEig
MOV r0,#-1
MOV r1,#4
SWI XOS_ReadModeVariable ; Get XEig
Pull "PC",VS
LDR r0,scale_x1 LDR r0,scale_x1
MOV r0,r0,ASL R2 MOV r0,r0,ASL r2
MOV r0,r0,ASL #8 MOV r0,r0,ASL #8
STR r0,[r6,#8] STR r0,[r6,#8]
STR r0,[r6,#16] STR r0,[r6,#16]
Debug bd,"x1 = ",r0 Debug bd,"x1 = ",r0
MOV r0,#-1 LDR r2, YEig ; Get YEig
MOV r1,#5
SWI XOS_ReadModeVariable ; Get YEig
Pull "PC",VS
LDR r0,scale_y1 LDR r0,scale_y1
MOV r0,r0,ASL R2 MOV r0,r0,ASL r2
MOV r0,r0,ASL #8 MOV r0,r0,ASL #8
STR r0,[r6,#4] STR r0,[r6,#4]
STR r0,[r6,#12] STR r0,[r6,#12]
...@@ -762,7 +696,7 @@ LoadedOK ...@@ -762,7 +696,7 @@ LoadedOK
10 10
Debug bd,"Scale factors set." Debug bd,"Scale factors set."
LDR r0,=60+&200 ; Switch output to sprite. LDR r0,=&200 + SpriteReason_SwitchOutputToSprite
MOV r1,#&8000 ; -> Sprite area MOV r1,#&8000 ; -> Sprite area
ADD r2,r1,#16 ; -> Sprite ADD r2,r1,#16 ; -> Sprite
MOV r3,#0 ; No save area. MOV r3,#0 ; No save area.
...@@ -777,7 +711,7 @@ LoadedOK ...@@ -777,7 +711,7 @@ LoadedOK
SWI ColourTrans_SetGCOL SWI ColourTrans_SetGCOL
SWI XOS_WriteI+16 SWI XOS_WriteI+16
MOV r0,#56+&200 ; Put sprite transformed. MOV r0,#&200 + SpriteReason_PutSpriteTransformed
MOV r1,r9 MOV r1,r9
MOV r2,r10 MOV r2,r10
MOV r3,#1 ; Dest = coords. MOV r3,#1 ; Dest = coords.
...@@ -793,7 +727,7 @@ LoadedOK ...@@ -793,7 +727,7 @@ LoadedOK
Debug bd,"Sprite scaled." Debug bd,"Sprite scaled."
99 99
LDR r0,=60+&200 LDR r0,=&200 + SpriteReason_SwitchOutputToSprite
MOV r2,#0 MOV r2,#0
MOV r3,#1 MOV r3,#1
SWI XOS_SpriteOp ; Switch output back to screen. SWI XOS_SpriteOp ; Switch output back to screen.
...@@ -819,24 +753,22 @@ LoadedOK ...@@ -819,24 +753,22 @@ LoadedOK
TST r0,#bd_OptionTiled TST r0,#bd_OptionTiled
Pull "PC",NE ; For tiled sprites, compute at redraw time. Pull "PC",NE ; For tiled sprites, compute at redraw time.
MOV r0,#-1 MOV r0,#-1 ; Current mode
MOV r1,#11 ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r4,r2,#1
MOV r1,#4 ; XEig
SWI XOS_ReadModeVariable
Pull "PC",VS
MOV r4,r4,ASL r2 ; Screen width in OS Units
MOV r1,#12 ; Screen height in pixels MOV r1,#VduExt_XWindLimit ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r5,r2,#1
MOV r1,#5 ; YEig
SWI XOS_ReadModeVariable SWI XOS_ReadModeVariable
ADDVC r4,r2,#1
LDRVC r2,XEig ; XEig
MOVVC r4,r4,ASL r2 ; Screen width in OS Units
MOVVC r1,#VduExt_YWindLimit ; Screen height in pixels
SWIVC XOS_ReadModeVariable
ADDVC r5,r2,#1
LDRVC r2,YEig ; YEig
MOVVC r5,r5,ASL r2 ; Screen height in OS Units
Pull "PC",VS Pull "PC",VS
MOV r5,r5,ASL r2 ; Screen height in OS Units
LDR r1,icon_bar_height LDR r1,icon_bar_height
SUB r5,r5,r1 SUB r5,r5,r1
...@@ -942,16 +874,11 @@ Int_CacheJPEG Entry ...@@ -942,16 +874,11 @@ Int_CacheJPEG Entry
MOV r4, r2 MOV r4, r2
MOV r5, r3 MOV r5, r3
; Read YEig and calculate height in OS units ; Read YEig and calculate height in OS units
MOV r0,#-1 LDR r2, YEig
MOV r1,#5
SWI XOS_ReadModeVariable
EXIT VS
MOV r2,r5, LSL r2 MOV r2,r5, LSL r2
STR r2,scale_y1 STR r2,scale_y1
; Read XEig and calculate width in OS units ; Read XEig and calculate width in OS units
MOV r1,#4 LDR r2, XEig
SWI XOS_ReadModeVariable
EXIT VS
MOV r2,r4, LSL r2 MOV r2,r4, LSL r2
STR r2,scale_x1 STR r2,scale_x1
; Are we scaling? ; Are we scaling?
......
...@@ -108,7 +108,7 @@ Int_AddTinyDirs ...@@ -108,7 +108,7 @@ Int_AddTinyDirs
LDR r0,TinyDirs_Icons LDR r0,TinyDirs_Icons
CMP r0,#0 CMP r0,#0
Pull "PC",GE ; Do nothing if there are other icons. Pull "PC",GT ; Do nothing if there are other icons.
Debug sa,"number of icons is 0" Debug sa,"number of icons is 0"
...@@ -119,9 +119,9 @@ Int_AddTinyDirs ...@@ -119,9 +119,9 @@ Int_AddTinyDirs
Debug sa,"Sprite found" Debug sa,"Sprite found"
MOVVC r0, r6 ; creation mode of sprite MOV r0, r6 ; creation mode of sprite
MOVVC r1, #VduExt_XEigFactor MOV r1, #VduExt_XEigFactor
SWIVC XOS_ReadModeVariable SWI XOS_ReadModeVariable
MOVVC r5, r3, LSL r2 MOVVC r5, r3, LSL r2
MOVVC r3, #0 MOVVC r3, #0
MOVVC r1, #VduExt_YEigFactor MOVVC r1, #VduExt_YEigFactor
...@@ -589,7 +589,7 @@ resolve_directorysprite ...@@ -589,7 +589,7 @@ resolve_directorysprite
; accross as ordinary directories. ; accross as ordinary directories.
Push "R1-R5" Push "R1-R5"
ADD R1,R2,#ic_path ADD R1,R2,#ic_path
MOV R0,#17 MOV R0,#OSFile_ReadNoPath
SWI XOS_File SWI XOS_File
ADRVS r0,SpriteName_Directory ADRVS r0,SpriteName_Directory
BVS %FT80 BVS %FT80
......
...@@ -40,90 +40,7 @@ insert_tinydirs ...@@ -40,90 +40,7 @@ insert_tinydirs
MOV r0, #0 MOV r0, #0
STR r0, [r2,#icon_filename] STR r0, [r2,#icon_filename]
Pull "R0-R11,PC" Pull "R0-R11,PC"
; ----------------------------------------------------------------------------------------------------------------------
; Insert an icon to the buffered list
; R4 - pointer to filename
; R5 - icon to insert to right of
; R7 - icon id to delete (for removal only)
; R6,R7 - X,Y position for pinboard insert.
;insert_buffered
; Push "R0-R11,LR"
; MOV r10, r4
; MOV r11, r5
;; If icon is -3 or -4 then it is a remove command - ignore reading file type!
; CMP r5, #remove_normal
; ASSERT remove_normal > remove_tinydir
; BLE got_file_type
;; Get the file type
; MOV r0, #OSFile_ReadNoPath
; MOV r1, r10
; SWI XOS_File
; ADDVS sp, sp, #4
; Pull "R1-R11,PC",VS
; CMP r0, #0
; MOVEQ r2, #0
; MOVEQ r0, #OSFile_MakeError
; SWIEQ XOS_File
; ADDVS sp, sp, #4
; Pull "R1-R11,PC",VS
; CMP r0, #2
; MOVEQ r5, #&1000
; BEQ got_file_type
; MOV r5, r2, ASR#20 ; R5 = -1 if stamped
; CMP r5, #-1
; MOVNE r5, #-1
; BNE got_file_type
; MOV r5, r2, LSL #12
; MOV r5, r5, LSR #20
;; Get buffer space for it
;got_file_type
; MOV r1, #0
;01
; LDRB r0, [r10, r1]
; ADD r1, r1, #1
; CMP r0, #32
; BGT %BT01
; ADD r3, r1, #icon_filename+2
; MOV r0, #ModHandReason_Claim
; SWI XOS_Module
; ADDVS sp, sp, #4
; Pull "R1-R11,PC",VS
;; R2=pointer to it. Add it to list at the end.
; ADR r0, buffered_ptr
;01
; LDR r1, [r0,#next_ptr]
; CMP r1, #0
; MOVGT r0, r1
; BGT %BT01
; STR r2, [r0,#next_ptr]
; STR r0, [r2,#prev_ptr]
; MOV r0,#0
; STR r0, [r2,#next_ptr]
;; Store data
; Debug pi, "r11 is ",r11
; STR r11,[r2,#icon_handle]
; STR r5, [r2,#icon_filetype]
; CMP r11, #insert_pinboard
; STREQ r6, [r2,#icon_position]
; STREQ r7, [r2,#icon_position+4]
; LDREQ r6, backdrop_handle
; MOVNE r6, #0
; STR r6, [r2,#icon_window]
; CMP r11, #remove_normal
; ASSERT remove_normal > remove_tinydir
; STRLE r7, [r2,#icon_id]
;; Store filename
; ADD r0, r2, #icon_filename
;01
; LDRB r1, [r10], #1
; STRB r1, [r0], #1
; CMP r1, #32
; BGT %BT01
;; Make sure of null termination
; MOV r1, #0
; STRB r1, [r0,#-1]
; Pull "R0-R11,PC",,^
; ----------------------------------------------------------------------------------------------------------------------
directory_store directory_store
DCB "Sdirectory",0 DCB "Sdirectory",0
ALIGN ALIGN
...@@ -506,7 +423,6 @@ pre_quit ...@@ -506,7 +423,6 @@ pre_quit
ADRL r2,backdrop_spritename ADRL r2,backdrop_spritename
SWI XOS_SpriteOp SWI XOS_SpriteOp
[ Version >= 4 ; Force a redraw if there was a sprite on the backdrop.
LDRVC r2,screen_size LDRVC r2,screen_size
RSBVC r1,r2,#0 RSBVC r1,r2,#0
MOVVC r0,#3 ; Change sprite area MOVVC r0,#3 ; Change sprite area
...@@ -520,8 +436,6 @@ pre_quit ...@@ -520,8 +436,6 @@ pre_quit
SWIVC XWimp_ForceRedraw SWIVC XWimp_ForceRedraw
]
MOV r0,#0 MOV r0,#0
STR r0,backdrop_path STR r0,backdrop_path
...@@ -686,10 +600,9 @@ chk_iconized ...@@ -686,10 +600,9 @@ chk_iconized
LDR r14,backdrop_handle LDR r14,backdrop_handle
STR r14,[r1] STR r14,[r1]
LDR r14,[r0,#w_icon_handle] LDR r14,[r0,#w_icon_handle]
[ Version >= 5
CMP r14,#0 CMP r14,#0
BLT %FT02 BLT %FT02
]
STR r14,[r1,#4] STR r14,[r1,#4]
Push "r0" Push "r0"
SWI XWimp_GetIconState SWI XWimp_GetIconState
......
...@@ -203,180 +203,6 @@ Iconized_SelectDrag_end Entry ...@@ -203,180 +203,6 @@ Iconized_SelectDrag_end Entry
B %BT01 B %BT01
[ Version < 69
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; SelectDragIcon_end
; old version
SelectDragIcon_end ROUT
MOV r0,#DragType_NoDrag
STR r0,DragType
; Adjust bbox to same size as original (for DragASprite).
ADR r1,DragBBOX
LDMIA r1,{r6,r7,r8,r9}
SUB r2,r8,r6
SUB r3,r9,r7
ADR r1,dataarea
LDMIA r1,{r6,r7,r8,r9}
ADD r8,r6,r2
SUB r7,r9,r3
ADR r1,PointerInfo
SWI XWimp_GetPointerInfo ; Find out where it ended.
LDR r2,[r1,#12] ; Window
LDR r3,[r1,#16] ; Icon
ADR r1,dataarea
CMP r2,#-2
CMPLE r3,#-1
BEQ Run_Selection ; Dragged to empty part of icon bar, run it !
; Send a Message_FilerSelection
ADD r14,r1,#ms_data
STMIA r14!,{r6,r7,r8,r9} ; Drag BBOX
ADR r0,DragBBOX
LDMIA r0,{r6,r7,r8,r9} ; Get original box.
MOV r4,#grid_x_spacing
STR r4,[r14],#4
MOV r5,#grid_y_spacing
ADD r7,r7,r5
SUB r7,r7,#1
STR r5,[r14],#4 ; Width & height of icons.
MOV r0,#0
STR r0,[r14],#4 ; Display mode is always 0 (large icons sort by name)
DivRem r10,r6,r4,r0
STR r10,[r14],#4 ; Leftmost column
Debug pi,"Left: ",r10
LDR r10,Screen_y1
SUB r9,r10,r9
DivRem r10,r9,r5,r0 ; Top row
STR r10,[r14],#4
Debug pi,"Top: ",r10
DivRem r10,r8,r4,r0 ; Rightmost column
STR r10,[r14],#4
Debug pi,"Right: ",r10
LDR r10,Screen_y1
SUB r7,r10,r7
DivRem r10,r7,r5,r0 ; Bottom row
STR r10,[r14],#4
Debug pi,"Bottom: ",r10
MOV r0,#0
STR r0,[r1,#ms_myref]
STR r0,[r1,#ms_yourref]
MOV r0,#ms_data+11*4
STR r0,[r1,#ms_size]
LDR r0,=Message_FilerSelection
STR r0,[r1,#ms_action]
MOV r0,#17
SWI XWimp_SendMessage
Pull "PC",VS
LDR r14,Filer_taskid
TEQ r2,r14
BEQ SendToFiler
Debug pi,"Not filer"
; This isn't the filer, simply send data load messages for each icon.
; And deselect it.
LDR r10,Icon_list
01
CMP r10,#0
Pull "PC",EQ
LDR r3,DragWindow
ADR r1,dataarea
LDR r0,[r10,#ic_window] ; Not in drag window.
TEQ r0,r3
BNE %FT10
LDR r0,[r10,#ic_icon]
STR r3,[r1]
STR r0,[r1,#4]
SWI XWimp_GetIconState
Pull "PC",VS
LDR r0,[r1,#24]
[ Version >= 31
TST r0,#selected
|
TST r0,#is_selected
]
BEQ %FT10 ; Not selected
MOV r0,#0
STR r0,[r1,#8]
[ Version >= 31
CMP r3,#0
MOVGT r0,#is_selected
MOVLT r0,#selected
|
MOV r0,#is_selected
]
STR r0,[r1,#12]
SWI XWimp_SetIconState ; Deselect
CMP r3,#0
LDRGE r0,Pinboard_Selected
LDRLE r0,TinyDirs_Selected
SUB r0,r0,#1
STRGE r0,Pinboard_Selected
STRLE r0,TinyDirs_Selected
Debug pi,"Selected icons = ",r0
ADR r0,PointerInfo
LDMIA r0,{r4,r5,r6,r7,r8} ; x,y,b,w,i
ADD r0,r1,#ms_data
STMIA r0!,{r7,r8} ; w,i
STMIA r0!,{r4,r5}
MOV r4,#1
STR r4,[r0],#4 ; estimated size.
LDR r4,[r10,#ic_filetype]
STR r4,[r0],#4
MOV r1,r0
ADD r0,r10,#ic_path
BL Copy_r0r1
ADD r1,r1,#3+1 ; Include null.
BIC r1,r1,#3
MOV r0,#-1
STR r0,[r1],#4
STR r0,[r1],#4 ; Column, Row !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
MOV r0,r1
ADR r1,dataarea
SUB r0,r0,r1
STR r0,[r1,#ms_size]
MOV r0,#Message_DataLoad
STR r0,[r1,#ms_action]
MOV r0,#0
STR r0,[r1,#ms_myref]
STR r0,[r1,#ms_yourref]
MOV r0,#18
LDR r2,[r1,#ms_data]
LDR r3,[r1,#ms_data+4]
SWI XWimp_SendMessage
Pull "PC",VS
10
LDR r10,[r10,#ic_next]
B %BT01
Pull "PC"
]
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; SelectDragIcon_end ; SelectDragIcon_end
; ;
...@@ -564,8 +390,7 @@ lock_movement_to_grid Entry "r0-r7, r10-r11" ...@@ -564,8 +390,7 @@ lock_movement_to_grid Entry "r0-r7, r10-r11"
MOVLT r6, #0 MOVLT r6, #0
MOV r10, #grid_y_spacing MOV r10, #grid_y_spacing
DivRem r1, r6, r10, r2 DivRem r1, r6, r10, r2
MUL r9, r1, r10 ; y = (mouse_y DIV y_spacing) * y_spacing MLA r9, r1, r10, r0 ; y = (mouse_y DIV y_spacing) * y_spacing) + icon_bar_height
ADD r9, r9, r0
08 ; Get the state of the icon where the drag was started 08 ; Get the state of the icon where the drag was started
ADR r1, dataarea ADR r1, dataarea
...@@ -836,7 +661,7 @@ Run_Selection ROUT ...@@ -836,7 +661,7 @@ Run_Selection ROUT
Debug pi,"Selected icons = ",r0 Debug pi,"Selected icons = ",r0
ADR r1,dataarea ADR r1,dataarea
ADR r0,Run_command ADRL r0,FilerRunCom
BL Copy_r0r1 BL Copy_r0r1
ADD r0,r10,#ic_path ADD r0,r10,#ic_path
BL Copy_r0r1 BL Copy_r0r1
...@@ -848,9 +673,6 @@ Run_Selection ROUT ...@@ -848,9 +673,6 @@ Run_Selection ROUT
LDR r10,[r10,#ic_next] LDR r10,[r10,#ic_next]
B %BT01 B %BT01
Run_command DCB "Filer_Run ",0
ALIGN
LTORG LTORG
LNK Menu.s LNK Menu.s
...@@ -95,13 +95,10 @@ found_insertion_point ...@@ -95,13 +95,10 @@ found_insertion_point
MOV r3, r0 MOV r3, r0
CMP r1, #insert_pinboard CMP r1, #insert_pinboard
LDRNE r0, no_icons LDRNE r0, no_icons
[ Version >= 9
LDREQ r0, pinboard_no_icons LDREQ r0, pinboard_no_icons
ADD r0, r0, #1 ADD r0, r0, #1
STREQ r0, pinboard_no_icons STREQ r0, pinboard_no_icons
|
ADDNE r0, r0, #1 ADDNE r0, r0, #1
]
STRNE r0, no_icons STRNE r0, no_icons
; Check icon handle - if inserting at end then okay, else change all icon entries in buffered list ; Check icon handle - if inserting at end then okay, else change all icon entries in buffered list
CMP r1, #-1 CMP r1, #-1
......
...@@ -30,11 +30,6 @@ HelpRequest ROUT ...@@ -30,11 +30,6 @@ HelpRequest ROUT
LDR r2,[r1,#36] ; Icon LDR r2,[r1,#36] ; Icon
LDR r1,[r1,#32] ; Window LDR r1,[r1,#32] ; Window
;LDR r14,info_dbox_handle
;TEQ r1,r14
;ADREQ r1,InfoDboxToken
;BEQ SendHelp
LDR r14,saveas_handle LDR r14,saveas_handle
TEQ r1,r14 TEQ r1,r14
Pull "PC",EQ Pull "PC",EQ
......
...@@ -12,146 +12,6 @@ ...@@ -12,146 +12,6 @@
; See the License for the specific language governing permissions and ; See the License for the specific language governing permissions and
; limitations under the License. ; limitations under the License.
; ;
[ Version < 69
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Iconized_DragEnd
;
; User has dragged a window icon accross the backdrop.
;
; In: r1 -> Wimp event structure
Iconized_DragEnd ROUT
SWI XDragASprite_Stop
ADR r1, dataarea ; What icon is pointer over?
SWI XWimp_GetPointerInfo
Pull "PC",VS
LDR r0,backdrop_handle ; Check drag was on backdrop
LDR r5,[r1,#12]
CMP r5,r0
Pull "PC",NE
LDR r6,drag_icon
BL find_iconized ; find structure for icon we have dragged
CMP r7,#0
Pull "PC",EQ
MOV r11,r7
STR r5,[r1,#12] ; store window handle at r1+12
STR r6,[r1,#16] ; store icon handle at r1+16
LDMIA r1!,{r5-r7} ; Load r5 (x), r6 (y), r7 (buttons) Also r1 = r1 + 12
SWI XWimp_GetIconState ; Get Icon state
ADDVC r1,r1,#8 ; Get bounding box
MOVVC r10,r1
LDMVCIA r1,{r1-r4} ; load minx, miny, maxx, maxy from result of GetIconState
LDRVC r0,backdrop_handle
SWIVC XWimp_ForceRedraw ; Force redraw of old area
ADRVC r0,drag_start
LDMVCIA r0,{r8-r9} ; load x and y co-ordinate of start of drag
SUBVC r5,r5,r8
SUBVC r6,r6,r9 ; Get relative movment.
ADDVC r1,r1,r5 ; Adjust bounding box.
ADDVC r3,r3,r5
ADDVC r2,r2,r6
ADDVC r4,r4,r6
STMVCIA r10,{r1-r4}
LDMVCIA r10,{r3-r6}
; BLVC lock_to_grid
; STMVCIA r10,{r3-r6}
SUBVC r1,r10,#8 ; get window handle
LDRVC r0,[r1],#4
STRVC r0,[r1]
Push R1
LDMVCIA R1,{R1-R5}
LDRVC R1,[R11,#w_icon_handle]
SWIVC XWimp_ResizeIcon
MOVVC R0,R1
Pull R1
LDRVC r2,backdrop_handle
MOVVC r3,r0
MOVVC r4,#0
MOVVC r5,#0
STMVCIA r1,{r2-r5}
SWIVC XWimp_SetIconState
Pull "PC"
]
[ Version < 69
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Iconized_Drag
Iconized_Drag ROUT
ADR r7,drag_start
STMIA r7,{r10,r11} ; x,y of drag start
MOV r6,r2
STR r6,drag_icon
BL find_iconized
LDR r5,backdrop_handle
ADR r1,dataarea
STR r5,[r1]
STR r6,[r1,#4]
SWI XWimp_GetIconState
ADD r1,r1,#8
LDMIA r1,{r3-r6}
MOV r14,#DragType_Iconized
STR r14,DragType
BL Claim_Focus
Push "r0-r2"
MOV r0,#ReadCMOS
MOV r1,#FileSwitchCMOS
SWI XOS_Byte
MOVVS r14,#0
ANDVC r14,r2,#DragASpriteCMOSBit
Pull "r0-r2"
CMP r14,#0
BEQ %FT10
; Do DragASprite
Push "r3-r6"
MOV R0,#DS_HJustify_Centre :OR: DS_VJustify_Top :OR: DS_BoundTo_Screen :OR: DS_Bound_Pointer :OR: DS_DropShadow_Present
MOV r1,#1
ADD r2,r7,#w_sprite_name
MOV r3,sp
SWI XDragASprite_Start
ADD sp,sp,#4*4
Pull "PC"
10
ADR r1, dataarea
LDR r0,backdrop_handle
; R3,R4,R5,R6 = bounding coordinates (offset from icon bar window position)
; Create drag box
MOV r2, #5
STMIA r1!, {r0,r2,r3,r4,r5,r6}
SUB r6, r6, r4
SUB r5, r5, r3
ADR r0, bounding_box
LDMIA r0, {r7,r8,r9,r10}
SUB r7, r7, r5 ,LSR #1
SUB r8, r8, r6 ,LSR #1
ADD r9, r9, r5, LSR #1 ; half x size.
ADD r10,r10,r6, LSR #1 ; half y size.
LDR r8, icon_bar_height
STMIA r1!, {r7,r8,r9,r10}
ADR r1, dataarea
SWI XWimp_DragBox
Pull "PC"
]
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -361,6 +221,6 @@ delete_window_entry ; Must preserve r5 from here down. ...@@ -361,6 +221,6 @@ delete_window_entry ; Must preserve r5 from here down.
MOV r2, r7 MOV r2, r7
SWI XOS_Module SWI XOS_Module
Pull "PC" Pull "PC"
LNK Save.s LNK Save.s
...@@ -57,7 +57,7 @@ BufferIcon ...@@ -57,7 +57,7 @@ BufferIcon
TST r1,#1:SHL:0 ; Do we need to check path ? TST r1,#1:SHL:0 ; Do we need to check path ?
BEQ %FT01 ; No, skip. BEQ %FT01 ; No, skip.
MOV r0,#23 ; Read catalogue info with type / no path MOV r0,#OSFile_ReadWithTypeNoPath
ADR r1,dataarea ADR r1,dataarea
SWI XOS_File SWI XOS_File
STRVS r0,[sp] STRVS r0,[sp]
...@@ -66,7 +66,7 @@ BufferIcon ...@@ -66,7 +66,7 @@ BufferIcon
TEQ R0,#3 ; image file TEQ R0,#3 ; image file
BNE %FT00 BNE %FT00
MOV R0,#17 MOV R0,#OSFile_ReadNoPath
ADR r1,dataarea ADR r1,dataarea
SWI XOS_File SWI XOS_File
...@@ -79,7 +79,7 @@ BufferIcon ...@@ -79,7 +79,7 @@ BufferIcon
00 00
CMP r0,#0 CMP r0,#0
MOVEQ r2,r0 MOVEQ r2,r0
MOVEQ r0,#19 ; Generate error. MOVEQ r0,#OSFile_MakeError
SWIEQ XOS_File SWIEQ XOS_File
STRVS r0,[sp] STRVS r0,[sp]
Pull "r0-r7,PC",VS Pull "r0-r7,PC",VS
...@@ -817,8 +817,7 @@ FindNearestGridXY Entry "r0-r4, r7-r11" ...@@ -817,8 +817,7 @@ FindNearestGridXY Entry "r0-r4, r7-r11"
DivRem r1, r6, r10, r2 DivRem r1, r6, r10, r2
CMP r6, r10, LSR #1 CMP r6, r10, LSR #1
ADDGT r1, r1, #1 ADDGT r1, r1, #1
MUL r9, r1, r10 ; y = (mouse_y DIV y_spacing) * y_spacing MLA r6, r1, r10, r0 ; y = ((mouse_y DIV y_spacing) * y_spacing) + icon_bar_height
ADD r6, r9, r0
EXIT EXIT
......
...@@ -243,9 +243,6 @@ TinyDirsIcon_Menu ROUT ...@@ -243,9 +243,6 @@ TinyDirsIcon_Menu ROUT
SWI XMessageTrans_MakeMenus SWI XMessageTrans_MakeMenus
Pull "PC",VS Pull "PC",VS
;LDR r14,info_dbox_handle ; Point info entry at info box.
;STR r14,menu_store+28+tim_info*24+4
ADR r1,menu_store ADR r1,menu_store
SUB r2,r10,#64 SUB r2,r10,#64
MOV r3,#96+1*44 MOV r3,#96+1*44
...@@ -345,35 +342,33 @@ recreate_pinboard_menu ...@@ -345,35 +342,33 @@ recreate_pinboard_menu
SWI XMessageTrans_MakeMenus SWI XMessageTrans_MakeMenus
Pull "PC",VS Pull "PC",VS
;LDR r14,info_dbox_handle ; Point info entry at info box.
;STR r14,menu_store+28+pm_info*24+4
LDR r14,saveas_handle ; Point save entry at save box. LDR r14,saveas_handle ; Point save entry at save box.
STR r14,menu_store+28+pm_save*24+4 STR r14,menu_store+28+pm_save*24+4
Push "r4"
ADRL r0, OpenCfgPath
MOV r2, #-1
MOV r3, #0
MOV r4, #VarType_Expanded
SWI XOS_ReadVarVal ; Has !Boot been run (to have a !PinSetup)
Pull "r4"
TEQ r2, #0
LDR r14, menu_store+28+pm_configure*24+8
ORREQ r14, r14, #is_shaded ; Shade the 'Configure...' entry
BICNE r14, r14, #is_shaded
STR r14, menu_store+28+pm_configure*24+8
LDR r0, Window_Icons LDR r0, Window_Icons
LDR r14, Iconbar_Icons LDR r14, Iconbar_Icons
SUB r0, r0, r14 SUB r0, r0, r14
LDR r14,Pinboard_Icons LDR r14,Pinboard_Icons
ADDS r14, r14, r0 ; Are there any icons on the pinboard ? ADDS r14, r14, r0 ; Are there any icons on the pinboard ?
[ Version < 68
LDR r14,menu_store+28+pm_tidy*24+8 ; Shade 'Tidy' if no icons.
ORREQ r14,r14,#is_shaded
BICNE r14,r14,#is_shaded
STR r14,menu_store+28+pm_tidy*24+8
]
LDR r14, menu_store+28+pm_selectall*24+8 LDR r14, menu_store+28+pm_selectall*24+8
ORREQ r14, r14, #is_shaded ORREQ r14, r14, #is_shaded
BICNE r14, r14, #is_shaded BICNE r14, r14, #is_shaded
STR r14, menu_store+28+pm_selectall*24+8 STR r14, menu_store+28+pm_selectall*24+8
;LDR r14,menu_store+28+pm_select_all*24+8 ; Shade 'Select all' if no icons.
;ORREQ r14,r14,#is_shaded
;BICNE r14,r14,#is_shaded
;STR r14,menu_store+28+pm_select_all*24+8
LDR r0,Pinboard_Selected LDR r0,Pinboard_Selected
LDR r14, Windows_Selected LDR r14, Windows_Selected
ADDS r0, r0, r14 ; Are there any selected icons on the pinboard ? ADDS r0, r0, r14 ; Are there any selected icons on the pinboard ?
...@@ -388,45 +383,8 @@ recreate_pinboard_menu ...@@ -388,45 +383,8 @@ recreate_pinboard_menu
BICNE r14,r14,#is_shaded BICNE r14,r14,#is_shaded
STR r14,menu_store+28+pm_clear_selection*24+8 STR r14,menu_store+28+pm_clear_selection*24+8
;LDR r14,menu_store+28+pm_remove*24+8 ; Shade 'Remove icon' if no selected icons.
;ORREQ r14,r14,#is_shaded
;BICNE r14,r14,#is_shaded
;STR r14,menu_store+28+pm_remove*24+8
CMP r0,#1 ; Is there more than one selected icon ?
;BLE %FT01
;ADR r0,message_file_block+4 ; Change to remove selection if more than
;ADR r1,remove_selection_token ; one selected icon.
;ADRL r2,menu_store+400
;MOV r3,#menu_space-400
;ADRL r2,menu_store+1024-112
;MOV r3,#112
;SWI XMessageTrans_Lookup
;Pull "PC",VS
;MOV r1,#12
;ADD r1, r1, r3, LSL #4
;LDR r4, menu_store+16
;CMP r1, r4
;STRGT r1, menu_store+16
;DebugS pi,"String is ",r2
;CMP r2,#0
;STR r2,menu_store+28+pm_remove*24+12
;ADD r3,r3,#1
;STR r3,menu_store+28+pm_remove*24+20
;MOV r2,#0
;STR r2,menu_store+28+pm_remove*24+16
;LDR r14,menu_store+28+pm_remove*24+8
;ORR r14,r14,#if_indirected
;STR r14,menu_store+28+pm_remove*24+8
01
[ show_backdrop_options [ show_backdrop_options
CMP r0,#1 ; Is there more than one selected icon ?
LDR r14,menu_store+28+pm_backdrop*24+8 ; Shade 'Make Backdrop' if not 1 icon selected. LDR r14,menu_store+28+pm_backdrop*24+8 ; Shade 'Make Backdrop' if not 1 icon selected.
ORRNE r14,r14,#is_shaded ORRNE r14,r14,#is_shaded
BICEQ r14,r14,#is_shaded BICEQ r14,r14,#is_shaded
...@@ -513,7 +471,7 @@ recreate_pinboard_menu ...@@ -513,7 +471,7 @@ recreate_pinboard_menu
ADRL r0, plinghelp ; append help filename ADRL r0, plinghelp ; append help filename
BL Copy_r0r1 BL Copy_r0r1
ADR r1, dataarea ADR r1, dataarea
MOV r0, #23 ; Read catalogue info with type / no MOV r0, #OSFile_ReadWithTypeNoPath
SWI XOS_File SWI XOS_File
Pull "r4-r6,r14" Pull "r4-r6,r14"
TEQ r0, #0 TEQ r0, #0
......
...@@ -66,8 +66,6 @@ tinydirs_icon_menu_selection ROUT ...@@ -66,8 +66,6 @@ tinydirs_icon_menu_selection ROUT
LDR r14,[r1] LDR r14,[r1]
ADD PC,PC,R14,ASL #2 ADD PC,PC,R14,ASL #2
Pull "PC" Pull "PC"
;Pull "PC"
B QuitTinyDirs B QuitTinyDirs
QuitTinyDirs QuitTinyDirs
...@@ -87,7 +85,8 @@ QuitTinyDirs ...@@ -87,7 +85,8 @@ QuitTinyDirs
MOV r0,#-1 MOV r0,#-1
STR r0,TinyDirs_Handle STR r0,TinyDirs_Handle
Pull "r14,PC" Pull "lr"
Pull "PC"
reopen_tinydirs_menu reopen_tinydirs_menu
...@@ -209,7 +208,7 @@ reopen_pinboard_menu ...@@ -209,7 +208,7 @@ reopen_pinboard_menu
pinboard_menu_selection pinboard_menu_selection
ADR r2,reopen_pinboard_menu ; Make sure this function is called when we've delt with ADR r2,reopen_pinboard_menu ; Make sure this function is called when we've dealt with
Push "r2" ; selection, so that menu is reopened if Right button was used Push "r2" ; selection, so that menu is reopened if Right button was used
LDR r14,[r1] LDR r14,[r1]
...@@ -278,6 +277,7 @@ OpenConfigure ...@@ -278,6 +277,7 @@ OpenConfigure
SWI XWimp_StartTask ; (FG) start command as a task SWI XWimp_StartTask ; (FG) start command as a task
Pull "PC" ; (FG) say bye bye Pull "PC" ; (FG) say bye bye
OpenCfgPath DCB "BootResources$Path",0
OpenCfgCmd DCB "IfThere BootResources:Configure.!PinSetup Then Filer_Run BootResources:Configure.!PinSetup",0 OpenCfgCmd DCB "IfThere BootResources:Configure.!PinSetup Then Filer_Run BootResources:Configure.!PinSetup",0
ALIGN ALIGN
......
...@@ -93,6 +93,10 @@ message_received ...@@ -93,6 +93,10 @@ message_received
TEQ r0, r14 TEQ r0, r14
BEQ HelpRequest BEQ HelpRequest
LDR r14, =Message_ToggleBackdrop
TEQ r0, r14
BEQ ToggleBackdrop
TEQ r0,#Message_Quit TEQ r0,#Message_Quit
Pull "PC",NE Pull "PC",NE
...@@ -123,7 +127,7 @@ DataLoad ROUT ...@@ -123,7 +127,7 @@ DataLoad ROUT
CMP r0,#0 CMP r0,#0
BLT IconbarDataLoad ; Iconbar ! BLT IconbarDataLoad ; Iconbar !
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
ADD r1,r1,#44 ; -> path ADD r1,r1,#44 ; -> path
ADR r2,dataarea ADR r2,dataarea
MOV r3,#0 MOV r3,#0
...@@ -158,7 +162,7 @@ DataLoad ROUT ...@@ -158,7 +162,7 @@ DataLoad ROUT
IconbarDataLoad IconbarDataLoad
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
ADD r1,r1,#44 ; -> path ADD r1,r1,#44 ; -> path
ADR r2,dataarea ADR r2,dataarea
MOV r3,#0 MOV r3,#0
...@@ -180,6 +184,63 @@ IconbarDataLoad ...@@ -180,6 +184,63 @@ IconbarDataLoad
Pull "PC" Pull "PC"
ToggleBackdrop ROUT
MOV R0,#User_Message_Acknowledge ; =19
LDR R3,[R1,#ms_myref] ;
LDR R2,[R1,#ms_taskhandle] ;
STR R3,[R1,#ms_yourref] ;
SWI XWimp_SendMessage ; acknowledge message
STR R2,[R1,#ms_taskhandle] ; restore as ack screwed it
LDR R0,[R1,#ms_size] ; get message size
LDR R2,[R1,#ms_data] ; get flags
CMP R0,#&18 ; is msg >= 24 bytes, ie flags present?
MOVLT R2,#0 ; if not, assume 0
ADD R1,R1,#128 ; use upper half of wimp data block
LDR R0,backdrop_handle ; get window handle of backdrop
STR R0,[R1,#u_handle] ; pop window handle in block
SWI XWimp_GetWindowState ; get state of backdrop
LDR R14,[R1,#u_bhandle] ; get handle to open behind
CMP R14,#-1 ; is it -1, ie backdrop at front?
MOVNE R14,#-2 ; if not, pretend it's at back
AND R2,R2,#3 ; isolate bottom two bits of flags
ADD R2,R2,#1 ; convert flags to something that's
AND R2,R2,#3 ; easier to use (0,1,2,3 -> 1,2,3,0)
CMP R2,#1 ;
EOREQ R14,R14,#1 ; toggle -2 <-> -1
RSBHI R14,R2,#1 ; convert %10 to -1, %11 to -2
BLO %FT01 ; just notify, skip code to move backdrop
CMP R14,#-1 ; is backdrop to be moved to front?
LDR R0,[R1,#u_wflags] ; get flags for backdrop window
BICEQ R0,R0,#wf_backwindow ; if to front, clear background stack bit
ORRNE R0,R0,#wf_backwindow ; if to back, set background stack bit
STR R0,[R1,#u_wflags] ; write flags for backdrop window back
STR R14,[R1,#u_bhandle] ; write handle to open behind back
LDR R2,taskidentifier ; magic word "TASK"
MOV R3,#-1 ; -1 =>
MOV R4,#1 ; bit 0 set =>
SWI XWimp_OpenWindow ; open backdrop window in new position
01 SUB R1,R1,#128 ; reset to start of wimp data block
MOV R2,#&18 ; message size
RSB R3,R14,#0 ;
LDR R4,[R1,#ms_myref] ;
STR R2,[R1,#ms_size] ;
STR R3,[R1,#ms_data] ;
STR R4,[R1,#ms_yourref] ;
MOV R0,#User_Message ; =17
LDR R2,[R1,#ms_taskhandle] ;
SWI XWimp_SendMessage ;
Pull "PC"
FilerSelection ROUT FilerSelection ROUT
ADD r14,r1,#ms_data ADD r14,r1,#ms_data
...@@ -934,10 +995,10 @@ got_task_name ...@@ -934,10 +995,10 @@ got_task_name
LDR r0, backdrop_handle LDR r0, backdrop_handle
[ iconise_to_iconbar [ iconise_to_iconbar
LDR lr, Pinboard_options LDR lr, Pinboard_options
TST lr, #PinboardOption_IconiseToIconBar TST lr, #PinboardOption_IconiseToIconBar
SUBNE r6, r6, #16 SUBNE r6, r6, #16
MOVNE r4, #-16 MOVNE r4, #-16
] ]
STMIA r1!, {r0,r3,r4,r5,r6} STMIA r1!, {r0,r3,r4,r5,r6}
...@@ -1045,18 +1106,18 @@ got_task_name ...@@ -1045,18 +1106,18 @@ got_task_name
STR r0, [r11, #w_icon_id] ; store window handle STR r0, [r11, #w_icon_id] ; store window handle
STRVC r8, [r11,#w_icon_handle] ; store icon handle STRVC r8, [r11,#w_icon_handle] ; store icon handle
; Reset IconizeAtFlags ; Reset IconizeAtFlags
MOV r0, #Default_IconizeAtFlags MOV r0, #Default_IconizeAtFlags
STR r0, IconizeAtFlags STR r0, IconizeAtFlags
; (r11=Pointer) Link to list. ; (r11=Pointer) Link to list.
LDR r0,iconized_ptr LDR r0,iconized_ptr
STR r0,[r11,#w_next_ptr] STR r0,[r11,#w_next_ptr]
CMP r0,#0 ; If next exsists link to it. CMP r0,#0 ; If next exsists link to it.
STRNE r11,[r0,#w_prev_ptr] STRNE r11,[r0,#w_prev_ptr]
STR r11,iconized_ptr ; First on the list. STR r11,iconized_ptr ; First on the list.
MOV r0,#0 MOV r0,#0
STR r0,[r11,#w_prev_ptr] ; No previous. STR r0,[r11,#w_prev_ptr] ; No previous.
; Install icon (Zoom ?) ; Install icon (Zoom ?)
[ drag_on_iconise [ drag_on_iconise
...@@ -1066,10 +1127,10 @@ got_task_name ...@@ -1066,10 +1127,10 @@ got_task_name
LDMVCIA r1, {r10,r11} ; Get current pointer position. LDMVCIA r1, {r10,r11} ; Get current pointer position.
BVC Iconized_Drag ; Start drag. BVC Iconized_Drag ; Start drag.
] ]
LDR r0, Window_Icons LDR r0, Window_Icons
ADD r0, r0, #1 ADD r0, r0, #1
STR r0, Window_Icons STR r0, Window_Icons
Pull "PC" Pull "PC"
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -1084,12 +1145,12 @@ Int_close_window ; fake close window ( r5=handle ) ...@@ -1084,12 +1145,12 @@ Int_close_window ; fake close window ( r5=handle )
; close_window ; close_window
close_window close_window
LDR R0, [r1,#ms_myref] LDR R0, [r1,#ms_myref]
STR R0, [r1,#ms_yourref] STR R0, [r1,#ms_yourref]
MOV R0, #19 ; Ack the message. MOV R0, #19 ; Ack the message.
LDR R2, [r1,#ms_taskhandle] LDR R2, [r1,#ms_taskhandle]
SWI XWimp_SendMessage SWI XWimp_SendMessage
Pull "PC",VS Pull "PC",VS
LDR r5,[r1,#ms_data] LDR r5,[r1,#ms_data]
......
...@@ -133,7 +133,7 @@ AddTinyDir_Code ...@@ -133,7 +133,7 @@ AddTinyDir_Code
01 01
Debug td,"AddTinyDirs, with path." Debug td,"AddTinyDirs, with path."
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
LDR r1,[r2] ; Pointer to path LDR r1,[r2] ; Pointer to path
ADR r2,dataarea ADR r2,dataarea
MOV r3,#0 MOV r3,#0
...@@ -325,7 +325,7 @@ RemoveTinyDir_Code ROUT ...@@ -325,7 +325,7 @@ RemoveTinyDir_Code ROUT
Debug td,"RemoveTinyDir with path." Debug td,"RemoveTinyDir with path."
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
LDR r1,[r2] ; Pointer to path LDR r1,[r2] ; Pointer to path
ADR r2,dataarea ADR r2,dataarea
MOV r3,#0 MOV r3,#0
...@@ -473,7 +473,7 @@ Init ...@@ -473,7 +473,7 @@ Init
LDR r2, [r12] ; Have we already got a workspace ? LDR r2, [r12] ; Have we already got a workspace ?
CMP r2, #0 ; clears V CMP r2, #0 ; clears V
MOVEQ r0, #6 MOVEQ r0, #ModHandReason_Claim
LDREQ r3, =max_running_work LDREQ r3, =max_running_work
SWIEQ XOS_Module ; Claim workspace SWIEQ XOS_Module ; Claim workspace
BVS %FT99 BVS %FT99
...@@ -526,68 +526,6 @@ PathDefault DCB RESPATH ...@@ -526,68 +526,6 @@ PathDefault DCB RESPATH
DCB 0 DCB 0
ALIGN ALIGN
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; Claim EventV so that we can watch for the Escape key being pressed
;; (at which point we stop any drag which we're currently doing).
;;
;claim_eventv
; Push "R1-R2, LR"
; MOV R0, #EventV
; ADR R1, eventv_handler
; MOV R2, R12
; SWI XOS_Claim
; STRVC PC, EventV_Claimed
; Pull "R1-R2, PC"
;
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; Remove our EventV handler.
;;
;release_eventv
; LDR R0, EventV_Claimed
; TEQ R0, #0
; MOVEQ PC, LR
; Push "R1-R2, LR"
; MOV R0, #EventV
; ADR R1, eventv_handler
; MOV R2, R12
; SWI XOS_Claim
; ADR R0, callback_handler
; MOV R1, R12
; SWI XOS_RemoveCallBack
; SUBS R0, R0, R0 ; R0=0, V is clear
; STR R0, EventV_Claimed
; Pull "R1-R2, PC"
;
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; Watch for Escape key going down. If we're currently doing a drag, stop it.
;eventv_handler
; TEQ R0, #11 ; only care about key transition events...
; TEQEQ R2, #0 ; ...on the Escape key...
; TEQEQ R1, #0 ; ...being pressed (not released)
; MOVNE PC, LR ; exit if any of the above conditions aren't met
; Push "R0-R1, LR"
; ; If there's a drag in progress, stop it
; LDR R0, DragType
; TEQ R0, #DragType_NoDrag
; Pull "R0-R1, PC", EQ
; ADR R0, callback_handler
; MOV R1, R12
; SWI XOS_AddCallBack ; use a callback in case DragASprite_Stop isn't safe here
; Pull "R0-R1, LR"
; ; Claim the event (so nobody else acts upon it)
; Pull "PC"
;
;; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;; Abort the current drag operation (if any)
;callback_handler
; Push "R0, LR"
; MOV R0, #DragType_NoDrag
; STR R0, DragType
; SWI XDragASprite_Stop
; CLRV
; ; Don't return any errors
; Pull "R0, PC"
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Table of service calls we want ; Table of service calls we want
...@@ -867,7 +805,7 @@ Pin_Code ROUT ...@@ -867,7 +805,7 @@ Pin_Code ROUT
ORR r7,r7,r0, LSL #24 ORR r7,r7,r0, LSL #24
Debug pi,"Y = ",r7 Debug pi,"Y = ",r7
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
LDR r1,[r2] ; Pointer to path LDR r1,[r2] ; Pointer to path
ADR r2,dataarea ADR r2,dataarea
MOV r3,#0 MOV r3,#0
...@@ -994,7 +932,7 @@ BackDrop_Code ...@@ -994,7 +932,7 @@ BackDrop_Code
ORR r0,r0,#PollWordReason_Recache ORR r0,r0,#PollWordReason_Recache
STR r0,poll_word STR r0,poll_word
MOV r0,#37 ; Canonicalise path MOV r0,#FSControl_CanonicalisePath
LDR r1,[r2] ; Pointer to path LDR r1,[r2] ; Pointer to path
CMP r1,#0 ; If no path given then CMP r1,#0 ; If no path given then
Pull "PC",LE ; go and recache the current backdrop Pull "PC",LE ; go and recache the current backdrop
...@@ -1010,14 +948,14 @@ BackDrop_Code ...@@ -1010,14 +948,14 @@ BackDrop_Code
; Now check that the file exists and is a sprite file. ; Now check that the file exists and is a sprite file.
MOV r0,#23 ; Read catalogue info with type / no path MOV r0,#OSFile_ReadWithTypeNoPath
ADR r1,dataarea ADR r1,dataarea
SWI XOS_File SWI XOS_File
Pull "PC",VS Pull "PC",VS
CMP r0,#1 CMP r0,#1
MOVNE r2,r0 MOVNE r2,r0
MOVNE r0,#19 ; Generate error. MOVNE r0,#OSFile_MakeError
SWINE XOS_File SWINE XOS_File
Pull "PC",VS Pull "PC",VS
......
...@@ -326,7 +326,7 @@ SelectDoubleClick ...@@ -326,7 +326,7 @@ SelectDoubleClick
BNE IconizedReopen BNE IconizedReopen
01 01
ADR r0,FilerRun_command ADRL r0,FilerRunCom
ADR r1,dataarea ADR r1,dataarea
BL Copy_r0r1 BL Copy_r0r1
ADD r0,r2,#ic_path ADD r0,r2,#ic_path
...@@ -359,10 +359,6 @@ SelectDoubleClick ...@@ -359,10 +359,6 @@ SelectDoubleClick
Pull "PC" Pull "PC"
FilerRun_command DCB "Filer_Run ",0
ALIGN
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Claim input focus (make a note of who had it before us). ; Claim input focus (make a note of who had it before us).
; Fail silently. ; Fail silently.
...@@ -425,17 +421,9 @@ Select_Drag ...@@ -425,17 +421,9 @@ Select_Drag
01 01
[ {TRUE} [ {TRUE}
MOV r0,#4
MOV r1,#5
MOV r2,#-1
Push "r0-r2"
SUB sp,sp,#8
ADD r0,sp,#8
MOV r1,sp
SWI XOS_ReadVduVariables
Pull "r2-r3"
ADD sp,sp,#12
MOV r0,#1 MOV r0,#1
LDR r2,XEig
LDR r3,YEig
MOV r2,r0,LSL r2 ; pixel width MOV r2,r0,LSL r2 ; pixel width
MOV r3,r0,LSL r3 ; pixel height MOV r3,r0,LSL r3 ; pixel height
ADR r1,dataarea ADR r1,dataarea
...@@ -446,7 +434,6 @@ Select_Drag ...@@ -446,7 +434,6 @@ Select_Drag
STMIA r1!,{r0,r14} STMIA r1!,{r0,r14}
SUB r1,r1,#8*3 SUB r1,r1,#8*3
| |
; MOV r0,r1
ADR r1,dataarea ADR r1,dataarea
LDR r14,[r1] LDR r14,[r1]
STR r14,[r1,#8] ; Initial x0 STR r14,[r1,#8] ; Initial x0
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
; See the License for the specific language governing permissions and ; See the License for the specific language governing permissions and
; limitations under the License. ; limitations under the License.
; ;
; > s.Front ; > s.Pinboard
;;----------------------------------------------------------------------------- ;;-----------------------------------------------------------------------------
;; Wimp utility: Pinboard ;; Wimp utility: Pinboard
...@@ -44,6 +44,8 @@ Module_BaseAddr ...@@ -44,6 +44,8 @@ Module_BaseAddr
GET hdr:FilerAct GET hdr:FilerAct
GET hdr:Machine.<Machine> GET hdr:Machine.<Machine>
GET hdr:CMOS GET hdr:CMOS
GET hdr:HighFSI
GET hdr:FileTypes
GET hdr:MsgTrans GET hdr:MsgTrans
GET hdr:MsgMenus GET hdr:MsgMenus
GET hdr:ResourceFS GET hdr:ResourceFS
...@@ -55,12 +57,8 @@ Module_BaseAddr ...@@ -55,12 +57,8 @@ Module_BaseAddr
GET hdr:Switcher GET hdr:Switcher
GET Hdr:Font GET Hdr:Font
GET Hdr:SprExtend GET Hdr:SprExtend
GET VersionASM GET VersionASM
GBLA Version
Version SETA Module_Version
GBLS RESPATH GBLS RESPATH
RESPATH SETS "Resources:$.Resources.Pinboard." RESPATH SETS "Resources:$.Resources.Pinboard."
...@@ -107,7 +105,7 @@ ursulawimp SETL true ...@@ -107,7 +105,7 @@ ursulawimp SETL true
GBLL noiconbar ; If there's no icon bar, then stretch pinboard to bottom of screen. GBLL noiconbar ; If there's no icon bar, then stretch pinboard to bottom of screen.
noiconbar SETL false noiconbar SETL false
GBLL technicolour_text ; The text can for the icon can be set with backdrop -textcolour GBLL technicolour_text ; The text for the icon can be set with backdrop -textcolour
technicolour_text SETL true technicolour_text SETL true
GBLL hostvdu GBLL hostvdu
...@@ -217,7 +215,6 @@ workspace RN R12 ...@@ -217,7 +215,6 @@ workspace RN R12
^ 0,workspace ^ 0,workspace
wsorigin # 0 wsorigin # 0
mytaskhandle # 4 ; put here so we know where it is mytaskhandle # 4 ; put here so we know where it is
;info_dbox_handle # 4 ; handle for ingo dbox.
saveas_handle # 4 ; handle of saveas dbox saveas_handle # 4 ; handle of saveas dbox
bounding_box # 4*4 ; Screen x0 y0 x1 y1 bounding_box # 4*4 ; Screen x0 y0 x1 y1
backdrop_handle # 4 ; Backdrop window's handle backdrop_handle # 4 ; Backdrop window's handle
......
...@@ -42,20 +42,18 @@ IntSave_KeyPressed ...@@ -42,20 +42,18 @@ IntSave_KeyPressed
CMP r14,#32 CMP r14,#32
BGE %BT01 BGE %BT01
ADD sp,sp,#4
ADR r0,ErrorBlock_PinboardNoDot ADR r0,ErrorBlock_PinboardNoDot
BL msgtrans_errorlookup BL msgtrans_errorlookup
Pull "r0,PC" Pull "PC"
02 02
Debug sa,"Dot is at ",r14 Debug sa,"Dot is at ",r14
;MOV r0,#&8F
LDR r1,save_filename_address LDR r1,save_filename_address
;DebugS sa,"Filename is ",r1
;SWI XOS_Find
;Pull "PC",VS
BL DoSave BL DoSave
Pull "r0,PC",VS ADDVS sp,sp,#4
Pull "PC",VS
Pull "r0" Pull "r0"
TEQ r0, #1 ; was it an adjust click? TEQ r0, #1 ; was it an adjust click?
...@@ -97,16 +95,12 @@ save_drag ROUT ...@@ -97,16 +95,12 @@ save_drag ROUT
ADD R14,R1,#8 ADD R14,R1,#8
LDMIA R14,{R6-R9} ; x0 - y1 of icon LDMIA R14,{R6-R9} ; x0 - y1 of icon
[ Version >= 037
ADRL R1,(dataarea+40) ADRL R1,(dataarea+40)
STR R2,[R1] ; R2 = window handle (store it baby!) STR R2,[R1] ; R2 = window handle (store it baby!)
]
SWI XWimp_GetWindowState SWI XWimp_GetWindowState
Pull "PC",VS Pull "PC",VS
[ Version <= 036
ADR r1,dataarea
]
ADD r14,r1,#4 ADD r14,r1,#4
LDMIA r14,{r0-r3} LDMIA r14,{r0-r3}
ADD r6,r6,r0 ; Scrren coords. ADD r6,r6,r0 ; Scrren coords.
...@@ -114,8 +108,6 @@ save_drag ROUT ...@@ -114,8 +108,6 @@ save_drag ROUT
ADD r7,r7,r3 ADD r7,r7,r3
ADD r9,r9,r3 ADD r9,r9,r3
[ Version >= 037
Push "R0-R2" Push "R0-R2"
MOV R0,#ReadCMOS MOV R0,#ReadCMOS
MOV R1,#FileSwitchCMOS MOV R1,#FileSwitchCMOS
...@@ -135,8 +127,6 @@ save_drag ROUT ...@@ -135,8 +127,6 @@ save_drag ROUT
ADD SP,SP,#4*4 ; balance out the stack ADD SP,SP,#4*4 ; balance out the stack
B %FT20 ; then exit 'cos finished the drag start B %FT20 ; then exit 'cos finished the drag start
]
10 LDR r0,saveas_handle 10 LDR r0,saveas_handle
ADR r1,dataarea ADR r1,dataarea
MOV r2,#5 MOV r2,#5
...@@ -179,9 +169,7 @@ save_drag ROUT ...@@ -179,9 +169,7 @@ save_drag ROUT
Save_DragEnd ROUT Save_DragEnd ROUT
[ Version >= 037 ; kill that blessed thingi!
SWI XDragASprite_Stop SWI XDragASprite_Stop
]
ADR r1,dataarea ADR r1,dataarea
SWI XWimp_GetPointerInfo SWI XWimp_GetPointerInfo
...@@ -197,7 +185,7 @@ Save_DragEnd ROUT ...@@ -197,7 +185,7 @@ Save_DragEnd ROUT
STR r0,[r1,#ms_size] STR r0,[r1,#ms_size]
MOV r6,#0 MOV r6,#0
STR r6,[r1,#ms_yourref] STR r6,[r1,#ms_yourref]
LDR r7,=&FEB LDR r7,=FileType_Obey
ADD r14,r1,#ms_data ADD r14,r1,#ms_data
STMIA r14!,{r2,r3,r4,r5,r6,r7} ; Window, icon , x , y STMIA r14!,{r2,r3,r4,r5,r6,r7} ; Window, icon , x , y
...@@ -226,21 +214,6 @@ Save_DragEnd ROUT ...@@ -226,21 +214,6 @@ Save_DragEnd ROUT
Pull "PC" Pull "PC"
;CloseFile ROUT
;; In: [sp] = file handle
; Push "r0,r1,lr"
; MOV r0,#0
; LDR r1,[sp,#12]
; BVS %FT10
;
; SWI XOS_Find ; SMC: no error passed in so return one from OS_Find
; STRVS r0,[sp]
; Pull "r0,r1,pc"
;10
; SWI XOS_Find ; SMC: error passed in so ignore error from OS_Find
; Pull "r0,r1,pc",,^
Save_DataSaveAck ROUT Save_DataSaveAck ROUT
DebugS sa,"Filename is ",r14 DebugS sa,"Filename is ",r14
...@@ -275,11 +248,6 @@ Save_DataSaveAck ROUT ...@@ -275,11 +248,6 @@ Save_DataSaveAck ROUT
LDRNE r1,save_filename_address LDRNE r1,save_filename_address
BLNE Copy_r0r1 BLNE Copy_r0r1
;MOV r0,#18 ; SMC: set filetype even if unsafe
;MOV r1,r2 ; SMC: r2->file name from above
;LDR r2,=&FEB
;SWI XOS_File
MOVVC r1,#-1 MOVVC r1,#-1
SWIVC XWimp_CreateMenu SWIVC XWimp_CreateMenu
...@@ -297,6 +265,7 @@ DesktopSave ...@@ -297,6 +265,7 @@ DesktopSave
; Save a Pinboard Obey file ; Save a Pinboard Obey file
; ;
; In: r1 -> filename ; In: r1 -> filename
; Out: r0 corrupt
DoSave ROUT DoSave ROUT
Entry "r1-r9" Entry "r1-r9"
...@@ -304,7 +273,7 @@ DoSave ROUT ...@@ -304,7 +273,7 @@ DoSave ROUT
MOV r8, r1 ; r8 -> filename MOV r8, r1 ; r8 -> filename
; Open file to write ; Open file to write
MOV r0, #&8F MOV r0, #open_write :OR: open_pathbits :OR: open_mustopen :OR: open_nodir
MOV r1, r8 MOV r1, r8
SWI XOS_Find SWI XOS_Find
EXIT VS EXIT VS
...@@ -325,9 +294,9 @@ DoSave ROUT ...@@ -325,9 +294,9 @@ DoSave ROUT
MOV r1, r9 MOV r1, r9
SWI XOS_Find SWI XOS_Find
MOV r0, #18 MOV r0, #OSFile_SetType
MOV r1, r8 MOV r1, r8
LDR r2,=&FEB LDR r2,=FileType_Obey
SWI XOS_File SWI XOS_File
EXIT EXIT
......