Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
V
Video
Render
Hourglass
Commits
fbe86a9c
Commit
fbe86a9c
authored
Sep 01, 1998
by
Richard Leggett
Browse files
Added new style LEDs, plus changed text.
parent
10b51b54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
43 deletions
+123
-43
Hourmake/obj/HourSpr,ff9
Hourmake/obj/HourSpr,ff9
+0
-0
Time+Date
Time+Date
+4
-4
UrsulaLog
UrsulaLog
+8
-0
s/Module
s/Module
+111
-39
No files found.
Hourmake/obj/HourSpr,ff9
View file @
fbe86a9c
No preview for this file type
Time+Date
View file @
fbe86a9c
...
...
@@ -5,10 +5,10 @@
GBLS CurrentIteration
GBLL ReleaseVersion
CurrentDate SETS "
03 Jun
1998"
CurrentTime SETS "1
5:21
:00"
CurrentVersion SETS "1
3
"
CurrentIteration SETS "000
4
"
CurrentDate SETS "
28 Aug
1998"
CurrentTime SETS "1
0:15
:00"
CurrentVersion SETS "1
4
"
CurrentIteration SETS "000
1
"
ReleaseVersion SETL True
END
UrsulaLog
View file @
fbe86a9c
...
...
@@ -59,3 +59,11 @@ Wed 03-Jun-98
- Added MMoir's first attempt at some new sprites, plus my own
character defs.
Checked in. Tagged as rleggett_Hourglass-0_13
---------------------------------------------------------------------------
Version: 0.14 (Richard Leggett)
Fri 28-Aug-98
- Added new style LED code.
s/Module
View file @
fbe86a9c
...
...
@@ -21,14 +21,13 @@
GET
Hdr:Services
GET
Hdr:Hourglass
GET
Hdr:MsgTrans
; GET Hdr:EcoMacros
GET
Hdr:FSNumbers
GET
Hdr:NewErrors
GET
Hdr:Proc
GET
Time+Date
GET
Hdr:NdrDebug
GBLL
hostvdu
hostvdu
SETL
{FALSE}
GBLL
debug_flush
...
...
@@ -41,27 +40,35 @@ debugswientry SETL {FALSE}
debugdepth
SETL
{FALSE}
GBLL
debugcurrent
debugcurrent
SETL
{FALSE}
GBLL
ursula
ursula
SETL
{TRUE}
GBLL
threecolours
; set to TRUE for three colour hourglass
threecolours
SETL
{TRUE}
; or to FALSE for old two colour hourglass
GBLL
ursulaLEDs
; set to TRUE for Ursula OS left/right LEDs
ursulaLEDs
SETL
{TRUE}
; or to FALSE for <3.70 style top and bottom
bignum
*
&3FFFFFFF
; A large number to put into PercentageDepth
; The constants defining the hourglass shape and position
; A large number to put into PercentageDepth
bignum
*
&3FFFFFFF
; The constants defining the hourglass shape and position
HgX
*
4
HgY
*
2
HgSize
*
16
ActiveX
*
HgX
+
(
HgSize
:SHR:
1
)
ActiveY
*
HgY
+
(
HgSize
:SHR:
1
)
; The constants defining the Hourglass time behaviour
; LED positioning
LeftLedX
*
0
LeftLedY
*
8
RightLedX
*
4
RightLedY
*
8
LedHeight
*
6
; The constants defining the Hourglass time behaviour
UpdateDelay
*
15
StartupDelay
*
33
; These define the things round the hourglass
; nb. keep on byte boundries !
PixelsPerByte
*
4
BytesPerLine
*
6
HeightInPixels
*
32
...
...
@@ -81,41 +88,39 @@ WritePalette * 12
; Define number of frames and palette data
HourglassFrames
*
8
DefaultColour1
*
&fff6d5
DefaultColour2
*
&0
DefaultColour3
*
&ffa100
MySWIChunkBase
*
Module_SWISystemBase
+
HourglassSWI
*
Module_SWIChunkSize
ASSERT
MySWIChunkBase
=
Hourglass_On
; Workspace
^
0
,
wp
HourglassData
#
DataSize
; My Hourglass data is in here
HourglassDataEnd
#
0
ReturnColours
#
0
; Colours to return to when switched fully off
ReturnColour1
#
4
[
urs
ula
[
threecolo
urs
ReturnColour2
#
4
]
ReturnColour3
#
4
NextHColours
#
0
; Colours to reassert at next frame update
NextHColour1
#
4
[
urs
ula
[
threecolo
urs
NextHColour2
#
4
]
NextHColour3
#
4
LastHColours
#
0
; Colours set at last frame update
LastHColour1
#
4
[
urs
ula
[
threecolo
urs
LastHColour2
#
4
]
LastHColour3
#
4
CurrentColours
#
0
; Colours actually in use
CurrentColour1
#
4
[
urs
ula
[
threecolo
urs
CurrentColour2
#
4
]
CurrentColour3
#
4
...
...
@@ -147,11 +152,13 @@ PointerDirty # 1 ; 0 => shape set up etc
; 1 => shape not set up etc
UpdateSemaphore
#
1
; 0 => not in update code
; non0 => in update code
AlignSpace
RAMSpaceRequired
*
:INDEX:
@
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ModuleStart
DCD
0
; StartCode
DCD
InitialisationCode
-
ModuleStart
...
...
@@ -257,7 +264,7 @@ OSWord15BlockData
DefaultColours
DCD
DefaultColour1
[
urs
ula
[
threecolo
urs
DCD
DefaultColour2
]
DCD
DefaultColour3
...
...
@@ -349,6 +356,7 @@ UnknownSWIError
MakeErrorBlock
ModuleBadSWI
]
; OldOs
; *****************************************************************************
;
; HourglassOn - Turn on after default startup delay
...
...
@@ -366,6 +374,7 @@ HourglassOn ENTRY "r0"
STR
r0
,
[
sp
]
EXIT
; *****************************************************************************
;
; HourglassStart - Turn on after specified delay
...
...
@@ -402,6 +411,7 @@ HourglassStart ENTRY "r0-r2,r11"
STR
r0
,
[
sp
]
EXIT
; *****************************************************************************
;
; HourglassOff - If at outer level, turn off hourglass, else dec depth
...
...
@@ -437,6 +447,7 @@ HourglassOff ENTRY "r0-r3, r10"
BLEQ
RestorePointer
; yes - undo it
EXITS
; ignore errors
; *****************************************************************************
;
; HourglassSmash - Unconditionally turn off hourglass
...
...
@@ -464,6 +475,7 @@ HourglassSmash ENTRY "r0"
STR
r0
,
[
sp
]
EXIT
; *****************************************************************************
;
; HourglassPercentage - Set percentage figures
...
...
@@ -489,6 +501,7 @@ HourglassPercentage ENTRY "r1"
EXITS
; *****************************************************************************
;
; HourglassLEDs - Set LED states (currently 2 of them)
...
...
@@ -509,6 +522,7 @@ HourglassLEDs ENTRY "r10, r11"
MOV
r0
,
r10
; return old value
EXITS
; *****************************************************************************
;
; HourglassColours - Set the colours used for the hourglass
...
...
@@ -533,6 +547,7 @@ HourglassColours ENTRY "r0, r1"
STRNE
r1
,
NextHColour3
; Put down the new value
EXITS
; Return with V clear
; *****************************************************************************
;
; MyTickRoutine - TickerV routine
...
...
@@ -572,6 +587,7 @@ ExitTickRoutine
STRB
r14
,
UpdateSemaphore
Pull
"pc"
; *****************************************************************************
;
; SetupPointer - Program initial shape of hourglass etc
...
...
@@ -590,7 +606,7 @@ SetupPointer ROUT
STRB
r0
,
NewPercentage
ADR
r0
,
HourglassData
[
debug
:LOR:
urs
ula
[
debug
:LOR:
threecolo
urs
ADRL
r1
,
HourglassShape
ADRL
r2
,
HourglassShapeEnd
|
...
...
@@ -615,6 +631,7 @@ SetupPointer ROUT
Pull
"pc"
; *****************************************************************************
;
; FillHourglass - Go to next state of hourglass
...
...
@@ -628,7 +645,7 @@ FillHourglass ROUT
LDRB
r0
,
HourglassState
ADD
r0
,
r0
,
#
1
; go to next state
[
urs
ula
[
threecolo
urs
TEQ
r0
,
#
HourglassFrames
|
TEQ
r0
,
#
6
; keep in range 0..5
...
...
@@ -636,7 +653,7 @@ FillHourglass ROUT
MOVEQ
r0
,
#
0
STRB
r0
,
HourglassState
[
debug
:LOR:
urs
ula
[
debug
:LOR:
threecolo
urs
ADRL
r1
,
DiffOffsetTable
|
ADR
r1
,
DiffOffsetTable
...
...
@@ -656,6 +673,7 @@ FillHourglass ROUT
BNE
%BT10
MOV
pc
,
lr
; *****************************************************************************
;
; SetupLEDs - Set up LED data in hourglass shape
...
...
@@ -670,12 +688,51 @@ FillHourglass ROUT
ASSERT
(
HgX
:MOD:
PixelsPerByte
)
=
0
SetupLEDs
ROUT
LDRB
r0
,
OldLEDs
LDRB
r1
,
NewLEDs
TEQ
r0
,
r1
MOVEQ
pc
,
r14
STRB
r1
,
OldLEDs
[
ursulaLEDs
ADR
r2
,
HourglassData
+
(
LeftLedY
*
BytesPerLine
)
+
LeftLedX
TST
r1
,
#
1
ADRNEL
r3
,
LeftLEDOn
ADREQL
r3
,
LeftLEDOff
MOV
r1
,
#
LedHeight
10
LDRB
r0
,
[
r3
]
STRB
r0
,
[
r2
]
LDRB
r0
,
[
r3
,
#
1
]
STRB
r0
,
[
r2
,
#
1
]
ADD
r2
,
r2
,
#
BytesPerLine
ADD
r3
,
r3
,
#
2
SUBS
r1
,
r1
,
#
1
BNE
%BT10
LDRB
r1
,
OldLEDs
ADR
r2
,
HourglassData
+
(
RightLedY
*
BytesPerLine
)
+
RightLedX
TST
r1
,
#
2
ADRNEL
r3
,
RightLEDOn
ADREQL
r3
,
RightLEDOff
MOV
r1
,
#
LedHeight
20
LDRB
r0
,
[
r3
]
STRB
r0
,
[
r2
]
LDRB
r0
,
[
r3
,
#
1
]
STRB
r0
,
[
r2
,
#
1
]
ADD
r2
,
r2
,
#
BytesPerLine
ADD
r3
,
r3
,
#
2
SUBS
r1
,
r1
,
#
1
BNE
%BT20
]
[
:LNOT:
ursulaLEDs
ADR
r2
,
HourglassData
+(
HgX
/
PixelsPerByte
)+((
HgY
-
1
)*
BytesPerLine
)
TST
r1
,
#
1
MOVNE
r3
,
#
&FF
...
...
@@ -693,9 +750,11 @@ SetupLEDs ROUT
STRB
r3
,
[
r2
,
#
1
]
STRB
r3
,
[
r2
,
#
2
]
STRB
r3
,
[
r2
,
#
3
]
]
MOV
pc
,
lr
; *****************************************************************************
;
; SetupPercentage - Set up percentage digits in hourglass shape
...
...
@@ -718,7 +777,7 @@ SetupPercentage ROUT
MOV
r1
,
#
10
DivRem
r0
,
r2
,
r1
,
r14
[
debug
:LOR:
urs
ula
[
debug
:LOR:
threecolo
urs
ADRL
r3
,
ChDefNumbers
|
ADR
r3
,
ChDefNumbers
...
...
@@ -739,7 +798,7 @@ SetupPercentage ROUT
Pull
"pc"
1
ADR
r0
,
HourglassData
+(
PercX
/
PixelsPerByte
)+(
PercY
*
BytesPerLine
)
[
debug
:LOR:
urs
ula
[
debug
:LOR:
threecolo
urs
ADRL
r1
,
ChDefSpace
|
ADR
r1
,
ChDefSpace
...
...
@@ -751,6 +810,7 @@ SetupPercentage ROUT
BL
SetupChar
Pull
"pc"
; *****************************************************************************
;
; SetupChar - Copy character definition into hourglass shape
...
...
@@ -772,7 +832,7 @@ SetupCharLoop
Pull
"r0-r2, pc"
[
urs
ula
[
threecolo
urs
; *****************************************************************************
;
; ProgramPointer - Call OS_Word to define pointer shape
...
...
@@ -860,7 +920,7 @@ SetColour ROUT
Pull
"r0-r1, pc"
[
urs
ula
[
threecolo
urs
; *****************************************************************************
;
; InitialisePointerInfo - sets up colour, number etc information
...
...
@@ -898,10 +958,8 @@ InitialisePointerInfo ENTRY "r0-r3"
STRB
r0
,
NewLEDs
EXIT
]
[
ursula
; *****************************************************************************
;
; RestorePointer - changes pointer number and colours back to the "off" values.
...
...
@@ -973,7 +1031,7 @@ ReadPointerColours ENTRY "r0-r3"
STRVC
r2
,
CurrentColour1
Debug
current
,
"Current colour 1 ="
,
r2
[
urs
ula
[
threecolo
urs
MOV
r0
,
#
2
MOV
r1
,
#
25
SWI
XOS_ReadPalette
...
...
@@ -1090,19 +1148,33 @@ ChDefSpace
DCD
0
,
0
,
0
,
0
,
0
ChDefNumbers
=
&
ff
,
&ff
,
&5
f
,
&
f
5
,
&
d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&d7
,
&5
f
,
&
f
5
,
&
ff
,
&ff
=
&
ff
,
&ff
,
&7f
,
&fd
,
&5
f
,
&
fd
,
&7f
,
&fd
,
&7f
,
&fd
,
&7f
,
&fd
,
&7f
,
&fd
,
&7f
,
&fd
,
&ff
,
&ff
=
&
ff
,
&ff
,
&5
f
,
&
f
5
,
&
d7
,
&d7
,
&ff
,
&d7
,
&7f
,
&
f
5
,
&5
f
,
&
ff
,
&d7
,
&ff
,
&5
7
,
&
d
5
,
&
ff
,
&ff
=
&
ff
,
&ff
,
&5
f
,
&
f
5
,
&5
7
,
&
d7
,
&ff
,
&d7
,
&ff
,
&
f
5
,
&
ff
,
&d7
,
&5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,
&a6
,
&66
,
&26
,
&9a
,
&a5
,
&68
,
&99
,
&68
,
&99
,
&98
,
&a6
,
&a8
,
&2a
; ***************************************************************************
; LED definitions
ALIGN
LeftLEDOn
DCB
&80
,
&82
,
&60
,
&09
,
&58
,
&25
,
&58
,
&25
,
&60
,
&09
,
&80
,
&82
LeftLEDOff
DCB
&00
,
&80
,
&00
,
&00
,
&00
,
&00
,
&00
,
&00
,
&00
,
&00
,
&00
,
&80
RightLEDOn
DCB
&09
,
&0a
,
&82
,
&25
,
&60
,
&95
,
&60
,
&95
,
&82
,
&25
,
&09
,
&0a
RightLEDOff
DCB
&09
,
&00
,
&02
,
&00
,
&00
,
&00
,
&00
,
&00
,
&02
,
&00
,
&09
,
&00
END
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment