Skip to content

Commit 835630c

Browse files
authored
ef9345: implement service row for the TS9347 variant (#13225)
With this change, the minitel2 can correctly display its status row at the top of the screen.
1 parent 0823404 commit 835630c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/devices/video/ef9345.cpp

+17-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,23 @@ void ef9345_device::zoom(uint8_t *pix, uint16_t n)
378378
uint16_t ef9345_device::indexblock(uint16_t x, uint16_t y)
379379
{
380380
uint16_t i = x, j;
381-
j = (y == 0) ? ((m_tgs & 0x20) >> 5) : ((m_ror & 0x1f) + y - 1);
381+
382+
if (m_variant == EF9345_MODE::TYPE_EF9345)
383+
{
384+
// On the EF9345 the service row is always displayed at the top, and
385+
// it can be fetched from either Y=0 or Y=1.
386+
j = (y == 0) ? ((m_tgs & 0x20) >> 5) : ((m_ror & 0x1f) + y - 1);
387+
}
388+
else
389+
{
390+
// On the TS9347 the service row is displayed either at the top or at
391+
// the bottom, and it is always fetched from Y=0.
392+
if (m_tgs & 1)
393+
j = (y == 24) ? 0 : ((m_ror & 0x1f) + y);
394+
else
395+
j = (y == 0) ? 0 : ((m_ror & 0x1f) + y - 1);
396+
}
397+
382398
j = (j > 31) ? (j - 24) : j;
383399

384400
//right side of a double width character

0 commit comments

Comments
 (0)