EmulatorKit icon indicating copy to clipboard operation
EmulatorKit copied to clipboard

Keystrokes dropped when pasting text

Open mike632t opened this issue 5 months ago • 4 comments
trafficstars

I think this is related to issue #22.

I started the emulator using

./rc2014 -a -r ./R0000009.BIN -e 0

However when pasting text (e.g PI.BAS) into the emulator most of the 'keystrokes' are dropped, even when pasting a single line of text.

When using a real serial interface I the rate at which keystrokes arrive is limited by the baud rate but when pasting text in a terminal window the input easily overwhelms the emulated serial interface.

Would it be possible to buffer the input (except for ctrl-\) before it reached to emulated serial port, so keystrokes are not dropped?

Thank you.

mike632t avatar May 27 '25 22:05 mike632t

It's a difficult one with emulation as to what is correct.

if you hack acia.c so that

        /* Already a character waiting so set OVRN */
        if (acia->status & 1)
                acia->status |= 0x20;
        acia->rxchar = acia->dev->get(acia->dev);

instead just returns if status & 1 then I think you'll get the behaviour you want

EtchedPixels avatar May 28 '25 19:05 EtchedPixels

Made the following change

	if (acia->status & 1)
	{
		return; /* Workaround */
		acia->status |= 0x20;
	}

The result doesn't drop individual characters but there is still an issue when pasting multiple lines.

Z80 SBC By Grant Searle

Memory top? 
Z80 BASIC Ver 4.7b
Copyright (C) 1978 by Microsoft
32382 Bytes free
Ok
100 PRINT
110 INPUT "How many digits ";N
120 PRINT
130 CR=0
140
?UL Error
Ok
`

mike632t avatar Jun 13 '25 23:06 mike632t

Does "-f" as an optionc change that ?

EtchedPixels avatar Jun 17 '25 13:06 EtchedPixels

No.

Noticed that it stops accepting input at the same point every time - only the first 64 characters register (including single 'carriadge-returns' at the end if each line).

mike632t avatar Jun 17 '25 17:06 mike632t