diff options
author | 2020-08-14 18:35:16 +0200 | |
---|---|---|
committer | 2020-08-14 18:35:32 +0200 | |
commit | d355314cd6832b5161cac8c13e2078eebf00a25d (patch) | |
tree | 6c03966a2d444f828b36042b6cdfaa9673ca677d /src/devices/video/ef9340_1.cpp | |
parent | 5284aab0ae16f168a2f0327e2c2d4d242e3e5236 (diff) |
odyssey2: add notes
Diffstat (limited to 'src/devices/video/ef9340_1.cpp')
-rw-r--r-- | src/devices/video/ef9340_1.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/devices/video/ef9340_1.cpp b/src/devices/video/ef9340_1.cpp index 12439dd12e7..01cb926f1f3 100644 --- a/src/devices/video/ef9340_1.cpp +++ b/src/devices/video/ef9340_1.cpp @@ -2,8 +2,16 @@ // copyright-holders:Wilbert Pol /*************************************************************************** - Thomson EF9340 + EF9341 teletext graphics chips with 1KB external - character ram. +Thomson EF9340 + EF9341 teletext graphics chips with 1KB external character ram. + +TODO: +- busy state (right now it is immediate) +- read slice +- character blinking mode +- character underline mode +- character width/height doubling +- window boxing/conceal +- Y zoom ***************************************************************************/ @@ -52,7 +60,7 @@ void ef9340_1_device::device_start() // zerofill m_ef9341.TA = 0; m_ef9341.TB = 0; - m_ef9341.busy = 0; + m_ef9341.busy = false; m_ef9340.X = 0; m_ef9340.Y = 0; @@ -102,7 +110,7 @@ uint16_t ef9340_1_device::ef9340_get_c_addr(uint8_t x, uint8_t y) { return 0x300 | ( ( y & 0x07 ) << 5 ) | ( y & 0x18 ) | ( x & 0x07 ); } - return y << 5 | x; + return ( y & 0x1f ) << 5 | ( x & 0x1f ); } @@ -144,7 +152,7 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data ) if ( b ) { m_ef9341.TB = data; - m_ef9341.busy = 0x80; + m_ef9341.busy = true; switch( m_ef9341.TB & 0xE0 ) { case 0x00: /* Begin row */ @@ -169,8 +177,10 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data ) case 0xC0: /* Load Y0 */ m_ef9340.Y0 = m_ef9341.TA & 0x3F; break; + case 0xE0: /* Not interpreted */ + break; } - m_ef9341.busy = 0; + m_ef9341.busy = false; } else { @@ -184,7 +194,7 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data ) uint16_t addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff; m_ef9341.TB = data; - m_ef9341.busy = 0x80; + m_ef9341.busy = true; switch ( m_ef9340.M & 0xE0 ) { case 0x00: /* Write */ @@ -231,7 +241,7 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data ) default: /* Illegal */ break; } - m_ef9341.busy = 0; + m_ef9341.busy = false; } else { @@ -255,7 +265,7 @@ uint8_t ef9340_1_device::ef9341_read( uint8_t command, uint8_t b ) } else { - data = m_ef9341.busy; + data = (m_ef9341.busy) ? 0x80 : 0; } } else @@ -283,11 +293,12 @@ void ef9340_1_device::ef9340_scanline(int vpos) for ( int i = 0; i < 40 * 8; i++ ) m_tmp_bitmap.pix16(vpos, i) = 0; + // display automaton active at 40-290, or 32-242 int max_vpos = ( m_ef9340.R & 0x40 ) ? 250 : 210; if ( m_ef9340.R & 0x01 && vpos < max_vpos ) { - int y = vpos - 0; + int y = vpos; int y_row, slice; uint8_t fg = 0; uint8_t bg = 0; @@ -310,7 +321,7 @@ void ef9340_1_device::ef9340_scanline(int vpos) else { // Displaying regular row - y_row = (y - 10) / 10; + y_row = ((m_ef9340.Y0 & 0x1f) + (y - 10) / 10) % 24; slice = (y - 10) % 10; } |