odyssey2: add notes

This commit is contained in:
hap 2020-08-14 18:35:16 +02:00
parent 5284aab0ae
commit d355314cd6
3 changed files with 31 additions and 17 deletions

View File

@ -2,8 +2,16 @@
// copyright-holders:Wilbert Pol // copyright-holders:Wilbert Pol
/*************************************************************************** /***************************************************************************
Thomson EF9340 + EF9341 teletext graphics chips with 1KB external Thomson EF9340 + EF9341 teletext graphics chips with 1KB external character ram.
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 // zerofill
m_ef9341.TA = 0; m_ef9341.TA = 0;
m_ef9341.TB = 0; m_ef9341.TB = 0;
m_ef9341.busy = 0; m_ef9341.busy = false;
m_ef9340.X = 0; m_ef9340.X = 0;
m_ef9340.Y = 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 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 ) if ( b )
{ {
m_ef9341.TB = data; m_ef9341.TB = data;
m_ef9341.busy = 0x80; m_ef9341.busy = true;
switch( m_ef9341.TB & 0xE0 ) switch( m_ef9341.TB & 0xE0 )
{ {
case 0x00: /* Begin row */ 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 */ case 0xC0: /* Load Y0 */
m_ef9340.Y0 = m_ef9341.TA & 0x3F; m_ef9340.Y0 = m_ef9341.TA & 0x3F;
break; break;
case 0xE0: /* Not interpreted */
break;
} }
m_ef9341.busy = 0; m_ef9341.busy = false;
} }
else 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; uint16_t addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff;
m_ef9341.TB = data; m_ef9341.TB = data;
m_ef9341.busy = 0x80; m_ef9341.busy = true;
switch ( m_ef9340.M & 0xE0 ) switch ( m_ef9340.M & 0xE0 )
{ {
case 0x00: /* Write */ case 0x00: /* Write */
@ -231,7 +241,7 @@ void ef9340_1_device::ef9341_write( uint8_t command, uint8_t b, uint8_t data )
default: /* Illegal */ default: /* Illegal */
break; break;
} }
m_ef9341.busy = 0; m_ef9341.busy = false;
} }
else else
{ {
@ -255,7 +265,7 @@ uint8_t ef9340_1_device::ef9341_read( uint8_t command, uint8_t b )
} }
else else
{ {
data = m_ef9341.busy; data = (m_ef9341.busy) ? 0x80 : 0;
} }
} }
else else
@ -283,11 +293,12 @@ void ef9340_1_device::ef9340_scanline(int vpos)
for ( int i = 0; i < 40 * 8; i++ ) for ( int i = 0; i < 40 * 8; i++ )
m_tmp_bitmap.pix16(vpos, i) = 0; 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; int max_vpos = ( m_ef9340.R & 0x40 ) ? 250 : 210;
if ( m_ef9340.R & 0x01 && vpos < max_vpos ) if ( m_ef9340.R & 0x01 && vpos < max_vpos )
{ {
int y = vpos - 0; int y = vpos;
int y_row, slice; int y_row, slice;
uint8_t fg = 0; uint8_t fg = 0;
uint8_t bg = 0; uint8_t bg = 0;
@ -310,7 +321,7 @@ void ef9340_1_device::ef9340_scanline(int vpos)
else else
{ {
// Displaying regular row // Displaying regular row
y_row = (y - 10) / 10; y_row = ((m_ef9340.Y0 & 0x1f) + (y - 10) / 10) % 24;
slice = (y - 10) % 10; slice = (y - 10) % 10;
} }

View File

@ -59,7 +59,7 @@ protected:
{ {
uint8_t TA; uint8_t TA;
uint8_t TB; uint8_t TB;
uint8_t busy; bool busy;
} m_ef9341; } m_ef9341;
struct struct
@ -71,9 +71,9 @@ protected:
uint8_t M; uint8_t M;
} m_ef9340; } m_ef9340;
uint8_t m_ef934x_ram_a[1024]; uint8_t m_ef934x_ram_a[0x400]; // A10 to GND
uint8_t m_ef934x_ram_b[1024]; uint8_t m_ef934x_ram_b[0x400]; // A10 to GND
uint8_t m_ef934x_ext_char_ram[2048]; /* The G7400 has 2KB of external ram hooked up. The datasheet only describes how to hookup 1KB. */ uint8_t m_ef934x_ext_char_ram[0x800]; // The G7400 has 2KB of external ram hooked up. The datasheet only describes how to hookup 1KB.
}; };

View File

@ -22,7 +22,7 @@ Odyssey 2/Videopac hardware notes:
Videopac+ G7400 hardware notes: Videopac+ G7400 hardware notes:
- same base hardware - same base hardware
- Intel 8243 I/O expander - Intel 8243 I/O expander
- EF9340 + EF9341 graphics chips - EF9340 + EF9341 graphics chips + 6KB VRAM(3*2128, only 4KB used)
- larger keyboard - larger keyboard
XTAL notes (differs per model): XTAL notes (differs per model):
@ -46,7 +46,10 @@ TODO:
- ppp(the tetris game) does not work properly on PAL, is this homebrew NTSC-only, - ppp(the tetris game) does not work properly on PAL, is this homebrew NTSC-only,
or is it due to PAL video timing? The game does mid-scanline updates or is it due to PAL video timing? The game does mid-scanline updates
- add 824x vs ef934x collision detection, none of the games use it - add 824x vs ef934x collision detection, none of the games use it
- g7400 rally doesn't work, car keeps exploding - g7400 rally doesn't work, car keeps exploding, it is related to ef9341_read:
If you invert the returned RAM value, the USA map looks better. If you always
return 0, the game can be played but the car is invincible
- g7400 flashp doesn't work, also related to ef9341_read?
- g7400 probably has different video timing too (not same as g7000) - g7400 probably has different video timing too (not same as g7000)
- g7400 graphics problems, mostly due to missing features in ef934x - g7400 graphics problems, mostly due to missing features in ef934x