tx0.cpp: Further fixes

- Load typewriter input into correct bit positions of LR
- Invert MSB of display coordinates (fixes tic-tac-toe grid)
- tx0_8kw: Resolve confusion between SHR and CYR semantics (these were incorrectly swapped)
This commit is contained in:
AJR 2021-09-04 23:25:32 -04:00
parent ea3185af90
commit fc79b73ba6
3 changed files with 5 additions and 7 deletions

View File

@ -989,12 +989,12 @@ void tx0_8kw_device::execute_instruction_8kw()
{
switch (MAR & 0000300)
{
case 0000000: /* (1.6) CYR = CYcle ac contents Right one binary
case 0000200: /* (1.6) CYR = CYcle ac contents Right one binary
position (AC(17) -> AC(0)) */
AC = (AC >> 1) | ((AC & 1) << 17);
break;
case 0000200: /* (1.6) CYcle ac contents Right one binary
case 0000000: /* (1.6) SHR = SHift ac contents Right one binary
position (AC(0) unchanged) */
AC = (AC >> 1) | (AC & 0400000);
break;

View File

@ -1427,9 +1427,7 @@ void tx0_state::tx0_keyboard()
;
charcode = (i << 4) + j;
/* shuffle and insert data into LR */
/* BTW, I am not sure how the char code is combined with the
previous LR */
lr = (1 << 17) | ((charcode & 040) << 10) | ((charcode & 020) << 8) | ((charcode & 010) << 6) | ((charcode & 004) << 4) | ((charcode & 002) << 2) | ((charcode & 001) << 1);
lr = (1 << 17) | (charcode << 11) | m_maincpu->state_int(TX0_LR);
/* write modified LR */
m_maincpu->set_state_int(TX0_LR, lr);
tx0_typewriter_drawchar(charcode); /* we want to echo input */

View File

@ -56,8 +56,8 @@ WRITE_LINE_MEMBER(tx0_state::screen_vblank_tx0)
void tx0_state::tx0_plot(int x, int y)
{
/* compute pixel coordinates and plot */
x = x*crt_window_width/0777;
y = y*crt_window_height/0777;
x = (x ^ 0400) * crt_window_width / 0777;
y = (y ^ 0400) * crt_window_height / 0777;
m_crt->plot(x, y);
}