Commit 89fa2c01 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Teletext fixes

Detail:
  s/vdu/vdudriver, s/vdu/vdumodes - Re-introduce TTX256 so that 8bpp teletext will be used if no MDF is loaded
  s/vdu/vdudriver - If the video driver didn't support the native mode 7 colour depth, ModePromoTable was swapping it for another mode number, preventing the AltTTX code in FindOKMode from operating. So, skip the ModePromoTable check for mode 7.
  s/vdu/vduswis - Minor correction to alternate teletext mode search; 1<<5 = 32bpp, so stop search at log2bpp of 6
Admin:
  Tested on Raspberry Pi


Version 5.74. Retagged as 'Kernel-5_74'
parent 92e90b01
......@@ -608,7 +608,12 @@ ModePromoTable
DCB 1, 1 ; 4
DCB 2, 2 ; 5
DCB 1, 13 ; 6
[ TTX256
; This case should be irrelevant (ModePromoTable no longer used for mode 7), but keep it in sync with vdumodes just in case
DCB 8, &FF ; 7
|
DCB 4, 13 ; 7
]
DCB 2, 12 ; 8
DCB 4, 13 ; 9
DCB 8, &FF ; 10
......@@ -718,6 +723,9 @@ ModeChangeSub ROUT
AND r1, r2, #&7F
CMP r1, #NumModes ; mode number
BHS mchsub_3
; For mode 7 we have some logic in FindOKMode to deal with looking for a replacement, prefer that over this logic
CMP r1, #7
BEQ mchsub_3
Push "r0-r4"
LDR r4, [WsPtr, #CurrentGraphicsVDriver]
MOV r4, r4, LSL #24
......
......@@ -831,11 +831,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
......@@ -1089,11 +1094,16 @@ VW_3 VWSTAB 3, 40K,160, 639,249,5,1,2, 1, 79, 24,1,1,0,0,ModeFlag_NonGraphic
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,ModeFlag_NonGraphic+ModeFlag_GapMode+ModeFlag_BBCGapMode ; MODE 6
[ TTX256
ASSERT HiResTTX
VW_7 VWSTAB 7,640K,640, 639,499,5,1,1,255,39, 24,3,3,4,0,ModeFlag_NonGraphic+ModeFlag_GapMode+ModeFlag_Teletext+ModeFlag_DoubleVertical+ModeFlag_FullPalette ; MODE 7
|
[ HiResTTX
VW_7 VWSTAB 7,320K,320, 639,499,5,1,1,15, 39, 24,2,2,4,0,ModeFlag_NonGraphic+ModeFlag_GapMode+ModeFlag_Teletext+ModeFlag_DoubleVertical ; MODE 7
|
VW_7 VWSTAB 7, 80K,160, 319,249,5,2,2,15, 39, 24,2,2,4,0,ModeFlag_NonGraphic+ModeFlag_GapMode+ModeFlag_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
......
......@@ -986,7 +986,7 @@ FindOKMode ROUT
; Try next BPP
LDR r14, [r10, #ModeSelector_PixelDepth]
ADD r14, r14, #1
CMP r14, #7
CMP r14, #6
STRLO r14, [r10, #ModeSelector_PixelDepth]
BLO %BT13
; Try next resolution
......
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