Commit 165c3cc4 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

32-bit compatible. Tagged as Display-0_34.

parent 04ef243f
No preview for this file type
......@@ -50,6 +50,7 @@
; 28-Oct-94 0.31 SMC Added message tokenisation support.
; 21-Dec-94 0.32 SMC Changed to correct format for version string.
; 11-Jan-95 0.33 SMC Improved wording of invalid mode error.
; 12-May-00 0.34 KJB 32-bit compatible.
;
GBLA Version
......@@ -58,8 +59,8 @@
; REMEMBER TO UPDATE VERSION IN MESSAGES FILE
Version SETA 033 ; 000
VString SETS "0.33" ; "0.00"
Date SETS "11 Jan 1995" ; "Development"
Version SETA 034 ; 000
VString SETS "0.34" ; "0.00"
Date SETS "12 May 2000" ; "Development"
END
......@@ -608,13 +608,13 @@ Menu_ClassToResolution
10
SUBS r0, r0, #1
MOVCC r0, #&FF
EXITS CC
EXIT CC
LDR r2, [r1, r0, LSL #2]
TEQ r2, lr
BNE %BT10
EXITS
EXIT
;---------------------------------------------------------------------------
......@@ -635,7 +635,7 @@ Menu_ResolutionToClass
SUB r4, lr, r4
MOV r4, r4, LSR #2
EXITS
EXIT
END
......@@ -205,12 +205,22 @@ Mode_TestPalette
freepalettemem
Pull r2 ; Get back base of palette block.
[ No32bitCode
Push "r0,lr"
|
Push "r0,r4,lr"
mrs ,r4, CPSR
]
ADR lr, user_data
TEQ r2, lr ; If it's not the user area then free it.
MOVNE r0, #ModHandReason_Free
SWINE XOS_Module
Pull "r0,pc",,^ ; Preserve error if there is one.
[ No32bitCode
Pull "r0,pc",,^
|
msr ,CPSR_f, r4 ; Preserve error if there is one.
Pull "r0,r4,pc"
]
;---------------------------------------------------------------------------
......
......@@ -33,6 +33,9 @@
|
DCD 0
]
[ :LNOT: No32bitCode
DCD Mod_Flags - Module_BaseAddr
]
;---------------------------------------------------------------------------
Mod_Helptable
......@@ -60,6 +63,11 @@ Mod_Helpstr DCB "DisplayManager",9
Mod_Version DCB "$VString ($Date)",0
ALIGN
[ :LNOT: No32bitCode
Mod_Flags
DCD 1 ; 32-bit compatible
]
;---------------------------------------------------------------------------
; Code to handle *Desktop_DisplayManager command.
......@@ -142,7 +150,7 @@ Mod_Service
LDR r12, [r12] ; Make sure we have workspace for the following services.
CMP r12, #0
MOVLES pc, lr
MOVLE pc, lr
TEQ r1, #Service_ModeChange
BEQ svc_modechange
......@@ -160,7 +168,7 @@ Mod_Service
]
TEQ r1, #Service_MessageFileClosed
MOVNES pc, lr
MOVNE pc, lr
svc_messagefileclosed
......@@ -168,7 +176,7 @@ svc_messagefileclosed
Debug mod,"svc_messagefileclosed",r0
LDR lr, task_handle ; Make sure we are a task.
TEQ lr, #0
EXITS EQ
EXIT EQ
[ {FALSE}
; We don't actually have to re-open the message file using
; MessageTrans_OpenFile as it says in the PRM. MessageTrans
......@@ -200,7 +208,7 @@ svc_reset
STRGT lr, task_handle
BLGT Mod_ShutDown
EXITS
EXIT
svc_startwimp
......@@ -208,7 +216,7 @@ svc_startwimp
LDR r2, [r12]
TEQ r2, #0
EXITS NE ; Don't claim service unless = 0.
EXIT NE ; Don't claim service unless = 0.
Debug mod,"Service_StartWimp"
......@@ -229,7 +237,7 @@ svc_startwimp
ADRVC r0, displaymanager_command
MOVVC r1, #0 ; Claim service.
EXITS
EXIT
svc_startedwimp
......@@ -242,7 +250,7 @@ svc_startedwimp
MOVEQ lr, #0 ; clear flag so user can try again.
STREQ lr, [r12]
EXITS
EXIT
svc_wimppalette
......@@ -318,12 +326,12 @@ svc_modefilechanged
Debug mod,"svc_modefilechanged"
LDR lr, task_handle ; Make sure we are a task.
TEQ lr, #0
EXITS EQ
EXIT EQ
BL Menu_Init ; Build menus.
LDR lr, pollword
ORR lr, lr, #pf_modeinit :OR: pf_refreshicons :OR: pf_settitle
STR lr, pollword
EXITS
EXIT
[ standalone
......@@ -332,7 +340,7 @@ svc_resourcefsstarting
ADRL r0, resourcefs_files
MOV lr, pc
MOV pc, r2
EXITS
EXIT
]
......@@ -350,7 +358,8 @@ Mod_Die
SWI XResourceFS_DeregisterFiles
]
EXITS
CLRV
EXIT
;---------------------------------------------------------------------------
......
......@@ -46,15 +46,17 @@ click_menu
EXIT NE ; nothing to do.
TEQ r6, #ic_display_colbutton
BLEQ set_icon_xy
ADREQ r1, m_coloursmenu
BEQ show_menu
TEQ r6, #ic_display_resbutton
BLEQ set_icon_xy
LDREQ r1, m_resolutionmenu
BEQ show_menu
BNE %FT05
BL set_icon_xy
ADR r1, m_coloursmenu
B show_menu
05 TEQ r6, #ic_display_resbutton
BNE %FT08
BL set_icon_xy
LDR r1, m_resolutionmenu
B show_menu
08
[ SelectFrameRate
TEQ r6, #ic_display_ratebutton
EXIT NE
......@@ -98,16 +100,18 @@ click_select
TEQ r6, #ic_display_colbutton
TSTEQ r4, #button_right ; Only show menu for select.
BLEQ set_icon_xy
ADREQ r1, m_coloursmenu
BEQ show_menu
BNE %FT12
BL set_icon_xy
ADR r1, m_coloursmenu
B show_menu
TEQ r6, #ic_display_resbutton
12 TEQ r6, #ic_display_resbutton
TSTEQ r4, #button_right ; Only show menu for select.
BLEQ set_icon_xy
LDREQ r1, m_resolutionmenu
BEQ show_menu
BNE %FT13
BL set_icon_xy
LDR r1, m_resolutionmenu
B show_menu
13
[ SelectFrameRate
TEQ r6, #ic_display_ratebutton
TSTEQ r4, #button_right ; Only show menu for select.
......@@ -133,19 +137,20 @@ click_select
TST r4, #button_right
ADREQ r1, user_data ; If select used then close dialogue.
STREQ r5, [r1]
BLEQ Window_Close ; Preserves flags.
BLEQ Window_Close
EXIT
18
TEQ r6, #ic_display_cancel ; If not Cancel then don't care what it was.
EXIT NE
TST r4, #button_right
ADREQ r1, user_data ; Select used on Cancel so close dialogue.
STREQ r5, [r1]
BLEQ Window_Close ; Preserves flags.
EXIT EQ
BNE %FT19
ADR r1, user_data ; Select used on Cancel so close dialogue.
STR r5, [r1]
BL Window_Close
EXIT
BL Mode_Init ; Adjust used on Cancel so restore icons.
19 BL Mode_Init ; Adjust used on Cancel so restore icons.
BLVC Icon_Refresh
EXIT
......@@ -175,7 +180,6 @@ click_select
;
; Out: r2 = x coord of icon top right
; r3 = y coord of icon top right
; flags preserved
;
; Return x,y coords for pop up menu.
;
......@@ -185,7 +189,7 @@ set_icon_xy
ADR r1, user_data
STMIA r1, {r5,r6}
SWI XWimp_GetIconState
EXITS VS
BVS %FT95
ADD r1, r1, #16
LDMIA r1, {r4,r5}
......@@ -197,8 +201,9 @@ set_icon_xy
LDRVC r3, [r1, #16]
ADDVC r2, r2, r4
ADDVC r3, r3, r5
EXITS
95
CLRV
EXIT
END
......@@ -230,14 +230,13 @@ Window_OpenBehind
; Window_Close
;
; In: r1 -> close window request block
; Out: preserves flags
;
; The Wimp has asked us to close a window.
;
Window_Close
ENTRY "r0"
SWI XWimp_CloseWindow
EXITS
EXIT
;---------------------------------------------------------------------------
......@@ -280,7 +279,8 @@ Window_SetTitle
SUBVC r2, r4, #44
SWIVC XWimp_ForceRedraw
EXITS
CLRV
EXIT
END
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