mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
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:
parent
ea3185af90
commit
fc79b73ba6
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user