Skip to content

Commit

Permalink
Fix a couple of teletext issues.
Browse files Browse the repository at this point in the history
- update teletst to V1.2, add a couple of additional test cases

- don't clear held graphics when text height state didn't change

- don't engage graphics when selecting separate/contiguous graphics

Fix #164.
  • Loading branch information
tom-seddon committed Oct 13, 2021
1 parent 564413f commit c16ac91
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
Binary file modified etc/teletest_v1/0/$.TELETST
Binary file not shown.
2 changes: 1 addition & 1 deletion etc/teletest_v1/0/$.TELETST.inf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$.TELETST ffff0e00 ffff0e00
$.TELETST ffff0e00 ffff802b
Binary file modified etc/teletest_v1/teletst.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 25 additions & 12 deletions src/beeb/src/teletext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,21 +308,29 @@ void SAA5050::Byte(uint8_t value, uint8_t dispen) {

case 0x0c:
// Normal Height

// State change clears hold graphics state.
if (m_raster_shift != 0) {
m_last_graphics_data0 = 0;
m_last_graphics_data1 = 0;
data0 = 0;
data1 = 0;
}
m_raster_shift = 0;
data0 = 0;
data1 = 0;
m_last_graphics_data0 = 0;
m_last_graphics_data1 = 0;
break;

case 0x0d:
// Double Height
m_any_double_height = true;

// State change clears hold graphics state.
if (m_raster_shift != 1) {
m_last_graphics_data0 = 0;
m_last_graphics_data1 = 0;
data0 = 0;
data1 = 0;
}
m_raster_shift = 1;
data0 = 0;
data1 = 0;
m_last_graphics_data0 = 0;
m_last_graphics_data1 = 0;
m_any_double_height = true;
break;

case 0x0e:
Expand All @@ -347,7 +355,6 @@ void SAA5050::Byte(uint8_t value, uint8_t dispen) {
// Graphics
m_fg = value & 7;
m_conceal = false;
set_charset:;
m_charset = m_graphics_charset;
break;

Expand All @@ -359,12 +366,18 @@ void SAA5050::Byte(uint8_t value, uint8_t dispen) {
case 0x19:
// Contiguous Graphics
m_graphics_charset = TeletextCharset_ContiguousGraphics;
goto set_charset;
if (m_charset == TeletextCharset_SeparatedGraphics) {
m_charset = m_graphics_charset;
}
break;

case 0x1a:
// Separated Graphics
m_graphics_charset = TeletextCharset_SeparatedGraphics;
goto set_charset;
if (m_charset == TeletextCharset_ContiguousGraphics) {
m_charset = m_graphics_charset;
}
break;

case 0x1b:
// ESC
Expand Down

0 comments on commit c16ac91

Please sign in to comment.