Commit fbe86a9c authored by Richard Leggett's avatar Richard Leggett
Browse files

Added new style LEDs, plus changed text.

parent 10b51b54
No preview for this file type
......@@ -5,10 +5,10 @@
GBLS CurrentIteration
GBLL ReleaseVersion
CurrentDate SETS "03 Jun 1998"
CurrentTime SETS "15:21:00"
CurrentVersion SETS "13"
CurrentIteration SETS "0004"
CurrentDate SETS "28 Aug 1998"
CurrentTime SETS "10:15:00"
CurrentVersion SETS "14"
CurrentIteration SETS "0001"
ReleaseVersion SETL True
END
......@@ -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.
......@@ -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
[ ursula
[ threecolours
ReturnColour2 # 4
]
ReturnColour3 # 4
NextHColours # 0 ; Colours to reassert at next frame update
NextHColour1 # 4
[ ursula
[ threecolours
NextHColour2 # 4
]
NextHColour3 # 4
LastHColours # 0 ; Colours set at last frame update
LastHColour1 # 4
[ ursula
[ threecolours
LastHColour2 # 4
]
LastHColour3 # 4
CurrentColours # 0 ; Colours actually in use
CurrentColour1 # 4
[ ursula
[ threecolours
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
[ ursula
[ threecolours
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: ursula
[ debug :LOR: threecolours
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
[ ursula
[ threecolours
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: ursula
[ debug :LOR: threecolours
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: ursula
[ debug :LOR: threecolours
ADRL r3, ChDefNumbers
|
ADR r3, ChDefNumbers
......@@ -739,7 +798,7 @@ SetupPercentage ROUT
Pull "pc"
1
ADR r0, HourglassData+(PercX/PixelsPerByte)+(PercY * BytesPerLine)
[ debug :LOR: ursula
[ debug :LOR: threecolours
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"
[ ursula
[ threecolours
; *****************************************************************************
;
; ProgramPointer - Call OS_Word to define pointer shape
......@@ -860,7 +920,7 @@ SetColour ROUT
Pull "r0-r1, pc"
[ ursula
[ threecolours
; *****************************************************************************
;
; 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
[ ursula
[ threecolours
MOV r0, #2
MOV r1, #25
SWI XOS_ReadPalette
......@@ -1090,19 +1148,33 @@ ChDefSpace
DCD 0, 0, 0, 0, 0
ChDefNumbers
= &ff,&ff,&5f,&f5,&d7,&d7,&d7,&d7,&d7,&d7,&d7,&d7,&d7,&d7,&5f,&f5,&ff,&ff
= &ff,&ff,&7f,&fd,&5f,&fd,&7f,&fd,&7f,&fd,&7f,&fd,&7f,&fd,&7f,&fd,&ff,&ff
= &ff,&ff,&5f,&f5,&d7,&d7,&ff,&d7,&7f,&f5,&5f,&ff,&d7,&ff,&57,&d5,&ff,&ff
= &ff,&ff,&5f,&f5,&57,&d7,&ff,&d7,&ff,&f5,&ff,&d7,&57,&d7,&5f,&f5,&ff,&ff
= &ff,&ff,&7f,&f5,&5f,&f5,&d7,&f5,&d7,&f5,&57,&d5,&ff,&f5,&ff,&f5,&ff,&ff
= &ff,&ff,&57,&d5,&d7,&ff,&57,&f5,&ff,&d7,&ff,&d7,&d7,&d7,&5f,&f5,&ff,&ff
= &ff,&ff,&5f,&d5,&d7,&ff,&d7,&ff,&57,&f5,&d7,&d7,&d7,&d7,&5f,&f5,&ff,&ff
= &ff,&ff,&57,&d5,&ff,&f5,&7f,&fd,&7f,&fd,&5f,&ff,&5f,&ff,&5f,&ff,&ff,&ff
= &ff,&ff,&5f,&f5,&d7,&d7,&d7,&d7,&5f,&f5,&d7,&d7,&d7,&d7,&5f,&f5,&ff,&ff
= &ff,&ff,&5f,&f5,&d7,&d7,&d7,&d7,&5f,&d5,&ff,&d7,&ff,&d7,&5f,&f5,&ff,&ff
= &a8,&2a,&5a,&a5,&96,&96,&96,&96,&96,&96,&96,&96,&96,&96,&5a,&a5,&a8,&2a
= &a0,&0a,&68,&09,&58,&09,&68,&09,&60,&09,&60,&09,&60,&09,&60,&09,&a0,&0a
= &a8,&2a,&5a,&a5,&96,&96,&aa,&96,&68,&a5,&5a,&2a,&96,&aa,&56,&95,&aa,&aa
= &a8,&2a,&5a,&a5,&56,&96,&aa,&96,&80,&a5,&aa,&96,&56,&96,&5a,&a5,&a8,&2a
= &a0,&2a,&68,&25,&5a,&25,&96,&25,&96,&a5,&56,&95,&aa,&a5,&80,&25,&80,&2a
= &aa,&aa,&56,&95,&96,&aa,&56,&a5,&aa,&96,&aa,&96,&96,&96,&5a,&a5,&a8,&2a
= &a8,&aa,&5a,&95,&96,&aa,&96,&2a,&56,&a5,&96,&96,&96,&96,&5a,&a5,&a8,&2a
= &aa,&aa,&56,&95,&aa,&a5,&60,&29,&68,&09,&58,&0a,&58,&02,&58,&02,&a8,&02
= &a8,&2a,&5a,&a5,&96,&96,&96,&96,&5a,&a5,&96,&96,&96,&96,&5a,&a5,&a8,&2a
= &a8,&2a,&5a,&a5,&96,&96,&96,&96,&5a,&95,&aa,&96,&a8,&96,&58,&a5,&a8,&2a
ChDefPercent
= &ff,&ff,&df,&df,&77,&f7,&77,&f7,&df,&dd,&7f,&77,&7f,&77,&df,&df,&ff,&ff
= &a8,&a8,&9a,&9a,&66,&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
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