[Coco] pasting text into emulated coco session on xroar?

Ciaran Anscomb cocomalt at 6809.org.uk
Fri Jan 26 10:31:51 EST 2018


"Richard Cavell" wrote:
>    No. But you can:
> 
>    xroar -type 'PRINT "HELLO"'

FWIW the reason XRoar doesn't do this yet is that SDL2 doesn't abstract
"paste", so I'd have to look into the windows- and macosx- specific
ways to do this (not that macosx builds work since I stopped having a
mac of course...).

Assuming paste event can be trapped and accessing cut buffer/clipboard
is straightforward on those archs, there are two ways that come to mind
for passing it to the emulated machine:

1. Intercept BASIC keyboard scanning ROM call.  That's what "-type" does.
Fast (can feed text as quickly as the ROM reads it), but not compatible
with applications that bypass this (or OS-9, of course).

2. Simulate timed keypress/release.  Always going to be slower if it's
going to be reliable.  Entering a whole program may take a while!

(Either way, probably a good idea to have a physical keypress interrupt
this, as you might lose control for a long time...)

>    Note that in MAME, you can use the "UI Paste" action.

Any idea which of the above approaches this takes?  Also, where is
this function?  Middle button paste doesn't work, and I can't find it
in the menus (reasonably recent build from git).

..ciaran


More information about the Coco mailing list