diff --git a/Docs/HiResTTX b/Docs/HiResTTX index 03f39ca0e8dd40c5eaec9dc4f6c03b0579b746c9..fc6a425bfe66adba1adfdedb7f3582d43d0f7014 100644 --- a/Docs/HiResTTX +++ b/Docs/HiResTTX @@ -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 diff --git a/Version b/Version index 5e088fb345886a760931b6c6e92fb975f2d253f3..d3ae8223e0b758f741db7c0c2a70728337157565 100644 --- a/Version +++ b/Version @@ -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 diff --git a/VersionASM b/VersionASM index 80f100ebe7766165e7a17a58851b51683151fe4d..12b8b26b47214f2ab4f9504b8a9013ae5a0be005 100644 --- a/VersionASM +++ b/VersionASM @@ -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 diff --git a/VersionNum b/VersionNum index 7463b8cfd6d186b36ed02f2968853dcaf0163720..42f92e36b64d30b828c330acb0cde2de09b1179a 100644 --- a/VersionNum +++ b/VersionNum @@ -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" diff --git a/s/ModHand b/s/ModHand index eaa1208497b6504ea767da80d83e5e66682ce17b..194f72db5b33093dacad0aeffc83150e72cb1dc6 100644 --- a/s/ModHand +++ b/s/ModHand @@ -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 diff --git a/s/vdu/vducursoft b/s/vdu/vducursoft index e7f626b63de1f168ff54f507817a04bab07577d0..e25dc3635747d5e15bd3e2545d3f367953fd7770 100644 --- a/s/vdu/vducursoft +++ b/s/vdu/vducursoft @@ -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 diff --git a/s/vdu/vdudriver b/s/vdu/vdudriver index 9a440d1acc767f3f4e9c9021a97b3c6ff7bdb470..b220034d18d4ada52f5df3fc49a8654905ec7a2f 100644 --- a/s/vdu/vdudriver +++ b/s/vdu/vdudriver @@ -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 ? diff --git a/s/vdu/vdugrafl b/s/vdu/vdugrafl index a487bc0a3caac805643491287498a3751067e7ce..4c74b2847a8bcfe7ed8bb679599a0ad8c05d8b1b 100644 --- a/s/vdu/vdugrafl +++ b/s/vdu/vdugrafl @@ -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 diff --git a/s/vdu/vdumodes b/s/vdu/vdumodes index a4ff60912d420698d6dafb8beebe3036444e3c41..f72cc34a7214e5e548737d71e4e186ca6fa6491f 100644 --- a/s/vdu/vdumodes +++ b/s/vdu/vdumodes @@ -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 diff --git a/s/vdu/vduttx b/s/vdu/vduttx index 6f54f53cfb0c2f595e32f07ac98f8912bf327f10..d8992c59e5450ad88aea55fc446f44cb6c0f5e08 100644 --- a/s/vdu/vduttx +++ b/s/vdu/vduttx @@ -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 ] diff --git a/s/vdu/vduwrch b/s/vdu/vduwrch index bba496ed4adc9c293719573b4724f34600f156b2..4b0dafe0ce36284b3c12f2356c639a9d97d381e1 100644 --- a/s/vdu/vduwrch +++ b/s/vdu/vduwrch @@ -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