Commit f3ebda6b authored by Ben Avison's avatar Ben Avison

Re-inserted the fixed low-res autoscroll pointers (they disappeared in the final softload ROM).

Fixed half-specified font-colour validation-string-command bug.
Partial UTF-8 support included, but switched out, since UTF-8 won't be any
theoretical future Ursula build.

Finally...
Cranked version number up to 4.00, to signify the end of Ursula development.
parent 6e80c7a8
......@@ -68,8 +68,8 @@
Option NoDarwin, true ; don't even alias it.
Option TrueIcon1, true ; true colour support, phase 1
Option SwitchingToSprite, true ; update vdu variables when switching to sprite
Option StartTaskPostFilter, true ; always call the post filter on exit
; from Wimp_StartTask
Option StartTaskPostFilter, true ; always call the post filter on exit from Wimp_StartTask
Option UTF8, false ; support for UTF-8 alphabet (Unicode)
END
......@@ -4,8 +4,8 @@
GBLS VString
GBLS Date
Version SETA 399
VString SETS "3.99"
Date SETS "18 Aug 1998"
Version SETA 400
VString SETS "4.00"
Date SETS "17 Sep 1998"
END
......@@ -53,6 +53,7 @@ Module_BaseAddr
GET hdr:PDriver
GET hdr:ScrBlank
GET hdr:OsWords
GET hdr:Countries
GET Version
......
......@@ -2206,13 +2206,24 @@ skip_backdrop
ADR R0,initvdustring1
MOV R1,#endvdustring1-initvdustring1
SWI XOS_WriteN
;
[ UTF8
MOV R0, #71
MOV R1, #127 ; read alphabet
SWI XOS_Byte
TEQ R1, #ISOAlphabet_UTF8
BEQ %FT88
ADR R0, initvdustring1a
MOV R1, #endvdustring1a-initvdustring1a
SWI XOS_WriteN
]
;
LDR R0,tool_area
TEQ R0,#0 ; have any tools been installed?
ADREQ R0,initvdustring2
MOVEQ R1,#endvdustring2-initvdustring2
SWIEQ XOS_WriteN ; No, so redefine glyphs
;
88
LDR R1,scrx0
LDR R2,scry1
SUB R2,R2,#1 ; move to top-left of window
......@@ -2268,6 +2279,15 @@ initvdustring1
DCB 5
DCB 23,17,4,1,0,0,0,0,0,0 ; use native ARM ecfs
DCB 23,16,&40,&BF,0,0,0,0,0,0 ; no vdu 5 wraparound
DCB 26 ; for reading graphics window size
[ UTF8
endvdustring1
ALIGN
; characters only defined if alphabet <> UTF-8
initvdustring1a
]
[ :LNOT: Euro
DCB 23,&80,&03,&03,&06,&06,&76,&1C,&0C,&00
]
......@@ -2277,12 +2297,13 @@ initvdustring1
DCB 23,&89,&18,&14,&F2,&81,&F2,&14,&18,&00
DCB 23,&8A,&3C,&24,&24,&E7,&42,&24,&18,&00
DCB 23,&8B,&18,&24,&42,&E7,&24,&24,&3C,&00
DCB 26 ; for reading graphics window size
[ UTF8
endvdustring1a
|
endvdustring1
]
[ Euro
ALIGN
]
; characters only defined if not tools present
......
......@@ -411,16 +411,49 @@ int_seticonptrs ROUT
BLGE findcommand
BNE %FT11
;
LDRB R2,[R3],#1
LDRB R2, [R3], #1
[ true ; slightly more robust (if less elegant) code: copes with incomplete/invalid specifier (eg "F0", "F9x" or even just "F")
CMP R2, #' '
BLT %FT11 ; stop if terminated
ORR R2, R2, #&20
CMP R2, #'0'
BLT %FT11
CMP R2, #'9'
SUBLE R2, R2, #'0'
BLE %FT05
CMP R2, #'a'
BLT %FT11
CMP R2, #'f'
SUBLE R2, R2, #'a'-10
BGT %FT11
05
|
UpperCase R2,R14
Hex R2,R2 ; R2 = background colour
]
STRB R2,fontbackground
Trace fcol, "seticonptrs: (2) fontbackground ", X, R2
LDRB R2,[R3]
[ true ; slightly more robust (if less elegant) code: copes with incomplete/invalid specifier (eg "F0", "F9x" or even just "F")
CMP R2, #' '
BLT %FT11 ; stop if terminated
ORR R2, R2, #&20
CMP R2, #'0'
BLT %FT11
CMP R2, #'9'
SUBLE R2, R2, #'0'
BLE %FT05
CMP R2, #'a'
BLT %FT11
CMP R2, #'f'
SUBLE R2, R2, #'a'-10
BGT %FT11
05
|
UpperCase R2,R14
Hex R2,R2 ; R2 = foreground colour
]
STRB R2,fontforeground
Trace fcol, "seticonptrs: (2) fontforeground ", X, R2
......@@ -6563,8 +6596,22 @@ State_CurrentFont * 0
State_IconFont * 1
State_SymbolFont * 2
[ UTF8
MACRO
$lab TEST_ARROW2 $c
$lab
; like TEST_ARROW, but always returns NE if R11 "Z" bit is clear
TEST_ARROW $c
TEQEQP PC, R11
MEND
]
pushfontstring TraceL font
[ UTF8
Push "R0, R2-R6, R8-R11, LR"
|
Push "R0, R2-R6, R8-R10, LR"
]
Debug err, "pushfontstring: flags=",R1
DebugS err, " string=",R2
......@@ -6582,6 +6629,18 @@ pushfontstring TraceL font
TraceX font, R3
TraceNL font
[ UTF8
; check current alphabet - if it's UTF-8, we mustn't map characters to the symbol font, as they will be part of a multi-byte sequence
Push "R0-R2"
MOV R0, #71
MOV R1, #127 ; read alphabet
SWI XOS_Byte
TEQ R1, #ISOAlphabet_UTF8
TOGPSR Z_bit, R0 ; NE => alphabet is UTF-8
MOV R11, PC ; referred back to in TEST_ARROW2
Pull "R0-R2"
]
MOV R8, R2
; 323nk allow variable length strings, uses is_deleted flag => r9 valid
......@@ -6636,20 +6695,32 @@ pushfontstring_start_scan_loop
BEQ pushfontstring_scanning_current_font
pushfontstring_scanning_icon_font
[ UTF8
TEST_ARROW2 R5
|
TEST_ARROW R5
]
ADDEQ R0, R0, #2
MOVEQ R1, #State_SymbolFont
B pushfontstring_reinitialise_scan_loop
pushfontstring_scanning_current_font
[ UTF8
TEST_ARROW2 R5
|
TEST_ARROW R5
]
ADD R0, R0, #2
MOVEQ R1, #State_SymbolFont
MOVNE R1, #State_IconFont
B pushfontstring_reinitialise_scan_loop
pushfontstring_scanning_symbol_font
[ UTF8
TEST_ARROW2 R5
|
TEST_ARROW R5
]
ADDNE R0, R0, #2
MOVNE R1, #State_IconFont
......@@ -6736,7 +6807,11 @@ pushfontstring_copying_icon_font
;R9 := current character
LDRB R9, [R8, R4]
[ UTF8
TEST_ARROW2 R9
|
TEST_ARROW R9
]
BNE pushfontstring_reinitialise_copy_loop
;append Font_CommandFont and the handle for symbol font
......@@ -6759,7 +6834,11 @@ pushfontstring_copying_symbol_font
;R9 := current character
LDRB R9, [R8, R4]
[ UTF8
TEST_ARROW2 R9
|
TEST_ARROW R9
]
BEQ pushfontstring_reinitialise_copy_loop
;append Font_CommandFont and the handle for the icon font
......@@ -6779,7 +6858,11 @@ pushfontstring_copying_current_font
LDRB R9, [R8, R4]
[ outlinefont
[ UTF8
TEST_ARROW2 R9
|
TEST_ARROW R9
]
;append Font_CommandFont and the handle for the appropriate font
MOV R9, #26
......@@ -6864,8 +6947,13 @@ pushfontstring_exit
MOV LR,SP
ADD LR,LR,R7
TEQ R7, #0
[ UTF8
ADDNE R7, R7, #4*11 ;11 = no of registers stacked
LDMFD LR,{R0, R2, R3, R4, R5, R6, R8, R9, R10, R11, LR}
|
ADDNE R7, R7, #4*10 ;10 = no of registers stacked
LDMFD LR,{R0, R2, R3, R4, R5, R6, R8, R9, R10, LR}
]
;SP now as at entry. Move it back over the string
; SUB SP, SP, R7
; R1 -> string to use
......
......@@ -766,12 +766,21 @@ maketoollist ENTRY "R1-R11"
; Set default sizes for undefined tools
40
[ UTF8
Push "R2"
MOV R0, #71
MOV R1, #127 ; read alphabet
SWI XOS_Byte
Pull "R2"
TEQ R1, #ISOAlphabet_UTF8
BEQ %FT88
]
LDR LR,back_width
TEQ LR,#0 ; Back tool defined?
ADREQL R0,initvdustring2
MOVEQ R1,#endvdustring2-initvdustring2
SWIEQ XOS_WriteN ; No then re-define glyphs
88
LDRB R1,yborder
LDR LR,title_height
TEQ LR,#0
......
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