Commit 12055c33 authored by Ben Avison's avatar Ben Avison
Browse files

Added 256-colour version of the (high-resolution only) teletext code, and...

Added 256-colour version of the (high-resolution only) teletext code, and support for teletext when hardware scroll is disabled. Both are required for Tungsten.

Turned off the module init/final service calls, since we still don't have an
allocation for them.
Upped the OS version number to 5.01.

Version 5.35, 4.79.2.53. Tagged as 'Kernel-5_35-4_79_2_53'
parent 5fa74be7
......@@ -41,7 +41,7 @@
reveal = 1: all characters are displayed
Default is reveal = 0.
VDU 23,18,3,black_emable,0,0,0,0,0,0
VDU 23,18,3,black_enable,0,0,0,0,0,0
Enable/disable black foreground colour control codes
black_enable = 0: control codes &80 and &90 do nothing
black_enable = 1: control code &80 selects black text, control code
......
......@@ -14,9 +14,9 @@ Version SETA Module_Version
VString SETS Module_MajorVersion
Date SETS Module_Date ; version for STB/NC OS
|
Version SETA 500
VString SETS "5.00"
Date SETS "28 Nov 2002" ; version for RISC OS on desktop computers
Version SETA 501
VString SETS "5.01"
Date SETS "18 Dec 2002" ; version for RISC OS on desktop computers
]
END
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.52"
Module_Date SETS "13 Dec 2002"
Module_ApplicationDate SETS "13-Dec-02"
Module_MinorVersion SETS "4.79.2.53"
Module_Date SETS "18 Dec 2002"
Module_ApplicationDate SETS "18-Dec-02"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.52)"
Module_HelpVersion SETS "5.35 (13 Dec 2002) 4.79.2.52"
Module_FullVersion SETS "5.35 (4.79.2.53)"
Module_HelpVersion SETS "5.35 (18 Dec 2002) 4.79.2.53"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.52
#define Module_Date_CMHG 13 Dec 2002
#define Module_MinorVersion_CMHG 4.79.2.53
#define Module_Date_CMHG 18 Dec 2002
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.52"
#define Module_Date "13 Dec 2002"
#define Module_MinorVersion "4.79.2.53"
#define Module_Date "18 Dec 2002"
#define Module_ApplicationDate "13-Dec-02"
#define Module_ApplicationDate "18-Dec-02"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.52)"
#define Module_HelpVersion "5.35 (13 Dec 2002) 4.79.2.52"
#define Module_FullVersion "5.35 (4.79.2.53)"
#define Module_HelpVersion "5.35 (18 Dec 2002) 4.79.2.53"
#define Module_LibraryVersionInfo "5:35"
......@@ -23,7 +23,7 @@ ExtraRMANeeded * 24*1024 ; Amount you get extra on top of what you configured
ModHand_IntrinsicBI SETL {TRUE} :LAND: ChocolateOSMod ;base module incarnation 'node' is in module node
GBLL ModHand_InitDieServices
ModHand_InitDieServices SETL {TRUE} :LAND: ModHand_IntrinsicBI
ModHand_InitDieServices SETL {FALSE} :LAND: ModHand_IntrinsicBI
; Test version, incorporating multiple incarnation attempt
......
......@@ -176,6 +176,15 @@ Cursor2loop
MOV PC, R14
CursorTeletext
[ TTX256
ASSERT HiResTTX
Push "R0, R1, R14"
ADD R0, R0, #320*1024 ; go to other screen
ADD R1, R1, #320*1024
BL Cursor16bit
Pull "R0, R1, R14"
B Cursor16bit
|
[ HiResTTX
Push "R0, R1, R14"
ADD R0, R0, #160*1024 ; go to other screen
......@@ -192,6 +201,7 @@ CursorTeletext
; and drop thru to ...
]
]
Cursor4bit
LDR R8, [R0, R2]!
......@@ -359,11 +369,16 @@ TeletextFlashTest ROUT
BNE %FT20 ; count not expired
LDR R1, [WsPtr, #TeletextOffset]
[ TTX256
ASSERT HiResTTX
EORS R1, R1, #320*1024 ; switch to other flash bank
|
[ HiResTTX
EORS R1, R1, #160*1024 ; switch to other flash bank
|
EORS R1, R1, #40*1024 ; switch to other flash bank
]
]
STR R1, [WsPtr, #TeletextOffset]
MOVEQ R3, #OnFlashTime
MOVNE R3, #OffFlashTime
......
......@@ -630,7 +630,11 @@ ModePromoTable
DCB 1, 1 ; 4
DCB 2, 2 ; 5
DCB 1, 13 ; 6
[ TTX256
DCB 8, &FF ; 7
|
DCB 4, 13 ; 7
]
DCB 2, 12 ; 8
DCB 4, 13 ; 9
DCB 8, &FF ; 10
......@@ -747,6 +751,7 @@ mchsub_2
Pull "r3, r4"
;
mchsub_3
; BKPT &600D
MOV R1, #Service_PreModeChange
IssueService
TEQ R1, #0 ; was service claimed ?
......
......@@ -274,6 +274,10 @@ SwitchOutputToMask ROUT
TEQ R0, #2 ; if (1<<2=4) bits per pixel
MOVEQ R7, #&77 ; then use colour 7 for cursor
MOVNE R7, #&FF ; else use colour 15
[ TTX256
TST R6, #Flag_Teletext ; unless it's teletext
MOVNE R7, #&07 ; in which case still use colour 7
]
70
ORR R7, R7, R7, LSL #8 ; fill out to whole word
ORR R7, R7, R7, LSL #16
......
......@@ -698,11 +698,16 @@ VLM_3 VIDC_List 1, 72, 62, 88, 640, 88, 74, 3,16,20,250,20, 3,16000,0
VLM_4 VIDC_List 0, 72, 62, 88, 640, 88, 74, 3,16,17,256,17, 3,16000,0 ; MODE 4
VLM_5 VIDC_List 1, 36, 30, 44, 320, 44, 38, 3,16,17,256,17, 3, 8000,0 ; MODE 5
VLM_6 VIDC_List 1, 36, 30, 44, 320, 44, 38, 3,16,20,250,20, 3, 8000,0 ; MODE 6
[ TTX256
ASSERT HiResTTX
VLM_7 VIDC_List 3, 56,112, 0, 640, 0, 88, 3,18, 6,500, 6, 1,24000,0 ; MODE 7
|
[ HiResTTX
VLM_7 VIDC_List 2, 56,112, 0, 640, 0, 88, 3,18, 6,500, 6, 1,24000,0 ; MODE 7
|
VLM_7 VIDC_List 2, 36, 30, 44, 320, 44, 38, 3,16,20,250,20, 3, 8000,0 ; MODE 7
]
]
VLM_8 VIDC_List 1, 72, 62, 88, 640, 88, 74, 3,16,17,256,17, 3,16000,0 ; MODE 8
VLM_9 VIDC_List 2, 36, 30, 44, 320, 44, 38, 3,16,17,256,17, 3, 8000,0 ; MODE 9
VLM_10 VIDC_List 3, 36, 30, 44, 320, 44, 38, 3,16,17,256,17, 3, 8000,0 ; MODE 10
......@@ -1017,11 +1022,16 @@ VW_3 VWSTAB 3, 40K,160, 639,249,5,1,2, 1, 79, 24,1,1,0,0,Flag_NonGraphic+Fla
VW_4 VWSTAB 4, 20K, 80, 319,255,4,2,2, 1, 39, 31,1,0,0,4,0 ; MODE 4
VW_5 VWSTAB 5, 20K, 80, 159,255,4,3,2, 3, 19, 31,2,1,1,2,0 ; MODE 5
VW_6 VWSTAB 6, 20K, 80, 319,249,4,2,2, 1, 39, 24,1,1,0,0,Flag_NonGraphic+Flag_GapMode+Flag_BBCGapMode ; MODE 6
[ TTX256
ASSERT HiResTTX
VW_7 VWSTAB 7,640K,640, 639,499,5,1,1,63, 39, 24,3,3,4,0,Flag_NonGraphic+Flag_GapMode+Flag_Teletext+Flag_DoubleVertical ; MODE 7
|
[ HiResTTX
VW_7 VWSTAB 7,320K,320, 639,499,5,1,1,15, 39, 24,2,2,4,0,Flag_NonGraphic+Flag_GapMode+Flag_Teletext+Flag_DoubleVertical ; MODE 7
|
VW_7 VWSTAB 7, 80K,160, 319,249,5,2,2,15, 39, 24,2,2,4,0,Flag_NonGraphic+Flag_GapMode+Flag_Teletext ; MODE 7
]
]
VW_8 VWSTAB 8, 40K,160, 639,255,5,1,2, 3, 79, 31,1,1,1,2,0 ; MODE 8
VW_9 VWSTAB 9, 40K,160, 319,255,5,2,2,15, 39, 31,2,2,2,3,0 ; MODE 9
VW_10 VWSTAB 10, 80K,320, 159,255,6,3,2,63, 19, 31,4,3,3,5,0 ; MODE 10
......
......@@ -396,18 +396,28 @@ RefreshBitmap ROUT
BLCC DoPreControl ; [do pre-control things]
BL UpdateHeldBits
BL TTXPaintChar ; paint it to the screen
[ TTX256
ASSERT HiResTTX
ADD R2,R2, #16
|
[ HiResTTX
ADD R2, R2, #8
|
ADD R2, R2, #4 ; move to next char on same line
]
]
CMP R4, R5
BCC %BT20
[ TTX256
ASSERT HiResTTX
SUB R2, R2, #640
|
[ HiResTTX
SUB R2, R2, #320
|
SUB R2, R2, #160 ; move back to start of this line
]
]
ADD R2, R2, R7 ; and drop down to start of next line
ADD R6, R6, #1
CMP R6, #24
......@@ -699,11 +709,16 @@ TTXScanZap
TEQ R3, #0 ; if attributes different
TEQNE R8, R7 ; and not at end of line
[ TTX256
ASSERT HiResTTX
ADDNE R2, R2, #16
|
[ HiResTTX
ADDNE R2, R2, #8
|
ADDNE R2, R2, #4 ; then move to next char
]
]
BNE %BT10 ; and loop
ADD R3, WsPtr, #TTXDoubleCounts
......@@ -733,11 +748,16 @@ TTXScanZap
SUB R3, R7, R8 ; (no. of chars before eol) * 4
RSB R3, R3, #160 ; (current char number) * 4
[ TTX256
ASSERT HiResTTX
SUB R2, R2, R3, LSL #2 ; back to start of old line
|
[ HiResTTX
SUB R2, R2, R3, LSL #1 ; back to start of old line
|
SUB R2, R2, R3 ; back to start of old line
]
]
LDR R3, [WsPtr, #RowLength]
ADD R2, R2, R3 ; move down a row
......@@ -898,7 +918,7 @@ TTXSoftScrollUp ROUT
; now clear bottom row
ADR R7, TTXLineStarts
ADRL R7, TTXLineStarts
LDR R7, [R7, R3, LSL #2] ; R7 -> dummy word(bottom)
ADD R8, R7, R5, LSL #2 ; R8 -> char before bottom rt
ADD R7, R7, R4, LSL #2 ; R7 -> char before bottom left
......@@ -1335,6 +1355,19 @@ TTXPaintChar ROUT
MOV mask, #&FF000000
LDR linelen, [WsPtr, #LineLength]
[ TTX256
SUB linelen, linelen, #8 ; adjust line offset to account for writing 2 words/line
Push "R1, screen"
BL Wrch8bitTTX ; do 1st bank
LDMFD R13, {R1, screen} ; restore pointers to character and screen address
ADD screen, screen, #320*1024 ; point to 2nd bank
TST R0, #MapBit_Flash
MOVNE mask, #0 ; flash => 2nd bank is space
BL Wrch8bitTTX ; do 2nd bank
Pull "R1, screen"
|
SUB linelen, linelen, #4 ; adjust line offset to account for writing 2 words/line
Push "R1, screen"
BL Wrch4bitTTX ; do 1st bank
......@@ -1346,10 +1379,15 @@ TTXPaintChar ROUT
BL Wrch4bitTTX ; do 2nd bank
Pull "R1, screen"
]
EXIT
[ TTX256
Wrch8bitTTX ROUT
|
Wrch4bitTTX ROUT
MOV R10, #4 ; do each plot in 5 stages; R10 holds stage number
]
MOV R7, #4 ; do each plot in 5 stages; R7 holds stage number
01 TST R0, #MapBit_Double
LDMEQIA R1!, {tophalf, bottomhalf} ; single height characters, load 4 rows
LDRNE tophalf, [R1], #4 ; double height characters, load 2 rows
......@@ -1362,6 +1400,45 @@ Wrch4bitTTX ROUT
MOVEQ tophalf, #0 ; make it invisible
MOVEQ bottomhalf, #0
[ TTX256
AND byte, mask, tophalf, LSL #16
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen!, {scrbyte, scrbyte2}
AND byte, mask, tophalf, LSL #24
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen, {scrbyte, scrbyte2}
ADD screen, screen, linelen
AND byte, mask, tophalf
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen!, {scrbyte, scrbyte2}
AND byte, mask, tophalf, LSL #8
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen, {scrbyte, scrbyte2}
ADD screen, screen, linelen
AND byte, mask, bottomhalf, LSL #16
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen!, {scrbyte, scrbyte2}
AND byte, mask, bottomhalf, LSL #24
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen, {scrbyte, scrbyte2}
ADD screen, screen, linelen
AND byte, mask, bottomhalf
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen!, {scrbyte, scrbyte2}
AND byte, mask, bottomhalf, LSL #8
ADD byte, bigfont, byte, LSR #21
LDMIA byte, {scrbyte, scrbyte2}
STMIA screen, {scrbyte, scrbyte2}
ADD screen, screen, linelen
|
AND byte, mask, tophalf, LSL #16
LDR scrbyte, [bigfont, byte, LSR #22]
STR scrbyte, [screen], #4
......@@ -1387,8 +1464,9 @@ Wrch4bitTTX ROUT
AND byte, mask, bottomhalf, LSL #8
LDR scrbyte, [bigfont, byte, LSR #22]
STR scrbyte, [screen], linelen
]
SUBS R10, R10, #1
SUBS R7, R7, #1
BPL %BT01
MOV PC, R14
]
......
......@@ -339,6 +339,9 @@ FastCLS ROUT
BL TTXFastCLS ; else clear teletext map
MOV R0, #0 ; and clear to zero
[ UseGraphicsV
B %FT15
]
10
[ UseGraphicsV
BL CheckAcceleration
......@@ -1616,7 +1619,6 @@ GetBoxInfo
LDR R7, [WsPtr, #ModeFlags]
MOV R6, R8, LSL #3 ; *8
TST R7, #Flag_GapMode ; if gap mode
ADDNE R6, R6, R8, LSL #1 ; (+*2) = *10
TST R7, #Flag_DoubleVertical ; if double mode
......@@ -1657,12 +1659,21 @@ TextWindowToGraphics
TextBoxToGraphics
SUB R5, R2, R0
ADD R5, R5, #1 ; number of chars horiz
[ HiResTTX
LDR R6, [WsPtr, #CharWidth] ; bytes/char (not log2)
LDR R7, [WsPtr, #Log2BPP] ; log2 bits/pixel
MUL R0, R6, R0 ; number of bytes horiz
MUL R5, R6, R5
SUB R7, R7, #3 ; log2 bytes/pixel
|
LDR R6, [WsPtr, #Log2BPC] ; should be log2 bytes/char
LDR R7, [WsPtr, #Log2BPP] ; should be log2 bits/pixel
ADD R6, R6, #3
MOV R0, R0, LSL R6 ; number of bits horiz
MOV R5, R5, LSL R6
]
MOV R0, R0, LSR R7 ; number of pixels horiz
MOV R5, R5, LSR R7
ADD R2, R0, R5 ; recalculate right coord
......@@ -1788,6 +1799,8 @@ ClearBottomScreenLine
HardScrollSpriteUp
Push R14
TST R6, #TeletextMode
BNE TTXSoftScrollUp
[ UseGraphicsV
BL TryCopyScreenUp
Pull R14,EQ
......@@ -1989,6 +2002,8 @@ ClearTopScreenLine
HardScrollSpriteDown
Push R14
TST R6, #TeletextMode
BNE TTXSoftScrollDown
BL GetScreenInfo ; get box info for whole 'screen'
MOV R0, #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