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

Joel Rees joel.rees at gmail.com
Fri Jan 26 18:19:56 EST 2018


2018/01/27 0:32 "Ciaran Anscomb" <cocomalt at 6809.org.uk>:
>
> "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...).

Okay, how about a Linus OS? (Debian?)

> 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).

My input character routine currently goes through the ROM calls, so this
would work.

> 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!

Having this option would be nice, but not necessary for me at this point. I
do have a keyboard driver I'd eventually like to use. It uses
interrupt-driven sampling instead of busy-wait. But that's way down the
road for me, and maybe not at all. Lots of things to do between then and
now, including earning a living.

Maybe I can help with some of this.

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

Indeed.

> >    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).

I'm looking for this information, too.


More information about the Coco mailing list